Komodo Edit Macintosh HowTo



  1. If you need to download/install Komodo Edit you can get it here.
  2. Start Komodo Edit by clicking the Spotlight icon in the upper right corner of your screen.

    Start typeing "komodo" until you see a match you like.

  3. When Komodo Edit starts you'll see a screen that resembles this:

    Select the Komodo menu entry at the top, and then select Preferences.

    On Linux systems, the Preferences menu item may be under Edit.

  4. Click the New Files item from the left menu to set Komodo to use Tcl as the file type. When you first click New Files you'll see this;

    When you click the Text selector, it will give you many options for the default language.

    Select Tcl, and the display will resemble this:

  5. You're ready to create and edit a new file now. Close the Preferences window by clicking the Ok and then open the File and New File menu items like this:

  6. Fill in a name for the file you wish to create and the directory where it should be placed as as shown here:

  7. Modify line 4 as shown below, and then start typing in your program.

    You can move your cursor with the arrow keys, typeing will insert text, and the backspace key will delete text.

    As you type, Komodo will give you hints about the command syntax and possible commands and will automatically close any quote, parenthesis, bracket or brace that you open.

  8. When you are ready to test your program, Save it by clicking the Save taskbutton (where the popup shows Save File.

    In a terminal window, make the file executable with a command like:

    chmod +x /Volumes/Scratch/test2.tcl
    Next open the Tools/Run Command menu as shown here:

    You can invoke the program either by explicitly telling Komodo to use the wish8.6 interpreter (like this:

    Or by just entering the path to the program.

    If you just use the path (as shown below), you must chmod the program and modify line 4 as shown above.

  9. You may need to click the little toad/frog icon on the Mac taskbar to bring your application to the top.

    Output from teh puts comamnd will be placed in the lower window, and the GUI will be placed on the screen as shown here:

  10. To modify the startup code that KomodoEdit automatically inserts into a new file:
    1. Find the default-templates/Common/Tcl.tcl template.
      On a Mac, this will be in the
      Applications/Komodo Edit.app/Contents/SharedSupport/default-templates/Common folder
    2. Edit that file and make it what you want.
      This command will work well for these labs. The cd command will make the application run in the directory where the script is.
      # -*- tcl -*-
      # The next line is executed by /bin/sh, but not tcl \
      exec wish "$0" ${1+"$@"}
      cd [file dirname [info script]]