aboutsummaryrefslogtreecommitdiffstats
path: root/vim/vimrc
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2023-10-10 13:16:36 +0100
committerMatthew Lemon <y@yulqen.org>2023-10-10 13:16:36 +0100
commit6048e07c90f14426df02f9959a56181041381cf8 (patch)
treefd852bc70190566a5341e222162ebe3bb6d57aee /vim/vimrc
parent078b76ba1b12cfe23695c2c235f212959ad97587 (diff)
Adds a FZF function to search in git repo
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc9
1 files changed, 9 insertions, 0 deletions
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 <leader><C-f> :GitFZF<CR>
+" }}}