Closed rkiyanchuk closed 5 years ago
Yes, you can, with undocumented (beta) feature.
inoremap <C-l> <C-r>=lexima#insmode#leave(1, "")<CR>
" or inoremap <C-l> <C-r>=lexima#insmode#leave_till_eol("")<CR>
" or inoremap <C-l> <C-r>=lexima#insmode#leave_all("")<CR>
leave(n, "")
moves cursor n
character to the right.
leave_till_eol("")
leave all characters inserted by lexima but will stop before end of line.
leave_all("")
leaves over new lines.
@cohama Wow, awesome! Works perfectly.
Thanks for the tip and for the great plugin!
Is it possible to create a mapping with Lexima that would allow to move over any auto-inserted characters?
Currently you have to type matching symbols to advanced to the next matching char. For example, if I type in
def foo("|
(where|
is the cursor position), in order to get to the end of the line I need to input matching")
.I'm looking for a "meta" mapping that would jump over any character auto-inserted by Lexima. So that I could press, for instance
<C-l>
twice to get todef foo("")|
.For now I just have a generic workaround for this:
This moves over any symbol to the left in insert mode.
I suspect it should possible to achieve with Lexima via
leave
rule, but couldn't figure out how.