NERDTree directory colours

I just realised that my NERDTree directory colour wasn’t inline with my Vim theme, and I couldn’t help but be bugged by it. Seems it’s a simple change. To change colour you need to use the treeDir highlight group.

To keep it synced with the ir_black theme I use, I just added the following to my colour scheme file.

  • Cristian

    I had ugly blue text on black background couldn’t see a thing :( Thanks for the quick fix :):)

  • Zeeshan Jan

    Hi, I am not able to use these commands. In my case I have configured the color scheme for my VIM but my Nerdtree shows no highlighting what does the treeDir refer to and do i have to mention the second statement in the color scheme vim file?

    • Hates

      It’s possible the names have changed since then:

      https://github.com/scrooloose/nerdtree/blob/master/syntax/nerdtree.vim#L79

      • Zeeshan Jan

        Thanks for the quick response. I am trying to run the commands in the following manner:

        1. I place the command hi Directory guifg=#96CBFE guibg=#00ff00 in my .vimrc file

        2. Then I placethe command hi link Directory Keyword in my badwolf.vim color scheme file

        But when I restart VIM the NerdTree shows all white color.

      • Hates

        IIRC my post was when I was using MacVim. Now I user Vim in the terminal something like this works for me:

        hi NERDTreeDir ctermfg=DarkGrey ctermbg=White

      • Zeeshan Jan

        Thanks a lot! I got it fixed.

  • tiagofumo

    If anyone is interested in highlighting files, check out this extension I made:

    https://github.com/tiagofumo/vim-nerdtree-syntax-highlight