vim mode and mapping

32 views
Skip to first unread message

Meng Zhu

unread,
Nov 30, 2019, 1:36:04 AM11/30/19
to vim_use
hi, I use colemak keyboard layout, and put many mappings in my vimrc to simulate vim finger movements on the original querty layout. it mostly works fine but there are some mappings don't work up to expectation and I am trying to understand why. for example, if I have these mappings
noremap u i
noremap r p
I expect pressing vur to select current paragraph since that should be mapped to vip. in reality, however, I have to press vup to select the paragraph. judging from the effect, the u key is correctly translated to i for processing, whereas the next r key isn't and I really have to type in a plain p key for vim to receive a functional sequence. this is pretty inconsistent and confusing and I have to remember the key after v is subject to my mappings, and the next one isn't.

what makes to two mapped keys behave differently? as far as I can tell, they should all be available under nvo modes. thanks.

Igor

unread,
Nov 30, 2019, 5:05:44 AM11/30/19
to vim_use
noremap ur ip

Meng Zhu

unread,
Nov 30, 2019, 1:33:08 PM11/30/19
to vim_use
thanks. I am more interested to know why separate mappings don't work and how to make it work, if possible. 
this two key mapping will have complexity issue, since everything i* now incurs a mapping, and the same issue (one key is subject to mapping and the next one isn't) might manifest somewhere else, a separate investigation and special mapping to work around every case isn't a good solution.

On Saturday, November 30, 2019 at 2:05:44 AM UTC-8, Igor wrote:
noremap ur ip

Reply all
Reply to author
Forward
0 new messages