What is this

The alited stands for "a lite editor".

The main features of alited are:

  • structured code
  • easy access to the code
  • born for Tcl/Tk development only

Edited by alited are Tcl/Tk files. The C/C++ code is another target of alited, still for Tcl/Tk development only all the same.

The alited facilitates the development and the maintenance of Tcl/Tk code, particularly because of the unit tree being a sort of documentation.

The alited is suspected of being very good with large Tcl/Tk projects, i.e. when, in one session, you deal with 30-40-50... Tcl/Tk scripts, to say nothing of others.

It's quick at starting.
It's quick at switching projects.
It's quick at organizing Tcl/Tk code.
It's quick at navigating Tcl/Tk code.
It's quick at searching Tcl/Tk code.
It's quick at writing Tcl/Tk code.
It's quick at testing Tcl/Tk code.
It's quick at saving Tcl/Tk code.
It's quick at maintaining Tcl/Tk code.

Briefly, alited is totally quick, being at that a pure Tcl/Tk application.

For a quick acquaintance of alited, a few of demo videos are available:

... or the same, just light themed:

Below is a screenshot of alited:

... and its localized and themed variant:

... and its themed variant on MS Windows 10:


The installation of alited is straightforward:

  • unpack to some directory, say ~/PG/alited
  • to run the installed alited, use the command:
    wish ~/PG/alited/src/alited.tcl

In Linux, you can run tclsh instead of wish.

Being written in pure Tcl/Tk, alited needs only the core Tcl/Tk packages.

If you are a novice to Tcl/Tk 8.6.10+, try and install it. Then try and install the alited and its dependencies, noticing the messages of CLI at running alited. Let the installations be a sort of exercise in Tcl/Tk.

Still in MS Windows, it's enough to install Bawt or Magicsplat distribution.

In Linux, possibly you need to install the packages:

  • tcl8.6
  • tcllib
  • tk8.6
  • tklib
  • tcl-tls
  • tcl-vfs
  • tclx8.4

Using tclkits

As noticed above, the alited is born for Tcl/Tk development only, so it requires a basic Tcl/Tk knowledge and the installed Tcl/Tk packages.

No need for a stand-alone alited executable. Hence, two advantages: 1) alited can be a source of code snippets available in default project, for those who intends to use apave, e_menu, bartabs, baltip and hl_tcl packages; 2) alited's license allows using its code for a further customization.

Besides, a stand-alone alited would be unusable at all, because alited needs tclsh, wish or tclkit to run its tools.

If you use a stand-alone tclkit instead of fully installed Tcl/Tk, run alited with a command:

tclkit ~/PG/alited/src/alited.tcl

While alited works fine under tclkits based on Tcl/Tk 8.6.10+ (as it uses core Tcl/Tk packages only), you may develop programs requiring non-core packages. In such cases, these programs should append to auto_path the appropriate pathes to the non-core packages. Preferably these pathes should be subdirectories of your project, so that you make your project independent on the availability of packages at other machines.

Another way to have tclkits be friendly with the non-core packages is setting TCLLIBPATH environment variable before running alited:

# in Linux:
export TCLLIBPATH="~/myPrj/package1 ~/myPrj/package2"
# in MS Windows:
set TCLLIBPATH=~/myPrj/package1 ~/myPrj/package2
# run alited to edit/run/debug a script
tclkit alited.tcl myScript.tcl
# or a whole project:
tclkit alited.tcl ~/.config/myAlitedOptionsDir
... and when in alited we run a script, there are no errors at package require package1; package require package2.

A lot of tclkit links are available in the wiki's Tclkit page.

Also, here are some direct links to download the stand-alone tclkits:

Like tclkit, vanilla Tcl/Tk is a stand-alone executable that can be used instead of fully deployed Tcl/Tk. Just run alited with a command:

vanillawish ~/PG/alited/src/alited.tcl

A lot of vanilla Tcl/Tk builds are available at Just select a vanilla wish corresponding to your platform.

Also, here are some direct links to download the vanillawishs:

The androwish vanilla builds contain a lot of additional Tcl/Tk packages which makes them so remarkable. Thus, you need not install most of the popular packages while using an androwish's vanilla wish.

