Enabling Unix Text Editing Shortcuts in Mac OS X
Thanks to Russ Cox for contributing this!
All you need to do is run from a shell:
mkdir -p $HOME/Library/KeyBindings
cat >$HOME/Library/KeyBindings/DefaultKeyBinding.dict <<EOF
{
"^u" = "deleteToBeginningOfLine:";
"^w" = "deleteWordBackward:";
}
EOF
This should enable ^U and ^W for all your Mac apps.
Remap CapsLock to Control
Go to System Preferences -> Keyboard -> Modifier Keys … and there you can select what you want to map the Caps Lock key to.