Re: newbie question: environment variables
- On Tuesday, March 19, 2002, at 10:33 AM, antics_chap wrote:
> [Using Vim 6.0 patches 1-11 13-17 on Mac OS 8.5]I think what I did before switching to OS X was something like this:
> I'm new to Macs and new to VIM (but have been using vi for years on
> I've read the helpfiles and the faq at vim.org/macs.html without
> I'd like a quick way of opening files in Vim from the command prompt.
> Perhaps using an environment variable as a path alias from the command
> prompt e.g.
> :e $myfolder/myfile
> would open "Powerbook:Desktop Folder:myfolder:myfile"
> I read that Mac's don't support environment variables, however $VIM
> seems to
> work - which is why this question is addressed to this forum. If you can
> think of a better way I'm open to suggestions. If this question is
> in a FAQ anywhere please point me in that direction and I'm sorry to
> wasted your time.
> Much obliged.
> PS. Great product - couldn't work on this Mac without it. Thanks for
> all the
> hard work.
:let HOME = "Powerbook:Desktop Folder:myfolder"
:command! -nargs=1 -complete=var CD execute "cd" <args>
Then I can do
and I could even use command-line completion,
This might already be in the macvimrc in Axel Kielhorn's distribution.
Have a look.
HTH --Benji Fisher