Look, some of us old farts started on Linux back before nano was included by default, and your options for text editing on the command line were either:
vi/vim, a perfectly competent text editor with arcane and unintuitive key combos for commands
emacs, a ludicrously overcomplicated kitchen-sink program that had reasonable text-editing functionality wedged in between the universal woodchuck remote control and the birdcall translation system
Given those options, most of us chose to learn how to key-chord our way around vim, and old habits die hard.
: is your commandline, it does a lot of actions. w is write, q is quit. So you’re doing a write quit, the ! just tells it to fuck off and do the fucking command essentially.
If you open a read only file, and you need to quit just hit it with the :q! or if you haven’t made any changes, :q will work just fine.
naturally, as one would expect, you can hit all of these independently. :w just writes changes, :q will close as aforementioned.
Hmm. Attorney charges by the hour and at least 3 discovery hours will be attributed to the time spent learning to exit vim let alone exit with preserving changes.
programmer_humor
Hot
This magazine is from a federated server and may be incomplete. Browse more on the original instance.