Skip to content

Instantly share code, notes, and snippets.

@dahu
Last active August 29, 2015 14:10
Show Gist options
  • Save dahu/fc26f96219bea83cdac5 to your computer and use it in GitHub Desktop.
Save dahu/fc26f96219bea83cdac5 to your computer and use it in GitHub Desktop.
Vomit -- a synesthesia syntax highlighting script for Vim
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