antfu / retypewriter

Replay the steps of your changes at ease.
https://marketplace.visualstudio.com/items?itemName=antfu.retypewriter
MIT License
729 stars 12 forks source link

feat: add paste option #10

Closed martiliones closed 1 year ago

martiliones commented 1 year ago

Description

Hello, I just tried this tool for markdown files and found that writing some parts might not seem natural (like links), so I decided to create an option for pasting text

Example syntax:

--01----------

--02----------
// see
--03----------
// see https://github.com/antfu/retypewriter/
-----options--
paste: true
wait: 0
--------------

I also implemented the wait option as you can see.

Additional context

It would be nice if autodetection of inserting text or finding links was implemented in the future.

btw why was the remove snap function removed from CodeLens? The commented code seems to work

antfu commented 1 year ago

why was the remove snap function removed from CodeLens? The commented code seems to work

Because I found the actions become verbose. To remove a snap, the user could simply select and delete them, this also makes it more explicit and avoid accident clicks.

antfu commented 1 year ago

Great feature, thanks!

antfu commented 1 year ago

Emm. this seems to break the test, can you have a look? Thanks

antfu commented 1 year ago

Fixed in 2186aed7d475453c4c1b5ef925adf91367464ee0

martiliones commented 1 year ago

Because I found the actions become verbose. To remove a snap, the user could simply select and delete them, this also makes it more explicit and avoid accident clicks.

The user also should change id for all future steps, shouldn't they?

- --01----------
- // text 1
- --02----------
+ --01----------
// text 2
- --03----------
+ --02----------
// text 3

sorry for the broken test :(