vim-qlist icon indicating copy to clipboard operation
vim-qlist copied to clipboard

Add :Checkpath and :Checkpath!

Open kiryph opened this issue 7 years ago • 4 comments

I like the idea of using the quickfix list for [I and [D.

What about the builtin commands :checkpath and :checkpath! also described under :h include-search?

kiryph avatar Jun 28 '18 03:06 kiryph

How do you think it could work?

romainl avatar Jun 28 '18 05:06 romainl

I am not sure if I got you right: do you mean how to do this technically or how it should work from a user point of view?

kiryph avatar Jun 28 '18 06:06 kiryph

I've raised a somewhat related issue here https://github.com/lervag/vimtex/issues/1148. For my given example, :che! returns (invoked in chapter1.tex):

--- Included files in path ---
main.tex
main.tex -->
  chapter1.tex
  chapter1.tex -->
    main.tex  (Already listed)    

For [I on \vec one gets a list with a filename and a line number:

main.tex
  1:    3 \renewcommand{\vec}[1]{\mathbf{#1}}
  2:    7 $\vec{a}\cdot\vec{b}$
main.tex (includes previously listed match)
chapter1.tex
  3:    4 $\vec{a}\cdot\vec{b}$

I guess I had hoped to have something like this for the included files

chapter1.tex|1 col 1| main.tex
main.tex|8 col 1| chapter1.tex (Skip: cyclic include)

I think I see your point: the return value of :checkpath! does not return the filename and line number where the file is included. Too bad.

I assume I can close this issue.

kiryph avatar Jun 28 '18 06:06 kiryph

This could be added to the longterm goals of the new-parsers branch.

romainl avatar Jun 29 '18 15:06 romainl