Skip to content

Instantly share code, notes, and snippets.

Created Jan 13, 2013
What would you like to do?
" Unite-rails.vim
function! UniteRailsSetting()
nnoremap <buffer><C-H><C-H><C-H> :<C-U>Unite rails/view<CR>
nnoremap <buffer><C-H><C-H> :<C-U>Unite rails/model<CR>
nnoremap <buffer><C-H> :<C-U>Unite rails/controller<CR>
nnoremap <buffer><C-H>c :<C-U>Unite rails/config<CR>
nnoremap <buffer><C-H>s :<C-U>Unite rails/spec<CR>
nnoremap <buffer><C-H>m :<C-U>Unite rails/db -input=migrate<CR>
nnoremap <buffer><C-H>l :<C-U>Unite rails/lib<CR>
nnoremap <buffer><expr><C-H>g ':e '.b:rails_root.'/Gemfile<CR>'
nnoremap <buffer><expr><C-H>r ':e '.b:rails_root.'/config/routes.rb<CR>'
nnoremap <buffer><expr><C-H>se ':e '.b:rails_root.'/db/seeds.rb<CR>'
nnoremap <buffer><C-H>ra :<C-U>Unite rails/rake<CR>
nnoremap <buffer><C-H>h :<C-U>Unite rails/heroku<CR>
aug MyAutoCmd
au User Rails call UniteRailsSetting()
aug END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment