{"action":"opened","issue":{"url":"https://api.github.com/repos/scrooloose/nerdtree/issues/494","labels_url":"https://api.github.com/repos/scrooloose/nerdtree/issues/494/labels{/name}","comments_url":"https://api.github.com/repos/scrooloose/nerdtree/issues/494/comments","events_url":"https://api.github.com/repos/scrooloose/nerdtree/issues/494/events","html_url":"https://github.com/scrooloose/nerdtree/issues/494","id":108923327,"number":494,"title":"Keep NERDTree open when first select a file","user":{"login":"tnguyen14","id":1652595,"avatar_url":"https://avatars.githubusercontent.com/u/1652595?v=3","gravatar_id":"","url":"https://api.github.com/users/tnguyen14","html_url":"https://github.com/tnguyen14","followers_url":"https://api.github.com/users/tnguyen14/followers","following_url":"https://api.github.com/users/tnguyen14/following{/other_user}","gists_url":"https://api.github.com/users/tnguyen14/gists{/gist_id}","starred_url":"https://api.github.com/users/tnguyen14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnguyen14/subscriptions","organizations_url":"https://api.github.com/users/tnguyen14/orgs","repos_url":"https://api.github.com/users/tnguyen14/repos","events_url":"https://api.github.com/users/tnguyen14/events{/privacy}","received_events_url":"https://api.github.com/users/tnguyen14/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-29T17:58:29Z","updated_at":"2015-09-29T17:58:29Z","closed_at":null,"body":"I am not sure if this is the right place to ask this kind of question, but I've tried to do some digging around the web and have not seen anything similar to what I have.\r\n\r\nI  have set up NERDTree to open whenever I open vim with these commands in my `.vimrc` from the [FAQs](https://github.com/scrooloose/nerdtree#faq):\r\n```\r\nautocmd StdinReadPre * let s:std_in=1\r\nautocmd VimEnter * if argc() == 0 && !exists(\"s:std_in\") | NERDTreeToggle | endif\r\n```\r\n\r\nSo NERDTree would open when I first open vim. I would then navigate to the file I want, hit `<Enter>` to open that file. Upon doing that, the NERDTree window closes. When I do `NERDTreeToggle` again, the NERDTree window opens, but the position of any expanded directory is lost, i.e. it is reset to the original structure.\r\n\r\nIf I start expanding them now, and toggle NERDTree again, the positions are remembered from this point.\r\n\r\nSo my question is whether there's a way to not close the window when I first open the file, and also to remember the position of how the folders are expanded?"}}