How do I get Home and End working for BOTH iTerm2 and VIM? 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*/
&quot;\UF729&quot; = &quot;moveToBeginningOfParagraph:&quot;;

/* End Button */
&quot;\UF72B&quot; = &quot;moveToEndOfParagraph:&quot;;

/* Shift + Home Button */
&quot;$\UF729&quot; = &quot;moveToBeginningOfParagraphAndModifySelection:&quot;;

/* Shift + End Button */
&quot;$\UF72B&quot; = &quot;moveToEndOfParagraphAndModifySelection:&quot;;

/* Ctrl + Home Button */
&quot;^\UF729&quot; = &quot;moveToBeginningOfDocument:&quot;;

/* Ctrl + End Button */
&quot;^\UF72B&quot; = &quot;moveToEndOfDocument:&quot;;

/* Shift + Ctrl + Home Button */
&quot;$^\UF729&quot; = &quot;moveToBeginningOfDocumentAndModifySelection:&quot;;

/* Shift + Ctrl + End Button*/
&quot;$^\UF72B&quot; = &quot;moveToEndOfDocumentAndModifySelection:&quot;;
}
The problem turned out to be Zshell.
New macbooks come default with zshell now, creating confusion for setting these keys on a full size keyboard.  Typing bash and using that as my default shell worked without a problem, but I wanted to know how to accomplish this in zshell.
The solution was to modify ~/.zshrc with the following I got from this link:
bindkey &quot;^[[H&quot; beginning-of-line
bindkey &quot;^[[F&quot; end-of-line

Then, obviously, source ~/.zshrc.