I am developing a vim plugin and I have set a default mapping this way.
if !hasmapto('<Plug>DumpDebugString') nmap <unique> <Leader>ds <Plug>DumpDebugString nmap <unique> <Leader>dS <Plug>DumpDebugStringExpr endif ... nnoremap <silent> <Plug>DumpDebugString :<C-U> :call <SID>debugFunctionWrapper(0)<CR> nnoremap <silent> <Plug>DumpDebugStringExpr :<C-U> :call <SID>debugFunctionWrapper(1)<CR>
When I try invoking ds the DumpDebugString method runs correctly but takes some time actually get called in the first place. It is run instantly only if I map it like this:
nmap <leader>ds <Plug>DumpDebugString<CR>
But the extra
<CR> shouldn't be needed since it already included in the
- I don't think it has anything to do with the actual mapping characters or with the use of
:call <SID>debugFunctionWrapper(0)<CR>with something like
:call str2nr("1")<CR>doesn't seem to solve the problem
<nowait>doesn't do anything.
For the story, here's the plugin: https://github.com/bergercookie/vim-debugstring