Skip to content

Instantly share code, notes, and snippets.

@emilcarr
Created March 8, 2026 18:38
Show Gist options
  • Select an option

  • Save emilcarr/d32aa6306c7718cc7fe10f443a9d50c9 to your computer and use it in GitHub Desktop.

Select an option

Save emilcarr/d32aa6306c7718cc7fe10f443a9d50c9 to your computer and use it in GitHub Desktop.
VimTeX in WSL and SumatraPDF in Windows

Following https://rossknapman.com/posts/nvimvimtexzathura/

.config/nvim/init.vim

let g:vimtex_view_method='/mnt/c/Program\ Files/SumatraPDF/SumatraPDF.exe'
let g:latex_view_general_viewer='/mnt/c/Program\ Files/SumatraPDF/SumatraPDF.exe'
let g:vimtex_compiler_progname='nvr'

In SumatraPDF settings, set inverse search command-line:

powershell -NoExit /c nvr --servername localhost:12345 +%l $(wsl wslpath \"%f\")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment