I'm trying to map a function to <CR>
but the problem is, that another plugin already mapped something to it. So that's the code from me:
function Test()
echom "Test succeeded!"
endfunction
inoremap <CR> <CR><CMD>call Test()<CR>
Now if I do :verbose imap <CR>
, than I'm getting this:
If I map it manually again in a vim session with this command:
:inoremap <CR> <CR><CMD>call Test()<CR>
, than I'm getting my desired output Test succeeded!
.
Is there another solution than swapping creating an issue for the lexima-plugin or removing it?
I think that this situation needs imap
instead of inoremap
, is that right?
EDIT
Ok, so I've tested it with two self-made functions:
function Test()
echom "Test succeeded!"
endfunction
function LMAO()
echom "LMAO SUCCESS!"
endfunction
imap
ping both functions manually to <CR>
doesn't work either. I can only map one function to <CR>
.