always enable paste detection.

This commit is contained in:
Bailey Ling
2013-08-26 22:55:11 -04:00
parent bc03ab5cbf
commit e919663781
6 changed files with 17 additions and 26 deletions

View File

@@ -199,10 +199,6 @@ function! airline#extensions#load()
call airline#extensions#readonly#init()
endif
if (get(g:, 'airline#extensions#paste#enabled', 1) && get(g:, 'airline_detect_paste', 1))
call airline#extensions#paste#init()
endif
if get(g:, 'airline#extensions#iminsert#enabled', 0) || get(g:, 'airline_detect_iminsert', 0)
call airline#extensions#iminsert#init()
endif

View File

@@ -1,14 +0,0 @@
" MIT License. Copyright (c) 2013 Bailey Ling.
" vim: et ts=2 sts=2 sw=2
let s:symbol = get(g:, 'airline#extensions#paste#symbol',
\ get(g:, 'airline_paste_symbol', (get(g:, 'airline_powerline_fonts', 0) ? ' ' : '').'PASTE'))
function! airline#extensions#paste#get_mark()
return &paste ? ' ' . s:symbol : ''
endfunction
function! airline#extensions#paste#init()
let g:airline_section_a .= '%{airline#extensions#paste#get_mark()}'
endfunction

View File

@@ -0,0 +1,12 @@
" MIT License. Copyright (c) 2013 Bailey Ling.
" vim: et ts=2 sts=2 sw=2
let g:airline#fragments#symbols = get(g:, 'airline#fragments#symbols', {})
call extend(g:airline#fragments#symbols, {
\ 'paste': get(g:, 'airline_paste_symbol', g:airline_left_alt_sep.' PASTE')
\ }, 'keep')
function! airline#fragments#get_paste()
return &paste ? ' ' . g:airline#fragments#symbols.paste : ''
endfunction