Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

custom code snippets in intellisense

I've started exporting some of my frequently used blocks of code to custom snippets. Is there a way to get these to show up in IntelliSense and not have to use the snippet browser from the context menu or snippet manager?

At first, I thought this was related to ReSharper, but they still don't show up when I disable the ReSharper IntelliSense.

It would be nice to be able to just use the snippet shortcut instead of using the browser.

like image 619
Chris McGrath Avatar asked Oct 18 '10 04:10

Chris McGrath


2 Answers

You need to set the ShortCut property like <Shortcut>slpropdp</Shortcut>. The best way to learn editing this, just check any of the already existing codesnippets. By, going to Tools -> Code snippet manager. Select any code snippet, the location of the code snippet will be available at the top location bar

like image 101
Prince Ashitaka Avatar answered Sep 22 '22 07:09

Prince Ashitaka


If you are still not seeing the shortcut, but you have ReSharper then check in Resharper > Options > IntelliSense > General. If you have ReSharper radio button selected, then your intellisense created in VS [shortcut] will not appear. Change that to Visual Studio or alternatively create intellisense in ReSharper

like image 37
sharad shrestha Avatar answered Sep 22 '22 07:09

sharad shrestha