Author Topic: Save a Search/Replace  (Read 10326 times)

Lisa

  • Senior Community Member
  • Posts: 238
  • Hero Points: 24
  • User-friendly geek-speak translator extraordinaire
Save a Search/Replace
« on: November 13, 2007, 02:38:34 PM »
When using the Find and Replace tool window, you can save the information you’ve entered for all fields, including search/replace strings, look-in location, and option settings, as a named operation. This way, you can quickly repeat the search/replace in the future. To save a search/replace, right-click in the tool window and select Saved Search Expressions > Save Search Expression. Enter a name and click OK. To load a saved search/replace, right-click in the tool window and select the desired operation from the Saved Search Expressions > Saved List submenu.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Save a Search/Replace
« Reply #1 on: November 13, 2007, 10:47:38 PM »
Amazing - didn't know that. This helps me a lot b/c I've to use varying sets of file types/exclude paths for different workspaces. So I've created a working set of these search templates and I'm using them now. Cool !
BTW: Why is it required to enter at least 1 char in the search field ? It's a minor issue since it's selected on restore and it's imm. overtyped when entering a new search expression.
Thanks,
HS2

Edit: Even better - the templates are stored in an editable xml file: VSLICKCONFIG\searches.xml :)
« Last Edit: November 13, 2007, 10:51:36 PM by hs2 »

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Save a Search/Replace
« Reply #2 on: November 14, 2007, 12:15:22 AM »
Oops - I somehow thought that all settings of the Search TB are saved/restored but that's not the case :(
Even worse just the basic set of search options handled which renders the feature almost unusable for me - unfortunately.
Well - except as backup for sophisticated regular expressions.
Any plans to handle all options in a future version ? That would be really cool...
Thanks,
HS2
« Last Edit: November 14, 2007, 12:19:49 AM by hs2 »

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Save a Search/Replace
« Reply #3 on: November 14, 2007, 02:07:13 PM »
Which settings aren't restored that you need?  The output options aren't restored, and that was originally by design, but we certainly can add those if those are the ones you need restored.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Save a Search/Replace
« Reply #4 on: November 14, 2007, 02:17:33 PM »
The exclude lists would be a good help (which I always forget...).
But I think it would be a deluxe-feature if the complete dialog is restored in the sense of a 'Search TB' template.
Why not ? Except causing a lot of additional work and the usual lack of time/resources to do it - sorry ;)
Thanks,
HS2

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Save a Search/Replace
« Reply #5 on: November 14, 2007, 02:38:12 PM »
Excludes are saved/restored in the 12.0.3 release, though the original Look In: path is not saved/restore (originally by design IIRC), but we can also change that pretty easily.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Save a Search/Replace
« Reply #6 on: November 14, 2007, 02:53:53 PM »
Ah - I see that it's saved in 'searches.xml'.
Ok - now I know what's going on. It seems that file types and excludes are only saved if one of the multi-file tabs is active when saving a search. Restore works on any tab and 'Save' should also work this way IMO.

HS2

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: Save a Search/Replace
« Reply #7 on: November 14, 2007, 05:45:52 PM »
One more thing. The options which are not saved/restored shouldn't be reset on load.
HS2