1
0
mirror of https://github.com/amix/vimrc synced 2025-06-29 11:04:59 +08:00

Updated plugins

This commit is contained in:
amix
2015-12-08 10:20:04 -03:00
parent 768c72a3ed
commit 3b37bba6cd
239 changed files with 8132 additions and 3198 deletions

View File

@ -181,7 +181,11 @@ Contributions and pull requests are welcome. Please take note of the following
* Adhere to the existing style as much as possible; notably, 2 space indents and long-form keywords.
* Keep the history clean! squash your branches before you submit a pull request. `pull --rebase` is your friend.
* Any changes to the core should be tested against Vim 7.2.
## Themes
* If you submit a theme, please create a screenshot so it can be added to the [Wiki][14].
* In the majority of cases, modifications to colors of existing themes will likely be rejected. Themes are a subjective thing, so while you may prefer that a particular color be darker, another user will prefer it to be lighter, or something entirely different. The more popular the theme, the more unlikely the change will be accepted. However, it's pretty simple to create your own theme; copy the theme to `~/.vim/autoload/airline/themes` under a new name with your modifications, and it can be used.
# License

View File

@ -88,6 +88,9 @@ function! airline#switch_matching_theme()
endfunction
function! airline#update_statusline()
if airline#util#getwinvar(winnr(), 'airline_disabled', 0)
return
endif
for nr in filter(range(1, winnr('$')), 'v:val != winnr()')
if airline#util#getwinvar(nr, 'airline_disabled', 0)
continue

View File

@ -206,6 +206,10 @@ function! airline#extensions#load()
call airline#extensions#whitespace#init(s:ext)
endif
if get(g:, 'airline#extensions#wordcount#enabled', 1)
call airline#extensions#wordcount#init(s:ext)
endif
if get(g:, 'airline#extensions#tabline#enabled', 0)
call airline#extensions#tabline#init(s:ext)
endif

View File

@ -5,7 +5,7 @@ if !exists('*CapsLockStatusline')
endif
function! airline#extensions#capslock#status()
return CapsLockStatusline() == '[caps]' ? 'CAPS' : ''
return tolower(CapsLockStatusline()) == '[caps]' ? 'CAPS' : ''
endfunction
function! airline#extensions#capslock#init(ext)

View File

@ -34,7 +34,7 @@ function! airline#extensions#tabline#autoshow#on()
" Invalidate cache. This has to come after the BufUnload for
" s:show_buffers, to invalidate the cache for BufEnter.
autocmd BufAdd,BufUnload * call airline#extensions#tabline#buflist#invalidate()
autocmd BufLeave,BufAdd,BufUnload * call airline#extensions#tabline#buflist#invalidate()
augroup END
endfunction

View File

@ -15,6 +15,7 @@ let s:default_checks = ['indent', 'trailing']
let s:trailing_format = get(g:, 'airline#extensions#whitespace#trailing_format', 'trailing[%s]')
let s:mixed_indent_format = get(g:, 'airline#extensions#whitespace#mixed_indent_format', 'mixed-indent[%s]')
let s:long_format = get(g:, 'airline#extensions#whitespace#long_format', 'long[%s]')
let s:indent_algo = get(g:, 'airline#extensions#whitespace#mixed_indent_algo', 0)
let s:max_lines = get(g:, 'airline#extensions#whitespace#max_lines', 20000)
@ -56,7 +57,12 @@ function! airline#extensions#whitespace#check()
let mixed = s:check_mixed_indent()
endif
if trailing != 0 || mixed != 0
let long = 0
if index(checks, 'long') > -1 && &tw > 0
let long = search('\%>'.&tw.'v.\+', 'nw')
endif
if trailing != 0 || mixed != 0 || long != 0
let b:airline_whitespace_check = s:symbol
if s:show_message
if trailing != 0
@ -65,6 +71,9 @@ function! airline#extensions#whitespace#check()
if mixed != 0
let b:airline_whitespace_check .= (g:airline_symbols.space).printf(s:mixed_indent_format, mixed)
endif
if long != 0
let b:airline_whitespace_check .= (g:airline_symbols.space).printf(s:long_format, long)
endif
endif
endif
endif

View File

