Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: syntax overview for zsh?
- X-seq: zsh-users 7237
- From: Vincent Stemen <zsh@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: syntax overview for zsh?
- Date: Tue, 23 Mar 2004 02:09:27 -0600
- In-reply-to: <20040323052829.17803.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040322115830.GA12890@xxxxxxxxxxxxxxxxx> <20040323052829.17803.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
On Mon, Mar 22, 2004 at 09:28:29PM -0800, Bob Schmertz wrote:
>
> --- Vincent Stemen <zsh@xxxxxxxxxxx> wrote:
> > On Sun, Mar 21, 2004 at 09:53:58PM -0800, Bob Schmertz wrote:
> > >
> > > --- Thorsten Kampe <thorsten@xxxxxxxxxxxxxxxx> wrote:
> > > > >> If anyone else has a vim or X(Emacs) syntax highlighter I'd be
> > > > >> grateful, too.
> > > > >
> > > > > I'm not a major-league zsh programmer, so I may well be ignorant,
> > but
> > > > > what's wrong with good-old shell-script mode in (X)Emacs?
> > > >
> > > > Nothing, if I could find the defining syntax file. Nothing like
> > > > "sh.el" on my Gentoo box (where I have XEmacs).
> > > >
> > >
> > > If you just want to use it as is, just type M-x shell-script-mode
> > (tab
> > > completion works here, too), and it'll put you in Emacs' proper mode.
> > If
> > > you want to tweak the syntax, the appropriate elisp file is the
> > > non-obvious sh-script.el. If you want to know how to make it
> > > automatically detect zsh-ness and it's not already doing so (works
> > for me
> > > with no special effort in GNU Emacs if the file starts with
> > #!/bin/zsh),
> > > email me offline and I'll tell you what to put in your .emacs.
> > >
> > > =====
> > > Cheers,
> > > Bob Schmertz
> >
> > You might also want to try ksh-mode in Xemacs which has pretty nice
> > syntax highlighting and it auto-indents nicely. Although I did
> > customize my indention a bit in ~/.emacs. That is what I have used
> > for shell programming for years. I do not like the default indention
> > behavior of shell-script-mode. It indents everything even though it
> > is not inside a function or control block and it does not seem to
> > re-indent when you hit the <tab> key. It just indents further.
> >
>
> This sounds like the behavior I observe when programming in (t)csh.
> Things work fine for me, however, for Bourne-style shells in GNU Emacs (I
> don't have an XEmacs handy for comparison), and ISTR that there was some
> improvement on this front fairly recently, so you might give GNU Emacs v.
> 21 a whirl before declaring it doesn't work.
>
> =====
> Cheers,
> Bob Schmertz
I am running xemacs-21.1.14 but that is a behavior I have noticed in
shell-script-mode for years. I do not have regular emacs installed
right now to test, but it was always my understanding that both emacs
and Xemacs mostly use the same lisp libraries for the different modes.
I will test again the next time I upgrade Xemacs.
Vincent
--
Vincent Stemen
Avoid the VeriSign/Network Solutions domain registration trap!
http://www.InetAddresses.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author