added upwards search
This commit is contained in:
parent
031f2d876b
commit
66cf829ee3
18
vim/.vimrc
18
vim/.vimrc
|
@ -337,9 +337,25 @@ let g:fzf_colors =
|
||||||
\ 'spinner': ['fg', 'Label'],
|
\ 'spinner': ['fg', 'Label'],
|
||||||
\ 'header': ['fg', 'Comment'] }
|
\ '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 <leader>fu :call FzfSearchUpwards()<CR>
|
||||||
|
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
"
|
||||||
|
" Functions to base64 encode/decode the exact selected text and replace it
|
||||||
|
" without a newline
|
||||||
|
"
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
" xnoremap <leader>c <esc>=:'<,'>:w ! base64<C-M>p
|
" xnoremap <leader>c <esc>=:'<,'>:w ! base64<C-M>p
|
||||||
|
|
||||||
" Function to base64 encode the exact selected text and replace it without a newline
|
|
||||||
function! Base64EncodeSelection()
|
function! Base64EncodeSelection()
|
||||||
normal! gv"vy
|
normal! gv"vy
|
||||||
let l:selected_text = getreg('"')
|
let l:selected_text = getreg('"')
|
||||||
|
|
Loading…
Reference in New Issue