Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regex to match file types in Productivity Power Tools-plugin

In the Visual Studio 2012 "Productivity Power Tools" plugin you can configure file tabs to be color coded based on regular expressions. Im trying to match different file-types, like .less .cshtml, to have different colors but cant get it to work. Ive tried .*\.cshtml for example.. What regex should I use to target .less and cshtml?

like image 799
tobbe Avatar asked Nov 01 '13 10:11

tobbe


1 Answers

Follow the next steps:

  1. Go to Tools -> Options
  2. Go to Productivity Power Tools -> Custom Document Well -> General
  3. Make sure that you have checked the following 2 checkboxes:
    • Color tabs by regular expression
    • Regular expression colors have precedence over project colors
  4. Go to Productivity Power Tools -> Custom Document Well -> Color Coding
  5. At the end of the list, in the new row, in the RegEx/Project column, add (this will match both file types):

    .*\.less|.*\.cshtml
    
  6. Choose a color in the Tab Color column and click OK to save the settings

That's it.

like image 128
Alex Filipovici Avatar answered Nov 14 '22 04:11

Alex Filipovici