about Vim syntax file

Started by cavva, February 10, 2008, 04:50:38 AM

Previous topic - Next topic

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

#1
Quote from: "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 ...


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]let[/color], 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

#2
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

#3
Quote from: "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


Well, I have put this in todo list. Sorry, no deadline estimate.
With newLISP you can grow your lists from the right side!