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

93672Re: time spent editing a file

Expand Messages
  • Marc Fournier
    Jul 29, 2008
    • 0 Attachment

      > Well, an easy way to start would be to save the time when the buffer
      > is loaded in a buffer-local variable with an autocommand, then make a
      > command to display the difference.
      > augroup TimeSpentEditing
      > [...]
      > Just put that in ~/.vimrc or ~/.vim/plugin/something.vim and issue
      > :TimeSpentEditing when you want to see.

      Ben, you are my hero of the day ! Thanks a lot, this is exactly what I
      was looking for. I must really learn to use these autocommands. It
      looks really powerful.

      > It should be easy enough to incorporate the value into your statusline
      > and have it regularly updated, but that is the field of expertise of
      > others, and certainly not mine, so I'll leave that for someone else to
      > help with.

      This I figured out myself:

      :set ruler
      :set rulerformat+=%{TimeSpentEditing()}


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

      Thanks again !


      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 15 messages in this topic