I have been through at least a dozen articles and internet searches (including this one) and I cannot find a setting that satisfies what I want: Both iTerm2 (at command prompt) and VIM to recognize Home and End the way they're meant to be used.
If I set Home to hex code 0x01
in iTerm2 key mapping, it starts working at the prompt, but stops working in VIM.
If I leave it alone, hitting Home and End work fine in VIM, but not at prompt.
What the hell is going on?
I have a Mac Keybinds file (located at ~/Library/KeyBindings/DefaultKeyBinding.dict
) that looks like this; and I have the same behavior when the keyword is BeginningOfLine
as what's set here (BeginningOfParagraph
):
{
/* Home Button*/
"\UF729" = "moveToBeginningOfParagraph:";
/* End Button */
"\UF72B" = "moveToEndOfParagraph:";
/* Shift + Home Button */
"$\UF729" = "moveToBeginningOfParagraphAndModifySelection:";
/* Shift + End Button */
"$\UF72B" = "moveToEndOfParagraphAndModifySelection:";
/* Ctrl + Home Button */
"^\UF729" = "moveToBeginningOfDocument:";
/* Ctrl + End Button */
"^\UF72B" = "moveToEndOfDocument:";
/* Shift + Ctrl + Home Button */
"$^\UF729" = "moveToBeginningOfDocumentAndModifySelection:";
/* Shift + Ctrl + End Button*/
"$^\UF72B" = "moveToEndOfDocumentAndModifySelection:";
}