Abdelrahman Hafez Abdelrahman Hafez - 3 months ago 9x
Node.js Question

Notepad++ add custom tags to line

I am new to NodeJS, and I found myself typing EJS tags quite a lot, and I was wondering if there is a plugin that can help me select a line, press a custom hotkey, and get my line transformed from

for (var i = 0; i < colors.length; i++) {


<%for (var i = 0; i < colors.length; i++) {%>

or any other tags I want to set, using a hotkey.


You can record your own macro which will do exactly what you are looking for.

here is a step-by-step method to do your desired macro:

1- Place the cursor inside a text line inside your opened text file.

2- Open the "Macro" menu, and click "Start Recording" (or click the red "record" button in the toolbar).

3- Click "Home" to move to the beginning of the text line.

4- type "<% ". (note the space at the end)

5- click "End" to move to the end of the text line.

6- type " %>" (note the space at the beginning).

7- from the Macro menu, click "Stop Recording" to finish recording your macro.

8- save your macro by click on "Save Current recorder Macro As..." and give it a name and a shortcut key

9- test it and enjoy :)