Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
    
Spontaneously I don't really see the application. It's just a question of habit - if you are used to using your right hand for movement keys, this will be the most convenient, left-handed or not. In games the standard is to use the left hand for movement (WASD), and I as right-handed have no trouble with this. Normally I think getting used to custom keyboard shortcuts is mostly unnecessary, and annoying when one has to use someone else's settings for any reason. Allright, I'll stop rambling aimlessly now :-) . –  Daniel Andersson Apr 4 '12 at 19:53
    
Did you manage to find a solution for this problem? –  Ivo Flipse Jul 15 '12 at 17:34

2 Answers 2

The mappings work for me in a plain Vim (vim -N -u NONE); you probably have some other mappings that start with s or g, and therefore Vim has to wait for a next keypress to resolve the ambiguity. Check for such mappings with

:verbose nmap s
:verbose nmap g

and remove / redefine those mappings.

share|improve this answer

You should give a try to nnoremap it prevents recursive mappings.

share|improve this answer
    
I tried nnoremap but it doesn't change the results...still need to double-press left and right keys when switching directions. –  Masao Kitamura Apr 7 '12 at 3:02

Your Answer

 
discard

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

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