Remapping CAPS LOCK to Control also has benefits outside of the terminal in OS X (10.7).
OS X's terminal becomes a much happier place if you remap CAPS LOCK to the
Control key, and if you enable the Option
key.
One downside of this, which applies only in Terminal.app, is that you can no longer enter symbols which can only be
created using the Option key, such as å∂©∂߃å߃åß∂ƒ´œ¥†¥¢∞¢¢œåƒ√
.
Being able to reach the Contol-key with your left pinky finger makes a lot of
UNIX keyboard shortcuts more comfortable, for example Control-h
for Backspace
and Control-j
(or Control-m
) for Enter
/Return
. Another favorite is Control-i
for Tab
; to see more you can check out the documentation of
the standard Bash shell
(note that the M-
prefix used in that document now refers to your Option-key). Having the option key at your disposal makes it possible to delete text in single word rather than single character chunks: M-f
to delete a word forward, and M-Backspace
to delete a word backwards.
Let it be known however that some command-line programs on OS X use Editline, the BSD version of Readline, which does not support all the shortcuts provided by GNU Readline.
What I like about these remapped keys and 'UNIX shortcuts' is that they are very easy to reach if you have your fingers on the home row. Surprisingly, some of the 'UNIX shortcuts' sometimes also work in other programs. As I type this in a Google Chrome text box, I can use the following shortcuts:
C-a
andC-e
to jump to the start/end of the current line;C-t
to do a character swapping dance;C-n
andC-p
to move the cursor to the next/previous line;C-f
andC-b
to move the cursor forward/backward;C-d
andC-h
function asDelete
/Backspace
;C-k
andC-y
to kill/yank lines Emacs-style, independently of the system clipboard;C-v
as page-down; andC-m
asEnter
/Return
.
Not all of these shortcuts work everywhere; for instance, when typing in Chrome's address bar I cannot use C-m
as Enter
. Still, these can be quite useful, and easy to reach if your CAPS LOCK is remapped to Control.