Managing Projects and Files
Komodo's Project Manager is used to organize files and objects. While it is
possible to open, edit and debug files in Komodo without assigning them to a project,
projects help organize related groups of files for easy access.
The top level of organization is the project file, which can contain both
files and folders. Projects are XML files stored on disk with a
.kpf extension. (While it is possible to open and edit project files stored on disk,
it is not advisable, as errors can result in projects that Komodo cannot load.
All project-related tasks can be accomplished using the Komodo Project Manager.)
Projects can contain both files and folders. Folders are metaphorical;
that is, they do not directly correspond to directories on the disk. (However,
when you Import from File
System, folders will be created with the same name as the imported
directories.)
Files can be added to both projects and folders. These are references to
actual disk files.
Projects can also contain objects such as commands and URL links.
Each component of the Project Manager has a context menu that is invoked
by clicking with the right-mouse button. The items on the menu vary depending
on the context in which the menu was invoked. For example, the context menu
for files has an "Open File" option, while the context menu for projects has an
"Add New Folder" option.
If you are using Komodo's source code control integration, files and projects
stored in the source code repository are displayed in the Komodo workspace with
accompanying icons that reflect the status of a file or project. For more about
file status icons,
see Komodo's source code control documentation.
Use Komodo's sample project to familiarize yourself with project functions.
For details,
see Getting Started.
The files that you create and manage with the Project Manager are displayed on
the Projects tab
in the Projects/Toolbox Pane. To display this pane, from the View menu,
select Projects/Toolbox Pane, or press Ctrl+Shift+P.
Project commands are available through the Project menu.
Alternatively, you can access the Project Manager
context menu
by right-clicking a project name on the Projects tab. Right-clicking a file or object
will display the context menu specific to that file or object.
To create a new project:
- From the File menu, select New|New Project.
- Browse to the desired directory and name your project.
- Click OK. The new project will be displayed on the
Projects tab.
Alternatively, you can create a new project from the
Start Page
that displays when you launch Komodo. Select the option "Create New Project".
When you create a new project, the project file has no associated program files.
To continue, you need to add a file
to the new project.
Top
To open a project:
- From the File menu, select Open|Project.
- Browse to the appropriate directory, highlight the desired project
name and click Open.
or
- From the File menu, select Recent Projects.
Modify Komodo's Appearance preferences
to configure the number of projects displayed in the list.
- Select the project name.
Alternatively, you can open an existing project from the
Start Page that displays
when you launch Komodo.
- If the project is listed under Recent Projects, click the project name.
or
- Click Open Existing Project.
The project name and associated files are displayed on the
Projects tab.
Opening a project opens only the project file and not the files
associated with the project. To begin editing, you need an open
file, or you could create a new file and then
add the file to a project.
Top
You can have many projects open, but only one project is active at any
given time.
To switch between open projects, right-click the desired project name on the
Projects tab
and select Make Active Project.
Alternatively, select Make Active Project from the
Project drop-down menu, and select the project you wish to
make active from the list of open projects.
Top
Folders are used to group items in projects. They are metaphorical;
that is, they do not directly correspond to directories on the disk. (However,
when you Import from File
System, folders will be created with the same name as the imported
directories.)
To create a new folder beneath a project or existing folder, right-click the
desired project or folder and select Add New Folder. Alternatively,
from the Project drop-down menu, select Add to
Project|Add New Folder. You will be prompted to provide a name for the
new folder.
Right-click a folder to access the following options:
- Import from File System: see
adding multiple files to a project for
a description of the import options.
- Export as Project File: to export folders as
Komodo Project files, select this option.
- Rename: to change the name of a folder, select this
option and enter a new name.
- Add|New Folder: to add a sub-folder to the selected folder,
select this option. You will be prompted to specify a name for the new
folder.
- Add|Existing File(s): to add a file or multiple files to the
selected folder, select this option.
- Add|Existing Remote File: to add files stored on an FTP server
to a folder, select this option. In order to access remote servers, you must
configure access to the server. See
Opening Remote Files for
information on accessing files stored on remote FTP servers.
- Add|New Snippet: to add a code snippet to the current
folder, select this option. See
Snippets for more
information.
- Add|New Command: using Komodo's
Run Command function, you can
create and save command-line interactions. These commands can be stored in
folders using the Add Command menu option. This menu option
will display the Command Properties dialog, which is described
in the Running Commands
section of the User Guide.
- Add|New Template: to add a template to the current folder,
select this option.
- Add|New URL: to add a link to a URL in the current folder,
select this option.
- Add|New Dialog: to add a GUI Dialog to the current folder,
select this menu option. See Using the
GUI Builder for information about building dialogs.
- Add|New WebService: to add a Web service reference to the
current folder, select this menu option. See
Web Services for more
information.
- Add|New Macro: to add a macro to the current folder, select
this option. See Macros for
more information.
- Add|New Open... Shortcut: to add a shortcut that links from
a folder in the Project Manager to a directory on disk, select this option,
then use the Browse for Folder dialog box to choose a directory.
- Source Control on Contents: a sub-set of Komodo's
Source Code Control functions
can be performed on the files stored within the selected folder. See
Source Code Control for a
description of these options.
- Delete: to remove a folder from a project, select this
option.
- Properties: to view the properties of a virtual
folder, select this option.
Top
Adding specific single or multiple files to a project:
- Ensure the project is open and displayed on the
Projects tab.
- Click the project name.
- To add a local file to the project, select Project|Add|Existing File(s),
and specify the desired file. Alternatively,
right-click the project name on the Projects tab and select Add|Existing File(s).
Browse to the directory where the desired file is stored, highlight the file name,
and click Open.
Alternatively, open the file using File|Open, then
click and drag the file name tab from above the Editor Pane to the desired project.
Files do not need to be located in the same directory as their associated project file.
- Right-click the desired project and select Import from File
System, or select Import from File System from
the Project drop-down menu. Choose from the following
options in the Import From File System dialog box:
- Directory to import from: Specify the directory from
which you want to import files. Use the Browse button to
navigate the file system.
- Files to include: Specify the file names to include.
Use standard wildcards to specify groups of files. If the field is left blank,
all files in the specified directory will be imported.
- Files and directories to exclude: Specify the file and
directory names to exclude. Use standard wildcards to specify groups of files.
If the field is left blank, no files in the specified directory will be excluded.
- Import Subdirectories Recursively: Check this box to
import directories (and files contained in those directories) located beneath
the directory specified in the Directory to import from field.
This box must be checked in order to specify the "Import Directory Structure"
option as the Type of folder structure to create.
- Type of folder structure to create:
- Import directory structure: If the Import
Subdirectories Recursively box is checked and this option is
selected, Komodo will create folders within the project that represent
imported directories. Thus, the directory structure will be preserved
within the project.
- Make a folder per language If this option is
selected, imported files will be organized into folders according to the
language indicated by file pattern in the file name. File associations
are configured in the Komodo Preferences. Each
folder is named after the associated language; for example, "Perl files",
"XML files", etc. Files that don't correspond to a known file pattern
are stored in a folder called "Other files".
- Make one flat list If this option is selected, all
the imported files will be placed directly under the project or file from
which the Import from File System command was invoked.
- Click Next. The Confirm Project Changes
dialog box will open.
- Click OK to confirm changes or, optionally, edit the list
of files and then click OK.
After using the Import from File System feature, if you
attempt to re-import the same file system location into the same project, only
files that are new since the last import will be imported.
On Windows systems, you may also add multiple files to a project by selecting
multiple files in Windows Explorer and dropping them onto the desired project
on the Projects
tab.
To add files stored on FTP servers to a project:
- Ensure the project is open and displayed in the Projects tab.
- Right-click the project name, and select Add|Existing Remote File.
- Alternatively, open the file using the File|Open|Remote File dialog,
then click and drag the file name tab from to the desired project.
- Alternatively, from the Project drop-down menu, select
Add|Existing Remote File.
See Opening
Remote Files for information about configuring remote hosts.
Right-click a file to access a context menu with the following options:
- Open File: to open a file in the Editor Pane, select this
option.
- Make "Open..." Shortcut: to add a shortcut link from the
current file in the Project Manager to a directory on disk, select this option.
- Refresh Status: use this option to refresh the status
of the file. More information about
file
status can be found in Komodo Preferences.
- Save as Macro in Toolbox: to save a file as a macro in the
Toolbox, select this option and then, in the Create New Macro
dialog box, click OK.
- Compare File With: To compare the current file with another
file, select this option, then choose a file to compare from the
Select File dialog box. The file will open in a separate window,
where you can press F8 to jump to the next change, F7 to jump to the previous
change, and ESC to close the window.
- Export as Project File: to export files as
Komodo Project files, select this option.
- Source Control: Use this option to perform Source Code
Control functions on the selected file. See
Source Code Control for a
description of these options.
- Delete: to remove a folder from a project, select this
option.
- Properties: to view the properties of a virtual
file, select this option.
Top
Komodo's Snippets
are selections of frequently-used code. To add a snippet to a project:
- Project Manager context menu: right-click the desired project and
select Add|New Snippet.
- Project drop-down menu: select
Add|New Snippet.
- Copy from Toolbox: Right-click the snippet in the
Toolbox, and select
Copy. Click the Projects tab, select the
desired folder, and select Paste.
To insert a snippet in the Editor Pane, double-click the snippet.
The following options are available on the context menu:
- Insert Snippet: To insert the snippet at the cursor
position in the current document, select this option.
- Export as Project File: to export snippets from
the Project Manager as Komodo Project files, select this option.
- Rename: is used to change the name of the command.
- Delete: is used to remove the command from the Project Manager.
- Properties: displays the name and contents of the snippet,
and has preferences for snippet insertion. See
Code Snippets for more
information.
Top
Komodo's Run Command dialog
is used to interact with the system command line or shell while you are editing
or debugging files. You can insert the results of shell commands into the
document in the editor, or you can pass contents of the document to the shell
prompt.
- Project Manager context menu: right-click the desired project and
select Add|New Command.
- Project drop-down menu: select
Add|New Command.
- Copy from Toolbox: Right-click the command in the
Toolbox, and select
Copy. Click the Projects tab, select the
desired folder, and select Paste.
To run a command, double-click it in the Project Manager.
The following options are available on the context menu:
- Run: is used to run the selected command.
- Export as Project File: to export commands from the Project
Manager as Komodo Project files, select this option.
- Rename: is used to change the name of the command.
- Delete: is used to remove the command from the Project Manager.
- Properties: displays the name and contents of the command,
and has a variety of run options. See
Running Commands for more
information.
Top
Templates can
be added to the Project Manager by either of the following methods:
- Project Manager Context Menu: Right-click a project on
the Projects tab, and select the option Add|New Template.
- Project drop-down menu: select
Add|New Template.
- From the Toolbox Tab: Copy files
from the Toolbox tab
to the Projects tab.
Double-click a template on the Projects tab to open it in
the Editor Pane.
The following options are available on the context menu:
- Open Template: to open the template in the Editor Pane,
select this option.
- Export as Project File: to export templates from the Project
Manager as Komodo Project files, select this option.
- Rename: is used to change the name of the command.
- Delete: is used to remove the command from the Project
Manager.
Top
You can add a URL link to the Projects tab by using the Project Manager context
menu, or by dragging and dropping.
To add a URL link to the Project using the context menu:
- From the Project Manager context menu, select Add URL. The
Create New URL dialog box will open.
- In the "link" field, enter a name that you want to appear next to the URL
link on the Projects tab.
- In the Value field, enter the URL.
- Click OK.
To add a URL link to the Projects tab by dragging and dropping:
From a browser address bar or from the Editor Pane, select a URL and drag it
with the mouse onto the Projects tab. When using this method, ensure that URLs
have the prefix "http://".
Double-click a link to open your system's default browser and load the URL.
The following options are available on the context menu:
- Open URL in Browser: to open the linked URL in the default
browser, select this option.
- Export as Project File: to export URLs as
Komodo Project files, select this option.
- Rename: change the name of the URL.
- Delete: remove the URL from the Project Manager.
- Properties: to view the properties of a URL link or to
assign a new name to a URL link, select this option.
Top
Komodo (Professional version) works in conjunction with the ActiveState GUI
Builder to provide a toolkit for creating graphical dialogs. For more information,
see Using the GUI Builder.
- Project Manager context menu: right-click the desired project
and select Add|New Dialog
- Project drop-down menu: select
Add|New Dialog.
- Copy from Toolbox: Right-click the URL in the
Toolbox, and select
Copy. Click the Projects tab, select the
desired folder, and select Paste.
Top
For quick access, Web service bookmarks can be added to projects. For more
information, see Web Services.
There are three methods for adding Web services to projects:
- Project Manager context menu: right-click the desired project and
select Add|New Web Service
- Project drop-down menu: select
Add|New Web Service.
- Copy from Toolbox: Right-click the Web Service in the
Toolbox, and select
Copy. Click the Projects tab, select the
desired folder, and select Paste.
Top
Macros are recorded sets of keystrokes. Saved macros can be added to projects.
For more information, see Macros.
There are three methods for adding Macros to projects:
- Project Manager context menu: right-click the desired project and
select Add|New Macro
- Project drop-down menu: select
Add|New Macro.
- Copy from Toolbox: Right-click the Macro in the
Toolbox, and select
Copy. Click the Projects tab, select the
desired folder, and select Paste.
Top
Ensure that the project is displayed on the
Projects tab.
Right-click the item you wish to remove, and select Delete.
Top
Use the button on the top right of the Project Manager frame to select the
fields that are displayed in the Project Manager. Click on the column headings
to organize the items in the folder according to the contents of any column.
Top
If an asterisk is displayed beside the project name, the project has been changed
since it was opened. To save a project:
- From the File menu, select Save Project.
or
- Right-click the project name and select Save Project.
The project that is currently highlighted in the
Projects tab
will be saved. If no project is highlighted, the Active Project (displayed in bold text)
will be saved.
To save a project to a project file with a different name:
- From the File menu, select Save Project As.
or
Right-click the project name and select Save Project As.
- Browse to the desired directory and assign a name to your project.
Komodo will append a .kpf extension, which indicates a Komodo Project file.
- Click Save.
Top
To update the status of a project displayed on the
Projects tab,
right-click the project and select Refresh Status.
Select the Update file status automatically option on the Projects
and Workspace page of Komodo
Preferences
to have Komodo periodically refresh the status of information on the
Projects tab.
Top
If a project has been changed, you can return it to its last-saved state using
the Revert Project feature. To revert a project, select Project|Revert Project.
The Revert Project feature becomes unavailable if changes to a project have been saved.
Top
To close a project:
- From the File menu, select Close Project.
or
- Right-click the project name and select Close Project.
You will be prompted to save any changes files (including the project file
itself).
Top
There are two methods for creating new files in Komodo: the New File
button, and the File|New|New File menu option.
Creating New Files using the "New File" Button
When you click the New File button, a new file of the default
type will be opened in the Komodo editor. Use the
File Settings
dialog in Komodo's Preferences to specify the default file type for new files.
Creating New Files using the "New File" Menu Option
The New File menu option (File|New|New File, or
Ctrl+N) provides access to numerous templates for creating
new files. These templates consist of standard code that is generally included
in programs of the selected type. For example, the Perl template creates a
file with a .pl extension that contains the line "use strict;"; the XSLT
stylesheet template creates a file with an ".xsl" extension and an xml version
and xsl stylesheet declaration.
To use a template file, in the New File dialog box, select the category in
the left pane, then double-click the template name in the right pane. A new file
will be created in the Komodo editor using the code stored in the template.
Creating Custom Templates
- Create Template File In Komodo, create a file with the
code that you want to appear whenever you use the template. Give the file
a name and an appropriate extension (according to the File Associations configured
in Komodo's Preferences).
- Save as Template Select File|Save As Template.
Custom templates are stored in the "My Templates" folder, which will be displayed
in the New File dialog. You may create directories under the
My Templates directory to organize template files.
To edit an existing template, select File|Open|Template File,
and select the desired template.
Custom Template Notes
- You can create shortcuts (on Windows) or symlinks (on Linux and
Solaris) in the My Templates directory structure that point to files located
elsewhere on your system.
- If you create a directory alongside "My Templates" with the same name as
a template group that already exists in Komodo (such as "Perl" or "Other
Languages"), the contents of the two directories will be merged. If
files of the same name exist in both directories, the file in the My
Templates directory will be used.
Embedding Shortcuts in Custom Templates
Komodo provides
interpolation shortcuts for
templates. You can use shortcuts to insert dates or text passages in templates.
When you create a new file based on a template that contains a date shortcut,
the variables will be converted to their numerical value according to the system
clock.
To embed a variable in a custom template, edit the template file and add one or
more shortcuts described in the
Interpolation Shortcuts appendix.
Top
To open a file that is associated with a project:
- From the File menu, select Open|Project.
- Browse to the appropriate directory, highlight the desired project
name and click Open.
- On the Projects tab, double-click the filename to open the
file, or select the file and drag and drop it into the Editor Pane.
To open a file that is not associated with a project, do one of the following:
- From the File menu, select Open
or Press Ctrl+O. or Click the Open
button.
- Browse to the appropriate directory, highlight the desired file
name and click Open.
To open multiple files that are associated with a project:
- From the File menu, select Open|Project.
- Browse to the appropriate directory, highlight the desired project
name and click Open.
- On the Projects tab, select the files that you want to open.
- Select Open File from the Projects context menu, or
drag the selected files and drop them into the Editor Pane.
To open multiple files that are not associated with a project:
- Launch Komodo.
- Select the files you want to open. For example, highlight the desired files in
Windows Explorer, or on your desktop.
- Drag these files and drop them into the Editor Pane.
Komodo stores the names of projects and files that have been recently opened.
The number of file and project names stored depends on the value specified in the
Appearance
page of Preferences.
- From the File menu, select Recent Files.
- Select the desired file name.
You can also access the list of recently opened files on Komodo's
Start Page.
To open a file from the Start Page:
- If the file is listed under Recent Files, click the file name.
On Linux, you can launch Komodo and open a specific file at the same time
by using the command:
komodo <filename>
The file opens in the Editor Pane with the appropriate color, syntax, and
indentation for that language.
You can now edit the file.
Top
You can open and edit files that exist on remote machines, providing
that the remote machine is configured for FTP access. To quickly access FTP
servers that you use frequently, create an entry in the
Server Preferences
(Edit|Preferences|Servers).
To open a file located on a remote FTP server, select File|Open|Remote
File...
Connecting to an FTP Server
- Pre-Configured Server Connection if you have configured FTP
servers in Komodo's
Preferences, select the name
of the account from the Server drop-down list. You can also
access the Preferences dialog by clicking the Accounts button to the right
of the Servers field.
- Manual Server Connection enter the FTP address (in the format
"ftp.server.com") in the Server field. Press Enter. You will be
prompted to enter a name and password for the FTP server. If the server is
configured for anonymous access, select Anonymous login. To
store the login name and password for the server, click Remember these
values.
Navigating the Remote File System
After you have established a connection to the remote FTP server, a list of
files and directories will be displayed. These files and directories exist under
the directory specified in the Look in: field. Double-click a directory
(indicated by a file folder icon) to navigate the directory structure. To move
up one level in the directory structure, click the Up button
located in the top right corner of the dialog.
To open a single file, double-click the file name. To open multiple files,
hold down the Ctrl key and click the files you want to open, then click
Open.
The buttons in the top right corner of the dialog can be used to perform various
file and directory manipulation functions. Hover your mouse pointer over the
buttons for a description of their function. To delete or rename a file on the
remote server, right-click the file name and, with the left mouse button,
select the desired command from the context menu.
Top
To switch between files that are open in the editor, do one of the following:
- Press Ctrl+Tab to display the file that was most recently viewed before the
current file.
- Press Ctrl+Shift+Tab to display the file that was most recently viewed after
the current file.
- In the Editor Pane,
click the tab with the desired file name.
- Click the right and left arrow buttons located in the top right corner of the
Editor Pane to view the tabs of all open files.
- In the Projects tab,
double-click the file name.
- From the Window menu, select Next File or
Previous File, which will move from left to right (or right
to left) across the file tabs.
- From the Window menu, select the desired file from the list of files
that are currently open in the editor.
Note that you can re-order the position of the file tabs by dragging and
dropping the tabs into the desired position.
Top
To compare two files using Komodo's "diff" window:
- Select Tools|Compare Files.
- Enter the paths for the files in the First file and
Second file fields, or use the Browse buttons
to navigate to the file locations.
- Click Compare Files. The contents of both files will be
displayed in the "diff" window.
The unique characteristics of each file are displayed in different colors
(red and blue by default), and any common characteristics are displayed in a
third color (black by default).
To configure custom colors for the "diff" window:
- Select Edit|Preferences|Fonts and Colors.
- Click the Language-Specific Coloring tab.
- From the Language drop-down list, select
Other|Diff.
- Use the drop-down lists, buttons and color palettes on the tab to
configure colors for specific elements. For more about the options
on the Language-Specifc Coloring tab, see the
Fonts and Colors
section of Komodo Preferences.
The following key bindings may be used in the "diff" window:
- F8: jump to the next change
- F7: jump to the previous change
- Esc: close the window
Top
Printing style is configured in the Komodo
Preferences.
To print a file, do one of the following:
- From the File menu, select Print...
or
- Click the Print button on the toolbar
or
- Select Print from the Editor Pane's
Context Menu.
To generate an HTML file from the file currently active in the Editor Pane:
- Select File|Print to HTML File. You will be prompted to
name the output file.
- Enter the file location in the field provided. Click OK.
The HTML file will open in the Editor Pane.
Manage the format of print jobs using the options available in the Page Setup
dialog box. Select File|Page Setup to access these options.
Format and Options
- Orientation: select an option button to specify whether
your print job will be portrait or landscape.
- Scale: If the "Shrink To Fit Page Width" check box is not
selected, you can use this field to manually enter a percentage.
- Shrink To Fit Page Width: select this check box to make
the print job fit the paper size selected for the default printer.
- Print Background (colors & images): select this check box
if you want to include background colors and graphics (e.g., on a Web page) in
a print job.
Margins and Header/Footer
- Margins: Use the fields provided to enter the size of the
margins in inches.
- Headers and Footers: Use the drop-down lists to select the
type of information that will appear in the headers and/or footers, and to
determine their position on the page. The top row of lists contains the header
options, and the bottom row contains the footer options. You can choose from
options such as "Title", "URL" and "Page #". Select the "Custom" option from
any of the drop-down lists to enter custom header information. If you do not
want headers or footers to appear in a print job, select the "blank" option in
each of the drop-down lists.
To preview the appearance of a print job, select
File|Print Preview. The Print Preview window contains features
for setting the scale and orientation of a print job. Use the arrow buttons to
move forward or backward in a multi-page print job, or enter a specific page
number in the field provided. Click the Page Setup button to access the complete
set of print features in the Page Setup
dialog box.
Top
To abandon changes made to a file since it was last saved, but leave the file
open in the editor:
- From the File menu, select Revert
Top
To save a file with its current name, do one of the following:
- From the File menu, select Save
or
- Press Ctrl+S
or
- Click the Save button on the toolbar
or
- Right click the file tab and select Save.
To save a file with a different name:
- From the File menu select Save As.
- Browse to the appropriate directory and name the file.
Ensure you use a file extension
that Komodo recognizes.
- Click Save.
Alternatively, right-click the file tab and select Save As.
To save all open files with their current names, do one of the following:
- From the File menu, select Save All
or
- Press Ctrl+Shift+S
or
- Click the Save All button on the toolbar.
Top
To save files to a remote FTP server, select File|Save Remotely As...
To quickly access FTP servers that you use frequently, create an entry in the
Server Preferences
(Edit|Preferences|Servers).
For a description of the Remote File dialog, see
Opening Remote Files.
Top
To close one or more files, do one of the following:
- From the File menu, select Close
or
- Press Ctrl+F4
or
- Right-click the file tab and select Close
or
- Click the Close button on the Editor Pane toolbar
or
- From the Window menu, select Close (to
close the current file) or Close All (to close all files in the editor).
To close all open files in all projects:
- From the File menu, select Close All.
You will be prompted to save any changed files.
Top
|