In alited's "Preferences / Tools", you can set a specific version of tclsh / wish / tclkit as "tclsh, wish or tclkit" option. This way you can test your scripts by a specific version of Tcl/Tk (still it's desirable to be 8.6.10 or later).

First start

At the very first start, alited offers some simple initial actions.

Namely: you are offered to choose a configuration directory where alited will store its settings.

The default ~/.config is probably the best choice if you don't plan to have several types of projects at your machine.

On the other hand, if you choose some other configuration directory, this directory's name may be passed to alited as its first argument.

You can have several copies of your configuration directories, e.g. ~/.config/alited1, ~/.config/alited2 etc. each of them customized for its own type of projects: public/private, for work/fun and so on.

Thus, you can develop some fun projects with "Florid" color scheme and a funny font for editing. Or hobby projects with other settings. At last, work projects with "tough-stuff" settings:)

For example, I have two configuration directories of alited - one for a development version and one for a release version of alited. The latter is used for other projects, though it might be divided into several types, with their own links to start alited.

Using configurations

At the next starts of alited, you can use the following syntax (where, instead of tclsh, there may be any of Tcl/Tk executables: wish, tclkit, vanillawish):

1. For using a previous configuration directory:

  tclsh alited.tcl

2. The same, with opening file(s):

  tclsh alited.tcl file1.tcl ?file2.tcl ...?

3. For using a new configuration directory (it should exist!):

  tclsh alited.tcl new-config-dir

4. The same, with opening file(s):

  tclsh alited.tcl new-config-dir file1.tcl ?file2.tcl ...?

Also, you can switch configurations "on fly", choosing Setup / Configurations... menu item.

By default, Tools of alited are created per a configuration, in a separate subdirectory handled by e_menu. With Preferences / Tools / e_menu setting you can redefine e_menu directory in any configuration, e.g. to have it common for all.


The alited is unit oriented which is its main feature.

This means making a unit tree of Tcl code, with branches and leaves.

Unit tree

The branches of the unit tree are created with special comments. The leaves are Tcl procedures and methods.

For example:

#! /usr/bin/env tclsh
# It's just an example.

# ________________ Packages used _____________ #
package require Tk

# ________________ "example" _________________ #
# Some words about...

namespace eval example {

  ## ___________ example's variables _________ ##

  variable var1 "value 1"
  variable var2 "value 2"

  ## __________ example's procedures _________ ##
  # Below are procedure doing so and so.

  # this proc prints one
  proc one {} {puts "one"}

  # this proc prints two
  proc two {} {puts "two"}

  ## _________________ "my" __________________ ##
  # Some words about...

  namespace eval my {

    ### ___________ my's variables ___________ ###
    variable var1 "val1"

    ### ___________ my's procedures __________ ###

    proc myone {} {puts "my one"}
    proc mytwo {} {puts "my two"}

    # this proc prints "my three"
    proc mythree {} {puts "my three"}

  ## ______________ end of "my" ______________ ##

# _____________ end of "example" _____________ #
# _____________________  EOF _________________ #

This example will produce the following unit tree:

  |__ Lines 1-4
  |__ Packages used
  |__ "example"
  |     |__ example's variables
  |     |__ example's procedures
  |     |     |__ one
  |     |     |__ two
  |     |__ "my"
  |     |     |__ my's variables
  |     |     |__ my's procedures
  |     |           |__ myone
  |     |           |__ mytwo
  |     |           |__ mythree
  |     |__ end of "my"
  |__ end of "example"
  |__ EOF
This example is small and easy to observe. Its tree view doesn't differ greatly from the code view.

In a real life, a code isn't easily observed even with bird's eye view or with code folding.

And here alited comes to help.

Branches and leaves

The unit tree doesn't means anything like code folding or structured editing which refer to the Tcl structural commands like if, switch, foreach, proc and so on. The alited unit tree results from the hierarchical comments only.

The unit tree includes the unit comments as the branches and the procedures / methods as the leaves.

The unit comments are customized, e.g. #=== NAME === may be used instead.

The first # characters define the unit tree's level: # means 1, ## means 2, ### means 3 etc. It isn't reasonable to customize and use # NAME # and ## NAME ## and ### NAME ### etc. for the unit tree's levels, because any comment beginning with # would be treated as a unit.

Still, if you want to use # alone (without adding _ = - + ~ * . : etc.), you can customize alited so that ## will mean 1st level, ### 2nd level, #### 3rd level etc., using a branch regexp like this:

thus allowing the tree comments as follows:
## Initialize GUI
  ...some code
  ### This widget group
    ... this code
  ### That widget group
    ... that code
The alited recognizes the units by these comments and presents them as a tree.

Creation of the tree

To insert a tree branch into your code, use the key combinations:

