mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-10-08 04:54:32 +08:00
add virtualenv extension
This commit is contained in:
1 parent
c98549913c
commit
f0df8825df
4 files changed
+29
-2
No files matched your search
@@ -0,0 +1,13 @@
|
||||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
function! airline#extensions#virtualenv#init(ext)
|
||||
call a:ext.add_statusline_func('airline#extensions#virtualenv#apply')
|
||||
endfunction
|
||||
|
||||
function! airline#extensions#virtualenv#apply(...)
|
||||
if &filetype == "python"
|
||||
let w:airline_section_x = '%{virtualenv#statusline()} '.g:airline_section_x
|
||||
endif
|
||||
endfunction
|
||||
|
||||
Reference in new issue
Block a user