nvim: Replace nerdtree with vifm

Simple, experimental replacement for now. Tries to keep the previous key
functionality intact:
use <leader>e to open working directory in vifm, <leader>E to open the
directory of the current file.

Some problems will remain - currently it is hard to navigate away from
an open vifm instance with C-hjkl since it is not recognized as a vim
window anymore.

Additionally, invoking vim functions does not work from the vifm window,
which means that if I start nvim pointing to a directory, i.e. with vifm
open, it not possible for me currently to directly start up fzf to open
another file, or a buffer from the history, or similar.
This commit is contained in:
Marty Oehme 2021-03-14 14:01:16 +01:00
parent 78e678fe1f
commit 7181d881d7
Signed by: Marty
GPG key ID: B7538B8F50A1C800
5 changed files with 13 additions and 30 deletions

View file

@ -1,19 +0,0 @@
" PLUGIN: NERDTree
" " Ecosystem
" " Plug 'tpope/vim-fugitive' - Will have to take a closer look some other time
" highlight the line the cursor is on
let NERDTreeHighlightCursorline = 1
" remove Press ? for help
let NERDTreeMinimalUI=1
" loads nerdtree plugin when starting vim with a directory
" this is necessary when we lazyload nerdtree with vimplug above
" since it would only get loaded with nttoggle otherwise, and run netrw
augroup nerd_loader
autocmd!
autocmd VimEnter * silent! autocmd! FileExplorer
autocmd BufEnter,BufNew *
\ if isdirectory(expand('<amatch>'))
\| call plug#load('nerdtree')
\| execute 'autocmd! nerd_loader'
\| endif
augroup END

View file

@ -0,0 +1,4 @@
let g:loaded_netrw = 1
let g:loaded_netrwPlugin = 1
let g:vifm_replace_netrw = 1
let g:vifm_exec_args = '-c "set vifminfo=''''" -c "set statusline=''''" -c "only"'