How to use sidebar with the keyboard in Sublime Te

2019-03-07 10:58发布

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?

11条回答
欢心
2楼-- · 2019-03-07 10:58

For sublime text 3 use Ctrl+K+B

Press and hold Ctrl then Press and holdK and then Press and holdB

查看更多
▲ chillily
3楼-- · 2019-03-07 11:04

For Sublime Text 2 (and also Sublime Text 3) on Windows use Ctrl+0 to focus on the side bar, and use Ctrl+1 or Esc key to focus on the editor. And if it didn't work, use those 0 and 1 keys that exist in the numeric keys row under the function keys row rather than those 0 and 1 keys that exist in the numeric keypad of the keyboard. This image may demonstrate better: http://en.wikipedia.org/wiki/File:Qwerty.svg

查看更多
\"骚年 ilove
4楼-- · 2019-03-07 11:04

I actually had the same issue, the fact that I had to trigger the reveal in side bar and then move focus to the sidebar, alongside with the fact that if the file's folder was already unfolded the focus would move to the sidebar's top, all this made me write a new plugin to reveal the file in sidebar and then move focus to there, making it a lot easier to navigate the sidebar with keyboard arrows, give it a try =)

https://github.com/miguelgraz/FocusFileOnSidebar

查看更多
迷人小祖宗
5楼-- · 2019-03-07 11:04

Another option is to use the FileBrowser package, which gives you many more actions and can be modified to your needs.

https://packagecontrol.io/packages/FileBrowser

enter image description here

查看更多
时光不老,我们不散
6楼-- · 2019-03-07 11:07

Ctrl+p is also really useful for opening files without using the mouse.

If you open a folder in Sublime all the files in that folder (and files in contained folders) will show up in the search you get with Ctrl+p.

Just hit Ctrl+p and start typing parts of the filename and you'll get a list of matches.

查看更多
唯我独甜
7楼-- · 2019-03-07 11:07

In Sublime Text2, press keys in following format "Ctrl+k+b" and it will work on ubuntu.

It worked on my machine (v14.04 LTS)

查看更多
登录 后发表回答