From 5c35035482930f7c8c2972524ea14752fe2c3049 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Mon, 31 May 2021 19:39:11 +0200 Subject: [PATCH] nerdtree nur bei ordner --- .vimrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.vimrc b/.vimrc index af02384..8eff410 100644 --- a/.vimrc +++ b/.vimrc @@ -63,12 +63,12 @@ let NERDTreeShowLineNumbers = 0 " Hide line numbers let NERDTreeMinimalMenu = 1 " Use the minimal menu (m) let NERDTreeWinSize = 31 " Set panel width to 31 columns nmap :NERDTreeToggle " ruft NERDtree mit F2 auf -" Start NERDTree. If a file is specified, move the cursor to its window. +" Start NERDTree when Vim is started without file arguments. autocmd StdinReadPre * let s:std_in=1 -autocmd VimEnter * NERDTree | if argc() > 0 || exists("s:std_in") | wincmd p | endif +autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif let g:nerdtree_sync_cursorline = 1 " highlight the file in tree " open the existing NERDTree on each new tab. -autocmd BufWinEnter * silent NERDTreeMirror +"autocmd BufWinEnter * silent NERDTreeMirror " " exit Vim if NERDTree is the only window left. autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |