Notepad++ allows you to create macros which you can use to perform repetitive tasks. These macros are stored in the shortcuts.xml file and this can be manually edited to create new macros.
So you can record a macro, view the shortcut.xml file and extract the resulting lines. These can be modified and pasted to create a more complicated macro.
One important thing to note is that Notepad++ refreshes the shortcuts.xml file on exit so you are best editing the file in a separate text editor otherwise your edits may be overwritten.
I wanted to replace multi blocks of text so I recorded a macro, saved it and then examined the shortcuts.xml file to find out what the required commands were. Macro definitions are included within the <Macros> block and in the example below you can see the definition of a macro called "Matts Macro" :
...
<InternalCommands />
<Macros>
<Macro name="Matts Macro" Ctrl="no" Alt="no" Shift="no" Key="0">
<Action type="3" message="1700" wParam="0" lParam="0" sParam="" />
<Action type="3" message="1601" wParam="0" lParam="0" sParam="<table>" />
<Action type="3" message="1625" wParam="0" lParam="1" sParam="" />
<Action type="3" message="1602" wParam="0" lParam="0" sParam="[table]" />
<Action type="3" message="1702" wParam="0" lParam="512" sParam="" />
<Action type="3" message="1701" wParam="0" lParam="1609" sParam="" />
</Macro>
</Macros>
<UserDefinedCommands>
...