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

Show all comments

Showing thread 24 of 59

yodsanklai2 replies#
Why is it useful? I would do ZZ to quit with saving, or :q! to quit without saving.

Incidentally, I find :w to be very inefficient to type (any : command really, but there are not normally the most common operations), for such a common operation. I wonder if people remap it.

michaelmior2 replies#
I use the following in my vimrc so I can just use semicolon instead.

nore ; :

MayeulC1 reply#
I like that AZERTY has colon on the lower row :)

You can remap your keyboard as well.

michaelmior#
I've thought about remapping my keyboard before (and I do use caps lock as escape), but any significant changes just mean I'll be totally confused whenever I use a regular QWERTY keyboard.
yodsanklai1 reply#
Sounds like a good idea. Any drawback that I don't see? Why not ; in the first place? perhaps to avoid hitting it accidentally.
michaelmior#
It does mean you can't use any key bindings in normal mode that use a semicolon. But I don't have any that I use.
SuperCuber#
I remap `` to save because I like to obsessively spam it after every couple edits.

Fun fact, ZQ quits without saving, like :q!