See what's new below
This extension allows multiline search and replace in Visual Studio. This is a user-friendly GUI wrapper over standard VS "Find" and "Find in Files" dialog. You don't have to use the regex syntax, the extension takes care of it. It also allows to save your searches.
After installing, a new Multiline Find/Replace menu item is created under Edit - Find and Replace.
When you invoke the command, you can insert multiline text in both Find what and Replace with fields.
You can set various options for how to handle whitespaces. See the help for more details.
According to which find or replace button you press, the standard VS find/replace dialog appears. All required fields are correctly prepopulated. That means Find what and Replace with fields contain the regular expressions for newlines. Moreover, the Use Regular Expressions option is automatically selected.
Now you know it. You can search and replace as usual.
Predefined keyboard shortcut for the multiline search command is Ctrl + Alt + F. If you want to change it (for example because the shortcut is already used) you can do it in Tools - Options... menu. Navigate to Environment - Keyboard. Type "multiline" in Show commands containing field. You should see Edit.MultilineFindReplace command for which you can change the shortcut.
To add the command to your toolbar, right click on the toolbar and select Customize. Switch to Commands tab. Select Toolbar: Standard and press Add command. Select Edit category and Multiline Find/Replace command.
And now it's always at your hand.
(4. March 2021)
- FIX: Find/Replace in files didn't work in Visual Studio 2019 version 16.9 and higher.
(22. April 2020)
- FIX: The extension now works also in Visual Studio 2019 version 16.5 and higher which uses the new implementation of Find/Replace in files.
(11. May 2019)
- FIX: The extension couldn't be installed in Visual Studio 2019 version 16.1 and higher.
- FIX: The TAB character couldn't be entered in the Find and Replace text boxes. Even when it was pasted, it was converted to a space character.
(16. April 2019)
- NEW: Added support for Visual Studio 2019.
- NEW: You can save an unlimited number of your search settings and re-use them anytime later.
(16. January 2017)
- FIX: After filling in the fields in the multiline search/replace dialog and pressing any of the buttons, the standard search/replace dialog appears. When this happened for the first time, its Find what field was incorrectly populated with the selected text from the editor, instead of the generated regex. This only occurred if it was set in Tools - Options - Environment - Find and Replace. This problem only occurred in version 2.0.
- FIX: If the replace text contained $, double $$ was inserted sometimes.
(23. November 2016)
- NEW: Added support for Visual Studio 2017.
- NEW: Theme colors in VS are respected. For example, if the Dark theme is applied in VS.
- CHANGE: Removed support for Visual Studio 2005, 2008, 2010 and 2012. Only 2013, 2015 and 2017 are supported now. This allows for better VS integration and installation.
- CHANGE: The extension is now installed via VSIX installer, instead of MSI. Now you can easily add, remove or update the extension directly from VS. I you have installed version 1.6 or earlier, uninstall it first from Start - Programs and Features.
(18. December 2014)
- NEW: Added support for Visual Studio 2015.
- NEW: Added support for high DPI (Retina) screens.
(11. June 2014)
- NEW: Added new find options: Ignore leading whitespaces, Ignore trailing whitespaces, Ignore all whitespaces. This way you have more flexibility with indented text, inline multiple whitespaces, etc. See the help for more details.
- NEW: Added a short help (user guide).
- NEW: Added automatic checking for new versions. This can be set in the options.
- NEW: Added options under Tools/Options, Environment - Multiline Find and Replace.
- CHANGE: Improved resizing. You can now drag the splitter and resize Find what and Replace with text boxes.
- FIX: Ctrl+A in Find what and Replace with text boxes didn't work.
(6. April 2014)
- CHANGE: The multiline search/replace dialog is no longer modal. Now it is modeless tool window which can be sized and docked as any other VS tool window.
- FIX: In VS 2012 and 2013, the "" character in the Replace with field was incorrectly escaped to regex as "\". That produced double backslash in replaced text. So if you wanted to replace with e.g. "C:\MyFolder\root\nextLevel\test", you got "C:\MyFolder\root\nextLevel\test".
- FIX: In VS 2012 and 2013, if you replaced a string with an empty string (you wanted to delete the string), the extension produced "\9" in Replace with field.While this produces an empty text in VS 2005-2010, it doesn't work in newer versions. In VS 2012 and 2013, the "$+" is used now. Unfortunatelly, it's not possible to pre-populate the Replace with field directly with an empty text because VS automatically inserts the last used value from the history. That's why such a hack is needed.
(28. March 2014)
- FIX: Correct regex newline composition in VS 2010 Replace with field. When Replace with field contained a newline, an extra "r" character was appended at the end of line. Only VS 2010 was affected, it worked fine in all other VS versions.
(14. March 2014)
- Find what is automatically populated with text from the editor, if it is set in Tools - Options - Environment - Find and Replace.
- Correct regex newline composition in VS 2010 and higher. Unlike in previous VS versions, \n is not enough in VS 2010+.
(3. March 2014)