Live data from Hacker News

How to Exit Vim

github.com

311–320 of 409 posts

Re: How to Exit Vim

#311
I used to believe the most important scientific problems have yet to be solved, but this really was the last great mystery out there.

Re: How to Exit Vim

#312
post #95

In the opposing vein, as an Emacs user the best configuration I ever made was to rebind C-x C-c to execute-extended-command instead of kill-emacs. It was way too easy to (even accidentally!) kill emacs with a sweep of a finger. And I probably use a few hundred execute-extended-command calls for each kill-emacs (which I now have to type manually as 'C-x C-c kill-emacs' - no problemo). A similar optimisation was with t…

I think emacs is the winner here. It's true beauty is that most users have remapped everything so all you can do is bruteforce your way to the exit. And where do you get exiting an OS? We don't know... maybe another OS...

Usually people don’t remap the menus much so I think if you clicked around the modeline enough you could pull up some help and eventually figure out the binding for kill-emacs or execute-extended-command.

Re: How to Exit Vim

#313

Earlier quoted context omitted.

That's why my scratch buffer is by default NOT in elisp mode

You can evaluate an elisp expression anywhere in any mode.

As an aside you can also make a (non-elisp) scratch buffer on the fly: when you switch buffer just enter a name that isn’t taken (I usually use b, bb, bbb, ...)

Re: How to Exit Vim

#314
post #127
post #95

In the opposing vein, as an Emacs user the best configuration I ever made was to rebind C-x C-c to execute-extended-command instead of kill-emacs. It was way too easy to (even accidentally!) kill emacs with a sweep of a finger. And I probably use a few hundred execute-extended-command calls for each kill-emacs (which I now have to type manually as 'C-x C-c kill-emacs' - no problemo). A similar optimisation was with t…

How do you exit, then, if you never learned :q?

Switch to a different terminal, log in, find the process, kill it.

Re: How to Exit Vim

#315
post #71

First step to quit vim is to accept that you are vim user. Here are some tips: Try to limit yourself to one vim session per day, then one session per week, and so on. Try to replace some Vim sessions with Emacs. Buy notebook with keyboard without Esc key. Install an OS without Vim. Use mouse.

> use mouse

Noooooo! Not that! Please not that!

Re: How to Exit Vim

#317
I'm curious about this one:

  Don't run this, it could break your computer.

  :!echo b | sudo tee -a /proc/sysrq-trigger
Why would that break my computer?

Doesn't that just force a reboot without unmounting disks, or about the same thing that would happen if you pull the power cord (but probably safer, since anything in a hard drive write cache (or in the middle of being written to an SSD) will still be written)

Re: How to Exit Vim

#319
post #241
post #95

In the opposing vein, as an Emacs user the best configuration I ever made was to rebind C-x C-c to execute-extended-command instead of kill-emacs. It was way too easy to (even accidentally!) kill emacs with a sweep of a finger. And I probably use a few hundred execute-extended-command calls for each kill-emacs (which I now have to type manually as 'C-x C-c kill-emacs' - no problemo). A similar optimisation was with t…

> A similar optimisation was with tmux to bind the prefix to C-z. It's in a handy location next to ctrl and I very rarely use suspend anyway. I think gnu screen has the right idea here: ctrl-a. And you say z is close to control - does that mean you use emacs without shift lock as control?! (I mean sure, still closer than b...).

C-a is the worst default keybinding ever, since like, going to the beginning of a line is one of the most common operations.

Re: How to Exit Vim

#320

I'm curious about this one: Don't run this, it could break your computer. :!echo b | sudo tee -a /proc/sysrq-trigger Why would that break my computer? Doesn't that just force a reboot without unmounting disks, or about the same thing that would happen if you pull the power cord (but probably safer, since anything in a hard drive write cache (or in the middle of being written to an SSD) will still be written)

Open issue #46 deals with power cords, and thus: no.
Post reply on HN