Skip to content

Instantly share code, notes, and snippets.

@Raimondi
Created April 3, 2011 04:12
Show Gist options
  • Save Raimondi/900171 to your computer and use it in GitHub Desktop.
Save Raimondi/900171 to your computer and use it in GitHub Desktop.
Get info of a given highlight group.
" From jamessan@#vim
" http://vim.pastey.net/148644
let i = 1
while synIDtrans(i) != 0
if synIDattr(i, 'name') == 'Normal'
if synIDattr(i, 'fg') >= 0
" fg is set
endif
if synIDattr(i, 'bg') >= 0
" bg is set
endif
break
endif
let i = i + 1
endwhile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment