Skip to content

jemmyw/vscode-rails-fast-nav

Repository files navigation

Rails Fast Nav Test status

Commands to move between files in a Rails application.

Features

  • Navigate to all known files (alt+r) [command.railsFastNavigation]
  • Switch to model [command.railsFastSwitchToModel]
  • Switch to controller [command.railsSwitchToController]
  • Switch to view from controllers and mailers [command.railsFastSwitchToView]
  • Switch to test/spec [command.railsFastSwitchToTest] + alias [command.railsFastSwitchToSpec]
  • Switch to fixture [command.railsFastSwitchToFixture]
  • Switch to factory [command.railsFastSwitchToFactory]
  • Create View [command.railsCreateView]
  • Create Spec [command.railsCreateSpec]
  • Create Factory [command.railsCreateFactory]

Screenshot

Example

Configuration

Set the Rails app directory if you have a non-standard directory layout:

"rails.appDir": "lib/app"

Change the default view extension from html.erb:

"rails.viewFileExtension": "json.jbuilder"

Multiple app roots (Packwerk, Rails engines)

For repositories with several app directories (Packwerk packs, Rails engines, or custom components), set rails.appDirs to glob patterns relative to the Rails root. When rails.appDirs is empty or omitted, only rails.appDir is used (default app).

"rails.appDirs": ["app", "packs/*/app", "engines/*/app"]

Navigation picks the longest matching app root for the current file, so files under packs/billing/app/... resolve specs and views next to packs/billing/spec/ when that folder exists.

About

vscode extension for navigating Ruby on Rails projects

Resources

License

Stars

45 stars

Watchers

2 watching

Forks

Sponsor this project

 

Packages

 
 
 

Contributors