-
Notifications
You must be signed in to change notification settings - Fork 37
There's a lot of undocumented options for patterns… #74
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
Comments
Sorry for my late response. Let me explain in arbitrary order. |
First, I try to answer for the second question. This plugin provides three "kind"s of operators and two "kind"s of text-objects.
The Generally speaking, a text-object only specifies a region on the buffer and an operator only edits the region specified by a text-object (or a motion). From this aspect, the keymapping to delete and to replace are neither a pure operator nor a pure textobject. To delete or replace, it would be useful if a keymapping does both things what text-object and operator do, that is, find a surrounded region and edit it, as For example, when you type sd' (or you may like ds'), it searches the nearest surrounded text by single quotes and deletes the quotes at both edges. Here, the searching is the task of text-objects while deleting quotes is the task of operator. The sandwich.vim make this behavior by combining |
sa just add a pair of surroundings and sd just delete, however sr actually does both. The key sequence sr([ works like this.
The first step should work like sd and the second step should work like sa, but The textobjects are included in |
The At the early development stage of this plugin, the operators and the textobjects were implemented completely independent. It worked but not very efficient; when a user uses sdb, textobject-auto scans all recipes to search the nearest surroundings and then operator-delete scans all recipes again to check if any one matches to the specified region.
The |
The The first one is a surrounded text, but the double quotes (") will be deleted only if In the second case, the syntax coloring of double quotes are the same but "f" and "o" are not the same. Thus the double quotes will be deleted if The case The case Recently, I found that this option is too strict even if it is 1, since the syntax coloring is frequently broken with incomplete texts in editing. |
I'm about to read this with a vigor… but thank you so much for the incredible response. I'll try to repay you with a documentation PR if I can understand it correctly. |
Thank you. I cannot take time these days but I have recognized that the document is messy. So, thank you again and looking forward to seeing your PR! |
This is the most detailed response to a ticket I have seen in a long time, thank you @machakann. This makes a lot more sense, I'm going to think about how it can be simplified or explained for the docs. |
Finally taking some time to dive into this wonderful plugin…
What does
synchro
do?What's the difference between
action
andkind
?What does
match_syntax
do?The text was updated successfully, but these errors were encountered: