From a6615ab53425a172973178158c8abed168bd0056 Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Sat, 30 Sep 2017 11:21:28 +1000 Subject: [PATCH] Update ripgrep vim post --- content/technical/2016/09/ripgrep-with-vim.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/content/technical/2016/09/ripgrep-with-vim.md b/content/technical/2016/09/ripgrep-with-vim.md index a0af2b5..49fd4ec 100644 --- a/content/technical/2016/09/ripgrep-with-vim.md +++ b/content/technical/2016/09/ripgrep-with-vim.md @@ -43,5 +43,17 @@ same way as the existing `:Ag` command. To use my version of the plugin with The line will be similar in Vundle or pathogen. +**Update 30 Sep 2017:** You can now use `rg` with `fzf.vim` by defining a new +command and then mapping it to the shortcut of your choice: + + command! -bang -nargs=* Rg + \ call fzf#vim#grep( + \ 'rg --column --line-number --no-heading --color=always --ignore-case '.shellescape(), 1, + \ 0 ? fzf#vim#with_preview('up:60%') + \ : fzf#vim#with_preview('right:50%:hidden', '?'), + \ 0) + + nnoremap a :Rg + [fork]: https://github.com/wezm/fzf.vim/tree/rg [vim-plug]: https://github.com/junegunn/vim-plug