0

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.

kilojoules
  • 9,768
  • 18
  • 77
  • 149
  • 1
    Beware that `` is used by the interrupt signal. It's highly recommended to leave it alone. – lcd047 Jul 13 '15 at 08:02

1 Answers1

1

It should be

map <C-C> :call myfunc()<CR>

CR is Carriage return or Enter

Ashwani
  • 1,938
  • 11
  • 15