Last active
August 29, 2015 14:25
-
-
Save serkanh/f8a4b2e95f518a01a1f2 to your computer and use it in GitHub Desktop.
vim-go vimrc setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" serkan haytac | |
call pathogen#infect() | |
call pathogen#helptags() | |
syntax on | |
set background=light | |
filetype plugin indent on | |
set number | |
set nowrap | |
set hlsearch | |
let g:go_disable_autoinstall = 0 | |
let g:go_fmt_autosave = 1 | |
let g:go_fmt_fail_silently = 1 | |
let g:go_play_open_brower = 0 | |
let g:go_fmt_command = "goimports" | |
let g:go_fmt_autosave = 0 | |
let g:go_highlight_functions = 1 | |
let g:go_highlight_methods = 1 | |
let g:go_highlight_structs = 1 | |
set foldmethod=indent | |
set foldnestmax=10 | |
set nofoldenable | |
set foldlevel=1 | |
set shell=/bin/sh | |
map <C-n> :NERDTreeToggle<CR> | |
map <F8> :TagbarToggle<CR> | |
autocmd StdinReadPre * let s:std_in=1 | |
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif | |
nmap <F8> :TagbarToggle<CR> | |
nmap <F9> :NERDTree<CR> | |
" go-def settings | |
let g:godef_split=2 | |
let g:godef_same_file_in_same_window=1 | |
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