RubyMine 2016.3 Help

Part 1. Finding a File, Class or Symbol by Name

On this page:

Preparing an example

Add a Ruby file to your project and create some source code in it. For example:

/help/img/idea/2016.3/rm_goto_file_example.png

Navigate to file/class/symbol

This is one of the most powerful RubyMine's navigation and search features that enables you to find actually any file, class or symbol by its name, and jump directly to it. This is how it's done.

Navigate to file

Press Ctrl+Shift+N, and type d in the pop-up window that opens:

/help/img/idea/2016.3/rm_goto_file.png

Note that you have to select All in the list of filters (icon /help/img/idea/2016.3/filter.png).

Navigate to class

Next, let's jump to a specific class. To achieve this goal, press Ctrl+N, and type, for example, *o (* is a mask for any amount of any characters.) The suggestion list shows all classes with the letter o somewhere inside their names. Note that each class is followed by its fully qualified path:

/help/img/idea/2016.3/rm_goto_class.png

Select Foo from the topLevelDir in the suggestion ist, and press Enter. This time, the file opens with the caret at the class declaration:

/help/img/idea/2016.3/rm_goto_class_1.png

Navigate to symbol

Next, let's jump to a certain member of a class. Press Ctrl+Shift+Alt+N, and type *o again.

/help/img/idea/2016.3/rm_goto_symbol.png

From the suggestion list, select o1 and press Enter. The file deeplyBuriedFile.py opens at the method declaration:

/help/img/idea/2016.3/rm_goto_symbol_1.png

Using additional controls

You might have noticed the additional controls in the pop-up windows.

First, you can show files, classes or symbols which reside outside of the current project. To show an extended suggestion list, select the check box Include non-project files/classes/symbols, or press the corresponding shortcut once more. Compare the suggestion list of classes within your project with the suggestion list that includes classes from the external libraries:

/help/img/idea/2016.3/rm_goto_file_extended.png

Next, click the pin (/help/img/idea/2016.3/pin_small.png) to show all the matching entries in a separate view of the Find tool window.

/help/img/idea/2016.3/rm_find_file_tw.png

Finally, you can click the funnel icon /help/img/idea/2016.3/filter.png to narrow down the suggestion list to show only the entries belonging to the specified file types:

/help/img/idea/2016.3/rm_goto_file_filter.png

Summary

This brief tutorial is over. You have mastered finding any file, class or symbol by its name, and navigating to it. In the next tutorial, we'll explore navigating to a class or symbol declaration and implementation, and using the gutter icons to jump to an overriding/implementing class or symbol.

See Also

Last modified: 22 March 2017