[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim-mac
Subject:    Re: newbie question: environment variables
From:       Benji Fisher <fisherbb () bc ! edu>
Date:       2002-03-19 16:04:33
[Download RAW message or body]

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'm new to Macs and new to VIM (but have been using vi for years on 
> UNIX).
> I've read the helpfiles and the faq at vim.org/macs.html without 
> success.
>
> 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 
> answered
> in a FAQ anywhere please point me in that direction and I'm sorry to 
> have
> wasted your time.
>
> Much obliged.
> Matthew.
> PS. Great product - couldn't work on this Mac without it. Thanks for 
> all the
> hard work.

     I think what I did before switching to OS X was something like this:

:let HOME = "Powerbook:Desktop Folder:myfolder"
:command! -nargs=1 -complete=var CD execute "cd" <args>

Then I can do

:CD HOME

and I could even use command-line completion,

:CD H<Tab>

This might already be in the macvimrc in Axel Kielhorn's distribution.  
Have a look.

HTH					--Benji Fisher

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic