Dejan Kozina - 2008-06-15

Hello all!

I've been playing with shortcuts.xml and just managed to configure NPP to launch what I believe to be one of the best examples around of how documentation should be done - the Extended HTML Help file for PHP (http://www.php.net/docs-echm.php). Thought I might just share it.

Assuming one expanded the downloaded zip file into c:\Program Files\PhpManual the correct command to add to the UserDefinedCommands section of shortcuts.xml is (newlines added for readability):

    <Command name="PHP Manual" Ctrl="yes" Alt="yes" Shift="no" Key="116">
    hh.exe "ms-its:c:/Program Files/Phpmanual/php_manual_en.chm::/function.$(CURRENT_WORD).html"
    </Command>

Done this, save the file and open a .php file in NPP. Highlight a function, press ALT+CTRL+F5 (or click Run -> PHP Manual) and the CHM file willopen at the requested page.

Another CHM file with a usable internal structure is the one for the ADOdb database abstraction library (http://adodb.sourceforge.net/). Here goes the command:

    <Command name="AdoDB Manual" Ctrl="yes" Alt="yes" Shift="yes" Key="117">
    hh.exe "ms-its:c:/Program Files/ADOdb.Manual.chm::/reference.functions.$(CURRENT_WORD).html"
    </Command>

One more tool that ended hooked up to NPP is JSLint (http://www.jslint.com/), a syntax checker for Javascript code. This should do:

    <Command name="JSLint" Ctrl="yes" Alt="yes" Shift="no" Key="117">
    "C:\Program Files\JSLint\jsl.exe" -conf "C:\Program Files\JSLint\jsl.default.conf"
     -process "$(FULL_CURRENT_PATH)" pauseatend
    </Command>

This one is supposed to be launched on Javascript files (svae the file to disk first). A DOS windows will show you any syntax error in your script. Nice to have at hand...

djn

P.S.: What other command line tools are you using for web development?