Is there any way to prevent the addition of an extra line below a multi-line snippet in VB.NET?
(hit tab key to expand snippet...)
I've double checked that the snippet itself does not have an extra line at the end. Also, this seems to be VB-specific.
press ctrl + shift + P and type "Create snippet" on the command palette and press ENTER. snippet name, type snippet shortcut and then type snippet description. You are now good to go.
To create or edit your own snippets, select User Snippets under File > Preferences (Code > Preferences on macOS), and then select the language (by language identifier) for which the snippets should appear, or the New Global Snippets file option if they should appear for all languages.
You can also insert a snippet when logging an activity or leaving a comment on a record using the HubSpot mobile app for Android. There are two ways to add a snippet: Type the # symbol into the text editor. Start typing the snippet shortcut, then select the snippet from the dropdown menu.
Just close the ]]
after the end of your snipped. The ¿end¿
part sets the caret at this position after inserting the snipped.
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
<Title>tryt</Title>
<Author>[USERNAME]</Author>
<Description>
</Description>
<HelpUrl>
</HelpUrl>
<Shortcut>tryt</Shortcut>
</Header>
<Snippet>
<Code Language="vb" Delimiter="¿"><![CDATA[Try
¿end¿
Catch ex As Exception
Throw New Exception(ex) 'or do some other stuff
End Try]]></Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With