Feature request: Find dialog additions

It would be really great if the IDE Find dialog had a checkbox for “In Selection” and for “Find Whole Word Only”

2 Likes

-a- you mean when you select a text area ( with mouse … )
the find should only look inside that “highlighted” text part?
that would conflict with the current
select ( a word ) and use
/Edit / Use Selection for Find / [ctrl][e]
? but that is actually redundant as Find works always this way? it finds the selected word / not finds “xxx” in the selected area.

-b- whole word you could emulate by adding a space?
but we edit code and not full text and "word " situations are rare.

-c- finding things in long code is difficult,
but that is what the TAB are for ( *.pde files )
to split your code into ( reusable) modules.
and there is a Find option “[ ] All Tabs”

I was imagining “Whole Word Only” would mean find all instances of the search term which are either separated by a space or by non-alpha characters, so in:

if (points[i].x < points[n].x || points[i].x > points[p].x) { 
   line(points[i].x, points[i].y, points[i].x, 0);
}
if(points[i].x > points[n].x || points[i].x < points[p].x) {
   line(points[i].x, points[i].y, points[i].x, height);
}

… searching for “i” would only select the i’s which are between brackets but not the i’s in the words “if, points, lines, and height” which it currently does. Of course, searching for [i] instead of i is the obvious solution here, but I still think having a Whole Word Only option would be helpful.

And by Within Selection, I meant if you just selected all of the top “if statement” in the example above, you could do an easy Replace All while only affecting the selected portion, without performing one replacement at a time, and without having to wade through a list of matches scattered through an entire file.

1 Like

good, but i avoid that, better check on replace one by one
let’s say for renaming a “user variable” to a better meaning…
all the find and replace not makes sense for commands ( coding language ) anyhow.

but for change local to global variable v.v.
a other structure might be needed that this editor not provides.

why you not test Geany / Atom or even notepad++

while your ideas of improvements for the IDE are very welcome
i must tell you that it is unlikely / or take ages / for even good ideas
to be incorporated in a future revision, but that should not hold you back to post them here.

Yes, thanks. It’s just an idea. I found I can also just grab a selection and put it in an empty file to do the replacements then paste it back, it works fine.

you mean new TAB or a new processing ( File / project )

i ask because that is what i was talking about,
i can imagine situations for this, but that also might be that situation where it is better to hold it in a other TAB anyhow

example
you start coding and draw() gets longer and longer.

so you move a logical part to a other tab, make it a function and rename some variables to local ones…


anyhow thanks again for your input

Well, I already do use the tabs for code organization, I see the benefit there.

I was saying I have been just pasting a few lines into a new file as a scratch pad to get the same Replace All in Selection effect that I was referring to. Then paste the modified code back and delete the scratch pad.

And I keep wishing for a new little checkbox in the Find dialog. But I understand that it’s not likely to be a priority for the developers.

It’s kind of funny that after writing this post, for some reason I thought these were standard options in the find dialog for most applications, but after looking through the applications I use most, none of them have it either and I can’t remember where I have seen it before, maybe Excel or VStudio or something. I just have a deja vu sort of feeling that it’s something that’s just supposed to be there.

3 Likes

If you want to make a feature request, post it as an issue on the GitHub Processing repo issues.

However, PDE is not meant to be an advanced programming editor–in general, the devs always have the same response regarding features like this that support large projects and experienced editors (like code folding, regex replace, and…etc) – they say “then use Atom / Viscose / IntelliJ / Sublime / TextMate” etc. PDE is supposed to stat lean enough to be maintainable by a very small team, and focus on learners as it’s core audience.

3 Likes