0

In JetBrains IntelliJ, one can write just sout and the IDE write System.out.println(); I know that C# can be used in different types of projects.

  • Some projects require printing things in console and thus we need to print things like Console.WriteLine();
  • Some other projects require printing using ILogger like log.LogInformation();
  • ... etc.

First, I wonder if there is something similar to IntelliJ print shortcut in JetBrains Rider? Then, is there a way to program this shortcut or change this shortcut manually so that it use the suitable print command for the project I work on?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
ibda
  • 376
  • 3
  • 15
  • To verify if a certain feature exists or not, you can contact JetBrains directly https://youtrack.jetbrains.com/issues/RIDER – Lex Li Sep 19 '22 at 22:27
  • 1
    This is called Live Templates. You can make your own abbreviations if they do not exist that will expand into the desired text (e.g. `cwl` for `Console.WriteLine();`, `log` for `log.LogInformation()`) etc.) 1) https://www.jetbrains.com/help/rider/Using_Live_Templates.html 2) https://www.jetbrains.com/help/rider/Templates_Rider.html – LazyOne Sep 19 '22 at 23:39
  • 1
    Use `cw` for `Console.WriteLine()` in Rider. See [the doc](https://www.jetbrains.com/help/rider/Reference__Templates_Explorer__Live_Templates_CSHARP.html#Live_cw_CSHARP). – Pang Sep 22 '22 at 02:03

0 Answers0