help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Is there an emacs bash script mode / colouring?


From: Richard Riley
Subject: Re: Is there an emacs bash script mode / colouring?
Date: Mon, 12 Oct 2009 13:53:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

dkcombs@panix.com (David Combs) writes:

> In article <87ab0wc9ac.wl%anselm.helbig+news2009@googlemail.com>,
> Anselm Helbig  <anselm.helbig+news2009@googlemail.com> wrote:
>>Hi!
>>
>>> This may sound like a silly question, but is there a major/minor mode for 
>>> emacs that does syntax colouring and auto-formatting of bash scripts?
>>> 
>>> I've tried searching the web, but can't seem to find anything applicable.
>>
>>Well, silly it is. 8-) Bash is supported by sh-mode, which should
>>already be active when you're using the .sh extension for your
>>file. If you don't use an extension, it will be activated after a
>>revert-buffer. 
>
> If there's not an sh-extension on the file, how does the
> revert-buffer help?

Opens in shell mode here when the script properly announces itself e.g

#!/bin/bash

as the first line.

To expect emacs to know otherwise would be a tad optimistic.

>
> (Sorry -- the only way I learn anything is by asking
> stupid questions like this one.)
>
> David
>


reply via email to

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