Set tab to display list of options instead of cyclic transition in VIM

When opening a new buffer it is VIM, I print:

new /path/to/fi 

If I press "tab" at this moment, it cycles through the files. How to configure VIM to display a list of options instead of switching to the first?

+4
source share
4 answers
 set wildmenu 

All you need to add to your .vimrc. Read :help wildmenu .

+4
source

Set something else for your wild mode setting, e.g.

 set wildmode=list:longest 

If I do not completely understand the question, check ... :)

+4
source

(This is not a direct answer to your question, but I think it is even better :)

You should check out the Command-T plugin inspired by TextMate 'Go To File'. He selects the possible combinations very intelligently, just enter a few characters of each subdirectory, sufficient to distinguish it, and he "gets" it, the characters should not be at the beginning and do not have to be sequential. It also shows you a list of remaining options.

I understand this is a terrible explanation, so watch this video to see how it works.

The disadvantage is that Vim must be compiled with Ruby support.

+1
source

Control-P (ctrlp.vim) is a Command-T replacement written in VimScript, so it does not require Ruby.

0
source

Source: https://habr.com/ru/post/1392247/


All Articles