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

26453Re: journal in vim?

Expand Messages
  • Gary Johnson
    Feb 27 11:36 AM
    • 0 Attachment
      On Wed, Feb 27, 2002 at 11:12:39AM -0800, Jonah wrote:
      > I'm looking for ideas on how to implement a journal
      > in vim -- a file that would create a new date/time
      > stamp automatically each time it was opened, and move
      > the cursor under the newly created entry. or something
      > similar.

      What a coincidence! I just wrote something a few weeks ago to do
      exactly that. It puts vim in insert mode, too, so you can just start
      typing.

      -------------------------------- diary ---------------------------------
      #!/bin/ksh
      # diary - script to facilitate making diary entries

      file=$HOME/.diary
      date "+%n%m/%d/%y %H:%M:%S%n%n " >> $file
      vim -c '$|startinsert!' $file
      clear
      ------------------------------------------------------------------------

      HTH,
      Gary

      --
      Gary Johnson | Agilent Technologies
      garyjohn@... | Spokane, Washington, USA
    • Show all 8 messages in this topic