Find and Replace - Grand Unification Theory

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

How important is a unified find and replace to you?

Top priority
30
41%
Important
30
41%
Would be nice
12
16%
Somewhat unimportant
2
3%
Unimportant, despite the fact that the size/efficiency of TextPad would be improved
0
No votes
 
Total votes: 74

User avatar
Cloink
Posts: 81
Joined: Thu Sep 09, 2004 1:44 pm

Navi-windows for Find All & keyword-recognition.

Post by Cloink »

Find/Find All.
What I want (what I really really want, obviously [Spice Girls if I've completely lost you]) is a 'Find All' that lists all the results in the Clip Library pane (or something that pops up over the top of it). If the Clip Lib's not open, just the pop up. Then clicking one of the lines shown in the pop-up immediately navigates the document to that line/word (vertically centred of course).

A Search Results window is all well and good but that means flicking between windows.

I'm persistently amazed that no text editors I've found do this. As a similar type of thing, if anyone's used Toad (I believe the Delphi environment does something similar), Toad is an Oracle Dev Tool that provides a text editor to create/compile Oracle-pl/sql programs. When you compile and errors are generated, the bottom 1/4 of the screen shows the compile errors, and clicking on one of the errors moves the doc to that position instantly.

I have to say, I worked on a mainframe from the mid '90s and that already did the equivalent back then (and probably did it from the mid 80's). A mainframe display!

While I'm at it, is there any add-in to search the document text for keywords and similarly list those in a navi-window? eg./ie. to identify where all your 'function' statements are?

Don't get me wrong, TextPad is the only text editor worth using, I was VERY chuffed a few days ago, wanting to copy the filename, to find that lo! right click, Copy Other, Filename was right there!

Well done TextPad - keep up the dev. I don't think it's ever crashed on me either.
User avatar
s_reynisson
Posts: 940
Joined: Tue May 06, 2003 1:59 pm

Re: Navi-windows for Find All & keyword-recognition.

Post by s_reynisson »

Yes! Alas, I can only vote once for this poll ;)
Cloink wrote:Find/Find All. What I want (*) is a 'Find All' that lists all the results in the Clip Library pane (or something that pops up over the top of it). If the Clip Lib's not open, just the pop up. Then clicking one of the lines shown in the pop-up immediately navigates the document to that line/word (vertically centred of course).
If you use the search here for "ctags" you will come across this link, http://findtag.sourceforge.net/ , it's an addon for TP and creates a function list for source code, a source navigator? HTH
(*) sorry, just had to edit out some really naugty words
Then I open up and see
the person fumbling here is me
a different way to be
User avatar
Cloink
Posts: 81
Joined: Thu Sep 09, 2004 1:44 pm

Post by Cloink »

Before anyone makes the same mistake as me, s_reynisson doesn't mean ctags is supported, he means there's another thread requesting an interface to ctags.

Maybe next time I'll actually read the thread.......
Kniht
Posts: 4
Joined: Wed Sep 22, 2004 4:08 am

Post by Kniht »

Putting an unselected word into the find dialog would be a major annoyance to me. All you have to do is select it and then hit F5 to search for it, whereas I often open the find dialog and have miscellaneous text selected from whatever previous operation I was doing.
SamuelReynolds
Posts: 9
Joined: Tue Dec 28, 2004 10:55 pm
Location: Colorado
Contact:

Post by SamuelReynolds »

FWIW, I never use the Search->Find (F5) command or the Find dialog.

The Find dialog is an annoying and unnecessary subset of the Replace dialog. This same conceptual split is one of the more annoying "features" of Microsoft Word.


One of the first things I did when I installed TextPad was to change some shortcuts:
  • * Ctrl-F --> Replace... (opens dialog, includes selected text [if any] as search string).
    * Ctrl-G --> Find Next
    * Ctrl-Shift-G --> Find Previous
    * Ctrl-H --> Replace Next
Ctrl-F and Ctrl-G make far more sense to me than F3:
  • * Ctrl-F = Find (and maybe replace).
    * Ctrl-G = find aGain.
    * Ctrl-Shift-G = find aGain the other way (or in reverse).
    * Ctrl-H = Replace and find again. (Why H? Because that's what various applications that use F and G typically use, and I've used that convention for 20 years.)
So Double-click/Ctrl-G and Double-click/Ctrl-Shift-G are automatic. So is Double-click/Ctrl-F/Tab/type replacement string.

I left Find... as F5, since I never us Find... and seldom use the F-keys. If I could delete it from the menu, I would.

Just because F3 is the "official" Windows convention (but for which applications?) doesn't mean it's necessarily the best one. However, you could redefine them as above, but use F3 instead of Ctrl-F and F4/Shift-F4 instead of Ctrl-G/Ctrl-Shift-G. That would at least eliminate the Find dialog in favor or the Find-and-(maybe)-Replace dialog.

- Sam
davebush
Posts: 2
Joined: Tue Jan 11, 2005 1:44 pm

