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

26459Re: journal in vim?

Expand Messages
  • Peter Horst
    Feb 27 3:38 PM
    • 0 Attachment
      I tried, in bash, the little script you so kindly provided: any idea why
      this wouldn't be working for me? I've written:

      #!/bin/sh

      file=$HOME/diary
      date "+%A, %B %e, %l:%M %p " >> $file
      vim -c '$|startinsert!' -c "set filetype=mail" $file
      clear

      When I invoke it, I get:

      E29: No inserted text yet
      Hit ENTER or type command to continue
      Hit ENTER or type command to continue

      Any clues would be appreciated, I've been trying to understand '-c' for
      a while now...

      Peter

      On Feb27, 11:36AM, Gary Johnson wrote:
      > 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

      --
      The Master said, The gentleman concentrates on right; the little man
      concentrates on advantage.
      -- Analects 4:16
    • Show all 8 messages in this topic