What’s New in RubyMine 2021.2

New features for working with Ruby and RBS, better code completion, search and refactoring, improvements for the editor, VCS support, Space, Code With Me, and more.

Ruby and RBS

Smarter search and refactoring

Smarter search and refactoring

Go to declaration, Find usages, and Rename refactoring all now work more precisely for projects using RBS. RubyMine relies on .rbs declarations to define how project entities relate to each other instead of showing all potential usages.

Navigation between Ruby and RBS

Navigation between Ruby and RBS

You can now navigate between the corresponding .rb and .rbs files using new navigation actions. Right-click a project entity, like a class or a method, and select Go to / Type Signature | Associated Declaration. You can also use the Ctrl+Alt+Home shortcut.

Improved Ruby code assistance

Improved Ruby code assistance

RubyMine uses RBS signatures to determine the types of Ruby elements and to provide more relevant code completion. RubyMine now supports most of the existing RBS entities, including type variables, block parameters, tuple types, proc types, and more.

For parts of the code that do not have a related RBS type signature, RubyMine will still use its own type inference.

New inspections

New inspections

Access to information stored in .rbs files enables RubyMine to check Ruby code for more potential errors. RubyMine will show a type error if there’s a mismatch between the RBS and Ruby code. This version also adds new inspections for .rbs files themselves, including for incorrect code and unresolved references. RubyMine also supports running Steep commands using Run anything.

Improved RBS editing

Improved RBS editing

This version comes with all the essential features that make RBS code easier to read: syntax highlighting, formatting, automatic indentation, code folding, structure view, and commenting with the Ctrl+/ shortcut.

Code assistance for RBS files

Code assistance for RBS files

RubyMine now provides code assistance for working with RBS files: code completion, search for usages, code navigation, rename refactorings, and more. You can also create .rbs prototypes and your own live templates for RBS.

Editor

Updated inspection and quick-fix descriptions

Updated inspection and quick-fix descriptions

We have updated the descriptions for all the inspections and quick-fixes that RubyMine can perform. The updated descriptions explain what changes the inspection suggests and what's the reasoning for them. Some inspections come with examples of usage.

Actions on save

Actions on save

RubyMine now supports performing specific actions when changes are saved, like reformatting the code. You can find all the actions that will be triggered on save under Preferences / Settings | Tools | Actions on Save.

Learn more

Quick creation of scratch files

Quick creation of scratch files

In scratch files, you can make notes or draft code outside of the project context. Starting with this release, you can select some code, press Alt+Enter, and choose Create new scratch file from the selection to quickly create a new scratch file containing that code.

User Experience

Text search in Local History revisions

Text search in Local History revisions

Local History helps you constantly track all changes made to a project independent of version control. In this release, we’ve added search functionality to Local History. Now, if you can remember a couple of keywords from the change you are looking for, you can find it more easily.

Multiple copyright years

Multiple copyright years

You can now include both the project creation year and the current version year in a project’s copyright notice. The updated template that contains both dates is available in Preferences/Settings | Editor | Copyright | Copyright profile.

Advanced Settings

Advanced Settings

We’ve added a new node to Preferences | Settings – Advanced Settings. It contains some options for specific use cases conveniently grouped by IDE tool. For example, settings related to the Project View, Startup, Terminal, and so on.

Browser pages reload on save

Browser pages reload on save

The browsers now can automatically reload the pages when you save the changes you made to the corresponding HTML, CSS, and JavaScript files.

Organize tool windows by drag and drop

Organize tool windows by drag and drop

You can now drag and drop a tool window to the desired place within the main IDE window or in a separate window.

New navigation option in Preferences/Settings

New navigation option in Preferences/Settings

It is now possible to navigate back and forth between open sections in Preferences/Settings. To do so, use the arrows in the right-hand corner of the window.

Debugger

Preview tab in the debugger

Preview tab in the debugger

The preview tab now works for files that open during debugging: these files will appear one by one in a single preview tab. To enable this feature, check the Enable preview tab checkbox in Preferences/Settings | Editor | General | Editor Tabs | Opening Policy.

Terminal

New terminal options

New terminal options

We’ve improved our in-built terminal with two new options: the ability to select the cursor shape and the support for Use Option as Meta key. Both of them are located under Preferences/ Settings | Tools | Terminal.

Version Control

Changes to pre-commit checks

Changes to pre-commit checks

We have added new actions that you can perform before a commit: Run Tests, Analyze code, and Cleanup. The progress and results of all the pre-commit checks appear in the Commit area without disturbing you with additional modal windows.

Learn more

GPG signature

