Guest User

Untitled

a guest
Feb 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. function! DisplayColorSchemes()
  2. let currDir = getcwd()
  3. exec "cd $VIMRUNTIME/colors"
  4. for myCol in split(glob("*"), 'n')
  5. if myCol =~ '.vim'
  6. let mycol = substitute(myCol, '.vim', '', '')
  7. exec "colorscheme " . mycol
  8. exec "redraw!"
  9. echo "colorscheme = ". myCol
  10. sleep 2
  11. endif
  12. endfor
  13. exec "cd " . currDir
  14. endfunction
  15.  
  16. " Returns the list of available color schemes
  17. function! GetColorSchemes()
  18. return uniq(sort(map(
  19. globpath(&runtimepath, "colors/*.vim", 0, 1),
  20. 'fnamemodify(v:val, ":t:r")'
  21. )))
  22. endfunction
  23.  
  24. let s:schemes = GetColorSchemes()
  25. if index(s:schemes, 'solarized') >= 0
  26. colorscheme solarized
  27. elseif index(s:schemes, 'darkblue') >= 0
  28. colorscheme darkblue
  29. endif
  30.  
  31. set wildmenu
  32. set wildmode=list:full
  33. set wildcharm=<C-z>
  34. let mapleader=','
  35. nnoremap <leader>c :colorscheme <C-z><S-Tab>
  36.  
  37. blue.vim
  38. darkblue.vim
  39. default.vim
  40. delek.vim
  41. desert.vim
  42. elflord.vim
  43. evening.vim
  44. industry.vim
  45. koehler.vim
  46. morning.vim
  47. murphy.vim
  48. pablo.vim
  49. peachpuff.vim
  50. ron.vim
  51. shine.vim
  52. slate.vim
  53. torte.vim
  54. zellner.vim
Add Comment
Please, Sign In to add comment