Page 1 of 6 123 ... Last
  1. #1

    Getting the Most Out of Notepad++

    Here are some things that I have found out about Notepad++ (NPP) that I will be using to make it a better FG2 editor.

    First up to bat, full FG2 and Lua keyword spellcheck functionality. This method also supports the right-click "add to dictionary" method.

    To enable the check-as-you-go (red-squiggly line) spell check method and have FG2 & Lua keyword support:
    1. Disable any spellcheck you already have in NPP.

    2. Install the SquigglySpellCheck.dll from http://squiggly.sourceforge.net/ . Then turn on Auto Spell Check in the SquigglySpellChecker menu.

    3. Install the Windows version of Aspell http://aspell.net/win32/

    4. Install at least one Aspell language pack (check your install directory\dict folder to see if one cam pre-installed). If the 'Aspell\dict' folder is not there, create it.

    5. Make sure that aspell-15.dll location must be listed in the system PATH variable. Mine was "C:\Program Files\Aspell\bin". Your PC has to be rebooted for the change to take effect.

    6. Download FG2.rws (inside the the attached FG2.zip file) and put it in the Aspell\dict folder.

    7. Download the attached Lua.rws when it is ready.. give me a few days and put it in the Aspell\dict folder.

    8. In the Aspell\dict folder you sill see a file that ends in 'multi' that is for your chosen language. Mine was called "en_US.multi". Open it in notepad. Add a line at that says "add FG2.rws" to the bottom. Mine looked like this:
    Code:
    # Generated with Aspell Dicts "proc" script version 0.50.1
    strip-accents true
    add en-only.rws
    add en_US-only.rws
    add FG2.rws
    9. Open NPP and all should be fine.

    10. You can make your own RWS files by:
    a. Put a txt file in the Aspell\bin folder containing a list (one per line) of words. All of the words must contain only letters; no numbers, symbols, or spaces.
    b. Run the following command from the Aspell\bin folder:
    Code:
    aspell --lang=en create master ./custom.rws < custom.txt
    you can name the txt and rws files however you like.
    c. Change your ".multi" file and add the new name (as in #8 above).

    Here is a sample. Notice that the FG2 keywords are recognized as spelled correctly. The "elseif" will be recognized as soon as I have the Lua.rws finished.


    Another thing you can do now is enable the "Function List" ability of NPP. Just make sure that the Lua language is selected and the list will be populated with all the functions.


    -----------The following feature has not been completed yet-----------
    Next up, full auto-completion for Lua and FG2 keywords and functions. Look at this YouTube vid for a sample of how this will work. http://www.youtube.com/watch?v=muJvM-Hz6w4


    -----------The following feature has not been completed yet-----------
    Last up, at least for now, is linking the keywords to my helpfile. In other words you will be able to put your cursor over a keyword and press ctrl-F1 and the helpfile will open up to the appropriate page.
    Attached Files Attached Files
    Last edited by SpudmanWP; January 21st, 2011 at 16:18.
    'Build it and they will come'
    Universal Table Rolling Get it HERE
    FG2 Help Files Get it HERE
    Getting the Most Out of Notepad++ (FG2 & Lua spellcheck & Auto-Completion) Get it HERE
    Printing the contents of a table Get it HERE

  2. #2
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,656
    Blog Entries
    2
    Neat stuff. I have been using Notepad++ for a while now and use my own custom plugins for FGII/4EParser, however I struggled with getting auto-complete to work so gave up.

    Thanks a lot, this should come in really handy.

    DrZ.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  3. #3
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,656
    Blog Entries
    2
    I get to step 6 but cannot find the dict folder in the Aspel program directory, all I have is bin, data and doc, 2 text files and a couple of uninstall files. Where did I go wrong?
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  4. #4
    If the 'dict' folder is not there, create it.
    'Build it and they will come'
    Universal Table Rolling Get it HERE
    FG2 Help Files Get it HERE
    Getting the Most Out of Notepad++ (FG2 & Lua spellcheck & Auto-Completion) Get it HERE
    Printing the contents of a table Get it HERE

  5. #5
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,656
    Blog Entries
    2
    Thanks, its installed. I have disabled the NPP SpellChecker plugin, opened a LUA script file, set language to LUA (NPP does this by default for .lua files) but cannot genuinely see any difference.

    Keywords are highlighted blue (but then they were before) as a result of LUA language being set. I don't see the Functions in Functions List and commands keywords don't auto-complete. Am I right in thinking I need to wait for your lua.rws file?
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  6. #6
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,656
    Blog Entries
    2
    Thanks, its installed. I have disabled the NPP SpellChecker plugin, opened a LUA script file, set language to LUA (NPP does this by default for .lua files) but cannot genuinely see any difference.

    Keywords are highlighted blue (but then they were before) as a result of LUA language being set. I don't see the Functions in Functions List and commands keywords don't auto-complete. Am I right in thinking I need to wait for your lua.rws file?

    EDIT: I have uninstalled the Function List plugin, it kept crashing NPP on start-up and its noted as being rather unstable. Shame.

    EDIT 2: OK, figured out the problem. I had a conflicting plugin. Now that its working I can see the value of Function List, very useful having a quick bookmark of every function in the script. Makes working on single large .lua files much easier. Thanks.

    EDIT 3: Yay Got auto-completion working - sort of. I enabled 'Enable auto-completion on each input' and 'Function parameters hint on input' and ticked the 'Word Completion' option as opposed to the default 'Function completion'. Now when I type I get a drop down context list with a list of similar spelled words. It seems to also pick up all the functions in the script. Nice.
    Last edited by Zeus; January 21st, 2011 at 12:43.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  7. #7
    phantomwhale's Avatar
    Join Date
    Aug 2007
    Location
    Melbourne, Australia
    Posts
    1,349
    Loving what your saying here.

    I followed the above, and also

    * Went into the SquigglySpellChecker settings -> Aspell settings and changed to use the language of choice (en_GB for this brit).
    * Turned on Auto Spell Check in the SquigglySpellChecker menu

    But I'm a little puzzled if I've done this right, as I'm seeing a LOT of red lines (more than would make this useful to me). I'm hoping the answer is I need to wait for the lua.rws file, but I suspect I'm hoping for more than is being suggested !

    Anyway, what I am seeing, for instance is :



    Ideally, I'd like to see no red lines here, of course ! As...

    onHotKey is a function name, and unlikely to be a word in the English language.
    nextActor() and nextRound() are functions that exist
    draginfo is an already defined function parameter
    etc...

    You seem to have far fewer red lines on your example, so maybe I need to wait for the final instructions here. But I think there is something else missing.

    Anyway, look forward to seeing where this thread is going ! Help linking will be cool too.
    Ben

  8. #8
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,656
    Blog Entries
    2
    This is a great find. Well done SpudmanWP - you get some nice rep for this one

    phantomwhale - If you right click a word thats coming up as misspelt (i.e. with a squiggly red line), right click it and add to dictionary. This allows you to build your own custom FGII/LUA/XML dictionary as you work, it even adds the words to the auto-completion context lists
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  9. #9
    Zeus's Avatar
    Join Date
    Mar 2009
    Location
    Olympus
    Posts
    2,656
    Blog Entries
    2
    Ooh just had a thought. We could add a custom dictionary for the 4EParser tags.
    FG Project Development
    Next Project(s)*: Starfinder v1.2 Starship Combat

    Current Project:
    Starfinder v1.1 - Character Starships
    Completed Projects: Starfinder Ruleset v1.0, Starfinder Core Rulebook, Alien Archive, Paizo Pathfinder Official Theme, D&D 5E data updates
    * All fluid by nature and therefore subject to change.

  10. #10
    phantomwhale's Avatar
    Join Date
    Aug 2007
    Location
    Melbourne, Australia
    Posts
    1,349
    Quote Originally Posted by DrZeuss
    This is a great find. Well done SpudmanWP - you get some nice rep for this one

    phantomwhale - If you right click a word thats coming up as misspelt (i.e. with a squiggly red line), right click it and add to dictionary. This allows you to build your own custom FGII/LUA/XML dictionary as you work, it even adds the words to the auto-completion context lists
    Ah, that's what I thought - not sure adding local variable names and string definitions to a global dictionary is going to create a more solid programming tool for me - suspect I might get as many false positives as much as it would prevent typo bugs - but haven't fully tried it yet I'll admit.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Log in

Log in