syntax highlighting for TextWrangler

chef noodleman

New member
I converted Bale's syntax highlighting xml file for Notepad++ to a "codeless language module" property list for TextWrangler. Since this was a small pain, I thought I'd share it in case there's any other mac users out there who would find this useful. Just drop it into the "Language Modules" folder wherever you installed TextWrangler, or create that folder if it doesn't exist yet. Make sure that .plist is the file extension. Sadly the codeless language module only supports 3 colors: comments, keywords, and strings. It IS possible to write a language module in C with more color support, however I was too lazy to undertake that project and anyway I'm having more fun learning ASH. Enjoy, mac people.
 

Attachments

My favorite feature for notepad++ is that when I highlight a variable, it highlights every occurrence of that variable. Does TextWrangler have something similar?
 
How does that compare to notepad++?

Probably not as feature rich, as its essentially a somewhat stripped down version of BBEdit. For instance, it lacks syntax folding. But it does have a nice search based on regex, and it has great ftp/sftp support built in so you can quickly open/edit/save files from a remote server. And it plays well with osx. If you're already using notepad++ its certainly not worth switching, but as a native application for osx, this isn't a bad choice.

I dunno, I personally prefer having line numbers on the side as well as in the status bar (the only place TW seems to have them, according to that picture).

There's a view option to add line numbers on the side, that's a must for me too.

My favorite feature for notepad++ is that when I highlight a variable, it highlights every occurrence of that variable. Does TextWrangler have something similar?

Not that I know of.
 
Last edited:
A quick check of the internets turned up another Mac text-editor, TextMate, which has some nifty-sounding features. How does this compare with TextWrangler?
 
Nice dude!
Btw the folder to place the plist-file is /User/<username>/Library/Application Support/TextWrangler/Language Modules/
Create the folder Language Modules if it doesn't exist!
 
I don't suppose there's any chance of someone writing something like this for TextWrangler is there? I tried out an old one I found floating around the forums, but it was horribly outdated.

Here you go.

I don't actually use it, so I don't know if it works. I just punched ashref into the CLI then formatted the results and merged them with what was in the XML file :)
 

Attachments

Back
Top