Browse Source

vim: fzf: add GGrep command

Adds a nice interface to `git grep` with a preview window for matching
files.
main
Brennen Bearnes 11 months ago
parent
commit
6f2c589b14
1 changed files with 18 additions and 4 deletions
  1. +18
    -4
      home/.vim/vimrc

+ 18
- 4
home/.vim/vimrc View File

@ -132,10 +132,24 @@ let mapleader = ","
" Plugin 'FuzzyFinder'
Plugin 'Shougo/unite.vim'
" fzf - fuzzy finding
" https://github.com/junegunn/fzf
let g:fzf_launcher = '/usr/bin/xterm'
Plugin 'junegunn/fzf'
" fzf - fuzzy finding {{{
" https://github.com/junegunn/fzf
let g:fzf_launcher = '/usr/bin/xterm'
Plugin 'junegunn/fzf'
" Some utility wrappers around fzf stuff:
Plugin 'junegunn/fzf.vim'
" Example git grep wrapper from fzf.vim readme
command! -bang -nargs=* GGrep
\ call fzf#vim#grep(
\ 'git grep --line-number -- '.shellescape(<q-args>), 0,
\ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0)
" Use fzf for multi-definition tags:
Plugin 'zackhsi/fzf-tags'
nmap <C-]> <Plug>(fzf_tags)
" }}}
" Distraction-free mode:
Plugin 'junegunn/goyo.vim'


Loading…
Cancel
Save