VS2005中自定义“在文件中查找”返回结果的样式

    你可以在VS2005中自定义“在文件中查找”返回结果显示什么以及如何显示。例如,你可能不希望看到在返回结果中显示文件的路径全称(这是VS2005默认的),而是只希望显示文件的名称。

那么如何才能实现呢?很简单,只要这样做就可以了:

1)打开注册表(可以在运行中输入“regedit"来完成)。

2)定位到HKey_Current_User->Software->Microsoft->VisualStudio->8.0->Find。

3)右击”Find",新建一个名称为“Find Result Format",值为” $f$e($l,$c):$\t\n"的字符串。
    $f 表示文件名

    $e 表示扩展名

    $l 表示行号

    $c 表示列号

    $t 表示该行的文本

4)退出注册表编辑器,重启VS2005就可以了。

注:下面是所有可以设置的格式:

Files

$p      path                       

$f      filename               

$v      drive/unc share            

$d      dir                        

$n      name                       

$e      .ext                       

Location

$l      line                        

$c      col                        

$x      end col if on first line, else end of first line

$L      span end line

$C      span end col

Text

$0      matched text                

$t      text of first line

$s      summary of hit

$T      text of spanned lines

Char

"n      newline                   

"s      space                     

"t      tab                        

""      slash                    

"$      $                         

If you come up with a great combination of values, please leave a comment and share with the group!

Tags: VSTips
Suggest a Tip!

原文地址:https://www.cnblogs.com/zhangronghua/p/1083234.html