Typing source code is easier for me when the numbers row above the letters (the numrow) is permanently shifted, giving me access to the symbols at a single keypress, without pressing
Shift. The numbers themselves are available when pressing
Shift of course. To achieve this, I use the following in my configuration:
nnoremap 1 ! nnoremap 2 @ nnoremap 3 # nnoremap 4 $ " etc... vnoremap 1 ! vnoremap 2 @ vnoremap 3 # vnoremap 4 $ " etc... onoremap 1 ! onoremap 2 @ onoremap 3 # onoremap 4 $ " etc... " the inverse maps not included here
This works great normally, but I have a problem. The command for 'select everything inside parantheses', namely
vi), isn't working as expected, because I still have to press
), otherwise Vim will receive the command
vi0, which isn't what I want.
What I want is to press
vi0 but have the
0 mapped to
) without shifting. Unfortunately,
onoremap 0 ) didn't have any effect. How can I achieve this?