Vim configuration rework

After using my Vim configuration since 2012 I got inspired by a recent blog post to do some work on it.

My current configuration was highly optimized for the tasks I had to do back then. Of course, my requirements for a text editor has changed since then. Time for an update.

What has changed?

Vim was never my exclusive editor. I always used tools like Xcode or Eclipse for software development as those tools give you a more complete toolset. Features like an integrated debugger, documentation lookup, and code navigation is something those IDEs are capable from the start.

Vim was my weapon of choice for languages like JavaScript, Ruby, Go, HTML, and of course all text editing tasks.

This has changed lately when I started to use Visual Studio Code for more and more tasks. Yes I know it's a web application and it's from Microsoft, but it works pretty well for me.

Because of this a lot of settings in my Vim configuration are not needed anymore. Let the cleanup begin...

Remove and Replace

I went through all settings and removed every plugin, setting, and key mapping I haven't used for a while. A lot of the key mappings got deleted because I wouldn't be able to remember the key combo if I wanted to use them.

Plugin Manager

I have been using Vundle as my go-to plugin manager since the beginning. A lot of new plugin managers have been released since then, but I have never been tempted to try one of them. Vundle was doing its job.

After reading about vim-plug, I looked at the features and gave it a try. I was really impressed by its performance:

vim-plug has also some nice features like on-demand loading, branch/tag/commit support and rollback of updates.

The rollback feature, in particular, will come in handy when an update breaks a plugin. It's very easy to view the changes with :PlugDiff and then revert the problematic one with the X key:

Language plugins

Even if I won't do much programming in Vim anymore, I still want to be able to open Vim for a quick edit of a source file and get proper highlighting and indentation for that language.

There's a nice solution for this. vim-polyglot is a collection of about 100 languages bundled in a single plugin. The language scripts are loaded on demand, so it won't affect the startup time.

This is enough for all my language needs:

Plug 'sheerun/vim-polyglot'

What's next?

I will still use Vim for all editing when it's a fitting tool for the current task. For me, Vim is still the number one editor when I have to do a quick edit from the terminal.

After some time I will revise my configuration again and will make the necessary adjustments. I can see a really slim Vim config in the future :-)

You can find my configuration on GitHub.