ulex / ZenSharp

ZenSharp for ReSharper is mnemonics on steroids!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ci inserts quotes

wildcardjoker opened this issue · comments

Using pci (public const int) or _ci (private const int) inserts quote marks around the value:

pciTest becomes public const int Test = "1";
_ciTest becomes private const int Test = "1";

I realize this is like 1.5ish years later, but I actually just encountered this yesterday so I changed my template to be:

// Consts:
const ::= access "const "=c primType space identifier (" = "="=" """"="""" identifier """;" | " = "="=" identifier ";"  | " = " identifier ";")

That changes it so that the snippet is now either:
pcsName="value" or pciName=value
which expands to
public constant string Name = "value"; or public constant int Name = value;

In detail:
" = "="=" means it'll look for '=' and expand to ' = '
""""="""" is just escaping the double quotes ("), and is looking for a double quote in the snippet.

The last section: " = " identifier ";" I only put so that when you type pc and a prim type it'll show public const primType = $name$; instead of public class $name$