Question

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

Was it helpful?

Solution

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

OTHER TIPS

I've had great success making my own snippets with SnippetEditor

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top