5

When you add, for example, a class to a project by selecting Add > New Item > Visual C# Items > Class, the blinking text cursor inside the new class will be at row 1, column 1. Is there a way to modify the template so that the blinking cursor appears in a different location?

using System;

namespace SomeNamespace
{
    class SomeClass
    {
        | <--- I'd like the blinking cursor to initially appear here
    }
}
John Saunders
  • 160,644
  • 26
  • 247
  • 397
T Graham
  • 1,329
  • 10
  • 14

1 Answers1

-1

You want to use $END$. You can also make fields by surrounding other keywords with $$.

using System;

namespace $Namespace$
{
    public class $ClassName$
    {
        $END$
    }
}
mikesigs
  • 10,491
  • 3
  • 33
  • 40
  • 1
    I just realized this doesn't appear to work if ReSharper is not installed. – T Graham Jun 15 '13 at 14:49
  • 3
    Resharper only. See: https://www.jetbrains.com/help/resharper/Templates__Template_Basics__Template_Variables.html. There doesn't appear to be any way to do this in vanilla VS. – BinarySolo Apr 17 '18 at 09:44