Add NERDTree plugin and config
This commit is contained in:
parent
49df22cd10
commit
a3283674aa
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -59,3 +59,6 @@
|
|||
path = pack/plugins/start/fzf
|
||||
url = git@github.com:junegunn/fzf.vim.git
|
||||
branch = master
|
||||
[submodule "pack/plugins/start/nerdtree"]
|
||||
path = pack/plugins/start/nerdtree
|
||||
url = https://github.com/preservim/nerdtree.git
|
||||
|
|
1
pack/plugins/start/nerdtree
Submodule
1
pack/plugins/start/nerdtree
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit eed488b1cd1867bd25f19f90e10440c5cc7d6424
|
9
vimrc
9
vimrc
|
@ -78,6 +78,15 @@ command Bd b# | bd #
|
|||
command! BufOnly silent! execute "%bd|e#|bd#"
|
||||
nnoremap <Leader>b :buffers<CR>:buffer<Space>
|
||||
nnoremap <Leader>i :!zimports %<CR>:!black %<CR><CR>
|
||||
nnoremap <leader>n :NERDTreeFocus<CR>
|
||||
nnoremap <C-n> :NERDTree<CR>
|
||||
nnoremap <C-t> :NERDTreeToggle<CR>
|
||||
nnoremap <C-f> :NERDTreeFind<CR>
|
||||
|
||||
" Exit Vim if NERDTree is the only window remaining in the only tab.
|
||||
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
|
||||
" Open the existing NERDTree on each new tab.
|
||||
autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
|
||||
|
||||
set splitbelow
|
||||
set splitright
|
||||
|
|
Loading…
Reference in a new issue