Advertisement
tommyosheawebdesign

VIM

Mar 23rd, 2023
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1.  
  2.  
  3. Hit the Esc key to enter "Normal mode". Then you can type : to enter "Command-line mode". A colon (:) will appear at the bottom of the screen and you can type in one of the following commands. To execute a command, press the Enter key.
  4.  
  5. :q to quit (short for :quit)
  6. :q! to quit without saving (short for :quit!)
  7. :wq to write and quit
  8. :wq! to write and quit, attempting to force the write if the file lacks write permission
  9. :x to write and quit; like :wq but writes only if modified (short for :exit)
  10. :qa to quit all (short for :quitall)
  11. :cq to quit, without saving, with a nonzero exit code to indicate failure (short for :cquit)
  12.  
  13. You can also quit Vim directly from "Normal mode" by typing ZZ to save and quit (same as :x) or ZQ to just quit (same as :q!). (Note that case is important here. ZZ and zz do not mean the same thing.)
  14.  
  15. Vim has extensive help - that you can access with the :help command - where you can find answers to all your questions and a tutorial for beginners.
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement