qcz / vscode-text-power-tools

Text Power Tools extension for VS Code
https://marketplace.visualstudio.com/items?itemName=qcz.text-power-tools
MIT License
95 stars 14 forks source link

[Feature request] vertical numeric sequence filling #70

Open toohandsome opened 1 year ago

toohandsome commented 1 year ago

when i use "Insert numbers - Insert decimal number sequence" , His behavior appears to be shifting the original text to the next line, instead of inserting one number per line as I was hoping for.

image

I hope to add a feature that is similar to Notepad++'s column editing mode, where numbers can be inserted sequentially at specified positions.

image

qcz commented 1 year ago

If you have multiple selections, it will insert a number to every active selection, like this:

https://github.com/qcz/vscode-text-power-tools/assets/304384/90150501-4a4c-49bb-b63b-53535e8ba6fc

toohandsome commented 1 year ago

If you have multiple selections, it will insert a number to every active selection, like this:

Sample.2.mp4

Thank you for your reply!

If it's just to solve the problem in my example, there are many ways to do it, such as inserting line numbers first and then using regex replace.

The method in your demo video needs to ensure that the characters before the numbers are the same or can be replaced simultaneously, which doesn't seem like a universal solution.