commit 73ded483a0481cd7e29616830af8a3c9ab496e40
parent fddac60afb026a458babc6d3bd2455d5f967d45e
Author: Martin Grenfell <martin.grenfell@gmail.com>
Date: Thu, 26 Nov 2015 18:57:38 +0000
update FAQ about opening nerdtree automatically on startup
Closes #494
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.markdown b/README.markdown
@@ -91,11 +91,13 @@ Stick this in your vimrc: `autocmd vimenter * NERDTree`
> How can I open a NERDTree automatically when vim starts up if no files were specified?
-Stick this in your vimrc
+Stick this in your vimrc:
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
+Note: Now start vim with plain `vim`, not `vim .`
+
> How can I map a specific key or shortcut to open NERDTree?
Stick this in your vimrc to open NERDTree with `Ctrl+n` (you can set whatever key you want):