Tell HN: Vim users, `:x` is like `:wq` but writes only when changes are made
537 points`: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
Show all comments
Showing thread 58 of 59
Nevertheless there are such thing as adding a confirmation message in case of a dangerous operation (and, if necessary, and option to disable such warnings). For example, C compilers usually have warnings, and you can disable any warnings that you do not want.
So most people do :wq so that it saves and then quit or do :q! to quit without saving changes. Most people stop using :q.