Search&Replace plugin improvements
Open, WishlistPublic

Description

(1)

The "Show search options" button is easily missed and would better fit where the other search options are. For consistency the "add new search tab" button could be moved, too.

(2)
Add something to restrict a "Current project" search to the current folder a root.

  • Either a new combobox item "Current project (current folder)"
  • Or an option for "Folder": "Restrict to project files" (like KDevelop does it)

(3)
See https://phabricator.kde.org/T10279: Use Ctrl+Shift+F instead of Ctrl+Alt+F for search.

(4)
Merge the Ctrl+F and Ctrl+R functions from the current implementation to the Search&Replace plugin where they automatically select "In Current File" (and Ctrl+Shift+F will select the previous selected option so that key-wise everything stays the same.

Clarifiation: after the merge the shortcuts Ctrl+F and Ctrl+R should NOT be removed but work as before. Ctrl+F will select "In Current File" (and, if possible, hide the replace input field to reduce waste of space).

(5)
"The panel size is changeable. The problem here is that the separator is invisible :( About half way between the search box and the status bar the mouse cursor changes and you can resize the window."

Somehow remedy this pain point. When a colleague looks over my shoulder, I feel like someone who uses the mouse for first time and does not know to use split views. :-)

gregormi triaged this task as Wishlist priority.
gregormi updated the task description. (Show Details)Jan 13 2019, 12:51 AM
gregormi updated the task description. (Show Details)
sars added a subscriber: sars.Jan 13 2019, 11:09 AM
  1. These buttons are different than the other buttons in that they modify the UI of the toolview but not the search. So mixing them is maybe not the best? One could think about moving them to the right side of the other buttons and have some type of separator between...
  1. Why not just use "in Current folder"? is it a performance issue? You can restrict the search also with the "Filter" and "Exclude" fields...
  1. This shortcut is currently used for "Full-screen" mode...
  1. I would be OK with this change, but I'm afraid that it might not be welcomed by everyone... Changing shortcuts is a dangerous thing to do ;)
In T10317#173006, @sars wrote:
  1. These buttons are different than the other buttons in that they modify the UI of the toolview but not the search. So mixing them is maybe not the best? One could think about moving them to the right side of the other buttons and have some type of separator between...

My observation was that I mentally have to jump between left and right when I think about how to configure the search. The button that shows advanced options makes more sense to me if it is located with the other options. (And if this one button moves away, the other can come with it to have the input fields equally aligned without hole)

  1. Why not just use "in Current folder"? is it a performance issue? You can restrict the search also with the "Filter" and "Exclude" fields...

"In Current Folder" would be an option indeed. I remember cases where I had the exclude filter set so something else (because large project) and wanted to make sure that only project files and all of them are searched. In this case such an option would be helpful.

  1. This shortcut is currently used for "Full-screen" mode...

Fullscreen would get Alt+Shift+F which is free.

  1. I would be OK with this change, but I'm afraid that it might not be welcomed by everyone... Changing shortcuts is a dangerous thing to do ;)

Great! Yes, changing such things does not go without friction. This is why I want to make sure that every change makes sense and has a good explanation how it improves the overall situation.

sars added a comment.Jan 15 2019, 8:31 PM
  1. Yes the "more option" button is a bit far away. At some point it actually was at the right of all the options. That is a real possibility
  1. I meant "in folder" because you do get current folder when you select that option in the combo-box. Or you can click the "Use current document's path"
  1. Ctrl+Shift+F is a semi standard full-screen shortcut in KDE. Gwenview, Ocular and Konqueror are examples of this.
  1. This would mean that the Search plugin would replace the built-in search by default. That is something we would need broad consensus on before doing and I don't think we have that consensus yet.

Maybe it's because of I have to work quite often with Windows but mostly there ist Ctrl + F used for search and Ctrl + H for Replace functions in for example: Word, Notepad, Notepad++, SQL Management Studio. Browsers, Telegram and many other software which do not offer a replace function make at least use of Ctrl + F for search too. So while using Kate or KDevelop I see me quote often press those shortcuts and get something different. Do not know to which action they ae assigned at the moment.

Also it would be great if we could make the panel changeable in size. Specially when searching in a project or more files I get a list back but it's very hard to work with the results because the field is so small in height and cannot be resized to see more results at once. Sublime Text goes another way and opens the results of such searches in a complete new tab where the results are also linked to the files so that we can jump directly to them.

sars added a comment.Jan 16 2019, 9:45 AM

Also it would be great if we could make the panel changeable in size. Specially when searching in a project or more files I get a list back but it's very hard to work with the results because the field is so small in height and cannot be resized to see more results at once. Sublime Text goes another way and opens the results of such searches in a complete new tab where the results are also linked to the files so that we can jump directly to them.

The panel size is changeable. The problem here is that the separator is invisible :( About half way between the search box and the status bar the mouse cursor changes and you can resize the window.

gregormi updated the task description. (Show Details)Jan 16 2019, 9:21 PM
In T10317#173650, @sars wrote:
  1. Ctrl+Shift+F is a semi standard full-screen shortcut in KDE. Gwenview, Ocular and Konqueror are examples of this.

I would argue that Ctrl+Shift+F is a semi standard for advanced coding editors and fullscreen is seldom used there. But I see your point. I would like to know what @ngraham thinks about that.

  1. This would mean that the Search plugin would replace the built-in search by default. That is something we would need broad consensus on before doing and I don't think we have that consensus yet.

Agreed.

gregormi updated the task description. (Show Details)Jan 16 2019, 9:29 PM
gregormi updated the task description. (Show Details)