Komodo Edit - HTML reformatting / Tidy

Dave picture Dave · Jan 14, 2011 · Viewed 16.5k times · Source

Is there a simple way to reformat my HTML from within Komodo Edit or to automate the process against Tidy?

Something like the Ctrl+K, Ctrl+D in Visual Studio would be brilliant. I am presently running Ubuntu with Tidy installed.

Answer

Chris Fletcher picture Chris Fletcher · Apr 7, 2012

If you want a solution that just straight up works, do the following:

  • Pop open the toolbox panel on the right.
  • Click on the gear and select New Macro. Name it what you like.

Get the macro code here:

Komodo edit macro (404)

It includes the code from http://jsbeautifier.org/ and works like a charm...

Next is to set up a keystroke:

  • Select your new macro in the toolbox

  • Now go to key bindings

    Type a sequence and it will tell you if the sequence you typed is available. I use Ctrl + / because they are near each other.