I would suggest setting up a minimal working example to confirm that the problem is with the gvim setup rather than in the other files and file locations.
In the same directory, a test .tex file of:
\documentclass{article}
\bibliographystyle{amsplain}
\begin{document}
test
\bibliography{TeX}
\end{document}
and a TeX.bib of
@book{diller97,
author = "Antoni Diller",
title = "{\LaTeX} Line by Line",
year = "1997",
edition = "1st",
publisher = "Wiley",
address = "Chichester, England"
}
@book{goossens99,
author = "Michel Goossens and Sebastian Rahtz",
title = "The {\LaTeX} Web Companion",
year = "1999",
edition = "1st",
publisher = "Addison-Wesley",
address = "Boston, Massachusetts"
}
works for my set-up when adding the line \cite{}
after the line test
and then pressing F9.
A second check: is vim-latexsuite is working for other functions? For example, with gvim, there would usually be several 'TeX-...' entries on the main menu. vim-latexsuite on some systems must be both installed and then manually set up. For example, on Ubuntu 11.04, you have to set up latexsuite after installation via synaptic:
By default, vim-latexsuite is not enabled. Please read
/usr/share/doc/vim-latexsuite/README.Debian after installing the
package.
FWIW, my directory ~/.vim has subdirectories that include one, ftplugin
, that, in turn, contains another subdirectory, latex-suite, but also two files: bib_latexSuite.vim and tex_latexSuite.vim. Unless you're also running Ubuntu 11.04 I would not expect exactly the same files but I would expect some files relating to latexsuite and to bib in the .vim directory in your home directory (if you are using GNU/Linux).
I have encountered the same problem as the OP, and I found that it is caused by the neosnippet configuration, which contains the folloing lines:
" For snippet_complete marker.
if has('conceal')
set conceallevel=2 concealcursor=i
endif
The neosnippet plugin probably uses the 'conceal' feature of vim for some of its autocompletion functions. The solution is either to comment out these lines or add an extra line in your ~/.vimrc:
let g:tex_conceal = ""
See also here.
Best Answer
Sometime around 2017 (I think), Dr. Chip decided that base-vim should only support syntax highlighting for base-latex. It is necessary to add in support for syntax highlighting for things available in latex packages (such as amsmath, which is what provides the align environment).
But this is very easy, and Dr. Chip includes syntax files for amsmath (and a few other packages) on his website.
In order to use these, you do the following. I will assume that you want to install additional highlighting to cover the align environment. As this comes from amsmath, we will add additional amsmath highlighting support. Then you
:so %
).amsmath.vba
to~/.vim/after/syntax/tex/amsmath.vim
(or the corresponding location on your machine). One can also run:so %
fromamsmath.vba
, this will automatically make~/.vim/after/syntax/tex/amsmath.vim
(and works if moving theamsmath.vba
doesn't)It is also possible to do this directly from your vimrc by making new "math zones" (and this is mostly what amsmath.vim does anyway). See
:h tex-math
for more.