Zsh Mailing List Archive
Messages sorted by:
Re: Vim syntax file for zsh
- X-seq: zsh-users 8271
- From: Felix Rosencrantz <f.rosencrantz@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Vim syntax file for zsh
- Date: Wed, 8 Dec 2004 00:13:15 -0800
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=PeuwNANNsBCnbXm99JCsqfymeI8TsSGo2wu8V5TFW8dTHlprxxqqb3dguzdJWA73H466JcWEaRrKdgKjXUWfpCbBgBsel2Ue0VbqCJ6dv/xIr/UIg0DLz1/95znDLkoXqK1AWNMFG8SCx7lcRxcYbCAy3YAkxZqkxaQ+ILuP+dU=
- In-reply-to: <20041204164217.GA20437@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <dc507f4a04113023401aeab8b2@xxxxxxxxxxxxxx> <20041201120202.GB9543@xxxxxxxxxxxxxxxxxx> <dc507f4a04120300022e3894cb@xxxxxxxxxxxxxx> <20041204164217.GA20437@xxxxxxxxxxxxxxxxxx>
- Reply-to: Felix Rosencrantz <f.rosencrantz@xxxxxxxxx>
On Sat, 4 Dec 2004 17:42:17 +0100, Nikolai Weibull
> I'm actually thinking that none of them should be highlighted, not even
> those that are "special". Any input?
> Three choices:
> 1. Highlight all variable references alike.
> 2. Highlight only "special" variables, such as $$, $#, and $n.
> 3. Highlight no variable references at all.
I would prefer 1&2 together, and then 1 in that order.
> If you look at the C syntax definition, no variable references are
> highlighted, and this isn't only due to the fact that it is infinitely
> much harder to determine what a variable in C (no marking $) is but also
> to keep things simple and clean. Variables are everywhere, so
> highlighting all of them makes the display cluttered.
I appreciate your point about the cluttering.
Though I like the perl syntax coloring. It deals with all the
little context regions special to perl like different types of quotes,
search regex, replace strings, heredocs, etc. I think zsh is closer to
perl than C in that it has a lot of little special contexts with their own
rules. (Not sure what you call this language property.) Having the
coloring expose those special areas can make code more readable.
My interest is looking at existing code and trying to understand it.
I'm typically looking at the completion and zle widget code that comes
with zsh, and that code contains a lot of these nested parameter
expressions. And with no highlighting or with a single color
highlighting, the coloring doesn't help as much as it seems like it
> Also things like the first line #compdef or #autoload lines are not
> > marked or highlighted in any way, other than as a comment.
> Hm, that's an interesting suggestion. The #! /bin/shell stuff should
> perhaps also be highlighted. It's simple enough to add.
> Could you perhaps point me to where I find the exact information that
> may appear in a beginning comment line? I always seem to lose that
> page in the info pages.
This looks like this contains the information you would need:
Messages sorted by: