Skip to content

colors in terminal? #49

Closed
Closed

Description

@cj

First off, thanks for this plugin! Question, is there something special I have to do to enable colors per file type?

Activity

  1. cj commented on May 12, 2015

    @cj
    ContributorAuthor

    forgot to mention, I've included your version of preservim/nerdtree#201 (comment)

  2. ryanoasis commented on May 13, 2015

    @ryanoasis
    Owner

    @cj can you try FileType instead of filetype?

    see @nbicalcarata comment on preservim/nerdtree#433 (comment)

  3. cj commented on May 13, 2015

    @cj
    ContributorAuthor

    @ryanoasis still no luck changing it to FileType. I'm not getting any errors either...

  4. cj commented on May 13, 2015

    @cj
    ContributorAuthor

    Here's my vim config github.com/cj/vimrc

  5. cj commented on May 13, 2015

    @cj
    ContributorAuthor

    doing this seems to make it work:

    " NERDTress File highlighting
    function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg)
    exec 'autocmd FileType nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg
    exec 'autocmd FileType nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#'
    endfunction
    
    au VimEnter * call NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#151515')
    au VimEnter * call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#151515')
    au VimEnter * call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#151515')
    au VimEnter * call NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#151515')
    au VimEnter * call NERDTreeHighlightFile('config', 'yellow', 'none', 'yellow', '#151515')
    au VimEnter * call NERDTreeHighlightFile('conf', 'yellow', 'none', 'yellow', '#151515')
    au VimEnter * call NERDTreeHighlightFile('json', 'yellow', 'none', 'yellow', '#151515')
    au VimEnter * call NERDTreeHighlightFile('html', 'yellow', 'none', 'yellow', '#151515')
    au VimEnter * call NERDTreeHighlightFile('styl', 'cyan', 'none', 'cyan', '#151515')
    au VimEnter * call NERDTreeHighlightFile('css', 'cyan', 'none', 'cyan', '#151515')
    au VimEnter * call NERDTreeHighlightFile('coffee', 'Red', 'none', 'red', '#151515')
    au VimEnter * call NERDTreeHighlightFile('js', 'Red', 'none', '#ffa500', '#151515')
    au VimEnter * call NERDTreeHighlightFile('rb', 'Red', 'none', '#ffa500', '#151515')
    au VimEnter * call NERDTreeHighlightFile('php', 'Magenta', 'none', '#ff00ff', '#151515')
    
  6. ryanoasis commented on May 16, 2015

    @ryanoasis
    Owner

    That's strange but I guess you got it working. for now I will reference your fix in the FAQ and close this issue when I have pushed it up. Thanks!

  7. modified the milestone: v0.4.2 on May 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions