Last active
August 29, 2015 14:10
-
-
Save dahu/fc26f96219bea83cdac5 to your computer and use it in GitHub Desktop.
Vomit -- a synesthesia syntax highlighting script for Vim
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! Vomit() | |
let data = uniq(sort(split(join(getline(1, '$')), '\zs'))) | |
hi clear | |
let fg = 16 | |
for d in data | |
exe 'syn match vom_' . fg . ' "' . escape(d, '"\\') . '"' | |
exe 'hi vom_' . fg . ' ctermfg=' . fg | |
let fg = ((fg + 11) % 230) + 1 | |
endfor | |
endfunction | |
au filetype conf call Vomit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment