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

Re: newbie: set path question

Expand Messages
  • Tony Mechelynck
    ... or ... If you want to resolve wildcards, you need an extra step or two: see :help glob() and possibly :help substitute() . ... Best regards, Tony. --
    Message 1 of 2 , Oct 30, 2007
    • 0 Attachment
      bilinmek istemiyor wrote:
      > Hello,
      >
      > I am trying to write my first vim script which will set search paths
      > according to my development environment. After starting vim I intent to
      > manualy source the script.
      >
      > I have list of paths in a variable s:path_list. I have following code
      > section.
      >
      > 1 for s:path in s:path_list
      > 2 set path+=s:path

      :exe 'set path+=' . s:path

      or

      :let &path .= (&path == '' ? '' : ',') . s:path


      > 3 endfor
      >
      > After sourcing the script, unfortunately set path? shows that path=s:path
      >
      > I have tried
      >
      > &path = &path . "," . s:path instead of line 2 which performed the
      > settings I want except for the paths which have ** or * globing operators.

      If you want to resolve wildcards, you need an extra step or two: see ":help
      glob()" and possibly ":help substitute()".

      >
      > I have paths in s:path_list like "$SOME_ENV/path/to/somewhere/*" or
      > "$SOME_ENV/path/to/somewhere/**" and they have not been expanded when
      > query the path with set path?
      >
      > Any input much appreciated


      Best regards,
      Tony.
      --
      Egotism is the anesthetic given by a kindly nature to relieve the pain
      of being a damned fool.
      -- Bellamy Brooks

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.