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

Re: Wrong behavior in startup : vimrc vs runtime

Expand Messages
  • Ron Aaron
    Of course; but it is still a vimrc that starts first, not some arbitrary and unexpected script. On Apr 8, 1:51 am, Tony Mechelynck
    Message 1 of 9 , Apr 7, 2009
    • 0 Attachment
      Of course; but it is still a 'vimrc' that starts first, not some
      arbitrary and unexpected script.

      On Apr 8, 1:51 am, Tony Mechelynck <antoine.mechely...@...>
      wrote:
      > On 07/04/09 18:31, Ron Aaron wrote:
      >
      > > Right, I was thinking that may be what I had to do.  AFAIK, the
      > > behavior of macmap.vim is unique across vim platforms.
      >
      > [...]
      >
      > Actually, the user [._]vimrc is not guaranteed to be the first script
      > sourced, even on non-mac platforms. Check the output of ":version" for a
      > "system vimrc". If defined, you can create it (create it with zero
      > length for now) to see whether it is sourced before or after the
      > macmap.vim. (It is sourced before the user's vimrc.)
      >
      > Some Linux distributions distribute Vim with a system vimrc, often at
      > /etc/vimrc (though the default if you compile Vim yourself is to have
      > that script at $VIM/vimrc, without initial dot, which on Linux normally
      > means /usr/local/share/vim/vimrc) and sometimes that script contains a
      > lot of mappings and settings -- for instance, on SuSE it defines a lot
      > of termcap codes and (among other options) disables modelines. But
      > that's for the distro's Vim, not the one I compile myself. ;-)
      >
      > Best regards,
      > Tony.
      > --
      > A putt that stops close enough to the cup to inspire such comments as
      > "you could blow it in" may be blown in.  This rule does not apply if
      > the ball is more than three inches from the hole, because no one wants
      > to make a travesty of the game.
      >                 -- Donald A. Metz
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Ron Aaron
      Here is a patch to fix this issue as I think it should be fixed. Note: I have moved the macmap.vim script to runtime/plugin , and modified it so it will
      Message 2 of 9 , Apr 7, 2009
      • 0 Attachment
        Here is a patch to fix this issue as I think it should be fixed.

        Note: I have moved the 'macmap.vim' script to 'runtime/plugin', and
        modified it so it will check a flag before starting. Also, it will
        only run on mac ...


        Patch follows:

        --- src/main.c.orig 2009-04-07 19:34:01.000000000 +0300
        +++ src/main.c 2009-04-07 19:35:03.000000000 +0300
        @@ -2769,9 +2769,6 @@
        #ifdef SYS_VIMRC_FILE
        (void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE);
        #endif
        -#ifdef MACOS_X
        - (void)do_source((char_u *)"$VIMRUNTIME/macmap.vim", FALSE,
        DOSO_NONE);
        -#endif

        /*
        * Try to read initialization commands from the following places:
        --- runtime/plugin/macmap.vim.orig 2009-04-07 19:35:43.000000000 +0300
        +++ runtime/plugin/macmap.vim 2009-04-07 22:59:21.000000000 +0300
        @@ -7,6 +7,14 @@
        " We don't change 'cpoptions' here, because it would not be set
        properly when
        " a .vimrc file is found later. Thus don't use line continuation and
        use
        " <special> in mappings.
        +if !has("mac")
        + finish
        +endif
        +
        +if exists("g:macmap_loaded")
        + finish
        +endif
        +let g:macmap_loaded=1

        nnoremap <special> <D-n> :confirm enew<CR>
        vmap <special> <D-n> <Esc><D-n>gv

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • John Beckett
        Please bottom post on this list. Quote a small (relevant) part of the message you are replying to, and put your text underneath. See
        Message 3 of 9 , Apr 7, 2009
        • 0 Attachment
          Please bottom post on this list. Quote a small (relevant) part
          of the message you are replying to, and put your text underneath.

          See
          http://groups.google.com/group/vim_use/web/vim-information

          John


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Ron Aaron
          ... Thanks for raising the noise-to-signal ratio. --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_dev maillist.
          Message 4 of 9 , Apr 8, 2009
          • 0 Attachment
            On Apr 8, 8:21 am, "John Beckett" <johnb.beck...@...> wrote:
            > Please bottom post on this list.

            Thanks for raising the noise-to-signal ratio.
            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Charles Campbell
            ... Ron, John has been doing a great job with the list, including removing spam on a daily basis. The list does have a well-discussed standard -- that is:
            Message 5 of 9 , Apr 8, 2009
            • 0 Attachment
              Ron Aaron wrote:
              > On Apr 8, 8:21 am, "John Beckett" <johnb.beck...@...> wrote:
              >
              >> Please bottom post on this list.
              >>
              >
              > Thanks for raising the noise-to-signal ratio.
              >
              Ron, John has been doing a great job with the list, including removing
              spam on a daily basis. The list does have a well-discussed standard --
              that is: bottom post.

              Regards,
              Chip Campbell


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