  • Shift+F1 for 1st level
  • Shift+F2 for 2nd level
  • Shift+F3 for 3rd level

It seems the default three levels are quite enough. Still, you can add 4th, 5th... branches' levels, as well as change the default keys to use, in "Setup / Templates" menu item.

To add a procedure / method, use:

  • Alt+P to add a procedure
  • Alt+M to add a method

The unit tree has its own toolbar allowing to arrange the tree.

The Up / Down buttons allow to move unit(s) through the tree.

In fact, they are moved through a code, so that you can arrange your code without cut/copy/paste. Only moving units.

To move a group of units, select them with Ctrl+click. Then you can use "Move Up" and "Move Down" buttons to move the group up or down in the code.

If the selected group should be moved to a far position, you can use "Drop Selected Unit Here" of the tree's context menu. Just right-click a tree item before you want to place the group and choose this action from the context menu.

Also, you can drag and drop a unit before a target position of the unit tree. There is no posibility to drag and drop a group of units.

Favorites and Last visited

When you navigate through the unit tree, the cursor positions are saved/restored in visited units. You can continue with units in the same positions you left them.
Note: this feature is active only in a current session of alited.

Any unit of any file of a project can be marked/unmarked as favorite. The "Favorites" list allows quick opening a favorite unit.

Each project has its own list of favorites.

If some favorites' list is valuable, you can save it by its own name to return to these favorites afterwards. For this, use "Saved Lists of Favorites" button of the toolbar or the appropriate item of menu.

This way you can keep a kind of "projects inside a project", choosing a list of favorites for appropriate tasks inside a current project.

The "Last Visited" list is a comrade of the favorites. It allows fast accessing the last visited units.

The "Search / To Last Visited" menu item (Alt+Backspace) switches between last two visited units.

The "Last Visited" list is populated and changed when you:

  • click a unit's content
  • change a unit's content
  • switch tabs of edited files
  • choose the unit tree's item
  • choose the infobar's item
  • choose the Favorites/Last Visited's item
  • press Alt+Backspace ("To Last Visited")
  • press Alt+B ("To Matched Bracket")
  • press Ctrl+L ("Look for Declaration")
  • press F3 ("Find Next")
  • press keys of a text's context menu (not hitting a menu item!)
  • undo / redo changes

It seems only a simple navigation with Up / Down / PageUp / PageDown keys doesn't populate "Last Visited" list.

When you choose an item of "Favorites" or "Last Visited" list, alited tries to enter a unit even when its file isn't open yet.

Both "Favorites" and "Last Visited" lists (as well as their current visibility) are saved for all other sessions of alited.
Note: to ensure this saving feature, it's recommended to quit alited before shutdowning your machine or, in "Preferences / General / Saving", set all of "Save configuration" options to ON.

It would be convenient to have "Last Visited" open in most sessions of alited - and to open "Favorites" at need.

In a session, the visited units are highlighted in the unit tree, so that you can see which of them were visited. The more observed, the more navigated.

Searching units etc.

Two search tools might be very useful while you are dealing with the units:

