Page 1 of 1

EditPadPro editing tips

Posted: 2008-08-04 17:34:56
by Snake Man
EditPadPro is the greatest text editor I've seen so far. Anyone whos been in OFP or ArmA (config) editing more than few days knows that you should not edit config files with notepad, ever.

You can download EditPadPro (EPP for short) from www.editpadpro.com.

This topic is for neat tricks you should or could do with it.

For example when I install the util, first I do is to add those ArmA files into the known filetypes. Do this by choosing Options -> Configure File Types. From there click New, then write SQS/SQF into the Description line, file maks line add: *.sqs, *.sqf but I believe *.sq? works also. Now choose Syntax & Navigation tab and select Syntax coloring scheme C/C++ and click ok. Now you have nice formatting and coloring for all your sqs and sqf scripts.

Regular Expressions

Regular expressions are powerful editing things. To run regular expressions in the search box, tick the Regular Expression tick box.

For example if you want to remove all duplicate lines from your text file, hit CTRL-F to open the search box, then write to the search field:

Code: Select all

(.*)
\1

Which should be "(.*) NEWLINE \1 NEWLINE EMPTYLINE" if you know what I mean. Then in the replace field put:

Code: Select all

\1

Which should be "\1 NEWLINE", now run it and it should remove all dupe lines.

More tips will be added to this first post when I encounter them. Big thanks goes for Q whos always advocating EPP and the-f also, they have helped me much on EPP editing tips.

Posted: 2008-08-04 18:03:20
by the-f

Code: Select all

.*(whatever).*

removes the line in which whatever is

from
my house
whatever
is there
to
my house
is there

Code: Select all

^(?!.*?(whatever|something)).*

removes lines in which whatever or something isn't in

from
my house
whatever
is there
something else
whatever something else
to
whatever
something else
whatever something else

Posted: 2008-08-04 18:12:25
by PROPER.Q

Re: EditPadPro editing tips

Posted: 2009-03-22 13:36:48
by Snake Man
If you want to quickly extract OFP/ArmA class names and weapon/magazine names, do the following.

Good combination is to open OFP/ArmA config.cpp, then do search for classes, magazines, weapons and remove everything else:

Code: Select all

^(?!.*?(class|magazine|weapon)).*
Now the result is only classes and the weapon/magazine lines, but a lot of empty lines between them depending on your config.cpp layout, so what to do? Well then do the above delete duplicate lines and it looks neat and tidy, like below.

To delete all duplicate lines do this:

Code: Select all

^(.*)(\r?\n\1)+$
To replace with:

Code: Select all

\1
Now you can remove the tab + class:

Code: Select all

\tclass 
Notice the ending empty " " in after the class string.

Then the ending : and inheritance class too with:

Code: Select all

shift-enter
shift-enter
Replaced with:

Code: Select all

shift-enter
Hope that all makes sense :)

Re: EditPadPro editing tips

Posted: 2009-03-23 23:14:15
by Vigilante
cool, i never got that expressions thing, but im using EPP for long time now... i even checked out the other tools by that company/guy... like the clipboard tool and such, very nice introduction Snake_Man thanks...