Using VIM, how do I redirect the directional keys from my right hand to my left hand?

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, the actual use of this mapping requires a double press on the 's' and 'g' keys when switching from left to right.

Is there a better way to reprogram these keys to work 100% correctly without having to double-press the keys?

+3


source to share


1 answer


This is a bad idea, I hope you have a good reason.

:map d

      

will give you a list of other commands mapped to d



:unmap ds

      

will cancel the display of ds.

After deleting other bindings, you only need to press the key once.

0


source







All Articles