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

Can map key in one vimrc file but not another (?)

Expand Messages
  • Joe
    I m using vim 6.2 under Cygwin on XP. I want to map ^G to do something while in insert mode and I want it to apply to all users. I have the VIM environment
    Message 1 of 3 , Jul 27, 2004
    • 0 Attachment
      I'm using vim 6.2 under Cygwin on XP.

      I want to map ^G to do something while in insert mode and I want it to apply
      to all users.

      I have the VIM environment varaible set to /usr/local and vim --version says
      it will read $VIM/vimrc (no dot) first.

      I put this in $VIM/vimrc (/usr/local/vimrc):

      :imap <C-G> ....

      Then I start vim and type :imap and it shows the map - but it doesn't work -
      it does nothing.

      (There are other non-insert mode maps in $VIM/vimrc that DO work.)

      Then I delete that line from $VIM/vimrc and put it in $HOME/.vimrc and then
      start vim and it does work!

      Why would it work in $HOME/.vimrc but not in $VIM/vimrc?
    • Benji Fisher
      ... HTH --Benji Fisher
      Message 2 of 3 , Aug 1, 2004
      • 0 Attachment
        On Tue, Jul 27, 2004 at 01:26:10PM -0400, Joe wrote:
        > I'm using vim 6.2 under Cygwin on XP.
        >
        > I want to map ^G to do something while in insert mode and I want it to apply
        > to all users.
        >
        > I have the VIM environment varaible set to /usr/local and vim --version says
        > it will read $VIM/vimrc (no dot) first.
        >
        > I put this in $VIM/vimrc (/usr/local/vimrc):
        >
        > :imap <C-G> ....
        >
        > Then I start vim and type :imap and it shows the map - but it doesn't work -
        > it does nothing.
        >
        > (There are other non-insert mode maps in $VIM/vimrc that DO work.)
        >
        > Then I delete that line from $VIM/vimrc and put it in $HOME/.vimrc and then
        > start vim and it does work!
        >
        > Why would it work in $HOME/.vimrc but not in $VIM/vimrc?

        :help compatible-default

        HTH --Benji Fisher
      • Joe
        Thanks - that seems to be it. Benji Fisher wrote in message news:20040801145426.GC25292@localhost.localdomain... ... apply ... says
        Message 3 of 3 , Aug 2, 2004
        • 0 Attachment
          Thanks - that seems to be it.


          "Benji Fisher" <benji@...> wrote in message
          news:20040801145426.GC25292@......
          > On Tue, Jul 27, 2004 at 01:26:10PM -0400, Joe wrote:
          > > I'm using vim 6.2 under Cygwin on XP.
          > >
          > > I want to map ^G to do something while in insert mode and I want it to
          apply
          > > to all users.
          > >
          > > I have the VIM environment varaible set to /usr/local and vim --version
          says
          > > it will read $VIM/vimrc (no dot) first.
          > >
          > > I put this in $VIM/vimrc (/usr/local/vimrc):
          > >
          > > :imap <C-G> ....
          > >
          > > Then I start vim and type :imap and it shows the map - but it doesn't
          work -
          > > it does nothing.
          > >
          > > (There are other non-insert mode maps in $VIM/vimrc that DO work.)
          > >
          > > Then I delete that line from $VIM/vimrc and put it in $HOME/.vimrc and
          then
          > > start vim and it does work!
          > >
          > > Why would it work in $HOME/.vimrc but not in $VIM/vimrc?
          >
          > :help compatible-default
          >
          > HTH --Benji Fisher
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.