Skip to content

Instantly share code, notes, and snippets.

@alpaca-tc
Created Jan 13, 2013
Embed
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>
endfunction
aug MyAutoCmd
au User Rails call SetUpRailsSetting()
aug END
aug RailsDictSetting
au!
aug END
"}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment