Skip to content

Instantly share code, notes, and snippets.

@llinfeng
Last active May 19, 2022 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save llinfeng/10175ee54bf4fca74ea08d30a6dd2263 to your computer and use it in GitHub Desktop.
Save llinfeng/10175ee54bf4fca74ea08d30a6dd2263 to your computer and use it in GitHub Desktop.
Config VimTeX + Zathura with forward/backward search using NeoVim
" Store the following in `~/.config/nvim/init.vim`.
" Source: https://github.com/lervag/vimtex/issues/2392#issuecomment-1130487147
" By the main contributor for VimTeX, one line is sufficient for both forward and backward sync.
let g:vimtex_view_method = 'zathura'
# Store as `~/.config/zathura/zathurarc`
# Store the following in `~/.config/nvim/init.vim`.
# Though, with VimTeX, it is optional to populate the synctex setting in Zathura.
set synctex true
# Get latest neovim (stable)
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt-get update
sudo apt install neovim
# Setup files for neovim to source
# 1. vim-plug
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
# 2. neovim init file
mkdir ~/.config/
mkdir ~/.config/nvim
# Then, store the config files here: ~/.config/nvim/init.vim
sudo apt update
sudo apt install -y zathura zathura-ps zathura-djvu zathura-cb xdotool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment