From 6048e07c90f14426df02f9959a56181041381cf8 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 10 Oct 2023 13:16:36 +0100 Subject: Adds a FZF function to search in git repo --- vim/vimrc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc index 489e9eb..cbd7914 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -346,3 +346,12 @@ augroup encrypted \ setlocal nobin augroup END " }}} +" GitFZF {{{ +" from https://git.sr.ht/~sircmpwn/dotfiles/tree/master/item/.vimrc +function! GitFZF() + let path = trim(system('cd '.shellescape(expand('%:p:h')).' && git rev-parse --show-toplevel')) + exe 'FZF ' . path +endfunction +command! GitFZF call GitFZF() +nnoremap :GitFZF +" }}} -- cgit v1.2.3