Skip to the main content

Vim

Write changes and close the window

ShiftZShiftZ

Mac Desktop app Vim default commands

Practice this

For write changes and close the window in Vim, press Shift + Z, then Shift + Z.

Where it works: Normal mode

Vim is case sensitive. Shift with a letter types the capital letter, which is a different command from the small letter.

Every documented variant

Variants of this shortcut
System Environment Keys
Linux Desktop app ShiftZShiftZ
Mac Desktop app ShiftZShiftZ

Where this comes from

Vim help: index.txt - vim/vim

Documentation checked on 2026-09-14. That is a documentation review, not a test run inside the application.

Report a correction