I use vim to try to search for a file to open. I have wildmenu=full
.
Pressing <tab>
pushes me to the next directory, but how do I drill down on the currently-selected directory? My current workflow is: type a char, delete it, <tab>
to continue. There must be a better way!
"set wildmenu" enables a menu at the bottom of the vim/gvim window. The meaning of "list:longest,full" is so that when you do completion in the command line via tab, these events will happen: 1. (on the first tab) a list of completions will be shown and the command will be completed to the longest common command.
'autochdir' 'acd' boolean (default off) global When on, Vim will change the current working directory whenever you open a file, switch buffers, delete a buffer or open/close a window. It will change to the directory containing the file which was opened or selected. Note: When this option is on some plugins may not work.
Vim is no different. When you start vim, it gets the working directory of your shell. And then you can type commands like :e to open paths relative to your working directory. you can run :e bar.c to open a window containing the contents of the bar.c file, and then :sp bar.h to split the window horizontally and open a buffer for bar.h.
You can have multiple files open at once in vim, each is known stored and referred to as a buffer. If you do not want to close the current file you can also use :E(explore) to open a view of the current directory where you can open other files.
Press <Down>
.
The available keybindings are of course listed under :help 'wildmenu'
:
While the "wildmenu" is active the following keys have special
meanings:
<Left> <Right> - select previous/next match (like CTRL-P/CTRL-N)
<Down> - in filename/menu name completion: move into a
subdirectory or submenu.
<CR> - in menu completion, when the cursor is just after a
dot: move into a submenu.
<Up> - in filename/menu name completion: move up into
parent directory or parent menu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With