GPG signature

You can now sign your commits with a GPG key to secure them. You can enable this feature via Preferences / Settings | Version Control | Git. If it’s your first time using a GPG key, you’ll need to configure it. To use an existing preconfigured GPG key, you can select it from the drop-down list.

Unified behavior for the Show Diff action

Unified behavior for the Show Diff action

RubyMine now displays the difference between the initial and changed files in the editor. However you invoke the Show Diff action, the IDE will open the diff in the editor by default. If you prefer tracking changes in a separate window, you can drag the desired file from the editor. If you do, the IDE will remember this and will open future diffs in a separate window.

Space

Space job statuses in the Git log

Space job statuses in the Git log

To help you quickly track a job’s progress by just looking at the commits list, we’ve added icons for Space job statuses in the Log tab of the Git tool window. Click on an icon to open a popup with the automation info for that job.

To turn this status information on and off click the eye icon in the Log, and select Show Columns | Space Automation.

Mention teammates in reviews

Mention teammates in reviews

You can now keep your teammates informed by quickly mentioning them in Space reviews right from RubyMine. Type @ followed by the person’s name in the timeline or code comments, and then select them from the list.

Branch display in code reviews

Branch display in code reviews

It is now possible to see the branches related to the selected code review. The Details tab now shows a list of branches that contain the commits made while working on the current issue.

Code With Me

Synchronized code completion

Synchronized code completion

While using Code With Me, you might want to explain a problem or show your team members different parts of your project. You can achieve this with Force Others to Follow You mode. Those who are following you can see the code completion suggestions that you are using.

Web and frameworks

Auto-import for require()

Auto-import for require()

Did you know that your IDE can add missing import statements as you complete ES6 symbols? Now it can do the same for CommonJS modules – require imports will be inserted on code completion.

Rename refactoring for React useState hooks

Rename refactoring for React useState hooks

You will no longer need to waste time on refactoring useState values and functions one by one in React hooks – RubyMine can now rename them for you. To try this out, place the caret on a state value and invoke the Rename refactoring with Shift+F6 or by going to Refactor | Rename from the right-click context menu.

Other improvements

  • It’s easier to code with the enabled screen reader mode on macOS. A list of available suggestions for code completion is now read out loud. We’ve also voiced the content of the selected combo box as well as the combo box lists. The Search Everywhere action results are now properly pronounced.
  • Code analysis works correctly, and highlighting is no longer paused when file system refresh is running.
  • RubyMine now supports running tests with coverage for projects that use SSH and Vagrant in addition to using local Ruby interpreters.
  • RubyMine will automatically clean up any cache and log directories that were last updated more than 180 days ago. This process doesn’t affect the system settings and plugin directories. You can initiate the process manually via Help | Delete Leftover IDE Directories.
  • Now you won’t miss any critical product updates from the JetBrains Toolbox App. RubyMine will inform you if there is a new version available for download and offer to upgrade to it. You’ll need to have JetBrains Toolbox App 1.20.8804 or later for this.
  • We’re continuing to work on improving UI responsiveness and reducing unexpected freezes. For example, we’ve moved certain operations that require indices off of the UI thread, which helped get rid of freezes in other situations.
  • We’ve made the dialog that allows you to change the project icon more straightforward.
  • Starting from this version, you can enjoy the fully localized UI of RubyMine in Chinese, Korean and Japanese. Localization is available as non-bundled language pack plugins, which can be easily installed to your IDE.
  • Default Changelists was the name for the node that stores all uncommitted changes. In v2021.2, we’ve renamed it to Changes to make it more precise and readable. This update will affect all your new projects.
  • RubyMine will no longer add changelists automatically for Git operations. For example, a cherry-pick won’t trigger the creation of a changelist.
  • The oldest version of Git supported by your IDE is now v2.17. We’ve increased the minimum supported version because 2.17 is the oldest version that still receives security updates.
  • Code With Me recently launched two new relay servers, one on the west coast of the US and another one in South Africa. This has made the ping almost three times faster, and it allows teams from those locations to collaborate in their JetBrains IDEs at the speed of thought.
  • You can now quickly turn on the Power Save Mode to help you extend battery life on your laptop. Just right-click on the status bar and select Power Save Mode from the context menu.
  • Code completion now also works for private npm packages.
  • RubyMine now properly supports the TypeScript syntax used within JSDoc comments in .js files.
  • RubyMine now supports popular classnames and clsx libraries, helping you deal with your CSS class names more efficiently.
  • RubyMine will now autocomplete class names and dynamically evaluated className attribute values in your Tailwind CSS components.