私はVimを使用しています。ファイルタイプを以下のように設定したいと思います。
autocmd BufNewFile,BufRead *_controller.rb set ft=rails syntax=ruby
しかし、現在のファイルディレクトリの例に依存します。開いた場合、次の/code/project/app/model/somefile.rb
ように設定filetype
します。model
今のところ私は使用してautocmd BufNewFile,BufRead */app/models/*.rb set ft=model syntax=ruby
いますが、多分より良いオプションです。