|
From: | Colin S. Miller |
Subject: | Re: Is there an emacs bash script mode / colouring? |
Date: | Wed, 16 Sep 2009 17:23:57 +0100 |
User-agent: | Mozilla-Thunderbird 2.0.0.22 (X11/20090706) |
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? The first will turn on fontify (syntax highlighting mode). Is the mode-line "(Shell-script [bash])" or "(Shell-script Font[bash]") ? The second will force the buffer to be highlighted; if the buffer is bigger than font-lock-maximum-size then auto-fontification is disabled. HTH, Colin S. Miller. -- Replace the obvious in my email address with the first three letters of the hostname to reply.
[Prev in Thread] | Current Thread | [Next in Thread] |