Tuesday, September 11, 2012

Re: PATH

Oh, sorry I was not aware of vim-app on macports. The only additional comment I have is that you may want to have "if has('gui')" before changing the $PATH variable since you probably don't need to change it in terminal-vim. 

Also, my MacVim does not seem to load any environment variables for the user (using zsh). At least, that's why I have set it explicitly.

On Wed, Sep 12, 2012 at 4:19 AM, Bee <forth@calcentral.com> wrote:


On Sep 11, 9:40 am, Derek Ashley Thomas <derekatho...@gmail.com>
wrote:
> Hi,
> try this
>
> if has("gui_macvim")
>     let $PATH = "/opt/local/bin:/opt/local/sbin:".$PATH
> endif
>
> I added something quite similar to my vimrc
>
> -Derek
>
>
>
> On Wed, Sep 12, 2012 at 1:37 AM, Bee <fo...@calcentral.com> wrote:
> > Both MacVim and Mac terminal vim use the PATH I have set.
>
> > vim-app, a gui version of terminal vim compiled from MacPorts vim-app
> > @7.3.646_0, does NOT use my PATH.
>
> > I found it did not work when trying
> > :r !gcal
> > (/bin/bash: line 1: gcal: command not found)
>
> > How would I get vim-app to start with my PATH?
>
> > This did not work ( :help path )
> > :set path=.,/opt/local/bin,/opt/local/sbin
>
> > Bill
>
> > --
> > You received this message from the "vim_use" maillist.
> > Do not top-post! Type your reply below the text you are replying to.
> > For more information, visithttp://www.vim.org/maillist.php

It is for vim-app, not MacVim, so this is what I used in my .gvimrc:

if has("mac")
  if has("gui_macvim")
    if has("patch260") " Snow Leopard, previously bottom left
      winpos 0 23
    endif
  else " vim-app
    set lines=39
    let $PATH = ':/opt/local/bin:/opt/local/sbin:' . $PATH
  endif
endif

MacVim seems to pickup the path correctly
from the .profile file where I have:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: