Saving files with vi

Perseus

Registered
I am brand new to the world of vi. I was wondering how I would save my text as a .txt file using vi. Is this possible?
 
Open it initially using vi <text>.txt and save normally or if you have already created it without the .txt extension just rename it using mv <text> <text>.txt
 
You can also, from within vi, specify the filename to save as by typing that filename following :w, in command mode of course. Example:

:w myfile.txt
 
Back
Top