Skip to content

Instantly share code, notes, and snippets.

@vovs03
Created August 15, 2021 20:05
Show Gist options
  • Save vovs03/356666d2d0007ec8c5c23cd5a68df099 to your computer and use it in GitHub Desktop.
Save vovs03/356666d2d0007ec8c5c23cd5a68df099 to your computer and use it in GitHub Desktop.
Vimrc settings
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'fatih/vim-go'
Plugin 'git://github.com/scrooloose/nerdtree.git'
Plugin 'git://github.com/Xuyuanp/nerdtree-git-plugin.git'
Plugin 'Shougo/neocomplete'
Plugin 'Shougo/neosnippet'
Plugin 'Shougo/neosnippet-snippets'
Plugin 'jstemmer/gotags'
Plugin 'majutsushi/tagbar'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
let g:go_version_warning = 0
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:neocomplete#enable_at_startup = 1
" NERDTree config
map <F7> :NERDTreeToggle<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
autocmd vimenter * NERDTree
" mark config
nmap ml <Plug>MarkSet
nmap md <Plug>MarkClear
nmap mn <Plug>MarkSearchAnyNex
nmap mp <Plug>MarkSearchAnyPrev
nmap mf <Plug>MarkSearchCurrentNext
nmap mb <Plug>MarkSearchCurrentPrev
nmap <F8> :TagbarToggle<CR>
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'
\ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment