Created
April 10, 2012 16:21
-
-
Save mpoisot/2352577 to your computer and use it in GitHub Desktop.
Mac OSX Home & End Keybindings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create or add to ~/Library/KeyBindings/DefaultKeyBinding.dict | |
{ | |
/* Remap Home / End to be correct :-) */ | |
"\UF729" = "moveToBeginningOfLine:"; /* Home */ | |
"\UF72B" = "moveToEndOfLine:"; /* End */ | |
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */ | |
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; /* Shift + End */ | |
} | |
For terminal, add to Terminal->Preferences->Settings->Keyboard | |
(There are more fixed for pgup, pgdown, shift-home, etc. I haven't tried them yet.) | |
home: \033[1~ | |
end: \033[4~ | |
And create a ~/.inputrc file to finish fixing the terminal. (I'm not sure if this eliminates the need for the Terminal keyboard preferences above.) | |
"\e[1~": beginning-of-line | |
"\e[4~": end-of-line | |
"\e[5~": beginning-of-history | |
"\e[6~": end-of-history | |
"\e[3~": delete-char | |
"\e[2~": quoted-insert | |
"\e[5C": forward-word | |
"\e[5D": backward-word | |
"\e\e[C": forward-word | |
"\e\e[D": backward-word | |
set completion-ignore-case On |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment