Vim Commands Cheat Sheet |
How to Exit
| :q[uit] | Quit Vim. This fails when changes have been made. |
| :q[uit]! | Quit without writing. |
| :cq[uit] | Quit always, without writing. |
| :wq | Write the current file and exit. |
| :wq! | Write the current file and exit always. |
| :wq {file} | Write to {file}. Exit if not editing the last Continue reading |