This repository has been archived by the owner on Oct 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
304 lines (257 loc) · 7.65 KB
/
.vimrc
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
set clipboard=unnamed
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
"Plugin Manager
Plugin 'gmarik/Vundle.vim'
"test
"--------------------
"lean & mean status/tabline for vim that's light as air
Plugin 'bling/vim-airline'
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
"DejaVu 100 Mono 12pt
Plugin 'tpope/vim-rake'
Plugin 'tpope/vim-rails'
"slim html template
Plugin 'slim-template/vim-slim'
":BufOnly close every other buffers
Plugin 'vim-scripts/BufOnly.vim'
"Rename
Plugin 'danro/rename.vim'
"Vagrant
"Plugin 'markcornick/vim-vagrant'
"-------------------
"Comment
Plugin 'tomtom/tcomment_vim'
Plugin 'scrooloose/nerdcommenter'
"--------------------
"Git wrapper
Plugin 'tpope/vim-fugitive'
"---------------------
Plugin 'vim-scripts/DirDiff.vim'
" :DirDiff <A:Src Directory> <B:Src Directory>
" :DirDiff ../something/dir1 /usr/bin/somethingelse/dir2
"---------------------
"The unite or unite.vim plug-in can search and display information from
"arbitrary sources like files, buffers, recently used files or registers
":Unite file buffer
Plugin 'Shougo/unite.vim'
"test
"----------------------
"This plugin is a front for ag, A.K.A. the_silver_searcher. Ag can be used as
"a replacement for 153% of the uses of ack. This plugin will allow you to run
"ag from vim, and shows the results in a split window.
":Ag [option] {pattern} [{directory}]
Plugin 'rking/ag.vim'
"ConfigConfig for ag
"Start searching from your project root instead of the cwd
let g:ag_working_path_mode="r"
"----------------------
" Markdown
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
"Most RecentlyRecently Used (MRU) Vim Plugin
Plugin 'yegappan/mru'
"---------------------
"EasyMotion provides a much simpler way to use some motions in vim.
" default: \\w search
Plugin 'easymotion/vim-easymotion'
hi link EasyMotionTarget Search
hi link EasyMotionTarget2First Search
hi link EasyMotionTarget2Second Search
hi link EasyMotionShade Comment
"replace the default vim search
map / <Plug>(easymotion-sn)
omap / <Plug>(easymotion-tn)
"n to go to the next
map n <Plug>(easymotion-next)
map N <Plug>(easymotion-prev)
"nmap s <Plug>(easymotion-s2)
"nmap t <Plug>(easymotion-t2)
"visual mode + \\l
"select first line letter, select last line letter
Plugin 'haya14busa/vim-easyoperator-line'
"visual mode + \\p
"first char, last char, first highlight, last highlight
Plugin 'haya14busa/vim-easyoperator-phrase'
"motion: word forward : w
"motion: word backward: b
"----------------------
"Surround.vim is all about "surroundings": parentheses, brackets, quotes, XML
"tags, and more. The plugin provides mappings to easily delete, change and add
"such surroundings in pairs.
Plugin 'tpope/vim-surround'
"--------------------
"visually displaying indent levels in Vim.
Plugin 'nathanaelkane/vim-indent-guides'
" config for vim-indent-guides
let g:indent_guides_enable_on_vim_startup=1
let g:indent_guides_auto_colors = 1
let g:indent_guides_start_level = 2
let g:indent_guides_guide_size = 1
set backspace=indent,eol,start
set bs=2
set sw=2
set ts=2
set list
set listchars=tab:\ ¬,trail:.
"""""""""
"--------------------
Plugin 'chrisbra/csv.vim'
"a code-completion engine for Vim
Plugin 'Valloric/YouCompleteMe'
"ctags support
"brew install ctags
Plugin 'xolox/vim-misc'
Plugin 'xolox/vim-easytags'
let g:easytags_async = 1
"ctags -R -f ~/.vimtags /Users/pierrecaserta/workspace/
"brew install gotags
"gotags -R=true /Users/pierrecaserta/Documents/workspace/golang/src/_sources/go-master/src/ > ~/.vimtags
Plugin 'majutsushi/tagbar'
nmap <C-t> :TagbarToggle<CR>
"------------------------
"Better whitespace highlighting for Vim
":ToggleWhitespace
":CurrentLineWhitespaceOn
":StripWhitespace
Plugin 'ntpeters/vim-better-whitespace'
set tabstop=2 shiftwidth=2 expandtab
"autocmd BufWritePre * :StripWhitespace
"--------------------
"lA command-line fuzzy finder written in Go
Plugin 'junegunn/fzf'
map <silent> <C-f> :FZF<CR>
"--------------------
"swap line plugin for vim
"key mapping to c-j and c-k
Plugin 'dougnukem/vim-swap-lines'
"-----------------------
"Use RCS to keep a backup version whenever you save a file
Plugin 'vim-scripts/rcsvers.vim'
"config rcsvers.vim
"(saving all files in a single directory) the script will save them to $VIM/RCSFiles.
"install http://rudix.org/packages/rcs.html
let g:rvSaveDirectoryType = 1
let g:rvSaveDirectoryName="~/.RCSFiles/"
"----------------------
Plugin 'scrooloose/nerdtree'
"Nerdtree config
map <silent> <C-n> :NERDTreeToggle<CR>
nnoremap <silent> <Leader>+ :exe "vertical resize +8"<CR>
nnoremap <silent> <Leader>- :exe "vertical resize -8"<CR>
"Open NERDTree at startup
"autocmd VimEnter * NERDTree
"--------------------
Plugin 'scheakur/vim-scheakur'
"Plugin for R
Plugin 'jcfaria/Vim-R-plugin'
"-----------------
"Syntax checking hacks for vim
"Plugin 'scrooloose/syntastic'
"config for syntastic
"set statusline+=%#warningmsg#
"set statusline+=%{SyntasticStatuslineFlag()}
"set statusline+=%*
"let g:syntastic_always_populate_loc_list = 1
"let g:syntastic_auto_loc_list = 1
"let g:syntastic_check_on_open = 1
"let g:syntastic_check_on_wq = 0
"""""""""""""""
"----------------
"Ruby evaluation inside file using xmpfilter
"which is available in the rcodetools gem.
Plugin 't9md/vim-ruby-xmpfilter'
"xmpfilter config for ruby evaluation
nmap <Leader>ruby <Plug>(xmpfilter-run)
xmap <Leader>ruby <Plug>(xmpfilter-run)
imap <Leader>ruby <Plug>(xmpfilter-run)
"------------------
"Plugin 'fatih/vim-go'
":GoInstallBinaries
"Plugin 't-yuki/vim-go-coverlay'
"config
"au FileType go nmap <leader>c <Plug>(go-coverlay)
"au FileType go nmap <leader>C <Plug>(go-clearlay)
"au BufWritePost *.go call go#coverlay#Coverlay()
"Plugin 'gryski/vim-godef'
"git clone https://github.com/dgryski/vim-godef ~/.vim/bundle/vim-godef
map <C-z> <C-w>
"map <C-p> :bprev
"map <C-n> :bnext
"map <C-m> :MRU
"------------------
Plugin 'NLKNguyen/papercolor-theme'
"detailed 8/10
"sean 9/10
"spring 7/10
"thor 8/10
"tibet 8/10
"turbo 7/10
"colorscheme turbo
set t_ut=
set t_Co=256 " This is may or may not needed.
set background=light
"let g:PaperColor_Light_Override = { 'background' : '#D8D2B7' } ", 'cursorline' : '#dfdfff', 'matchparen' : '#d6d6d6' , 'comment' : '#8e908c' }
"DED9A6
"DEDAAB
"F5F2CE
Plugin 'rstacruz/sparkup'
"------------------
"Plugin 'L9'
"fast search
"Plugin 'git://git.wincent.com/command-t.git'
"Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
"Plugin 'user/L9', {'name': 'newL9'}
"-------------------
Plugin 'kchmck/vim-coffee-script'
"------------------
Plugin 'terryma/vim-multiple-cursors'
let g:multi_cursor_next_key='<C-b>'
"--------------------
"Plugin 'Chiel92/vim-autoformat'
"au BufWrite * :Autoformat
"au BufWrite * :g/^\_$\n\_^$/d
call vundle#end() " required
filetype plugin indent on
"run golint before save
"autocmd BufWritePost *.go execute 'GoLint' | cwindow
"set rtp+=$GOPATH/src/github.com/golang/lint/misc/vim
colorscheme PaperColor
set number
" shows row and column number at bottom right corner
set ruler
set paste
" 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'
" \ }
"
syntax enable
filetype plugin indent on " required