I don't believe it's possible to have a good vimrc without really grasping some elementary concepts like movements, operators, registers, windows etc. I have recently watched all the Drew Neil's VimCasts[1] and after just a couple of hours I've realized I was missing a lot for at least 10 years. There is also quite a good presentation on YouTube by Max Cantor "How to Do 90% of What Plugins Do (With Just Vim)"[2]. Instead of treating a single vimrc as the best one it's useful to skim through dotfiles and plugins of some influential vim users like Drew Neil[3] and Tim Pope[4]. BTW VimCasts are accompanied by a book. The second edition[5] includes changes introduced by Vim 8.0.<p>[1]: <a href="http://vimcasts.org/episodes/" rel="nofollow">http://vimcasts.org/episodes/</a>
[2]: <a href="https://www.youtube.com/watch?v=XA2WjJbmmoM" rel="nofollow">https://www.youtube.com/watch?v=XA2WjJbmmoM</a>
[3]: <a href="https://github.com/nelstrom/dotfiles" rel="nofollow">https://github.com/nelstrom/dotfiles</a>
[4]: <a href="https://github.com/tpope" rel="nofollow">https://github.com/tpope</a>
[5]: <a href="https://pragprog.com/book/dnvim2/practical-vim-second-edition" rel="nofollow">https://pragprog.com/book/dnvim2/practical-vim-second-editio...</a>
I wonder why text editor preferences are so personal. I use the same editor and probably 90% of the same config as this guy and was nodding along until I saw he remapped B and E. Horrifying! Those are fundamental motions.
The literal worst of vimrc is the _default_ settings of many Linux distributions these days. Colors are fine, but _behavior_-changing stuff is not. I would be happier if package installers included a brief configurator as part of installation.<p>Do you want to use tabs when you press tab, or spaces? If spaces, then _how many_?<p>Do you want to automatically (infuriatingly IMO) continue comments and completely wreck the ability to paste text without also _telling_ vim that you intend to paste via the `set paste` command?<p>Simple stuff like that, you know?
I've been using VIM for a while, and I'm always delighted to read articles or examples of good .vimrc's, but this one tops them all, because of the perfect balance of cool features and concise explanations. Good job, OP, what a wonderful blog post, I learned a couple nice things too!
Now just add the section about uploading it to your GitHub so all new servers get setup with a simple git clone, and any new changes can be propogated around with push/pull.
Since this article is written in kind of a "literate programming style", I'll plug and share my Emacs config that is actually written in literate programming: <a href="https://github.com/munen/emacs.d/blob/master/configuration.org" rel="nofollow">https://github.com/munen/emacs.d/blob/master/configuration.o...</a><p>Nice documentation like this fine blog post for free^^
Good write up.
Ive been looking into
Now this might sound like heresy but I've been considering moving to emacs lately and using evil mode.<p>The thing that gets me is vim's lack for auto completion for stuff like scala. Has anyone managed to set that up?