JetBrains Rider 2019.2 Help

Cutting, Copying and Pasting

JetBrains Rider provides a number of handy clipboard operations. You can copy, cut, and paste selected text, a path to a file, a reference to a symbol or a line of code. When pasting, you can optionally choose items from clipboard history and automatically apply formatting rules.

Cut selection

  • From the main menu, choose Edit | Cut.

  • Press Ctrl+X.

  • Click Cut Cut on the toolbar.

Copy selection

  • From the main menu, choose Edit | Copy.

  • Press Ctrl+C.

  • Click Copy Copy on the toolbar.

Copy the path to a file or folder

  1. Open the desired file in the editor or select one or more files or folders in the Solution Explorer.

  2. Do one of the following:

    • Press Ctrl+Shift+C.

    • Right-click the selection in the Solution explorer or right-click a file tab in the editor and choose Copy Path(s) from the context menu.

    • Choose Edit | Copy Path from the main menu.

  3. If you want to copy a path relative to the solution instead of the absolute path, Right-click a file tab in the editor and choose Copy Relative Path from the context menu.

Copy the reference to a line or a symbol

  1. Place the caret at the desired symbol or at a certain line of code.

  2. Do one of the following:

    • Press Ctrl+Shift+Alt+C.

    • From the main menu, choose Edit | Copy Reference.

    • From the context menu, choose Copy Reference.

    JetBrains Rider creates a string in the format that depends on the caret position. Lines are referenced by the file system path relative to the solution and the line number, symbols are referenced by their Fully Qualified Name (FQN). For example:

    System.Web.Mvc.ActionResult for a type or WebApplication1\Controllers\HomeController.cs : 21 for a code line. When your caret is on a type, you will also be able to choose alternative references from a popup:

    JetBrains Rider: Copy reference popup

Copy editor tooltip contents

  1. Hover the mouse pointer over a symbol in the editor to see the full symbol name and its description if available.

  2. Hold Alt (on Linux, hold Ctrl+Alt) and click the tooltip.

When pasting C# and VB.NET code from the clipboard, JetBrains Rider behaves depending on the state of the Auto-format on paste selector on the Editor | General | Typing Assistance page of JetBrains Rider settings Ctrl+Alt+S.

This selector lets you configure whether to apply code formatting rules for pasted code. By default, JetBrains Rider only applies indentation settings when you paste code, which is a convenient option if you do not want to follow formatting rules very strictly.

Paste the last clipboard entry at the current caret position

  • Press Ctrl+V.

  • From the main menu, choose Edit | Paste.

  • Click Paste Paste on the toolbar.

Alternatively to pasting with the selected formatting preference, you can insert the clipboard entry as a plain text.

Paste the last clipboard entry as plain text

  • Press Ctrl+Shift+Alt+V.

  • From the main menu, choose Edit | Paste Simple.

You can also access your clipboard history and quickly paste any of the recent items copied to the clipboard. JetBrains Rider starts recording copied items to its clipboard history as soon as you start it and clears the history when you close it. The number of clipboard history entries is customizable with the Maximum number of contents to keep in clipboard preference on the Editor | General page of JetBrains Rider settings Ctrl+Alt+S. When the specified number is exceeded, the oldest entry is removed from the history.

Paste specific entry from the clipboard history

  1. Press Ctrl+Shift+V or choose Edit | Paste from History from the main menu.

  2. In the Choose Content to Paste dialog, you can choose one of the recent clipboard entries and preview it.

  3. Click Paste or Pate without formatting to paste the desired entry in a corresponding way. Alternatively, press a mnemonic key displayed next to the desired entry to quickly insert it.

    JetBrains Rider: Choose Content to Paste dialog

Last modified: 19 September 2019