tpope/vim-rails — Issue #135: Option to create alternate file if it doesn't exist
Author: henrik
Created: 2011-12-06 14:14:25+00:00
State: open

It's a bit of a chore to create the alternate file (typically the spec for a model or helper) if you didn't use a generator.

It would be neat if Rails.vim had some way to do this. Perhaps :A! to jump to alternate file and create it, or prompt to create it, if not there? Or perhaps it should always prompt for that?

An argument against is if you accidentally mix up :R and :A (I do every so often) and it creates files you don't want. But if it would prompt, or would take an exclamation mark, that would probably be good enough. So you do :A, it says "no such file", you do :A! instead.

Similarly for :R, I suppose, to create views.