Loading ...
Sorry, an error occurred while loading the content.

Notifications of buffer content change

Expand Messages
  • Yaron Hirsch
    I wanted to know if there s a way to be notified whether buffer content has changed (either by changing text in insert mode, or by replacement, or any other
    Message 1 of 2 , Jan 4, 2011
    • 0 Attachment
      I wanted to know if there's a way to be notified whether buffer content
      has changed (either by changing text in insert mode, or by replacement,
      or any other way). There are autocmd events for InsertEnter &
      InsertLLeave or CursorMovedI and so forth, but I couldn't find away to
      be notified if replacement or deletion takes place.

      The NetBeans protocol seems to give some of this capability but it seems
      lacking as well and inefficient. Is there a way to perhaps add more
      autocmd messages to enable this capability?

      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Ben Fritz
      ... You can use CursorHold and CursorHoldI (and other events like the CursorMoved, etc. if needed) and check the b:changedtick variable against an earlier
      Message 2 of 2 , Jan 5, 2011
      • 0 Attachment
        On Jan 4, 6:40 am, Yaron Hirsch <yhir...@...> wrote:
        > I wanted to know if there's a way to be notified whether buffer content
        > has changed (either by changing text in insert mode, or by replacement,
        > or any other way). There are autocmd events for InsertEnter &
        > InsertLLeave or CursorMovedI and so forth, but I couldn't find away to
        > be notified if replacement or deletion takes place.
        >
        > The NetBeans protocol seems to give some of this capability but it seems
        > lacking as well and inefficient. Is there a way to perhaps add more
        > autocmd messages to enable this capability?

        You can use CursorHold and CursorHoldI (and other events like the
        CursorMoved, etc. if needed) and check the b:changedtick variable
        against an earlier stored version.

        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      Your message has been successfully submitted and would be delivered to recipients shortly.