Thursday, May 8, 2014

Re: What does ! do to map? [Was: When is map useful (as apposed to noremap)]


On May 8, 2014 5:36 PM, "Erik Christiansen" <dvalin@internode.on.net> wrote:
>
> On 07.05.14 18:26, Elijah Griffin wrote:
> >       map t 7
> >       map! t 7
>
> Trying ":h map!", I find no words describing what the '!' does to map.
>
> Scanning all of map.txt for "map!", no further clue was revealed.
> Scanning all of map.txt for "!", its indicator meaning in a "map-listing"
> was revealed, but still no description of what it might do in the other
> context.
>
> Trying ":h !" just finds:   *:!cmd* *:!*
>
> There is a table at "*mapmode-ic* *mapmode-i* *mapmode-c* *mapmode-l*",
> which includes:
>
>     commands:                                 modes:
>                                           Insert  Command-line  Lang-Arg
> :map!  :noremap!  :unmap!  :mapclear!       yes        yes         -
>
> but that omits "map", so it does not help to infer what '!' does to
> "map". ("map" appears in the "*map-overview* *map-modes*" table, but
> that is an orthogonal view, allowing no comparison with "map!")
>
> The search was first conducted in 7.3, but I've just built 7.4, with the
> same results.
>
> Is there any way to find an explanation of the effect of the modifier,
> in the help?

Unlike most other commands bang in :map! is not a modifier. :map! to :map is the same as :vmap to :map, just with different set of modes. It is listed in :h :map as a separate entity that is linked to :h mapmode-ic.

Note that technically it is a modifier: there is no :map! command. But this does not matter: unless you are a Vim developer you should treat this as a separate command.

>
> Erik
>
> --
> The UN also estimates that the current global population of 7.2 billion will
> reach 9.6 billion by 2050. That is a faster rate of growth than previously
> estimated.  - http://www.bbc.co.uk/news/world-asia-22907307
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: