Just Great Software

EditPad - Convenient, powerful and versatile text editor to edit all kinds of text files

 Introduction 

 

 Buy Now 

 Our Guarantee 

 Download 

 Testimonials 

 Contact Us 

 

 Features & Benefits 

 Clip Collections 

 Syntax Coloring 

 File Navigation 

 Spell Checker 

 Search & Replace 

 Unicode 

 Running Tools 

 Hexadecimal Mode 

 Tips & Tricks 

 Programmer or Not 

 Many File Types 

 Fully Configurable 

 Portable Editor 

 Get Fonts 

 Screen Shots 

 Linux 

 Languages 

 

 Version History 

 Newsletter 

 Affiliates 

 

 Free EditPad Lite 

 Comparison 

 

 EditPad Classic 

 

 

 

Ace Text - Store, manage, edit and reuse text from a central location
Regex Buddy - Learn, create, understand, test, use and store regular expressions
Regular Expressions Complete Tutorial and Reference
PowerGREP - Find files and information or search and replace through files and folders
HelpScribble - Full-featured help authoring tool for creating help files from start to finish
DeployMaster - Installation builder delivering your software with a good first impression
      

Be More Productive with Your Favorite Text Editor

EditPad Pro Tips and Tricks

Keystroke Macro to Delete All Lines with
Search Matches

EditPad Pro 6 has a new feature that allows you to record and play back keystroke macros. This enables you to automate repetitive editing tasks and create new editing commands that EditPad Pro doesn't support out of the box

Let's start with a macro to delete all lines containing search matches. First, enter the search term in the Search box and select the search options you want. Then move the text cursor to the start of the file.

Select the Start Recording item in the Macros menu. Give the macro a name to begin recording. While recording press F3 to find the next search match, and then press Ctrl+Y to delete the line it's on. Select Stop Recording in the Macros menu to finish the macro.

To delete the line with the next search match, invoke the macro by selecting it from the Macros menu, or by pressing the keyboard shortcut you assigned to it. Deleting search matches one at a time is rather slow. To run a macro repeatedly, select the Organize Macros item in the Macros menu. Select the macro you just recorded. In the Repeat box, enter a number larger than the number of expected search matches, and click the Play Macro button. This will replace all search matches.

A special feature of EditPad Pro's keystroke macros is that a macro will stop running immediately when a search attempt fails to match. E.g. if you tell EditPad Pro to run the macro you just recorded 100 times, but there are only 10 search matches, EditPad Pro will stop playing back the macro after the 11th search match fails. This makes it very easy to use macros to process all search matches. You still need to specify the maximum number of repetitions, to prevent EditPad Pro from getting stuck repeating a macro indefinitely in case the search match never fails for some unforeseen reason.

When you record a macro, EditPad Pro records only exactly those keys you press, and exactly those menu items you select. E.g. the macro you just recorded only contains the Find Next and Delete Line commands. It does not contain the search terms, since you did not change those while recording. This means that you just recorded a generic "delete all lines matching the current search text" macro. If you want to record a macro that uses specific search terms, run the search at least once before recording the macro. This will add the search terms and all options to the History drop-down menu on the Search toolbar. While recording the macro, select that item from the search history. Doing so will record all the search settings into the macro.

When you press a keyboard shortcut associated with a menu item, like F3 for Search|Find Next, the macro will record the menu item rather than the key. If you later assign F3 to another menu item, previously recorded macros will still play back the Find Next command rather than the new menu item you assigned the F3 key to.

      
Only US$ 49.95
Windows 98, ME, NT4, 2000, XP and Vista
100% satisfied or money back
free trial download

 

 

Page URL: http://www.editpadpro.com/trickmacros.html
Page last updated: 12 June 2008
Site last updated: 22 June 2009

Published by Just Great Software Co. Ltd.
Copyright © 2000-2009 Jan Goyvaerts.
All rights reserved.