rioj7 / select-by

Visual Studio Code extension to select text by criteria like Regular Expressions
18 stars 4 forks source link

Feature request have this available on right click menu ...select by passte #23

Closed mjoe67886 closed 3 weeks ago

mjoe67886 commented 10 months ago

Or a header button or something I love to use it but you know I love the right click context paste so much more so if you could add this I would be really appreciative. Thanks for making this one quality there's another one out there that gets a lot of errors this one is been really great

rioj7 commented 10 months ago

@mjoe67886

It is not clear which command you want to add to the editor context menu.

You made a typo in the issue title.

Don't you use keyboard shortcuts? Some people love to use the mouse (no need to learn all those shortcuts or using the keyboard is difficult due to a handicap). Most people want to get stuff done fast so they learn keyboard shortcuts like Ctrl+V for Paste. You can define a variant of the keys Ctrl+V, like Alt+Ctrl+V, and bind the Select By command you want to it.


Which other extension are you talking about?

mjoe67886 commented 10 months ago

You should time how long it takes to do it normally going to the keyboard or, just right. Click with that extension that adds indent left and right to the context menu...... And if yours were there, that would be a way quicker, operation ....if you could save even a little bit of effort is still a bonus.select by paste is name... See, if you save time doing this, you have extra time to research another extension that would save you even more? .

On Fri, Nov 3, 2023, 9:04 PM rioj7 @.***> wrote:

@mjoe67886 https://github.com/mjoe67886

It is not clear which command you want to add to the editor context menu.

You made a typo in the issue title.

Don't you use keyboard shortcuts? Some people love to use the mouse (no need to learn all those shortcuts or using the keyboard is difficult due to a handicap). Most people want to get stuff done fast so they learn keyboard shortcuts like Ctrl+V for Paste. You can define a variant of the keys Ctrl+V, like Alt+Ctrl+V, and bind the Select By command you want to it.

— Reply to this email directly, view it on GitHub https://github.com/rioj7/select-by/issues/23#issuecomment-1793330181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWFQGIOK67AECH7S2VZ4ROTYCW5FBAVCNFSM6AAAAAA65BSI6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJTGMZTAMJYGE . You are receiving this because you were mentioned.Message ID: @.***>

rioj7 commented 10 months ago

@mjoe67886

You can add commands yourself to any menu.

  1. In the OS File Explorer go to the folder where VSC stores the installed user extensions
  2. create a new folder: menuadd
  3. add a file package.json
  4. with the following content:
    {
    "name": "menuadd",
    "displayName": "MenuAdd",
    "description": "Menu additions",
    "version": "0.0.1",
    "publisher": "meme",
    "engines": { "vscode": "^1.22.0" },
    "categories": [ "Other" ],
    "contributes": {
      "menus": {
        "editor/context": [
          {
            "command": "selectby.pasteClipboard",
            "group": "9_cutcopypaste@4"
          }
        ]
      }
    }
    }
  5. Restart VSC

You can find more info about this: contributes.menus

mjoe67886 commented 10 months ago

been trying and trying. I'm already on to my second or third version. With GPT, it has me installing. Node..JS . I added the folder you suggested right? In the base of that directory, the user extension directory and added the file and verified. It was right but it's not coming up on the right click contexts menu.... Any help is appreciated....

On Sun, Nov 5, 2023, 4:46 AM rioj7 @.***> wrote:

@mjoe67886 https://github.com/mjoe67886

You can add commands yourself to any menu.

  1. In the OS File Explorer go to the folder where VSC stores the installed user extensions
  2. create a new folder: menuadd
  3. add a file package.json
  4. with the following content:

