When using Vim as a text editor, is there a way to create new directories and files, while in text editor mode? Instead of going back to the command line and creating a new directory and file.
You can either click the Terminal icon in the Apps menu, or press Ctrl + Alt + T at the same time to open the Terminal. Navigate to the directory you want to create a file in. To do so, type cd followed by the path to the directory you want to create a file in and press Enter..
The command to save a file in Vim and quit the editor is :wq . To save the file and exit the editor simultaneously, press Esc to switch to normal mode, type :wq and hit Enter .
If you are in the file explorer mode, you can use:
d
for creating a directory
%
for creating a new file
In explorer mode you can get with issuing a command :Sexplore
or :Vexplore
There is no need to call external commands with !
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