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

about vimrc vim7.2a

Expand Messages
  • momodi
    hi my OS is ubuntu8.04 I installed vim7.2a but when I open gvim and select Startup Setting. gvim open a new MYVIMRC file to me. why? when I use vim7.1 gvim
    Message 1 of 8 , Jun 29, 2008
    • 0 Attachment
      hi
      my OS is ubuntu8.04
      I installed vim7.2a
      but when I open gvim and select Startup Setting.
      gvim open a new MYVIMRC file to me.
      why?

      when I use vim7.1 gvim will open my .vimrc file to me, which at
      ~/.vimrc


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tony Mechelynck
      ... $MYVIMRC points to the vimrc Vim used in this session, but for some reason that menu entry doesn t resolve the environment variable. Use instead ... Best
      Message 2 of 8 , Jun 29, 2008
      • 0 Attachment
        On 30/06/08 07:01, momodi wrote:
        > hi
        > my OS is ubuntu8.04
        > I installed vim7.2a
        > but when I open gvim and select Startup Setting.
        > gvim open a new MYVIMRC file to me.
        > why?
        >
        > when I use vim7.1 gvim will open my .vimrc file to me, which at
        > ~/.vimrc

        $MYVIMRC points to the vimrc Vim used in this session, but for some
        reason that menu entry doesn't resolve the environment variable.

        Use instead

        :new ~/.vimrc


        Best regards,
        Tony.
        --
        There's no future in time travel

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Ben Schmidt
        ... This is a bug recently introduced with all the security fixes. I sent Bram a patch about a fortnight ago, but he evidently hasn t accepted it or made a
        Message 3 of 8 , Jun 30, 2008
        • 0 Attachment
          Tony Mechelynck wrote:
          > On 30/06/08 07:01, momodi wrote:
          >> hi
          >> my OS is ubuntu8.04
          >> I installed vim7.2a
          >> but when I open gvim and select Startup Setting.
          >> gvim open a new MYVIMRC file to me.
          >> why?
          >>
          >> when I use vim7.1 gvim will open my .vimrc file to me, which at
          >> ~/.vimrc
          >
          > $MYVIMRC points to the vimrc Vim used in this session, but for some
          > reason that menu entry doesn't resolve the environment variable.

          This is a bug recently introduced with all the security fixes. I sent
          Bram a patch about a fortnight ago, but he evidently hasn't accepted it
          or made a similar modification yet. Here's the patch again:

          diff -r 503e0d426e7a runtime/menu.vim
          --- a/runtime/menu.vim Mon Jun 16 00:45:14 2008 +1000
          +++ b/runtime/menu.vim Tue Jun 17 00:23:57 2008 +1000
          @@ -187,17 +187,17 @@

          fun! s:EditVimrc()
          if $MYVIMRC != ''
          - let fname = "$MYVIMRC"
          + let fname = expand("$MYVIMRC")
          elseif has("win32") || has("dos32") || has("dos16") || has("os2")
          if $HOME != ''
          - let fname = "$HOME/_vimrc"
          + let fname = expand("$HOME")."/_vimrc"
          else
          - let fname = "$VIM/_vimrc"
          + let fname = expand("$VIM")."/_vimrc"
          endif
          elseif has("amiga")
          let fname = "s:.vimrc"
          else
          - let fname = "$HOME/.vimrc"
          + let fname = expand("$HOME")."/.vimrc"
          endif
          let fname = s:FnameEscape(fname)
          if &mod

          Hope this helps,

          Ben.



          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Bram Moolenaar
          ... I don t recall seeing this patch. I think it can be done simpler without the expand() calls, since environment variables are recogized? fun! s:EditVimrc()
          Message 4 of 8 , Jun 30, 2008
          • 0 Attachment
            Ben Schmidt wrote:

            > Tony Mechelynck wrote:
            > > On 30/06/08 07:01, momodi wrote:
            > >> hi
            > >> my OS is ubuntu8.04
            > >> I installed vim7.2a
            > >> but when I open gvim and select Startup Setting.
            > >> gvim open a new MYVIMRC file to me.
            > >> why?
            > >>
            > >> when I use vim7.1 gvim will open my .vimrc file to me, which at
            > >> ~/.vimrc
            > >
            > > $MYVIMRC points to the vimrc Vim used in this session, but for some
            > > reason that menu entry doesn't resolve the environment variable.
            >
            > This is a bug recently introduced with all the security fixes. I sent
            > Bram a patch about a fortnight ago, but he evidently hasn't accepted it
            > or made a similar modification yet. Here's the patch again:
            >
            > diff -r 503e0d426e7a runtime/menu.vim
            > --- a/runtime/menu.vim Mon Jun 16 00:45:14 2008 +1000
            > +++ b/runtime/menu.vim Tue Jun 17 00:23:57 2008 +1000
            > @@ -187,17 +187,17 @@
            >
            > fun! s:EditVimrc()
            > if $MYVIMRC != ''
            > - let fname = "$MYVIMRC"
            > + let fname = expand("$MYVIMRC")
            > elseif has("win32") || has("dos32") || has("dos16") || has("os2")
            > if $HOME != ''
            > - let fname = "$HOME/_vimrc"
            > + let fname = expand("$HOME")."/_vimrc"
            > else
            > - let fname = "$VIM/_vimrc"
            > + let fname = expand("$VIM")."/_vimrc"
            > endif
            > elseif has("amiga")
            > let fname = "s:.vimrc"
            > else
            > - let fname = "$HOME/.vimrc"
            > + let fname = expand("$HOME")."/.vimrc"
            > endif
            > let fname = s:FnameEscape(fname)
            > if &mod
            >
            > Hope this helps,

            I don't recall seeing this patch. I think it can be done simpler
            without the expand() calls, since environment variables are recogized?

            fun! s:EditVimrc()
            if $MYVIMRC != ''
            let fname = $MYVIMRC
            elseif has("win32") || has("dos32") || has("dos16") || has("os2")
            if $HOME != ''
            let fname = $HOME . "/_vimrc"
            else
            let fname = $VIM . "/_vimrc"
            endif
            elseif has("amiga")
            let fname = "s:.vimrc"
            else
            let fname = $HOME . "/.vimrc"
            endif
            let fname = s:FnameEscape(fname)
            if &mod
            exe "split " . fname
            else
            exe "edit " . fname
            endif
            endfun


            --
            I have a watch cat! Just break in and she'll watch.

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ download, build and distribute -- http://www.A-A-P.org ///
            \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Ben Schmidt
            ... Mmm. I thought it was odd that I hadn t heard from you. I wonder where it went! ... No, that has the exact effect of undoing the patch! The problem is
            Message 5 of 8 , Jun 30, 2008
            • 0 Attachment
              Bram Moolenaar wrote:
              > Ben Schmidt wrote:
              >
              >> Tony Mechelynck wrote:
              >>> On 30/06/08 07:01, momodi wrote:
              >>>> hi
              >>>> my OS is ubuntu8.04
              >>>> I installed vim7.2a
              >>>> but when I open gvim and select Startup Setting.
              >>>> gvim open a new MYVIMRC file to me.
              >>>> why?
              >>>>
              >>>> when I use vim7.1 gvim will open my .vimrc file to me, which at
              >>>> ~/.vimrc
              >>> $MYVIMRC points to the vimrc Vim used in this session, but for some
              >>> reason that menu entry doesn't resolve the environment variable.
              >> This is a bug recently introduced with all the security fixes. I sent
              >> Bram a patch about a fortnight ago, but he evidently hasn't accepted it
              >> or made a similar modification yet. Here's the patch again:
              >>
              >> diff -r 503e0d426e7a runtime/menu.vim
              >> --- a/runtime/menu.vim Mon Jun 16 00:45:14 2008 +1000
              >> +++ b/runtime/menu.vim Tue Jun 17 00:23:57 2008 +1000
              >> @@ -187,17 +187,17 @@
              >>
              >> fun! s:EditVimrc()
              >> if $MYVIMRC != ''
              >> - let fname = "$MYVIMRC"
              >> + let fname = expand("$MYVIMRC")
              >> elseif has("win32") || has("dos32") || has("dos16") || has("os2")
              >> if $HOME != ''
              >> - let fname = "$HOME/_vimrc"
              >> + let fname = expand("$HOME")."/_vimrc"
              >> else
              >> - let fname = "$VIM/_vimrc"
              >> + let fname = expand("$VIM")."/_vimrc"
              >> endif
              >> elseif has("amiga")
              >> let fname = "s:.vimrc"
              >> else
              >> - let fname = "$HOME/.vimrc"
              >> + let fname = expand("$HOME")."/.vimrc"
              >> endif
              >> let fname = s:FnameEscape(fname)
              >> if &mod
              >>
              >> Hope this helps,
              >
              > I don't recall seeing this patch.

              Mmm. I thought it was odd that I hadn't heard from you. I wonder where
              it went!

              > I think it can be done simpler
              > without the expand() calls, since environment variables are recogized?

              No, that has the exact effect of undoing the patch! The problem is
              precisely that environment variables are not recognised because
              FnameEscape escapes the dollar signs. Perhaps the correct solution is
              just to remove the call to FnameEscape, though? I suppose if you know
              the environment variables are valid/trust them, and obviously the text
              "_vimrc" etc. is valid, the call is superfluous anyway.

              Ben.



              > fun! s:EditVimrc()
              > if $MYVIMRC != ''
              > let fname = $MYVIMRC
              > elseif has("win32") || has("dos32") || has("dos16") || has("os2")
              > if $HOME != ''
              > let fname = $HOME . "/_vimrc"
              > else
              > let fname = $VIM . "/_vimrc"
              > endif
              > elseif has("amiga")
              > let fname = "s:.vimrc"
              > else
              > let fname = $HOME . "/.vimrc"
              > endif
              > let fname = s:FnameEscape(fname)
              > if &mod
              > exe "split " . fname
              > else
              > exe "edit " . fname
              > endif
              > endfun
              >

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Tony Mechelynck
              ... On the contrary, the way Bram wrote it below the environment variables are resolved before passing their _values_ to FnameEscape() let fname = $HOME .
              Message 6 of 8 , Jun 30, 2008
              • 0 Attachment
                On 01/07/08 02:39, Ben Schmidt wrote:
                > Bram Moolenaar wrote:
                >> Ben Schmidt wrote:
                >>
                >>> Tony Mechelynck wrote:
                >>>> On 30/06/08 07:01, momodi wrote:
                >>>>> hi
                >>>>> my OS is ubuntu8.04
                >>>>> I installed vim7.2a
                >>>>> but when I open gvim and select Startup Setting.
                >>>>> gvim open a new MYVIMRC file to me.
                >>>>> why?
                >>>>>
                >>>>> when I use vim7.1 gvim will open my .vimrc file to me, which at
                >>>>> ~/.vimrc
                >>>> $MYVIMRC points to the vimrc Vim used in this session, but for some
                >>>> reason that menu entry doesn't resolve the environment variable.
                >>> This is a bug recently introduced with all the security fixes. I sent
                >>> Bram a patch about a fortnight ago, but he evidently hasn't accepted it
                >>> or made a similar modification yet. Here's the patch again:
                >>>
                >>> diff -r 503e0d426e7a runtime/menu.vim
                >>> --- a/runtime/menu.vim Mon Jun 16 00:45:14 2008 +1000
                >>> +++ b/runtime/menu.vim Tue Jun 17 00:23:57 2008 +1000
                >>> @@ -187,17 +187,17 @@
                >>>
                >>> fun! s:EditVimrc()
                >>> if $MYVIMRC != ''
                >>> - let fname = "$MYVIMRC"
                >>> + let fname = expand("$MYVIMRC")
                >>> elseif has("win32") || has("dos32") || has("dos16") || has("os2")
                >>> if $HOME != ''
                >>> - let fname = "$HOME/_vimrc"
                >>> + let fname = expand("$HOME")."/_vimrc"
                >>> else
                >>> - let fname = "$VIM/_vimrc"
                >>> + let fname = expand("$VIM")."/_vimrc"
                >>> endif
                >>> elseif has("amiga")
                >>> let fname = "s:.vimrc"
                >>> else
                >>> - let fname = "$HOME/.vimrc"
                >>> + let fname = expand("$HOME")."/.vimrc"
                >>> endif
                >>> let fname = s:FnameEscape(fname)
                >>> if&mod
                >>>
                >>> Hope this helps,
                >> I don't recall seeing this patch.
                >
                > Mmm. I thought it was odd that I hadn't heard from you. I wonder where
                > it went!
                >
                >> I think it can be done simpler
                >> without the expand() calls, since environment variables are recogized?
                >
                > No, that has the exact effect of undoing the patch! The problem is
                > precisely that environment variables are not recognised because
                > FnameEscape escapes the dollar signs. Perhaps the correct solution is
                > just to remove the call to FnameEscape, though? I suppose if you know
                > the environment variables are valid/trust them, and obviously the text
                > "_vimrc" etc. is valid, the call is superfluous anyway.
                >
                > Ben.

                On the contrary, the way Bram wrote it below the environment variables
                are resolved before passing their _values_ to FnameEscape()

                let fname = $HOME . "/_vimrc"

                Notice that $HOME is not quoted: it is a variable, and its _value_ is
                concatenated with "/_vimrc". Then, later, the result is passed to
                FnameEscape().

                >
                >
                >
                >> fun! s:EditVimrc()
                >> if $MYVIMRC != ''
                >> let fname = $MYVIMRC
                >> elseif has("win32") || has("dos32") || has("dos16") || has("os2")
                >> if $HOME != ''
                >> let fname = $HOME . "/_vimrc"
                >> else
                >> let fname = $VIM . "/_vimrc"
                >> endif
                >> elseif has("amiga")
                >> let fname = "s:.vimrc"
                >> else
                >> let fname = $HOME . "/.vimrc"
                >> endif
                >> let fname = s:FnameEscape(fname)
                >> if&mod
                >> exe "split " . fname
                >> else
                >> exe "edit " . fname
                >> endif
                >> endfun
                >>

                Best regards,
                Tony.
                --
                It's is not, it isn't ain't, and it's it's, not its, if you mean it
                is. If you don't, it's its. Then too, it's hers. It isn't her's. It
                isn't our's either. It's ours, and likewise yours and theirs.
                -- Oxford University Press, Edpress News

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_use" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Ben Schmidt
                ... Thanks for pointing that out, Tony. I didn t look carefully enough. Yes, that does look good, Bram. Ben.
                Message 7 of 8 , Jul 1, 2008
                • 0 Attachment
                  Tony Mechelynck wrote:
                  > On 01/07/08 02:39, Ben Schmidt wrote:
                  >> Bram Moolenaar wrote:
                  >>> Ben Schmidt wrote:
                  >>>
                  >>>> Tony Mechelynck wrote:
                  >>>>> On 30/06/08 07:01, momodi wrote:
                  >>>>>> hi
                  >>>>>> my OS is ubuntu8.04
                  >>>>>> I installed vim7.2a
                  >>>>>> but when I open gvim and select Startup Setting.
                  >>>>>> gvim open a new MYVIMRC file to me.
                  >>>>>> why?
                  >>>>>>
                  >>>>>> when I use vim7.1 gvim will open my .vimrc file to me, which at
                  >>>>>> ~/.vimrc
                  >>>>> $MYVIMRC points to the vimrc Vim used in this session, but for some
                  >>>>> reason that menu entry doesn't resolve the environment variable.
                  >>>> This is a bug recently introduced with all the security fixes. I sent
                  >>>> Bram a patch about a fortnight ago, but he evidently hasn't accepted it
                  >>>> or made a similar modification yet. Here's the patch again:
                  >>>>
                  >>>> diff -r 503e0d426e7a runtime/menu.vim
                  >>>> --- a/runtime/menu.vim Mon Jun 16 00:45:14 2008 +1000
                  >>>> +++ b/runtime/menu.vim Tue Jun 17 00:23:57 2008 +1000
                  >>>> @@ -187,17 +187,17 @@
                  >>>>
                  >>>> fun! s:EditVimrc()
                  >>>> if $MYVIMRC != ''
                  >>>> - let fname = "$MYVIMRC"
                  >>>> + let fname = expand("$MYVIMRC")
                  >>>> elseif has("win32") || has("dos32") || has("dos16") || has("os2")
                  >>>> if $HOME != ''
                  >>>> - let fname = "$HOME/_vimrc"
                  >>>> + let fname = expand("$HOME")."/_vimrc"
                  >>>> else
                  >>>> - let fname = "$VIM/_vimrc"
                  >>>> + let fname = expand("$VIM")."/_vimrc"
                  >>>> endif
                  >>>> elseif has("amiga")
                  >>>> let fname = "s:.vimrc"
                  >>>> else
                  >>>> - let fname = "$HOME/.vimrc"
                  >>>> + let fname = expand("$HOME")."/.vimrc"
                  >>>> endif
                  >>>> let fname = s:FnameEscape(fname)
                  >>>> if&mod
                  >>>>
                  >>>> Hope this helps,
                  >>> I don't recall seeing this patch.
                  >> Mmm. I thought it was odd that I hadn't heard from you. I wonder where
                  >> it went!
                  >>
                  >>> I think it can be done simpler
                  >>> without the expand() calls, since environment variables are recogized?
                  >> No, that has the exact effect of undoing the patch! The problem is
                  >> precisely that environment variables are not recognised because
                  >> FnameEscape escapes the dollar signs. Perhaps the correct solution is
                  >> just to remove the call to FnameEscape, though? I suppose if you know
                  >> the environment variables are valid/trust them, and obviously the text
                  >> "_vimrc" etc. is valid, the call is superfluous anyway.
                  >>
                  >> Ben.
                  >
                  > On the contrary, the way Bram wrote it below the environment variables
                  > are resolved before passing their _values_ to FnameEscape()
                  >
                  > let fname = $HOME . "/_vimrc"
                  >
                  > Notice that $HOME is not quoted: it is a variable, and its _value_ is
                  > concatenated with "/_vimrc". Then, later, the result is passed to
                  > FnameEscape().

                  Thanks for pointing that out, Tony. I didn't look carefully enough.

                  Yes, that does look good, Bram.

                  Ben.



                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_use" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • Roland Puntaier
                  Hi, I just tried mt atop a directory mf atop a file and then mm should nt that move the file into the directory. It didn t on my VIM 7.1 on Windows. any Idea?
                  Message 8 of 8 , Jul 1, 2008
                  • 0 Attachment
                    Hi,

                    I just tried
                    mt atop a directory
                    mf atop a file
                    and then mm

                    should'nt that move the file into the directory.

                    It didn't on my VIM 7.1 on Windows.

                    any Idea?

                    Roland



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