Author Topic: Select while finding  (Read 1362 times)

Margaret

  • Community Member
  • Posts: 70
  • Hero Points: 0
Select while finding
« on: August 15, 2015, 03:00:14 pm »
I'm trying to filter a file using a macro (I could probably do it in php faster, but I'd have to re-install php first). 

From my current cursor position, I want to find the next appearance of some keyword while selecting the intervening text for deletion.  But I can't figure out how.  Holding down shift while clicking "find" in the dialog doesn't work.  I'm using V12/2007 under XP, if that matters.

hs2

  • Senior Community Member
  • Posts: 2737
  • Hero Points: 288
Re: Select while finding
« Reply #1 on: August 15, 2015, 05:44:45 pm »
(start) select, do a search, delete on hit and deselect otherwise.
It should be that simple. You could record this sequence as macro as starting point.
Good luck, HS2

Margaret

  • Community Member
  • Posts: 70
  • Hero Points: 0
Re: Select while finding
« Reply #2 on: August 15, 2015, 06:34:39 pm »
(start) select, do a search, delete on hit and deselect otherwise.
It should be that simple.
That's the problem -- if there's a way to toggle selection while recording a macro, I don't know what it is.  There's no menu item I can find for it, and I can't call an internal routine by clicking esc because that aborts the macro generation.  I'm sure I've done this before, but I'm cursëd if I can remember how.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4690
  • Hero Points: 378
Re: Select while finding
« Reply #3 on: August 15, 2015, 09:24:00 pm »
select-char is the command you want. It's probably bound to some key in your emulation. I'm not in front of SlickEdit right now. Otherwise I could give you more help.

Margaret

  • Community Member
  • Posts: 70
  • Hero Points: 0
Re: Select while finding
« Reply #4 on: August 15, 2015, 10:40:00 pm »
select-char is the command you want.
I thought of that one --it's bound to F8-- but apparently Find just moves the cursor without creating a selection from the F8 point, because after the find, the token found is selected and can be deleted but the intervening text isn't and can't.

There don't appear to be any relevant settings in the prefs.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4690
  • Hero Points: 378
Re: Select while finding
« Reply #5 on: August 16, 2015, 12:57:37 am »
Theres an option for selecting what's found. I think it's just a global option. That's makes recording this macro a bit ugly. I have that option off.