Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 0 down vote accepted

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .