How to exit Vim? (6 useful commands)

January 25, 2019

This is a highly common question for first time users of Vim. The answer is that there are many ways to quit vim.

Press esc, type any of these commands, then press enter:

# Write & Quit

# Force write & Quit

# Quit without saving

# Quit

# Only write if there are changes
# And quit

# Same as x above