Nvim: fully replace nerdtree by defx

This commit is contained in:
Robert Kmieć
2021-12-12 21:24:27 +01:00
parent 4ddbc5a1ee
commit 546707f8ba
2 changed files with 3 additions and 4 deletions

View File

@@ -1,10 +1,10 @@
nnoremap <leader>d <cmd>Defx<CR>
nnoremap <leader>d <cmd>Defx `escape(expand('%:p:h'), ' :')` -search=`expand('%:p')` -split=vertical -winwidth=50 -direction=topleft<CR>
autocmd FileType defx call s:defx_my_settings()
function! s:defx_my_settings() abort
" Define mappings
nnoremap <silent><buffer><expr> <CR>
\ defx#do_action('open')
\ defx#do_action('drop') " instead of open
nnoremap <silent><buffer><expr> c
\ defx#do_action('copy')
nnoremap <silent><buffer><expr> m
@@ -12,7 +12,7 @@ function! s:defx_my_settings() abort
nnoremap <silent><buffer><expr> p
\ defx#do_action('paste')
nnoremap <silent><buffer><expr> l
\ defx#do_action('open')
\ defx#do_action('drop')
nnoremap <silent><buffer><expr> E
\ defx#do_action('open', 'vsplit')
nnoremap <silent><buffer><expr> P

View File

@@ -33,7 +33,6 @@ Plug 'quangnguyen30192/cmp-nvim-ultisnips'
" }}}
" Files switch, jump and grep-like tools {{{
"Plug 'preservim/nerdtree' | Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'junegunn/fzf' | Plug 'junegunn/fzf.vim'
Plug 'nvim-lua/popup.nvim'