1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 15:18:01 +00:00

Add Alternate Files With vim-rails as a vim til.

This commit is contained in:
jbranchaud
2015-08-19 22:14:33 -05:00
parent e14360d502
commit a4eed99f92
2 changed files with 12 additions and 0 deletions

View File

@@ -143,6 +143,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
### vim
- [Alternate Files With vim-rails](vim/alternate-files-with-vim-rails.md)
- [The Black Hole Register](vim/the-black-hole-register.md)
- [Buffer Time Travel](vim/buffer-time-travel.md)
- [Check Your Current Color Scheme](vim/check-your-current-color-scheme.md)

View File

@@ -0,0 +1,11 @@
# Alternate Files With vim-rails
If you are doing a good job of testing all the code you write in a rails
project, then most of your code files should be paired with test (or spec)
files. You can think of these as alternate files. The alternate file of
`user.rb` is `user_spec.rb` and vice versa.
The [`vim-rails`](https://github.com/tpope/vim-rails) plugin makes it easy
to jump back and forth between alternate files. Enter `:A` and you will go
to the alternate file of the current file. This makes a common navigation
path for rails projects all the more efficient.