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

Re: fix for diffwin.vim on WIndows

Expand Messages
  • Bram Moolenaar
    [original message was on the vim list] ... This reminds me that when we do introduce the thing (Script ID), we need a map command that doesn t do
    Message 1 of 1 , Oct 12, 2000
      [original message was on the vim list]

      Camilo Ramos wrote:

      > I offer a small fix for Dr. C's diffwin.vim, useful to those who use the
      > WIndows mappings in mswin.vim:
      >
      > fu! UnmapCV()
      > imap <C-V> <Nop>
      > iunmap <C-V>
      > endfu
      > fu! RemapCV()
      > imap <C-V> x<Esc>\Paste\"_s
      > endfu
      >
      > It's used in the command for \dc as follows:
      >
      > map \dc :call UnmapCV()<CR>:let lzs3=&lz<CR>:set lz<CR><C-W>k<C-W>k?^\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*$<CR>jYpdwf,DAGz<C-V><CR><Esc>"bYdd<C-W>j@b<C-W>k?^\*\*\*\*\*<CR>/^--- <CR>Ypdwf,DAGz<C-V><CR><Esc>"aYdd2<C-W>j@a2<C-W>k?^\*\*\* <CR>z<CR>:set nomod<CR>:let &lz=lzs3<CR>:echo "diff converts middle window to lower window"<CR>:call RemapCV()<CR>

      This reminds me that when we do introduce the <SID> thing (Script ID), we need
      a map command that doesn't do remapping except for maps that start with <SID>.
      That should avoid mappings from outside the script, but do allow mappings from
      inside the script.

      --
      hundred-and-one symptoms of being an internet addict:
      248. You sign your letters with your e-mail address instead of your name.

      /// Bram Moolenaar Bram@... http://www.moolenaar.net \\\
      \\\ Vim: http://www.vim.org ICCF Holland: http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.