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

Re: Powershell files (.ps1) not being detected correctly

Expand Messages
  • Tony Mechelynck
    ... Check your runtimepath option. It is a comma-separated list of directories (each of which is the root of a tree); it should normally contain the
    Message 1 of 10 , Feb 1, 2009
    • 0 Attachment
      On 02/02/09 00:07, Guillermo wrote:
      >
      > @John Beckett:
      >
      > Thanks, that did the trick.
      >
      > However, there's still one more annoyance... I thought VIM\VIMFILES
      > was the right place to put vim files for all users, but if I download
      > the ps1 files from vim.org and move them to that location as Admin,
      > only the Admin user has access to them.
      >
      > The rest of the users have access to all the files under VIM
      > \VIM72\..., but not to the newly moved ps1 files under VIM\VIMFILES. I
      > can't figure out how to grant access to these files to all users of my
      > computer (Windows XP Home).
      >
      > Right now, my ps1 config files are located in my regular user's $HOME
      > \VIMFILES.
      >
      > Regards,
      >
      > Guillermo

      Check your 'runtimepath' option. It is a comma-separated list of
      directories (each of which is the root of a tree); it should normally
      contain the following values (or their equivalents after substituting
      environment variables):

      $HOME/vimfiles
      full-fledged scripts, private to the current user
      $VIM/vimfiles
      system-wide full-fledged scripts
      $VIMRUNTIME
      scripts distributed together with Vim
      $VIM/vimfiles/after
      small system-wide tweaks to any of the above
      $HOME/vimfiles/after
      small user-specific tweaks to any of the above

      Each of these trees has the same structure; any particular directory or
      subdirectory doesn't need to exist unless you have something to put in it.

      The values of the environment variables are what Vim sets them to at
      startup; they don't need to exist outside Vim. Typical values are
      VIM=C:\Program Files\vim (on Windows) and VIMRUNTIME=$VIM/vim72 (for Vim
      7.2 on any platform). I know my use of / and \ as path separators is not
      very consistent.

      If the above seems OK, then it's probably at the OS level rather than at
      Vim level.
      I don't know how Windows XP can allow or forbid read access to one user
      over files belonging to a different user. (Write access is not necessary
      in this case). Maybe it's in the Windows registry somewhere, but where?
      Your guess is as good as mine.


      Best regards,
      Tony.
      --
      We really don't have any enemies. It's just that some of our best
      friends are trying to kill us.

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Guillermo
      ... Exactly, I get an error saying that I don t have access to the files (as a regular user). ... After logging on as Admin, I ve downloaded three Vim
      Message 2 of 10 , Feb 1, 2009
      • 0 Attachment
        > First issue that occurs to me is that your admin user might have
        > downloaded the files into a directory that assigned permissions that
        > don't allow read to other users. Best way to check that is (as another
        > user) to try to view the file (in Vim or at command prompt or Explorer
        > or anything).

        Exactly, I get an error saying that I don't have access to the files
        (as a regular user).

        > If that doesn't solve it, please be more explicit:
        > - Exactly what are you downloading? (one of the scripts?)
        > - Exactly what is the file and what directory?
        >
        > For example, I suspect you might need the vim/vimfiles/syntax directory,
        > but I don't think you mentioned 'syntax'.

        After logging on as Admin, I've downloaded three Vim customization (?)
        files for Powershell: syntax, indent and ftplugin.

        I've then moved these files from the Desktop to VIM\VIMFILES\(SYNTAX,
        INDENT, FTPLUGIN). VIM\VIMFILES and the mentioned subfolders were
        created during the installation of Vim, I didn't have to create them
        as Admin now.

        As a normal user, I can access (read-only mode) any file under VIM
        \VIM72, but none of the files for Powershell that I've just moved to
        VIM\VIMFILES as Admin. As a result of this, syntax highlighting, etc
        for python works well, for example, but nothing happens for Powershell
        files, even though the filetype is detected correctly (ps1). So I
        guess Vim can't access the files in VIM\VIMFILES that I've put there
        as Admin and fails silently, since the default python files are
        located under VIM\VIM72 and my ps1 files are in VIM\VIMFILES.

        Hope this helps to clarify my problem.

        Guillermo
        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • John Beckett
        ... In Windows, your desktop is part of your profile, and all files have permissions that prevent other general users reading the files. Moving those files to
        Message 3 of 10 , Feb 1, 2009
        • 0 Attachment
          Guillermo wrote:
          > Exactly, I get an error saying that I don't have access to
          > the files (as a regular user).

          In Windows, your desktop is part of your profile, and all files have
          permissions that prevent other general users reading the files. Moving
          those files to some other directory will KEEP the permissions. If you
          had COPIED the files they would have received new permissions (probably
          the simplest would be to do that now; move the files out of the
          directory, then copy them back).

          John


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Guillermo
          That s a nasty gotcha... It worked! Thanks! ... --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use maillist.
          Message 4 of 10 , Feb 3, 2009
          • 0 Attachment
            That's a nasty gotcha... It worked! Thanks!

            On Feb 2, 2:43 am, "John Beckett" <johnb.beck...@...> wrote:
            > Guillermo wrote:
            > > Exactly, I get an error saying that I don't have access to
            > > the files (as a regular user).
            >
            > In Windows, your desktop is part of your profile, and all files have
            > permissions that prevent other general users reading the files. Moving
            > those files to some other directory will KEEP the permissions. If you
            > had COPIED the files they would have received new permissions (probably
            > the simplest would be to do that now; move the files out of the
            > directory, then copy them back).
            >
            > John
            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Guillermo
            ... That s a nasty gotcha. It worked! Thanks! Guillermo --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use
            Message 5 of 10 , Feb 3, 2009
            • 0 Attachment
              > In Windows, your desktop is part of your profile, and all files have
              > permissions that prevent other general users reading the files. Moving
              > those files to some other directory will KEEP the permissions. If you
              > had COPIED the files they would have received new permissions

              That's a nasty gotcha.

              It worked! Thanks!

              Guillermo
              --~--~---------~--~----~------------~-------~--~----~
              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.