comparison vim/vimrc @ 313:de5090faf408

Merge changes.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 29 Jul 2015 07:38:09 -0700
parents 5b7acab16766 b09d451f3516
children 5f9d52300aaa
comparison
equal deleted inserted replaced
312:ef9d3ec574af 313:de5090faf408
260 260
261 " }}} 261 " }}}
262 262
263 " Syntastic {{{ 263 " Syntastic {{{
264 264
265 let g:syntastic_auto_loc_list = 1
266 let g:syntastic_check_on_open = 1
267 let g:syntastic_check_on_wq = 0
268
265 " flake8 includes pyflakes, pep8, and mccabe 269 " flake8 includes pyflakes, pep8, and mccabe
266 " I could maybe replace pyflakes with frosted? 270 " I could maybe replace pyflakes with frosted?
267 let g:syntastic_python_checkers = ['flake8'] ", 'pylint'] 271 let g:syntastic_python_checkers = ['flake8'] ", 'pylint']
268 let g:syntastic_python_python_exec = 'python3' 272 let g:syntastic_python_python_exec = 'python3'
269 273
304 " }}} 308 " }}}
305 309
306 " Python-Mode {{{ 310 " Python-Mode {{{
307 311
308 let g:pymode = 1 312 let g:pymode = 1
309 let g:pymode_python = 'disable' 313 let g:pymode_python = 'python'
310 let g:pymode_syntax_all = 1 314
315 let g:pymode_syntax = 1
316 let g:pymode_syntax_all = 0
317 let g:pymode_syntax_builtin_objs = 1
311 let g:pymode_syntax_print_as_function = 1 318 let g:pymode_syntax_print_as_function = 1
312 let g:pymode_syntax_space_errors = 1 319 let g:pymode_syntax_space_errors = 1
320
313 let g:pymode_run = 0 321 let g:pymode_run = 0
322
314 let g:pymode_lint = 0 323 let g:pymode_lint = 0
315 let g:pymode_trim_whitespaces = 0 324 let g:pymode_trim_whitespaces = 0
325 let g:pymode_folding = 1
326
327 let g:pymode_doc = 1
328 let g:pymode_doc_bind = 'K'
329
316 let g:pymode_virtualenv = 0 330 let g:pymode_virtualenv = 0
317 let g:pymode_folding = 1
318
319 if !has('+python')
320 let g:pymode = 0
321 endif
322 331
323 " }}} 332 " }}}
324 333
325 " }}} 334 " }}}
326 335
390 noremap <end> g<end> 399 noremap <end> g<end>
391 400
392 " Tab navigation 401 " Tab navigation
393 noremap <C-Tab> :tabnext<cr> 402 noremap <C-Tab> :tabnext<cr>
394 noremap <C-S-Tab> :tabprevious<cr> 403 noremap <C-S-Tab> :tabprevious<cr>
395 noremap <C-t> :tabnew<cr> 404 nnoremap <leader>t :tabnew<cr>
396 405
397 " Window navigation 406 " Window navigation
398 nnoremap <C-up> :wincmd k<cr> 407 nnoremap <C-up> :wincmd k<cr>
399 nnoremap <C-down> :wincmd j<cr> 408 nnoremap <C-down> :wincmd j<cr>
400 nnoremap <C-left> :wincmd h<cr> 409 nnoremap <C-left> :wincmd h<cr>
465 nnoremap ]q :cnext<cr>zvzz 474 nnoremap ]q :cnext<cr>zvzz
466 nnoremap [q :cprevious<cr>zvzz 475 nnoremap [q :cprevious<cr>zvzz
467 nnoremap ]l :lnext<cr>zvzz 476 nnoremap ]l :lnext<cr>zvzz
468 nnoremap [l :lprevious<cr>zvzz 477 nnoremap [l :lprevious<cr>zvzz
469 478
470 " Same with change list. 479 " Same with change and jump lists.
471 nnoremap ]] g,zz 480 nnoremap ]] g,zz
472 nnoremap [[ g;zz 481 nnoremap [[ g;zz
482 nnoremap ]j <C-I>
483 nnoremap [j <C-O>
473 484
474 " Make the diff navigation also center things. 485 " Make the diff navigation also center things.
475 nnoremap ]c ]czvzz 486 nnoremap ]c ]czvzz
476 nnoremap [c [czvzz 487 nnoremap [c [czvzz
477 488
492 " in a split window where everything is folded except what you need to see. 503 " in a split window where everything is folded except what you need to see.
493 " Note that if a tag search yield multiple possible results, we will still run 504 " Note that if a tag search yield multiple possible results, we will still run
494 " some of that `zvzz` stuff, but that's OK, the main point is to not mess up 505 " some of that `zvzz` stuff, but that's OK, the main point is to not mess up
495 " the result selection window either. 506 " the result selection window either.
496 nnoremap <c-]> <c-]>zvzz 507 nnoremap <c-]> <c-]>zvzz
508 nnoremap <c-[> :pop<cr>
497 nnoremap <c-\> <c-w>v<c-]>zMzvzz 509 nnoremap <c-\> <c-w>v<c-]>zMzvzz
498 nnoremap <F9> :tprevious 510 nnoremap <F9> :tprevious
499 nnoremap <F10> :tnext 511 nnoremap <F10> :tnext
500 nnoremap <c-s-]> :pop<cr>
501 512
502 " Keep search matches in the middle of the window. 513 " Keep search matches in the middle of the window.
503 nnoremap n nzvzz 514 nnoremap n nzvzz
504 nnoremap N Nzvzz 515 nnoremap N Nzvzz
505 516
579 590
580 function! s:StripTrailingWhitespaces() abort 591 function! s:StripTrailingWhitespaces() abort
581 let l = line(".") 592 let l = line(".")
582 let c = col(".") 593 let c = col(".")
583 %s/\s\+$//e 594 %s/\s\+$//e
584 let @/=''
585 call cursor(l, c) 595 call cursor(l, c)
586 endfunction 596 endfunction
587 597
588 function! s:FindProjectRoot(cur, marker) abort 598 function! s:FindProjectRoot(cur, marker) abort
589 let l:cur = a:cur 599 let l:cur = a:cur