A
A
Ali Aliyev2014-12-08 02:56:42
vim
Ali Aliyev, 2014-12-08 02:56:42

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

1 answer(s)
Z
Zr, 2014-12-08
@ali_aliev

> :set pathdoesn't help
And shouldn't, under :h i_CTRL-X_CTRL-Fit says directly that "the 'path'option is not used here (yet)".
> from ~/second
And how is he supposed to know where exactly?
> :chdirdo 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 question

Ask a Question

731 491 924 answers to any question