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

Re: Problem with system PATH in Gvim

Expand Messages
  • Tony Mechelynck
    ... /opt/local/bin:~/bin:/usr/local/bin:/opt/local/sbin:/usr/local/tex:live/2005/bin/i386-darwin: . $PATH (all on one line). IIUC, Vim executes external
    Message 1 of 3 , Oct 9, 2007
      Krzysztof Maj wrote:
      >
      > Hello,
      > How to set the correct PATH variable in the Mac OSX environment for
      > GVim? I tried to do it like below in the GVim window, but it doesn't work:
      >
      > :!export
      > PATH=/opt/local/bin:~/bin:/usr/local/bin:/opt/local/sbin:/usr/local/tex
      > live/2005/bin/i386-darwin:$PATH
      >
      > :!echo $PATH
      > /usr/bin:/bin:/usr/sbin:/sbin
      >
      > GVim still have the same PATH variable. How to force it to enhance the
      > PATH?
      >
      >
      > All the best,

      :let $PATH =
      '/opt/local/bin:~/bin:/usr/local/bin:/opt/local/sbin:/usr/local/tex:live/2005/bin/i386-darwin:'
      . $PATH

      (all on one line).

      IIUC, Vim executes external commands in a subshell, meaning that any
      environment variables set (and even "exported") from that subshell will regain
      their former values when the subshell terminates. The ":let" statement above
      changes Vim's own environment, for Vim itself and all the shells it will
      spawn, until you close that Vim session.

      See ":help :let-$"


      Best regards,
      Tony.
      --
      My Favorite Drugs [Sung to My Favorite Things]
      Reefers and roach clips and papers and rollers
      Cocaine and procaine for twenty year molars
      Reds and peyote to work out your bugs
      These are a few of my favorite drugs.

      Uppers and downers and methedrine freakout
      Take some amphetamines, watch your brains leak out
      Acid and mescaline pull out your plugs
      These are a few of my favorite drugs.

      Backs that are perfect for carrying monkeys
      Users of heroin, often called junkies
      Methadone helps then to stop being thugs
      Takes them off one of my favorite drugs.

      On a bad trip
      When the cops come
      When I lose my head
      I simply take more of my favorite drugs
      And then I'm not sad -- I'm dead!

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_multibyte" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Krzysztof Maj
      ... Thanks a lot Tony! All the best, -- Krzysztof Maj, JNCIP-M/T I m a M@c, are you still a PC?
      Message 2 of 3 , Oct 9, 2007
        On 2007-10-09, at 22:42, Tony Mechelynck wrote:

        > IIUC, Vim executes external commands in a subshell, meaning that any
        > environment variables set (and even "exported") from that subshell
        > will regain
        > their former values when the subshell terminates. The ":let"
        > statement above
        > changes Vim's own environment, for Vim itself and all the shells it
        > will
        > spawn, until you close that Vim session.
        >
        > See ":help :let-$"

        Thanks a lot Tony!

        All the best,
        --
        Krzysztof Maj, JNCIP-M/T
        I'm a M@c, are you still a PC?
      Your message has been successfully submitted and would be delivered to recipients shortly.