about Vim syntax file

For the Compleat Fan
Locked
cavva
Posts: 16
Joined: Sun Nov 11, 2007 2:45 am

about Vim syntax file

Post by cavva »

wondering if is possible to have the function name with a different color;

today the function name and its arguments are all in the same color,
if is possible (asking because i don't know vim syntax well)
would be nice to have "visual" separation between the two ...

Cyril
Posts: 183
Joined: Tue Oct 30, 2007 6:27 pm
Location: Moscow, Russia
Contact:

Re: about Vim syntax file

Post by Cyril »

cavva wrote:wondering if is possible to have the function name with a different color;

today the function name and its arguments are all in the same color,
if is possible (asking because i don't know vim syntax well)
would be nice to have "visual" separation between the two ...
No problem to make the first symbol after opening parenthesis to be in a different color. But what, then, will you do with (dolist (elt lst) ...), where elt is in the first position in a list too? It is even possible to list all built-in special forms as exceptions, but by the very nature of the lisp language any user can define his own special syntax through macros. You cannot distinguish function call from any other list in a general case.

But, if the community believes that such a mode is worth doing, I'll do it. So, two questions to all Vim users arises:

1. Do you want the first symbols in the lists be colored in a special way? Keep in mind that this will be any lists, not function calls only? This can be done rather easy. And, of course, anyone who dislike this will be still able to revert to the current style.

2. Do you want a special treatment of the built-in control structures, such as let, dolist and others? This includes two features: (2.1) different colors for built-in functions and built-in special forms, (2.2) the lists contained in the special forms, which are not function calls by nature (variable lists and so on), will not be treated as function calls. This is rather hard but still possible to do. Keep in mind that lists contained in any user-defined special forms (defined by macros) will not be subject of 2.2 exception. The later is just impossible.
With newLISP you can grow your lists from the right side!

cavva
Posts: 16
Joined: Sun Nov 11, 2007 2:45 am

Post by cavva »

my vote is for the solution number 1, with this "exception":
the first element of a non-quoted list is special, if the list is quoted all element are the same

Cyril
Posts: 183
Joined: Tue Oct 30, 2007 6:27 pm
Location: Moscow, Russia
Contact:

Post by Cyril »

cavva wrote:my vote is for the solution number 1, with this "exception":
the first element of a non-quoted list is special, if the list is quoted all element are the same
Well, I have put this in todo list. Sorry, no deadline estimate.
With newLISP you can grow your lists from the right side!

Locked