On 27/08/08 01:43, Bill McCarthy wrote:
> On Tue 26-Aug-08 6:26pm -0600, Tony Mechelynck wrote:
>
>> On 27/08/08 01:07, Bill McCarthy wrote:
>>> Hello Vim Developers,
>>>
>>> I've noticed that some mappings are built into Gvim and Vim.
>>> Here are the ones built into Gvim (from the output of:
>>> :map|map!) - if it matters, I'm running under Windows XP:
>>>
>>>       v<C-X>           "*d
>>>       v<C-Del>         "*d
>>>       v<S-Del>         "*d
>>>       v<C-Insert>      "*y
>>>       v<S-Insert>      "-d"*P
>>>       n<S-Insert>      "*P
>>>       !<S-Insert>      <C-R><C-O>*
>>>
>>> The following are the built-in maps for Vim:
>>>
>>>       v<C-X>           "-d
>>>       nv<C-End>         <C-End>
>>>       nv<C-Home>        <C-Home>
>>>       v  ÎØ            "*d
>>>       v  Î×            "*d
>>>       v  ÎÕ            "*y
>>>       v  ÎÔ            "-d"*P
>>>       n  ÎÔ            "*P
>>>       !<C-End>         <C-End>
>>>       !<C-Home>        <C-Home>
>>>       i  ÎÔ<C-R><C-O>*
>>>
>>> The Gvim maps remind of some Windows shortcuts that have
>>> apparently been borrowed by Bram.  Those 5 vmaps are quite
>>> odd.  They should work fine as xmaps but we'll not behave as
>>> intended as smaps.  To fix this problem, I've added to my
>>> _vimrc:
>>>
>>>       sunmap<C-X>
>>>       if has("gui")
>>>         sunmap<C-Del>
>>>         sunmap<S-Del>
>>>         sunmap<C-Insert>
>>>         sunmap<S-Insert>
>>>       endif
>>>
>>> The maps in the has("gui") can't be unmapped that way in
>>> Vim.  Also, what is being accomplished by mapping<C-End>
>>> and<C-Home>   to themselves?
>>>
>> I suspect they are set by some script; maybe mswin.vim or maybe some
>> "system vimrc":
>>
>> 1. Try starting Vim by typing
>>
>>          vim -N -u NONE
>> or
>>          gvim -N -u NONE
>
> That's how I started to capture only the maps I show above
> (and yes I used redir with "verb map" and "verb map!"  to do
> it).  There are no script files involved.
>
>> This will tell you where all these mappings came from. The strange
>> two-character {lhs}es might represent Alt-key chords.
>
> Yes they are.  I can see them with:
>
>      vmap<M-N>
>
> which is a bit strange for<C-Del>,<S-Del>,<C-Insert>  and
> <S-Insert>.

I agree.

>
>      sunmap<M-N>
>
> gives:  E31: No such mapping

If several mappings' {lhs}es _begin_ with Alt-N, you'll see them with

        :map <M-N>
or
        :map! <M-N>

but to undo them you'll have to give the exact {lhs}es. Or else, you 
should be able to undo _all_ mappings by adding

        silent mapclear
        silent mapclear!

at the top of your vimrc and again of your gvimrc if you have one (or at 
the GUIEnter event if you don't). However ":help :mapclear" says 
"Warning: This also removes the default mappings." I suppose those 
"default mappings" are, on Windows, the ones you found, and that my vim 
for Linuw/X11/GTK2 doesn't have any (see below).


Here's what I see on Linux:

        vim -N -u NONE

        :map
No mapping found
        :map!
No mapping found

        gvim -N -u NONE

        :map
No mapping found
        :map!
No mapping found

----------------------------------
Ah! I found them !!!!!!!!!!!!!!!!!
----------------------------------
see ":help dos-standard-mappings"


Best regards,
Tony.
-- 
If entropy is increasing, where is it coming from?

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui