Re: [RFC] Enhance syntax support

58 views
Skip to first unread message

Ben Fritz

unread,
May 18, 2013, 11:09:58 AM5/18/13
to vim...@googlegroups.com
On Friday, May 17, 2013 2:41:33 PM UTC-5, m...@qstrahl.com wrote:
> Apologies in advance; I'm not sure if this is the correct avenue for this kind of discussion.
>
> I think Vim would stand to reap extraordinary benefits from a greater focus on built-in syntax-related functionality and the decoupling of existing syntax features from other features.

You say "decouple" which means "make them less dependent on each other". But your examples seem to be asking for making various commands more context-aware, which would probably be *more* coupled to syntax, not less. Which do you want?

m...@qstrahl.com

unread,
May 22, 2013, 11:08:59 AM5/22/13
to vim...@googlegroups.com
> You say "decouple" which means "make them less dependent on each other". But your examples seem to be asking for making various commands more context-aware, which would probably be *more* coupled to syntax, not less. Which do you want?

What I mean by this is that there are things like 'iskeyword' and 'isident' and 'define' and 'commentstring', options which are -- or, at least, could be -- relevant to the syntax of the file type, which could be perhaps better and more ubiquitously handled by Vim's syntax functionality rather than a pattern option. It seems to me as though we have a perfectly good hammer for this nail, and we're reaching for the screwdriver. This is what I mean by decoupling syntax features from other features; make syntax-dependent configuration dependent on the syntax functionality, and not on options that are in many cases untouchable on penalty of everything breaking.

I'm also calling for additional usage of the syntax functionality to make scripting for file types easier -- for example, it would be useful to have a built-in search function that allows you to specify syntax group matches in addition to pattern matching. I cite again the example of tag jumping -- using more flexible syntax concepts like "identifier" instead of the less code-aware "word" when determining what tag to jump to could be useful.

Reply all
Reply to author
Forward
0 new messages