Komodo

I Lost my Komodo Key! How do I reset it?

Question: 

How do I reset my Komodo Sync Key? I seem to have misplaced it.

Answer: 

You can remedy this problem by typing some random characters in the text box that you would normal paste your Komodo Key into then click "Next".

This will present an option to reset your Komodo Key.

Steps:

- Tools->Set Up Sync...->Next
- If you haven't already...Enter email and password -> Next
- Enter 'I have no idea." in the text field->Next
- Click "I have lost my Sync Key"

This will be fixed very soon.

Komodo code intelligence include (scan) directories

Question: 

How does Komodo determine the list of directories to scan for it's Code Intelligence?

Answer: 

Komodo's Code Intelligence system will scan the following directories (note that the directory scanning is done recursively, up to 10 levels deep):

  • all directories included by you language interpreter (i.e. PYTHONPATH, PHP include paths specified in the php.ini)
  • all directories in your Komodo project folders
  • all language include paths you've set up in your global preferences
  • all language include paths you've set up in your project preferences

Tweaking the above areas can help to reduce the files/directories Komodo will scan.

You can also completely disable the code intelligence system by turning it off in Komodo's CodeIntel preferences (it's the first checkbox).

Komodo 6.1 features

Product: Komodo | tags: komodo 6.1 release features

This is an overview of the major items included in the Komodo 6.1 release.

Projects and Places

By popular demand, a number of Komodo 5 project features have been re-introduced into Komodo 6, such as file and directory references. These static references can be organized in groups to keep things logical and tidy.

The next image shows how projects once again are containers for files and folders (local or remote), and groups (the pink one), which may contain all of the above. The contents of a folder are no longer shown in the Project pane; instead, you can double-click on a folder to show its contents in the Places pane.
Project Pane Image

As well as this, Komodo now has a convenient command to locate the current editor file within the Places UI. You can even have Komodo continously synchronize the Places location with the current editor file as you change between files.

 

Django Improvements

A number of Django specific improvements were made to Komodo.

  • better syntax highlighting and smarter indentation for templates
  • syntax checking for templates
  • Automatic code completions for Django template tags:
    Django Tag Completions, triggers on "{% ":
  • Automatic code completions for Django template filters:
    Django Filter Completions, triggers on "|":
  • hyperlinks to easily jump to template file locations
  • easier to open files with fast open supporting directory name matching

 

Debugger Tooltips

During debugging, when hovering over a variable, Komodo IDE will now show an expanded tooltip, which shows the child elements of arrays, objects and hashes.

 

Fast Open Filtering

The Fast Open dialog will now match your search query to the full path shown in the dialog. This means you can now filter down to:

  • a specific directory location
  • project specific paths
  • files and directories at the current places location

 

 

Other information

 

Online Documentation

Previous Komodo release

Komodo from the command-line

Question: 

How do I use Komodo from the command-line?

Answer: 

First, add it to your system PATH or create an alias. These examples use Komodo IDE 6.0, but you can modify them for any version.

  • Windows users: komodo.exe should be added to the PATH during installation.
  • Linux users: you can either add Komodo's 'bin' directory to your PATH:

    export PATH=$PATH:/opt/Komodo-IDE-6.0/bin

    ...or create a symlink as suggested at the end of the installation process:

    ln -sf /opt/Komodo-IDE-6.0/bin/komodo $HOME/bin/komodo

  • OS X users: use the 'alias' command:

    alias komodo='open -a "Komodo IDE"'

You should then be able to start it from a shell or console. If Komodo is already running, a file given as an argument will be opened in the existing instance in a new tab:

komodo ~/this/that/myfile.py

There are additional options. These options will only work with Mac if used on the full path command for Komodo. They will not work with the alias created above. Running komodo --help gets you:

Komodo IDE 6.0 -- ActiveState's cross-platform multi-language IDE

Komodo IDE is cross-platform integrated development environment
with a rich feature set for client-side Ajax languages such as
CSS, HTML, JavaScript and XML, coupled with advanced support for
dynamic languages such as Perl, PHP, Python, Ruby and Tcl.

Usage:

    komodo [options] [...]

Options:
    -h, --help   	show this help and exit
    -V, --version	print the Komodo version and exit
    -v, --verbose	show verbose startup and runtime info

    -n, --new-window	open a new Komodo window
    -l , --line=
        Open the given file(s) at a specific line; use
        , to open at a specific line and column.
        Alternatively, a line can be specified with a 
        pseudo-HTML-anchor syntax, e.g.: 'komodo myscript.pl#42'
        will open 'myscript.pl' at line 42.
    -s , --selection=
        Select a specific range in the given file(s);
         must be one of the following forms:
            1,5-2,15	select from line 1 and column 5
                    	to line 2 column 15
            15-22   	select from character 15 to 22

