We can forward search to a line in a tex file opened in Vim by setting the following in a pdf viewer (I'm using okular):

gvim --servername GVIM --remote +%l %f

But can we go straight to the character we click at?

I tried to play around with this bit +%l, which represents the commands to enter when opening the file equivalent to :{line number} that makes vim jump to a line, to change it to something like +%l%c but could not find both the command in vim to jump to a column and the variable representation of column number in okular. My guess is that it doesn't have column numbers defined but still would like to know if there's any way to forward search to a character.


Assuming we are talking about SyncTeX-based searching, the answer is 'no'. SyncTeX does not track individual letters, but rather input lines. As such, the best you can get out is a link from a character in the PDF to the line it was on in the input.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.