Browse Source

update faq in the readme

Martin Grenfell 7 years ago
parent
commit
a55e9eca40
1 changed files with 17 additions and 2 deletions
  1. 17
    2
      README.markdown

+ 17
- 2
README.markdown View File

@@ -66,13 +66,28 @@ Then reload vim, run `:helptags`, and check out `:help NERD_tree.txt`.
66 66
 Faq
67 67
 ---
68 68
 
69
-Q. Can I have the nerdtree on every tab automatically?
69
+__Q. Can I have the nerdtree on every tab automatically?__
70 70
 
71 71
 A. Nope. If this is something you want then chances are you aren't using tabs
72 72
    and buffers as they were intended to be used. Read this
73 73
    http://stackoverflow.com/questions/102384/using-vims-tabs-like-buffers
74 74
 
75
-   If you are interested in this behavour then consider [vim-nerdtree-tabs](https://github.com/jistr/vim-nerdtree-tabs)
75
+   If you are interested in this behaviour then consider [vim-nerdtree-tabs](https://github.com/jistr/vim-nerdtree-tabs)
76
+
77
+__Q. How can I open a NERDTree automatically when vim starts up?__
78
+
79
+A. Stick this in your vimrc: `autocmd vimenter * NERDTree`
80
+
81
+__Q. How can I open a NERDTree automatically when vim starts up if no files were specified?__
82
+
83
+A. Stick this in your vimrc `autocmd vimenter * if !argc() | NERDTree | endif`
84
+
85
+__Q. How can I close vim if the only window left open is a NERDTree?__
86
+
87
+A. Stick this in your vimrc:
88
+
89
+   `autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif`
90
+
76 91
 
77 92
 Changelog
78 93
 ---------

Loading…
Cancel
Save