-
Notifications
You must be signed in to change notification settings - Fork 194
Find and replace only in open tabs #241
Comments
Not possible at the moment, I believe, but sounds like a neat idea for an enhancement. |
@izuzak |
This would be really helpful, and is a make-or-break feature for a serious code editor. Sometimes you want to do a search/replace on a set of files that can't be identified only by directory or file extension. Right now my workaround is to move all the files I want to modify into a directory, then do the search/replace in that directory, then move them back to their original locations. Obviously this is not a good solution! |
@izuzak any update on this? Does the API not allow this? |
This would be a great enhancement. |
Any information on what it would take to start working on this as an enhancement to the existing find feature? |
👍 this would be super helpful |
Yes please. I'm missing this feature. |
Looks like this package for Atom incorporates Finding in Open Files, but it's tailored for TODO items. Maybe the code might be useful? https://github.com/mrodalgaard/atom-todo-show |
Any update on this? Would be extremely useful. |
+1 (+1 +1 +1 ) This is one of my most-used features on Sublime, and most-missed in my switchover to Atom. |
@hjess this single feature (find&replace across multiple files--be it open tabs or whatnot) has been responsible for me switching from Atom to Sublime. I've been waiting since 2014 and haven't seen any action to prioritize this or even respond to comments asking for updates. Seems indicative of a larger problem with the software development if a hugely important feature that's regularly commented on gets completely ignored for years. |
@brentonstrine There have been no updates on this, so we haven't provided any. In addition, "hugely important" is very subjective here - you may use it often, but I haven't ever had the need for this feature yet. As always though, PRs are always welcome. Sorry I can't comment more on what's needed to implement this, but I don't have much experience with the find-and-replace code (@benogle might know more). |
It would be interesting to do a poll of current users asking what missing features they think are most important. I'd bet find/replace across multiple files would be near the top. Maybe I'm wrong. |
I hate to chime in and provide anecdotals, but Find/Replace is a bit lacking overall in atom. I expected to be able to find/replace in my current file, and all open tabs. Find/replace across project is cool and interesting too, but not something I expected to be provided. The other oddity was the lack of a Find All; that is to say a buffer containing inline previews of every match. I see there's already #568 and #569 for that, so it's noted as well. |
@brentonstrine The most common feedback we get from people is that Atom's performance is what they would like to see fixed the most. Because of this feedback performance has been a huge priority for the team. |
I'm adding my voice to ask for this feature. I'm in need of it right now and is really missing. I need to update a term in a certain batch of files, but not all of them. Being able to do it in all opened files would be greatly appreciated since it is a feature in most, if not all, other code software I've used. I think it's the only one missing. Search in Project and Directory/Folder are already present. |
Not just to keep the "thread" alive, I'm also one for have been using this before the switch from sublime and it's sourly missed. And guess I don't have to explain why, just agree with above writers. |
bummer this is such a critical feature that i need to switch from sublime. |
Please implement this - it's a simple task that can benefit a lot of people. |
No one from the Atom team has had time to yet. But that's where the community comes in! If this is indeed a "simple task" to implement, please feel free to do so and send a PR! I'll be labeling this issue as |
that would be really nice if this option is added. |
Should we do this like ST3 where the filter is in with the file pattern? e.g. Or does anyone have a better suggestion? If the above is acceptable, does anyone have an icon suggestion? :) |
So, if I understand this correctly, pushing the "Open files" button would activate the search through all open files. Is it a "toggle" button? If it is, that sounds great to me! |
Reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee |
This is really a nice feature I would like to have in Atom |
@trevdor what about your branch at #967
|
@rubo77 It's been a while, but yeah, it was working as I'd expect this feature to work. |
So ist just can't be merged, since you can't program the right tests? |
That's right, @rubo77 -- Since the feature works in practice, I suspect most of the tests would pass if I could set them up correctly. I suspect it has something to do with needing to open multiple tabs in the test setup, but I didn't get that figured out and I had trouble finding any examples of such tests around the Atom ecosystem. |
It would be really great to see this feature 🙏 🙏 🙏 |
Six years later: any word on this feature being added? |
I just found myself needing to do this today. I do hope it gets added. One of the things I miss from using the "other" editor. |
Year 7 and going strong...... I'd really like to migrate away from JEdit to Atom since the former is almost dead, but I far too often find myself doing things like renaming a variable that absolutely demand this functionality. |
For example if you have couple of newly created tabs (Cmd+N), not saved yet, it is not possible to search within them at all. Only by clicking tab by tab... Thank you for Atom! |
Plz add, it's 2022 now (nearly 8 years since the issue was created) |
This would be so bloody useful, cannot believe it has not been added. Does anyone mind if I have a go at adding this in? |
@TheBrokenEngineer That would be fantastic, imo. |
@trevdor That was going to be my starting point. I noticed that there were a couple of tests that were breaking so I'll have a look why first. My plan was to do a little refactoring first so we didn't wind up with duplicate code which is an absolute mess in terms of maintenance which is why I was asking if anyone had a problem with my doing the change. |
Uhhh, this would be nice—+1 from me. I often find myself loading up many files scattered around and making changes there. |
@max1mvs Seems to be a lot of interest for this feature. What I am thinking is taking the good work that @trevdor has done and using that as the starting point. As far as the UI is concerned I am thinking of adding a check box to the find/replace section of the screen on the bottom of the editor. Check it and the replace is done across all tabs. If you click the individual find/replace and the criteria for the replacement is not on the current tab but a different tab then that tab is shown. If however you click replace all then the tabs/text position does not change. Note, that this only does the replacement on open tabs and does NOT save the tab buffers. Your thoughts? Does this sound like the optimal solution? |
I'm afraid I cannot check what @trevdor did, but your efforts will be truly appreciated by all, no matter what! I think your suggestion sounds good. If we should be very strict concerning the UI already established in Atom, this should either be something being typed in the File/Directory pattern or a separate Search/replace function, but I guess this will require quite some work. So a checkbox will be pretty good IMO. And as long as the functionality of searching/replacing mimics what is already present in terms of projects, all should be perfect. Regarding saving the tab buffers, I would also think this would be the best approach. So all in all thumbs up from me! 😄⭐️ I think in Sublime Text, you select something like "Where: " Then a dropdown with different selections, amongst them to choose project filters, open folders, etc. Could be something to consider in the future for Atom. Thinking of it: Perhaps placing the checkbox to the right of the File/Directory pattern input? Below the buttons? |
Another possible solution could be to add the checkbox to the the find and replace in the whole project search.
|
Nearly every editor other than this one has some functionality like that, and it typically takes the form of an option in the the interface you get when you hit control/command-F. I personally wouldn't conflate it with the project search, since that already seems like a solved problem. |
@rubo77 The whole project search/replace is just that for the whole project. The find and replace are only for the buffers so I think leaving the option there is better?? @max1mvs I really would like to keep the change localized to the buffers/tabs at this stage. The menus themselves seem a little weird to me, the find option and the replace option for tabs brings up the same window at the bottom and the project find has no replace but brings up a find replace window. Very confusing and probably needs sorting out but I think that is probably above my pay grade as they say. There is another way we could do this, we could add an additional button to the top right option buttons that are there now. If selected then we could change the tip text in the edit boxes from "Find in current buffer" to "Find in all buffers" and similarly we change the replace box from "Replace in current buffer" to "Replace in all buffers". This would fit into the current layout nicely, the down side is that you need to know it is there as it is not that obvious. A good icon however would go some way to addressing this issue however. |
@TheBrokenEngineer Something like this (Photoshop)? This is btw. how Sublime Text does it: |
@max1mvs This is similar to "Find/Find in project" where we want to only find/replace in the open tabs. Agreed we could do this for both the find in project and the find in open buffers however this is more a UI redesign that is probably not something that would make the Atom maintainers that happy. Limiting the change to just what we need is probably a better way to go at this stage. If we want to do something a little more extensive then we could do it in a different change. I was thinking something more like just another button on the existing UI that could be toggled on. Note on the above image, the arrow is not pointing to the new button, it is indicating where the new button should go. As for what the icon should look like, that is something I am could do with some help on, I am not good at iconography, I prefer to stick with code. It does mean that the scope of the change is small (in so far as impact to the existing UI/usability) and solves the problem we are having. Does this make more sense? |
@TheBrokenEngineer Sure, sure. I agree. If you look at my photoshopped image, I suggested an icon there. It's from the Streamline collection: Another one, perhaps more 'tab'-like, is from the "The Icon Of"-collection. Here they both are: I can create it in any format you like. |
That could go for "Documents". I prefer a more "elegant" design for the icon, though. So if we are saying "Open files" rather than "All open tabs", this direction would work. If we go down that path, I can find a suitable icon. |
Seems like the icon choice is well under consideration. Of the 3 suggested so far my choice would be the first one with perhaps an extra tab bit at the top so it looks less like a folder icon one would see in windows explorer or finder. I will be taking a branch over the weekend and starting in on the changes. I hope to have something is a working state in a week or so after that at which time I will need an icon of some type. |
I can surely give the first icon a shot. I want to make sure we are aligned in the "Tabs"-direction, i.e. not the "Documents"-approach. So the wording could go something like:
Or even:
As opposed to:
Correct? Because then I will give the tabs icon an adjustment and bring it here. |
Any news on progress? When doing a Find & Replace would it be possible to stop Atom from automatically saving changed open files/tabs? I think it is useful to be able to see which files have been changed |
I requested this feature to search open tabs/files long time back but it has not been implemented even after this many years. To me it appears to be straightforward especially since find and replace functionality exists to find in project so, why not use that same functionality to search and replace open files. Search and replace in open tabs/files I think is super critical and fundamental. Hopefully, someone can implement it in next version. |
How to Find and replace only in open tabs?
The text was updated successfully, but these errors were encountered: