Skip to content

Max depth for recursive open #1287

Open
@notmatthancock

Description

@notmatthancock

Description

I like having the file browser expanded by default, so I have the following line in my init:

autocmd User NERDTreeInit normal O

However, when I edit a file where there's a great amount of depth to the hierarchy (e.g., a file in my home directory), the editor hangs for a long period of time while it does the recursive open unless I CTRL+C to stop it.

I'd like to be able to specify the level of depth of recursive expansion so that I can still get a somewhat open view of the files by default, but without bombing the editor in cases where the hierarchy is deep.

Perhaps the interface for controlling the depth could be a variable similar to NERDTreeIgnore, e.g., by adding to one's init:

let NERDTreeMaxRecursiveOpen = 3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions