UI for “Find in Buffer”, “Replace in Buffer” and “Find in Project” panels


#1

Hi

This isn’t so much a feature-request as a question whether other users think there could be some UI enhancements to the “Find in Buffer”, “Replace in Buffer” and “Find in Project” panels. All three have some “quirks”, to me at least, but maybe others think they are fine just as they are.

Find in Buffer and Replace in Buffer

  • I find it very odd that these both open the exact same panel, but with different inputs focussed. Perhaps “Find in Buffer” should be more like TextMate’s incremental search and “Replace in Buffer” be what calls up the current panel?
  • I find the “Replace Prev” and “Replace Next” buttons to have unclear and confusing labels. Suppose I am definitely NOT wanting to do a “Replace All”. I enter my “find” and “replace” text, hit either “Find Next” or “Find Prev” multiple times to get to an occurrence I do want to replace. Now which button do I use? I think that “Replace Prev” means “Replace the current search result, and go to the previous search result”, and similarly for “Replace Next”, but honestly I’m not sure, and when finding and replacing I seem to waste quite a lot of time tentatively clicking buttons and then trying to check whether it did what I was hoping it would do.

Find in Project

  • Does anyone else find it odd that there is no “Find” button to initiate the search? I know that you just hit enter, and I discovered that pretty much instantly, but still it seems odd. It’s admittedly a very small thing.
  • Atoms results buffer for Find in Project is very similar to Sublime Text’s, and it was one thing I always found a little disappointing in ST. By way of comparison, take a look at TextMate 2’s “Find in Project” which has a number of cool features (although opening a new window is not necessarily one of them).

#2

I don’t think there’s a single piece of Atom that people think is completely without flaw :grinning: I’m on my way out the door, but I’ll try to share my thoughts later …


#3

Atom certainly isn’t with out flaws. But what I find refreshing is the fact people are clearly listening to problems. Be that the people at Github or the community. Stuff generally seems to get fixed within a week or so bar a few notable exceptions.


#4

Actually, I find this to be a keyboard optimization more than anything else. Let’s say that I’m not quite certain what I’m going to replace … so I perform a regex search. After a little bit, I get my regex working and then I want to move to crafting the replace string. I just press Cmd+Alt+F on OS X and it takes me straight to the replace field no matter where I am … whether I’m in the editor, the tree view, or whatever.

Yep, they’re confusing … but I haven’t really been able to think of anything better. “Replace Current Then Find Next” just doesn’t quite do it for me :grinning: “Replace Forward” and “Replace Backward”? Like I say, I haven’t thought of anything that is any less confusing.

To be honest, I didn’t notice until you mentioned it :laughing: I think that says more about me than about Atom though …

I don’t have TextMate2 handy. What features does it have that you would want Atom to copy?


#5

I :+1: on this. Althought I aggree with @leedohm (I didn’t notice most of these these myself), they may be an obstacle for new users.


#6

Having a look at other editors I have, “Replace and Find” seems to be common. So maybe

  • Replace, Find Next
  • Replace & Find Next
  • Replace + Find Next
  • Replace and Find Next

(similarly for Replace Prev). Personally I prefer the first because it is shortest, and the comma suggests actions happening serially as opposed to simultaneously, which might be clearer to users.


#7

Well first let me say what I don’t like: in TextMate 2 “Find in Project” opens a new window. I would much rather the “Find in Project” panel stays more or less as is; it’s the results tab that I think could take a little inspiration from TextMate 2.

Here are the results displayed, grouped by file, with a checkbox next to each result, and if the find input is focused the find text is highlighted in the result:

If I focus the replace input you get a preview of what the changes will be (incredibly useful when doing complex regexp search and replaces across multiple files):

<img src="/uploads/github_atom/23936/b09e06576184df38.png" width=“529” height="500”>


#8

Also, using this preview I can then use the checkboxes to decide which changes to make. On unchecking an item the “Replace All” button changes to “Replace Selected”:

<img src="/uploads/github_atom/23937/7f523bd4e08ba18a.png" width=“529” height="500”>

It would be awesome to have this. I still revert to TextMate 2 when I have complicated search and replace across multiple files to do because of this.


#9

@ddbrierton screenshots that you have posted are really really useful - looks amazing. Having this, or similar functionality in Atom would be ace!

‘Replace all’ could open new interface that is similar to ‘Find in Project’