Documentation (Status: v0.1 alpha)
Introduction
This documentation describes the usage of the SEATD for SciTE extension.
Note that SEATD for SciTE currently only works on windows.
SEATD for SciTE provides basic code navigation functionality for the D programming language as it has become state of the art for mainstream languages.
This includes "goto declaration" and "goto module" functions that work with less typing and a lot more effective than using simple text or regular expression search.
Usage
SEATD for SciTE is ready for use without any extra configuration.
If the file you are editing is a D source file (uses the D lexer style in SciTE or has a filename ending in ".d" or ".di"), you can use the semantic code navigation.
Pressing Alt+D (on how to change the shortcuts mentioned here, see Configuration) pops up a list of the declarations in the current file.
Pressing Alt+M pops up a list of modules.
Selecting a declaration or module in such a list jumps to the first line of the declaration or module.
You can also type a substring of the name you are looking for, to reduce the number of items listed.
The list will shrink as you type and expand again if you use backspace.
Pressing F12 will search for a declaration with an identifier equal to the one under the cursor and jump there if successful.
If you move the cursor over the module name of an import declaration, it will jump to that module.
As of now, SEATD for SciTE does not cache parsed files on disk.
Therefore, using one of the navigation commands for the first time during a session may take a few seconds, depending on how many dependencies need ot be parsed.
The parser does not issue any errors. It will always try to recover from errors and parse as much of the source file as possible.
It will print a message in SciTE's output pane once, if it cannot find a module that is imported directly or indirectly by the current file.
As of now, if a module hasn't been found and you adjust the include path to correct that, you will have to restart SciTE to force a retry.
Configuration
Include path
SEATD for SciTE has minimal configuration requirements.
It only needs an include path to find D source files that correspond to the module names that appear in import statements.
If no explicit include path is given, it tries to figure it out by itself.
In order to do so, the path of the current file and it's module name (if available) is used.
For example, from a D file "/project/src/pak/bla.d" with a module declaration "module pak.bla;", SEATD for SciTE will extract "/project/src/pak/" and "/project/src/".
To specify include paths that are outside of the project's source directory, you can set a global and a local include path.
SEATD for SciTE is configured through SciTE's properties files.
To be able to have different settings on installation-, user- and project-level, SciTE allows global-, user- and directory option files.
Usually, you only change the user- and directory options.
The global include path is supposed to be set in SciTE's user properties ("Options > Open User Options File" or Alt+O, U)
and will typically contain the include paths for libraries that all of your projects use (like Phobos or Tango).
It is a list of paths separated by ';', for example:
seatd.global.include=c:\dmd\src\phobos;c:\tango\import
To change it, modify the line above accordingly and include it in your user options file.
The local include path can be set in SciTE's directory properties ("Options > Open Directory Options File" or Alt+O, D).
Usually, the directory options file will reside in the base directory of your project.
If the project's main source files are in a sub-directory called "src" and other source packages are in their respective sub-directories,
the following line in the directory options file sets the include path accordingly:
seatd.local.include=$(SciteDirectoryHome);$(SciteDirectoryHome)/src
The effective include path is the concatenation of the local and global include paths.
If the local include path is not set, it will be determined automatically, as described above.
If the current file has no directory options file in the same or a parent directory,
changing it ("Options > Open Directory Options File" or Alt+O, D) will generate a new file and ask you to save it somewhere.
Use the project's base directory as a destination.
Here is an example of a directory options file that additionally configures the build shortcut (F7).
command.build.directory.*=$(SciteDirectoryHome)
command.build.*=dmd @dmd.rf
seatd.local.include=$(SciteDirectoryHome);$(SciteDirectoryHome)/src
Keyboard shortcuts
To change the shortcuts for the SEATD commands, modify the following setting and include it in your user options file:
# 1500 = list declarations
# 1501 = list modules
# 1502 = goto declaration
user.shortcuts=\
Alt+D|1500|\
Alt+M|1501|\
F12|1502|
See the SciTE Documentation for details on the format.
For convenience, the SEATD for SciTE distribution adds a set of default settings to the global properties of the official SciTE distribution.
Here are the additional properties, for reference.
For more details on SciTE configuration see
http://scintilla.sourceforge.net/SciTEDoc.html