Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

This is the best solution I've seen so far:

" Map Right Directionals to Left Commands
noremap s h
noremap d k
noremap f j
noremap g l

" Map Left Commands to Right Directionals
noremap h s
noremap k d
noremap j f
noremap l g

However, when actually using this mapping, it requires a double-press on the 's' and 'g' keys when switching from left to right.

Is there a better way to re-map these keys to work 100% correctly without the need to double-press keys?

share|improve this question
As the FAQ mentions: Please, do not cross-post. – Chris Johnsen Apr 5 '12 at 5:40
Are you trying to support both sets of keys simultaneously in vim? – sbtkd85 Apr 13 '12 at 13:59
How are you defining "simultaneously"? If you mean swapping the functionality of the left and right home keys, then yes. I've also tried nnoremap, but that doesn't work. The best solution so far for me has been to use d and f for up and down, and h and l for left and right. – Masao Apr 14 '12 at 21:09
@Masao Kitamura : it works for me perfectly. I am unlsing vim 7.2 in Linux. – SibiCoder Jun 7 at 7:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.