How to get out of vi


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to get out of vi
# 1  
Old 11-20-2012
[Solved] How to get out of vi

I created a file and edited in vi. Do you save the file in the editor or hit esc to come out of edit mode and save the file?
# 2  
Old 11-20-2012
Hi, type esc to get out of edit mode and then:
Code:
:wq <ENTER>

Or use this shortcut:
Code:
ZZ

# 3  
Old 11-20-2012
To save the file
Code:
use esc :wq

# 4  
Old 11-20-2012
Check out the vi/vim cheat sheet. There is also a link there to a short vi and vim utilities tutorial.
# 5  
Old 11-22-2012
you may also want to see this :
vim tips and tricks

Last edited by mukulverma2408; 11-22-2012 at 04:27 PM.. Reason: link
# 6  
Old 11-25-2012
Moderator's Comments:
Mod Comment In the interest of maintaining the knowledge base i changed the threads title to something meaningful.


bakunin
# 7  
Old 11-25-2012
Thanks everyone for your help. I figured it out.
 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question