aziz / SublimeFileBrowser

Ditch sidebar and browse your files in a normal tab with keyboard, like a pro!
MIT License
395 stars 45 forks source link

escape to close browser? #118

Closed sammcj closed 8 years ago

sammcj commented 8 years ago

This may sound like a stupid question, but other than selecting a file and hitting enter to open it, how do you close the file browser?

I would have expected that escape would do it, but no?

vovkkk commented 8 years ago
  1. It is normal tab, so any default keys will do, e.g. on Windows ctrl+w
  2. If you launch browser with "other_group" argument while existing browser is focused it will be closed (the behaviour is supposed to mimic toggle sidebar)
  3. You can bind escape in you user keybindings file:

    {
       "keys": ["escape"],
       "command": "close_file",
       "context": [
           { "key": "selector", "operator": "equal", "operand": "text.dired" },
           { "key": "setting.dired_rename_mode", "operand": false },
           { "key": "num_selections", "operator": "equal", "operand": 1 },
           { "key": "has_next_field", "operator": "equal", "operand": false },
           { "key": "has_prev_field", "operator": "equal", "operand": false },
           { "key": "panel_visible", "operator": "equal", "operand": false },
           { "key": "overlay_visible", "operator": "equal", "operand": false },
           { "key": "auto_complete_visible", "operator": "equal", "operand": false }
       ]
    }
sammcj commented 8 years ago

Brilliant answer, thank you so much for your time @vovkkk 👍