-
Notifications
You must be signed in to change notification settings - Fork 407
Inverse search doesn't work until reload plugin with \lx #3119
Copy link
Copy link
Closed
Description
Currently, the inverse search logic in autoload/vimtex/view.vim has
" Only activate in relevant VimTeX projects
let l:file = resolve(a:filename)
let l:sources = b:vimtex.get_sources()
if vimtex#paths#is_abs(l:file)
call map(l:sources, {_, x -> vimtex#paths#join(b:vimtex.root, x)})
endif
if index(l:sources, l:file) < 0 | return -2 | endifwhich does nothing if the file is not in the source list.
However, the problem is I'm using inkscape-figures https://github.com/gillescastel/inkscape-figures , so the source list regularly changes (every time I add a figure, another .pdf_tex file is added to the source list), but this change is not picked up until late (e.g. \lx pressed).
Do you see a good solution for this issue?
What I can think of:
- re-parse the source file on inverse_search (is this too slow?)
- make a configuration option to set a whitelist e.g. "if the relative path starts with
figures/then always allow" - make a key binding to reparse source file for list of source files (clumsy but probably work?
:VimtexReloadStatesort of do this but it also stops the compiler…)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels