Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Can someone please help with installing vim with the latex plugin? I've tried searching online for easier instructions, but I can't find anything. I have very little experience with terminal and I have no idea how to do this.

What I've done is just download the file. I created a ~/.vim directory, but beyond that, I'm completely lost.

Update: I'm running Mac OSX 10.7.5.

share|improve this question
    
Did you follow the install instructions? vim-latex.sourceforge.net/… and settings recommendations? vim-latex.sourceforge.net/documentation/latex-suite/… –  rickhg12hs May 6 '13 at 0:06
    
@rickhg12hs yeah, of course. THat was the first thing I did. I don't understand all of it. I'm not very experienced with setting up stuff like this –  AlanH May 6 '13 at 6:39
    
Okay, not sure what your current state is. Can you run vim normally? I.e., it's installed and runs correctly? Do you know how to unzip files and have the contents end up where you want? Is there anything in .vimrc already? –  rickhg12hs May 6 '13 at 9:17
    
@rickhg12hs to be safest let's just say i have vim downloaded and unzipped and that's it –  AlanH May 6 '13 at 9:27
    
Saw your other post asking about editors for Mac. Based on your specific list of requirements, is vim even in the running? Seems like you would have bypassed it quickly. –  rickhg12hs May 6 '13 at 18:23

1 Answer 1

up vote 13 down vote accepted

I suppose you already have Vim installed in your operating system.

Usually, the installation is very straightforward for every operating system. For Macs, we have MacVim, and AFAIK two options are available:

  • Getting the correct MacVim version for your operating system in the project website, unzip the archive file and drag MacVim.app to your Applications folder.

  • If you use Homebrew, there's already a formula for MacVim available, so you can run

    brew install macvim
    

    and MacVim will be deployed.

Now, back to vim-latex.

I don't use it, but I can provide a very clean way of deploying plugins for Vim. The solution relies on Tim Pope's awesome Pathogenpathogen plugin, which manage our runtimepath very easily.

First of all, open your terminal and type the following:

mkdir -p ~/.vim/autoload ~/.vim/bundle

This will create two directories (and even the parent .vim directory, if it doesn't exist), autoload and bundle inside .vim. Now we are half-way done.

Now, let's type this command:

curl -Sso ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim

This command will download pathogen.vim from Tim's repository and deploy it inside the autoload directory.

Now let's edit .vimrc to call pathogen for us. Type this command:

open -e ~/.vimrc

and add the following lines, preferably in the beginning:

execute pathogen#infect()
syntax on
filetype plugin indent on

...
<the rest of the file>
...

Note: The only required line for pathogen to work is the first one, the other two are just some goodies I recommend. :)

Now, if you want to deploy any Vim plugin, just extract it and put the extracted directory under ~/.vim/bundle. That's it.

For example, I got this file, vim-latex-1.8.23-20130116.788-git2ef9956.tar.gz. I'll extract it, and the result is as follows:

