I'd like to add a little bit of consistency between editing text on the terminal and editing text in normal OSX programs. I use iTerm2, but I imagine any solution would involve using readline and
.inputrc which probably would work in most terminals.
Specifically, I was thinking of adding:
- Cmd + Delete: Delete to start of line before cursor
- Alt + Delete: Delete word before cursor
- Alt + Left/Right: move cursor between words
- Cmd+Left/Right: move cursor to start/end of line
- How could
.inputrcbe configured to support these keyboard shortcuts?
- Would any of these shortcuts generate conflicts with existing terminal or command-line shortcuts?
- Are there any other shortcuts that would be useful to create consistency with standard OSX text editing keys?
As a side note, I am aware that there are Vi and Emacs style shortcuts for performing these operations. In fact I use Vi-style shortcuts quite a lot on the command-line. However, sometimes when my mind hasn't shifted modes, its disruptive. Thus, it would be nice if the terminal could support both OSX and Vim style shortcuts.