When using Sublime Text 2 we tend to open the side bar to navigate thru files/folders in our projects. For that we can use the hotkey ctrl+k ctrl+b (in windows).
However, once we're in the side bar, we can't use it with keyboard (arrows for instance). We have to stick using it with our own mouse...
Just a note: I installed SideBarEnhancements plugin, but I didn't find anything that could solve my problem.
Any solution you might know?
I didn't find any other complete answers, so I pulled together information from various answers and added a bit of my own.
@Santiago Agüero The part you were missing was that the sidebar needs focus before the arrow keys will work (Ctrl+0).
As far as I can know, these shortcuts all work in Sublime 3, as well as Sublime 2.
One caveat: these assume you are using the default keybindings. But you can easily customize the keybindings by opening
Preferences > Key Bindings - User
and copying over lines fromPreferences > Key Bindings - Default
, changing thekeys
value as needed. E.g.,P.S. To get the fancy-looking keyboard glyphs, use the
<kbd>
HTML tag. E.g.,<kbd>Key</kbd>
will turn into Key. (Thanks to https://meta.stackexchange.com/questions/5527) :)You can type Ctrl+0 (Ctrl+Zero) to focus on the side bar.
Then you'll be able to move selection among files with arrow keys and to open the selected file hitting Enter, without touching the mouse.
Summary
Ctrl + 0
will navigate to your sidebar. By default you can navigate the folders with your arrow keys. If you prefer 'Vim' type settings, you can avoid using the arrow keys by remapping your keys to the typical Vim settings (hjkl).Key mappings
To set this up, open
Preferences > Key Bindings - User
and add the following:Another useful shortcut: ctrl + k Together with ctrl + b will show/hide the sidebar. Make sure you hit K and B in the right order
You have to add a folder to the Sublime Text window in order to navigate via the sidebar. Go to File -> Open Folder... and select the highest directory you want to be able to navigate.