mhinz / vim-startify

:link: The fancy start screen for Vim.
MIT License
5.3k stars 186 forks source link

How to open NerdTree when a file is selected from Startify? #483

Closed UmbralReaper closed 3 years ago

UmbralReaper commented 3 years ago

How can I open NerdTree when a file is selected from the Startify menu, but not anywhere else. For example,

autocmd BufEnter * NERDTreeCWD

won't work because it will open on every new buffer.

mhinz commented 3 years ago

Try putting this in your vimrc:

autocmd User StartifyBufferOpened NERDTreeCWD

Also see :h startify-autocmd for other options.

UmbralReaper commented 3 years ago

Thanks!