I copied the code from vim-thai-keys to my
.vimrc file and made a few adjustments.
My problem: Typing the '2' key while using the Thai keyboard in Normal mode either sends me to
/search mode or moves the cursor two spaces to the right and I am thus unable to use 2 in a keystroke navigation or editing combination.
Note: The symbol on the Thai keyboard corresponding to the English key '2' is '/'.
Changes made to .vimrc file and the results of typing '2' from the Thai keyboard while in Normal mode.
:map / 2— Result: Cursor moves 2 spaces to the right
:map \/ 2— Result: Sent into
nnoremap / 2— Result: Cursor moves 2 spaces to the right
nnoremap \/ /— Result: Sent into
All of the other numbers and key stroke mappings seem to work wonderfully.
(Yes, I restarted vim after editing the .vimrc file) :) :)
Question: Is there a way to map the '2' key so that while in the Thai keyboard in Normal mode I am able to use it as a normal 2 in navigation and editing keystroke combinations?
Bonus points: Should I use
nnoremap in my
.vimrc file for these key stroke mappings and why.
nnoremap / 2. If so, you're basically moving 2 spaces to the right, since
:h <Space>states that it is equivalent to
[count]chars to the right"). Alway use the
*noremapform, unless you know you need recursive mappings.