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

noremap + function call question

Expand Messages
  • Yakov Lerner
    ... , is remapping also suppressed for things invoked inside the function ? (2) is remapping suppressed only for ;; , of for all other existing mappings ?
    Message 1 of 2 , May 1, 2003
      When I call a function in 'noremap', like this:

      :noremap ;; :call Foo()<cr>

      , is remapping also suppressed for things
      invoked inside the function ?

      (2) is remapping suppressed only for ';;', of for
      all other existing mappings ?


      Jacob
    • Luc Hermitte
      Hello, ... No. If you execute a :normal , things will get expanded -- very easy to check by yourself. You have to use :normal! to prevent that. ... ?? If
      Message 2 of 2 , May 1, 2003
        Hello,
        * On Thu, May 01, 2003 at 02:35:31PM +0300, Yakov Lerner <yakov.lerner@...> wrote:
        > When I call a function in 'noremap', like this:
        > :noremap ;; :call Foo()<cr>
        >
        > , is remapping also suppressed for things invoked inside the function ?

        No. If you execute a ':normal', things will get expanded -- very easy
        to check by yourself. You have to use ':normal!' to prevent that.

        > (2) is remapping suppressed only for ';;', of for all other existing
        > mappings ?

        ??

        If you map '::' to ';;', hitting '::' will execute Foo().
        The `noremap' means that if you have, for instance, remapped ':', then
        this mapping will be ignored when you hit ';;'.

        HTH,

        --
        Luc Hermitte
        http://hermitte.free.fr/vim/
      Your message has been successfully submitted and would be delivered to recipients shortly.