Answer the question
In order to leave comments, you need to log in
How to make file name completion not according to the current directory, but according to the one specified in the settings?
Actually, the question is, what would file name completion look for not in the current directory, but in the one that I specified in the editor settings. For example, I am in the ~/first directory, I press C-xC-f, it should show me files from ~/second. chdir is not advised, set path does not help
Answer the question
In order to leave comments, you need to log in
> :set path
doesn't help
And shouldn't, under :h i_CTRL-X_CTRL-F
it says directly that "the 'path'
option is not used here (yet)".
> from ~/second
And how is he supposed to know where exactly?
> :chdir
do not advise
Then just write your own auto-completion function (see :h complete-functions
) and reassign <C-x><C-f>
to it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question