Post by davebush »

It's probably not relevant - but when searching for text that's visible on the screen I always select the text and hit F3 (search next). The only way I could improve on this is to have a default set of RE options rather than the last one I chose in the dialog (as this isn't visible, the RE flag can result in not finding the selected text, which is momentarily confusing)

My personal bugbear is the absence of a back key / button - for the duration of a session I'd like Textpad to remember every arbitrary location I've "jumped" to, and alow me to revisit them in reverse order. Having this on a both a session wide and file wide basis would be a bonus.

My typical edit sequence goes:
Find some code I want to change
Search to check for side effects
Get back to original point.

When I remember I use bookmarks, but it requires remembering an added step. Usually I have to navigate back from first prinicples, which is a pain.
davebush
Posts: 2
Joined: Tue Jan 11, 2005 1:44 pm

Post by davebush »

I'd also like the facility - which seems to me simple - to allow more than one starting point for "Find in Files".

Some of the C projects I work on have multiple include directories. It would be really nice to have a list of all these - so that a search found all the occurrences that compile does.

Also a "special" of "the directory of the currently active window" would be nice.
dmonti
Posts: 5
Joined: Fri Jan 28, 2005 10:19 pm

Hilight color of find

Post by dmonti »

I find the color of found hilighted text hard to read. I would like an option to change the color of the found text.

Thanks
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Re: Hilight color of find

Post by MudGuard »

dmonti wrote:I find the color of found hilighted text hard to read. I would like an option to change the color of the found text.
Why do you not use the existing option to change it?

Found text is selected. Therefore you have to change the colors of selected text (focused or not) in your document classes' color settings.
Clutchplate
Posts: 2
Joined: Tue Feb 15, 2005 3:20 am

Post by Clutchplate »

And just to add to this Find something that no-one has mentioned:

Find the word under cursor!

Having a hotkey (for programmers Ctrl-F3) that grabs the word under the cursor and does a search is invaluable. I don't need the Find Dialog every time. And I don't want to have to highlight the entire word first, let the computer do that work :-)

Please? (I'm really sick of looking at the ASCII chart everytime I try this :-))

Regards,

- Clutchplate
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Start recording a macro
Double click the word with the cursor in it
Press F3
Stop recording the macro giving it some name like SearchWordUnderCursor
Assign Ctrl-F3 to that macro.


Place the cursor in some word, press Ctrl-F3 and be happy :lol:
User avatar
boldan
Posts: 31
Joined: Tue Jul 22, 2003 2:47 pm
Location: Toronto
Contact:

Re: Undo a Replace with regular expressions

Post by boldan »

Andrewr66 wrote:I have been using Replace with Regular expressions a lot.
Still, I seldom manage to write my Find what and Replace With expressions correctly at the first attempt.

What I want is a Undo button in the Replace dialogue!

Is there any better way to do this?
I'd open a new file and save there the strings. Not only that, but this allows you to edit the strings, to save various variants, even to comment them.
Defenestration
Posts: 15
Joined: Sun Jun 27, 2004 5:18 pm

Post by Defenestration »

So my comments/suggestions are not missed I thought I'd list them here as well:

1) Allow Find In Files to search within hidden files/folders (http://www.textpad.info/forum/viewtopic.php?p=20966)

2) Add "Wrap searches" option to Replace dialog (http://www.textpad.info/forum/viewtopic.php?p=20253)
User avatar
srichter1
Posts: 4
Joined: Wed Nov 23, 2005 8:48 pm
Location: Austin, Texas

Post by srichter1 »

I was about to post a new enhancement suggestion about adding a "Scope" of "Bookmarked lines" to the replace function -- glad I searched through the already-posted messages first! I like the proposal to merge find and replace.

You know how, in vi/ex regular expressions, there are two different places in the expression for 1) what you're searching for (i.e., how to find the lines on which you want to do the replacement) and 2) the actual string or expression to replace (and of course, a third place for what to replace it with)?

For example, I want to add a trailing colon on every line that contains the text "PROCEDURE" (no matter what's after it). In vi, I would do

Code: Select all

g/PROCEDURE/s/$/:/
In TextPad, I can do this only by bookmarking all the PROCEDURE lines, and then ... er, that's where I need the enhancement. OK, I know I could use regex to match the whole rest of the line and then substitute it back in with \1, but what a pain!

Wouldn't it be great for the replace dialog box to have three input fields: #1 is what to search for, #2 is what to replace on those targets, and #3 is the replacement string? If you leave box 2 empty, it defaults to the content of box 1.

Anyway, I'm glad I found this list.
ben_josephs
Posts: 2459
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Welcome.

This is a good idea, but the example is not a good one. This particular problem is trivially solved with
Find what: PROCEDURE.*
Replace with: \0:

[X] Regular expression
A better (i.e., harder) example is, perhaps:
For every line containing digits anywhere, insert a space after all commas.
Post Reply