Vundle, the plug-in manager for Vim
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.

119 lines
2.6 KiB

13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
13 years ago
  1. " vim -gu test/vimrc
  2. set nocompatible
  3. syntax on
  4. silent exec 'e '.expand('<sfile>')
  5. let branch = split(filter(split(system('git branch'),'\n'),'v:val[0]=="*"')[0],'\s\+')[1]
  6. let root = '/tmp/'.branch.'/vundle_bundles'
  7. "let src = 'http://github.com/gmarik/vundle.git'
  8. let src = '~/.vim/bundle/vundle/.git'
  9. if !isdirectory(expand(root).'/vundle')
  10. exec '!git clone '.src.' '.root.'/vundle'
  11. endif
  12. runtime macros/matchit.vim
  13. exec 'set rtp+='.root.'/vundle'
  14. call vundle#rc(root)
  15. " Vundle manages Vunlde
  16. Bundle 'gmarik/vundle'
  17. " vim-scripts name
  18. Bundle 'molokai'
  19. " github username with dashes
  20. Bundle 'vim-scripts/ragtag.vim'
  21. " original repo
  22. Bundle 'altercation/vim-colors-solarized'
  23. " with extension
  24. Bundle 'nelstrom/vim-mac-classic-theme.git'
  25. " full uri
  26. Bundle 'https://github.com/vim-scripts/vim-game-of-life'
  27. " full uri
  28. Bundle 'git@github.com:gmarik/ingretu.git'
  29. " short uri
  30. Bundle 'gh:gmarik/snipmate.vim.git'
  31. Bundle 'github:mattn/gist-vim.git'
  32. " local uri stuff
  33. Bundle '~/Dropbox/.gitrepos/utilz.vim.git'
  34. " Bundle 'file://Dropbox/.gitrepos/utilz.vim.git'
  35. " with options
  36. Bundle 'rstacruz/sparkup.git', {'rtp': 'vim/'}
  37. " Camel case
  38. Bundle 'vim-scripts/RubySinatra'
  39. " PostInstall
  40. Bundle 'wincent/Command-T'
  41. Bundle 'CSS3-Highlights'
  42. augroup user#css3-highlights
  43. au!
  44. au User BundleInstallPre ! [ -d .git ] && git reset --hard
  45. au User BundleInstallPost ! vim **/*.vim +'bufdo set fileformat=unix | wall | qall'
  46. augroup end
  47. " NOSYNC
  48. " existing directory
  49. Bundle! root.'/vundle/test/'
  50. " just create one
  51. Bundle! 'a_plugin'
  52. "
  53. " just create one, and override name
  54. Bundle! 'b_plugin', {'name': 'zzz'}
  55. filetype plugin indent on " Automatically detect file types.
  56. set wildignore+=doc " should not break helptags
  57. set wildignore+=.git " should not break clone
  58. augroup vimrc
  59. au WinEnter * call Test()
  60. augroup END
  61. func! Test() abort
  62. if 'ok' != g:vundle_test_plugin()
  63. throw 'ooops'
  64. endif
  65. call Assert_bundles()
  66. call Assert_a_bundle()
  67. call Assert_b_bundle()
  68. endf
  69. func! Assert(cond, msg)
  70. if !(a:cond)
  71. throw a:msg
  72. endif
  73. endf
  74. func! Assert_bundles() abort
  75. for b in g:vundle#bundles
  76. call Assert(b.nosync() || b.installed(), b.name.' not installed')
  77. endfor
  78. endf
  79. func! Assert_a_bundle() abort
  80. let b = filter(copy(g:vundle#bundles), 'v:val.name == "a_plugin"')[0]
  81. let c = (b.path() == expand(g:vundle#bundle_dir.'/'.'a_plugin'))
  82. call Assert(c, b.name.' isnt instaled')
  83. endf
  84. func! Assert_b_bundle() abort
  85. let b = filter(copy(g:vundle#bundles), 'v:val.name == "zzz"')[0]
  86. let c = (b.path() == expand(g:vundle#bundle_dir.'/'.'zzz'))
  87. call Assert(c, b.name.' isnt instaled')
  88. endf