select-by icon indicating copy to clipboard operation
select-by copied to clipboard

Awesome idea for an upgrade

Open fast-blender-add-ons-dot-com opened this issue 6 months ago • 3 comments

You could make like three new commands that people could choose from where you paste the text and it selects it automatically then in density either one tab or two tab or three tabs or maybe you could go all the way up to 6 tabs and let people decide what they want to use. I use my own extension and I always with that extension I put your paste by select right on the context menu it would be great to have these other options that I could just add to the right click context menu and you see how much better it would just make things

@fast-blender-add-ons-dot-com Most likely English is not your native language. It is hard for me to extract what features you want.

  • what do you mean with then in density
  • do you want to be able to paste the clipboard content in multiple tabs?
  • which 2 or 3 tabs do you want to paste the clipboard if you have 20 tabs open in VSC

If you want to execute a command over multiple tabs you can create key binding combos like shift+ctrl-v 3 to paste the content in the next 3 tabs. Use runCommands or extension multi-command (ryuta64) to execute a sequence of commands for a single key-combo.

With multi-command you can create new commands that are composed of a sequence of other commands. These commands you can use to add to your context menu with your own extension just like you did with Select By Paste Clipboard.

If you need to do something often a key binding is the way to go. Using the content menu takes more time.

rioj7 avatar Jun 29 '25 00:06 rioj7

I'm sorry I didn't check my voice typing before I sent that I rewrote this so it's easier to understand i'm sorry about wasting your time there......

The idea is that...You could make some new commands that people could choose from where you paste the text and it selects it automatically then indents either one tab or two tab or three tabs.... I feel that it would optimize your processes if

you made it easy to add these new additions plus your original paste by select to the right click context menu in visual studio code Or that was the initial way your plug-in just works because pasting is such a common action

What I would do next is ..... then....underneath that.... I would put a flyout menu with six options it would be paste and select and indent one tab and paste and select and indent two tabs... And the same.....all the way up to six tabs...

You see each one of these commands would essentially be the same command but each one would indent a different number of tabs each time... So basically to make these commands it would be really easy all you would have to do is write a little tiny bit of code for indenting and add it to your current feature And then duplicate your current feature six times in order to create the six commands.... And of course you would still leave your original feature the paste by select in its current state because sometimes you don't need to indent at all

I know that would really optimize everybody's process that uses your plugin because every time I paste with the text selected with your feature I almost always have to indent because I'm a python programmer.... Also you will get a lot more respect and gratitude by adding these things...

And if you're nervous about adding any of these things you can make the addition of them optional with a check box just in case people didn't want them

@fast-blender-add-ons-dot-com

Now I get what you want to do (VSC has multiple items called "tab").

I will make the command selectby.pasteClipboard accept a parameter indent, can be any number range(-100,101,1).

But I don't think that is needed. With extension multi-command or command runCommands you can create commands or keybindings that starts with the selectby.pasteClipboard command followed by N times the tab or outdent command.

Best to bind this to key combos, no need to use the mouse, or use the Command Palette and its fuzzy search: spc3 to paste and indent 3 tabs, spco3 to paste and outdent 3 tabs

Every time you want to copy/paste some lines you should consider to refactor the program. There has been only a very few times in my programming years I had multiple copies of the same code or slight variations of it. If you refactor with parameters you don't need to copy/paste a third time you just call the function with other parameters. No errors, just 1 line.

rioj7 avatar Jun 29 '25 23:06 rioj7