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

Re: omap with 'f' and 't' and getchar() and nr2char()

Expand Messages
  • David Fishburn
    ... YES! That works like a charm and it makes sense too! --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use
    Message 1 of 18 , Jun 2, 2008
      ...
      > The ":call MyDisplay()<CR>" should either be part of the expression that MyExprOp
      > returns, or appended to it with the "." operator. So far you've tried including it
      > as for a regular map, not an <expr> map. Try (roughly)
      >
      > func! MyExprOp(arg)
      > let char=getchar()
      > return "f".char.":call MyDisplay()\<CR>"
      > endfunc
      >
      > or
      >
      > onoremap <expr> f MyExprOp('f').":call MyDisplay()\<CR>"

      YES!

      That works like a charm and it makes sense too!

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.