TextWrangler indent style

Discussion in 'Mac Apps and Mac App Store' started by knffa, Nov 2, 2008.

  1. knffa macrumors newbie

    Joined:
    Oct 30, 2008
    #1
    I'm new to mac osx and I'm looking for a nice lightweight text editor for coding (javascript/java) and I think TextWrangler is close to being it. The only thing I haven't been able to figure out is if I can customize it to auto indent braces in my preferred style (K&R/KNF).

    So I'd prefer it to auto-align the closing brace with the same amount of indentation as the first brace:
    Code:
    [INDENT]function f () {[/INDENT]
    [INDENT][INDENT]//function body...[/INDENT][/INDENT]
    [INDENT]}[/INDENT]
    I'm wondering if I might be able to do it with a module or plug-in, or is it simple setup option I've missed? If TextWrangler can't do it, does anyone know of a lightweight editor (preferably free) that can ? Otherwise I might just go with emacs or eclipse.
     
  2. JBmac macrumors member

    JBmac

    Joined:
    May 19, 2008
    Location:
    Eastern, PA
    #2
    There are some Textmate Video Podcasts on iTunes that might help. I downloaded the trial, have the book, but have not started using it yet myself. Good Luck!
     
  3. Cantello macrumors member

    Joined:
    May 29, 2008
    Location:
    Lüneburg
    #3
  4. SnowLeopard2008 macrumors 604

    SnowLeopard2008

    Joined:
    Jul 4, 2008
    Location:
    Silicon Valley
    #4
    TextWrangler is good. TextMate is pwnage. I used both, the former for HTML and the latter for my current Java/C++ classes. TextMate cost money though. You could use the built-in TextEdit and save with the extension .javascript or .java.
     
  5. Cantello macrumors member

    Joined:
    May 29, 2008
    Location:
    Lüneburg
    #5
    I concur, TextMate is very good, but not exactly cheap at nearly 50€.

    However, it can most certainly meet your requests, see the online help at http://manual.macromates.com/en/appendix.html#indentation_rules
     
  6. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #6
    Smultron is a great light weight text editor for programming.
     

Share This Page