As any long time Vim user, I’m constantly looking for ways to tweak and improve my text editor configuration, and make me even more efficient. Today, I came across a very handy addition – Zeal – an offline documentation browser for developers. (Thanks to this blog post, which also mentions Dash as an alternative for those of you on the MacOS.)
With Zeal, you can download a whole lot of documentation sets for pretty much any web development technology out there – programming languages, frameworks, libraries, tools, and more. And then you can easily integrate Zeal with whatever text editor or IDE you are using.
For Vim, there are, as always, several options. Some of them are listed here. I personally opted for the Zeavim plugin. The installation is straight forward and everything works out of the box. After giving a quick try, I decided to adjust my .vimrc file to use CakePHP framework documentation together with the PHP programming language documentation whenever I’m working with any PHP file. Here’s what I had to add:
" Zeal offline documentation let g:zv_file_types = { \ 'php': 'cakephp,php', \ }
Now, whenever I edit a PHP file and hit “,z” (I use comma as a leader, by the way), Zeal window pops up with the relevant documentation search.
It’s super fast. It works offline, and it’s awesome!