Custom Snippets
The Premium edition also enables your favorite Visual Studio code snippets, plus a dozen unique high-productivity LINQ snippets - as well as any custom snippets that you define:
Hi I´m new as in NEWbie.. Can anybody guide me to a simple step-by-step HowTo on the above statement. For a start I´d love a snippet shortcut "co" that inserts "Console.WriteLine("");" Thanks in advance and happy linqPadding.
Hi I´m new as in NEWbie.. Can anybody guide me to a simple step-by-step HowTo on the above statement. For a start I´d love a snippet shortcut "co" that inserts "Console.WriteLine("");" Thanks in advance and happy linqPadding.
Comments
Name this file co.snippet and put it in either in your Visual Studio snippets folder or in LINQPad's code snippets folder (go to Edit | Preferences to find out or change where this is).
P.S. LINQPad already has a snippet called 'cw' for Console.WriteLine, just as in Visual Studio.
Unfortunately, the favorite Visual Studio Code snippets are only considered from VS 2012/2015/2017, but not 2019.
With aid of Sysinternal's ProcessMonitor I found that LinqPad5 also reads a file
%programFiles%\LinqPad\SnippetLocations.txt
and I did add a line that points to My VS 2019 code snippets, but in vain.So to get my VS 2019 code snippets considered by LinqPad5, I had to copy them from folder
%userprofile%\Documents\Visual Studio 2019\Visual C#\My code snippets
to folder%userprofile%\Documents\Visual Studio 2015\Visual C#\My code snippets
. This solved the problem but you have to synchronize these two folders time by time.Fair point, VS2019 is picked up by LINQPad 6 but not LINQPad 5. I'll update LINQPad 5 to recognize the VS2019 folder as well.