sponsor Vim development Vim logo Vim Book Ad

omni.vim : An omni completion plugin for LaTeX

 script karma  Rating 2/2, Downloaded by 548  Comments, bugs, improvements  Vim wiki

created by
Yangqin Fang
 
script type
ftplugin
 
description
The best omni completion plugin for writing LaTeX in vim.

Usage:
Example 1.  after the command "\input{" , you press Ctrl-x Ctrl-o, you will get a list of *.tex files under the current pwd.
Example 2. In you vim editor, in the insert mode, after the command "\setmainfont{", press Ctrl-x Ctrl-o, you will get a list of fonts
Example 3. after \includepdf{, press Ctrl-x Ctrl-o, you will get a list of *.pdf files.
Example 4. after \includegraphics{, press Ctrl-x Ctrl-o, you will get a list of pictures.
Example 5. after \usepackage{, press Ctrl-x Ctrl-o, you will get a list of packages.
Example 6. after \cite{, press Ctrl-x Ctrl-o, you will get a list of bibitems in you bibtex sourece.
Example 6. after \ref{, press Ctrl-x Ctrl-o, you will get a list of labels in your tex sourece.

It support \anyprefix, \input{...}, \include{...}, \usepackage[...]{...}, \RequirePackage[...]{...},
\setmainfont[...]{...}, \setsanfont{...}, \setmonofont{...}, \setmathfont{...}, \setCJKmainfont[...]{...},
\includepdf[...]{...}, \includepdfmerge[...]{...}, \includegraphics[...]{...},
\cite[...]{...}, \ref{...}, \eqref{...}, \begin{...}, \end{...}.

You can write any of your own prefered commands into ~/.vim/tex/completion/commands.txt, and any of environment names into ~/.vim/tex/completion/environments.txt, etc.

Click the following link to see the pictures for the usage and the installation place.
https://github.com/fangyq09/VimTeXtric
 
install details
extract the 7zip file, and copy the "omni.vim" and the "completion" directory to ~/.vim/ftplugin/tex/ on linux system, or put they into $home\vimfiles\ftplugin\tex\ on windows  system.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
tex-omni.7z 3.0 2025-11-04 7.0 Yangqin Fang Fixed some bugs. Supports the insertion of images and references in a chapter-based writing structure.
tex.7z 1.4 2023-05-06 7.0 Yangqin Fang fixed a bug
tex.7z 1.3 2023-04-18 7.0 Yangqin Fang some bug fixed, and added some new features
ftplugin.7z 1.1 2023-04-07 7.0 Yangqin Fang Initial upload
ip used for rating: 216.73.216.14

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github