Programmers Notepad 2 User Tools
Programmers Notepad 2 has a very useful tools feature. The configuration is kept in the %APPDATA%\Echo Software\PN2 folder as UserTools.xml
The format is fairly simple. Here is my UserTools.xml file:
<schemetools> <global> <tool command="C:\Program Files\Scintilla Text Editor\SciTE.exe" flags="40" folder="" index="0" name="SciTE" params=""%d%f"" parsepattern="" shortcut="0"></tool> <tool command="C:\Program Files\FileZilla\FileZilla.exe" flags="40" folder="%d" index="1" name="FileZilla" params="" parsepattern="" shortcut="0"></tool> <tool command="explorer.exe" flags="40" folder="" index="2" name="Windows Explorer" params="%d" parsepattern="" shortcut="0"></tool> <tool command="cmd" flags="40" folder="" index="3" name="Command Prompt" params="/k cd %d" parsepattern="" shortcut="0"></tool> <tool command="mmc" flags="40" folder="" index="4" name="IIS" params="C:\WINNT\System32\Inetsrv\iis.msc" parsepattern="" shortcut="0"></tool> <tool command="svn" flags="33" folder="%d" index="5" name="svn add" params="add "%f"" parsepattern="" shortcut="0"></tool> <tool command="svn" flags="33" folder="%d" index="6" name="svn add (all in folder)" params="add *" parsepattern="" shortcut="0"></tool> <tool command="svn" flags="97" folder="%d" index="7" name="svn commit" params="commit "%f" --message "%?"" parsepattern="" shortcut="0"></tool> <tool command="svn" flags="33" folder="%d" index="8" name="svn commit (folder)" params="commit --message "%?"" parsepattern="" shortcut="0"></tool> <tool command="svn" flags="33" folder="%d" index="9" name="svn commit (folder, non-recursive)" params="commit --non-recursive --message "%?"" parsepattern="" shortcut="0"></tool> <tool command="svn" flags="33" folder="%d" index="10" name="svn diff" params="diff "%f"" parsepattern="" shortcut="0"></tool> <tool command="svn" flags="33" folder="%d" index="11" name="svn info" params="info "%f"" parsepattern="" shortcut="0"></tool> <tool command="svn" flags="33" folder="%d" index="12" name="svn status" params="status "%f"" parsepattern="" shortcut="0"></tool> <tool command="svn" flags="33" folder="%d" index="13" name="svn status (folder)" params="status" parsepattern="" shortcut="0"></tool> <tool command="svn" flags="33" folder="%d" index="14" name="svn status (folder, non-recursive)" params="status --non-recursive" parsepattern="" shortcut="0"></tool> <tool command="svn" flags="35" folder="%d" index="15" name="svn update" params="update "%f"" parsepattern="" shortcut="0"></tool> </global> <scheme name="csharp"> <tool command="C:\Program Files\SharpDevelop\bin\SharpDevelop.exe" flags="41" folder="" index="0" name="SharpDevelop" params=""%d%f"" parsepattern="" shortcut="0"></tool> </scheme> <scheme name="web"> <tool command="tidy" flags="1569" folder="" index="0" name="Tidy" params="-i -asxhtml -wrap 230 --indent-spaces 4 -q" parsepattern="" shortcut="0"></tool> </scheme> <scheme name="xml"> <tool command="tidy" flags="1569" folder="" index="0" name="Tidy" params="-i -xml -wrap 230 --indent-spaces 4 -q" parsepattern="" shortcut="0"></tool> </scheme> </schemetools>
As you can see, the root tag is '<schemetools>'. There is one '<global>' tag under this with tools common to all files. There are also several '<scheme>' tags with tools for each scheme.
Under '<global>' and '<scheme>' you can have '<tool>', with the following attributes:
- command: path to the executable to run, include full path if not in any of the folders listed in the PATH environment variable.
- flags: various preferences set using checkboxes and dropdowns in the tool properties (i.e. those that are not set with any other attributes for the '<tool>' tag)
- folder: which folder the tool starts in
- index: where it appears in the tool list
- name: what you see when you use the Tools menu
- params: parameters you pass on the the command
- parsepattern: pattern for custom output parsing
- shortcut: keyboard shortcut for the tool. 0 means no shortcut. Calculate by adding one or more modifiers to numbers, numpad, cursor, letter or function key values.
- Modifiers: SHIFT = 256, CTRL = 512, ALT = 1024
- Numbers: 0 = 48, 1 = 49, 2 = 50, 3 = 51, 4 = 52, 5 = 53, 6 = 54, 7 = 55, 8 = 56, 9 = 57
- Numpad: 0 = 96, 1 = 97, 2 = 98, 3 = 99, 4 = 100, 5 = 101, 6 = 102, 7 = 103, 8 = 104, 9 = 105, * = 106, + = 107, - = 109, . = 110, / = 2159
- Cursor: UP = 2086, DOWN = 2088, LEFT = 2085, RIGHT = 2087
- Letters: A = 65, B = 66, C = 67, D = 68, E = 69, F = 70, G = 71, H = 72, I = 73, J = 74, K = 75, L = 76, M = 77, N = 78, O = 79, P = 80, Q = 81, R = 82, S = 83, T = 84, U = 85, V = 86, W = 87, X = 88, Y = 89, Z = 90
- Function Keys: F1 = 112, F2 = 113, F3 = 114, F4 = 115, F5 = 116, F6 = 117, F7 = 118, F8 = 119, F9 = 120, F10 = 121, F11 = 122, F12 = 123
You cannot use a modifier on its own. You can combine modifiers with numbers, letters or function keys. You can have only one number, letter, or function key in a shortcut (so no F1 + A).
For example, CTRL + ALT + Numpad * = 512 + 1024 + 106 = 1642
Comments