UltraEdit macro to help output debugging Velocity code in HTML

UltraEdit is my text editor of choice, and right now I am working with Velocty scripting for dotCMS. Like Bash or jQuery, it uses the dollar sign $ to denote variables. Frequently I want to debug some variable by outputting it's value in HTML. For example:

<p>Rob here with variableName [$variableName]</p>

I do this often enough that I have created an UltraEdit macro to make is easier. Make sure you have the variable name (e.g. variableName copied to the clipboard and then run this macro. It will ouput variableName [$variableName]

InsertMode
ColumnModeOff
HexOff
Paste
" [$"
Paste
"]"

If you appreciate this, you might like to have a look at the other UltraEdit macros I use.

Popular Posts