Hacker News new | past | comments | ask | show | jobs | submit login

Plus those keys work in bash shells (anything that uses readline) and a lot of other places too.

Not only that but, the basic forward/back char, up/down line are caveman style navigation. Obviously they come in useful, but emacs has a much richer set of navigation options: M-f, M-b move forward/back by words, M-}, M-{ by paragraphs etc.




Amazingly... arrow keys also work in bash/zsh etc. shells, back to the late 80s. :-)

Actually back then I used tcsh first because it was the one that commonly had niceties like.. arrow keys.

In shell, I use the emacs bindings for kill-buffer, incremental search, and end of line jump, etc. but arrow keys for cursor movement. I suspect most people who aren't using vi bindings are much the same.

To me the ctrl-n/ctrl-p thing is a piece of ideology, not practicality; as sibling comment pointed out, they are not really ergonomic, and really just date to the fact that various terminals did not have consistent arrow navigations at various point.

Actually I did get used to ctrl-p/ctrl-n in the context of an old MUD client I used to use (TinyFugue, actually I still use it sometimes). It used those bindings for history cycling. And the MOO client I used in emacs also used ESC-p for similar purposes, I recall.


In all the web browsers I've tried on Windows, Mac and Linux, up and down arrow scroll a little (roughly a twelfth of a page) and people spend more time in browsers than in editors.

I'm no exception, which is why I customized my editor to make the up and down arrow keys behave like they do in browsers. That means I would like to use some other pair of keys in my editor to move to the next line or previous line. Since there does not seem to be any convention for the choice of those 2 keys more entrenched than Emacs's convention of using ctrl-n and ctrl-p, that is what I use.

Like you, I am annoyed by comments that gush about how great it is for programs other than Emacs to interpret Emacs-specific keyboard shortcuts because in VSCode, the editor used by about 70% of the world's programmers, none of the Emacs-specific shortcuts work: e.g., ctrl-n / ctrl-p don't move to the next / previous line.


I find them incredibly ergonomic, at least compared to the arrow keys, but that's just me. My newest keyboard doesn't even have arrows keys due to how little I would use them.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: