
How-to: VIM, GNU R, and LaTeX
October 24, 2009Recently I switched from Emacs to VIM. Mostly because I’ve felt that the default keybindings are more sane. The first thing I needed to do was to find a plugin for VIM that worked for R. Well here is that plugin. The follow the directions there for installation. (If you need help leave me a comment). VIM will automatically detect that it is in R mode when opening a *.R file.
Two quick tips to get you started:
# To open R
\rf
# To send code to R
\d
Also, if you need a LaTeX plugin for VIM here it is. It also has very sane keybindings. I recommend not using the Debian package as it didn’t work for me. To get LaTeX to compile in PDF mode by default I added the following to ~/.vimrc:
" Set pdf as default target
let g:Tex_DefaultTargetFormat='pdf'
That’s it. And in complete disclosure, I am really using the GTK-front end of VIM known as GVIM.
