ActiveState Community

Setting up a new Komodo IDE formatter

Posted by toddw on 2009-05-28 10:09
Question: 

How do I create a new Komodo code formatter for a given language?

Answer: 

Komodo's code formatting system can be used to launch external code formatting applications on your source code.

  • Go to Komodo's formatter preferences
    You can use Komodo's Edit->Preferences to bring up the Komodo preferences dialog, then select the Formatters category.
  • Create new formatter
    Use the green (+) button to start creating a new formatter. Fill in the Name and Language fields and then in the Formatter menu select the Other Formatters->Generic command-line formatter. This will show further configurable options to customize the formatter command. Generally this will be the name of the executable (example "tidy") and the options that are passed to this executable. The actual code to be formatted will be passed via stdin.
  • Example Language Formatters

guthrie | Thu, 2009-05-28 11:53

This is great! thanks.

coolluar | Wed, 2009-09-23 22:50

my komodo version and linux platform given below....

Komodo Edit, version 5.2.0, build 4075, platform linux-libcpp6-x86.
Built on Fri Sep 11 19:09:24 2009.

please help me get this formatter.

it will be of really great help to format those old junky codes in our server..

toddw | Thu, 2009-09-24 10:17

The built-in Komodo code formatters are only available in Komodo IDE, though there are some alternatives when using Komodo edit, see this post for details:
http://community.activestate.com/forum/code-formatting-0#comment-10346

Cheers,
Todd