Make some tweaks to .vimrc

93182312206c62bf936f06dd2b6bd4a7a0a15bcf
Alexis Sellier committed ago 1 parent f1173f23
.vimrc +5 -3
200 200
noremap <C-l> $
201 201
noremap j gj
202 202
noremap k gk
203 203
204 204
" Like '*' but stays on the original word
205 -
nnoremap <Leader>/       *N
206 205
nnoremap <C-n>           *N
207 206
nnoremap <C-p>           #N
208 207
nnoremap c*              *Ncgn
209 208
nnoremap <Leader>h       :nohl<CR>
210 209
217 216
cnoreabbrev gc    Gcommit -v
218 217
219 218
autocmd BufRead fugitive\:* xnoremap <buffer> dp :diffput<CR>
220 219
autocmd BufRead fugitive\:* xnoremap <buffer> do :diffget<CR>
221 220
221 +
" Support jsonc comments in json files
222 +
autocmd FileType json syntax match Comment +\/\/.\+$+
223 +
222 224
 " Select recently pasted text
223 -
nnoremap <leader>p       V`]
225 +
nnoremap <leader>v       V`]
224 226
225 227
" Switch buffers easily
226 228
nnoremap <Tab>   <C-^>
227 229
228 230
" Switch between .c and .h files easily
243 245
nnoremap <Leader>f      :FuzzyGrep<CR>
244 246
245 247
" Navigate relative to the current file
246 248
cmap     %/         %:p:h/
247 249
248 -
map <Leader>m       :make<CR>
250 +
map <Leader>m       :make check<CR>
249 251
map <Leader>e       :e ~/.vimrc<CR>
250 252
map <Leader>s       :source ~/.vimrc<CR>
251 253
252 254
" Repeat previous command
253 255
map <Leader><Space> @: