Browse Source

Add projections for some of my commonly used gems

Andrew Swistak 11 years ago
parent
commit
3a87d14df9
3 changed files with 52 additions and 1 deletions
  1. 4 0
      .gitmodules
  2. 1 0
      vim/bundle/vim-bundler
  3. 47 1
      vimrc

+ 4 - 0
.gitmodules

@@ -86,3 +86,7 @@
 	path = vim/bundle/ack.vim
 	url = https://github.com/mileszs/ack.vim.git
   ignore = dirty
+[submodule "vim/bundle/vim-bundler"]
+	path = vim/bundle/vim-bundler
+	url = https://github.com/tpope/vim-bundler.git
+  ignore = dirty

+ 1 - 0
vim/bundle/vim-bundler

@@ -0,0 +1 @@
+Subproject commit 37096dbdcb84d89b17e6706f3e4e84da3c2a2990

+ 47 - 1
vimrc

@@ -203,7 +203,53 @@ let g:LatexBox_latexmk_options = "-pvc -pdfps"
 autocmd FileType tex setlocal spell spelllang=en_us
 
 """""""""""""""""""""""""""""""""""""""""
-" Tex Settings
+" Rails.vim
+"""""""""""""""""""""""""""""""""""""""""
+
+let g:rails_gem_projections = {
+      \   "fabrication": {
+      \     "spec/fabricators/*_fabricator.rb": {
+      \       "command": "fabricator",
+      \       "affinity": "model",
+      \       "alternate": "app/models/%s.rb",
+      \       "related": "db/schema.rb#%p",
+      \       "test": "spec/models/%s_spec.rb",
+      \       "template": "Fabricator :%s do\nend",
+      \       "keywords": "Fabricate Fabricator sequence"
+      \     }
+      \   },
+      \   "factory_girl_rails": {
+      \     "spec/factories/*.rb": {
+      \       "command": "factory",
+      \       "affinity": "collection",
+      \       "alternate": "app/models/%i.rb",
+      \       "related": "db/schema.rb#%s",
+      \       "test": "spec/models/%i_spec.rb",
+      \       "template": "FactoryGirl.define do\n  factory :%i do\n  end\nend",
+      \       "keywords": "factory sequence"
+      \     }
+      \   },
+      \   "factory_girl": {
+      \     "spec/factories/*.rb": {
+      \       "command": "factory",
+      \       "affinity": "collection",
+      \       "alternate": "app/models/%i.rb",
+      \       "related": "db/schema.rb#%s",
+      \       "test": "spec/models/%i_spec.rb",
+      \       "template": "FactoryGirl.define do\n  factory :%i do\n  end\nend",
+      \       "keywords": "factory sequence"
+      \     }
+      \   },
+      \   "cucumber-rails": {
+      \     "features/*.feature": {
+      \       "command": "feature",
+      \       "template": "Feature: \n\n  Scenario: " ,
+      \     }
+      \   }
+      \ }
+
+"""""""""""""""""""""""""""""""""""""""""
+" YCM Settings
 """""""""""""""""""""""""""""""""""""""""
 
 let g:ycm_register_as_syntastic_checker = 0