How can I keep SSMS Find and replace in files "Look In" from changing
Asked Answered
H

2

15

In SSMS when I do a

Find and Replace in Files

(default keystroke CTRL+SHIFT+H)

Edit > Find and Replace > Replace in Files

If I set the "Look In" to "Current Document" then do a change and select the Replace All button, the Look In dropdown changes to select

All Open Documents

How can I keep Look In set to whatever I previously have selected? I want to KEEP it set to Current Document Frankly this behavior is super annoying.

Heron answered 24/5, 2017 at 16:43 Comment(2)
There's no option to change that behavior - you might consider to file a feature/bug request on Microsoft Connect... Update: There is already a bugreport...Unexperienced
@PeterSchneider - it SAYS in that bug report it is fixed (2016) but alas it is NOT in the current SSMS 2016 code base, hope they do a bug patch. Thanks so much for finding that thoughHeron
H
6

This appears to be an unresolved bug. https://connect.microsoft.com/SQLServer/feedback/details/2593572/ssms-2016-rc2-find-and-replace-window-reverts-to-all-open-documents-are-replacing-all-within-the-current-document

Attempted to submit feedback on that issue on that site but frankly the site UI and attempts to use it were horrid and would not even allow me to submit feedback or comments. Thanks Microsoft for that mess.

Found 2593572 but in

Microsoft SQL Server Management Studio 13.0.16106.4

this still exists. This site UI is pretty horrid BTW with "Please Wait...." all over then, after logging in would not even allow comments etc.

So simply closing this question per that; I might consider other tools besides SSMS as a "workaround".

EDIT: As icing on the cake attempted to submit a comment to the posted site admin email at the bottom of the pages:

Message not delivered Your message couldn't be delivered to [email protected] because the remote server is misconfigured. See technical details below for more information.

Heron answered 28/5, 2017 at 14:18 Comment(2)
new home for this suggestion seems to be: feedback.azure.com/forums/908035-sql-server/suggestions/…Cleon
@Cleon That link is broken. I think MS cleans out Connect, UserVoice, feedback.azure, etc. etc. every few years so there's no record of all the old bugs they still haven't got to.Mascia
S
0

A workaround for this that works for me; open another query window and leave it blank. When you do a replace it defaults to "All Open Documents" instead of "Entire Solution".

Saber answered 29/12, 2021 at 15:23 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.