-
Notifications
You must be signed in to change notification settings - Fork 2
/
plugins.vim
187 lines (148 loc) · 5.17 KB
/
plugins.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
call plug#begin('~/.config/nvim/plugged')
" the silver searcher
Plug 'rking/ag.vim'
" Status line
"let g:airline#extensions#tabline#left_sep = ' '
"let g:airline#extensions#tabline#left_alt_sep = '|'
"let g:airline#extensions#tabline#left_sep = ' '
"let g:airline#extensions#tabline#left_alt_sep = '|'
let g:airline_powerline_fonts=1
Plug 'vim-airline/vim-airline'
" Theme
let g:gruvbox_italic=1
Plug 'morhetz/gruvbox'
"Plug 'fxn/vim-monochrome'
" Snippets
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'tomtom/tlib_vim'
Plug 'garbas/vim-snipmate'
imap <expr> <C-E> pumvisible() ? '<esc>a<Plug>snipMateNextOrTrigger' : '<Plug>snipMateNextOrTrigger'
Plug 'honza/vim-snippets'
" General
Plug 'scrooloose/nerdtree'
let NERDTreeShowBookmarks=0
let NERDTreeShowHidden=0
let NERDTreeChDirMode=2 " Keep cwd in sync with tree root
let NERDTreeQuitOnOpen=0 " Do not close tree after opening a file
let g:nerdtree_tabs_open_on_gui_startup=0
map <leader>d :execute 'NERDTreeToggle ' . getcwd()<CR>
map <leader>f :execute 'NERDTreeFind'<CR>
Plug 'tpope/vim-surround'
Plug 'dkprice/vim-easygrep'
Plug 'kien/ctrlp.vim'
let g:ctrlp_working_path_mode='ra' " Use parent directory with '.git' file as root (r) or current directory if none (a)
let g:ctrlp_custom_ignore="/(.log$\|public\/|\.(git|hg|svn)|ui\/)"
Plug 'godlygeek/csapprox'
Plug 'jistr/vim-nerdtree-tabs'
Plug 'mbbill/undotree'
nnoremap <Leader>u :UndotreeToggle<CR>
let g:undotree_SetFocusWhenToggle=1
Plug 'tpope/vim-repeat'
" Syntax checking
Plug 'scrooloose/syntastic'
" Commenting
Plug 'scrooloose/nerdcommenter'
" deoplete
Plug 'Shougo/deoplete.nvim'
Plug 'zchee/deoplete-go', { 'do': 'make'}
" Complete with tab
inoremap <silent><expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
" neocomplete like
" set completeopt+=noinsert
" deoplete.nvim recommend
"set completeopt+=noselect
" Path to python interpreter for neovim
let g:python3_host_prog = '/usr/bin/python'
" Skip the check of neovim module
" let g:python3_host_skip_check = 1
" Run deoplete.nvim automatically
let g:deoplete#enable_at_startup = 1
" deoplete-go settings
let g:deoplete#sources#go#gocode_binary = $GOPATH.'/bin/gocode'
let g:deoplete#sources#go#sort_class = ['package', 'func', 'type', 'var', 'const']
" YCM
"Plug 'Valloric/YouCompleteMe'
" Git
Plug 'tpope/vim-fugitive'
nnoremap <silent> <leader>gs :Gstatus<CR>
nnoremap <silent> <leader>gd :Gdiff<CR>
nnoremap <silent> <leader>gc :Gcommit<CR>
nnoremap <silent> <leader>gb :Gblame<CR>
nnoremap <silent> <leader>gl :Glog<CR>
nnoremap <silent> <leader>gp :Git push<CR>
Plug 'majutsushi/tagbar'
" GO support (https://github.com/jstemmer/gotags)
" Git gutter
Plug 'airblade/vim-gitgutter'
" TMUX
"Plug 'edkolev/tmuxline.vim'
" Javascript
Plug 'leafgarland/typescript-vim'
Plug 'leshill/vim-json'
Plug 'groenewege/vim-less'
"Plug 'pangloss/vim-javascript'
" Ruby
let g:ruby_path = system('echo $HOME/.rbenv/shims')
Plug 'vim-ruby/vim-ruby'
autocmd FileType ruby set omnifunc=rubycomplete#Complete
autocmd FileType ruby let g:rubycomplete_buffer_loading=1
autocmd FileType ruby let g:rubycomplete_classes_in_global=1
" rbenv
Plug 'tpope/vim-rbenv'
" tmux
Plug 'tmux-plugins/vim-tmux'
" bbye
Plug 'gwww/vim-bbye'
nnoremap <Leader>q :Bdelete<CR>
" impaired
nnoremap <silent> [oh :call gruvbox#hls_show()<CR>
nnoremap <silent> ]oh :call gruvbox#hls_hide()<CR>
nnoremap <silent> coh :call gruvbox#hls_toggle()<CR>
nnoremap * :let @/ = ""<CR>:call gruvbox#hls_show()<CR>*
nnoremap / :let @/ = ""<CR>:call gruvbox#hls_show()<CR>/
nnoremap ? :let @/ = ""<CR>:call gruvbox#hls_show()<CR>?
Plug 'tpope/vim-unimpaired'
" GO - golang
Plug 'fatih/vim-go'
let g:go_fmt_command = "goimports"
let g:go_fmt_autosave = 1
let g:go_fmt_fail_silently = 0
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_interfaces = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
"let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
"let g:go_list_type = "quickfix"
" Present
Plug 'raphael/vim-present-simple'
" FISH'go',
Plug 'dag/vim-fish'
" Use tabs in GO
autocmd Filetype go set softtabstop=8
autocmd Filetype go set shiftwidth=8
autocmd Filetype go set tabstop=8
autocmd Filetype go set noexpandtab
autocmd Filetype go set nolist " Do not hightlight tabs in go or other things in go, gofmt will clean it all up anyway
au FileType go nmap <Leader>gs <Plug>(go-implements)
au FileType go nmap <Leader>gi <Plug>(go-info)
au FileType go nmap <Leader>gd <Plug>(go-doc)
au FileType go nmap <Leader>gv <Plug>(go-doc-vertical)
au FileType go nmap <leader>gr <Plug>(go-referrers)
au FileType go nmap <leader>gb <Plug>(go-build)
au FileType go nmap <leader>gt <Plug>(go-test)
au FileType go nmap <leader>gc <Plug>(go-coverage)
"au FileType go nmap <Leader>ds <Plug>(go-def-split)
"au FileType go nmap <Leader>dv <Plug>(go-def-vertical)
"au FileType go nmap <Leader>dt <Plug>(go-def-tab)
au FileType go nmap <Leader>e <Plug>(go-rename)
" Misc
Plug 'tpope/vim-markdown'
Plug 'mhinz/vim-startify'
"Plug 'sourcegraph/sourcegraph-vim'
call plug#end()