Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

knffa

macrumors newbie
Original poster
Oct 30, 2008
1
0
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.
 
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.

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!
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.