1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-04 23:58:01 +00:00

Add Generate and Edit Rails Migration to vim til.

This commit is contained in:
jbranchaud
2015-02-22 09:46:38 -06:00
parent 0225387c1d
commit 5e2d10cc8b
2 changed files with 16 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ I shamelessly stole this idea from
## vim
- [Generate and Edit Rails Migration](vim/generate-and-edit-rails-migration.md)
- [Head of File Name](vim/head-of-file-name.md)
- [Preview Buffer](vim/previous-buffer.md)
- [Quick File Info](quick-file-info.md)

View File

@@ -0,0 +1,15 @@
# Generate and Edit Rails Migration
Creating a new Rails migration has always involved two distinct steps for
me. The first is to run `rails g migration CreateSomeTable` to create a
migration file. The second is to copy and paste the migration's filename
after `vi` to actually start editing it.
[Rails.vim](https://github.com/tpope/vim-rails) collapses these steps into
one:
```
:Rgenerate migration CreateSomeTable
```
[source](http://stackoverflow.com/questions/7857177/with-vim-rails-can-you-create-a-new-migration-file-and-open-it-in-one-go)