vim:cheatsheet:exiting
Differences
This shows you the differences between two versions of the page.
vim:cheatsheet:exiting [2021/02/16 10:40] – created peter | vim:cheatsheet:exiting [2021/02/16 10:41] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== VIM - Cheatsheet - Exiting ====== | ====== VIM - Cheatsheet - Exiting ====== | ||
+ | < | ||
+ | :w - write (save) the file, but don't exit | ||
+ | |||
+ | :wq or :x or ZZ - write (save) and quit | ||
+ | |||
+ | :w !sudo tee % - write out the current file using sudo | ||
+ | |||
+ | :q - quit (fails if there are unsaved changes) | ||
+ | :q! or ZQ - quit and throw away unsaved changes | ||
+ | |||
+ | :wqa - write (save) and quit on all tabs | ||
+ | </ |
vim/cheatsheet/exiting.1613472010.txt.gz · Last modified: 2021/02/16 10:40 by peter