Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextObjectify breaks all 2-character mappings for text objects #9

Open
mascip opened this issue Nov 2, 2013 · 2 comments
Open

TextObjectify breaks all 2-character mappings for text objects #9

mascip opened this issue Nov 2, 2013 · 2 comments

Comments

@mascip
Copy link

mascip commented Nov 2, 2013

Hi, I use CamelMotion and html-textobjects. These plugins define mappings with 2 characters for their text objects.

For example CamelMotion provides ,w in addition to w : you can do vi,w to select one camel case word. But when I do vi,w with TextObjectify, it selects the text between the two nearest commas. So I have stopped using TexTObjectify, which is a shame.

As a solution, I think I would like to be able to de-activate TextObjectify for given characters. Maybe by providing an additional optional argument in g:textobjectify, to indicate that the text object is de-activated? Or by providing an additional g:dontobjectify variable.

Did anyone have a similar problem?
What do you think, for solutions?

@paradigm
Copy link
Owner

paradigm commented Nov 8, 2013

Interesting, I didn't consider multicharacter text-objects like that. Definately on me. The problem is that a key feature of TOify is that it will create text-objects on-the-fly as an undefined one is entered, and for this it assumes they're all one-character.

It should be possible for TOify to parse the existing mappings (with :redir and :map) to catch this situation now that I am aware that it is a possibility. It shouldn't require any additional g:settings.

It'll take me a bit to write up with my given schedule, sadly. I've got a major re-write of TOify incoming in (hopefully) the next few months. A lot of issues have been discovered with the current design of TOify, and it has become apparent that I need to take a completely different approach. My free-development time has been completely saturated with another higher-priority project. Once the other project's release is out, I'll go through and rewrite TOify, and I'll be sure to include this in the fixes.

So I'd currently recommend holding off on using TOify for now and check back early next year. My apologies.

@mascip
Copy link
Author

mascip commented Nov 9, 2013

Wow, thank you for your very thorough answer. Don't apologize you provide a great plugin!

Good luck with stuff, I hope you find time for yourself =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants