Suppose I have a path dir1/myfile.txt
and want to use :e
command for open myfile.txt
.
When I type :e
and press tab
I have dir1
in autocomplete list and when I hit enter
, directory file is opened.
How to insert dir1
in the path using autocomplete without opening it?
To insert dir1
in the path using autocomplete without immediately opening it, you can use the following method in Neovim:
:e
followed by the initial part of the path (e.g., dir
).Tab
to autocomplete to dir1
.Enter
(which would open the directory), press Ctrl
+ D
to list all possible completions.Tab
again to further autocomplete.Enter
to open the file.This approach allows you to utilize autocomplete without immediately executing the command.