Alpha |
Version: | 9.2.3 - "Suhail" |
Last update: | 2021-05-21 14:43:30 |
Introduction
Alpha has a very rich set of preferences which let you customize and
control many aspects of its behavior or its user interface. Some
preferences are defined at a very general level and affect the entire
application: they are known as global preferences. Others are
defined by packages (modes, menus, features) and are available only when
this package is activated: menus and features have to be explicitely
activated, modes on the contrary become active automatically when a file is
edited in that mode. These preferences are known as package preferences and mode preferences respectively.
From the user's point of view, global and package preferences are
set via dialogs displayed when selecting the menu items
Alpha ↣ Preferences ↣ Global Preferences
or
Alpha ↣ Preferences ↣ Package Preferences.
The usual menu shortcut ⌘,
used in almost all
the Mac OS X applications to show the preferences dialog, displays a
dashboard which also gives access to the different kinds of options. Click
here to display the dashboard.
Global preferences
This section describes all the global preferences which can be accessed
through the
Alpha ↣ Preferences ↣ Global Preferences command. The list may not be entirely
exhaustive because other packages may add global settings to the default
set of preferences.
Appearance preferences
Click here to open the Appearance Preferences panel.
- Allow Dark Mode Text
- The Allow Dark Mode Text option tells whether the text area of
document windows should have a darker background color when Dark Mode is
selected in the system-wide OS X Preferences (OSX 10.14 or greater).
Otherwise the background remains the same as in light mode.
- Background Color
- The Background Color option specifies the default background color
for text panes in light mode.
- Coloring
- The Coloring option is used to enable/disable words coloring
according to mode and context.
- Dark Background Color
- The Dark Background Color option specifies the default background color
for text panes in dark mode. This color is used only if the Allow Dark Mode Text option is enabled.
- Default Font
- The Default Font option specifies the default font to use for new
windows.
- Foreground Color
- The Foreground Color option specifies the default text color for
document windows. It applies to the portions of text which are not
otherwise colorized by the current mode.
- Status Bar Font Size
- The Status Bar Font Size option specifies the default font size to
use for the messages displayed in the status bar. The height of the status
bar is adjusted accordingly.
- Status Bar Location
- The Status Bar Location option specifies the position of the
status bar (top=0, bottom=1). Note that the status bar may not be located
at the bottom if the dock is there.
- Status Bar Visible
- The Status Bar Visible option tells whether the status bar is
visible at startup. This can be changed later with the Show/Hide Status
Bar command in the Open Windows menu.
- Tab Size
- The Tab Size option specifies the default size for a tab
character in new windows (not necessarily the same as the amount of space
used for visual indentation of code).
Backups preferences
Click here to open the Backups Preferences panel.
- Auto Save On Switch
- The Auto Save On Switch option specifies whether to automatically
save all open windows which exist as local files (i.e. not new buffers)
whenever switching from Alpha to another program.
- Backup
- The Backup option specifies whether to make a backup every time a
file is saved, in either the active file's folder or a specified Backup
Folder location.
- Backup Age Requirement In Hours
- The Backup Age Requirement In Hours option spedifies the time
interval between backups. If the previous backup
is more recent than this number of hours, then don't make a new backup.
- Backup Extension
- The Backup Extension option specifies the extension to add to
files when backing them up.
- Backup Folder
- The Backup Folder option specifies the folder in which to store
backups. A null value tells Alpha to use the file's current directory.
- Maximum Backup File Size
- The Maximum Backup File Size option specifies a size limit. If a
file is larger than this number of kilobytes, do not save a backup copy.
This allows you to avoid creating backups for extremely large files. If
this setting takes the value 0, it is ignored.
- Number Of Changes Before Auto Save
- The Number Of Changes Before Auto Save option is used to
enable/disable autosaving. To save files automatically (except untitled
buffers) after a certain number of editing changes, set this to the number
of changes after which you would like the file to be saved. Set to the
empty string to disable auto-saving.
- Undo On
- The Undo On option is used to turn on/off the undo manager for all
documents.
Completions preferences
Click here to open the Completions Preferences panel.
- Ask Delete Selection
- The Ask Delete Selection option lets have completion routines ask
you before deleting the current selection. To have completion routines
automatically delete any existing selection when performing completions,
turn this option on.
- List Pick If Mult Completions
- The List Pick If Mult Completions option tells whether to choose
from a listbox of possible completions when you try to complete a command for
which no unique suffix exists.
- List Pick If Mult Expansions
- The List Pick If Mult Expansions option is similar to the
flag List Pick If Mult Completions but applies to expansions
rather than completions.
Document preferences
Click here to open the Document Preferences panel.
- Autosaves In Place
- The Autosaves In Place option lets decide whether autosaving should be
done in place or elsewhere. To enable this, you must also set a non 0
value for the Autosaving Delay preference.
- Autosaving Delay
- The Autosaving Delay option sets the time interval in seconds for
periodic autosaving. A value of 0 disables periodic autosaving.
- Check Text On Open
- The Check Text On Open option indicates whether to perform a text
checking for the currently enabled text checking options (like link
detection, quotes substitution, etc.) when a document is opened. By
default, text checking is asynchronous. Note that you may also use the
Text Options ↣ Check Document menu item at
any moment.
- Clear Undo Stack On Save
- The Clear Undo Stack On Save option indicates whether the stack of
undos should be cleared when saving a window.
- Data Detection
- The Data Detection option is used to enable/disable automatic data
detection enables detection of dates, addresses, and phone numbers.
- Fill Column
- The Fill Column option controls line breaking. When wrapping text
(see 'Line Wrap' preference), line breaking occurs for any text at or beyond
this column position (where column counting starts from zero at the left
window edge). Used by all 'Fill' routines.
- Grammar Checking
- The Grammar Checking option is used to enable/disable grammar checking for
newly opened windows.
- Incremental Searching
- The Incremental Searching option is used to enable/disable incremental
searching for newly opened windows. This setting can be overridden later
with the 'Turn Incremental On/Off' item in the Search menu.
- Left Fill Column
- The Left Fill Column option specifies the number of blanks left at
beginning of lines by 'fill' routines.
- Link Detection
- The Link Detection option is used to enable/disable automatic link
detection. It causes strings representing URLs typed in the view to be
automatically made into links to those URLs.
- Needs Wrap Column
- The Needs Wrap Column option lets Alpha ask if wrapping should be
done whenever the user opens files that have lines longer than
'Needs Wrap Column' characters.
- Show Invisibles
- The Show Invisibles option tells whether to show all tabs, carriage
returns, spaces etc. with distinct symbols. The following glyphs are used to draw invisible characters:
Character | Glyph |
space | ␣ |
new line | ↵ |
tabulation | ↦ |
vertical tab | ↧ |
form feed | ⤈ |
- Use Kerning
- The Use Kerning option tells whether to use glyph kerning.
- Use Ligatures
- The Use Ligatures option tells whether to use ligatures.
- Wrap On Open
- The Wrap On Open option tells whether to apply soft wrapping when
opening a document.
Electrics preferences
Click here to open the Electrics Preferences panel.
- Comments Continuation
- The Comments Continuation option controls whether every
comment char is detected ('anywhere'), or if it is only detected at line
start modulo whitespace ('spaces allowed'), or only at proper line start
('only at line start'). For most modes, the global default setting of
'anywhere' is adequate according to syntax, but the user may prefer to
override this, according to typing habits. Fortran syntax requires 'only
at line start'. For Text and Mail modes, where comment characters may
also appear mid sentence, it should be set to 'spaces allowed', to avoid
those auto-continue-comment things like where an embedded '>' can cause
strange results when pressing <return>.
- Elec Stop Marker
- The Elec Stop Marker option specifies the character inserted
into the text to indicate 'stop marks': useful positions which you can
jump between very quickly.
- Indentation Amount
- The Indentation Amount option tells Alpha to visually indent code by
this many characters to indicate its structure. The whitespace used for
indentation may be composed of spaces and/or tabs depending on the
window's tab size.
- Position After Indentation
- The Position After Indentation option indicates where Alpha places the
insertion cursor after a line has been automatically indented.
Encodings preferences
Click here to open the Encodings Preferences panel.
- Encodings Style
- The Encodings Style option lets choose your preferred style to display
encoding names in popup menus.
- Hex Dump Encoding
- The Hex Dump Encoding option specifies the encoding of the right
hand side column of hex dumps. Default value is UTF8 on Mac OS X and
Latin1 otherwise.
- Input Encoding
- The Input Encoding option specifies the default input encoding.
- Output Encoding
- The Output Encoding option specifies the default output encoding.
- Preferred Encodings
- The Preferred Encodings option contains a list of your preferred
encodings here to have them appear first in the open and save dialogs.
Errors preferences
Click here to open the Errors Preferences panel.
- Beep On Error
- The Beep On Error option does just like it says.
- Display Errors In
- The Display Errors In option indicates whether errors should be
reported in the status bar, a dialog, or a new window.
- Maximum Level
- The Maximum Level option Causes 'try' scripts to abort if they are
executing this many levels deep in the execution stack (see 'info level').
A negative value allows unlimited nesting.
Files preferences
Click here to open the Files Preferences panel.
- Allows Other File Types
- The Allows Other File Types option indicates whether the user is
allowed to save files with an extension that's not in the list of allowed
types.
- Build Exec Path From
- The Build Exec Path From option lets select the path to use to build an
exec search path for AlphaTcl: "inherited path" or "user shell's path".
- Extra Exec Search Path
- The Extra Exec Search Path option specifies the extra filesystem
locations to search for executables.
- Never Break On Open
- The Never Break On Open option indicates how to open files with
very long lines: to open the files as-is, without prompting the user to
wrap them, turn this option on. Otherwise the user is prompted when opening
files with very long lines.
- Open Packages
- The Open Packages option may be turned on to have the Get File dialog open bundled
apps.
- Show Invisible Files
- The Show Invisible Files option may be turned on to have the Get File dialog
display the invisible files.
- Vc Systems
- The Vc Systems option specifies the current version control
system.
General preferences
Click here to open the General Preferences panel.
- Alpha Server Port
- The Alpha Server Port option lets you choose another port for the
Alpha Server package. By default, the Alpha Server listens on port 51954.
See the Alpha Server Help for more
information.
- Copy Includes Font Info
- The Copy Includes Font Info option is used to enable/disable
copy of rich text. If this flag is set, copy operations
include font and style info. Otherwise only the text is written to the
pasteboard.
- Identity
- The Identity option specifies the default identity. Different
identities can be useful if your projects may be sometimes for work
purposes, sometimes for your own purposes etc.
- Num Lock
- The Num Lock option controls the numeric keypad. To use standard OS
functions for the numeric keypad, turn this option on. To allow Alpha to
define special functions for the numeric keypad, turn this option off.
- Prompt Noisily
- The Prompt Noisily option is used to make Alpha beep when it asks you for
something in the status bar.
Help preferences
Click here to open the Help Preferences panel.
- Preferred Help Format
- The Preferred Help Format option specifies a default format to use
when some help files are available in multiple formats, such as html, pdf,
etc.
- Second Choice Help Format
- The Second Choice Help Format option is similar to Preferred
Help Format. It specifies a second choice when some help files are
available in multiple formats, such as html, pdf, etc.
- Third Choice Help Format
- The Third Choice Help Format option is similar to Preferred
Help Format. It specifies a third choice when some help files are
available in multiple formats, such as html, pdf, etc.
International preferences
Click here to open the International Preferences panel.
- Keyboard
- The Keyboard option specifies the type of keyboard you have.
This is used by Alpha to define some basic key-bindings adapted to your
keyboard. For instance, the 'Shift Left' menu item is bound to
cmd-[
on a
US keyboard and to cmd-(
on a french keyboard.
- Time Stamp Style
- The Time Stamp Style option specifies whether the time-stamps are in ISO
or a shorter, more readable format.
Menus preferences
Click here to open the Menus Preferences dialog.
- Use Dynamic Menus
- The Use Dynamic Menus option specifies whether to use dynamic
menus. To use shorter menus in which similar items are shown as a single
item which changes when you hold down 'option' (
⌥
),
'control' (⌃
) etc, turn this option on.
Popups preferences
Click here to open the Popups Preferences panel.
- Popup Menu Modes
- The Popup Menu Modes option specifies modes that will always appear
in the "Mode" pop-up menu in the status bar of document windows. In
addition to these modes, this menu will include all modes which have been
loaded during the current editing session. "Text" mode is always included.
- Remember Loaded Popup Modes
- The Remember Loaded Popup Modes option lets remember the modes you've
used during this editing session in your set of defaults for your next
session.
- Show All Popup Modes
- The Show All Popup Modes option lets show all options in the "Mode"
pop-up menu, rather than only those loaded during the current editing
session and those in the "Popup Menu Modes" preference.
- Sort Parse Menu
- The Sort Parse Menu option lets the items be sorted in the Parse Functions
popup menu of document windows.
Printing preferences
Click here to open the Printing Preferences panel.
- Print Header
- The Print Header option tells whether a header should be printed
with documents.
Text preferences
Click here to open the Text Preferences panel.
- Continuous Spell Checking
- The Continuous Spell Checking option is used to enable/disable continuous
spell checking for newly opened windows.
- Dash Substitution
- The Dash Substitution option is used to enable/disable automatic
dash substitution that is to say conversion of sequences of hyphen
characters to typographic dashes.
- Indent On Return
- The Indent On Return option tells whether to apply clever indentation when Carriage
Return is pressed. This is a global setting which can be overridden by
mode specific preferences.
- Line Break
- The Line Break option is used to enable/disable line breaking (aka
hard wrapping). This is the process of automatically inserting a carriage-return
when you exceed a line length of 'Fill Column' characters. Select your line
break style here.
- Quote Substitution
- The Quote Substitution option is used to enable/disable automatic
quote substitution: if it is enabled, quotation marks and apostrophes are
replaced with typographic symbols.
- Smart Insert Delete
- The Smart Insert Delete option is used to enable/disable smart insert/delete.
- Spelling Correction
- The Spelling Correction option is used to enable/disable automatic
spelling correction.
- Text Replacement
- The Text Replacement option is used to enable/disable automatic
text replacement that is to say automatic substitution of a variety of
static text items based on user preferences.
- Twiddle Adjusts
- The Twiddle Adjusts option controls the 'twiddle' and 'twiddle words'
operations. They can follow a variety of user preferences. Select your
preferred mode of operation here.
Tiling preferences
Click here to open the Tiling Preferences panel.
- Batch List Window Fraction
- The Batch List Window Fraction option specifies the fraction
of the screen the small batch-search, or diff-style windows use up.
- Num Wins To Tile
- The Num Wins To Tile option specifies the number of windows to
relocate when using the tiling items in the 'Arrange' menu. The commands
will relocate this many windows, starting with the front window and moving
back.
- Tile Proportion
- The Tile Proportion option specifies the fraction of the
screen to use for the main window when tiling two windows unequally.
WWW preferences
Click here to open the WWW Preferences panel.
- Browser App
- The Browser App option specifies the application name of a
default internet browser.
- Compose Email Using
- The Compose Email Using option sets the default method for
composing emails. Emails can be composed using the
default composer for your OS or using Alpha's Mail menu.
- Download Folder
- The Download Folder option specifies the default download location
for files from the internet.
- Use Ftp Eol Type
- The Use Ftp Eol Type option controls the typoe of end-of-lines when
creating files or uploading through the various ftp facilities. The
commands wil try to save files with this eol format. Note that some
external ftp clients may translate eols for you as they up/download.
Window preferences
Click here to open the Window Preferences panel.
- Display Line Numbers
- The Display Line Numbers option controls whether to display line
numbers in the left margin of each new window.
- Display Virtual Column
- The Display Virtual Column option tells whether the column
indicator at bottom of document windows should display virtual positions
(taking Tab Size into account) or true positions.
- Force Document On Reopen
- The Force Document On Reopen option indicates that when Alpha is
reopened (launched again when already running) and has no documents open
already, it should create a new untitled document. This is required by the
HIG but can be irritating.
- Force Main Screen
- The Force Main Screen option is used to force newly opened windows onto
the main screen. Otherwise new windows may be opened
anywhere, including off screen.
- Use Status Bar For Prompts
- The Use Status Bar For Prompts option tells Alpha to prompt in the status bar
if possible (rather than use a dialog). Otherwise Alpha uses dialogs in
preference to the status bar for user input.
- Window Geometry
- The Window Geometry option specifies a set of window dimensions to
use when a new window is opened. If the option is set to a four items list of the
form
x y w h
, then this geometry will over-ride the normal window
shape which is calculated on the fly based on your screen resolution,
status-bar position, theme, etc.
Package preferences
Package preferences are accessible via the Alpha ↣ Preferences ↣ Package Preferences menu
item. Generally each package has its own panel (although nothing enforces
this behaviour). The list box on the left of the dialog contains the names
of all the currently activated packages (menus or features). When a package
is deactivated, its preference panel is removed from the dialog.
Some packages define very few preferences and may not have a panel
of their own. In that case, the preferences are found in the panel called
Other Packages. Some packages also do not have preferences at all
or do not expose them.
The preferences available for each package are described in the
package's help. This help may be accessed through the Help ↣ Menus Help and Help ↣ Features Help submenus of the Help menu.
Mode preferences
Mode preferences are accessible only when the mode is active. When a
mode XYZ is active, the Alpha menu contains a submenu
called Alpha ↣ XYZ Mode Setup (for instance,
in TeX mode, it would be named TeX Mode Setup). In this submenu,
select the command Mode Preferences to display the corresponding dialog.
The preferences available for each mode are described in the mode's
help. This help may be accessed through the Help ↣ Modes Help submenu of the Help menu.
Core preferences
This section contains information which may be useful to AlphaTcl
developers. From the user's point of view, core preferences are exposed in
the Global Preferences dialog (Alpha ↣ Preferences ↣ Global Preferences) as any other global preference.
The preferences known as core preferences are preferences
which are used by the application at a very early stage during startup.
They are needed even before the Tcl interpreter is created and before the
AlphaTcl library is loaded.
This special type of preferences is supported by the [newPref] proc. Their type name, in AlphaTcl, is prefixed with core, like for instance corevar, coreflag.
These preferences give access from AlphaTcl to preferences managed
by the core as user defaults. They are stored in a file called net.sourceforge.alphacocoa.plist found in the user's Preferences folder (~/Preferences
). This is useful for preferences which
are needed at an early stage: they are read by the core, not by the
AlphaTcl library (which may not have been loaded yet). An example is the
Status Bar Font Size which must be known as soon as possible for
the core to create it and display it almost immediately at startup.
The core preferences are linked variables and their value can be
modified in AlphaTcl but they are managed entirely by the core, which
reads them at startup and saves them when necessary.
Currently the following core preferences are defined:
- Status Bar Visible
- Tells whether the status should be visible or hidden by default.
- Status Bar Location
- Lets you specify the position of the status bar which may ba at the top
or at the bottom of the screen.
- Status Bar Font Size
- Lets you specify the size in points of the font used to display messages.
The heigth of the status bar is automatically adjusted.
User defined preference files
Though they are not limited to preferences, Alpha has a set of files known
as preferences files. They serve the more general purpose of
customizing the application by storing modified or additional pieces of
code. Most of Alpha's behavior in all areas (editing, user interface,
implementation of functionalities, keyboard shortcuts, etc.) is defined in
the AlphaTcl library contained by the application. This library is written
in the Tcl language.
The preferences files are just Tcl files which are evaluated
("sourced") by the application's Tcl interpreter as any other file in the
library. They are evaluated (only once) at very precise moments as
explained in the next sections, and they make very good places to tweak
existing code or to introduce new functionalities. They are stored in the
preferences folder of the application (click here to
display this folder
in the Finder).
Of course, you must have a basic knowledge of Tcl - it is one of the
easiest scripting languages to learn, yet very powerful. Thanks to this
mechnism, the possibilities of customizing Alpha are unlimited.
These preferences files are intended for code for personal use. If
you are proficient in Tcl and want to write a completely new package for
Alpha, then you should read the file Extending Alpha.
Global preference file
There is one global preferences file (called prefs.tcl)
which is loaded when Alpha is launched. This happens at the very end of
the startup process.
In this file you should put code which should be loaded regardless
of which mode you're working in. This preferences file is opened
using the menu item Alpha ↣ Preferences ↣ Edit Prefs File. If it does not already exist, Alpha offers to create it.
Click on this link to open the
prefs.tcl file.
Mode-specific preference files
There is one preferences file for each mode. The file for a mode is
loaded after as the last code to be loaded when a mode is used the first
time. This preferences file can be opened, provided the application is
already in the relevant mode, by selecting the menu command Alpha ↣ Mode Setup ↣ Edit Prefs File. If it does not
already exist, Alpha offers to create it.
They are named after the mode's name. For instance, for TeX mode the
file is named TeXprefs.tcl, for HTML mode it is
named HTMLprefs.tcl, etc.
Example
Global example
Say you would like to have a keyboard shortcut to insert the current time
at the cursor's position in any document window. Say you want the ⌥⌘T
shortcut to trigger this action. After inspection of
the AlphaTcl library (or after asking on the Alpha's Mailing Lists!), you discovered that the Tcl proc to get the current date and
time is called ISOTime::ISODateAndTimeRelaxed.
All you have to do is to open the prefs.tcl file and insert the following line:
binding create {oc 't'} {text insert [ISOTime::ISODateAndTimeRelaxed]}
Next time you launch Alpha, the prefs.tcl file will be loaded and
your binding will become available. Pressing ⌥⌘T
will insert the current time at the cursor's position.
Tip: instead of relaunching the application, you can just
select the previous instruction and press ⌘L
to
load it.
Mode-specific example
Say you would like to create a keyboard shortcut in TeX mode in order to
enclose a formula in a \boxed
macro. Say you want the ⌃⌥⌘B
shortcut to trigger this action.
After inspection of the definition of TeX mode in AlphaTcl (or after
asking on the Alpha's Mailing Lists!), you discovered that
the Tcl instruction to achieve this goal is just elec::Wrap "\\boxed{"
"}••"
.
All you have to do is to open the TeXprefs.tcl file (you must be in TeX mode to do so) and insert the following line:
binding create -tag TeX {zoc 'b'} {elec::Wrap "\\boxed{" "}••"}
In order to (re)load the preferences file, you may use the menu item
Alpha ↣ Mode Setup ↣ Load Prefs File (or restart Alpha).
That's all there is to it. Now you can select some formula in your
TeX document and press ⌃⌥⌘B
to have it enclosed in a
\boxed
macro (for instance, E=mc^2
becomes
\boxed{E=mc^2}
).