Friday, July 11, 2014

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

On Friday, July 11, 2014 7:18:39 AM UTC-5, Brett Stahlman wrote:
> Hello,
> I recently noticed that Paredit's `d{motion}' map doesn't behave the way
> I would expect: in particular, although `)' in normal mode jumps
> correctly to the end of the current S-expression, `d)' deletes beyond
> the end of the S-exp. It seems as though perhaps the `)' motion reverts
> to its non-Paredit meaning (forward sentence) until after the
> operatorfunc has executed. Is this by design? Hopefully not, since
> users would typically expect plugin-defined mappings to work the same
> with an operator as they do in normal mode.

Having thought about it a bit, it occurs to me that it would be very difficult for Vim's g@ implementation to treat movements accomplished via user mappings the same as built-in {motion}s. Perhaps that's why only Vim {motion}s are considered? In the case of Paredit, Tamas has graciously agreed to add explicit normal mode mappings for d), c), etc..., which is an acceptable workaround.

Thanks,
Brett S.

>
> Thanks,
> Brett S.

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