Author Topic: Incrementally 'select' in the enclosing context...  (Read 849 times)


  • Senior Community Member
  • Posts: 191
  • Hero Points: 13
Incrementally 'select' in the enclosing context...
« on: August 15, 2015, 08:14:43 pm »
Here's a command idea, that I haven't seen anywhere (though my experience is limited to slick/brief and vi)..

Someone taught me a command in vi: ci" - This lets me changed the text between a pair of quotes. This doesn't work in slick's vim emulation... But it got me thinking...

I would love a command that would incrementally 'select' in the enclosing context...

For example, the following code:

Code: [Select]
int blah(int myvar)
    if(myvar == 7)
        sprintf("var is %d!\n", myvar);

Now put the cursor in between the i and s in the sprintf line... Run this command... The first time, it selects everything between the quotes (not including, may thats an option, to be inclusive?). The second time you the command, it selects everything between the ()'s... Another run gives you everything in the {} of the if. Next run is the interior of the function. One more would be the entire file?

I mostly want this for selecting between a single context (quotes, ()'s, <>'s, etc), but the incremental part would be nice too.

Does something this already exist in Slick, that I can bind to in Brief mode? Or possible to create it?


  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5735
  • Hero Points: 458
Re: Incrementally 'select' in the enclosing context...
« Reply #1 on: August 15, 2015, 09:18:09 pm »
The select-code-block command is somewhat similar except that the first granularity is a statement. I thinks it's called select-code-block and it may be accessible from the menu. I'm not in front of SlickEdit right now.