  • Search Units
  • Go to Line

After pressing Ctrl+Shift+F you get "Search Units" bar where you can search units by their case insensitive glob patterns. Very useful.

After searching just click the info listbox's item to enter a found unit. With the listbox's context menu, you can also set "Don't focus a text" mode to scan the found units with keys.

Pressing Ctrl+G brings up "Go to Line" dialogue allowing you to go to a unit by a relative line number. It's useful when you get an error message with a proc / method name and a line number.

The alited provides a tool to check Tcl code for consistencies of brackets. In fact, it allows to find "problem" units. It's useful when you get a peculiar error message.

At checking Tcl code, please, pay attention to a whole content of a unit, i.e. all lines between its start and a next unit's. Some "errors" are natural and eliminated by "END of namespace" or similar branches. See the above example.

The unit tree and the file tree are switched to / from by appropriate buttons of the tree toolbar.


The alited is a project oriented editor, not a general purpose one.

The alited provides nearly all the necessary to develop Tcl/Tk projects without ever quitting it till a machine's shutdown.

The projects seen by alited are stored in ~/.config directory chosen at the very first start of alited.

You can pass a config directory's name as an argument to alited. This allows you to have various types of projects at one machine: public/private, for work/fun... configuring them properly.

"Projects" dialogue

The projects are listed in "Setup / Projects" menu item. Also, you can click "Projects" icon of the tool bar.

The default project refers to alited's installation directory, just for a start.

At creating a new project, you must fill the appropriate data fields - most importantly a project directory.

After filling the new project's fields you should press "Add" button to create it.

To open a project, just select it in the project list, then hit "Select" button.

Use Create a project by template button for templating projects.

Use Project directory button to view the project directory.

The Notes field may be used as a sort of diary for the project. Also, you can keep a list of TODOs in Notes.

The calendar and the text below are used to set deadlines of the TODOs. It's very useful, especially for projects developed unsteadily!

Notes and calendar fields are very good at maintaining projects. Actually, any idea that occurs to you, is welcome to this calendar helper.

To set a deadline:

  • select a day in the calendar
  • enter a text (reminder) of TODO
  • use buttons to erase/paste/undo/redo the text
  • use move buttons to postpone a TODO till next day or week
When the present day reaches a deadline, its TODO is highlighted and the bell rings, to remind of the TODO.

When the TODO is done, just erase it with Erase button.

Project options

There are few options for projects, seen in "Options" tab of "Projects" dialogue. Some of them are obvious, while others need commenting.

"Skip subdirectories" option mean that some subdirectories of the project root directory would be ignored. This matters especially for .git subdirectory, as it can contain a lot of files not needed by alited at all.

The "Unit lines per 1 red bar" option means that N lines of a unit are considered normal, while each N additional lines of the unit would add a red bar to its icon at the unit tree, up to 7th bar.

When the icon becomes fully (or mostly) red, this is like sending you "a bit too long unit" message, i.e. the unit probably needs a sort of reforming.

There are 8 grades of redness: 0, 1*N, 2*N, 3*N ... 7*N. So, if N=10, then 80 lines would mean "a too long unit". Just look at the unit tree to detect those horrible reds, candidates for reforming.

"Multiline strings" option means that Tcl strings can be continued in several lines without "\" and "\n", for example:

set multistr "It's
  a multiline
However convenient, this practice is not recommended for projects with "large" files, i.e. containing more than 2000 LOC. On these files, alited works rather slow with multiline strings.

Instead, you might switch this option off and use the following layout of strings:

set multistr "It's \
\n  a multiline \
\n  string \
\n  "
(or just avoid the multilines at all).

Note: the default options for the new projects are set in "General / Project" tab of "Preferences" dialogue.

Project templates

"Templates" tab of "Projects" dialogue allows to set a directory/file tree that will be used at creating a project with Create a project by template button.

The template is set in the text field, by these simple rules:

