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

Re: Remove delay during map execution

Expand Messages
  • Ben Fritz
    ... You must have other mappings which start with , . What you re asking, then, is for Vim to read your mind and execute the mapping immediately when you want
    Message 1 of 3 , Jan 26, 2013
    • 0 Attachment
      On Saturday, January 26, 2013 6:56:49 PM UTC-6, Roy Fulbright wrote:
      > I have the following map which inserts a space and escapes back to normal mode. How can I remove the delay associated with it when I execute it? I want it to run immediately when I press the comma key in normal mode, but there is a delay (to determine if this is a leader character, I think). For this mapping I do not want any delay. I have search through help for a setting that will remove the delay but have found nothing.
      >  
      > nnoremap , i <ESC>
      >  

      You must have other mappings which start with ','. What you're asking, then, is for Vim to read your mind and execute the mapping immediately when you want it to execute this mapping, but read your mind and wait for the next keypress when you want to invoke your other mappings.

      Vim's mind-reader plugin isn't ready yet, sorry to say.

      --
      --
      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
    • Roy Fulbright
      ... You re right. I did have another mapping which started with , . I changed it to another value and the response to my mapping is now immediate. Thank you
      Message 2 of 3 , Jan 26, 2013
      • 0 Attachment

         
        > Date: Sat, 26 Jan 2013 17:04:23 -0800
        > From: fritzophrenic@...
        > To: vim_use@...
        > Subject: Re: Remove delay during map execution
        >
        > On Saturday, January 26, 2013 6:56:49 PM UTC-6, Roy Fulbright wrote:
        > > I have the following map which inserts a space and escapes back to normal mode. How can I remove the delay associated with it when I execute it? I want it to run immediately when I press the comma key in normal mode, but there is a delay (to determine if this is a leader character, I think). For this mapping I do not want any delay. I have search through help for a setting that will remove the delay but have found nothing.
        > >  
        > > nnoremap , i <ESC>
        > >  
        >
        > You must have other mappings which start with ','. What you're asking, then, is for Vim to read your mind and execute the mapping immediately when you want it to execute this mapping, but read your mind and wait for the next keypress when you want to invoke your other mappings.
        >
        > Vim's mind-reader plugin isn't ready yet, sorry to say.
        You're right. I did have another mapping which started with ','. I changed it to another value and the response to my mapping is now immediate. Thank you very much, Ben!

        --
        --
        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
         
         
         
      Your message has been successfully submitted and would be delivered to recipients shortly.