nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 1c0d9efe6c10c42815782e6a3609a73a335ec46b
parent 4cb97629991fcfe83e35ec4e0e347b71617009ab
Author: Ggicci <ggicci@163.com>
Date:   Sun,  9 Oct 2016 15:26:48 +0800

Update readme, trick to open NERDTree as a tab window.

Diffstat:
MREADME.markdown | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/README.markdown b/README.markdown
@@ -100,10 +100,14 @@ Stick this in your vimrc:
 
 Note: Now start vim with plain `vim`, not `vim .`
 
-Or use the following directives if you prefer using `vim .`:
+
+---
+> How can I open NERDTree as a tab window automatically when vim opens a directory?
 
     autocmd StdinReadPre * let s:std_in=1
-    autocmd VimEnter * if argc() == 1 && argv()[0] == '.' && !exists("s:std_in") | NERDTree | wincmd p | ene | endif
+    autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | NERDTree | wincmd p | ene | endif
+
+This trick also prevents NERDTree from hiding when first select a file.
 
 ---
 > How can I open NERDTree on startup, and have my cursor start in the other window?