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

VISTA issues

Expand Messages
  • Jonathan Patrick
    Hi, I am trying to write some AMPL code using VIM as the text editor. The file extension for AMPL is .mod which somehow seems to be causing problems. When I
    Message 1 of 9 , Sep 4, 2008
    • 0 Attachment
      Hi,

      I am trying to write some AMPL code using VIM as the text editor. The
      file extension for AMPL is .mod which somehow seems to be causing
      problems. When I try to save it in VIM it initially tells me it is
      read only but that I can try to write it anyway. That works the first
      couple of times but after that it stops being able to save. Then it
      won't even let me delete the file saying I don't have access. When I
      re-start the computer though the file is gone. Any advice would be
      appreciated!

      Jonathan

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Benjamin Fritz
      On Thu, Sep 4, 2008 at 8:06 AM, Jonathan Patrick ... This sounds like an issue with your system setup, not with Vim itself. I am fairly (but not 100%) sure
      Message 2 of 9 , Sep 4, 2008
      • 0 Attachment
        On Thu, Sep 4, 2008 at 8:06 AM, Jonathan Patrick
        <patrick@...> wrote:
        >
        > Hi,
        >
        > I am trying to write some AMPL code using VIM as the text editor. The
        > file extension for AMPL is .mod which somehow seems to be causing
        > problems. When I try to save it in VIM it initially tells me it is
        > read only but that I can try to write it anyway. That works the first
        > couple of times but after that it stops being able to save. Then it
        > won't even let me delete the file saying I don't have access. When I
        > re-start the computer though the file is gone. Any advice would be
        > appreciated!
        >
        > Jonathan
        >

        This sounds like an issue with your system setup, not with Vim itself.
        I am fairly (but not 100%) sure that Vim will not set readonly, etc.
        based on file extension. I am certain that Vim has no control over
        whether or not a file is actually writeable, and Vim will not randomly
        delete a file that you are editing. Vim also has no control over your
        access privileges for a given file. What system are you using? Where
        are you trying to create this file? Do you have proper access rights
        to that location?

        BTW, Vim detects a new .mod file for me as a "modsim3" file type,
        whatever that is. What filetype does it detect for you?

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Patrick, Jonathan
        When I click on the folder where the file is located is does have the read only box checked but when I change and then double check the folder, it has
        Message 3 of 9 , Sep 4, 2008
        • 0 Attachment
          When I click on the folder where the file is located is does have the
          "read only" box checked but when I change and then double check the
          folder, it has reverted to "read only". I did not think this was the
          problem though since .run and .dat files work fine. It is only the .mod
          files that are causing problems. When I go to the actual file and right
          click on it, the "read only" box is not checked. I have no idea how to
          tell what VIM detects the mod file as....

          Jonathan

          -----Original Message-----
          From: vim_use@... [mailto:vim_use@...] On
          Behalf Of Benjamin Fritz
          Sent: Thursday, September 04, 2008 10:09 AM
          To: vim_use@...
          Subject: Re: VISTA issues


          On Thu, Sep 4, 2008 at 8:06 AM, Jonathan Patrick
          <patrick@...> wrote:
          >
          > Hi,
          >
          > I am trying to write some AMPL code using VIM as the text editor. The
          > file extension for AMPL is .mod which somehow seems to be causing
          > problems. When I try to save it in VIM it initially tells me it is
          > read only but that I can try to write it anyway. That works the first
          > couple of times but after that it stops being able to save. Then it
          > won't even let me delete the file saying I don't have access. When I
          > re-start the computer though the file is gone. Any advice would be
          > appreciated!
          >
          > Jonathan
          >

          This sounds like an issue with your system setup, not with Vim itself.
          I am fairly (but not 100%) sure that Vim will not set readonly, etc.
          based on file extension. I am certain that Vim has no control over
          whether or not a file is actually writeable, and Vim will not randomly
          delete a file that you are editing. Vim also has no control over your
          access privileges for a given file. What system are you using? Where
          are you trying to create this file? Do you have proper access rights
          to that location?

          BTW, Vim detects a new .mod file for me as a "modsim3" file type,
          whatever that is. What filetype does it detect for you?



          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Charles Campbell
          ... [snip] To check if the file is read-only from vim s viewpoint: :echo &ro If the directory is read-only, vim is unlikely to be able to override it and
          Message 4 of 9 , Sep 4, 2008
          • 0 Attachment
            Patrick, Jonathan wrote:
            > When I click on the folder where the file is located is does have the
            > "read only" box checked but when I change and then double check the
            > folder, it has reverted to "read only". I did not think this was the
            > problem though since .run and .dat files work fine. It is only the .mod
            > files that are causing problems. When I go to the actual file and right
            > click on it, the "read only" box is not checked. I have no idea how to
            > tell what VIM detects the mod file as....
            >
            [snip]

            To check if the file is read-only from vim's viewpoint: :echo &ro
            If the directory is read-only, vim is unlikely to be able to override it
            and write the file out.
            To determine what fileytpe vim detects the file as: :echo &ft

            Regards,
            Chip Campbell


            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Patrick, Jonathan
            Where do I type those commands? Excuse my ignorance by am only beginning to use VIM. ... From: vim_use@googlegroups.com [mailto:vim_use@googlegroups.com] On
            Message 5 of 9 , Sep 4, 2008
            • 0 Attachment
              Where do I type those commands? Excuse my ignorance by am only
              beginning to use VIM.

              -----Original Message-----
              From: vim_use@... [mailto:vim_use@...] On
              Behalf Of Charles Campbell
              Sent: Thursday, September 04, 2008 10:38 AM
              To: vim_use@...
              Subject: Re: VISTA issues


              Patrick, Jonathan wrote:
              > When I click on the folder where the file is located is does have the
              > "read only" box checked but when I change and then double check the
              > folder, it has reverted to "read only". I did not think this was the
              > problem though since .run and .dat files work fine. It is only the
              .mod
              > files that are causing problems. When I go to the actual file and
              right
              > click on it, the "read only" box is not checked. I have no idea how
              to
              > tell what VIM detects the mod file as....
              >
              [snip]

              To check if the file is read-only from vim's viewpoint: :echo &ro
              If the directory is read-only, vim is unlikely to be able to override it

              and write the file out.
              To determine what fileytpe vim detects the file as: :echo &ft

              Regards,
              Chip Campbell




              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Charles Campbell
              ... vim somefile (or however you fire up vim/gvim to apply it to somefile) ... Regards, Chip Campbell
              Message 6 of 9 , Sep 4, 2008
              • 0 Attachment
                Patrick, Jonathan wrote:
                > Where do I type those commands? Excuse my ignorance by am only
                > beginning to use VIM.
                >
                > -----Original Message-----
                > From: vim_use@... [mailto:vim_use@...] On
                > Behalf Of Charles Campbell
                > Sent: Thursday, September 04, 2008 10:38 AM
                > To: vim_use@...
                > Subject: Re: VISTA issues
                >
                >
                > Patrick, Jonathan wrote:
                >
                >> When I click on the folder where the file is located is does have the
                >> "read only" box checked but when I change and then double check the
                >> folder, it has reverted to "read only". I did not think this was the
                >> problem though since .run and .dat files work fine. It is only the
                >>
                > .mod
                >
                >> files that are causing problems. When I go to the actual file and
                >>
                > right
                >
                >> click on it, the "read only" box is not checked. I have no idea how
                >>
                > to
                >
                >> tell what VIM detects the mod file as....
                >>
                >>
                > [snip]
                >
                > To check if the file is read-only from vim's viewpoint: :echo &ro
                > If the directory is read-only, vim is unlikely to be able to override it
                >
                > and write the file out.
                > To determine what fileytpe vim detects the file as: :echo &ft
                >
                vim somefile (or however you fire up vim/gvim to apply it to
                somefile)
                :echo &ro
                :echo &ft
                :q

                Regards,
                Chip Campbell


                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_use" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Benjamin Fritz
                On Thu, Sep 4, 2008 at 9:47 AM, Patrick, Jonathan ... No problem! We all start somewhere. If you are using Vim in it s usual form (i.e., not the Cream
                Message 7 of 9 , Sep 4, 2008
                • 0 Attachment
                  On Thu, Sep 4, 2008 at 9:47 AM, Patrick, Jonathan
                  <Patrick@...> wrote:
                  >
                  > Where do I type those commands? Excuse my ignorance by am only
                  > beginning to use VIM.
                  >

                  No problem! We all start somewhere.

                  If you are using Vim in it's usual form (i.e., not the "Cream"
                  installation, and not in "Easy mode"), then you have several modes:

                  1. Normal mode. This is the mode that you are in when you start Vim.
                  Most keys "do" something rather than insert text. j,k,h, and l move
                  the cursor, i inserts text, x deletes text, etc.
                  2. Insert mode. You enter this mode by pressing i, I, a, A, o, O, c,
                  s, and possibly other commands in normal or visual mode. This allows
                  you to insert new text.
                  3. Replace mode. Similar to insert mode, but you over-write any
                  characters that already exist as you type. You enter this mode by
                  pressing r or R in normal or visual mode.
                  4. Visual mode. This mode allows you to select text to act upon. Enter
                  this mode by pressing v, V, or CTRL-V (CTRL-Q on a default Windows
                  install).
                  5. Command (or "ex") mode. This allows you to enter more advanced
                  commands that tell Vim to do things like search and replace, assign or
                  view variable or option values, etc. You enter this mode by pressing :
                  (colon) in normal or visual mode.
                  6. Search mode. This mode searches the buffer for matches to a regular
                  expressing. Enter this mode from normal mode by pressing / to search
                  forward, or ? to search back.

                  There's a lot more to it, but that gives you the basics.

                  So, in answer to you question:

                  Commands like :echo &ro are entered in command mode. So type,
                  <colon><space><ampersand>ro<enter> and you will see the value that the
                  "readonly" option is currently set to.

                  On this list, ex commands (i.e. commands that you must enter in
                  command mode) are usually given with a preceding :, for example you
                  will often see something like:

                  :help 'readonly'

                  To tell you to enter the text in command mode.

                  Have you completed the tutorial that ships with Vim? I highly
                  recommend it if you are just getting started.

                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_use" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • John Beckett
                  ... I put vista mod files (no quotes) into Google and found a bunch of problem reports. I didn t look at any of them. Apparently Vista has some clever
                  Message 8 of 9 , Sep 4, 2008
                  • 0 Attachment
                    Jonathan Patrick wrote:
                    > I am trying to write some AMPL code using VIM as the text
                    > editor. The file extension for AMPL is .mod which somehow
                    > seems to be causing problems.

                    I put "vista mod files" (no quotes) into Google and found a bunch of problem
                    reports. I didn't look at any of them.

                    Apparently Vista has some clever mechanism to allow an application to THINK it has
                    written a file to a certain directory, while the file in fact has been put in some
                    other place. That has something to do with compatibility, allowing current apps to
                    continue working despite their writing to places that they shouldn't (e.g. users
                    shouldn't be able to write to the directory holding applications that other users
                    can access). You might try to find someone who understands this, because your files
                    might not really have disappeared.

                    There is a very confused tip on Vista (please be very careful about following any
                    advice in this tip; we've only kept it in the hope that someone who understands the
                    issues will fix it). I don't think you'll find anything useful here, but you may as
                    well look:
                    http://vim.wikia.com/wiki/Vim_On_Vista

                    John


                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_use" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • Tony Mechelynck
                    ... I see: filetype=modsim3 Last set by /usr/local/share/vim/vim72/filetype.vim where the path up to and including /vim72 is my $VIMRUNTIME directory. You
                    Message 9 of 9 , Sep 5, 2008
                    • 0 Attachment
                      On 04/09/08 16:29, Patrick, Jonathan wrote:
                      > When I click on the folder where the file is located is does have the
                      > "read only" box checked but when I change and then double check the
                      > folder, it has reverted to "read only". I did not think this was the
                      > problem though since .run and .dat files work fine. It is only the .mod
                      > files that are causing problems. When I go to the actual file and right
                      > click on it, the "read only" box is not checked. I have no idea how to
                      > tell what VIM detects the mod file as....
                      >
                      > Jonathan

                      :e foobar.mod
                      :verbose setlocal filetype?

                      I see:
                      filetype=modsim3
                      Last set by /usr/local/share/vim/vim72/filetype.vim

                      where the path up to and including /vim72 is my $VIMRUNTIME directory.

                      You could also use
                      attrib foobar.mod
                      in cmd.exe, or
                      :!attrib foobar.mod
                      in Vim (replacing the filename by some existing filename in either case)
                      to see the file attributes, typically RHSA for read-only, hidden, system
                      and/or archive (if set), replaced by dashes if unset. IIRC, you can
                      display the same attributes in a directory listing by using dir /A:
                      (slash, A-for-Alfa, colon, and nothing [space or end-of-line] after the
                      colon).

                      To make the file ordinary and writable, use

                      attrib -R -H -S foobar.mod

                      (or prefixed by :! if invoked from Vim). Similarly with + instead of -
                      to set the same flags rather than clear them. You may need to have write
                      permissions on the directory to change a file's attributes.

                      Caution: I learnt this command on Dos for FAT filesystems; it may or may
                      not apply on NTFS (ISTR that it did work on my NTFS partition when I was
                      on XP).


                      Best regards,
                      Tony.
                      --
                      "Has anyone had problems with the computer accounts?"
                      "Yes, I don't have one."
                      "Okay, you can send mail to one of the tutors ..."
                      -- E. D'Azevedo, Computer Science 372

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