Skip to content

Instantly share code, notes, and snippets.

Created Jan 13, 2013
What would you like to do?
" vim-rails
let g:rails_default_file='config/database.yml'
let g:rails_level = 4
let g:rails_mappings=1
let g:rails_modelines=0
" let g:rails_some_option = 1
" let g:rails_statusline = 1
" let g:rails_subversion=0
" let g:rails_syntax = 1
" let g:rails_url='http://localhost:3000'
" let g:rails_ctags_arguments='--languages=-javascript'
" let g:rails_ctags_arguments = ''
function! SetUpRailsSetting()
nnoremap <buffer><Space>r :R<CR>
nnoremap <buffer><Space>a :A<CR>
nnoremap <buffer><Space>m :Rmodel<Space>
nnoremap <buffer><Space>c :Rcontroller<Space>
nnoremap <buffer><Space>v :Rview<Space>
nnoremap <buffer><Space>p :Rpreview<CR>
aug MyAutoCmd
au User Rails call SetUpRailsSetting()
aug END
aug RailsDictSetting
aug END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment