Scite Favs

lua-users home


One functionality I always missed in SciTE is a favourites manager. I also had some requirements that a possible solution should match. First of all, it should work both on Windows and Unix (tested on Linux). Second, the favourites list should be easily customizable. Third, nonexistent files should be ignored. As I found out, all this could be done with Lua. Here I present my solution. Enjoy! :-)


To install, put Files:wiki_insecure/editors/SciTE/favs.lua in your SciTE directory (or wherever you store Lua scripts for SciTE). Then, ensure the file is loaded during SciTE startup. One way to do that is create a file called SciTEStartup.lua in your SciTE directory and put the following line in it:

If you have not already done it, you will have to tell SciTE which file to load as the Lua startup script: Add the following to your User or Global Options File:


Finally, the new favourites feature needs a trigger. I used Ctrl+- since this is pretty well accessible on a German keyboard. YMMV. Add the following to your User or Global Options File:*=Favourites

After a restart, the favourites feature should be ready for use. All you need now are valid entries in your favourites file (see below).


The actual favourites are stored in an extra file so that you can have different ones for different operating systems and users. Depending on your platform, the favourites file needs to be located at %USERPROFILE%\SciTE.favs (Windows) or $HOME/.SciTE.favs (Unix, e.g. Linux). The contents of the file are simply your favourite files, one per line, with complete paths. No need to escape anything.

Example SciTE.favs for Windows:

C:\path\to\some file.txt

Example .SciTE.favs for Linux:

/path/to/some file.txt


changed original script to close file-handles

Frank Wunderlich

RecentChanges · preferences
edit · history
Last edited February 7, 2007 8:11 pm GMT (diff)