1
0
mirror of https://github.com/amix/vimrc synced 2025-07-01 20:55:00 +08:00

Updated plugins

This commit is contained in:
amix
2016-04-03 21:59:57 +01:00
parent 15bc8c1385
commit 4b45bb33c2
41 changed files with 322 additions and 5712 deletions

View File

@ -131,6 +131,10 @@ function! airline#extensions#tabline#title(n)
let title = TabooTabTitle(a:n)
endif
if empty(title) && exists('*gettabvar')
let title = gettabvar(a:n, 'title')
endif
if empty(title)
let buflist = tabpagebuflist(a:n)
let winnr = tabpagewinnr(a:n)

View File

@ -57,6 +57,11 @@ function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_t
endif
let buf_name = '%(%{airline#extensions#tabline#get_buffer_name('.buffer.index.')}%)'
if has("tablineat")
let buf_name = '%'.buffer.index.'@airline#extensions#tabline#buffers#switchbuf@'.buf_name.'%X'
endif
call a:builder.add_section_spaced(group, buf_name)
endfor
endfunction
@ -83,7 +88,7 @@ function! airline#extensions#tabline#ctrlspace#add_tab_section(builder, pos)
endif
endif
call a:builder.add_section_spaced(group, tab.title.ctrlspace#api#TabBuffersNumber(tab.index))
call a:builder.add_section_spaced(group, '%'.tab.index.'T'.tab.title.ctrlspace#api#TabBuffersNumber(tab.index).'%T')
endfor
endfunction

View File

@ -18,6 +18,8 @@ let s:max_lines = get(g:, 'airline#extensions#whitespace#max_lines', 20000)
let s:enabled = get(g:, 'airline#extensions#whitespace#enabled', 1)
let s:c_like_langs = ['c', 'cpp', 'javascript', 'ld']
function! s:check_mixed_indent()
if s:indent_algo == 1
" [<tab>]<space><tab>
@ -35,8 +37,8 @@ function! s:check_mixed_indent()
endfunction
function! s:check_mixed_indent_file()
if stridx(&ft, 'c') == 0 || stridx(&ft, 'cpp') == 0 || stridx(&ft, 'javascript') == 0
" for C/CPP only allow /** */ comment style with one space before the '*'
if index(s:c_like_langs, &ft) > -1
" for C-like languages: allow /** */ comment style with one space before the '*'
let head_spc = '\v(^ +\*@!)'
else
let head_spc = '\v(^ +)'

View File

@ -15,7 +15,11 @@ function! airline#extensions#windowswap#init(ext)
endfunction
function! airline#extensions#windowswap#get_status()
if WindowSwap#HasMarkedWindow() && WindowSwap#GetMarkedWindowNum() == winnr()
" use new tab-aware api if WS is up to date
let s:mark = exists('*WindowSwap#IsCurrentWindowMarked') ?
\WindowSwap#IsCurrentWindowMarked() :
\(WindowSwap#HasMarkedWindow() && WindowSwap#GetMarkedWindowNum() == winnr())
if s:mark
return g:airline#extensions#windowswap#indicator_text.s:spc
endif
return ''