The most advanced JavaScript editor for OS X

developmenttext-editor

I tried Espresso but it lacks so many important features like no auto-parentheses, no auto-aliging.
What is the most advanced JS editor for OS X?
(please not Emacs for me).

Best Answer

I use the free version of Komodo Edit by ActiveState on Mac and PC. Through its plugin architecture it has extensions that let you edit Javascript files wonderfully, with intellisense, code completion, and so on, and it also lets you write Javascript macros. Very cool. I have a JSBeautify macro that formats the code wonderfully as well.

Edited to add sample macro I made in Komodo Edit. The following sorts lines in alpha order:

var appObj = ko.views.manager.currentView.scimoz;
if (appObj.selText == '') {
     appObj.selectAll();
}
var docText = appObj.selText;
komodo.editor.beginUndoAction();
var ary = docText.split('\n');
ary.sort( function(a,b){
 var a1 = a.toLowerCase();
 var b1 = b.toLowerCase();
 return (a1 > b1) ? 1 : (a1 < b1) ? -1 : 0;
});
docText = ary.join('\n');
appObj.replaceSel(docText);
ko.commands.doCommand('cmd_cleanLineEndings');
komodo.editor.endUndoAction();