Created
October 26, 2011 22:27
-
-
Save Raimondi/1318204 to your computer and use it in GitHub Desktop.
Some useful snippets for Vim syntax.
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
" Name of syntax item under the cursor | |
nore <leader>n :echo synIDattr(synID(line("."), col("."), 1), "name")<CR> | |
" Syntax stack of item under the cursor | |
nnore <leader>s :<C-U>echo join(map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")'), ' => ')<CR> | |
" Color of syntax item under the cursor | |
echo synIDattr(synIDtrans(synID(line("."), col("."), 1)), "fg") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment