Lurker News
`:x` leaves the modification time of files untouched if nothing was changed.

    :help :x
        Like ":wq", but write only when changes have been made.

Comments (270) 59 threads

Earlier comments
bluecalm#
I know maybe 4 Vim commands I use to write git commit messages as I was too lazy to change the default editor. :x is one of them. It's funny how different people learn tools differently. I've learnt by googling "Vim basic commands for git commit messages" and never spent any more time on it but apparently this is a revelation for many long time Vim users here.
omar_alt#
ZZ for me as well and I mapped :WQ to :w !sudo tee % >/dev/null
JelteF#
Hold shift and press Z twice will also close and save. It's only three key presses instead of 4 for :x (shift + ; + x + enter)

Load more comments