Opening a Tcl editor

In this section, you will learn how to open an editor for Tcl files. You will also learn about some of the basic Tcl editor features.

  1. Open an existing Tcl project if you have not done yet.
  2. Open the Script explorer view and double click a tcl file in the tree.
  3. Tcl editor

  4. Notice the syntax highlighting. Different kinds of elements in the Tcl source are rendered in unique colors.  Examples of Tcl source elements that are rendered differently are:

  5. Look at the Outline view. It displays an outline of the Tcl file including namespaces, fields, procs, classes etc. The Outline view uses specific icons to annotate different Tcl/Xotcl elements.

    Tcl editor

  6. Toggle the Hide Variables, Hide procedures, and Hide Namespaces buttons in the Outline view toolbar to filter the view's display.
    Before going to the next step make sure that the buttons are disabled.
  7. In the Outline view, select different elements and note that they are displayed in a whole file view in the editor. The Outline view selection now contains a range indicator on the vertical ruler on the left border of the Tcl editor that indicates the range of the selected element.

    Range indicator

Related concepts

Tcl views
Tcl editor
Sorting elements in Tcl views