Mercurial > dotfiles
diff 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 |
line wrap: on
line diff
--- a/vim/vimrc Sun Apr 01 22:25:00 2018 -0700 +++ b/vim/vimrc Sun Apr 01 22:44:59 2018 -0700 @@ -248,6 +248,16 @@ " }}} +" Ack {{{ + +if executable('ag') + let g:ackprg = 'ag --vimgrep' +endif + +nnoremap <Leader>a :Ack!<Space> + +" }}} + " Ctrl-P {{{ " We'll set our own mappings. @@ -441,7 +451,7 @@ endfunction function! _LightlineGutentags() - return gutentags#statusline() + return gutentags#statusline('', '', '♨') endfunction function! _LightlineSyntastic() @@ -653,6 +663,11 @@ nnoremap n nzvzz nnoremap N Nzvzz +" Writing mode. +autocmd! User GoyoEnter nested call ludo#on_goyo_enter() +autocmd! User GoyoLeave nested call ludo#on_goyo_leave() +nmap <leader>p :call ludo#writingmode()<CR> + " YCM mappings. if s:HasPlugin('youcompleteme') augroup VimRC_YouCompleteMe @@ -808,6 +823,9 @@ let s:local_vimrc = s:vim_home.'/vimrc-local' if filereadable(s:local_vimrc) execute 'source' s:local_vimrc +let s:local_vimrc = s:vim_home.'/vimrc-local' +if filereadable(s:local_vimrc) + execute 'source' s:local_vimrc endif " }}}