@ -0,0 +1,40 @@
" MIT License. Copyright (c) 2013-2015 Bailey Ling.
" vim: et ts=2 sts=2 sw=2
let s:filetypes = get(g:, 'airline#extensions#wordcount#filetypes', '\vhelp|markdown|rst|org')
" adapted from http://stackoverflow.com/questions/114431/fast-word-count-function-in-vim
function! s:update()
if &ft !~ s:filetypes
unlet! b:airline_wordcount
return
endif
let old_status = v:statusmsg
let position = getpos(".")
exe "silent normal! g\<c-g>"
let stat = v:statusmsg
call setpos('.', position)
let v:statusmsg = old_status
let parts = split(stat)
if len(parts) > 11
let cnt = str2nr(split(stat)[11])
let spc = g:airline_symbols.space
let b:airline_wordcount = cnt . spc . 'words' . spc . g:airline_right_alt_sep . spc
else
unlet! b:airline_wordcount
endif
endfunction
function! airline#extensions#wordcount#apply(...)
if &ft =~ s:filetypes
call airline#extensions#prepend_to_section('z', '%{get(b:, "airline_wordcount", "")}')
endif
endfunction
function! airline#extensions#wordcount#init(ext)
call a:ext.add_statusline_func('airline#extensions#wordcount#apply')
autocmd BufReadPost,CursorMoved,CursorMovedI * call s:update()
endfunction

View File

@ -51,6 +51,7 @@ let g:airline#themes#behelit#palette.normal.airline_warning = s:WI
let g:airline#themes#behelit#palette.normal_modified.airline_warning = s:WI
let g:airline#themes#behelit#palette.insert.airline_warning = s:WI
let g:airline#themes#behelit#palette.insert_modified.airline_warning = s:WI
let g:airline#themes#behelit#palette.insert_paste.airline_warning = s:WI
let g:airline#themes#behelit#palette.visual.airline_warning = s:WI
let g:airline#themes#behelit#palette.visual_modified.airline_warning = s:WI
let g:airline#themes#behelit#palette.replace.airline_warning = s:WI

View File

@ -0,0 +1,92 @@
" vim-airline 'term' theme
" it is using current terminal colorscheme
" and in gvim i left colors from 'wombat' theme but i am not using it anyway
" Normal mode
" [ guifg, guibg, ctermfg, ctermbg, opts ]
let s:N1 = [ '#141413' , '#CAE682' , 232 , 2 ] " mode
let s:N2 = [ '#CAE682' , '#32322F' , 2 , 'black' ] " info
let s:N3 = [ '#CAE682' , '#242424' , 2 , 233 ] " statusline
let s:N4 = [ '#86CD74' , 10 ] " mode modified
" Insert mode
let s:I1 = [ '#141413' , '#FDE76E' , 232 , 3 ]
let s:I2 = [ '#FDE76E' , '#32322F' , 3 , 'black' ]
let s:I3 = [ '#FDE76E' , '#242424' , 3 , 233 ]
let s:I4 = [ '#FADE3E' , 11 ]
" Visual mode
let s:V1 = [ '#141413' , '#B5D3F3' , 232 , 4 ]
let s:V2 = [ '#B5D3F3' , '#32322F' , 4 , 'black' ]
let s:V3 = [ '#B5D3F3' , '#242424' , 4 , 233 ]
let s:V4 = [ '#7CB0E6' , 12 ]
" Replace mode
let s:R1 = [ '#141413' , '#E5786D' , 232 , 1 ]
let s:R2 = [ '#E5786D' , '#32322F' , 1 , 'black' ]
let s:R3 = [ '#E5786D' , '#242424' , 1 , 233 ]
let s:R4 = [ '#E55345' , 9 ]
" Paste mode
let s:PA = [ '#94E42C' , 6 ]
" Info modified
let s:IM = [ '#40403C' , 238 ]
" Inactive mode
let s:IA = [ '#767676' , s:N3[1] , 243 , s:N3[3] , '' ]
let g:airline#themes#term#palette = {}
let g:airline#themes#term#palette.accents = {
\ 'red': [ '#E5786D' , '' , 203 , '' , '' ],
\ }
let g:airline#themes#term#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
let g:airline#themes#term#palette.normal_modified = {
\ 'airline_a': [ s:N1[0] , s:N4[0] , s:N1[2] , s:N4[1] , '' ] ,
\ 'airline_b': [ s:N4[0] , s:IM[0] , s:N4[1] , s:IM[1] , '' ] ,
\ 'airline_c': [ s:N4[0] , s:N3[1] , s:N4[1] , s:N3[3] , '' ] }
let g:airline#themes#term#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#term#palette.insert_modified = {
\ 'airline_a': [ s:I1[0] , s:I4[0] , s:I1[2] , s:I4[1] , '' ] ,
\ 'airline_b': [ s:I4[0] , s:IM[0] , s:I4[1] , s:IM[1] , '' ] ,
\ 'airline_c': [ s:I4[0] , s:N3[1] , s:I4[1] , s:N3[3] , '' ] }
let g:airline#themes#term#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
let g:airline#themes#term#palette.visual_modified = {
\ 'airline_a': [ s:V1[0] , s:V4[0] , s:V1[2] , s:V4[1] , '' ] ,
\ 'airline_b': [ s:V4[0] , s:IM[0] , s:V4[1] , s:IM[1] , '' ] ,
\ 'airline_c': [ s:V4[0] , s:N3[1] , s:V4[1] , s:N3[3] , '' ] }
let g:airline#themes#term#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
let g:airline#themes#term#palette.replace_modified = {
\ 'airline_a': [ s:R1[0] , s:R4[0] , s:R1[2] , s:R4[1] , '' ] ,
\ 'airline_b': [ s:R4[0] , s:IM[0] , s:R4[1] , s:IM[1] , '' ] ,
\ 'airline_c': [ s:R4[0] , s:N3[1] , s:R4[1] , s:N3[3] , '' ] }
let g:airline#themes#term#palette.insert_paste = {
\ 'airline_a': [ s:I1[0] , s:PA[0] , s:I1[2] , s:PA[1] , '' ] ,
\ 'airline_b': [ s:PA[0] , s:IM[0] , s:PA[1] , s:IM[1] , '' ] ,
\ 'airline_c': [ s:PA[0] , s:N3[1] , s:PA[1] , s:N3[3] , '' ] }
let g:airline#themes#term#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
let g:airline#themes#term#palette.inactive_modified = {
\ 'airline_c': [ s:N4[0] , '' , s:N4[1] , '' , '' ] }
if !get(g:, 'loaded_ctrlp', 0)
finish
endif
let g:airline#themes#term#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(
\ [ '#DADADA' , '#242424' , 253 , 234 , '' ] ,
\ [ '#DADADA' , '#40403C' , 253 , 238 , '' ] ,
\ [ '#141413' , '#DADADA' , 232 , 253 , 'bold' ] )

