Rax
Rax

Reputation: 828

In JetBrains Rider, is there keyboard shortcut to add a new class file?

In JetBrains Rider, is there keyboard shortcut to add a new class file? Perhaps with the same popup to name the C# class, then to save in the currently selected/open directory.

Would save many mouse clicks :-)

Upvotes: 10

Views: 11447

Answers (2)

Pang
Pang

Reputation: 10127

To generate new class file in Rider:

Method 1

  1. In the Solution Explorer, select a node.
  2. Press Alt+Insert | Ctrl+N | ⌘ N.
  3. Choose Class/Interface in the context menu.

Reference

Screenshot

Method 2

  1. In the Code Editor, press Ctrl+Alt+Insert | Ctrl+Shift+A | ⌃ ⌥ N.
  2. Choose Class/Interface in the context menu.

This will add the new file in the same folder as the current file.

Reference

Screenshot

Upvotes: 13

Dmitry Matveev
Dmitry Matveev

Reputation: 361

There is no dedicated shortcut for a new class, but you can select a node in the Solution Explorer, press Alt+Insert, and then pick the desired template from the popup.

Upvotes: 6

Related Questions