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

:Generate tries to edit file with windows newline #556

Closed f1sherman closed 4 years ago

f1sherman commented 4 years ago

Hello! When I use :Generate to create a migration, it tacks a windows newline (^M) on to the end of the file it opens in the editor for some reason. I'm on MacOS. Since I don't see any other reports about this I'm assuming it's just me. Any ideas why this might happen?

Example: :Generate migration MyMigration generates the migration correctly and then edits a file with the name db/migrate/20200425175214_my_migration.rb^M, which does not exist. The generated file itself is fine (no ^M in the filename), it's just the editor that gets the filename wrong.

Thank you!

tpope commented 4 years ago

Weird. Can you try on a brand new Rails project, to make sure some dependency isn't having a strange side effect?

f1sherman commented 4 years ago

@tpope you're right, it must be something with this specific rails app. I tried with a new app on the same machine and it worked just fine. Any ideas where to start looking to track that down? Thank you!

tpope commented 4 years ago

Dependencies!