Personalizing SciTE Intellisense / Autocorrect

uIn this post I leverage two different scripts where I demonstrate how to personalize SciTE Intellisense / Autocorrect.   Both are great ways SciTE Intellisense / Autocorrectto increase your productivity while coding!

Adding Functions/Labels from files/folders to your SciTE Intellisense / Autocorrect

This script can be used to point to specific files/folders and grab labels, functions, etc. and pull them into your Intellisense for you.   This script will generate a “user.ahk.api” file in your default SciTE library and only needs to be run periodically (when you have new functions/labels you want to include).

  • Save BuildUserAhkApi.ahk to a location on your computer (if you save it in your local \lib\folder you will not need to #include it!)
  • From a separate file, call the function and tell it what file(s) /directory you want it to review and what you want it to include (functions and/or labels).  You can also decide to be recursive or not.   I had it import all of my functions from my standard AutoHotkey\lib\ folder but did not include my labels (as they’re really only relevant for an active script).
  • Here is the function and parameters (the last one should not be used):  BuildUserAhkApi(AhkScriptPath, [OverwriteAhkApi, RecurseIncludes, Labels, WrapWidth, AhkApiPath, RecursionCall])
  • Here is how I called mine (note you’ll need to dupate the destination path:

Video demonstrating how it works:

Peronalizing SciTE autocomplete by adding your functions and labels

Adding Functions, Labels, Variables from your current file to your SciTE Intellisense / Autocorrect

In this second example I demonstrate how you can have variables, labels, functions in your current script populate the SciTE Intellisense / Autocorrect.  If you’re like me, you’ll LOVE this functionality because it will help prompt you of the variables, functions, labels you have in the current saved script.  This can drastically increase your productivity!

  • Save AutoComplete.lua to SciTE default directory  ;(See attached or download here)
  • Save UserLuaScript.lua to SciTE default directory (append if you have something there already –I had this file but it does not show up under Option)
  • I’m beta testing this but right now it looks like it works fine-  I added one line @ row 282 to my version . This tells SciTE to update all the time (not waiting for the document to be saved).  So far it seems to work fine but I’m going to give it a bit before recommending…


Personalize SciTE Intellisense with variables, labels, functions from current saved script