(Granted) SurroundSelection Option ?
-
- Posts: 279
- Joined: 29 Sep 2022 14:20
- Location: Win10 @125%
(Granted) SurroundSelection Option ?
hi! when coding in NPP, VSCodium, PHPStorm, etc., one feature i use all the time is something called "SurroundSelection". it allows to you surround your selection with whatever you type, e.g. single quote, double quotes, parenthesis, brackets, etc.
i was using inline rename to take LaRoy Texas 2023 to LaRoy Texas (2023) and thought it would be nice if i could double-click on 2023 (which i can, it selects the word), but then press ( and it would wrap it like this (2023).
right now i start the inline rename, use the arrow keys to scoot the cursor before the word, press ( then scoot to the end of the word and press ), etc.
if added, certain character would have their match added, so typing ( would wrap () and [ would wrap [], " would simply be " " and ' would be ' '.
it's something i do hundreds of times a day in my IDE, thought it would be neat to have an option in XY for the same.
i was using inline rename to take LaRoy Texas 2023 to LaRoy Texas (2023) and thought it would be nice if i could double-click on 2023 (which i can, it selects the word), but then press ( and it would wrap it like this (2023).
right now i start the inline rename, use the arrow keys to scoot the cursor before the word, press ( then scoot to the end of the word and press ), etc.
if added, certain character would have their match added, so typing ( would wrap () and [ would wrap [], " would simply be " " and ' would be ' '.
it's something i do hundreds of times a day in my IDE, thought it would be neat to have an option in XY for the same.
Last edited by GreetingsFromPoland on 22 Jun 2024 15:14, edited 1 time in total.
-
- Site Admin
- Posts: 63672
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SurroundSelection Option ?
Interesting, here is an animated illustration of it: https://devblogs.microsoft.com/visualst ... xperiment/
Not immediately planned, but maybe later...
Not immediately planned, but maybe later...
FAQ | XY News RSS | XY Bluesky
-
- Posts: 279
- Joined: 29 Sep 2022 14:20
- Location: Win10 @125%
Re: SurroundSelection Option ?
hi! with the recent updates to the inline edits (lowercase, uppercase, etc.), any chance you can revisit this wish ?
Re: SurroundSelection Option ?
Hi GreetingsFromPoland,
not an integrated way in XYplorer, but have you tried AHK (AutoHotKey) or Espanso?
Both work application independent.
Best regards, Markus
https://www.autohotkey.com/
https://espanso.org/
not an integrated way in XYplorer, but have you tried AHK (AutoHotKey) or Espanso?
Both work application independent.
Best regards, Markus
https://www.autohotkey.com/
https://espanso.org/
-
- Site Admin
- Posts: 63672
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SurroundSelection Option ?
Good timing.GreetingsFromPoland wrote: ↑19 Jun 2024 16:22 hi! with the recent updates to the inline edits (lowercase, uppercase, etc.), any chance you can revisit this wish ?

FAQ | XY News RSS | XY Bluesky
Re: SurroundSelection Option ?
If user selects part of text and uses "ending quote" like ) > ] then it will result into adding "starting quote" from next pair. Example: Picture)Old<Style.
Can't say it's a bug cause in some circumstances it may be a feature, but some users may consider it a bug.
Can't say it's a bug cause in some circumstances it may be a feature, but some users may consider it a bug.
Win 7 SP1 x64 100% 1366x768|1900x1080
-
- Site Admin
- Posts: 63672
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SurroundSelection Option ?
LOL, I totally forgot about this kind of abuse. I guess I should prevent it.
FAQ | XY News RSS | XY Bluesky
Re: SurroundSelection Option ?
I'd propose no matter if user pushed ( or ), < or > it will properly cover selected text into () and <>.
Win 7 SP1 x64 100% 1366x768|1900x1080
-
- Site Admin
- Posts: 63672
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SurroundSelection Option ?
That's an interesting idea. Are there any SurroundSelection standards out there?
PS: Another option would be to reverse the order in this case:
PS: Another option would be to reverse the order in this case:
abc + ) --> )abc(
FAQ | XY News RSS | XY Bluesky
-
- Posts: 279
- Joined: 29 Sep 2022 14:20
- Location: Win10 @125%
Re: SurroundSelection Option ?
hi! not sure about any standard out there; however, in Notepad++, PHPStorm and VSCodium (the 3 i tried), pressing ( or ) wraps it with it's match.
for example,
abc + ) ==> (abc)
, abc + ( ==> (abc)
, abc + > ==> <abc>
and abc + < ==> <abc>
.-
- Posts: 279
- Joined: 29 Sep 2022 14:20
- Location: Win10 @125%
Re: SurroundSelection Option ?
hi! to me, this change makes no sense at all. am i the only one that thinks this ? unless i am mistaken, i don't believe any other software that supports "surround selection" does this. what would be the purpose of reverse order ? what am i missing ?v26.10.0203 - 2024-06-20 20:27
* Surround Selection: Now when you type the second character of the pair, the selected
text will be surrounded by the pair in reverse order.
the beauty in surround selecting was that you could select either part of the pair and it was smart enough to properly surround it.
-
- Site Admin
- Posts: 63672
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: SurroundSelection Option ?
It's mentioned above: adds more options.
FAQ | XY News RSS | XY Bluesky
-
- Posts: 279
- Joined: 29 Sep 2022 14:20
- Location: Win10 @125%
Re: SurroundSelection Option ?
there appears to be a bug. selecting text and pressing ] results in base ]2024{.
also, argh., this is not better. still makes no sense to me and is opposite from other implementations. the base wish was to surround your selection with a pair, no matter what side was typed. no other "options" were needed. i can't see any reason why the reverse would ever be needed or used.