[patch] Automatically generate syntax/vim.vim

200 views
Skip to first unread message

h_east

unread,
Nov 11, 2015, 9:41:59 AM11/11/15
to vim_dev
Hi Bram, Dr.Chip and List!

https://groups.google.com/d/topic/vim_dev/BM7DV2fAl9w/discussion
> Notice:
> I will send syntax/vim.vim generator made by Vim script in a few weeks.
> Above contents found by its script.

It is this.

I wrote a syntax/vim.vim generator.

It was embedded in src/Makefile and called src/gen_syntax_vim/Makefile.
Generator works after generating a binary of vim on src/Makefile.

Contents of src/gen_syntax_vim
Makefile .............. makefile.
eval_check.vim ... Script for checking '+eval'.
gen_syntax_vim.vim ... Generator body script.
update_date.vim ... Date string update script.
vim.vim.base ... syntax/vim.vim base file. (This file based on Dr.Chip's vim syntax file vim.vim 7.4-36)

Process flow:
1. run gen_syntax_vim.vim. Create rc(Release Candidate) file. (src/gen_syntax_vim/vim.vim.rc)
2. If error, never update runtime/syntax/vim.vim.
3. Get diff runtime/syntax/vim.vim and src/gen_syntax_vim/vim.vim.rc without date string.
4. If differ, Date update and update runtime/syntax/vim.vim.

Note:
- Generator parse from vim's C source code.
option: ../option.c
command: ../ex_cmds.h
event: ../fileio.c
built-in function: ../eval.c
syntax highlight group: ../syntax.c
- Never update when vim is not have '+eval'
- Never update when error in gen_syntax_vim.vim script.
- Neovim already generate syntax/vim.vim automatically.
https://github.com/neovim/neovim/pull/2288


Bram>
If is the following display by make, Please check and commit runtime/syntax/vim.vim.

make[1]: Entering directory '/home/h_east/vim/vim/src/gen_syntax_vim'
Update ../../runtime/syntax/vim.vim
make[1]: Leaving directory '/home/h_east/vim/vim/src/gen_syntax_vim'


Dr.Chip>
I want to ask the src/gen_syntax_vim/vim.vim.base of the maintainer, If it is possible.
Generator adds only after "GEN_SYN_VIM:" keywords.
Please check this file.


Sorry for crazy English.
I want to automate as much as possible strongly.

Thanks.
--
Best regards,
Hirohito Higashi (a.k.a h_east)

gen_syntax_vim.patch

Bram Moolenaar

unread,
Nov 12, 2015, 4:53:13 PM11/12/15
to h_east, vim_dev
I know Charles already uses a script to update vim.vim.
I'll leave it up to hime whether he would like to use this instead.

--
hundred-and-one symptoms of being an internet addict:
96. On Super Bowl Sunday, you followed the score by going to the
Yahoo main page instead of turning on the TV.

/// 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 ///

h_east

unread,
Nov 12, 2015, 8:21:33 PM11/12/15
to vim_dev, h.eas...@gmail.com, drc...@campbellfamily.biz
Hi,

2015-11-13(Fri) 6:53:13 UTC+9 Bram Moolenaar:

Of course I know it.
"mkvimvim" has been written in the comments of syntax/vim.vim.
Probably, this script's source code seems to has not been published.
So that, I wrote a new generator and publish the source code.
I think, anyone will be able to maintain it.

h_east

unread,
Mar 8, 2016, 11:31:10 PM3/8/16
to vim_dev, h.eas...@gmail.com, drc...@campbellfamily.biz
Hi Vim script developers,

This is a syntax/vim.vim that corresponding to the latest Vim.
http://vim-jp.org/gen_syn_vim/

It has been created automatically from Vim C source code.
Only creating trigger is manual.

Let's try it!

Thanks.
--
Best regards,
Hirohito Higashi (a.k.a. h_east)

h_east

unread,
Apr 8, 2016, 9:15:18 PM4/8/16
to vim_dev, h.eas...@gmail.com, drc...@campbellfamily.biz
Hi Vim script developers,

2016-3-9(Wed) 13:31:10 UTC+9 h_east:


> Hi Vim script developers,
>
> This is a syntax/vim.vim that corresponding to the latest Vim.
> http://vim-jp.org/gen_syn_vim/
>
> It has been created automatically from Vim C source code.
> Only creating trigger is manual.
>
> Let's try it!
>
> Thanks.

We changed repository name and branch names.
And We have restructured the repository contents.

An excellent Vim's syntax highlighting file for Vim script.
https://github.com/vim-jp/syntax-vim-ex

Of course, we have to follow the updates of the latest of Vim! (7.4.1721)
Please check it.

Reply all
Reply to author
Forward
0 new messages