From 69b8ce1e84e54469b5b9a5f714c2fa8ad8ae93ed Mon Sep 17 00:00:00 2001 From: Rob Whittaker Date: Tue, 4 Oct 2022 10:30:47 +0100 Subject: [PATCH] Add a Silver Searcher shortcut Before, we dropped our custom "Ag" command in favour of the version with fzf.vim. Unfortunately, this change also removed the handy "\" shortcut to activate Silver Searcher. We added the shortcut back to the Vim configuration. --- vimrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vimrc b/vimrc index 0d1552c..8f9d078 100644 --- a/vimrc +++ b/vimrc @@ -97,6 +97,8 @@ if executable('ag') " Use ag in fzf for listing files. Lightning fast and respects .gitignore let $FZF_DEFAULT_COMMAND = 'ag --literal --files-with-matches --nocolor --hidden -g ""' + + nnoremap \ :Ag endif " Make it obvious where 80 characters is