简体   繁体   中英

Making an add-in for intellisense of Visual Studio 2010 Premium

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

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

我使用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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM