New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to find&replace in selection #1618
Comments
I second that. Pretty much every text editor allows you to do so. Usually, there is check-box to tick to enable it :-) |
The feature I thought I'd use a lot in Visual Studio is the multiple carats, so you can edit multiple places at once. So in your example, rather than search/replace 'foo_id' with 'bar_id', you simply multiple-click on each 'foo' (to create multiple carats) then delete 'foo' and type 'bar' - all are edited. However, in practice, I've not used it at all yet! 🤣 |
New check box in the Find and Replace dialog for Scintilla editors. The new option uses the feature in QScintilla for finding text in the selection only. The implementation has been changed to use findFirst(InSelection) and findNext so it works exactly as designed by QScintilla. Consequently the finding process has to be cancel whenever any of the parameters have changed.
Another new feature ready for testing. I hope everything is working OK. |
Hello @mgrojo Thanks a lot for your last awesome effort! I have tested this new option on Windows 10 - 64 bit, with DB.Browser.for.SQLite-win64. Here is my screenshot where I have selected my text and then replaced the word mary with LUCY (just for testing purposes): |
@SilvioGrosso Out of curiosity, is that using a Windows nightly build from today? Asking for an unrelated thing - I just upgraded the Qt version used for the Windows builds - so um... keep an eye out of any extra weirdness too. Just in case. 😄 |
Hello @justinclift I have dowloaded this build (3.11.99) this morning, an hour ago. Here is my screenshot on Windows 10 (64 bit) though: |
Excellent, thanks heaps @SilvioGrosso. 😄 |
Hello @chrisjlocke @mgrojo In appreciation of your hard work on Db Browser for SQLite I have just increased my monthly payment on Patreon. |
Fantastic @SilvioGrosso. That's good timing, as the next release shouldn't be too far off now. 😄 |
Yep. I know: I did it on purporse: to make Windows users happy :-)
|
Thanks a lot, @SilvioGrosso! By the way, curious location of the Help button in Windows. In Linux is at the left aligned relatively to the window, and Close right aligned. If at least the buttons were in different positions, with Close at the right end, it would look better. That's funny because the Help button under Windows wouldn't be necessary, since I see there is a [?] window button. The Help button enters also in What's This mode and I added it because in Linux there is no such thing as a [?] window button. |
Hello @mgrojo This ? window button is indeed quite interesting :-) When you press this button no action is triggered but, alongside the mouse's cursor, another ? appears. For example, I have just clicked on this part of the GUI: |
Works perfectly. |
Yes, that's exactly it's use. It's the so called What's This? feature. You can also access it from the Help menu in the main window or almost everywhere pressing Shift+F1. We have included some helpful messages in some of them. Other are plain boring. If we don't use it more it's because we think they are usually overlooked by users 😄 I have code for adding all the editor shortcuts to the "Execute SQL" message, because it currently lacks one and QScintilla provides a list of them with short descriptions. The problem is that the text is then too large and these floating tips are not thought for so much content (the text is truncated at least on my computer). I've finally added the generated list to the wiki page: https://github.com/sqlitebrowser/sqlitebrowser/wiki/Keyboard-shortcuts#sql-json-and-xml-editors but I'm still thinking on how to add them to the application. Most are widely known, but there are also less known/standard shortcuts that are also useful. |
Closing this as it was already confirmed. |
Describe the new feature
I previously mentioned in #1612 that Visual Studio has a usefull feature for find&replace:
If you have more than one line highlighted when you open the replace menu, "replace all" will be limited to that part.
This is usefull for example when you want to add a
CREATE TABLE
statement (with separatePRIMARY KEY
orFOREIGN KEY
clauses) that is very similar to a different one in the same file: Ctrl+C, Ctrl+V, Highlight, Ctrl+H, change field names:Visual Studio also prepopulates the search box (for search and find&replace) with selections smaller than a line or the word under the cursor. This feature would be less important to me.
Both features can be turned off in the settings menu of Visual Studio.
The text was updated successfully, but these errors were encountered: