Macro for Text Prefix and Suffix in HTML :PSPAD Tutorial

Some times its very annoying to go to every html file and make changes to it .

Hence Macro came in action , PSPAD is excellent tool  for Code editing. (But i would recommend Notepad++ by my self)

PSPAD has a great feature called Macros, You can record them or even Type to code them.

Now Problem: Problem is to add Prefix and Suffix to any selected Text

 

Example

Our Text is here , You may want to add some Prefix/Suffix or Tags before and after it.

So it may look like

functionx(“Our Text is here , You may want to add”)

or /”Our Text is here , You may want to add“anytext here

or anytexthereOur Text is here , You may want to addanytexthere

 

To do this

Goto PSPAD>Tools>Macro>Start Stop Recording

Now Repeat the process

Goto PSPAD>Tools>Macro>Start Stop Recording

 

Now PSPAD will ask you to save it via a Name

save it with say “PrefixSuffix”

Now goto

Goto PSPAD>Tools>Macro>Macro Manager

and Select Your PrefixSuffix Macro

Edit it

and Paste Following Code there

ecCopy
ecChar{You can Type any Prefix here Between Curly braces}
ecPaste
ecChar{You can Type any suffix here Between Curly braces}

You can now Give a shortcut to it . Say Like F5

 

So now when ever you select a text and press F5 , This macro is going to work