Bibtex Citing – Problem with \cite in VIM and How to Fix F9 Issue

bibtexcitingvimvim-latex

I am working on Linux Ubuntu, and work on VIM 8.2.

The latex syntax is working when I open a .tex document, but when using \cite{ and F9, nothing happen.

Futhermore, I noticed that the following commands does not work in VIM. Which make me think that vim-latex is maybe not installed properly.

:helptags ~/.vim/doc 
:help latex-suite.txt

I have tried to re-install vim-latex several times, and it still does not work. Would anyone have an idea what can cause this problem?

For the installation, I have followed the instructions given in the vim-latex tutorial below:
http://vim-latex.sourceforge.net/index.php?subject=download&title=Download

My .vim file look like this:

autoload  bundle  ftplugin  pack  plugged  vim-latex  vim-latex-1.10.0

Futhermore, I have tried to install vim-latex with Vimplug.
My .vimrc file is attached.
https://newtextdocument.com/c5697f8c94

Best Answer

Verifying a vim-latex install with F9 is not the best idea as this relies on your vim having been built with python, and a bib file to be found, as your vimrc shows you are using an additional citation plugin this could also clash with vim-latex's F9 completion. Testing compilation with <Leader>ll (this compiles the saved file on disk rather than in vim) or the F5 or F7 keys to insert environments or commands would be a safer bet, e.g. in a blank tex file typing document then F5 should insert a document template.

vim-latex only loads for files whose filetype is tex (while a plugin manager can enforce this, it is a setting baked into vim-latex) and so ensure :set filetype? returns filetype=tex otherwise vim-latex not being active is expected behaviour.

Otherwise the question is probably whether you are successfully installing the package. While installation instructions are given for manual installation, installation via a plugin manager such as Pathogen or vim-plug is generally recommended. :set runtimepath? gives some indication of what is getting loaded or with vim-plug :PlugStatus indicates both the status and whether a plugin is loaded.

As your vimrc shows you are already using vim-plug for other plugins it would be advisable to use that. Multiple attempted installations could cause clashes and it would be worth clearing as much as possible. It is probably worth starting with only vim-latex to avoid any clashes, and verifying that a generic plugin (e.g. vim-airline) with no potential overlap can be correctly installed.