ankursinha.in/blog

neuroscience/fedora/musings

Tue 23 November 2010

making vim-latex load when you open a new tex file

Posted by ankur in Other (93 words, approximately a 1 minute read)

For quite sometime now, I've been pondering over this issue: vim-latex wouldn't load when I began writing a new .tex file. As a result, I'd get errors such as ":TTemplate command not found". I found the "bug" today. From the vim-latex site:

" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'


Make sure you add this to your .vimrc if you want vim-latex to work as expected.