Use vim-rails
Map key F11, F12 to buffer change
Trim last space when the file save