Multiline Find&在Visual Studio中替换 [英] Multiline Find & Replace in Visual Studio

查看:137
本文介绍了Multiline Find&在Visual Studio中替换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以吗?我们正在使用VS2005和VS2008以及VS2010。

Can it be done? We're using VS2005 and VS2008 and VS2010.

我不是指正则表达式 - 它们有它们的位置 - 但是普通的旧文本找到&更换。我知道我们可以使用\ n标签使用正则表达式(在紧要关头),但不要纠结于正则表达式转义字符,还有可读性问题。

I don't mean regular expressions - which have their place - but plain old text find & replace. I know we can do it (at a pinch) with regular expressions using the \n tag but prefer not to get tangled up in regex escape characters, plus there's a readability issue.

如果无法做到,人们使用什么简单(简单)(免费)替代方案?这并不涉及敲响我们自己的宏。

If it can't be done what plain and simple (free) alternative are people using? That doesn't involve knocking up our own macro.

推荐答案

我终于找到了..

无需下载和加载任何外部宏。

No need to download and load any external macro.

它至少在内置宏的Visual Studio 2008中工作。 :)

Its working in Visual Studio 2008 with in-built macro at least. :)

步骤:

1)选择要查找的文本。

2)按Alt + F8或者打开工具 - >宏 - >宏浏览器


3)双击Sample - > Utilities - > FindLine。 (它将打开查找框,并在查找字段中加载您的选择。不要担心查找字段中显示的截断文本。相信我,字段拥有一切......显示它的MS方式可能是......: ))

4)点击查找和替换对话框中的快速替换按钮。输入您的文本替换。

5)并根据您的要求点击3个按钮中的任何一个......并完成它。 :)

Steps :
1) Select text you want to find.
2) Press "Alt+F8" or open "Tools -> Macros -> Macro Explorer"
3) Double click "Sample -> Utilities -> FindLine". (It will open Find box with your selection loaded in "Find" field. Don't worry about truncated text shown in "Find" field. Trust me, field has it all..MS way of showing it may be... :) )
4) Click on "Quick Replace" button on "Find And Replace" dialog box. Enter your replace with text.
5) And Click any of 3 buttons as per your requirement...and its done. :)

Hurray ..它的工作..可能不是一个直接的方式去做但你知道MS ...没有什么是直截了当的容易.. :)

Hurray.. its working.. May not be a straight forward way to do it but you know with MS.. nothing is straightforward and easy.. :)

这篇关于Multiline Find&在Visual Studio中替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