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

Re: catching the register command

Expand Messages
  • David Fishburn
    ... If can create an expression map for p. this will call your own function. The YankRing plugin uses this technique. -- David Fishburn -- You received this
    Message 1 of 3 , Apr 8, 2012
    • 0 Attachment
      On Apr 8, 2012, at 11:23 AM, sinbad <sinbad.sinbad@...> wrote:

      > suppose if i had mapped "p" to do some operation
      > based on some variable, if that variable is not set
      > the "p" should perform it's normal operation. now
      > how can i catch the register contents or count
      > before "p", for ex user might have pressed "ap,
      > how do i catch "a in this case.
      >
      > fun! NewP()
      > if var == 1
      > "do something
      > else
      > "normal p
      > endfun
      >
      > --
      > 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

      If can create an expression map for p. this will call your own function.

      The YankRing plugin uses this technique.

      --
      David Fishburn

      --
      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.