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. To illustrate, I ask you to consider the 
following examples:

- The option 'define' is a pattern that matches a macro definition. There 
exists a syntax/highlight group `Define` that could be used for this.

- The option 'isident' is a pattern that matches an identifier. It is used in 
conjunction with 'define' and serves a variety of purposes, to a fault: 
changing the value of this option can break things that should not (or do not 
have to) strictly be related to identifiers. It's also used for "\i" in 
patterns. There exists a syntax/highlight group `Identifier` that could be used 
for this.

- The option 'iskeyword' defines a "word", which is used for too many things to 
list -- among them, the `<C-]>` and `g]` normal mode commands, which are used 
for jumping to the tags under the cursor. Unfortunately, tags are typically 
syntax items which may or may not constitute a "word". Changing the definition 
of 'iskeyword', even on a filetype-specific basis, is both overreaching and 
unsatisfactory; depending on syntactical context, the pattern for an expected 
identifier at the cursor's location may be widely different. Matching a subset 
of syntactical items known to exist in tags (identifiers for example) could 
yield better results.

- As both a user and script writer, I have often wanted to search for matches 
based not only on the composition of characters but also syntactical context. 
The `gd` and `gD` normal commands, for example, do a rudimentary search to 
attempt to find the definition of the `<cword>`, but often perform inadequately 
in non-C languages. A search with syntactical criteria could make this far more 
accurate.

What I'm suggesting is a concerted effort to further develop and build upon 
Vim's existing syntax features in general. I posit that this will encourage and 
foster better ftplugins and, ultimately, a more robust and responsive interface 
to users' code at a decreased development cost to scripters.

Even only what I've explicitly outlined represents a great deal of work, and 
there must no doubt be a great deal of discussion before work may be 
considered, as well, so what I submit to you all is a request only for that 
discussion; I would love to see greater support for this in my editor of 
choice, and I don't think I'm alone. Let's talk about it.

Thanks for reading, and sorry again if this proselytism is misplaced.

-- 
-- 
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/groups/opt_out.


Raspunde prin e-mail lui