Update to vim CMake syntax files

224 views
Skip to first unread message

Dimitri Merejkowsky

unread,
Sep 25, 2015, 10:38:23 AM9/25/15
to vim_dev
Hi,

It seems the vim syntax file for CMake could be improved.

* It contains trailing whitespace
* Some commands such as target_include_directories are not recognized.

I've wrote two patches for these issues, which can be found on my fork of vim on github

https://github.com/dmerejkowsky/vim/commit/3f18d84d041d15212e1f79921d8afa93381112c5
https://github.com/dmerejkowsky/vim/commit/bff1a28a8c37b9315e169af295223afabdfe3a32

I've tried to contact the maintainer listed in the file, but the address seems to no longer exist.

Bram Moolenaar

unread,
Sep 25, 2015, 11:50:50 AM9/25/15
to Dimitri Merejkowsky, vim_dev
Last heard from him in 2006. Perhaps you are willing to take over?
In that case please send me an updated file. Update the header to add
you as maintainer, and move Karthik to former maintainer.

--
hundred-and-one symptoms of being an internet addict:
8. You spend half of the plane trip with your laptop on your lap...and your
child in the overhead compartment.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Dimitri Merejkowsky

unread,
Sep 28, 2015, 6:45:34 AM9/28/15
to Bram Moolenaar, vim_dev

Last heard from him in 2006.  Perhaps you are willing to take over?

Why not :)
 
In that case please send me an updated file.  Update the header to add
you as maintainer, and move Karthik to former maintainer.

See attached 
cmake.vim

Bram Moolenaar

unread,
Sep 29, 2015, 6:15:41 AM9/29/15
to Dimitri Merejkowsky, vim_dev
Thanks. I updated the header a bit:

" Vim syntax file
" Program: CMake - Cross-Platform Makefile Generator
" Module: $RCSfile: cmake-syntax.vim,v $
" Language: CMake
" Maintainer: Karthik Krishnan <karthik....@kitware.com>
" Former Maintainer: Dimitri Merejkowsky <d.m...@gmail.com>
" Author: Andy Cedilnik <andy.c...@kitware.com>
" Last Change: 2015 Sep 29
" Version: $Revision: 1.10 $
"


--
hundred-and-one symptoms of being an internet addict:
25. You believe nothing looks sexier than a man in boxer shorts illuminated
only by a 17" inch svga monitor.

Dimitri Merejkowsky

unread,
Dec 17, 2015, 7:40:05 AM12/17/15
to Bram Moolenaar, vim_dev
Hum. I think you meant:

" Maintainer:  Dimitri Merejkowsky <d.m...@gmail.com>
" Former Maintainer:   Karthik Krishnan <karthik....@kitware.com>

Plus it seems my changes (adding target_include_directories and so on as a cmake functions) were not taken into account.

Maybe there's something I missed.

Bram Moolenaar

unread,
Dec 17, 2015, 9:18:49 AM12/17/15
to Dimitri Merejkowsky, vim_dev
No, you are right. Only took 3 months to discover...

--
Facepalm statement #1: "I'm going to New York tomorrow, hopefully I have time
to visit the White House"

Dimitri Merejkowsky

unread,
Jan 7, 2016, 4:30:10 AM1/7/16
to Bram Moolenaar, vim_dev
Hum. I still don't see target_include_directories in https://github.com/vim/vim/blob/master/runtime/syntax/cmake.vim

Sure you took the correct file ?

Bram Moolenaar

unread,
Jan 7, 2016, 12:27:18 PM1/7/16
to Dimitri Merejkowsky, vim_dev
Can you email me the current version?

--
Zen Microsystems: we're the om in .commmmmmmmm

Justin M. Keyes

unread,
Jan 8, 2016, 12:47:50 AM1/8/16
to vim...@googlegroups.com
On Thu, Jan 7, 2016 at 12:27 PM, Bram Moolenaar <Br...@moolenaar.net> wrote:
>
> Dimitri Merejkowsky wrote:
>
>> Hum. I still don't see target_include_directories in
>> https://github.com/vim/vim/blob/master/runtime/syntax/cmake.vim
>>
>> Sure you took the correct file ?
>
> Can you email me the current version?

There also is no ftplugin for cmake, so the 'commentstring' is wrong.
It should be:

setlocal commentstring=#\ %s


Justin M. Keyes

Dimitri Merejkowsky

unread,
Jan 8, 2016, 9:09:05 AM1/8/16
to vim_dev

There also is no ftplugin for cmake, so the 'commentstring' is wrong.
It should be:

setlocal commentstring=#\ %s

You mean I have to add an other line ? Or do I need to add a ftplugin for cmake ?

I don't see the string 'commentstring' in the 'syntax/cmake.vim' file 

Justin M. Keyes

unread,
Jan 8, 2016, 6:46:36 PM1/8/16
to vim...@googlegroups.com
Sorry, it would be a new line, in a new file:

runtime/ftplugin/cmake.vim

Justin M. Keyes

Dimitri Merejkowsky

unread,
Jan 22, 2016, 10:36:22 AM1/22/16
to vim_dev
I did a bit of research and discovered that CMake maintains their own vim files here:

So not sure what the process is in this case. Do we sync manually the files from cmake's repo to vim's repo or do we let distro packagers install cmake vim files when cmake is installed ?

Bram Moolenaar

unread,
Jan 22, 2016, 4:58:13 PM1/22/16
to Dimitri Merejkowsky, vim_dev
I do not search around the internet to find updated files. Also, for
copyright reasons, I prefer the author to email me the file. That makes
clear it's intended to be included in the distribution.

For those files on cmake.org, please check if the license matches with
the Vim distribution.

--
How To Keep A Healthy Level Of Insanity:
3. Every time someone asks you to do something, ask if they want fries
with that.
Reply all
Reply to author
Forward
0 new messages