Mercurial > dotfiles
comparison vim/vimrc @ 430:71a080d4d83c
Vim stuff: Goyo writing mode, Ack with Ag.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 01 Apr 2018 22:44:59 -0700 |
parents | 67f14a8c2304 |
children | b7682004288d |
comparison
equal
deleted
inserted
replaced
429:52c2cfeed504 | 430:71a080d4d83c |
---|---|
243 " Plugin Settings {{{ | 243 " Plugin Settings {{{ |
244 | 244 |
245 " NERDTree {{{ | 245 " NERDTree {{{ |
246 | 246 |
247 let NERDTreeRespectWildIgnore = 1 | 247 let NERDTreeRespectWildIgnore = 1 |
248 | |
249 " }}} | |
250 | |
251 " Ack {{{ | |
252 | |
253 if executable('ag') | |
254 let g:ackprg = 'ag --vimgrep' | |
255 endif | |
256 | |
257 nnoremap <Leader>a :Ack!<Space> | |
248 | 258 |
249 " }}} | 259 " }}} |
250 | 260 |
251 " Ctrl-P {{{ | 261 " Ctrl-P {{{ |
252 | 262 |
439 return '' | 449 return '' |
440 endif | 450 endif |
441 endfunction | 451 endfunction |
442 | 452 |
443 function! _LightlineGutentags() | 453 function! _LightlineGutentags() |
444 return gutentags#statusline() | 454 return gutentags#statusline('', '', '♨') |
445 endfunction | 455 endfunction |
446 | 456 |
447 function! _LightlineSyntastic() | 457 function! _LightlineSyntastic() |
448 return SyntasticStatuslineFlag() | 458 return SyntasticStatuslineFlag() |
449 endfunction | 459 endfunction |
651 | 661 |
652 " Keep search matches in the middle of the window. | 662 " Keep search matches in the middle of the window. |
653 nnoremap n nzvzz | 663 nnoremap n nzvzz |
654 nnoremap N Nzvzz | 664 nnoremap N Nzvzz |
655 | 665 |
666 " Writing mode. | |
667 autocmd! User GoyoEnter nested call ludo#on_goyo_enter() | |
668 autocmd! User GoyoLeave nested call ludo#on_goyo_leave() | |
669 nmap <leader>p :call ludo#writingmode()<CR> | |
670 | |
656 " YCM mappings. | 671 " YCM mappings. |
657 if s:HasPlugin('youcompleteme') | 672 if s:HasPlugin('youcompleteme') |
658 augroup VimRC_YouCompleteMe | 673 augroup VimRC_YouCompleteMe |
659 autocmd! | 674 autocmd! |
660 autocmd FileType cpp nnoremap <Leader>jj :YcmCompleter GoToImprecise<cr>zv | 675 autocmd FileType cpp nnoremap <Leader>jj :YcmCompleter GoToImprecise<cr>zv |
806 " Local override {{{ | 821 " Local override {{{ |
807 | 822 |
808 let s:local_vimrc = s:vim_home.'/vimrc-local' | 823 let s:local_vimrc = s:vim_home.'/vimrc-local' |
809 if filereadable(s:local_vimrc) | 824 if filereadable(s:local_vimrc) |
810 execute 'source' s:local_vimrc | 825 execute 'source' s:local_vimrc |
811 endif | 826 let s:local_vimrc = s:vim_home.'/vimrc-local' |
812 | 827 if filereadable(s:local_vimrc) |
813 " }}} | 828 execute 'source' s:local_vimrc |
814 | 829 endif |
830 | |
831 " }}} | |
832 |