Don't block use of user defined text objects #200
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I don't know if this is the right solution because there may be ramifications to allowing mappings through here, but this change solves the problem I was having, fixing #199. With these changes and the text objects I have setup such as
q
for curly double quotes andQ
for curly single quotes, I can dow do things like:Change “double̝ quotes” to single
withcsqQ
→Change ‘double quotes’ to single
Change “double̝ quotes” to star
withcsq*
→Change *double quotes* to star
Change (in̝ parenthesis) to quotes
withcs(q
→Change “in parenthesis” to quotes
These (along with things like
dsq
to delete surrounding quotes) were ignored before even if the surround mapping AND text object existed.By contrast the solution presented in #107 only works for arbitrary single characters where the left and right side of the surround use the same character and the 'surround target' character is an exact match for the one being searched for. It doesn't work for more complex surround objects such as mixed matched pairs that have special text objects.