Last active
December 16, 2015 15:39
-
-
Save michiel/5457281 to your computer and use it in GitHub Desktop.
vim color test script for ~/.vim/plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! VimColorTest(outfile, fgend, bgend) | |
let result = [] | |
for fg in range(a:fgend) | |
for bg in range(a:bgend) | |
let kw = printf('%-7s', printf('c_%d_%d', fg, bg)) | |
let h = printf('hi %s ctermfg=%d ctermbg=%d', kw, fg, bg) | |
let s = printf('syn keyword %s %s', kw, kw) | |
call add(result, printf('%-32s | %s', h, s)) | |
endfor | |
endfor | |
call writefile(result, a:outfile) | |
execute 'edit '.a:outfile | |
source % | |
endfunction | |
" Increase numbers in next line to see more colors. | |
command! VimColorTest call VimColorTest('vim-color-test.tmp', 1, 256) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment