From ff8da8e14f0f0c0643f36a261493986af6649325 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Sat, 16 Jan 2021 14:05:29 +0800 Subject: [PATCH] [misc] use netrw instead of ranger --- cli/vim/init.vim | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cli/vim/init.vim b/cli/vim/init.vim index 122f307..64919b7 100644 --- a/cli/vim/init.vim +++ b/cli/vim/init.vim @@ -116,7 +116,7 @@ Plug 'mhinz/vim-grepper', { 'on': ['Grepper', '(GrepperOperator)'] } Plug 'morhetz/gruvbox' Plug 'klesh/vim-fish', { 'for': 'fish' } Plug 'alvan/vim-closetag', { 'for': ['vue', 'html', 'xml'] } -Plug 'francoiscabrol/ranger.vim' +"Plug 'francoiscabrol/ranger.vim' Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' @@ -134,6 +134,9 @@ if $VIM_MODE == 'enhanced' else Plug 'Vimjas/vim-python-pep8-indent', { 'for': 'python' } endif +if has('win32') + Plug 'zigford/vim-powershell' +endif call plug#end() " ==== vim-markdown configuration ==== @@ -199,7 +202,11 @@ nnoremap k :cp " ==== Ranger configuration ==== let g:ranger_map_keys = 0 -nnoremap :Ranger +"nnoremap :Ranger + + +" ==== netrw configuration ==== +nnoremap :e . autocmd BufEnter,BufRead nnoremap cg :call OpenRangerIn(system("git rev-parse --show-toplevel >/dev/null || pwd"), 'edit ') @@ -224,7 +231,7 @@ nnoremap gsc :exec "!git switch -c " . input("Enter new branch name:") for fzf let g:fugitive_no_maps=1 -nnoremap :call fzf#vim#files(trim(system("git rev-parse --show-toplevel 2>/dev/null \|\| pwd"))) +nnoremap :call fzf#vim#files(trim(system("git rev-parse --show-toplevel \|\| 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'}) nnoremap ls :Buffers