The vim snipmate plugin makes vim behave a bit like textmate.
Textmate is well known for its nice features, the most prominent being its snippets (or whatever they're called in Textmate...).
Archlinux has an AUR package for snipmate, so installation is trivial. After that,
snippets lie somewhere in
/usr/share/vim, but I don't want any of the predefined ones
anyways, so I changed the path to my local
~/.vim/snippets directory by adding the
following to my
" set snippets dir to local path let g:snippets_dir = "~/.vim/snippets"
After that, you can define snippets per filetype. So for TeX files create a
file in that folder and fill in your snippets. Look in the original snippets folder for
guidance on how to do it -- it's straight forward.
I mainly use it when editing LaTeX files, e.g. for citations. So typing
Tab again gives:
You get the point ;-)