18

I was wondering if there is an easy way to put entire lumps of text in tags in Notepad++.

For example, say I have the following:

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Is there a way how I can select the text in each line and then press a hotkey or something, and have all the text I just selected encased in a tag (such as a p tag)?

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

3 Answers 3

25

Have a look at the Macro capabilities of Notepad++.

Your Macro would do the following, giving you have selected the Text to put in Tags.

CTRL-X
Type: <p>
CTRL-V
Type: </p>
0
-1

For more functionality you can also try the plugin "WebEdit" or the plugin "Zen Coding - Python". I use that last one myself, but you'll have to install the "Python Script" plugin too, and install Python on your comp...

-1

if you want to wrap every line in list with "tag"
then select lines, go to Plugins / Emmet / Wrap with abbreviation / Enter abbreviation: tag* / press "OK"

Not the answer you're looking for? Browse other questions tagged or ask your own question.