Under MacOSX 10.8.2 I am able to run vim as follows in the bash shell:
/usr/bin/vim -c "normal G" -c 'startinsert' ~/.journal
If I put the exact same command in a script:
#! /bin/bash export DISPLAY=:0 echo -n -e "\n[" `date` "]:\n\n">>~/.journal /usr/bin/vim -c "normal G" -c 'startinsert' ~/.journal
and run the script, it also opens vim correctly.
However, if I put the script, named 01diaryscript, into crontab:
MAILTO="" * * * * * ~/01diaryscript
vim does not open... BUT a new vim process is created with its own unique id every minute.
On the other hand, if I use the vim, also 7.3, included in the MacVim package, cron works.
Is there a way to force the vim process that is created when I run the first script in cron to be accessible?