From 4a46ea9735816af26b172c06a17aca21c289ae91 Mon Sep 17 00:00:00 2001 From: Ayush Mukherjee Date: Sun, 23 Jan 2022 09:21:24 +0530 Subject: [PATCH] let fzf look for git files instead of all files, if git repo --- nvim/init.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nvim/init.vim b/nvim/init.vim index 6c8247c..aa0ad1e 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -68,4 +68,9 @@ nmap :ls " shortcuts nnoremap :Goyo -nnoremap :Files +" check if git dir, then use :GFiles for fzf +if isdirectory('.git') + nnoremap :GFiles +else + nnoremap :Files +endif