How do I use windows style Home and End on OSX in Vim (iterm2)

0

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?

J0hnG4lt

Posted 2013-03-13T10:47:59.537

Reputation: 1 561

Answers

0

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.

J0hnG4lt

Posted 2013-03-13T10:47:59.537

Reputation: 1 561

Escape sequence [1;2H for home and [1;2F for end. – J0hnG4lt – 2013-03-13T11:14:11.163