bash syntax highlighting for Xcode 4

Hi folks


Trying to so some bash scripting in Xcode and though there is some syntax highlighting it is not what I would expect. For instance $variables aren't recognized and highlighted differently.


Is more rigorous bash syntax highlighting available for Xcode 4?


If not, can someone recommend a text editor that is not of the sort typically integrated into the terminal (e.g. not vim or emacs). I just want something like Text Editor but with syntax highlighting for bash.


Thanks

Mac Pro Dual-Core Intel Xeon, Mac OS X (10.6.1)

Posted on Jan 20, 2012 11:44 AM

Reply
4 replies

Jan 20, 2012 12:31 PM in response to red_menace

TextWrangler is great -- would recommend it to anyone. It recognizes lots of different languages for syntax coloring, but I'd have to check if bash is among it.


Even if it does not, no need to give up right away. In the manual it is stated that "third party plugins" can add more languages, but apparently you can also do so with a simple XML file. I'll give this a go to see how it works.


In addition, TextWrangler sports a menu called " !#" -- 'shebang' -- from which you can run the current text file immediately, and it stores the output into a new document. An awesome feature.

Jan 20, 2012 1:13 PM in response to Stubaan

Awww, I just checked. "Unix Shell Script" is among the supported syntax colored languages, but it doesn't recognize $variables, and it's not one of the simple editable files either, not in Application Support nor in the application itself.

So it must be built-in -- but if you like the rest of TextWrangler, you could always send a feature request to Bare Bones.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

bash syntax highlighting for Xcode 4

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.