Christian Brabandt wrote:

> Hi vim-dev!
> 
> On Sa, 31 Okt 2015, Christian Brabandt wrote:
> 
> > On Fr, 30 Okt 2015, Bram Moolenaar wrote:
> > 
> > > I suppose that for syntax highlighting using a :syntax command is
> > > appropriate.  For other contexts we might still want to use an actual
> > > setting.
> > > 
> > > Not sure about the ":syn option" command.  Why not use ":syn iskeyword"?
> > 
> > That was my first approach. Than I thought perhaps later we'll need 
> > another option to be set, perhaps 'isfname' so I thought, let's make it 
> > abstract enough that it can be easily extended later if needed.
> > 
> > > In a way, all :syn commands change options/settings in some way.
> > 
> > Actually I even thought about making e.g. syn spell or syn sync an alias 
> > for syn option spell
> > 
> > > I would not see this as an option, but part of the syntax definition.
> > > Thus ":syn clear" removes it and goes back to 'iskeyword'.
> > 
> > I'll send an updated patch later this week.
> 
> Attached is an updated patch, including a test

[...]

>       When the 'lisp' option is on the '-' character is always included.
> +     This option also influences syntax highlighting, see |:syn-iskeyword|
> +     how to circumvent it.
>       NOTE: This option is set to the Vi default value when 'compatible' is

When we have the new feature, it should be mentioned when the
'iskeyword' value applies to syntax or not.  Something like "for syntax
the keyword characters can be specified separately".

> +SYNTAX ISKEYWORD SETTING                             *:syn-iskeyword*
> +
> +:sy[ntax] iskeyword [clear | {option}]
> +     This defines the 'iskeyword' option for the syntax highlighting.
> +
> +     clear:          Reset the syntax 'iskeyword' option to its buffer
> +                     local value.

It would be simpler to understand to say that the syntax-specific value
is omitted and the value of the 'iskeyword' option is used.

> +     {option}        Set the syntax 'iskeyword' option to the new value.

Please add an example that shows what it looks like.  e.g., the normal
value with $ added.

> +     It is recommended when writing syntax files, to set the syntax
> +     'iskeyword' option to a sane value (e.g. the global 'isk' option) to
> +     have the syntax highlighting work independently of the users 'isk'
> +     settings.

I would call it "correct value for the syntax" instead of "sane value".


-- 
>From "know your smileys":
 :-&    Eating spaghetti

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui