mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-16 00:37:08 +08:00
always enable paste detection.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
12
autoload/airline/fragments.vim
Normal file
12
autoload/airline/fragments.vim
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user