How to trim whitespace in SciTE: #1 hack to clean your code!

trim whitespace in SciTE

How to Automatically trim whitespace in SciTE upon file save is super-easy!   A minor tweak to the trim whitespace in will tell SciTE to, automatically, trim spaces, tabs, etc. from the end of each line.

The following example is what I added to have it apply to my AutoHotkey files (which have an extension of .ahk).  If you have file patterns you can achieve the same goal by using something like this:



How to trim whitespace in SciTE upon file save

Customize your SciTE context menu: Make your favorite commands 1 click away with this simple hack

Customize your SciTE context menuOne of my favorite things about SciTE is that it is highly customizable!   If you have favorite commands you frequently use it is really easy to add them to Customize your SciTE context menu.

By tweaking your file you can easily make your favorite commands one click away!

Here is text from my User.Properties file.  Make sure you check out this url for additional commands/examples.

Customize your SciTE context menu

How to open SciTE multiple times with a cool hack to your SciTE file

open SciTE multiple timesHow to open SciTE multiple times

Typically I like having one SciTE window with multiple tabs however, at times, it is very handy to have a Second SciTE window.

Making a minor tweak to your file is an easy way to achieve this.

Just open your current file and add the below code to it.  You can find out more about SciTE4Autohotkey here
For a quick review of how it works and how to add it you can check out this video

How to open SciTE multiple times


Running selected text in SciTE- Great tip for long AutoHotkey scripts

Running selected text in SciTE

Running selected text in SciTE

When working on longer AutoHotkey scripts, I love being able to just highlight some text and run only it.  This is possible from making some tweaks to your User.Properties file and using this file by JoeDF.

Here is the text you’ll add to your User.Properties file:

#***********Run selection in AutoHotkey*******************$(file.patterns.ahk)=Run selection
#                                  Path to AutoHotkey.exe			Path to SelectRun.ahk
command.45.$(file.patterns.ahk)="B:\Progs\AutoHotkey_L\AutoHotkey.exe" "B:\SelectRun.ahk"

In the below video I walk through how to make updates to the User.Properties file as well as demonstrate Running selected text in SciTE.