Live template formatting in 3.0
Hi there
I'm using a simple live template to render a #region before writing
code. It looks like this:
#region $Name$
$END$
#endregion
When using the template, RS2.5 immediately reformatted the directives
(proper indentation) and placed the cursor correctly so I could start
coding right away. This worked whether I placed the region within the
class (e.g. for fields/properties) or in a complex method that I wanted
to structure. Sample:
public class Foo
{
#region bar
#endregion
}
This is no longer the case with RS3.0. The output looks like this:
public class Foo
{
#region bar
#endregion
}
This is pretty annonying - I have to manually readjust the position if
the #endregion directive, then go back and indent myself to get properly
aligned methods. Is this a bug or a setting that must be defined in RS
options to get automatic formatting back?
Cheers,
Philipp
Please sign in to leave a comment.
Hello Philipp,
Do your templates have C# context (specified on the template editing page)?
Oleg Stepanov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hi Oleg
Thanks for the reply - that solved it :)
Cheers!