I'm trying to run a function whenever a line is altered, but there doesn't seem to be a specific autocommand for this. I could run the function on CursorMoved, but it would slow down editing. I could also map the function for all the major editing movements, but it could get very messy as I'm trying to keep each line independent of the others. If there's no solution, I could possibly do a diff every few seconds to see what's changed and run the function on the changed lines, but again it's a messy solution.
Any ideas?
If you can get Vim 7.4, have a look at the TextChanged (and TextChangedI, for insert mode) events. (Note that this will monitor changes throughout the entire buffer.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With