{ "name": "menuadd", "displayName": "MenuAdd", "description": "Menu additions", "version": "0.0.1", "publisher": "meme", "engines": { "vscode": "^1.22.0" }, "categories": [ "Other" ], "contributes": { "menus": { "editor/context": [ { "command": "selectby.pasteClipboard", "group": @.***" } ] } } }

  1. Restart VSC

— Reply to this email directly, view it on GitHub https://github.com/rioj7/select-by/issues/23#issuecomment-1793727419, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWFQGIPK7BCWXNTYS5S4CXTYC6DA7AVCNFSM6AAAAAA65BSI6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJTG4ZDONBRHE . You are receiving this because you were mentioned.Message ID: @.***>

rioj7 commented 10 months ago

@mjoe67886 No need to install NodeJS, VSC has its own Node.

What is the path of your package.json file.

The directory to create is a sibling of the rioj7.selectby directory.

You can have a look at the Console of the Developer Tools (Help Menu) if that shows a clue.

You can also have a look at the OUTPUT > Log (Extension Host) to see if the extension is activated.

mjoe67886 commented 10 months ago

This is the path "C:\Users\W.vscode\extensions\menuadd\package.json" Yeah that would be so great if you could add this as a tickable option Because the right click paste menu is so convenient... Yeah I appreciate you helping me with this i'm not sure what you meant by sibling and if I could have the keyboard shortcut to access you know output log

On Sun, Nov 5, 2023 at 12:50 PM rioj7 @.***> wrote:

@mjoe67886 https://github.com/mjoe67886 No need to install NodeJS, VSC has its own Node.

What is the path of your package.json file.

The directory to create is a sibling of the rioj7.selectby directory.

You can have a look at the Console of the Developer Tools (Help Menu) if that shows a clue.

You can also have a look at the OUTPUT > Log (Extension Host) to see if the extension is activated.

— Reply to this email directly, view it on GitHub https://github.com/rioj7/select-by/issues/23#issuecomment-1793841973, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWFQGINEMNSY2ML44JVTDMLYC73ZFAVCNFSM6AAAAAA65BSI6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJTHA2DCOJXGM . You are receiving this because you were mentioned.Message ID: @.***>

rioj7 commented 10 months ago

@mjoe67886

I tried it first in the Developer Host.

Now I have created the directory C:\Users\XYZ\.vscode\extensions\menuadd. And copied/edited the C:\Users\XYZ\.vscode\extensions\menuadd\package.json file to have the content mentioned.

Don't forget to RESTART VSC

If you now right click in an editor window you see the Paste clipboard and select menu option below the Paste menu option.

rioj7.selectby is found at C:\Users\XYZ\.vscode\extensions\rioj7.selectby, sibling means menuadd is in the same directory as rioj7.selectby: C:\Users\XYZ\.vscode\extensions\menuadd

OUTPUT > Log (Extension Host) can be found next to the PROBLEMS panel. My wrong you don't see it activated in this panel, there is no need to call activate because it does not have an activate

could add this as a tickable option

tickable usually means it has a checkbox, is this what you want?

mjoe67886 commented 10 months ago

Yes like in your preferences or in settings where you select an option and then it's right there on the right click contacts menu because your implementation of this idea is very strong so having it available on the right click context menu is just so important because that's a real issue in programming is when you paste text then you gotta select it reach over hit your tab key and you know indent it I have the indent left and indent right context menu items already so with if you add this and maybe even to make it a super extension also add in dent left and indent right functionality on context menu.. then you'll be even more a major player you know I tested the other paste on select or select on paste when they have and it it had so many errors but yours is just you know really great.... Hey let me know too i'm a blender developer and I've created the biggest add on in the world code wise if you ever do 3D modeling at all i'll go ahead and send a free copy of it it really has a lot of genius stuff if you're ever gonna do 3D modeling or animation then you know definitely get this off me...

On Sun, Nov 5, 2023 at 3:36 PM rioj7 @.***> wrote:

@mjoe67886 https://github.com/mjoe67886

I tried it first in the Developer Host.

Now I have created the directory C:\Users\XYZ.vscode\extensions\menuadd. And copied/edited the C:\Users\XYZ.vscode\extensions\menuadd\package.json file to have the content mentioned. Don't forget to RESTART VSC

If you now right click in an editor window you see the Paste clipboard and select menu option below the Paste menu option.

rioj7.selectby is found at C:\Users\XYZ.vscode\extensions\rioj7.selectby, sibling means menuadd is in the same directory as rioj7.selectby: C:\Users\XYZ.vscode\extensions\menuadd

OUTPUT > Log (Extension Host) can be found next to the **PROBLEMS panel. My wrong you don't see it activated in this panel, there is no need to call activate because it does not have an activate

could add this as a tickable option

tickable usually means it has a checkbox, is this what you want?

— Reply to this email directly, view it on GitHub https://github.com/rioj7/select-by/issues/23#issuecomment-1793883364, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWFQGIKDUOWTWI23VAOEKVTYDAPJRAVCNFSM6AAAAAA65BSI6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJTHA4DGMZWGQ . You are receiving this because you were mentioned.Message ID: @.***>

mjoe67886 commented 10 months ago

Yeah and a lot of things even though I made this super add on a major part of my workflow is you know when I find somebody that makes a good product like you do I don't try and you know step on their toes and implement that functionality when it comes to that time when I need that functionality I just try and send really kind feature request and motivate them to implement that themselves 'cause I found out that's a real necessity so then other people you know could get successful and then you know in my ventures like I always make sure to promote you know the people that have the best stuff like you

On Sun, Nov 5, 2023 at 10:20 PM BONY JOES VARiETY SHOW @.***> wrote:

Yes like in your preferences or in settings where you select an option and then it's right there on the right click contacts menu because your implementation of this idea is very strong so having it available on the right click context menu is just so important because that's a real issue in programming is when you paste text then you gotta select it reach over hit your tab key and you know indent it I have the indent left and indent right context menu items already so with if you add this and maybe even to make it a super extension also add in dent left and indent right functionality on context menu.. then you'll be even more a major player you know I tested the other paste on select or select on paste when they have and it it had so many errors but yours is just you know really great.... Hey let me know too i'm a blender developer and I've created the biggest add on in the world code wise if you ever do 3D modeling at all i'll go ahead and send a free copy of it it really has a lot of genius stuff if you're ever gonna do 3D modeling or animation then you know definitely get this off me...

On Sun, Nov 5, 2023 at 3:36 PM rioj7 @.***> wrote:

@mjoe67886 https://github.com/mjoe67886

I tried it first in the Developer Host.

Now I have created the directory C:\Users\XYZ.vscode\extensions\menuadd. And copied/edited the C:\Users\XYZ.vscode\extensions\menuadd\package.json file to have the content mentioned. Don't forget to RESTART VSC

If you now right click in an editor window you see the Paste clipboard and select menu option below the Paste menu option.

rioj7.selectby is found at C:\Users\XYZ.vscode\extensions\rioj7.selectby, sibling means menuadd is in the same directory as rioj7.selectby: C:\Users\XYZ.vscode\extensions\menuadd

OUTPUT > Log (Extension Host) can be found next to the **PROBLEMS panel. My wrong you don't see it activated in this panel, there is no need to call activate because it does not have an activate

could add this as a tickable option

tickable usually means it has a checkbox, is this what you want?

— Reply to this email directly, view it on GitHub https://github.com/rioj7/select-by/issues/23#issuecomment-1793883364, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWFQGIKDUOWTWI23VAOEKVTYDAPJRAVCNFSM6AAAAAA65BSI6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJTHA4DGMZWGQ . You are receiving this because you were mentioned.Message ID: @.***>

rioj7 commented 10 months ago

@mjoe67886 your previous 2 comments don't add any new information to solving the problem that the custom extension menuadd should add a context menu entry. On my machine it works. Why does it not work on your machine?

What is the information value that you also want indent context menu entries and that you write Blender plugins?

mjoe67886 commented 10 months ago

Yeah I think what the issue is is that you have an extension development set up on your machine so when I do this on my machine it's not gonna work you probably have like node.js And other things or other extensions.... That make this kind of thing possible for you or certain environment variables set up not really sure i've never developed a extension here... And this was a thank you I didn't know if you did blender I was just saying I had something awesome to offer if you did as... And it's pretty easy to add indent left and indent right by installing the visual studio code extension for it but was just mentioning that you could add indent write and indent left via your own extension if you added select on paste extension to the context menu also and make your extension overall being better because the first thing you need to do after pasting with the code selected with your functionality is to indent it then it would be right there on the right click menu...

mjoe67886 commented 10 months ago

You said this ...........tickable usually means it has a checkbox, is this what you want?.............and yes I think that would be the most intelligent way to do this because that right click context menu could get pretty packed if extension developers added items to it but didn't make it so you could have an option whether to add them or not

rioj7 commented 10 months ago

@mjoe67886 The development environment (there is none) has nothing to do with operating VSC. Development has to do with what you launch, so no interference with normal starting of VSC.

Adding indent left or right would need to add 2N more shortcuts, indent left 1, indent right 1, indent left 2, indent right 2, .....

Indent left or right is done with Tab and Shift+Tab, you can find there commands in keybind GUI and use the menuadd extension to add them yourself to the context menu.

By using your custom menuadd extension you don't need checkboxes in the other extension settings to determine if you want it in the context menu.


Back to problem of this issue

Do you see MenuAdd in the extensions bar?

Can you ask somebody you know who uses VSC to try this.

mjoe67886 commented 10 months ago

I click the gear icon and went to extensions and it's not showing under installed extensions... I don't know anybody who uses Visual Studio code... And indent left and indent right I was just talking about you could update your extension that way I already have these items

On Tue, Nov 7, 2023 at 4:37 AM rioj7 @.***> wrote:

@mjoe67886 https://github.com/mjoe67886 The development environment (there is none) has nothing to do with operating VSC. Development has to do with what you launch, so no interference with normal starting of VSC.

Adding indent left or right would need to add 2N more shortcuts, indent left 1, indent right 1, indent left 2, indent right 2, .....

Indent left or right is done with Tab and Shift+Tab, you can find there commands in keybind GUI and use the menuadd extension to add them yourself to the context menu.

By using your custom menuadd extension you don't need checkboxes in the other extension settings to determine if you want it in the context menu.

Back to problem of this issue

Do you see MenuAdd in the extensions bar?

Can you ask somebody you know who uses VSC to try this.

— Reply to this email directly, view it on GitHub https://github.com/rioj7/select-by/issues/23#issuecomment-1798418891, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWFQGILW7J44YFIAFMWPIRTYDITRFAVCNFSM6AAAAAA65BSI6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJYGQYTQOBZGE . You are receiving this because you were mentioned.Message ID: @.***>

rioj7 commented 10 months ago

@mjoe67886 there is no reason to send the full text of the message you are responding to as part of the reply, that text is already part of the thread

If you don't see the MenuAdd extension in the extension bar then you have placed the package.json wrong or its content is wrong.

Browse all the Log panels to see if any of them show an error message, also look at the Dev Tools Console of VSC.

mjoe67886 commented 10 months ago

OKI figured out a workaround you could tell people this in the future I just added this one section to your JSON file.... And it worked yeah such a quicker workflow now thanks for getting me started with that I wouldn't have figured it out that quickly hadn't you done that!!

}, { "command": "selectby.addSelectionToNextFindMatchMultiCursor", "title": "Add Selection To Next Find Match - Multi Cursor", "category": "SelectBy" }, { "command": "moveby.regex", "title": "Move cursor based on regex", "category": "MoveBy" }, { "command": "moveby.calculation", "title": "Move cursor based on calculation by keybinding", "category": "MoveBy" } ], "menus": { "editor/context": [ { "command": "selectby.pasteClipboard", "group": "navigation" } ] },

On Tue, Nov 7, 2023 at 5:57 PM rioj7 @.***> wrote:

@mjoe67886 https://github.com/mjoe67886 there is no reason to send the full text of the message you are responding to as part of the reply, that text is already part of the thread

If you don't see the MenuAdd extension in the extension bar then you have placed the package.json wrong or its content is wrong.

Browse all the Log panels to see if any of them show an error message, also look at the Dev Tools Console of VSC.

— Reply to this email directly, view it on GitHub https://github.com/rioj7/select-by/issues/23#issuecomment-1800883002, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWFQGINYFZQJEPHDHGZM4WLYDLRI3AVCNFSM6AAAAAA65BSI6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBQHA4DGMBQGI . You are receiving this because you were mentioned.Message ID: @.***>

mjoe67886 commented 10 months ago

And that indent ight and left thing I mentioned about putting on the context menu that doesn't even matter the really awesome thing is you should tell people to just go out and spend the money on a RAZER Mouse and set their tab key to be one of the thumb buttons and then this is a really awesome system I just paste with your new context menu item and click the button to indent however much I want

On Sun, Nov 12, 2023 at 10:39 AM BONY JOES VARiETY SHOW @.***> wrote:

OKI figured out a workaround you could tell people this in the future I just added this one section to your JSON file.... And it worked yeah such a quicker workflow now thanks for getting me started with that I wouldn't have figured it out that quickly hadn't you done that!!

}, { "command": "selectby.addSelectionToNextFindMatchMultiCursor", "title": "Add Selection To Next Find Match - Multi Cursor", "category": "SelectBy" }, { "command": "moveby.regex", "title": "Move cursor based on regex", "category": "MoveBy" }, { "command": "moveby.calculation", "title": "Move cursor based on calculation by keybinding", "category": "MoveBy" } ], "menus": { "editor/context": [ { "command": "selectby.pasteClipboard", "group": "navigation" } ] },

On Tue, Nov 7, 2023 at 5:57 PM rioj7 @.***> wrote:

@mjoe67886 https://github.com/mjoe67886 there is no reason to send the full text of the message you are responding to as part of the reply, that text is already part of the thread

If you don't see the MenuAdd extension in the extension bar then you have placed the package.json wrong or its content is wrong.

Browse all the Log panels to see if any of them show an error message, also look at the Dev Tools Console of VSC.

— Reply to this email directly, view it on GitHub https://github.com/rioj7/select-by/issues/23#issuecomment-1800883002, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWFQGINYFZQJEPHDHGZM4WLYDLRI3AVCNFSM6AAAAAA65BSI6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBQHA4DGMBQGI . You are receiving this because you were mentioned.Message ID: @.***>

mjoe67886 commented 10 months ago

How about one thing I notice I don't think it ever worked when you run the paste on select on one line of text that would be so awesome if I could just paste in single line commands and it highlights it the same way 🙂

On Sun, Nov 12, 2023 at 10:41 AM BONY JOES VARiETY SHOW @.***> wrote:

And that indent ight and left thing I mentioned about putting on the context menu that doesn't even matter the really awesome thing is you should tell people to just go out and spend the money on a RAZER Mouse and set their tab key to be one of the thumb buttons and then this is a really awesome system I just paste with your new context menu item and click the button to indent however much I want

On Sun, Nov 12, 2023 at 10:39 AM BONY JOES VARiETY SHOW < @.***> wrote:

OKI figured out a workaround you could tell people this in the future I just added this one section to your JSON file.... And it worked yeah such a quicker workflow now thanks for getting me started with that I wouldn't have figured it out that quickly hadn't you done that!!

}, { "command": "selectby.addSelectionToNextFindMatchMultiCursor", "title": "Add Selection To Next Find Match - Multi Cursor", "category": "SelectBy" }, { "command": "moveby.regex", "title": "Move cursor based on regex", "category": "MoveBy" }, { "command": "moveby.calculation", "title": "Move cursor based on calculation by keybinding", "category": "MoveBy" } ], "menus": { "editor/context": [ { "command": "selectby.pasteClipboard", "group": "navigation" } ] },

On Tue, Nov 7, 2023 at 5:57 PM rioj7 @.***> wrote:

@mjoe67886 https://github.com/mjoe67886 there is no reason to send the full text of the message you are responding to as part of the reply, that text is already part of the thread

If you don't see the MenuAdd extension in the extension bar then you have placed the package.json wrong or its content is wrong.

Browse all the Log panels to see if any of them show an error message, also look at the Dev Tools Console of VSC.

— Reply to this email directly, view it on GitHub https://github.com/rioj7/select-by/issues/23#issuecomment-1800883002, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWFQGINYFZQJEPHDHGZM4WLYDLRI3AVCNFSM6AAAAAA65BSI6OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBQHA4DGMBQGI . You are receiving this because you were mentioned.Message ID: @.***>

rioj7 commented 10 months ago

@mjoe67886 the modification to SelectBy package.json will be overwritten when I update the extension

paste and select single line

Create a new issue and describe in detail the steps you take and what is in the editor and where is the cursor (selection) and what you expect to see.