Friday, July 11, 2014

Re: g@ seems to ignore user-defined motion maps

On Friday, July 11, 2014 3:24:45 PM UTC-5, Brett Stahlman wrote:
> On Friday, July 11, 2014 2:03:31 PM UTC-5, Christian Brabandt wrote:
>
> > Hi Brett!
>
> >
>
> >
>
> >
>
> > On Fr, 11 Jul 2014, Brett Stahlman wrote:
>
> >
>
> >
>
> >
>
> > > This is not what I see. Here's a test case consisting of the
>
> >
>
> > > map-operator example from the Vim help, along with a normal mode
>
> >
>
> > > remapping of $ to G. Hitting $ in normal mode now goes to the end of
>
> >
>
> > > the file, but hitting <F4>$ counts only the spaces on the current
>
> >
>
> > > line...
>
> >
>
> >
>
> >
>
> > You are using $ in operator pending mode, so you would need an omap $ G
>
> >
>
> > as well. And then it works.
>
>
>
> Not sure this solves the problem for paredit though... The simple example I gave maps a Vim {motion} to another Vim {motion} ($ to G), but paredit is using a function to accomplish the motion. If I replace omap $ G with the following...
>
>
>
> omap $ :call cursor(line('$'))<CR>
>
>
>
> ...it doesn't seem to work.

Ooops! I thought the column argument to cursor was optional - it's not... When I changed the call to cursor(line('$'), 1), things worked as expected. Sorry for the confusion...

Brett S.

>
>
>
> Thanks,
>
> Brett S.
>
>
>
> >
>
> >
>
> >
>
> > Best,
>
> >
>
> > Christian
>
> >
>
> > --
>
> >
>
> > Panischer Anruf bei der Bahndirektion:
>
> >
>
> > "AUF DEM BAHNDAMM LIEGT EIN GLEIS!"
>
> >
>
> > Sagt der Bahnbeamte: "Das ist auch gut so!" und hängt wieder auf.
>
> >
>
> > Fünf Minuten der gleiche Anrufer: "Jetzt haben sie den almen alten
>
> >
>
> > Mann übelfahlen!"

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment