RubyMine’s powerful “Go to file” command allows you to quickly jump to a particular file in a project. This is a great way to get started, but a development session often ends up being confined to a small set of files and directories. It’s inefficient to constantly search project-wide. Instead, use RubyMine’s convenient inline navigation bar to find nearby files. In this post, we’ll take a look at it on OS X.
Navigation Bar Basics
Open the navigation bar with
command + Up.
Navigate the navigation bar with the arrow keys or
control + N and
control + P. If you know the name of the file or directory you’re looking for, start typing it to find it via search.
This search bar supports many of the same fuzzy search features available in “Go to file”,
command + shift + O.
The navigation bar can also be permanently docked. Use “Find Action”,
command + shift + A, then search for “Navigation Bar”.
File management commands available in the Project tool window also work in the navigation bar.
command + N– create a new file or directory
F5– copy a file or directory
shift + F5– clone a file or directory
F6– move a file or directory
shift + F6– rename a file or directory
delete– delete a file or directory
Performing these commands from the inline navigation bar minimizes context switching. It also avoids wasting screen space on the Project tool window.
Preview files from the navigation bar with “Quick Definition”,
option + spacebar.
Development of a particular feature or bug fix is often localized to a set of code and test files. An effective strategy is to find a known initial file with “Go to file”,
command + shift + O, then work with and manage nearby related files and directories with the navigation bar. The navigation bar becomes a sort of local “Go to file” command.