[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newbie needs to be bailed out

From: Eric Abrahamsen
Subject: Re: newbie needs to be bailed out
Date: Thu, 05 Jan 2012 11:18:18 +0800
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (gnu/linux)

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!


> John "Kim" Young
> 1663 71st  Street
> Brooklyn, NY   11204
> (917) 620-5562

GNU Emacs (i686-pc-linux-gnu, GTK+ Version 2.24.8)
 of 2012-01-04 on pellet

reply via email to

[Prev in Thread] Current Thread [Next in Thread]