Friday, May 1, 2009

Vim+latexsuite in ubuntu 9.04

After struggling a whole day, I finally got vim+latexsuite work in ubuntu 9.04.

Here is the points(at least work for me):
1. DON'T download the latex-suite file from http://vim-latex.sourceforge.net/ and unzip into ~/.vim/. It just simply doesn't work because vim-addons cannot find it, even if ~/.vim/ is in the runtimepath of vim. I don't know why.
2. USE sudo apt-get install vim-latex to let ubuntu install it for you. Also do sudo apt-get install vim-addons-manager if you haven't.
3. sudo vim-addons -w install latex-suite
4. vim-addons
5. You should see
#name User Status System Status
latex-suite installed(or removed, doesn't matter) installed
6. put your own tex.vim file in /usr/share/vim/addons/ftplugin/
7. In .vimrc, add:

set runtimepath+=/usr/share/vim/addons
filetype plugin on
set grepprg=grep\ -nH\ $*
filetype indent on
let g:tex_flavor="latex"


8. sudo vim yourfile.tex
9. you will see an error involved with remoteOpen.vim. But latex-suite works.

Right, it's wierd that I need to use sudo to launch vim. If I only type vim yourfile.tex, the remoteOpen.vim error will also occur and latex-suite will not be called.

Update:


1. I eliminate those error by commenting out the specific lines in remoteOpen.vim
2. The reason that I can only use sudo to launch latexsuite is because the privilege of .vimrc is superuser. I "chown" it to my own user and get it done.

No comments:

Post a Comment