When working with Latex files, I use Vim to edit the tex file and Okular to view the corresponding pdf. I have pdf-to-tex search (which requires running Vim as a server, and compiling the tex file with Synctex) configured by making vim --remote +%l %f
my custom editor command in Okular (Settings 🡢 Configure Okular 🡢 Editor 🡢 Command
). This works, but it does not focus Vim, and I remain in Okular.
I would like to focus Vim when I do this search, so I can immediately start editing the tex file. How can I achieve this?
Note: This question is basically the same as this question, except I am using Vim, not gVim. And the only answer posted to that question does not work with Vim.