Author Topic: widen-selection / narrow-selection  (Read 2529 times)

Azethoth

  • Community Member
  • Posts: 10
  • Hero Points: 0
widen-selection / narrow-selection
« on: March 23, 2015, 01:49:33 am »
I have failed at finding the command to "widen" the selection.

For instance, if I single click in a function parameter, then widen-selection would select the parameter. The next widen would select the parameter and its type, next widen selects all the parameters _inside_ the parenthesis for the call.

You can keep widening to select the function call, then the block the function is in etc till eventually the whole file is selected. narrow-selection would do the reverse all the way back to the original click.

I have found select-code-block but it is frustratingly coarse and widens too quickly, and selects the block delimiters, making it basically unusable.

I really miss this from other editors and would love to know if there is a macro or existing functionality and what is it called instead of widen and narrow?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5963
  • Hero Points: 467
Re: widen-selection / narrow-selection
« Reply #1 on: March 23, 2015, 02:01:41 am »
Sounds like your looking for feature done exactly like somewhere else. What product? We will take a look.

Azethoth

  • Community Member
  • Posts: 10
  • Hero Points: 0
Re: widen-selection / narrow-selection
« Reply #2 on: March 23, 2015, 02:30:15 am »
I thought it was in Visual Studio, but looks like I got used addicted to it from CodeRush and Resharper plugins:

https://www.stevefenton.co.uk/Content/Blog/Date/201309/Blog/Visual-Studio-Refactoring-Shortcuts/
« Last Edit: March 23, 2015, 02:32:17 am by Azethoth »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5963
  • Hero Points: 467
Re: widen-selection / narrow-selection
« Reply #3 on: March 23, 2015, 01:57:56 pm »
I tried a CodeRush trial but couldn't get this feature to work at all. It appeared to know that I was pressing a key that had something to do with a selection but nothing reasonable happened. Maybe it's broken for Visual Studio 2012.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5963
  • Hero Points: 467
Re: widen-selection / narrow-selection
« Reply #4 on: March 23, 2015, 02:11:45 pm »
I wonder if CodeRush requires that the code be compiled. I'm not sure if the projects I opened were compiled (one C++, one C#).

Azethoth

  • Community Member
  • Posts: 10
  • Hero Points: 0
Re: widen-selection / narrow-selection
« Reply #5 on: March 25, 2015, 12:43:52 am »
Coderush has training wheels that slowly introduces stuff to you. You would need to get to their intermediate settings at least, or specifically search for the set of command and then enable and bind a key to it.

I think they are ok with C# not being compiled because it can compile in the background and c# is a context free language. They do not have C++ support.

Resharper does have C++ support here: https://www.jetbrains.com/resharper/features/cpp.html
This provides early access installers for both Resharper and C++ on a monthly basis. Still a work in progress but quite useable already.

After installing into VS you can find the commands under ReSharper | Edit | Shrink Selection and Extend Selection