Nerdtree: Ignore files and directories

Created on 14 Mar 2018  路  5Comments  路  Source: preservim/nerdtree

Hello,

I am trying to hide the build directory in NERDTree. But unfortunately I haven't succeeded.

Here is the option I have used:

let NERDTreeIgnore = ['\build$']

Environment

  • Operating System: archlinux
  • Vim version : version: NVIM v0.2.3-785-gb22d3385b
  • NERDTree version: It is the latest (I use vim-plug)

Thank you very much in advance.

Most helpful comment

You should have used.

let g:NERDTreeIgnore = ['^build$']

All 5 comments

You should have used.

let g:NERDTreeIgnore = ['^build$']

Thank you very much for your precious help.

Problem solved.

The strings in that list are regular expressions, so the \ is tyring to escape the b that follows it. The \ is not a path separator. Your regular expression should look like this: ^build$ This will ignore all files and folders named build, but it won't hide ones like building. Additionally, you can use a special NERDTree flag to hide only folders:

let NERDTreeIgnore = ['^build$[[dir]]']

@BigfootN You're welcome, always.

@PhilRunninger Thank you very much for the additional information.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PinheiroCosta picture PinheiroCosta  路  4Comments

sunnyguan picture sunnyguan  路  4Comments

milushov picture milushov  路  4Comments

nicknick63 picture nicknick63  路  6Comments

MuhammadMouradG picture MuhammadMouradG  路  6Comments