  • the lines contain directory / file names; blank lines are ignored; special characters in the names (", /, \, ~, *, ? etc.) aren't allowed
  • file names are the names that satisfy one of -nocase patterns:
    • license*, licence* (e.g., LICENSE, licence.txt etc.)
    • readme* (e.g., README, readme.txt etc.)
    • changelog* (e.g., CHANGELOG, changelog.txt etc.)
  • if a license file is found in a current project, it will be copied to a templated project; other files will be created blank
  • all of other names are directory names
  • first non-empty line of the template sets an initial indent, the following lines must be indented at least by this indent
  • first additional indent means an indent to set subdirectories; the following subdirectories must be equally indented by this indent
  • the directories and files will be created under the project's root

Use Default button to set the default template of dir/file tree. This button shows also an example of project template.

Use Create a project by template button for templating projects.

Use Project directory button to view the result of templating.

A current template is saved in the Template combobox after running Create a project by template (up to 16 templates may be saved).

File tree

To open existing files of your project you can switch to the project file tree. For this, use "Switch to File Tree" button of tree toolbar.

With double-clicking a file, you open it. To open all Tcl files of a directory, use the tree's context menu.

The open files are highlighted in the file tree. When a file is closed it's unhighlighted.

A newly open file is placed in the very beginning of the tab bar. This is true even when you select a tab bar file that isn't among the visible tabs.

Press Ctrl+Tab keys to switch between last two edited files. "Last visited is most needed."

If your currently edited file doesn't belong to the current project directory, you can move this file to it. For this, use "Move File" buttons. The buttons allow to move files in the project subdirectories.

There are also "Create File/Directory" options of the file tree available through the tree's context menu.

Switching projects

When projects are switched, alited saves and restores:

  • a list of open files
  • cursor positions in the files
  • a currently open file
  • a list of favorites
  • a list of favorites' lists
  • a list of last visited units
So, when you switch to another project, alited closes all files of the old project and open all files of the new project.

If you want some files of the old project to remain open in the new project, select them in the tab bar by Ctrl+click, then switch to the new project.

Along with the unit facilities, alited provides a lot of search tools to navigate throughout a project.

Find / Replace

One of search tools is "Find / Replace" dialogue, called with:

  • Ctrl+F keys
  • "Edit / Find/Replace" in menu
  • "Find / Replace" in toolbar

The "Find / Replace" dialogue contains two sections:

  • Find
  • Replace
Both contain 3 buttons:
  • do it once
  • do it in text
  • do it in session or in selected files

The alited has the find and replace functions united in this dialogue.

The dialogue provides standard options of such type. Probably, except for two of them.

The "Replace by blank" option means that you can replace the found strings by the blank string which means just deleting the found strings!

As the blank replacements are rarely required, the "Replace by blank" option allows to avoid mistakes. Use it accordingly.

Another uncommon option is a search in selected files. Sometimes very useful.

If you select tabs of the tab bar with Ctrl+click, the "Find / Replace" dialogue will offer "All in N" meaning selected files (including a current one).

All of the found in text / session / selected files instances are presented in the info listbox.

The info listbox allows to go to a found instance's line, with just clicking it. At that, the "Find / Replace" dialogue may or may not be closed.

While the "Find / Replace" dialogue is open, the found strings are highlighted. When you close the dialogue, the highlighting disappears.

The info listbox has a context menu allowing you to navigate through its items just with keys (Up / Down / Ctrl+Home / Ctrl+End).

The "Find / Replace" dialogue allows you to replace the found strings with a new one. At single replacements, first hit "Find", then "Replace" - next found strings will be presented one by one.

Other search tools

Search facilities of alited include also:

  • Find a unit
  • Find a declaration
  • Find a word
  • Find by list
  • Find in a directory

Press Ctrl+Shift+F or hit "Edit / Find Unit" menu item to find unit(s) by case insensitive glob patterns.

It's very helpful when you remember a part of a unit's name, so just enter this part to find the unit.

To look for a proc/method declaration, you can try:

  • Ctrl+click on its name
  • press Ctrl+L, when the cursor is on its name
  • hit "Edit / Look for Declaration" menu item

For a quick search of a word (or a selected text), there is a nice Ctrl+Shift+click applied to the word. It means a search throughout alited session and is very helpful in some cases.

Sometimes, a whole list of words should be sought in a file. There is an appropriate item in "Search" menu. The search result is displayed in a text widget, so that you can copy-paste it to a code. After closing the window of search results, you can switch to another file without closing the window of search options.

To find a word or a selection in a directory, hit the appropriate button of the toolbar. The search will be performed by "grep" command with options:

  • recursively in a chosen directory
  • case insensible

Other "grep" facilities are available in "e_menu". Run it with F4 key and hit "Search all" item.

To complete a command, press Tab key while the cursor is on initial characters of a command - this will offer you to select from a list of commands available in alited session's files.

The Tab key of this option is customizeable (like many other keys) in "Setup / Preferences / Keys".

At the completion, the commands offered to choose are:

  • not qualified for a current file
  • qualified for others

Double clicking a word highlights all of its occurences (if red) or only one. This allows, e.g., quick overview of a variable's usage. If you want to highlight a selection, run a context menu.


The tools of alited are presented by its tool bar and menu. Thus, they are called "bar/menu" tools.

Some of tools are provided by alited staticly i.e. they cannot be removed:

  • Run
  • e_menu
  • tkcon
  • Check Tcl
  • File List
  • Color Picker
  • Screen Loupe
  • Tcl/Tk help (in "Help" menu)

Other tools are collected in "Tools / bar/menu" submenu. These are provided by e_menu application. All of them (even installed by default) can be removed or substituted with other tools.

Run tool

The Run tool tries to run an application chosen as default for the currently edited file. For Tcl files, it is tclsh.

But e_menu recognizes special comments like:

#RUNF: file.tcl args
#RUNF1: file.tcl args
#RUNF2: file.tcl args
which means running "tclsh file.tcl args". Use Alt+R hot keys to insert its template into a text.

#EXEC: command args
#EXEC1: command args
#EXEC2: command args
which means running "command args". Use Alt+E hot keys to insert its template into a text.

There may be many those comments, from #RUNF1: / #EXEC1: to #RUNF99: / #EXEC99:, but only first of them would be run. #RUNF1: or #RUNF2: or #EXEC9: - this isn't of big importance (a matter of taste, mainly).

So, it's possible to run a main Tcl script at editing any Tcl script of an application. Or test a specific script in many applications, while editing it.

If you want to run a script "as is" disregarding those #RUNF1: / #EXEC1:, just call e_menu tool and choose "Run me" item. For non-Tcl files, default run modes are in fact defined in menu.mnu of e_menu.

Run tool executes Tcl script either of two ways:

  • running a file inside a console
  • running a file inside Tkcon application
This is customized in "Preferences / Tools". Note, that "in console" mode means also Tkcon tool running as a topmost application.

You might prefer to run applications inside Tkcon. In this case you get a profit of introspecting your code in Tkcon.

Also, Tkcon window would display puts' debug messages in MS Windows even when you use "vanilla wish" or "tclkit" instead of fully deployed Tcl/Tk. The MS Windows console doesn't display the puts messages with tclkits and vanilla wish, on my humble machine at least.

On MS Windows, if you have a fully deployed Tcl/Tk 8.6.10+, the default path to its tclsh.exe is highly recommended. And, on the contrary, wish.exe and tclkit.exe aren't recommended, for the reason mentioned above. To install Tcl/Tk 8.6.10+ on MS Windows, use Bawt or Magicsplat distribution.

"Run" icon uses the default mode customized in "Preferences / Tools". But when a file is run by "Tools / Run..." menu item or by F5 key, alited offers to run the file either in console or in Tkcon.

It's good to have both of these modes with their pros and contras. For example mostly running Tcl scripts in console with Tcl full error messages, yet using Tkcon introspection from time to time.

In alited, Tkcon tool is customizable in "Setup / Preferences / Tools / tkcon" tab. Use Test button to preview Tkcon and Default button to restore Tkcon's defaults.

"Setup / Templates" dialogue allows to insert in a code debugging messages (with tk_messageBox or puts).

There are templates to introspect variables:

  • local
  • global
  • current namespace's

There is a template to enter a command, in order to run it immediately in an appropriate place of your application! For example, you can change a local variable to see how your app will behave with the new value.

The "Setup / Before Run" menu item allows setting command(s) to be executed before Run tool. This setting is per a project (some specific projects may need it).

At last, in the "Before Run" dialogue, you can set a command to be run "forcedly" by Run tool - throughout the project, independently on file extensions, RUNF1: comments etc. The command will be executed in console (or in Tkcon if the command begins with %f or file.tcl).

Note: Even with this most radical setting, you can run e_menu tool and hit "Run me" to run a current file in its "normal" mode. Or just press F4 key twice.

Tcl/Tk help tool

In fact, Tcl/Tk help tool is provided by e_menu application. Namely:

  • "Tcl/Tk help" is one of e_menu's ornamental items (HELP)

The Tcl/Tk help tool shows Tcl/Tk man page for a word the cursor is on (or for a selected text). Use F1 key to get the man page.

Still, this context help is available only if Tcl/Tk help pages are downloaded and copied to ~/DOC/ (or similar) directory
... or when Internet is accessible. In such case, e_menu tries to get a help page from which might be not what you want.

You can download Tcl/Tk 8.6.11 help by using the direct link:

Also, to download the last version of Tcl/Tk 8.6 help, you can use:

  wget -r -k -l 2 -p --accept-regex=.+/man/tcl8\.6.+
For Tcl/Tk 8.7 help, you can use:
  wget -r -k -l 2 -p --accept-regex=.+/man/tcl8\.7.+
Tcl/Tk context help in alited will be enabled by setting a path to the downloaded man pages in "Preferences / Tools / Path to man/tcl" field.

Customizing tools

Some tools, though default, can be replaced or removed. These tools are listed in "Tools / bar/menu" submenu and are customized in "Setup / Preferences / Tools".

These settings are also available through a popup menu called by right click on the toolbar.

In this dialogue, we can:

  • add new actions and separators
  • change actions or their icons
  • remove actions and separators

New items are added by [+] button. Or you can use empty rows at the bottom.

Items are removed by [x] button.

Empty items are ignored. The list of items is scrollable.

To choose a tool, click its button at the right. Any non-menu items can be chosen directly while navigating through menus. If you want to choose a whole submenu, right click on this submenu and choose "Select" from a popup menu. Note: the main menu is run by e_menu tool.

To change a tool's icon, click its drop-down list. There are available icon-pictures and icon-characters. Highly likely, there is an icon expressing the tool's action.

As alited's tools are mostly provided by e_menu, you may find the following links useful:


There are several sources of editing features provided by alited.

Context menu

With right-clicking a text, you get a context menu containing:

  • Cut / Copy / Paste commands

  • Undo / Redo commands

  • Line processing commands:

    • Double Selection (Ctrl+D keys customized in "Setup / Preferences / Keys")
      if there is no selected text, a current line is duplicated

    • Delete Line (Ctrl+Y keys customized in "Setup / Preferences / Keys")

    • Line(s) Up (Alt+Up keys)
      if several lines are selected, all of them are moved up

    • Line(s) Down (Alt+Down keys)
      if several lines are selected, all of them are moved down

  • Highlight processing commands:

    • Highlight First (Alt+Q keys customized in "Setup / Preferences / Keys")

    • Highlight Last (Alt+W keys customized in "Setup / Preferences / Keys")

    • Highlight Previous (Alt+Left keys)

    • Highlight Next (Alt+Right keys)

    • Highlight All (double click on a word)
      if there is a selected text, this menu item highlight all its instances

  • Select All (Ctrl+A keys)

Edit menu

The menu bar of alited provides Edit menu containing:

  • Move Unit Up command (F11 key customized in "Setup / Preferences / Keys") applied to a current unit, moves it up

  • Move Unit Down command (F12 key customized in "Setup / Preferences / Keys") applied to a current unit, moves it down

  • Indent command (Ctrl+I keys customized in "Setup / Preferences / Keys")

  • Unindent command (Ctrl+U keys customized in "Setup / Preferences / Keys")

  • Correct Indentation
    applied to a Tcl file (a whole of it)

  • Comment command (Ctrl+[ keys customized in "Setup / Preferences / Keys")

  • Uncomment command (Ctrl+] keys customized in "Setup / Preferences / Keys")

  • Put New Line command (Ctrl+P keys customized in "Setup / Preferences / Keys")

Note 1: Comment and Uncomment commands use escaping/unescaping braces with #\{ #\} patterns. Thus, you can safely comment/uncomment any code blocks, this way:

  set num 2
  if { $num == 1 } {
    puts 1
#!  #\} elseif #\{ $num == 2 #\} #\{
#!    puts 2
  } else {
    puts 99
instead of this mistaken out-commenting as noted in comp.lang.tcl:
  set num 2
  if { $num == 1 } {
    puts 1
#  } elseif { $num == 2 } {
#    puts 2
  } else {
    puts 99
where elseif { $num == 2 } is still active.

Note 2: If you comment a code with menu "Edit/Comment" or keys Ctrl+[, you should uncomment it with "Edit/Uncomment" or Ctrl+], to uncomment braces as well.

Note 3: Anyhow, avoid using non-escaped unmatched braces in a command. Instead, use them escaped, as in the following snippet:

  proc foo {} {
    puts \{
    foreach c [split qwerty {}] {
      puts -nonewline $c-
    puts \n\}    ;# also fit: puts "\n\}"

  # BAD STYLE: there will be Tcl error after
  # removing either of bracing "puts" or removing/escaping its brace
  proc foo {} {
    puts "{"
    foreach c [split qwerty {}] {puts -nonewline $c-}
    puts "\n}"

Search menu

The search facilities of alited are rather rich:

  • Find / Replace command (Ctrl+F keys)
    when Ctrl+F pressed twice, performs a search in a last mode (once, in text, in all)

  • Find Next command (F3 key customized in "Setup / Preferences / Keys")

  • Look for Declaration command (Ctrl+L keys customized in "Setup / Preferences / Keys")

  • Look for Word command (Ctrl+Shift+L keys customized in "Setup / Preferences / Keys")

  • Find Unit command (Ctrl+Shift+F keys)
    when Ctrl+Shift+F pressed twice, performs a search

  • Find by List command
    searches a list of words in a current text; very useful in some cases

  • To Last Visited command (Alt+Backspace keys)
    switches between two last visited units

  • To Matched Bracket command (Alt+B keys)
    when the cursor is on a bracket, goes to its match

  • Go to Line command (Ctrl+G keys customized in "Setup / Preferences / Keys")

Note: if Ctrl+F (or Ctrl+Shift+F) keys are pressed twice, a last performed search starts immediately. When you need to repeat a search in text/session with many words of a text, this feature will help a lot: just repeatedly set the cursor on the words and do it.

Also, for highlighting words / selected strings, use alited's context menu on a text or double-click on a word. If there are multiple highlighted instances, they are highlighted with reddish color, otherwise the only instance is highlighted as a usual selection. This feature is very useful for example when you need to see all uses of a variable in a procedure: double click the variable and you'll see all of its occurences. At that, mouse moves and clicks on the text don't remove the highlighting, only a keypressing does.


The templates are available through "Setup / Templates" menu item and "Add Unit" button of the tree toolbar.

Keys setup

A few of keys are customized with "Setup / Preferences / Keys" menu item.

Miscellaneous keys

The alited sees also some hotkeys that aren't presented in menus. These are:

  • Ctrl+W saves changes and closes a current file

  • Ctrl+Tab switches between last two edited files

  • Ctrl+Enter (Shift+Enter) adds a new line without indentation

  • Ctrl+Up moves the cursor to a previous paragraph

  • Ctrl+Down moves the cursor to a next paragraph

  • Ctrl+K clears a line's right part

  • Ctrl+Shift+U allows to enter Unicode character, by its number

By default, Tab key is used in alited for "Command complete" tool. Refer to "Preferences/Keys" to redefine it.


The alited's "Setup" menu provides "Projects", "Templates", "Favorites Lists" and "Preferences" dialogues.

All of the dialogues contain "Help" button, at their bottom left corners. The button displays a context help describing a current dialogue or its current tab.

The alited's "Setup" menu provides some options outside of the dialogues, as described below.

Wrap Lines

This option allows to turn off the line wrapping.
It's rarely needed, so the wrapping is normally on. This option acts per a file.

Tip File Info

This option allows to view an information of file attributes displayed in tips of the tab bar and the file tree.

Tips on / off

The Tips on / off submenu items allow to switch on / off the tips for various dialogues and widgets.
If you regard some tips as useless or troublesome, you can switch them off.
For convenience' sake, click the top "---" item to set the submenu "tear-off". All of alited's submenus can be set tear-off. Useful for multiple choices.


This option allows to change a tint of a current color scheme. It's per a session only.
When all of sudden you get a feeling that too much of light / darkness is around, this option might help.

For Start

This option allows to set command(s) that would be executed just after starting alited.
You can set as many commands as you like, one command per a line. The commands may be Tcl/Tk commands or external executables.
These commands are sort of initialization depending on a type of projects, i.e. on a configuration described in First start section.

For Run

This option allows to set command(s) that would be executed before "Tools / Run". It's per a project.
Also, you can set a command that will be run "forcedly", independently on the type of currently edited file.
Hit "Help" button for details.