First of all, this is not going to be yet an other hot tempered discussion on which editor is the best, but a description why and how I switched my workflow from Textmate to vim.
1. Why?
This is an easy one. As you might know or at least guess, I am editing files on a HPC over the internet and this was a hassle with Textmate. Why? Because I had to mount the HPC‘s filesystem via my internet connection and edit the remote files with my local Textmate, which is a really bad idea. It just felt like sedated and still trying to get things done. I was in need of a proper alternative for doing such things, something that could be run in an ssh terminal window. I remembered vim from some administrative jobs on a server, I did some time ago and so I gave vim a try.
2. Textmate functionality in vim?
After having played around for a day or two with vim, I wondered if there is a replacement for my beloved Textmate functions, such as:
- Snippets
- command-t
- Projectdrawer
- bibtex completion
- reference completion for latex documents
There are so many plugins for vim, most likely you can find one for everything, you need to do. The Textmate snippet function can be replaced by vim’s snippets plugin, which provides a bunch of ready to use snippets for all my beloved languages (c++, python, tex).
An other awesome feature of Textmate is the so called command-t file navigation. This functionality is adopted to vim by the command-t plugin. In my honest opinion, this plugin is way better than the Textmate function, since it supports tabs and splits.
The projectdrawer in Textmate can be replaced in vim, using the NerdTree plugin, it even supports opening files in new splits, which is not supported in Textmate.
As Textmate offers a nice integration of bibtex bibliographies and latex typesetting and I use this for all my writing, I was anxious to find a way to use this in vim as well. I am currently using vim -latex, which is working quite well. Unfortunately I’ve found no way to display inline parsed equations in vim, like it is possible with emacs. If you know a way, please let me know (and no, switching to emacs is no option for me).
3. Conclusion after 10 months of usage
I don’t want to go back. I love the splits in vim, the fast editing and that there is no need to take the hands of the keyboard. Just pressing keys, lots of keys. By cloning the .vim folder and .vimrc file in my home directory to a git repository, I have the same vim configuration available on all machines I am using. Regardless of the architecture.
