Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: syntax overview for zsh?



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.

-- 
Vincent Stemen
Avoid the VeriSign/Network Solutions domain registration trap!
http://www.InetAddresses.net



Messages sorted by: Reverse Date, Date, Thread, Author