Skip to content

Instantly share code, notes, and snippets.

@sdougbrown
Created September 26, 2016 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sdougbrown/1c4fed00df953d049730370893f98b7b to your computer and use it in GitHub Desktop.
Save sdougbrown/1c4fed00df953d049730370893f98b7b to your computer and use it in GitHub Desktop.
vim NERDtree flattown
" Open NERD tree
map <C-g> :NERDTreeToggle<CR>
" 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
" purple
call NERDTreeHighlightFile('exs', '098', 'none', '#9E6FCE', '#26292c')
call NERDTreeHighlightFile('ex', '098', 'none', '#9E6FCE', '#26292c')
" green
call NERDTreeHighlightFile('jade', '034', 'none', '#61AE63', '#26292c')
call NERDTreeHighlightFile('hbs', '034', 'none', '#61AE63', '#26292c')
call NERDTreeHighlightFile('md', '034', 'none', '#61AE63', '#26292c')
" light green
call NERDTreeHighlightFile('html', '076', 'none', '#AAD364', '#26292c')
call NERDTreeHighlightFile('eex', '076', 'none', '#AAD364', '#26292c')
call NERDTreeHighlightFile('vue', '076', 'none', '#AAD364', '#26292c')
" dark green
call NERDTreeHighlightFile('php', '028', 'none', '#65AE63', '#26292c')
call NERDTreeHighlightFile('pl', '028', 'none', '#65AE63', '#26292c')
call NERDTreeHighlightFile('py', '028', 'none', '#65AE63', '#26292c')
" gold
call NERDTreeHighlightFile('config', '220', 'none', '#FED04E', '#26292c')
call NERDTreeHighlightFile('conf', '220', 'none', '#FED04E', '#26292c')
call NERDTreeHighlightFile('json', '220', 'none', '#FED04E', '#26292c')
call NERDTreeHighlightFile('ini', '220', 'none', '#FED04E', '#26292c')
call NERDTreeHighlightFile('yml', '220', 'none', '#FED04E', '#26292c')
" orange
call NERDTreeHighlightFile('scss', '214', 'none', '#F68838', '#26292c')
call NERDTreeHighlightFile('sass', '214', 'none', '#F68838', '#26292c')
call NERDTreeHighlightFile('styl', '214', 'none', '#F68838', '#26292c')
call NERDTreeHighlightFile('css', '214', 'none', '#F68838', '#26292c')
" cyan
call NERDTreeHighlightFile('coffee', '081', 'none', '#86C1E6', '#26292c')
call NERDTreeHighlightFile('ts', '081', 'none', '#86C1E6', '#26292c')
call NERDTreeHighlightFile('js', '081', 'none', '#86C1E6', '#26292c')
call NERDTreeHighlightFile('go', '081', 'none', '#86C1E6', '#26292c')
" red
call NERDTreeHighlightFile('xml', '160', 'none', '#D02A22', '#26292c')
call NERDTreeHighlightFile('svg', '160', 'none', '#D02A22', '#26292c')
" pink
call NERDTreeHighlightFile('rb', '168', 'none', '#e68590', '#26292c')
" grey
call NERDTreeHighlightFile('DS_Store', '242', 'none', '#6c6c6c', '#26292c')
call NERDTreeHighlightFile('jar', '242', 'none', '#6c6c6c', '#26292c')
call NERDTreeHighlightFile('pkg', '242', 'none', '#6c6c6c', '#26292c')
call NERDTreeHighlightFile('dmg', '242', 'none', '#6c6c6c', '#26292c')
call NERDTreeHighlightFile('zip', '242', 'none', '#6c6c6c', '#26292c')
call NERDTreeHighlightFile('jpg', '242', 'none', '#6c6c6c', '#26292c')
call NERDTreeHighlightFile('png', '242', 'none', '#6c6c6c', '#26292c')
call NERDTreeHighlightFile('gif', '242', 'none', '#6c6c6c', '#26292c')
call NERDTreeHighlightFile('pdf', '242', 'none', '#6c6c6c', '#26292c')
call NERDTreeHighlightFile('swp', '242', 'none', '#6c6c6c', '#26292c')
call NERDTreeHighlightFile('swo', '242', 'none', '#6c6c6c', '#26292c')
call NERDTreeHighlightFile('gz', '242', 'none', '#6c6c6c', '#26292c')
call NERDTreeHighlightFile('xz', '242', 'none', '#6c6c6c', '#26292c')
" silver
call NERDTreeHighlightFile('txt', '251', 'none', '#c6c6c6', '#26292c')
call NERDTreeHighlightFile('log', '251', 'none', '#c6c6c6', '#26292c')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment