Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable Resharper custom live template for JavaScript file

I've created some custom live templates with Reshaper 5.0 for C# files and they work fine. They also work for for JavaScript inside a .aspx file too.

However, when I try to use my custom live template shortcut keystrokes inside a .js file, which is part of the Visual Studio 2010 solution, nothing (related to Resharper) shows up in the context window when I type the shortcut characters.

Do I have to enable something related to the .js file type in Resharper?

like image 398
a7drew Avatar asked Jun 22 '10 04:06

a7drew


1 Answers

I figured it out. The live templates for Resharper were hidden because of a setting in Visual Studio.

How to enable the Resharper Live Templates inside a JavaScript file:

  1. Click Tools, Options inside Visual Studio 2010
  2. Click Text Editor, JScript, General
  3. Clear the checkbox labeled "Auto list members"
  4. Click OK

Now I can utilize my custom live templates. I've built up some that inject frequently used statements like the jQuery onload code block. It would be nice to get both features working, but for now, I'll take the live templates over the auto list members feature.

like image 51
a7drew Avatar answered Oct 05 '22 22:10

a7drew