diff --git a/nvim/config/init.vim b/nvim/config/init.vim index 7499be8..3255cec 100644 --- a/nvim/config/init.vim +++ b/nvim/config/init.vim @@ -193,7 +193,7 @@ nnoremap k :cp " ==== Ranger configuration ==== let g:ranger_map_key = 0 nnoremap :Ranger -nnoremap cg :call OpenRangerIn(system('git rev-parse --show-toplevel'), 'edit ') +nnoremap cg :call OpenRangerIn(system("git rev-parse --show-toplevel || pwd"), 'edit ') " ==== fugitive configuration ==== @@ -216,7 +216,7 @@ nnoremap gsc :exec "!git switch -c " . input("Enter new branch name:") for fzf let g:fugitive_no_maps=1 -nnoremap :GitFiles +nnoremap :call fzf#vim#files(trim(system("git rev-parse --show-toplevel 2>/dev/null \|\| pwd"))) nnoremap gco :call fzf#run({'source': 'git branch \| cut -c 3-; git tag -l', 'sink': '!git checkout'}) nnoremap gm :call fzf#run({'source': 'git branch \| cut -c 3-', 'sink': '!git merge'})