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

$PATH

Expand Messages
  • Caleb Eggensperger
    What is the recommended way to edit the $PATH that MacVim uses for things like equalprg and !commands? I ve tried everything I could find by searching (short
    Message 1 of 6 , Nov 3, 2011
      What is the recommended way to edit the $PATH that MacVim uses for things like equalprg and !commands?

      I've tried everything I could find by searching (short of editing /etc/paths, which isn't an option as I don't have administrator privs on this machine). I tried adding a .MacOSX/environment.plist, but that didn't change anything. I don't seem to have the option to launch vim processes in a login shell anymore (it looks like it was removed?).

      My .profile and .bash_profile both source .bashrc, which has a simple line adding $HOME/bin to my path. If I use mvim, my $PATH is loaded correctly, but if I launch MacVim from the dock then I get just the system-supplied path.

      Thanks in advance!

      --
      You received this message from the "vim_mac" 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
    • Peter Palmreuther
      ... I don t know if that s the recommended way , but it should work: In ~/.vimrc insert something like let $PATH=$PATH. :xyz ... Have you logged out and
      Message 2 of 6 , Nov 3, 2011
        On Thursday, November 3, 2011 4:10:09 PM UTC+1, Caleb Eggensperger wrote:
        What is the recommended way to edit the $PATH that MacVim uses for things like equalprg and !commands?

        I don't know if that's the "recommended way", but it should work:
        In '~/.vimrc' insert something like

        let $PATH=$PATH.':xyz'
         
        I've tried everything I could find by searching (short of editing /etc/paths, which isn't an option as I don't have administrator privs on this machine). I tried adding a .MacOSX/environment.plist, but that didn't change anything.

        Have you logged out and back in after modifying .MacOSX/environment.plist? I've set other environment variables using this file and they're as expected within MacVim.
        So I'd assume a changed PATH would be too.

        Regards,

        Peter

        --
        You received this message from the "vim_mac" 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
      • Caleb Eggensperger
        ... I hadn t tried logging out and back in with the environment.plist method, but that would have been an imperfect solution anyway, since I don t see an
        Message 3 of 6 , Nov 3, 2011
          :let works great, thanks!

          I hadn't tried logging out and back in with the environment.plist method, but that would have been an imperfect solution anyway, since I don't see an obvious way to concatenate something onto the end of my path (rather than just replacing it).

          --
          You received this message from the "vim_mac" 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
        • Peter Palmreuther
          ... Good to hear. ... As it s only evaluated on login, this explains why you haven t seen any effect. ... Correct. environment.plist is no scripted or
          Message 4 of 6 , Nov 4, 2011
            On Friday, November 4, 2011 2:30:18 AM UTC+1, Caleb Eggensperger wrote:
            :let works great, thanks!

            Good to hear.
             
            I hadn't tried logging out and back in with the environment.plist method,

            As it's only evaluated on login, this explains why you haven't seen any effect.
             
            but that would have been an imperfect solution anyway, since I don't see an obvious way to concatenate something onto the end of my path (rather than just replacing it).

            Correct. 'environment.plist' is no scripted or dynamic configuration instance. But for setting other environment variables to a fixed value, intended to be valid and present across all user processes it's a pretty good location to keep in mind, because all processes inherit environment defined there, while not all evaluate (directly or indirectly) '.profile' et al.

            --
            You received this message from the "vim_mac" 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
          • Giovanni Lanzani
            Well, the good thing about environment.plist is that is used by many other things, so you don t need to set the PATH for every program you use. Example: I have
            Message 5 of 6 , Nov 4, 2011
              Well, the good thing about environment.plist is that is used by many other things, so you don't need to set the PATH for every program you use.

              Example: I have a python scripts with some libraries in an unusual location. The script is executed by launchd. How can I tell launchd where the libraries are? With a PYTHONPATH key in environment.plist

              Second example: I use a custom script for Marked (http://markedapp.com), and the script uses jekyll which is in /usr/local/bin. How do I tell Marked? With the PATH key in environment.plist

              Third example: I want the github application to use my version of git, instead of the one in /usr/bin. How do I do that? You guessed right, with environment.plist. 

              I mean, it's a precious resource, especially for you, without admin privileges.

              --
              You received this message from the "vim_mac" 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
            • Caleb Eggensperger
              Thanks, Peter and Giovanni. I ll keep that in mind. -- You received this message from the vim_mac maillist. Do not top-post! Type your reply below the text
              Message 6 of 6 , Nov 4, 2011
                Thanks, Peter and Giovanni. I'll keep that in mind.

                --
                You received this message from the "vim_mac" 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
              Your message has been successfully submitted and would be delivered to recipients shortly.