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('"')