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

timer question

Expand Messages
  • John Doe
    Does vim support a timer? The kind of thing I have in mind would insert the current time and beep, say every hour for a nice schedule. So is beeping and timing
    Message 1 of 5 , Mar 27, 2005
    • 0 Attachment
      Does vim support a timer? The kind of thing I have in
      mind would insert the current time and beep, say every
      hour for a nice schedule. So is beeping and timing
      possible (perhaps even via polling)?



      __________________________________
      Do you Yahoo!?
      Make Yahoo! your home page
      http://www.yahoo.com/r/hs
    • A. J. Mechelynck
      ... Yes and no. The CursorHold event will trigger after a specified time span of inactivity, but it will not re-trigger until there is some more edit activity.
      Message 2 of 5 , Mar 27, 2005
      • 0 Attachment
        John Doe wrote:
        > Does vim support a timer? The kind of thing I have in
        > mind would insert the current time and beep, say every
        > hour for a nice schedule. So is beeping and timing
        > possible (perhaps even via polling)?

        Yes and no. The CursorHold event will trigger after a specified time
        span of inactivity, but it will not re-trigger until there is some more
        edit activity.

        see ":help CursorHold" (and the help items mentioned there).

        Best regards,
        Tony.
      • John Doe
        thanks for your reply, but is polling the date or time also out of the question? ... __________________________________ Do you Yahoo!? Make Yahoo! your home
        Message 3 of 5 , Mar 27, 2005
        • 0 Attachment
          thanks for your reply, but is polling the date or time
          also out of the question?

          > Yes and no. The CursorHold event will trigger after
          > a specified time
          > span of inactivity, but it will not re-trigger until
          > there is some more
          > edit activity.
          >
          > see ":help CursorHold" (and the help items mentioned
          > there).



          __________________________________
          Do you Yahoo!?
          Make Yahoo! your home page
          http://www.yahoo.com/r/hs
        • A. J. Mechelynck
          ... The problem is: how will you force the event to repeat? You can poll the system s date and time as long as there is a mapping or autocommand event to call
          Message 4 of 5 , Mar 27, 2005
          • 0 Attachment
            John Doe wrote:
            > thanks for your reply, but is polling the date or time
            > also out of the question?
            >
            >
            >>Yes and no. The CursorHold event will trigger after
            >>a specified time
            >>span of inactivity, but it will not re-trigger until
            >>there is some more
            >>edit activity.
            >>
            >>see ":help CursorHold" (and the help items mentioned
            >>there).

            The problem is: how will you force the event to repeat? You can poll the
            system's date and time as long as there is a mapping or autocommand
            event to call your function. But if you set a time interval of, say, 15
            minutes, when you leave the keyboard (to sleep or to do some shopping,
            let's say) your function will be called at most once 15 minutes after
            your last keystroke, and then never again until you come back. Depending
            on what you want to poll the clock for, this may or may not be OK for you.

            Rather than Vim, you might want to use cron (on Unix) or the Task
            Scheduler (on Windows). Using either method, you could even pass
            messages to vim using the |clientserver| facility (q.v.).

            Best regards,
            Tony.
          • Mathias Michaelis
            Hi John ... If yes, you would have found it already, I think: http://groups.yahoo.com/group/vim/message/57693 The question should be: Is a timer planned in
            Message 5 of 5 , Nov 2, 2005
            • 0 Attachment
              Hi John

              > Does vim support a timer? The kind of thing I have in
              > mind would insert the current time and beep, say every
              > hour for a nice schedule. So is beeping and timing
              > possible (perhaps even via polling)?
              >
              If yes, you would have found it already, I think:

              http://groups.yahoo.com/group/vim/message/57693

              The question should be: Is a timer planned in vim7?

              Regards

              Mathias
            Your message has been successfully submitted and would be delivered to recipients shortly.