1

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

Dilan V
  • 303
  • 3
  • 13

3 Answers3

1

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

Sam Harwell
  • 94,937
  • 19
  • 203
  • 272
0

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

safetyOtter
  • 1,308
  • 15
  • 25
0

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.

Community
  • 1
  • 1
Sam Harwell
  • 94,937
  • 19
  • 203
  • 272
  • I don't want to add or make my own snippets. I just want to if I type `if` then InteliSense pops up and then I press Enter – Dilan V Mar 03 '14 at 17:21