Results 1 to 5 of 5

Thread: Is there a JS editor that will color code your indents?

  1. #1
    Join Date
    Apr 2008
    Location
    San Diego, CA
    Posts
    352
    Thanks
    57
    Thanked 6 Times in 6 Posts

    Default Is there a JS editor that will color code your indents?

    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!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    jlizarraga (01-17-2009)

  4. #3
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Aptana 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.

  5. The Following User Says Thank You to Snookerman For This Useful Post:

    jlizarraga (01-17-2009)

  6. #4
    Join Date
    Apr 2008
    Location
    San Diego, CA
    Posts
    352
    Thanks
    57
    Thanked 6 Times in 6 Posts

    Default

    Thanks guys!

    I still think the color coding would be awesome though. :P

  7. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •