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

Re: trap changes in 'modified' state

Expand Messages
  • Gerald Lai
    ... [snip] You can also use the statusline. A simple test: fun Test() return &modified endf ... HTH :) -- Gerald
    Message 1 of 3 , May 4 12:24 AM
    • 0 Attachment
      On Thu, 4 May 2006, Eric Arnold wrote:

      > On 5/3/06, Yakov Lerner <iler.ml@...> wrote:
      >> I want to trap changes in the value of 'modified' (execute
      >> my commands when first change is done to the
      >> buffer, and when undo reverts buffer to unmodified state).
      >> How can I achieve this ?
      >>
      >> Note that this is not necessarity connected to Insert mode.
      >> Buffer can easily become modified without entering insert mode.
      >>
      >> Yakov
      >>
      >
      > I'm not sure if it's what you're looking for, but the tabline is
      > triggered on the 'modified' setting.
      [snip]

      You can also use the statusline. A simple test:

      fun Test()
      return &modified
      endf

      :set laststatus=2 statusline=%{Test()}

      HTH :)
      --
      Gerald
    Your message has been successfully submitted and would be delivered to recipients shortly.