unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: help-gnu-emacs@gnu.org
Subject: Re: newbie needs to be bailed out
Date: Thu, 05 Jan 2012 11:18:18 +0800	[thread overview]
Message-ID: <87fwfudeh1.fsf@ericabrahamsen.net> (raw)
In-Reply-To: AE75DE55-F98D-40D7-81CC-DB2F3B3E91B6@me.com

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

>
> John "Kim" Young
> 1663 71st  Street
> Brooklyn, NY   11204
> (917) 620-5562
> kimyoung@mac.com
>
>
>
>
>

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




      parent reply	other threads:[~2012-01-05  3:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-04 19:22 newbie needs to be bailed out Kim Young
2012-01-04 19:45 ` Peter Dyballa
2012-01-04 22:40   ` Philipp Haselwarter
2012-01-04 23:57     ` Peter Dyballa
2012-01-04 23:54 ` Jai Dayal
2012-01-05  0:14   ` Marko Vojinovic
2012-01-05  0:16     ` Jai Dayal
2012-01-05  0:20     ` Drew Adams
2012-01-05 12:32     ` Peter Dyballa
2012-01-05  3:18 ` Eric Abrahamsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fwfudeh1.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).