emmetio / sublime-text-plugin

The essential toolkit for web-developers
https://emmet.io
MIT License
255 stars 30 forks source link

Multiple cursors does not work #122

Open Mandras opened 4 years ago

Mandras commented 4 years ago

If you have multiple cursors, it does not work properly. It will take only the first one Previous version was working fine with it

Mandras commented 4 years ago

Additionnal information: It doesn't work with 1 letter HTML tag, like a, u, i, p, ...

Vanderhoof commented 4 years ago

This is very frustrating! I'm so used to it, please return multiple cursors support!

sergeche commented 4 years ago

Fixed in v2.2.0, please check if it works as expected

miltonmclai commented 4 years ago

Thanks, it works better now. Both "tab to insert" and "Wrap with Abbreviation" can work with multiple cursors now. However, 1 more minor fixes will make it perfect.

In previous version, after using "Wrap with Abbreviation" with multiple cursors, the multiple cursors stay right after the inner most opening tag.

But now only the first cursor left and jump to right after the end of outer most closing tag. This behaviour makes us not able to continue the multiple cursors points editing after using "wrap".

See if it is possible to fix. Thanks.

sergeche commented 4 years ago

Fixed multiple cursors in v2.2.4. Please check if it works as expected

miltonmclai commented 4 years ago

Wow, very nice. We now have the multiple cursors remain after the "wrap" action, this dramatically improve the workflow. Thank you very much.

May be my description is not good enough. Let me rephrase them with examples:

In previous version after applying the "wrap", the multiple cursors will stay right inside at the beginning of the inner most opening tags:

(cursor here)wrapped content

(cursor here)wrapped content

In the current version, after the fixing in v2.2.4, the multiple cursors jump to right after the end of outer most closing tags:

wrapped content

(cursor here)

wrapped content

(cursor here) I personally like the behaviour of previous version because it allows to do adjustment quicker to the content (wrapped content), for example: 1) closer to the opening tag of the wrapped content that allows quicker fine tune the tag attributes 2) quicker to expand selection to the wrapped content and wrapping tags Nice to see the further adjustment if you find my comments make sense to you too.
sergeche commented 4 years ago

Can you give a complete example of expected behaviour with code snippets? E.g. “when I wrap foo text with ul>li abbreviation I expect caret to be placed at…

<ul>
  <li>foo</li>|
</ul>
miltonmclai commented 4 years ago

Let me try (first time using code block...). In the previous version, when I wrap foo text with ul>li abbreviation, caret was placed at:

<ul>
   <li>|foo</li>
</ul>

If I wrapped 2 foos in a sentence "Hi foo, my name is also foo." with span, it should be:

Hi <span>|foo</span>, my name is also <span>|foo</span>.