Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colors in terminal? #49

Closed
cj opened this issue May 12, 2015 · 6 comments
Closed

colors in terminal? #49

cj opened this issue May 12, 2015 · 6 comments
Milestone

Comments

@cj
Copy link
Contributor

cj commented May 12, 2015

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

@cj
Copy link
Contributor Author

cj commented May 12, 2015

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

@ryanoasis
Copy link
Owner

@cj can you try FileType instead of filetype?

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

@cj
Copy link
Contributor Author

cj commented May 13, 2015

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

@cj
Copy link
Contributor Author

cj commented May 13, 2015

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

@cj
Copy link
Contributor Author

cj commented May 13, 2015

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')

@ryanoasis
Copy link
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!

@ryanoasis ryanoasis modified the milestone: v0.4.2 May 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants