mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-02-27 03:52:17 +08:00
Merge pull request #166 from itchyny/paste_symbol
paste mark is now a member of extensions
This commit is contained in:
@@ -173,6 +173,10 @@ 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 g:airline_detect_iminsert
|
||||
call airline#extensions#iminsert#init()
|
||||
endif
|
||||
|
||||
14
autoload/airline/extensions/paste.vim
Normal file
14
autoload/airline/extensions/paste.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" 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', ''))
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user