Nerdtree: NERDTreeCustomOpenArgs -> 'keepopen':0 not taking affect

Created on 18 Aug 2020  路  1Comment  路  Source: preservim/nerdtree

Self-Diagnosis

  • [x] I have searched the issues for an answer to my question.
  • [x] I have reviewed the NERDTree documentation. :h NERDTree
  • [x] I have reviewed the Wiki.
  • [x] I have searched the web for an answer to my question.

Environment (for bug reports)

  • [x] Operating System: Ubuntu 20.04
  • [x] Vim/Neovim version :echo v:version: echos 800, but using Neovim 0.5
  • [x] NERDTree version, found on 1st line in NERDTree quickhelp ?: 6.9.0
  • [x] vimrc settings

$MYVIMRC

let plugdir = fnamemodify($MYVIMRC, ":p:h") . "/tmp/vim-plug"
call plug#begin(plugdir)
Plug 'preservim/nerdtree', { 'on': ['NERDTreeToggle', 'NERDTreeFind']}
call plug#end()

let NERDTreeMapCustomOpen = "<CR>"
let NERDTreeCustomOpenArgs = {'file': {'reuse': 'all', 'where': 'p', 'keepopen':0, 'stay':0}, 'dir':{}}

Steps to Reproduce the Issue

  1. :NERDTreeToggle
  2. Navigate to a file and press <CR>

Current Result

The file is opened, but NERDTree pane remains.

Expected Result

The file is opened, but NERDTree pane closed.

Notes

I have tried

" Automatically close NerdTree when you open a file
" let NERDTreeQuitOnOpen = 1

But I wish to use o to open a file and keep NERDTree pane, and <CR> to open a file and autoclose NERDTree pane afterwards.

bug

Most helpful comment

Confirmed. What a great opportunity to clean this up! Currently, there are two somewhat related mechanisms for deciding whether to close NERDTree, and they are not cooperating. This will take some time to sort out and fix. This may result in a new major release, if my hunch is correct.

>All comments

Confirmed. What a great opportunity to clean this up! Currently, there are two somewhat related mechanisms for deciding whether to close NERDTree, and they are not cooperating. This will take some time to sort out and fix. This may result in a new major release, if my hunch is correct.

Was this page helpful?
0 / 5 - 0 ratings