How to create a new file using Vim and save it with desired filename

Written by Administrator on Sunday March 22, 2020

First of all, let's start vim:

$ vim

Now we can edit file. To do it, we have to change to write mode, so just click "i":

i

Now we car modify file the way we want. Let's add a string.

And now click "Esc" to go out of write mode. 

In order to save a file, type 

:wq test.txt

save as file using vim

Now file is saved as test.txt. Let's check it:

Category: linux Tag: vim