Due to some issues with the Programmer Dvorak implementation on my operating system and the desire to make a couple of small tweaks to the layout, I'm trying to implement the remapping entirely in vim (I don't type enough punctuation in any other editor to make this a limitation). I added noremap, inoremap, and cnoremap commands to a Vimscript file, e.g.:
inoremap 1 &
inoremap ! %
inoremap 2 [
inoremap 3 {
inoremap 4 }
[...]
When I source this file I can type perfectly in insert mode, and normal mode commands work as expected as well. However, characterwise search with f, F, t, or T unfortunately doesn't respect these mappings, it uses my system keyboard layout. This is probably to be expected from the method I've used, but is there any way to get around this?
Edit to add: The same problem occurs in single-character replace with r.
omapworks for, sayd(, but not forda(. – Soren Bjornstad Apr 10 '16 at 15:21(,i(anda(. I don't know which key you want to use for(, but let's say it's5. Then, you could write:onoremap 5 (,onoremap a5 a(andonoremap i5 i(. If you don't want to repeat these 3 mappings for similar objects ((,{,[) you could write aforloop which would iterate over the items of a list containing the latter and define the 3 mappings for each. Note that to delete the text inside/around parentheses you can usebinstead of(:dibordab. Same thing withBfor curly braces:diBordaB. – user9433424 Apr 10 '16 at 15:47