On Thu, Jan 05 2012, Kim Young wrote:
> Hello,
>
> I am running Mac os x lion and I want to use emacs to try to write
> some shell scripts for work. I am new to emacs so I would like help
> with some very basic things.
>
> 1. What is the command to determine the version of emacs that is provided with lion?
>
> 2. How do I enable color highlighting for syntext?
>
> 3 How do I get a list of the command sequences that auto generate
> things like "for", "while" and "do" loops for the various languages
> (C++, ruby, etc) I might use?
>
> Thanks for any help you can give me.
In addition to what everyone else has said…
Assuming you are already *in* emacs and using it to write bash scripts,
you want to find the "major mode" that corresponds with your file. When
I open, for instance, ~/.bashrc, it goes into shell-script mode, and on
the mode line I see (Shell-script[bash]). So emacs knows I'm editing a
shell script, and knows it's a bash script. This major mode (see (info
"(emacs)Modes")) provides both the syntax highlighting you're looking
for, and also helpful commands for language constructs. All the
major languages (C++, ruby, etc) have their own major modes, that
provide the correct highlighting and give you helper functions.
Hope that's what you were asking!
Read the manual!
Eric
--
GNU Emacs 24.0.92.2 (i686-pc-linux-gnu, GTK+ Version 2.24.8)
of 2012-01-04 on pellet