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: Eric B.
Subject: Re: Is there an emacs bash script mode / colouring?
Date: Thu, 17 Sep 2009 14:41:20 -0400

"Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> wrote in message 
news:4ab1111e$0$285$14726298@news.sunsite.dk...
> Eric B. wrote:
>> "Anselm Helbig" <anselm.helbig+news2009@googlemail.com> wrote in message 
>> 87ab0wc9ac.wl%anselm.helbig+news2009@googlemail.com">news:87ab0wc9ac.wl%anselm.helbig+news2009@googlemail.com...
>>> 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.
>>
>> Well, yes - sh mode is activated upon opening of any .sh file.  However, 
>> for some reason, I find it doesn't do any formatting and/or syntax 
>> colouring. My nxml mode does both, so I know it isn't my terminal that is 
>> problematic. Is there something in the config that I am missing for 
>> sh-mode?
>>
>> I'm running emacs 21.4.1
>>
>> Thanks,
>>
>> Eric
>>
>>
> Eric,
>
> Does
> M-x font-lock-mode
> or
> M-x font-lock-fontify-buffer
> help?

Aha - both seem to work like a charm.  Thanks for the tip.

>
> Is the mode-line "(Shell-script [bash])" or "(Shell-script Font[bash]") ?

My mode-line is Shell-script[bash].  How do I change that to Font[bash]?

Thanks,

Eric




reply via email to

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