My Updated Vim Configuration

I have used the same vim configuration since college and while it works well, it has become very dated. Recently, I decided to overhaul my vim configuration and thought I would share the results. Read on to learn more!
Vimlogo.svg

  • Install vim +lua (required for neocomplete — easy to accomplish on mac, requires a manual compile for Linux)
$ sudo port install vim +lua
$ sudo port activate vim $(sudo port echo installed | grep vim | grep lua | awk '{print $2}')
  • Install spf13-vim (note while the installer is suppose to backup your existing vim configuration, it did not work in my case so I had to manually delete)
  • Install Powerline fonts
  • In .vimrc.before.local
    let g:airline_powerline_fonts=1
  • Turn on solarize
    • In iTerm2
      • Preferences > Profiles > Colors > Color Presets > Solarized Dark
      • Preferences > Profiles > Text > Font and Non-ASCII Font > Hack
    • In .vimrc.local
      let g:solarized_termcolors=16
      color solarized
      let g:airline_theme="base16_solarized"
  • Mac only: Change EDITOR to: mvim -f (for git support)

So what is so cool about this setup? Many things!

  1. I do not need to maintain VIM configuration! Of course I can still make modifications if I desire
  2. I get VIM best practices for free! (I am sure some bugs too)
  3. Plugins that play nice together! Including
    • Undotree – undo with history (similar to git)
    • NERDtree – directory listing navigation within VIM
  4. Colors that are better on the eyes

What issues have I experienced since making the change? Only one:

  1. Ctrl+C no longer works — this is not a big deal locally as I can use ‘y’ (i.e. yank), however this trick does NOT work over SSH. My solution is to “:set nonumber” and then Option+ followed by Ctrl+C to get what I want. If this becomes too much of a hassle I make look into alternatives.

© 2016, Steve Flanders. All rights reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top