zsh-users
 help / color / mirror / code / Atom feed
From: Felix Rosencrantz <f.rosencrantz@gmail.com>
To: zsh-users@sunsite.dk
Subject: Re: Vim syntax file for zsh
Date: Wed, 8 Dec 2004 00:13:15 -0800	[thread overview]
Message-ID: <dc507f4a04120800132b01f623@mail.gmail.com> (raw)
In-Reply-To: <20041204164217.GA20437@puritan.pcp.ath.cx>

On Sat, 4 Dec 2004 17:42:17 +0100, Nikolai Weibull
<mailing-lists.zsh-users@rawuncut.elitemail.org> wrote:
> 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
could.

 

> 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:
http://zsh.sunsite.dk/Doc/Release/zsh_19.html#SEC116

-FR.


  reply	other threads:[~2004-12-08  8:14 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-01  7:40 Felix Rosencrantz
2004-12-01  8:43 ` Danek Duvall
2004-12-01 12:02 ` Nikolai Weibull
2004-12-03  8:02   ` Felix Rosencrantz
2004-12-04 15:54     ` Clint Adams
2004-12-04 16:42       ` Nikolai Weibull
2004-12-04 17:00         ` OT: vim maintainer [Re: Vim syntax file for zsh] Clint Adams
2004-12-04 22:04           ` Nikolai Weibull
2004-12-04 16:42     ` Vim syntax file for zsh Nikolai Weibull
2004-12-08  8:13       ` Felix Rosencrantz [this message]
2004-12-08 13:47         ` Nikolai Weibull
2004-12-08 18:14           ` Nikolai Weibull
2004-12-09 13:59             ` lists
2004-12-09 14:45               ` Nikolai Weibull
2004-12-09 16:36                 ` Felix Rosencrantz
2004-12-09 18:18                   ` Nikolai Weibull
2004-12-09 18:23                     ` Nikolai Weibull
2004-12-09 20:09                       ` Wayne Davison
2004-12-09 21:24                         ` Nikolai Weibull
2004-12-09 22:43                           ` Wayne Davison
2004-12-09 23:26                             ` Nikolai Weibull
2004-12-12  4:41                               ` Felix Rosencrantz
2004-12-12 13:34                                 ` Nikolai Weibull
2004-12-12 16:40                                   ` Felix Rosencrantz
2004-12-12 20:10                                     ` Nikolai Weibull
2004-12-13  3:41                                   ` Doug Kearns
2004-12-10  8:13                           ` Stephane Chazelas
2004-12-10 15:27                             ` Nikolai Weibull
2004-12-10 15:46                               ` Stephane Chazelas
2004-12-11 13:24                                 ` Nikolai Weibull
2004-12-11 16:13                                   ` Stephane Chazelas
2004-12-11 20:02                                     ` Nikolai Weibull
2004-12-08 13:15       ` Doug Kearns
2004-12-01 15:32 ` Ziggy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc507f4a04120800132b01f623@mail.gmail.com \
    --to=f.rosencrantz@gmail.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).