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

Re: Strange nmap behavior.

Expand Messages
  • Jonny
    Ah, yes that s it. Thanks a lot. Jonny. On Oct 30, 5:44 pm, Tony Mechelynck ...
    Message 1 of 3 , Oct 30, 2008
    • 0 Attachment
      Ah, yes that's it. Thanks a lot.

      Jonny.

      On Oct 30, 5:44 pm, Tony Mechelynck <antoine.mechely...@...>
      wrote:
      > On 30/10/08 03:59, Jonny wrote:
      >
      >
      >
      > > I've tried searching around for this, but have had no luck.
      >
      > > :nmap<F5>  99[(v%
      >
      > > with this mapping if I am inside a lisp s-expression and press F5 I
      > > get the desired result of highlighting the whole top level form.
      >
      > > But if the cursor is sitting on the first parenthesis of the top level
      > > form it doesn't work.
      >
      > > If I manually type 99[(v% in normal mode it works correctly in both
      > > cases.
      >
      > > Any help appreciated,
      >
      > > Jonny.
      >
      > My guess is that when executing the mapping starting on the outermost
      > parenthesis, 99[( generates an error which stops execution of the
      > mapping before starting Visual mode. When doing it manually, you may
      > perhaps get a beep after 99[( but when you hit v% it still highlights up
      > to the paired closing paren.
      >
      > Try
      >
      >         :nmap   <F5>  :silent! exe 'normal 99[(v%'<CR>
      >
      > see
      >         :help :silent
      >
      > Best regards,
      > Tony.
      > --
      > I can't understand it.  I can't even understand the people who can
      > understand it.
      >                 -- Queen Juliana of the Netherlands.
      --~--~---------~--~----~------------~-------~--~----~
      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.