I write a lot of shell scripts and I am constantly having to enter in filepaths. I am wondering if anyone knows of a way to get Vim to autocomplete filepaths while in insert mode, just like when you are in your favorite shell you tab to complete the path of the directory or file.
Extra credit if you can get CTRLD functionality of the shell into Vim insert mode (i.e. to see what files/directories are in the current path).
to enter the *edit* mode and type any JavaScript keyword in the text editor and press *Ctrl + x* followed by *Ctrl + o*. Vim editor will show the possible auto-complete suggestions.
It's time to open up the command mode of Vim by pressing the “:” key. Now, press the “w” key from the keyword followed by the space key and the new name of a file. Tap “Enter” to execute this command on Vim. Now, the exact copy of the same file has been created in the home folder with a new filename.
For file name omni completion, you can use:
Ctrl-XCtrl-F
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