goatslacker

  • Archive
  • RSS
  • Ask me anything

Why vim-powerline wasn’t working properly with some of my files

Recently I’ve been using this vim plugin called vim-powerline which has plenty of nice features like

  • Which git branch you’re currently on
  • Filetype and encoding
  • Line number/Character
  • Changes color for Insert mode

I highly recommend it.

Anyways, vim-powerline wasn’t working properly on my laptop though. Some files like .gitignore would work whereas others like sample.coffee wouldn’t. If I removed my ~/.vim/ftdetect folder most files would work but that wasn’t the solution.

I finally narrowed it down to my custom syntax highlighting colour scheme mango.vim. The offending line was this:

highlight clear

After looking into it I found out that highlight clear was clearing all of vim-powerline's styles so for files where syntax highlighting was turned on, the plugin wasn’t working as expected.

So if you’re having difficulties installing vim-powerline, check to make sure your color scheme isn’t clearing highlights. Dark color schemes commonly have this set.

Installing vim-powerline is fairly easy. You’ll need to be on an 88 || 256 color terminal — so if you’re on OSX I definitely recommend iTerm2.

In your .vimrc file you’ll set the following

set nocompatible
set t_Co=256

Make sure Powerline.vim is in ~/.vim/plugin/ and Pl folder and Pl.vim is in ~/.vim/autoload/ and you should be all set.

    • #highlighting
    • #mango.vim
    • #syntax
    • #vim
    • #vim-powerline
    • #vimrc
  • 4 months ago
  • 11
  • Comments
  • Permalink
  • Share
    Tweet

11 Notes/ Hide

  1. ballisticexd liked this
  2. creative102 liked this
  3. molecules0de liked this
  4. longman09f liked this
  5. dictionaryde2 liked this
  6. apartmentrt6 liked this
  7. startede9 liked this
  8. affordable06 liked this
  9. development09me liked this
  10. transientyou83 liked this
  11. goatslacker posted this

Recent comments

Blog comments powered by Disqus
← Previous • Next →

About

Software Engineering, Music, Sports
  • @goatslacker on Twitter
  • Facebook Profile
  • goatslacker on Last.fm
  • goatslacker on Grooveshark
  • Linkedin Profile
  • goatslacker on github

Twitter

loading tweets…

Posts I like

See more →
  • Video via izs
    Video

    Watch this video. I really like a lot of what he has to say. Two main comments:

    1. 165 Exceptions in the standard library, is enough!? Are you...
    Video via izs
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Josh Perez. Effector Theme by Carlo Franco.

Powered by Tumblr