-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.vim
120 lines (99 loc) · 4.14 KB
/
init.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
" basic
syntax on
set number
"set colorcolumn=100
"set mouse=a
" vim-plug
call plug#begin('~/.config/nvim/plugged')
Plug 'scrooloose/nerdtree'
Plug 'fatih/vim-go'
Plug 'mdempsky/gocode'
Plug 'majutsushi/tagbar'
Plug 'morhetz/gruvbox'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'Shougo/deoplete.nvim'
Plug 'zchee/deoplete-go', { 'do': 'make'}
Plug 'zchee/deoplete-jedi'
Plug 'kien/ctrlp.vim'
Plug 'edkolev/tmuxline.vim'
Plug 'sebdah/vim-delve'
Plug 'mileszs/ack.vim'
call plug#end()
filetype plugin indent on
filetype plugin on
" gb setting
let g:go_fmt_command = "goimports"
let g:go_autodetect_gopath = 1
" gruvbox
set background=dark
set termguicolors
let g:gruvbox_italic=1
colorscheme gruvbox
" airline
let g:airline_theme='gruvbox'
let g:airline_powerline_fonts = 1
let g:airline#extensions#tmuxline#enabled = 0
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#show_buffers = 0
map <leader>= :tabn<CR>
map <leader>- :tabp<CR>
" tagbar
map <F9> :TagbarToggle<CR>
let g:tagbar_width = 22
" nerdtree
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
let NERDTreeWinPos='left'
let NERDTreeWinSize=22
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
map <C-n> :NERDTreeToggle<CR>
"deoplete
let g:deoplete#enable_at_startup = 1
let g:deoplete#sources#go#sort_class = ['package', 'func', 'type', 'var', 'const']
let g:deoplete#sources#go#source_importer = 1
let g:deoplete#sources#go#auto_goos = 1
let g:deoplete#sources#go#pointer = 1
" deoplete-go settings
let g:deoplete#sources#go#gocode_binary = $GOPATH.'/bin/gocode'
"go linter setting disable quickfix warning dump to
let g:go_metalinter_enabled = ['vet']
augroup go
autocmd!
"" Show by default 4 spaces for a tab
autocmd BufNewFile,BufRead *.go,*.php,*.py setlocal noexpandtab tabstop=4 shiftwidth=4
" check fix at save go
autocmd BufWritePost *.go :GoMetaLinter
augroup END
'map GoTest
map <leader>t :GoTest <CR>
map ss :w<CR>
map se :wq!<CR>
"ack
map <C-l> :Ack!<Space><CR>
" ctrlp
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_working_path_mode = 'ra'
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.(git|hg|svn)$',
\ 'file': '\v\.(exe|so|dll)$',
\ 'link': 'some_bad_symbolic_links',
\ }
let g:ctrlp_user_command = 'find %s -type f' " MacOSX/Linux
"debug tool
map <F6> :DlvDebug <CR>
" ctrl+F6 => dlvTest
map <F30> :DlvTest <CR>
"<F7> => DlvToggleBreakpoint
map <F7> :DlvToggleBreakpoint <CR>
"ctrl +F7 => DlvToggleTracepoint
map <F33> :DlvToggleTracepoint <CR>
"auto complete Symbols
inoremap ' ''<ESC>i
inoremap " ""<ESC>i
inoremap ( ()<ESC>i
inoremap [ []<ESC>i
inoremap { {<CR>}<ESC>O