-1

I am using the Sublime Text 3 FileBrowser for file navigation on keyboard.

While usually I open files in new tabs, with FileBrowser, it opens On the official documentation (https://packagecontrol.io/packages/FileBrowser), it says:

Open all marked items in new tabs ⌘+enter / ctrl+enter

So when I open a file on 'Enter', it will open in the same split pane as the enter image description here enter image description here I want to change this behavior

So I go to Preferences -> Package Settings -> FileBrowser ->

  1. Settings - Default
  2. Key Bindings - Default (Common)

to look for options I can override in user settings. However, nothing seems right.

Claire
  • 639
  • 9
  • 25

1 Answers1

0

Somehow found an answer while posting the question, so I throw it out first and look for any better ways from the community.

By setting an open directory command in the Key Bindings, it reverts to opening in a new tab as by default.(I set it as a user setting for easier management: Preferences -> Package Settings -> FileBrowser -> Key Bindings - User)

(from the official package page: https://packagecontrol.io/packages/FileBrowser)

[
    {
    "keys": ["f1"],
    "command": "dired",
    "args": {
      "immediate": true,
      "single_pane": true,
      "other_group": "left",
        }
    }
]

Of course, you can bind the "dired" command to any other suitable key, and tweak other behaviors such as putting it left or right.

One thing to note is that this must not be used with

{
  "keys": ["enter"],
  "command": "dired_select", "args": {"and_close": true},
  "context": [
    { "key": "selector", "operator": "equal", "operand": "text.dired" },
    { "key": "setting.dired_rename_mode", "operand": false }
  ]
}

Maybe there are ways to tweak around, so I can both open in new tab on "Enter", and let the browser close automatically after selection. For now, I'm settled for closing it with F1.

Claire
  • 639
  • 9
  • 25