mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-07 14:14:43 +02:00
A better integration of virtualenv to avoid override other extensions
This commit is contained in:
parent
086b924992
commit
f37eeeb9af
@ -49,7 +49,7 @@ vim-airline provides seamless integration with a variety of plugins. These exte
|
|||||||

|

|
||||||
|
|
||||||
### [virtualenv][31]
|
### [virtualenv][31]
|
||||||

|

|
||||||
|
|
||||||
# Rationale
|
# Rationale
|
||||||
|
|
||||||
|
@ -7,7 +7,9 @@ endfunction
|
|||||||
|
|
||||||
function! airline#extensions#virtualenv#apply(...)
|
function! airline#extensions#virtualenv#apply(...)
|
||||||
if &filetype == "python"
|
if &filetype == "python"
|
||||||
let w:airline_section_x = '%{virtualenv#statusline()} '.g:airline_section_x
|
if !exists('w:airline_section_x')
|
||||||
|
let w:airline_section_x = g:airline_section_x
|
||||||
|
endif
|
||||||
|
let w:airline_section_x = '%{virtualenv#statusline()} '.g:airline_right_alt_sep.' '.w:airline_section_x
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user