Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question on VI text editor?

Status
Not open for further replies.

august

MIS
Aug 24, 2000
150
PH
Hello!
How can i save my file when i edit it in vi text editor?

i try to edit my file from vi i don't know how can i save it?

sorry for my stupid question, but seems to be it happini'n THANKZ!
August
agencisa@yahoo.com
 
When in vi, press <shift> <:> together to get a : prompt at the bottom of the screen, then just wq <filename> (or wq if the file already existed and is just being edited) to save and exit vi. Hope this helps.
 
:w - save changes
:w 'filename' - save to 'filename'
:wq - save changes and quit vi
:wq! - save changes to a read-only file and quit vi
:q - quit vi
:q! - quit vi and don't save any changes

Make sure that you are not in 'Insert' mode when you enter : (Shift + ;) .

ChrisP ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says &quot;Mark this post as a helpful/expert post&quot;.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top