I enjoy using Vim when I am writing LaTeX documents for my teaching and research. Since Neovim became available I have been using it as a (capable and compelling) alternative to Vim. I find that Neovim often works really well! But, if you want the vimtex plugin to work with Neovim, then you need to take two extra steps.
What do you need to do to write LaTeX in Neovim? Well, when I was writing (Walsh, Kapfhammer, & McMinn, 2017) with Neovim, I needed to
.vimrc file and install a plugin. After following the instructions to install the
neovim-remote plugin, I added this code segment to ensure that
communicate with the
latexmk process that is compiling my paper.
if has("nvim") let g:vimtex_latexmk_progname = 'nvr' endif
Wait! There is one more thing. If you, like me, have been using Vim for many years and only recently started to use Neovim, then you will also need to run commands like the following so that you can "retrofit" your Vim configuration to work correctly with Neovim.
ln -s ~/.vim ~/.nvim ln -s ~/.vimrc ~/.nvim/init.vim
Are you interested in learning more about how I configure Vim and Neovim? Please study the source code of my
that is available in the GitHub repository gkapfham/dotfiles.
Enjoy this post? If so, please read, SEED Interview with Timothy Tsai, my most recent article.