Scratch files in Visual Studio 2022

Viewed 174

I recently started C# using Visual Studio 2022 after spending some time with Idea and Java. I am missing the feature of scratch files as it existed in Intellij Idea.

It basically allowed us to run code snippets in our IDE, which were independent of our currently open project, and these snippets were available in all other projects.

A friend suggested dotnetfiddle.net but that means I have to leave the IDE and also code is not available in the future for me to refer to.

Please suggest.

1 Answers

Look at Scratchpads plugin here: https://marketplace.visualstudio.com/items?itemName=buenon.scratchpads

  1. Run Command Palette Ctrl + Shift + P
  2. Create new file command: Scratchpads: New scratchpad
  3. Choose file type and enjoy scratch file
  4. To open closed scratch files: run command Scratchpads: Open scratchpad

Some features form README:

Scratchpads README
  Create multiple scratchpad files for doodling while you're coding.

Highlights
  Create multiple scratchpads
  Create scratchpads of different languages and file types
  Enjoy VSCode intellisense in your scratchpads
  Scratchpad are not interfering your project and can be removed at any time
Related