From 44334b81deafbe0f9d1e2405574ff59b62316104 Mon Sep 17 00:00:00 2001 From: surtur Date: Fri, 29 Apr 2022 00:26:07 +0200 Subject: [PATCH] vimrc: add gotags.vimrc.vim --- .vim/gotags.vimrc.vim | 28 ++++++++++++++++++++++++++++ .vim/vimrc | 6 ++++++ 2 files changed, 34 insertions(+) create mode 100644 .vim/gotags.vimrc.vim diff --git a/.vim/gotags.vimrc.vim b/.vim/gotags.vimrc.vim new file mode 100644 index 0000000..8403a97 --- /dev/null +++ b/.vim/gotags.vimrc.vim @@ -0,0 +1,28 @@ +" From https://github.com/jstemmer/gotags +let g:tagbar_type_go = { + \ 'ctagstype' : 'go', + \ 'kinds' : [ + \ 'p:package', + \ 'i:imports:1', + \ 'c:constants', + \ 'v:variables', + \ 't:types', + \ 'n:interfaces', + \ 'w:fields', + \ 'e:embedded', + \ 'm:methods', + \ 'r:constructor', + \ 'f:functions' + \ ], + \ 'sro' : '.', + \ 'kind2scope' : { + \ 't' : 'ctype', + \ 'n' : 'ntype' + \ }, + \ 'scope2kind' : { + \ 'ctype' : 't', + \ 'ntype' : 'n' + \ }, + \ 'ctagsbin' : 'gotags', + \ 'ctagsargs' : '-sort -silent' +\ } diff --git a/.vim/vimrc b/.vim/vimrc index f9f7a01..2f6c795 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -279,6 +279,12 @@ xnoremap "+y y:call system("wl-copy", @") nnoremap "+p :let @"=substitute(system("wl-paste --no-newline"), '', '', 'g')p nnoremap "*p :let @"=substitute(system("wl-paste --no-newline --primary"), '', '', 'g')p +"------------------------------------ +" go_tags +"------------------------------------ +exec "source " . escape(expand("~/.vim"),' ') . "/" . "gotags.vimrc" + + inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\"