# Alternatives to vimrc for Vim-LaTeX while Sourceforge is down

Sourceforge has been down for the last few days. It seems the only way to find what to add to your vimrc to get Vim-LaTeX to work is to download the 'recommended settings' from Sourceforge. This information is not even in the manual.

Could someone tell me where else I could find what to put in my vimrc to setup Vim-LaTeX?

It would be great if you put a copy here for future reference.

Note: I already have Vim-LaTeX downloaded from a Linux repository, so I just need the vimrc file.

• I'm sorry, but I can't help with Vim-LaTeX. However, I do develop my own LaTeX-plugin: vimtex, which I personally think is getting pretty good. There is also several other good ones (IMHO), e.g. LaTeX-Box, atp and vim-latex-live-preview. – Karl Yngve Lervåg Jul 18 '15 at 16:23
• Perhaps ask on TeX - LaTeX, you might find somebody there that has it at hand. – lcd047 Jul 18 '15 at 17:39
• There is some information in the help (:help recommended-settings) and a lot in the "texrc" file included with the plugin (vim-latex/ftplugin/latex-suite/texrc). Are you looking for something beyond these? – jjaderberg Jul 18 '15 at 17:50

Make sure that you create a few necessary settings in your ~/.vimrc.

" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on

" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash

" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ \$*

" OPTIONAL: This enables automatic indentation as you type.
filetype indent on

" 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'


In addition, the following settings could go in your ~/.vim/ftplugin/tex.vim file:

" this is mostly a matter of taste. but LaTeX looks good with just a bit
" of indentation.
set sw=2
" TIP: if you write your \label's as \label{fig:something}, then if you
" type in \ref{fig: and press <C-n> you will automatically cycle through
" all the figure labels. Very useful!
set iskeyword+=:


Though I must say I find nothing particularly unusual in here, except perhaps for:

let g:tex_flavor='latex'

• @Emre That's the recommended-settings section from the help, which you should have if you have installed the plugin. Is it what you are looking for? – jjaderberg Jul 18 '15 at 18:17
• Yes that's it! I misinterpreted the paragraph preceding it to mean that there was more on the vimrc file on Sourceforge. Thanks a lot, both the answer and the comment have been illuminating. – Emre Jul 19 '15 at 4:52