Rails File Switcher plugin for Sublime Text 2 Jan 14, 2013

I've recently released a plugin for Sublime Text 2 called Rails File Switcher. It allows you to quickly switch between Models, Controllers and Views in your Rails application.

The plugin provides you with the following 3 commands:

open_related_rails_model — switches to Post model from PostsController or posts/index view.

— switches to model from or view. open_related_rails_controller — switches to PostsController from Post model or posts/index view.

— switches to from model or view. open_related_rails_view — switches to posts/index view from PostsController when the cursor is inside the index action.

The plugin does not create any key bindings automatically, it's up to you to add them. My personal preference is to bind them to super + 1|2|3 , but you can do whatever you want.

Go to Preferences > Key Bindings - User and add:

{ "keys" : [ "super+1" ], "command" : "open_related_rails_model" } , { "keys" : [ "super+2" ], "command" : "open_related_rails_controller" } , { "keys" : [ "super+3" ], "command" : "open_related_rails_view" } ,

You can install the plugin through Package Control, just search for Rails File Switcher .

RailsFileSwitcher is in alpha, so if something is not working correctly, create in issue on Github.

You're the 9813th person to read this article.