From 66cf829ee3dc9e2fc9e3937da1953bf9ecae4090 Mon Sep 17 00:00:00 2001 From: Stefan Friese Date: Fri, 11 Oct 2024 08:42:00 +0200 Subject: [PATCH] added upwards search --- vim/.vimrc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/vim/.vimrc b/vim/.vimrc index 8358773..c75c500 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -337,9 +337,25 @@ let g:fzf_colors = \ 'spinner': ['fg', 'Label'], \ 'header': ['fg', 'Comment'] } +function! FzfSearchUpwards() + let l:dir = getcwd() + while !isdirectory(l:dir . "/.git") && l:dir != "/" + let l:dir = fnamemodify(l:dir, ":h") + endwhile + execute "Files " . l:dir +endfunction + +nnoremap fu :call FzfSearchUpwards() + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" +" Functions to base64 encode/decode the exact selected text and replace it +" without a newline +" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + " xnoremap c =:'<,'>:w ! base64p -" Function to base64 encode the exact selected text and replace it without a newline function! Base64EncodeSelection() normal! gv"vy let l:selected_text = getreg('"')