Skip to content

Instantly share code, notes, and snippets.

@dahu
Created August 2, 2012 00:49
Show Gist options
  • Select an option

  • Save dahu/3232034 to your computer and use it in GitHub Desktop.

Select an option

Save dahu/3232034 to your computer and use it in GitHub Desktop.
Chroma -- print *markup* in Error highlight in Vim
function! Chroma(msg)
let msg = substitute(a:msg, '\*\([^\*]\+\)\*', '"|echohl Error|echon "\1"|echohl None|echon "', 'g')
exe 'echon "' . msg . '"'
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment