4 ms·
Hi tjdevries, I have been thinking about switching to neovim from vim. Do you have any advice/reference for setting up Latex Synctex (Forward and Backwards sea
by dfdz 5y ago
Hi tjdevries, I have been thinking about switching to neovim from vim.
Do you have any advice/reference for setting up Latex Synctex (Forward and Backwards search) for neovim and evince (on Linux)?
From looking online there seem to be several possible approaches for doing this in neovim (currently in Vim I use an adapted version of evince_dbus.py from the latex gedit latex plugin but it was a pain to get set up!)
- tjdevries 5y agoI have to phone a friend in this one. I don't know much about latex in neovim these days. I pinged a buddy of mine to hopefully be able to respond here though!
- tjdevries 5y agoOk, got some responses from him (I don't know what any of these things mean haha): vimtex works perfectly on neovim (in fact, the main developer uses neovim) and is very well documented texlab (the latex lsp server) also does build and forward search (although there's a small bug at the moment) Oh, and backward search needs neovim-remote (\o/ mhinz); just use nvr --remote +"%line" "%file" as backward search command https://github.com/lervag/vimtex/blob/5d1335d095d11f48a6744f75222449fc71eba596/doc/vimtex.txt#L4937-L4950 https://github.com/lervag/vimtex/blob/5d1335d095d11f48a6744f... (the vimtex dev uses Zathura, so that may be an alternative viewer to look into)
- dfdz 5y agoThank you for the detailed answer, I really appreciate it. It it great to know that the main developer for vimtex uses neovim. I will try the neovim/vimtex/zathura combination used by the dev!
- tambourine_man 5y agoYou gotta love HN. Threads like this just makes you smile.
- dfdz 5y agoJust to follow up, my attempts to get vimtex to work unfortunately were unsuccessful. However, along the way reading neovim plugin docs I started to figure out the difference between neovim and vim and was able to get things working via the following process: sudo dnf install neovim sudo dnf install python3-neovim mkdir -p ~/.config/pack/foo/opt/mytex cd ~/.config/pack/foo/opt/mytex [download https://github.com/peterbjorgensen/sved/ftplugin https://github.com/peterbjorgensen/sved/ftplugin] cp ~/.vimrc ~/.config/nvim/init.vim add the line "packadd mytex" to init.vim add the line "alias vim='nvim'" to ~/.bashrc :)