I’m having a little trouble with defining my own ex commands with the vim API. This should be simple, I think, but I don’t really understand what arguments exactly to pass and how to pass them to the function. I tried “name : ct, prefix : undefined” too, but that also resulted in:
"Not an editor command: “ct”
Here’s my current attempt at getting it running:
defineEx(ct, undefined, vim_custom_ct(myCodeMirror));
function vim_custom_ct(cm) {
alert("test");
}
If someone knows how to use this function properly, please let me know!
The third argument should be a function, whereas you’re currently giving it the result of callingvim_custom_ct, which is undefined. Try defineEx(ct, undefined, vim_custom_ct)