Created
October 11, 2019 19:41
-
-
Save damonkelley/06d75924c4f47ebd1cf9338341389a55 to your computer and use it in GitHub Desktop.
Fuzzy Finding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Plugins {{{ | |
call plug#begin() | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
call plug#end() | |
"}}} | |
" Search for word under the cursor | |
nnoremap <silent> <leader>* :Rg! <C-R><C-W><CR> | |
nnoremap <leader>/ :Rg! | |
command! -bang -nargs=* Rg | |
\ call fzf#vim#grep( | |
\ 'rg --column --line-number --no-heading --color=always '.shellescape(<q-args>), 1, | |
\ <bang>0 ? fzf#vim#with_preview('up:60%') | |
\ : fzf#vim#with_preview('right:50%:hidden', '?'), | |
\ <bang>0) | |
command! -bang -nargs=* Ag | |
\ call fzf#vim#ag(<q-args>, | |
\ <bang>0 ? fzf#vim#with_preview('up:60%') | |
\ : fzf#vim#with_preview('right:50%:hidden', '?'), | |
\ <bang>0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/damonkelley/dotfiles/blob/master/vim/init.vim