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

Re: wierd bug with vim -t

Expand Messages
  • Bram Moolenaar
    ... The indicates that in the RHS only script-local mappings are expanded, no other mappings. But the LHS is used everywhere, just like any other
    Message 1 of 2 , Jun 1, 2002
    • 0 Attachment
      Charles Campbell wrote:

      > I've got a wierd bug/misunderstanding which seems repeatable
      > under both SGI Irix 5.3 and my Redhat Linux 7.3 box.
      >
      > The following tar file contains four files:
      >
      > abc.c
      > tags
      > .vimrc
      > .vim/plugin/tst.vim
      >
      > Note that with
      >
      > vim abc.c
      >
      > the \t1 \t2 \t3 maps all echo (although I'm
      > surprised that \t1 works since its <script>'d).
      >
      > Now try
      >
      > vim -t junk
      >
      > which puts one in the same file. This time \t1 and \t3
      > don't work, although \t2 does.
      >
      > This doesn't seem right to me, although I presume it
      > could be my misunderstanding of map <script> ... .
      > I thought such mappings were basically local to the
      > defining script, but that doesn't appear to be happening
      > here.
      >
      > HAVE EXPECTED
      > Summary: vim abc.c | vim -t junk || vim abc.c | vim -t junk
      > \t1 yes | no || no | no
      > \t2 yes | yes || yes | yes
      > \t3 yes | no || yes | yes

      The <script> indicates that in the RHS only script-local mappings are
      expanded, no other mappings. But the LHS is used everywhere, just like
      any other mapping.

      The <buffer> makes \t1 work only in the current buffer. Somehow "vim -t
      junk" creates another buffer, while "vim abc.c" re-uses the empty buffer
      you start with. This seems to depend on my .vimrc though, "vim -u NONE"
      doesn't do this.

      Thus I don't see something wrong here, except that "vim -t junk" doesn't
      re-use the empty buffer.

      --
      hundred-and-one symptoms of being an internet addict:
      75. You start wondering whether you could actually upgrade your brain
      with a Pentium Pro microprocessor 80. The upgrade works just fine.

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.