Proton BASIC Compiler - Using Notepad++ with Proton+ Compiler


  • PicŪ Basic


  • Using Notepad++ with Proton+ Compiler

    Notepad++ has a few advantages over the PDS IDE, primarily the ability to fold code. Here are the steps to make it Proton friendly.

    Download, rename, and save the userDefineLang.xml file in the C:\Documents and Settings\YourUserName\Application Data\Notepad++ folder. (I'm using XP.) You will need to add it to the existing file if you have modified it. You can probably replace the original if you have a fresh install.

    userDefineLang.xml.txt

    This file sets parameters for PDS:
    • Sets bas pbp ppi files to automatically be shown as PicBasic type. You may add other extensions if needed. (You can rename the type if you are picky.)
    • Adds Keywords for highlighting
    • Defines Comment
    • Adds ;region ;endregion ;sub and ;endsub keywords for code folding. To use, place the keyword (including the semicolon) on a line. I like to use the ;sub keywords on a Label: line, with ;endsub at the Return. I use ;region keywords where I declare variables, and in code blocks (for instance, wrapped around all of the serial subroutines, or the interrupts). Feel free to add new keywords for While or IF statements. (View-->UserDefined Languages)
    • etc.

    Here are the primary differences between using Notepad++ and PDS' IDE:
    • ++ UNDO actually WORKS with Block Comments!!! Hooray!!!
    • -No tooltips for basic commands
    • +highighting a word with double-click highlights all instances of that whole word.
    • +Code Folding is now available if you insert the appropriate key words into the text.
    • -hitting F3 with a word highlighted searches the LAST search, but hitting ctrl-F DOES place the highlighted word in the search text.
    • -AutoHotKey required for one-key compiling; otherwise save the file then switch to PDS. (See below.)

    Notepad++ & Proton F10 Hotkey & File Combining Script
    Notepad++ hotkey + combiner.zip
    Here is an AutoHotKey script that works with Notepad++ and Proton's IDE. To use, you will need to install AutoHotKey on your PC, and run the script. You can view the script in NP++ to see that it is not harmful.

    Press F10 to activate.

    It does two things. First, it will parse a ".bas" file for the "Include" statement, and create a single file that contains the contents of all files. This is because some commands and/or features (i.e. the preprocessor) behave differently if they are Included rather than part of the original file.

    Second, it compiles the "Combo" file if you have it open in PDS.