View File

@ -401,6 +401,15 @@ eclim <https://eclim.org>
|airline-syntastic| extension. >
let g:airline#extensions#eclim#enabled = 1
------------------------------------- *airline-wordcount*
* enable/disable word counting. >
let g:airline#extensions#wordcount#enabled = 1
<
* regex of filetypes to enable word counting. >
" the default value matches filetypes typically used for documentation
" such as markdown and help files.
let g:airline#extensions#wordcount#filetypes = ...
<
------------------------------------- *airline-whitespace*
* enable/disable detection of whitespace errors. >
let g:airline#extensions#whitespace#enabled = 1
@ -422,7 +431,7 @@ eclim <https://eclim.org>
let g:airline#extensions#whitespace#symbol = '!'
<
* configure which whitespace checks to enable. >
let g:airline#extensions#whitespace#checks = [ 'indent', 'trailing' ]
let g:airline#extensions#whitespace#checks = [ 'indent', 'trailing', 'long' ]
<
* configure the maximum number of lines where whitespace checking is enabled. >
let g:airline#extensions#whitespace#max_lines = 20000
@ -433,6 +442,7 @@ eclim <https://eclim.org>
* configure the formatting of the warning messages. >
let g:airline#extensions#whitespace#trailing_format = 'trailing[%s]'
let g:airline#extensions#whitespace#mixed_indent_format = 'mixed-indent[%s]'
let g:airline#extensions#whitespace#long_format = 'long[%s]'
<
------------------------------------- *airline-tabline*
* enable/disable enhanced tabline. >
@ -489,7 +499,11 @@ exposed.
endfunction
let g:airline#extensions#tabline#formatter = 'foo'
<
Note: the following variables are only used by the 'default' formatter.
When no disambiguation is needed, both 'unique_tail_improved' and
'unique_tail' delegate formatting to 'default', so these variables also
control rendering of unique filenames when using these formatters.
* configure whether buffer numbers should be shown. >
let g:airline#extensions#tabline#buffer_nr_show = 0