From 5dbaa286ccca4929599b5083435a441b319d8a32 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 19 Jul 2018 16:48:36 +0200 Subject: nvim: Add :Rg (s) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- nvim/init.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'nvim') diff --git a/nvim/init.vim b/nvim/init.vim index d999c09..684642f 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -130,3 +130,11 @@ noremap l noremap p :FzfFiles noremap P :FzfFiles nnoremap b :FzfBuffers + +noremap s :Rg +command! -bang -nargs=* Rg + \ call fzf#vim#grep( + \ 'rg --column --line-number --no-heading --color=always '.shellescape(), 1, + \ 0 ? fzf#vim#with_preview('up:60%') + \ : fzf#vim#with_preview('right:50%:hidden', '?'), + \ 0) -- cgit v1.2.3-70-g09d2