The C # code scripts that I create can only be completed by pressing Enter, while inline snippets such as "struct" can be populated by tabbing through custom fields.
This is not a big problem, but it is annoying. I tried to copy all the XML for the structure fragment into my own, replacing only the label name. However, I had to press Enter to complete the input.
Any ideas why this is so? Can anyone else reproduce this behavior?
Here is the snippet I'm trying to write:
<?xml version="1.0" encoding="utf-8" ?> <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> <CodeSnippet Format="1.0.0"> <Header> <Title>cmd</Title> <Shortcut>cmd</Shortcut> <Description>Code snippet for ICommand</Description> <Author>Andreas Larsen</Author> <SnippetTypes> <SnippetType>Expansion</SnippetType> </SnippetTypes> </Header> <Snippet> <Declarations> <Literal> <ID>name</ID> <ToolTip>Command name</ToolTip> <Default>My</Default> </Literal> </Declarations> <Code Language="csharp"><![CDATA[public ICommand $name$Command { get { if (_$name$Command == null) _$name$Command = new DelegateCommand($name$); return _$name$Command; } } $end$]]> </Code> </Snippet> </CodeSnippet> </CodeSnippets>
Edit: As indicated by Carl G, Visual Studio behavior ends only by pressing ENTER or ESC. Termination with TAB is the behavior of the ReSharper Live Template.
source share