Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#403 missing Find First command

open
nobody
None
5
2011-09-30
2011-09-30
Jarek Czekalski
No

We have Find Next, and Find Prev. What I really miss is Find First. Preferrably both a command and a panel button.

There is another thing I miss, Replace (without Find Next), but that's less useful.

Discussion

  • Robert Schwenn
    Robert Schwenn
    2011-10-02

    1. Isn't "find" the same as Your "find first"?

    2. In Daily Builds the S&R dialog have "Replace" and "Replace & Find" buttons.

     
  • Alan Ezust
    Alan Ezust
    2011-10-02

    One can write a macro that first goes to the top of the file and then invokes find.

     
  • Writing a macro is ok, but it is a workaround. Replace & Find could also be written as a macro, but there is such a builtin. Can you precise whether you would accept extending search dialog?

    Or maybe you could describe how you do your searches? You press find and you don't mind this annoying dialog: "Do you want to search from the beginning"? Then you search again from the beginning and how do you know you searched whole file?

    My idea is following:
    After invoking search dialog you have 2 options:
    enter for find and s+enter (or alt-something) for find first.
    When a message appears "Do you want" you know you searched it all. But what would be even more convenient is ability to switch of the wrap question and change it to a beep ("don't wrap around" option). When one uses "Find first" wrap around dialog could be automatically switched off. That's my vision, but maybe I have wrong habits. Then I'll try to adjust to your proposals.

     
  • Robert Schwenn
    Robert Schwenn
    2011-10-03

    If I want to search from the beginning of the buffer, I set the caret there (CTRL+POS1) before invoking the search. This is absolutely fine for me. Personally, I won't like an extra button for no real extra functionality.

    The search dialog has an option for "Auto wrap". If this option is disabled, the user has to be informed about reaching buffer end. But maybe there could be a global option to show a status message and beep instead of showing a dialog.

    p.s.
    I've bound the F3 key to the macro "Find_Next_Selected.bsh" ( http://community.jedit.org/?q=node/view/1596 ). In common cases this may almost do what You want.

     
  • Robert, thanks for your opinion. I will explain why I disagree with it:

    1. You say that Find First would save me only one click and thus it is not necessary. Similarly Replace & Find Next is not necessary, but we all want it because it's convenient. Not a new functionality, just comfortability.

    2. I do as you advice: go to the beginning of the buffer and invoke search dialog. I type my search phrase and press Find. Ok, but now I want to refine my search, and start again from the beginning. From there it's troublesome to focus the buffer, move to the beginning and Find again. Repeating search from the beginning happens to me frequently when searching for a complicated regular expression.

     
  • Now that I pay attention to why I need Find First I came across another reason:

    3. I highlight text and press C+F. Automatically it becomes search term. If I pressed C+Home before C+F I would have to type it manually. So this workaround doesn't solve this case.

    Sorry for not explaining earlier the difference between Find and Find First. Find means Find Next. Find First - first occurance in scope (buffer or buffers). Maybe it's not so obvious as I thought.