I have written a vimscript function. I want to use
autocmd to call this function when a character is deleted with the
x key. But autocmd requires an event name. Which event is triggered when a character is deleted with the
There is no such event.
There is TextChanged event that is generally called when text was changed in normal mode (including
x I guess). I am not sure this what you need though...
Why not remap
x key to delete a character and call your function?
func! MyFunc() echo printf("You have just deleted '%s'", getreg(v:register)) endfunc noremap x x:call MyFunc()<CR>