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 16 of 59
As in "escape-q-dammit"
I just remap Caps Lock to Esc system wise (a setting in both Linuxes and MacOs) and use both shift for Caps Lock (setting on Linux, Idk about MacOS)
I have always found the "jk" solution quite elegant although I don't use it
The benefit of using it system wise is that it then works with all programs that have a vi mode (zsh, gdbtui, etc.)
https://news.ycombinator.com/item?id=34168031
Continue this thread — 4 replies