Sublime Forum

Up/Down arrow keys in find box?

#1

I’ve been using sublime for a week, and just spent a couple of hours doing serious find/replace (refactoring a 15,000 line XML file).

In the find box, the up/down arrow moves through my find history. A complete pain in the ass with multi-line search queries. I had to reach for the mouse to move the cursor then back to the keyboard every couple of seconds, for two hours.

How can I disable this “feature”?

0 Likes

#2

I second this.

I do tons of multiline search queries, and it is always a huge pain in the rear when I’m in the middle of editing the query, hit the up arrow to edit something in the previous line in the query, and POOF! my query is gone, replaced by whatever I last searched for.

How can I change the keybindings for this? Maybe I can use [ctrl] plus the arrows for moving through my search query history.

0 Likes

#3

Add me to the list of people often accidentally losing my (sometimes arduously crafted regex) search by accidentally hitting the up arrow.

Does anyone use the browse-past-searches-by-arrow-keys feature often enough to warrant this shortcut? Perhaps it could be a dropdown that shows when you hit arrow down (on the last line if it’s multiline).

0 Likes

#4

Any luck with disabling this behavior?

0 Likes

#5

Me too.

0 Likes

#6

What I expect it to do, and what I think it should do, is just include the expression that’s currently underway as the most recent entry in the past-searches list rather than wiping it out with a single keystroke. So that I can do something like:

  1. starts typing regex
  2. Wait, didn’t I just search for this yesterday?
  3. up arrow for a while
  4. Oh, no, that was something else.
  5. down arrow back to the bottom
  6. continues on regex started in step 1

That said, even having the up and down arrows disabled entirely would be miles better than what happens now.

1 Like

#7

YESSSS! This drives me crazy!!!

0 Likes

#8

Doesn’t the text come back when you hit down arrow? It does for me.

0 Likes

#9

The words do not come back unless there has been a prior search that was exactly the same.

0 Likes

#10

Just double-checked this. When you change the entry at the very bottom of the history, then SublimeText remembers any changes if you do arrow up and arrow down. However, if you edit an entry already in the list, then changes are lost. Seem a bit inconsistent.

This is in version 2.0.1 (build 2217)

0 Likes

#11

Agreed. While I understand the U/D arrows are for browsing search history when the find input box is in focus, I too would love the ability to modify this. But as it’s been a year I suppose it is pretty unlikely.

0 Likes

#12

I also second this. It would be great to be able to disable this behaviour. My prefered behaviour:

  1. Ctrl+F -> activates the search box
  2. Typing the search pattern and hit Enter -> finds the first occurrence and moves cursor to the text in the file
  3. Pressing up or down arrow -> moves cursor to the line above or below the found occurrence

I’m sure there can be other ways to navigate search history without compromising the up and down arrows, for example combining them with ctrl or alt.

it is really a pain to have to use the mouse every time to click on the file to change focus out of the search box. Not user-friendly at all.

Cheers, Manuel

0 Likes

#13

After almost 2 years, I guess we have an option for arrow keys, right? I guess not… Like others said, arrow keys should move the cursor, not change the search value. I don’t want to press ESC key every time I need to move the cursor. This is the number 1 worst thing in Sublime 3. Come on now!

0 Likes

Mapping keybindings besides up and down to navigate the previous history in find and find-in-files
#14

On the rare occasions when I need to scroll through previous searches terms, I can easily click on the search bar and then use the up/down arrows. But I rarely need to do that. Instead, what I do much more often is search, then navigate around that area.

So after searching, users should be able to navigate immediately by using the up and down arrow keys, the page up and down keys, CRTL Home, and CTRL End. The focus should not remain in the search bar.

There should be a way to modify the current default behavior. After all, customizability is one of the key strengths of Sublime Text.

0 Likes

#15

not that userecho is used any more, but there is a request for this here: https://sublimetext.userecho.com/topics/4806-allow-scrolling-while-find-panel-is-shown/ and https://sublimetext.userecho.com/topics/33-definitions-to-configure-updown-history-key-bindings-on-find-panel/

0 Likes

#16

This drives me crazy and is probably the one thing that makes me hesitant to switch to Sublime Text. I search for some string, eventually find the specific line I want, accidentally hit up/down attempting to navigate to a nearby line, accidentally trigger a search for a different string, and lose my place in the document, forcing me to start over.

That is crazy. Is there any chance anything is ever going to be done about this?

0 Likes

#17

maybe vote on this issue in case it helps persuade the devs to look at it sooner:

0 Likes

#18

While that issue would mitigate the problem of losing your search query, it doesn’t solve the problem of losing your place in the document.

I’ve filed a separate issue: https://github.com/SublimeTextIssues/Core/issues/2169

0 Likes