[cmake-developers] Improving Vim support in CMake

Ben Boeckel ben.boeckel at kitware.com
Mon Jan 26 11:00:05 EST 2015


On Sat, Jan 24, 2015 at 15:29:51 +0000, Alex Merry wrote:
> On Wednesday 21 January 2015 16:17:35 Ben Boeckel wrote:
> > List of improvements to the syntax file:
> > 
> >   - drop support for < 7.0 (which is 7.5 years old now);
> >   - add support for Lua-style comments;
> >   - update the list of system variables;
> >   - update the list of operators;
> >   - make only commands case-insensitive;
> >   - update the list of built-in commands (and deprecated ones);
> >   - highlight user-defined function and macro calls; and
> >   - tweak colors a bit.
> 
> Much needed, especially updating the list of commands and operators, thanks!
> 
> However, I'm missing having variables highlighted in a different colour, 
> especially when they appear in strings.

Odd; attached is an HTML dump from Vim for what I see (:TOhtml) where
variable expansions are highlighted in strings just like outside of
strings.

>                                         Also, do you know if it's possible to 
> make command and operator highlighting context-sensitive? For example, in 
> add_command(COMMAND foo), COMMAND is highlighted because it is in the list of 
> operators, and I've got a command that takes a LINK_LIBRARIES keyword 
> argument, which is highlighted as a deprecated command.

The problem is that they are keywords right now. I'll take a stab at
making it a regex instead so it can be properly contained within other
groupings.

Thanks for testing :) .

--Ben


More information about the cmake-developers mailing list