mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-01-03 18:13:25 +08:00
Add vim-grepper extension
- Displays a segment when a grepper search is running
This commit is contained in:
19
autoload/airline/extensions/grepper.vim
Normal file
19
autoload/airline/extensions/grepper.vim
Normal file
@@ -0,0 +1,19 @@
|
||||
" MIT License. Copyright (c) 2014-2018 Mathias Andersson et al.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
" Heavily derived from the Gutentags extension
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
if !get(g:, 'loaded_grepper', 0)
|
||||
finish
|
||||
endif
|
||||
|
||||
function! airline#extensions#grepper#status()
|
||||
let msg = grepper#statusline()
|
||||
return empty(msg) ? '' : 'grepper'
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#grepper#init(ext)
|
||||
call airline#parts#define_function('grepper', 'airline#extensions#grepper#status')
|
||||
endfunction
|
||||
Reference in New Issue
Block a user