From 120aa4cf4aeac78bcc00e947dac838c4ca59f72c Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Fri, 23 Nov 2018 20:25:08 +0000 Subject: [PATCH] better syntax highlighting id functin --- vimrc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vimrc b/vimrc index 3598c99..af9541e 100644 --- a/vimrc +++ b/vimrc @@ -654,13 +654,13 @@ nnoremap z. :call IndentFoldTextColumn(5 * (v:count == 0 ? 1 : v:cou nnoremap z= :call IndentFoldTextColumn(0) "}}} -function! SyntaxItem() abort "{{{ -" get name of syntax item - - return synIDattr(synID(line('.'),col('.'),1),'name') . ' -> ' . synIDattr(synIDtrans(synID(line('.'),col('.'),1)), 'name' ) -endfunction -nnoremap pp :echom SyntaxItem() - +function! SynStack()"{{{ + if !exists('*synstack') + return + endif + echo map(synstack(line('.'), col('.')), 'synIDattr(v:val,"name")') ' -> ' . synIDattr(synIDtrans(synID(line('.'),col('.'),1)), 'name' ) +endfunc +nmap pp :call SynStack() "}}} function! s:Get_env() abort "{{{ " devdocs DD