From f37eeeb9af20a57e22dfbd0fd55ff4a8cdee031c Mon Sep 17 00:00:00 2001 From: joe di castro Date: Sun, 25 Aug 2013 17:14:12 +0200 Subject: [PATCH] A better integration of virtualenv to avoid override other extensions --- README.md | 2 +- autoload/airline/extensions/virtualenv.vim | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 806960c..2865268 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ vim-airline provides seamless integration with a variety of plugins. These exte ![image](https://f.cloud.github.com/assets/306502/995185/73fc7054-09b9-11e3-9d45-618406c6ed98.png) ### [virtualenv][31] -![image](https://f.cloud.github.com/assets/390964/1021386/73ed49e4-0cfc-11e3-96df-8d5084cde7da.png) +![image](https://f.cloud.github.com/assets/390964/1022566/cf81f830-0d98-11e3-904f-cf4fe3ce201e.png) # Rationale diff --git a/autoload/airline/extensions/virtualenv.vim b/autoload/airline/extensions/virtualenv.vim index a4517a9..1ca4359 100644 --- a/autoload/airline/extensions/virtualenv.vim +++ b/autoload/airline/extensions/virtualenv.vim @@ -7,7 +7,9 @@ endfunction function! airline#extensions#virtualenv#apply(...) 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 endfunction -