vim-latex-1.8.23-20130116.788-git2ef9956
├── compiler
│   └── tex.vim
├── doc
│   ├── catalog.xml
│   ├── db2vim
│   │   ├── db2vim
│   │   ├── domutils.py
│   │   └── textutils.py
│   ├── imaps.txt
│   ├── latexhelp.txt
│   ├── latex-suite-chunk.xsl
│   ├── latex-suite-common.xsl
│   ├── latex-suite.css
│   ├── latex-suite-quickstart.css
│   ├── latex-suite-quickstart.txt
│   ├── latex-suite-quickstart.xml
│   ├── latex-suite.txt
│   ├── latex-suite.xml
│   ├── latex-suite.xsl
│   ├── Makefile
│   ├── Makefile.in
│   ├── README
│   └── README.new
├── ftplugin
│   ├── bib_latexSuite.vim
│   ├── latex-suite
│   │   ├── bibtex.vim
│   │   ├── bibtools.py
│   │   ├── brackets.vim
│   │   ├── compiler.vim
│   │   ├── custommacros.vim
│   │   ├── diacritics.vim
│   │   ├── dictionaries
│   │   │   ├── dictionary
│   │   │   └── SIunits
│   │   ├── elementmacros.vim
│   │   ├── envmacros.vim
│   │   ├── folding.vim
│   │   ├── macros
│   │   │   └── example
│   │   ├── main.vim
│   │   ├── mathmacros-utf.vim
│   │   ├── mathmacros.vim
│   │   ├── multicompile.vim
│   │   ├── outline.py
│   │   ├── packages
│   │   │   ├── accents
│   │   │   ├── acromake
│   │   │   ├── afterpage
│   │   │   ├── alltt
│   │   │   ├── amsmath
│   │   │   ├── amsthm
│   │   │   ├── amsxtra
│   │   │   ├── arabic
│   │   │   ├── array
│   │   │   ├── babel
│   │   │   ├── bar
│   │   │   ├── biblatex
│   │   │   ├── bm
│   │   │   ├── bophook
│   │   │   ├── boxedminipage
│   │   │   ├── caption2
│   │   │   ├── cases
│   │   │   ├── ccaption
│   │   │   ├── changebar
│   │   │   ├── chapterbib
│   │   │   ├── cite
│   │   │   ├── color
│   │   │   ├── comma
│   │   │   ├── csquotes
│   │   │   ├── deleq
│   │   │   ├── drftcite
│   │   │   ├── dropping
│   │   │   ├── enumerate
│   │   │   ├── eqlist
│   │   │   ├── eqparbox
│   │   │   ├── everyshi
│   │   │   ├── exmpl
│   │   │   ├── fixme
│   │   │   ├── flafter
│   │   │   ├── float
│   │   │   ├── floatflt
│   │   │   ├── fn2end
│   │   │   ├── footmisc
│   │   │   ├── geometry
│   │   │   ├── german
│   │   │   ├── graphicx
│   │   │   ├── graphpap
│   │   │   ├── harpoon
│   │   │   ├── hhline
│   │   │   ├── histogram
│   │   │   ├── hyperref
│   │   │   ├── ifthen
│   │   │   ├── inputenc
│   │   │   ├── letterspace
│   │   │   ├── lineno
│   │   │   ├── longtable
│   │   │   ├── lscape
│   │   │   ├── manyfoot
│   │   │   ├── moreverb
│   │   │   ├── multibox
│   │   │   ├── multicol
│   │   │   ├── newalg
│   │   │   ├── ngerman
│   │   │   ├── numprint
│   │   │   ├── oldstyle
│   │   │   ├── outliner
│   │   │   ├── overcite
│   │   │   ├── pagenote
│   │   │   ├── parallel
│   │   │   ├── plain
│   │   │   ├── plates
│   │   │   ├── polski
│   │   │   ├── psgo
│   │   │   ├── schedule
│   │   │   ├── SIunits
│   │   │   ├── textfit
│   │   │   ├── times
│   │   │   ├── tipa
│   │   │   ├── ulem
│   │   │   ├── url
│   │   │   ├── verbatim
│   │   │   └── version
│   │   ├── packages.vim
│   │   ├── projecttemplate.vim
│   │   ├── pytools.py
│   │   ├── smartspace.vim
│   │   ├── templates
│   │   │   ├── article.tex
│   │   │   ├── IEEEtran.tex
│   │   │   ├── report.tex
│   │   │   └── report_two_column.tex
│   │   ├── templates.vim
│   │   ├── texmenuconf.vim
│   │   ├── texproject.vim
│   │   ├── texrc
│   │   ├── texviewer.vim
│   │   ├── version.vim
│   │   └── wizardfuncs.vim
│   └── tex_latexSuite.vim
├── indent
│   └── tex.vim
├── latextags
├── ltags
├── Makefile
├── Makefile.in
└── plugin
    ├── filebrowser.vim
    ├── imaps.vim
    ├── libList.vim
    ├── remoteOpen.vim
    └── SyntaxFolds.vim

Now, I'll simply get the whole vim-latex-1.8.23-20130116.788-git2ef9956 directory and move/copy it inside ~/.vim/bundle.

If you want to open ~/.vim/bundle in Finder, just type

open ~/.vim/bundle

and you will get a nice file manager to help you.

That's how pathogen works for virtually all plugins. Note that vim-latex requires you to set some settings in your .vimrc. Just repeat

open -e ~/.vimrc

and add stuff after the pathogen line.

I really hope my answer helps. :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.