22

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.

6
  • 1
    Did you follow the install instructions? vim-latex.sourceforge.net/… and settings recommendations? vim-latex.sourceforge.net/documentation/latex-suite/…
    – rickhg12hs
    May 6, 2013 at 0:06
  • 2
    @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 May 6, 2013 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, 2013 at 9:17
  • @rickhg12hs to be safest let's just say i have vim downloaded and unzipped and that's it May 6, 2013 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, 2013 at 18:23

2 Answers 2

29

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 -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/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. :)

3
  • 1
    Upon launching MacVim after following your instructions, I get Error detected while processing /Users/alexmayorov/.vimrc: line 1: E117: Unknown function: pathogen#infect E15: Invalid expression: pathogen#infect() Jul 20, 2018 at 16:53
  • 1
    Hi @AlexMayorov! I think pathogen probably got updated and that method is now gone. I am currently unavailable to test things out (as I am in the middle of a conference), but I will try to come back at it later. Sorry. Jul 20, 2018 at 17:42
  • @PauloCereda- Thanks a lot for the detail description! BTW, I also got in message as at-GingerBadger mentioned above. It was resolved by using the curl command that at-dowewas wrote below. May 9, 2019 at 16:56
1

The curl command given gave me a blank pathogen.vim file. I had to use the following command.

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

3
  • Welcome to TeX.SX! Would you be so kind to elaborate on your answer?
    – ebosi
    Jun 17, 2017 at 3:15
  • Note that this comment is in reference to Paulo Cereda's comment.
    – dowewas
    Jun 22, 2017 at 0:24
  • This worked for me. May 9, 2019 at 16:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .