3 ms·
:q, if you didn’t make a change, is even shorter.
by sshine 4y ago
:q, if you didn’t make a change, is even shorter.
- sodapopcan 4y agoIt's not shorter—there is an implied `<cr>` at the end there and as you have it written it's the same length. Also, if you did make a change, `:q` will yell at you. If that's what you want, though, that's totally cool. The advantage of `ZZ` is that it can be used as a general "close this window" command. It'll work on unmodifiable buffers as well without complaining.
- jjallen 4y agoIf you do this half the time you will have forgotten that you have edited the file and won't be able to exit
- sshine 4y agoIf I forgot I had edited a file and I’m leaving it as if I hadn’t, I will want to know.