Subversion Repositories DMV.t01c1

Rev

Blame | Last modification | View Log | Download

remoair.txt
-------------

Macro to remove all 'air' from a textfile. All empty lines are removed. All multiple tabs and spaces are replaced by single tabs and spaces. All preceding and trailing tabs and spaces are are removed.

A useful preparation before importing texts retrieved from various sources (WWW, CD-roms) into a word processor.

Created and contributed by Gerrit Kiers (gkiers@dds.nl)

------------------------------------------
File name:      remoair.tpm
Display name:   Rem&ove all 'air'
Author:         Gerrit Kiers, January 12 1999
Description:    Replace all multiple tabs and spaces with single ones and remove all empty lines

Play once.

Recorded keystrokes:
Ctrl-End
Enter
Enter
F5: Mark All '^[\t ]*$'     [Conditions: Text]
MENU: Edit - Cut other - Bookmarked lines
End
Enter
Enter
F8: Replace All '  +'  with  ' '     [Conditions: Text; RegularE] [Scope: ActiveD]
F8: Replace All '\t '  with  '\t'     [Conditions: Text; RegularE] [Scope: ActiveD]
F8: Replace All ' \t'  with  '\t'     [Conditions: Text; RegularE] [Scope: ActiveD]
F8: Replace All '\t+'  with  '\t'     [Conditions: Text; RegularE] [Scope: ActiveD]
F8: Replace All '^[\t ]+'  with  ''     [Conditions: Text; RegularE] [Scope: ActiveD]
F8: Replace All '[\t ]+$'  with  ''     [Conditions: Text; RegularE] [Scope: ActiveD]
F8: Replace All '\n\n'  with  ''     [Conditions: Text; RegularE] [Scope: ActiveD]
Ctrl-Home.