Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I know this is (partially) a joke, but it does raise an interesting point to me (as a vi heathen), why does :w seem easier to remember than C-x C-s?

I guess it's the modality, I know ':' indicates the start of an ex command, and "w"rite saves the file, while I only see C-x C-c as a "single token".

I supposed it's just C-x for "execute command" and ... I'm not sure why it's control c, instead of just c, or s, or w...



Just a nitpick, emacs is every bit as "modal" as vim. If you configured vim to start up in insertion mode and had to ^O to do every normal mode command, it would be somewhat close to Emacs's fundamental-mode.

C-x enters a keymap called the `ctl-x-map`, lots of file-related commands live in there but also half a million other things. It's very similar to `:` to enter an ex command or, more accurately, `g` as a prefix to a million different vim commands.

If you ever find yourself in emacs again, try typing C-x (to enter the `ctl-x-map`) and then hit C-h. This shows the help for the Ctrl-x keymap, and you'll see it's somewhat well-organized, if completely arbitrary. For instance, if you hit `C-x 5` you'll be in a sub-keymap (the ctl-x-5-map) which has a lot of frame-specific management mappings. Why is it under `5`? Historical reasons, no doubt, but it's inscrutable to normies like me.


Thanks for the explanation. As I wrote in another reply, maybe I should try again :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: