tpope / vim-rails

rails.vim: Ruby on Rails power tools
http://www.vim.org/scripts/script.php?script_id=1567
4.1k stars 383 forks source link

Could gf create new file instead of error that it does not exist? #575

Closed jdsutherland closed 3 years ago

jdsutherland commented 3 years ago

Use case: adding a new controller without generator from routes.rb:

resources(:sold_out_concerts) # gf => E345: Can't find file "sold_out_concerts_controller.rb" in path

If gf could be configured to create the file, this would save some keystrokes. Looking at https://github.com/tpope/vim-rails/issues/503, perhaps :set confirm could be the option?

tpope commented 3 years ago

gf is way more liberal about where it can jump than even alternates is. It can edit files inside gems for example. I think this is a non-starter.