-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Wrap with abbreviation and Expand abbr commands do not work with multiple cursors #27621
Comments
Multi cursor now works for both But once the commands get executed, the multi cursors are lost and the cursor is in the last snippet that got expanded. @jrieken This is how I am inserting the snippets. What can I do to ensure that the multi cursor remain ? |
Don't call insert in a loop over the selection but invoke it just once. First build all ranges and then call insert will all of them. That should do it, the ranges are being set as selection |
@jrieken That will work if the same snippet has to be inserted in all ranges. But that is not the case here. We could technically have 3 different emmet abbr in 3 different locations |
Then you cannot do it without manual work. Snippets, like all multi-cursor operations, insert the same text at all cursors. You could combine all emmet expansions into one snippets and that snippet would replace those three lines, the |
Thanks @jrieken
You mean combine the text in between the lines as well into one big snippet? I'll re-visit this based on user feedback. For now I am taking this approach
|
Note to verifier:
|
For the cursor issue in #27621 (comment), since the text being wrapped is different, the final snippets are different in which case it is not possible to preserve all the cursors as explained #27621 (comment) The extra space and tab issue occurs only when the wrapping abbreviation is for an inline element (a, span etc). Fixed with 605ee59 |
#27316
Get into this state:
Wrap with abbreviation
"a"
:The text was updated successfully, but these errors were encountered: