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
Earlier commentsThis solves the problem mentioned by OP because I can just `:q` anytime.
Second, in a large Excel file, the auto save is constantly slowing me down because there’s a slight hang after every cell change.
Although I don't use autosave, I don't think it matters that much with vim because you can always use undotree[0]
0: https://github.com/mbbill/undotree
It is probably the single most productive customization in my .vimrc file. I save my files very often, and I usually have multiple files and buffers open. 'cc' is an alias for the old 'S', so I don't lose much.
All comments shown.
Couldn't load more comments. Check your connection and try again.