Reputation: 10083
The vim binding I have created works well enough, although I would like the binding to actually execute the function for me. What currently happens is I enter the binding and my function shows up in the :
prompt, then I press enter to activate the function. Is there some way to include the return character in my binding?
Here is the binding:
map <C-C> :call myfunc()
when I press ctrl+c, call myfunc()
shows up in the :
prompt and I can press enter to activate the function. Is there some way for me to simple press ctrl-c to activate myfunc?
Is there some way for me to add the return character to this
Edit: I tried to recreate this, and now the prompt doesn't show up. I want to create a key binding so that when I press ctrl+c, or ideally ctrl+shift+c, myfunc() is executed.
Upvotes: 0
Views: 428
Reputation: 2052
It should be
map <C-C> :call myfunc()<CR>
CR
is Carriage return
or Enter
Upvotes: 1