mirror of
https://github.com/vim-airline/vim-airline-themes.git
synced 2025-12-07 01:34:24 +08:00
A better integration of virtualenv to avoid override other extensions
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user