View Full Version : Is there a JS editor that will color code your indents?
jlizarraga
01-17-2009, 01:41 AM
I was thinking today how nice it would be if indent levels in code were color-coded, so you could easily see different sets of brackets and such in long bits of code.
I use comments to keep track, but colors would be even better!
jscheuer1
01-17-2009, 12:24 PM
EditPad Pro (what I use) and probably many others will draw a small box around the opening and closing bracket (also opening and closing parentheses) if the cursor is placed in front of one, it and its partner are so delineated.
Snookerman
01-17-2009, 12:30 PM
Aptana (http://www.aptana.com/) will also mark the opening and closing tag or bracket and you can even chose to edit the closing tag when you edit the opening tag. So if you want to change a span to a div you just have to change the opening tag and the closing tag will change by itself. That is very practical if you rewrite a site, for example from tables to css.
jlizarraga
01-17-2009, 09:19 PM
Thanks guys!
I still think the color coding would be awesome though. :P
I'm not sure how colours would replace comments. You mean to have one colour for an if, one colour for a while, one colour for a function, one colour for a block, &c.?
emacs' highlight-parentheses-mode just colours every bracket applying to the current location of the cursor. When you insert an ending bracket, it skips the cursor momentarily to the matching opening bracket; I guess if you needed to remind yourself of what a given ending bracket closed, you could delete and re-insert it (or bind some other key to that behaviour, of course, but it's only a one-keypress saving anyway). Then again, I would suggest that if you had a block so large that it went off-screen, and it weren't a namespace or something else top-level, you should refactor your code anyway. :)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.