nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 0b1166ff7878ec510f4ce6cbdd336de549141f6a
parent b2d2cc1840c21ac811af308d0e3675b000cbebf3
Author: Martin Grenfell <martin.grenfell@gmail.com>
Date:   Sun, 29 Jun 2014 12:29:49 +0100

update code in readme to auto-open a tree on startup

Closes #242

Diffstat:
MREADME.markdown | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/README.markdown b/README.markdown
@@ -80,7 +80,10 @@ A. Stick this in your vimrc: `autocmd vimenter * NERDTree`
 
 __Q. How can I open a NERDTree automatically when vim starts up if no files were specified?__
 
-A. Stick this in your vimrc `autocmd vimenter * if !argc() | NERDTree | endif`
+A. Stick this in your vimrc
+
+    autocmd StdinReadPre * let s:std_in=1
+    autocmd VimEnter * if !argc() == 0 && !exists("s:std_in") | NERDTree | endif
 
 __Q. How can I map a specific key or shortcut to open NERDTree?__