Unsolved "Interactive" search
-
I'm loving Qt Creator - thank you! I'm using version 4.10.1 on Windows 10.
When I search, I press Ctrl+f and if I'm on a word, it is copied into the search field and copies of that word are highlighted.
To move to the next or previous copy of the word, I have to press F3 or Shift+F3 respectively.
I would rather not take my hands off the keyboard home row. I'd like to press Ctrl+f and Shift+Ctrl+f to move to the next or previous copy of the word.
Furthermore, if I continue to type, the text should go into the search term.
I haven't figured out how to do this.
Help and thanks in advance!
-
@Harjit You can customise keyboard shortcuts in Tools/Options.../Environment/Keyboard.
-
Since Ctrl+f is assigned to FindInCurrentDocument, it cannot be assigned to FindNext.
-
@Harjit Are you sure? Did you try to assign something else to FindInCurrentDocument first?
-
Thank you for the suggestion.
What I tried was leave Ctrl+f assigned to FindInCurrentDocument and then also assign it to FindNext.
Unfortunately, this didn't work.
What I'm trying to accomplish is using the same key combination to initiate the search then keep finding the string.
I made a mistake in my title. It should be "Incremental search". Here is an blurb from the description in Emacs:
C-s starts an incremental search. C-s reads characters from the keyboard and positions the cursor at the first occurrence of the characters that you have typed. If you type C-s and then
F
, the cursor moves right after the firstF
Type anO
, and see the cursor move to after the firstFO
. After anotherO
, the cursor is after the firstFOO
after the place where you started the search. At each step, the buffer text that matches the search string is highlighted, if the terminal can do that; at each step, the current search string is updated in the echo area.If you make a mistake in typing the search string, you can cancel characters with DEL. Each DEL cancels the last character of search string. This does not happen until Emacs is ready to read another input character; first it must either find, or fail to find, the character you want to erase. If you do not want to wait for this to happen, use C-g as described below.
When you are satisfied with the place you have reached, you can type RET, which stops searching, leaving the cursor where the search brought it. Also, any command not specially meaningful in searches stops the searching and is then executed. Thus, typing C-a would exit the search and then move to the beginning of the line. RET is necessary only if the next command you want to type is a printing character, DEL, RET, or another control character that is special within searches (C-q, C-w, C-r, C-s, C-y, M-y, M-r, or M-s).
Sometimes you search for
FOO
and find it, but not the one you expected to find. There was a secondFOO
that you forgot about, before the one you were aiming for. In this event, type another C-s to move to the next occurrence of the search string. This can be done any number of times. If you overshoot, you can cancel some C-s characters with DEL.After you exit a search, you can search for the same string again by typing just C-s C-s: the first C-s is the key that invokes incremental search, and the second C-s means "search again."