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?

  • As the FAQ mentions: Please, do not cross-post. – Chris Johnsen Apr 5 '12 at 5:40
  • 1
    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 Kitamura Apr 14 '12 at 21:09
  • @Masao Kitamura : it works for me perfectly. I am unlsing vim 7.2 in Linux. – SibiCoder Jun 7 '16 at 7:03

Your Answer

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

Browse other questions tagged or ask your own question.