So specifying a line number with a file would look like this:

komodo -l 42 ~/this/that/myfile.php

Alternatively, you can use a pseudo-HTML-anchor syntax:

komodo myscript.pl#42

This will open 'myscript.pl' at line 42. If you want to get fancy, you can even specify a selection range:

komodo -s 1,0-43,0 ~/this/that/myfile.php

Generate a Python API catalog

Question: 

How do I generate a Komodo API catalog for Python binary module(s)?

Answer: 

Here are the steps you can use to generate a Komodo CIX file for a Python module:

  • Install your Python modules
    You'll need to have both Python and the Python modules installed on your computer.
  • Checkout the Komodo gencix tools
    # Argh, the website is formatting the URL below, you will need
    # to manually copy/update the URL link from below
    svn co http://svn.openkomodo.com/repos/openkomodo/trunk/src/codeintel/support/gencix/python python_gencix
    cd python_gencix
  • Generate the base cix file
    This is an example to generate the cix for the Python "socket" module:
    python gencix.py --onefile=socket.cix --name="Socket" --description="Python socket module" socket
  • Tweak the cix
    You may need to tweak the cix file, adding/removing/updating certain elements as you see fit.
  • Add the API to Komodo
    You can then add this API catalog (through Komodo's Codeintel preferences) into Komodo.

Cheers,
Todd

"Error reading from file" during installation

Question: 

When I try to run the MSI installer, I get a dialog with the message:

Error reading from file C:\Path\to\Some-installer.msi. Verify that the file exists and that you can access it.

This prevents me from installing the software. What's wrong?

Answer: 

The Windows "System" group needs to have access to the file. This problem often occurs when the msi file is saved to a folder without System group permissions and with "Inherit from parent" set.

To solve this, grant the System group Read & Execute permissions for the installer.

See also:

http://devsac.blogspot.com/2009/02/error-reading-from-file-msi-verify-th...

Komodo won't start on Windows XP

Question: 

After installing Komodo, it does not run at all. Running ko.exe directly produces an error which reads:

This application has failed to start because the application configuration is incorrect. Reinstalling application may fix this problem.

Reinstalling does not fix the problem. What's wrong?

Answer: 

It's most likely the result of Windows not having a working copy of the right version of the Visual C++ library runtime:

http://msdn.microsoft.com/en-us/library/ms235299%28VS.80%29.aspx

Try downloading and installing the Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)

Frequent Komodo crashes on Mac OS X 10.6.3

Question: 

I'm experiencing frequent Komodo crashes since updating to Mac OS X 10.6.3. Why is this?

Answer: 

Upon upgrading to Mac OS X 10.6.3, a corrupted font file can cause the Komodo 5.2 application to crash at startup.

There is a Mozilla bug report on this situation here:
https://bugzilla.mozilla.org/show_bug.cgi?id=514114

The Komodo 6 (nightly) builds have added a patch to work around these font corruption issues, so you may want to try a Komodo 6 build to see if this fixes your problem:
http://downloads.activestate.com/Komodo/nightly/

Cheers,
Todd

Debug UDL language styling

Question: 

How can I visualize how Komodo is styling (colorizing) my files?

Answer: 

Here is a helper macro to be able to see exactly how Komodo is styling the current editor document. Just drag/drop the visualize styling.kpz into Komodo (or alternatively place the below code into a new Python macro in your Komodo toolbox).

The code is shown below for easy viewing:

from xpcom.server import UnwrapObject
from komodo import components, document

# Convert the current editor document to html.
buf = UnwrapObject(document.ciBuf)
html = buf.to_html(include_styling=True, include_html=True,
                   title=document.baseName, do_trg=False, do_eval=False)

# Write the html to a file.
fileSvc = components.classes["@activestate.com/koFileService;1"].getService(components.interfaces.koIFileService)
f = fileSvc.makeTempFile(".html", "w")
f.puts(html.encode("utf-8"))
f.close()

# Open it in the default web browser.
webbrowser = components.classes['@activestate.com/koWebbrowser;1'].getService(components.interfaces.koIWebbrowser)
webbrowser.open_new(f.path)

