在 JetBrains Rider 中,是否有键盘快捷键来添加新的类文件?

Rax*_*Rax 8 rider

在 JetBrains Rider 中,是否有键盘快捷键来添加新的类文件?也许使用相同的弹出窗口来命名 C# 类,然后保存在当前选择/打开的目录中。

会节省很多鼠标点击:-)

Pan*_*ang 12

To generate new class file in Rider:

\n

Method 1

\n
    \n
  1. In the Solution Explorer, select a node.
  2. \n
  3. Press Alt+Insert | Ctrl+N | \xe2\x8c\x98 N.
  4. \n
  5. Choose Class/Interface in the context menu.
  6. \n
\n

Reference

\n

Screenshot

\n

Method 2

\n
    \n
  1. In the Code Editor, press Ctrl+Alt+Insert | Ctrl+Shift+A | \xe2\x8c\x83 \xe2\x8c\xa5 N.
  2. \n
  3. Choose Class/Interface in the context menu.
  4. \n
\n

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

\n

Reference

\n

Screenshot

\n


小智 5

新类没有专用的快捷方式,但您可以在解决方案资源管理器中选择一个节点,按Alt+Insert,然后从弹出窗口中选择所需的模板。