I am using Vim 8.2 on Windows 10. Autocompletion (using CTRL+N
or CTRL+P
) upon creating the tags file using ctags.exe works fine for me.
Now I want to use the find
command in vim to quickly opening any file in the project directory. Therefore I set set path=.,**,,
in my vimrc file; now executing :find foo.py
opens immediately that file, which is deep inside the project. However, trying to autocomplete freezes the editor (the status line shows Scanning tags.
)
Is there a solution to this problem or are autocompletion and (accelerated) find
mutually exclusive?
:find
wasn't meant to be a fuzzy-finder.'path'
co-operates withgf
and friends, as well as include and define searches.:find
and:sfind
are basicallygf
as a command with arguments. OTOH, regular<C-n>
/<C-p>
will look at included files as well as tags (and other things: see:help 'complete'
), so it's possible that so many files are included it takes a long time to process. Maybe edit in:checkpath!
as well as:setlocal complete? include? includeexpr? tags?
…path
variable is a way to accelerate commands likegf
rather than (or instead of) optimizing the:find
command. It has however a drawback: if defined too broadly, it slows down the ctags-based autocompletion likeC-n
orC-p
. If you wish to reword this as an answer, I would approve it - just to close the loop for other readers.include-search
).