Usage:

  • double-click on the macro
  • after a few seconds a new html page should be opened in your default browser
  • hovering over pieces of the html text will show what the underlying style name is (displayed in the upper right hand corner)

You can also tweak the html settings (do_trg and do_eval to True) to show codeintel completion points and the evaluation data (completion data and calltips). Neat huh?

Komodo 6.0 features

Product: Komodo | tags: komodo 6.0 release features

This is an overview of the major items included in the upcoming Komodo 6.0 release.

Places

A new file manager has been added to Komodo's left pane. It provides a customized view of your file system (local or remote) and allow easy file management operations such as file editing, copying, drag/drop file moving, creation or removal of files and folders, as well as recursive search capabilities.

Places will replace the existing Komodo project viewer (by the time Komodo 6 is final).

Publishing Tools (IDE only)

Easily copy remote files to your local system to work on them, then push your changes back to the remote system when you're done editing. Komodo keeps track of the synchronization details to avoid copying files that haven't changed, as well as using advanced conflict detection to avoid overwriting changes made by others.

You can also using publishing as a form of file backup management, by regularly synchronizing your development code you can remotely maintain a backed up copy of your work.

Toolbox 2.0

The new toolbox will aggregate all the tools into one window. These include the standard toolbox, tools from the shared toolbox (IDE only), tools from projects, and, eventually, tools exported by extensions. By storing each tool as an individual file, it should be easier to import, export, and share tools.

Database Explorer (IDE only)

Komodo's Database Explorer lets you easily explore local and remote database installations, including viewing and managing data. Komodo will initially ship with support for SQLite. Additional databases are supported through Komodo add-ons, such is the case for Oracle and MySQL support.

Python 3 support

Komodo 6 fully supports Python 3 (debugging, code intelligence, syntax checking, ...). When opening Python files, Komodo will automatically detect the Python version used (Python 2 or 3) from the file contents - you can also override the language through the Komodo language selection menu in the status bar.

HTML 5

Komodo 6 properly detects HTML 5 code (<!DOCTYPE html>) and includes updated HTML 5 code completion support for the new HTML elements (video, canvas, etc...) as well as updated HTML 5 attributes.

CSS 3

The Komodo CSS code intelligence will now include CSS 3 specific completions and calltips. As well there is now code intelligence support for browser specific extensions (such as Mozilla -moz- and WebKit -webkit-).

Faster

A number of Komodo components have been made to run faster, such as startup, shutdown, tab-switching and text searching. As well as these changes, the underlying Mozilla source code has been updated to version 1.9.1, the same code base as Firefox 3.5, which means improved performance gains for Komodo as well as newer technology support such as internal HTML 5 preview capabilities.

Workspace Save and Restore

Komodo will now be regularly saving your Komodo workspace and in the case of an unexpected shutdown (crash, killed) then on the next startup, Komodo will offer to restore your last used workspace.

Hyperlink Additions

Komodo's hyperlinks have been extended and can now help in the following ways:

  • Popup Definitions
    Upon holding/hovering on a hyperlink, a popup reference will appear showing the code intelligence information for the target text.

  • Anchor tags in HTML
    You can now hyper click on an anchor tag reference and Komodo will then find and move to where the reference is defined.
    &lt;a href="#tips"&gt;
    ...
    &lt;a name="tips"&gt;Useful Tips&lt;/a&gt;
  • Jump to HREF and SRC locations
    Hyper clicking on external document references, such as CSS, JavaScript will open the file location:
    &lt;link rel="stylesheet" type="text/css" href="screen.css" /&gt;
    &lt;a href="ide.html"&gt;
  • Open filename references
    A hyperlink handler was also added for opening regular file references, such as:
    C:\projects\todo.txt
    /home/toddw/phase1/outline.xml
    file:///path/to/local/file
    
  • PHP includes
    A hyperlink handler was added for PHP file includes, such as:
    include_once('myfile.php');
    require 'somefile.php';
    

Rx Toolkit Additions (IDE only)

Komodo's Rx Toolkit now supports testing regular expressions with four new languages (in addition to Python), namely Perl, PHP, Ruby and JavaScript. Regular expressions are also evaluated "out of process", so a long-running regular expression won't tie up the IDE.

Invoke Tool

There is a new Toolbox helper 'Tools -> Invoke Tool' that can be used to quickly search through the toolbox and invoke (execute) the selected tool(s). This is convenient for quickly inserting snippets, executing Komodo macros, or for running a command, as it works without the need to change your focus to the toolbox pane.

Previous Komodo release