I'm using the Vim REPL plugin, and I'm trying to use a key mapping to call the command REPLToggle
. The command is declared here.
My key mapping is:
nnoremap <leader>r :call repl#REPLToggle()<cr>
When I'm using the key, the command is executed only after I press any extra key. For example, I'm pressing <leader>r
, nothing is happening, until I press any other key. Though, the extra key is passed to the terminal that is opened.
When I run the command without key mapping, it works as it should be. That is, when I manually do :call repl#REPLToggle()
, then all are OK.
The function repl#REPLToggle
is defined here.
Can anyone help me with this?
nnoremap <leader>r :REPLToggle<cr>
instead? It looks like the:REPLToggle
command (and not the function) is supposed to be the primary interface to the plugin... Having said that, not sure if they're actually different, but please try it to see if you get a different result.