Not only can we create database migrations with vim-rails, it’s faster than using a generator. I counted the steps today and realized I was wasting precious keystrokes by underutilizing this great plugin.
Here’s how I was setting up a migration:
- Generate the migration:
$ rails g migration add_diameter_to_wheels
- Load the migration in Vim with
Here’s my improved method:
- Generate a migration (in Vim) with
Less steps and characters, and best of all, we never have to leave Vim.
h/t Chris ErinTweet