4

In Sublime Text 3 there is a keybinding for the find advanced panel:

{ "keys": ["ctrl+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} }

However, in my case more often then not, I want to search the parent containing folder - or a very specific folder.

The "In Parent Folder" option is found when right+click on a folder in the sidebar and selecting: Find Advanced->In Parent Folder...

In the other case (specific folder) the consistent Where value is:

C:\Users\Aziz\Dropbox\RAL\WP Development\plugins\ral-files

Is there a command to setup a key binding for each of these situations?

Thank you much!

4 Answers 4

0

tl;dr: Don't think you can do it...

Came here for the same answer and after some pondering, I might realized why this might not exist.

So this is kind of late but so far as I can tell, you might be conflating a non-native Sublime functionality with native.

"Find in Parent Folder" becomes available to you only after installing the Sublime plugin "Sidebar Enhancements". Now I don't think you can map key bindings to 3rd party functions, but I would love to know how.

Please someone tell me where I'm wrong.

2
  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. Jun 19, 2017 at 20:21
  • You can - see my answer below.
    – Tim Kelty
    Sep 22, 2017 at 16:47
0

Install SideBarEnhancements: https://packagecontrol.io/packages/SideBarEnhancements

Add this to your keymap (adjusting whatever you want the keys to be):

{ "keys": ["ctrl+super+r"], "command": "reveal_in_side_bar" },

1
  • It maps it to a key binding.
    – Tim Kelty
    Sep 22, 2017 at 16:47
0

Using sidebar Enhancements plugin I was able to map "find advanced - In Project" with the following shortcut

{
"keys": ["f10"],
"id": "side-bar-find-project-folder",
"command": "side_bar_find_in_project_folder",
"args": {
    "paths": []
}

I got the code from the example on the plugin page and the specific command from the guthub page https://github.com/SideBarEnhancements-org/SideBarEnhancements/blob/st3/Side%20Bar.sublime-menu

EDIT: you must have an open file that belongs to the project, in which you want to search, otherwise it won't work.

0

I was able to map it directly, using:

{
    "keys": ["ctrl+alt+f"],
    "command": "side_bar_find_in_parent",
    "args": {
        "paths": []
    }
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .