Closed kshenoy closed 10 years ago
How about this?
nnoremap <Plug>shrink :<C-u>let &lines -= 1<CR>
call submode#enter_with('sizing', 'n', '', '<lt>l')
call submode#map('sizing', 'n', 'r', '<lt>', '<Plug>shrink')
Thanks, that worked. Can you clarify what exactly the role of the 5th argument in the enter_with function is? If I don't specify that does it just enter the submode without doing anything or enter the submode and execute whatever is specified as the 4th argument?
Also, is it possible to treat the repeated edits made when in a submode as a single change so that a single undo can revert the change?
It might be achieved by correctly using :undojoin
for all submode key mappings. But it seems to be too hard to implement such behavior.
Hi, I have a mapping as follows:
Is it possible to create a submode for this such that typing
<l
once enters the submode and all subsequent<
will trigger<l
?