my configs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

48 lines
2.1 KiB

  1. scriptencoding utf-8
  2. augroup NERDTree
  3. au!
  4. au StdinReadPre * let s:std_in=1
  5. au VimEnter *
  6. \ if !argc() && !exists('s:std_in')
  7. \ | Startify
  8. \ | NERDTree
  9. \ | wincmd w
  10. \ | else
  11. \ | NERDTree
  12. \ | wincmd w
  13. \ | endif
  14. au bufenter * if (winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree()) | q | endif
  15. augroup END
  16. map <C-n> :NERDTreeToggle<CR>
  17. let g:NERDTreeDirArrowExpandable = '▸'
  18. let g:NERDTreeDirArrowCollapsible = '▾'
  19. let g:NERDTreeGitStatusIndicatorMapCustom = {
  20. \ 'Modified' : '✹',
  21. \ 'Staged' : '✚',
  22. \ 'Untracked' : '✭',
  23. \ 'Renamed' : '➜',
  24. \ 'Unmerged' : '═',
  25. \ 'Deleted' : '✖',
  26. \ 'Dirty' : '✗',
  27. \ 'Clean' : '✔︎',
  28. \ 'Unknown' : '?'
  29. \ }
  30. " NERDTress File highlighting
  31. function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg)
  32. exec 'autocmd filetype nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg
  33. exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#'
  34. endfunction
  35. call NERDTreeHighlightFile('jade' , 'green' , 'none' , 'green' , '#151515')
  36. call NERDTreeHighlightFile('ini' , 'yellow' , 'none' , 'yellow' , '#151515')
  37. call NERDTreeHighlightFile('md' , 'blue' , 'none' , '#3366FF' , '#151515')
  38. call NERDTreeHighlightFile('yml' , 'yellow' , 'none' , 'yellow' , '#151515')
  39. call NERDTreeHighlightFile('config' , 'yellow' , 'none' , 'yellow' , '#151515')
  40. call NERDTreeHighlightFile('conf' , 'yellow' , 'none' , 'yellow' , '#151515')
  41. call NERDTreeHighlightFile('json' , 'yellow' , 'none' , 'yellow' , '#151515')
  42. call NERDTreeHighlightFile('html' , 'yellow' , 'none' , 'yellow' , '#151515')
  43. call NERDTreeHighlightFile('styl' , 'cyan' , 'none' , 'cyan' , '#151515')
  44. call NERDTreeHighlightFile('css' , 'cyan' , 'none' , 'cyan' , '#151515')
  45. call NERDTreeHighlightFile('coffee' , 'Red' , 'none' , 'red' , '#151515')
  46. call NERDTreeHighlightFile('js' , 'Red' , 'none' , '#ffa500' , '#151515')
  47. call NERDTreeHighlightFile('php' , 'Magenta' , 'none' , '#ff00ff' , '#151515')