]> git.madduck.net Git - etc/vim.git/blob - make_colorschemes.vim

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Initial import.
[etc/vim.git] / make_colorschemes.vim
1 " Source this script to parse all the templates in the templates folder and
2 " generate corresponding colorschemes in the colors folder (the colors and doc
3 " folders will be created they do not exist).
4 " Note: existing files in the colors and doc folders are overridden.
5
6 let s:curdir = fnamemodify(resolve(expand('<sfile>:p')), ':h')
7 let s:templates = s:curdir.'/templates'
8 let s:errors = 0
9
10 execute 'lcd' s:templates
11
12 for s:template in glob(s:templates . '/artesanal*.colortemplate', 1, 1)
13   let s:template_name = fnamemodify(s:template, ':t:r')
14   execute "edit" s:template
15   execute "Colortemplate!" fnameescape(s:curdir)
16   if g:colortemplate_exit_status != 0
17     echoerr 'ERROR:' s:template_name 'could not be built'
18     let s:errors = 1
19   endif
20 endfor
21
22 if s:errors > 0
23   redraw
24   echo "\r"
25   echoerr "There were errors: see messages"
26 endif