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

> vi is everywhere.

Although, surprisingly, most command-line interfaces and command-driven apps (like redis client and psql) use emacs key bindings for command history.



Most command-line interfaces use the readline library. To switch them to vi bindings put the following in ~/.inputrc:

  set editing-mode vi


This isn't a deliberate choice though on their part, is it? Isn't it just a consequence of everyone depending on readline and readline using emacs-style key bindings?


Some Emacs-style bindings, like ^W (erase word) and ^U (erase line), are baked into the UNIX tty discipline -- basic implementations of these bindings exist within the kernel.




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

Search: