From 24aeb3ffe3ed20a07b1c28aa4785f151a3f48f82 Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Mon, 18 Dec 2023 13:50:23 +0100 Subject: [PATCH] Extract 'utils' config --- .vim/plugin/utils.vim | 6 ++++++ .vimrc | 7 ------- 2 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 .vim/plugin/utils.vim diff --git a/.vim/plugin/utils.vim b/.vim/plugin/utils.vim new file mode 100644 index 0000000..2974e03 --- /dev/null +++ b/.vim/plugin/utils.vim @@ -0,0 +1,6 @@ +function! SynGroup() + let l:s = synID(line('.'), col('.'), 1) + echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name') +endfun + +com! -nargs=0 Syn :call SynGroup() diff --git a/.vimrc b/.vimrc index 9173624..0995d58 100644 --- a/.vimrc +++ b/.vimrc @@ -376,13 +376,6 @@ highlight QuickScopeSecondary cterm=underline highlight QuickScopePrimary ctermbg=253 ctermfg=232 cterm=none highlight Pmenu ctermfg=232 -function! SynGroup() - let l:s = synID(line('.'), col('.'), 1) - echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name') -endfun - -com! -nargs=0 Syn :call SynGroup() - " Taken from /usr/share/vim/vim90/defaults.vim augroup vimStartup au!