Having tried many options to replicate Home, End functionality (for beginning of line and end of line), from windows to OSX, I have got to the point where it works everywhere except in vim. I am using iterm2 on OSX.

I have tried editing my .vimrc and vim seems to ignore the presets for the rest of the system.

How do I remap home and end in vim to do this?


Having resolved an issue with my numpad here:

How do I get the numpad to work in vim using iterm2 on osx with term=xterm?

I decided to use the same hack and found that if you go to Preferences -> Profiles -> Keys -> Load preset of xterm with numeric keypad and then change the shortcut for Shift HOME, press HOME. Change the shortcut for Shift END, press END.

| improve this answer | |
  • Escape sequence [1;2H for home and [1;2F for end. – J0hnG4lt Mar 13 '13 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.