Setup Skim PDF reader with VimTeX in Mac OS

A short post to setup Skim pdf reader with Vimtex plugin in Mac OS.
skim
vimtex
neovim
vim
mac
inverse search
backward search
Author

Deepak Ramani

Published

February 6, 2023

Modified

March 24, 2023

VimTeX plugin written by Karl Yngve Lervåg is one of the goto plugins to manage LaTeX files with Vim/Neovim text editors. VimTeX allows integration with several PDF viewers. In Mac OS, Skim and Zathura PDF readers allow easy integration with LaTeX. Since Zathura’s installation in Mac OS involves more steps, we will be using Skim for this post.

Warning

You should have a working LaTeX setup and Neovim version > 0.8.3 is advised.

Install Skim

With Homebrew

Terminal
brew install --cask skim

Or download the dmg file of the current version(as of writing latest version is v1.6.8) from Skim’s website.

Install VimTeX

Using vim-plug plugin manager we add the following line to .vimrc or init.vim or init.lua

Inside init.vim
Plug 'lervag/vimtex'

Pdf preview

Conversion between TeX and PDF is one of the most common operations while writing a scientific document. Though it is possible to open the PDF file in one of the commercially available PDF readers, a seamless integration with neovim(in our case) is appreciated. This is where Skim comes into the picture. By default, Skim allows native, seamless integration with the LaTex editor of choice. In our case, we can make VimTex interact with Skim with just a few lines of config.

Configurations

Conclusion

With just four lines of settings in the init.vim file and a line in Skim preferances, we can activate both forward and backward search features with VimTeX.

Footnotes

  1. In the nvim command line, run :echo v:servername to know the name of the server↩︎

Want to support my blog?

Buy Me A Coffee