SciTE FAQ

| SciTE

## SciTE Frequently Asked Question

- How do I use a fixed width font for all text?
- What happened to use.monospaced?
- Why doesn't my line.numbers setting work?
- How do I change SciTE to use black as the background colour?
- How do I change the colours of the output pane?
- How do I make the horizontal scroll bar adjust to the width of text?
- How do I enable tabbed window mode in SciTE?
- How do I enable autocomplete?
- When I try to compile/build/run my [some language] source files, I get the following error: 'The system cannot find the file specified'.
- How can I add [some external application] to the Tools menu on SciTE?
- How can I add a keyboard command without adding it to the Tools menu?
- Is there a command to replace a string in multiple files together?
- How do I make SciTE run faster on GTK+?
- Is it possible to use the newline character (\n) in a regular expression?
- How do I get SciTE to understand the error messages from my compiler?
- Why do GCC error messages include ugly characters?
- How do I make Windows open a file associated with SciTE when its path contains spaces?

#### How do I use a fixed width font for all text?

Use these properties:

font.base=$(font.monospace)
font.small=$(font.monospace)
font.comment=$(font.monospace)
font.text=$(font.monospace)
font.text.comment=$(font.monospace)
font.embedded.base=$(font.monospace)
font.embedded.comment=$(font.monospace)
font.vbs=$(font.monospace)

#### What happened to use.monospaced?

The use.monospaced property was removed as people were using it to ask for fixed width fonts and then requiring support to cope with its limitations. The correct way to set fixed width fonts is here.

#### Why doesn't my line.numbers setting work?

line.numbers has been replaced with two properties: line.margin.visible and line.margin.width which are explained earlier in the main SciTE document.

#### How do I change SciTE to use black as the background colour?

You need to change the style settings. The main change is in the user options file to the global default style and caret colour but you may have to change other style settings to make this work well:

style.*.32=$(font.base),back:#000000,fore:#ffffff
style.*.33=back:#C0C0C0,$(font.base)
style.*.37=fore:#939393
caret.fore=#FFFFFF
selection.alpha=75
selection.back=#FFFFFF
colour.keyword=fore:#649bff
colour.operator=fore:#727272

#### How do I change the colours of the output pane?

The output pane often lists error and warning messages and is styled by the "errorlist" lexer. The default errorlist styles are found in others.properties. To change the output pane background to black and the default text to white set

style.errorlist.32=$(font.small),back:#000000
style.errorlist.0=fore:#FFFFFF

#### How do I make the horizontal scroll bar adjust to the width of text?

To avoid slow performance the horizontal scroll bar does not automatically adjust. You can use the horizontal.scroll.width property to change the horizontal scroll range.

#### How do I enable tabbed window mode in SciTE?

Multiple buffers must be allocated by setting, for example, buffers=10 in your SciTEGlobal.properties. To have the tab bar visible upon starting SciTE, set tabbar.visible=1. You can also set tabbar.hide.one=0 to always show tabs, or 1 to hide when only one file is open. tabbar.multiline=1 splits tabs across various lines if necessary.

#### How do I enable autocomplete?

Goto Options | Open Global Options File and uncomment

autocompleteword.automatic=1

#### When I try to compile/build/run my [some language] source files, I get the following error: 'The system cannot find the file specified'.

Make sure that the path to your compiler is set correctly on your system. Try to execute from console the same command you get in SciTE and see if it works. You can also search in your [language].properties for the compile commands used. If you have a different compiler or use different arguments, edit the commands to suit your needs. The lines to look for:

command.compile.filepattern=
command.build.filepattern=
command.go.filepattern=

#### How can I add [some external application] to the Tools menu on SciTE?

In your properties file, you'll need to add some lines:

command.name.number.filepattern
(e.g.: command.name.1.$(file.patterns.web)=HTML Tidy)
This defines the Text that will appear on the Tools Menu.

command.number.filepattern
(e.g.: command.1.$(file.patterns.web)=tidy -i -wrap 0 -m $(FilePath) )
This is the actual command that SciTE executes. You should provide the appropriate paths, options and parameters as you would from a command line. See SciTEDoc.html for more information on parameters and how to make SciTE prompt a Parameters Dialog.

command.is.filter.number.filepattern
(e.g.: command.is.filter.1.$(file.patterns.web)=1)
The external application may have modified your file, so setting this to true makes SciTE reload the file after execution of the command.

command.subsystem.number.filepattern
(e.g.: command.subsystem.1.$(file.patterns.web)=2)
This is for Windows and defines the subsystem through which the program is called. See SciTEDoc.html for more information on this.

You can set a command for all files using * as a file pattern. Up to 10 commands (0 - 9) can be defined in the Tools Menu at any time. Commands also get executed with Ctrl+number.

#### How can I add a keyboard command without adding it to the Tools menu?

This is similar to adding to the tools menu except that you set the name to be empty. Then the command is included in user.shortcuts by adding 1100 to produce its command ID. For example,

command.name.21.*.properties=
command.21.*.properties=cmd /c echo $(FileNameExt)
user.shortcuts=\
Ctrl+Shift+V|1121|

#### Is there a command to replace a string in multiple files together?

It is possible to replace a string in all opened buffers with the Replace in Buffers button in the Replace dialog. However this button is hidden by default, it can be displayed with find.replace.advanced=1.

#### How do I make SciTE run faster on GTK+?

The default settings for SciTE were changed in version 1.63 to use the Pango font system and antialiased fonts. You can return to using X core fonts which are faster with these settings:

font.base=font:lucidatypewriter,size:12
font.small=font:lucidatypewriter,size:10
font.comment=font:new century schoolbook,size:12
font.code.comment.box=$(font.comment)
font.code.comment.line=$(font.comment)
font.code.comment.doc=$(font.comment)
font.text=font:times,size:14
font.text.comment=font:lucidatypewriter,size:10
font.embedded.base=font:lucidatypewriter,size:12
font.embedded.comment=font:lucidatypewriter,size:12
font.monospace=font:courier,size:12
font.vbs=font:new century schoolbook,size:12
Line wrapping also slows SciTE down and this can be turned off with wrap=0.

#### Is it possible to use the newline character (\n) in a regular expression?

No.

The "Transform backslash expressions" option allows using \n and \r but that option does not work with regular expressions.

#### How do I get SciTE to understand the error messages from my compiler?

The set of error message formats is embedded in the Scintilla and SciTE code. To add support for another compiler, you will need to add a new style to scintilla/include/Scintilla.iface after the other SCE_ERR_* values, run HFacer.py, edit RecogniseErrorListLine in scintilla/src/LexOthers.cxx to recognise the error message, and edit DecodeMessage in scite/src/SciTEBuffers.cxx to extract the file name and line number.

#### Why do GCC error messages include ugly characters?

Linux distributions now often set the locale to UTF-8 by, for example, setting LANG=en_US.UTF-8. gcc takes this as an indication that it can use any Unicode character encoded as UTF-8 so quotes using ‘these’ rather than ASCII. To see these as intended, set

output.code.page=65001

#### How do I make Windows open a file associated with SciTE when its path contains spaces?

On some versions of Windows, associating a particular file type with SciTE does not allow paths containing spaces to work. To fix this, the path variable %1 needs to be surrounded by double quotes. This is done either directly in the registry or through the Explorer in Tools | Folder Options | File Types | (Select type) | Advanced | open | Edit. Change the "Application used to perform action" field to be similar to

"C:\bin\SciTE\SciTE.exe" "%1"