B
B
burdin2016-01-12 21:16:09
Sublime Text
burdin, 2016-01-12 21:16:09

How to properly configure the FileBrowser plugin in SublimeText 3?

There is an interesting FileBrowser plugin for SublimeText, which allows you to almost completely eliminate the mouse when working with the editor.
According to the description, I make settings in the "Key Bindings - User" section
Opening the file panel in the left window using F1, and closing the panel when pressing the Enter key on the selected file (with subsequent opening of this file for editing):

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

The screen on the laptop is small, I don’t use groups and splitting into several columns / lines.
I need to see one editable field with a file on the screen, switching between open files is just "jumping over tabs".
If you need to open a new file - just press F1, select the desired file, press Enter ... The FileBrowser panel should close, and the file should open in a single editing window.
I expected to get this behavior by applying the above settings. But it was not there. The first time, on F1, FileBrowser opens normally, on the left. I select a file, I press Enter, FileBrowser closes but leaves the window on the left open and places the opening file there. Thus, the screen is divided into 2 editing areas with two files. And I don't need that. And if you immediately press F1 again - FileBrowser will open on the right ... In general, it turns out a mess.
Please tell me the correct settings for keybinding. And also maybe some other settings to stop unauthorized splitting of the screen.
(the plugin is great, I really want to use it)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Ryabykin, 2016-05-10
@geesoff

A bit late, maybe, but here's the solution:

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

If it's still crooked, then download from here and install it yourself by going to the C:\Users\USERNAME\AppData\Roaming\Sublime Text 3\Packages
folder and unzip the "SublimeFileBrowser-master" folder from the archive, removing "-master" from titles.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question