Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper: Code snippets with tab+tab

In VS, to use snippets (for example auto-implented property) I typed "prop", then hit TAB twice.
However R# (I'm using R#6) inserts the snippet after ONE tab, causing me to always mistype something.
Is there an option somewhere, where I can set it to use two tabs?

like image 767
TDaver Avatar asked Nov 05 '11 09:11

TDaver


People also ask

Does ReSharper provide syntax highlighting?

Syntax highlightingReSharper extends the default Visual Studio's symbol highlighting. Additionally, it highlights fields, local variables, types, and other identifier with configurable colors. For example, ReSharper syntax highlighting allows you to easily distinguish between local variables and fields in your code.

How do you activate snippets?

There are two ways to add a snippet: Type the # symbol into the text editor. Start typing the snippet shortcut, then select the snippet from the dropdown menu. The snippet will automatically populate in the text editor.

What is a predefined template to insert or surround existing code with common data structures and statements?

Telerik® JustCode™ comes with a number of predefined templates to insert or surround existing code with common data structures and statements. To learn about code templates take a look at the Code Templates topic.


1 Answers

Unfortunately there's no way that I'm aware of that would let you reassign deployment of ReSharper live templates to two tab hits instead of a single hit.

However, until you've got used to the single-tab deployment, you can Shift+Tab to go back to the previous template hotspot, which prevents messing things up.

Another option would be to selectively turn off ReSharper live templates that conflict with Visual Studio snippets that you're used to deploy on a regular basis. To do that, go to ReSharper > Live Templates, and in the Templates Explorer, under Live Templates, either deselect "Predefined templates" altogether or expand this category and turn off selected templates - in your example with "prop", you should turn off ReSharper's "prop" and propg (the latter is under "Imported Visual C# snippets")

like image 189
Jura Gorohovsky Avatar answered Oct 28 '22 01:10

Jura Gorohovsky