I installed vim-powerline and was wondering how to change the backlground colour of the normal mode -- currently set to #adf000 according to the Gimp -- to something else. I assume that the change will be in autoload/Powerline/Colorschemes/XXX.vim somewhere, I just cannot find it.

  • Are you looking for the file, or the line in the file to do the change? – M'vy Aug 21 '12 at 11:21
  • @M'vy: the lines to change as well as a good explanation of how it works... Hey, just like your answer in fact ^_~ – Sardathrion - against SE abuse Aug 21 '12 at 11:32

The colours of vim-powerline should be located in your .vim directory. If you use a plugin manager it may be .vim/bundle/ followed by the vim-powerline/autoload/Powerline/Colorschemes tree. The file you are looking for should be the default.vim.

The colour setting you are looking for is :

 .   \ Pl#Hi#Segments(['mode_indicator'], {¬        
 .   .   \ 'n': ['base03', 'green', ['bold']],¬     
 .   .   \ 'i': ['darkestcyan', 'white', ['bold']],¬
 .   .   \ 'v': ['white', 'orange', ['bold']],¬     
 .   .   \ 'r': ['white', 'violet', ['bold']],¬     
 .   .   \ 's': ['white', 'gray5', ['bold']],¬      
 .   .   \ }),¬                                     

n is for normal, i for insert, v for visual, r for replace and s for selection(?). Additional colours can be defined in the call Pl#Hi#Allocate({¬ section.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.