From 55d517bc8c3f1417f17da573bd277b4c910fea6c Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Thu, 12 Nov 2020 23:38:48 +0800 Subject: [PATCH] [feature] C-p fallbacks to pwd --- nvim/config/init.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'})