Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the Sublime Text 2 "Find in Files" results, a box is drawn around wherever your search term appears. Double clicking within that box opens the file and focuses your cursor on that line.

Is there any way to achieve this using only your keyboard?

I understand you could use cmd+p to open file then ctrl+g to goto line, but I was hoping there was a single combo you could use to go directly to the result, like the double click offers.

share|improve this question
up vote 6 down vote accepted

Normally F4 & Shift + F4 are used for cycling through found results. But if you set your cursor position to one line upper of what you want to go and press F4 it opens the file and sets your cursor position to start of that line.

And if you want to change shortcut put this in your "Default (OSX).sublime-keymap" file in User directory and change F4 to shortcut you want:

{ "keys": ["f4"], "command": "next_result" }

Edit: Just noticed Shift + F4 goes to right result (as long as cursor is not at first column of line. In that case previous result shows up) even if your cursor is 'at' the results itself. So that's better for this question.

Second edit: "User" directory is "/Users/Username/Library/Application Support/Sublime Text 2/Packages/User" which also can be accessed through Sublime Text 2 (Command Palette (Super + Shift + P) or through menu (Sublime Text 2 > Preferences > Browse Packages...))

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.