On Thu, March 8, 2012 00:13, [email protected] wrote:
> Ney <[email protected]> [12-03-07 20:24]:
>> I use F5:
>>
>> " Show syntax highlighting groups for word under cursor
>> nmap <F5> :call <SID>SynStack()<CR>
>> function! <SID>SynStack()
>> if !exists("*synstack")
>> return
>> endif
>> echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
>> endfunc
>
> Is it possible, to display the according values also ?
What Values?
You mean something like this:
nmap <F5> :for item in synstack(line('.'), col('.'))\|let
name=synIDattr(item, 'name')\|echo name \|endfor\|exe 'hi'
synIDattr(synIDtrans(hlID(name)),'name')<cr>
regards,
Christian
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php