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

Vista - Gvim 7.2 - gvim forcing read only _vimrc and not picking changes made in external editor

Expand Messages
  • Edmon
    I am running Gvim 7.2 on Vista. I want to modify startup settings and fonts and for some reason _vimrc is being opened in read only mode, and I cannot get to
    Message 1 of 5 , Mar 6, 2009
      I am running Gvim 7.2 on Vista.

      I want to modify startup settings and fonts and for some reason
      _vimrc
      is being opened in read only mode, and I cannot get to open it other
      way.

      When I make changes to the file from the other editor these changes do
      not
      get recognized by gvim. It looks like Gvim keeps opening as read-only
      some other,
      internal _vimrc file. (maybe some swap file gets created but I cannot
      find it anywhere on Vista).

      Any help is appreciated.

      Thank you,
      Edmon


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Gary Johnson
      ... How are you opening it? What is the full path to the _vimrc you are opening? ... What other editor? There are a number of places gvim looks for _vimrc.
      Message 2 of 5 , Mar 6, 2009
        On 2009-03-06, Edmon wrote:
        > I am running Gvim 7.2 on Vista.
        >
        > I want to modify startup settings and fonts and for some reason
        > _vimrc is being opened in read only mode, and I cannot get to open
        > it other way.

        How are you opening it? What is the full path to the _vimrc you are
        opening?

        > When I make changes to the file from the other editor these
        > changes do not get recognized by gvim.

        What other editor?

        There are a number of places gvim looks for _vimrc. See

        :help _vimrc

        To see which _vimrc gvim actually read when it started, execute
        this:

        :echo $MYVIMRC

        > It looks like Gvim keeps opening as read-only some other, internal
        > _vimrc file. (maybe some swap file gets created but I cannot find
        > it anywhere on Vista).

        The above should help you determine whether you're editing the
        same _vimrc that gvim is reading. Are you saving the _vimrc after
        you edit it? Even if gvim opened it read-only, you should be able
        to save the file using, for example,

        :w!

        Swap files should have nothing to do with this issue.

        Also, this question is not a development question, it is a usage
        question and should be discussed on the vim_use list, so I'm cc'ing
        that list.

        HTH,
        Gary



        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • John Beckett
        ... I do not want to understand Vista, but on XP a user does not have write permission to files under the Program Files directory. If you install from some
        Message 3 of 5 , Mar 6, 2009
          Edmon wrote:
          > I am running Gvim 7.2 on Vista.
          >
          > I want to modify startup settings and fonts and for some
          > reason _vimrc is being opened in read only mode, and I cannot
          > get to open it other way.

          I do not want to understand Vista, but on XP a user does not have write
          permission to files under the "Program Files" directory. If you install
          from some package (such as "Vim without Cream") you will probably end up
          with your files under Program Files.

          I run as a user (not in Administrators or Power Users groups), and put
          all my tools (and Vim) under a bin directory where I do have write
          permission.

          This tip has a little info on where you might put vimrc:
          http://vim.wikia.com/wiki/Vimrc

          John


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Tony Mechelynck
          ... Even when installing from Vim without Cream , the normal place for a vimrc is what Vim regards as $HOME, and that is normally not under Program Files
          Message 4 of 5 , Mar 6, 2009
            On 06/03/09 23:26, John Beckett wrote:
            > Edmon wrote:
            >> I am running Gvim 7.2 on Vista.
            >>
            >> I want to modify startup settings and fonts and for some
            >> reason _vimrc is being opened in read only mode, and I cannot
            >> get to open it other way.
            >
            > I do not want to understand Vista, but on XP a user does not have write
            > permission to files under the "Program Files" directory. If you install
            > from some package (such as "Vim without Cream") you will probably end up
            > with your files under Program Files.
            >
            > I run as a user (not in Administrators or Power Users groups), and put
            > all my tools (and Vim) under a bin directory where I do have write
            > permission.
            >
            > This tip has a little info on where you might put vimrc:
            > http://vim.wikia.com/wiki/Vimrc
            >
            > John

            Even when installing from "Vim without Cream", the normal place for a
            vimrc is what Vim regards as $HOME, and that is normally not under
            "Program Files" but under that particular user's personal directory -- see

            :echo $HOME

            when running Vim.

            However, if Vim finds no $HOME/_vimrc and no $HOME/.vimrc, on Windows it
            will also look for $VIM/_vimrc, and that indeed ussssssually means
            C:\Program Files\Vim\_vimrc. If that's where your _vimrc is now, try the
            following:

            :view $VIM/_vimrc
            :saveas $HOME/_vimrc

            The file should not be readonly anymore, and you ought to be able to
            edit it normally using Vim, or any other editor for that matter. Also, a
            _vimrc in $HOME will be preferred to one in $VIM so you don't need to
            delete that other version (which would require administrator's
            privileges, and on Vista, IIUC, even an administrator's account does
            _not_ have those privileges until or unless you explicitly ask for
            them), unless that $VIM/_vimrc shouldn't be available to all users.

            Note that regardless of whether or not a $HOME/_vimrc is present, Vim
            looks first for a $VIM/vimrc (with no underscxore or dot prepended) and
            sources it if found. (This is called a "system vimrc".) Only then does
            it look for $HOME/_vimrc, sources it if found, and looks for it at other
            places if not found.


            Best regards,
            Tony.
            --
            ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
            KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO
            DOESN'T
            HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
            LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A
            SHRUBBER),
            BROTHER MAYNARD
            "Monty Python and the Holy Grail" PYTHON (MONTY)
            PICTURES LTD

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Mark Petryk
            Thank you! Gentlemen! -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For
            Message 5 of 5 , Feb 27, 2013
              Thank you! Gentlemen!

              --
              --
              You received this message from the "vim_dev" 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

              ---
              You received this message because you are subscribed to the Google Groups "vim_dev" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            Your message has been successfully submitted and would be delivered to recipients shortly.