Vim Buffer changed

I am trying to implement AutoCmd in Vim, which should be executed when the current buffer has been changed.

I read all the events available for AutoCmd in the documents, but could not find something that would help determine when the buffer was changed or not.

This does not necessarily mean β€œwhen the buffer was written,” because the action I need to call needs to be called when the buffer was changed, including writing.

Any ideas on how to implement BufIsModified that could accomplish this?

Note: not a duplicate. What is the vimrc function to determine if the buffer has been modified? since this question is about a AutoCmd , not just a buffer-checked check

+4
source share
1 answer

The only thing that appeared in my head was to use the CursorMoved and CursorMovedI .

Hth

+2
source

Source: https://habr.com/ru/post/891751/


All Articles