Reputation: 313
Is it possible to make a add-in for IntelliSense so that you can for example type if
then press enter or tab then IntelliSense "imports" that snippet?
If not is there any way, except for the CTRL+K, X way?
Thanks
Upvotes: 1
Views: 86
Reputation: 99989
If you are attempting to add statement completion to a new language in Visual Studio, Microsoft has posted the following walkthrough to help with the process.
Walkthrough: Displaying Statement Completion
Upvotes: 1
Reputation: 99989
I believe what you are looking for is the ability to add custom snippets. In this StackOverflow answer I give an example of creating and installing a snippet.
The specific item you are looking for regarding IntelliSense is the Shortcut
element, which appears as the following line in the linked answer.
<Shortcut>tan</Shortcut>
Note that you probably will not be able to reuse the shortcut already used by another snippet. By default, Visual Studio 2010 installs a snippet if.snippet in the following location:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC#\Snippets\1033\Visual C#
If you want to replace the snippet used for the shortcut if
, you'll need to either edit this file, or remove it to use one installed in your user profile.
Upvotes: 0
Reputation: 1460
I've had great success making my own snippets with SnippetEditor
Upvotes: 0