aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2023-06-13 09:22:15 +0800
committerAaron LI <aly@aaronly.me>2023-06-13 10:01:03 +0800
commitaa3d0863c65aff11b56488e791dd28c1cf7dbd09 (patch)
tree03d53437eb31220e71066e6ddb9a98d5688bb86b
parent182dd42733515842df6ee067a3eaefe3759a8e3d (diff)
downloaddotfiles-aa3d0863c65aff11b56488e791dd28c1cf7dbd09.tar.bz2
vim: Configure NERDTree plugin
-rw-r--r--_vim/vimrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/_vim/vimrc b/_vim/vimrc
index a03d3a6..3e526be 100644
--- a/_vim/vimrc
+++ b/_vim/vimrc
@@ -321,6 +321,13 @@ nnoremap <leader>gb :Gblame<cr>
autocmd BufReadPost fugitive://* setlocal bufhidden=delete
+" Mappings for NERDTree
+nnoremap <leader>n :NERDTreeFocus<cr>
+nnoremap <C-t> :NERDTreeToggle<cr>
+" Start NERDTree when Vim is started without file arguments.
+autocmd StdinReadPre * let s:std_in=1
+autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif
+
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Helper functions