用习惯了eclipse 的link with editor 功能,再使用sublime 时略感不便,随搜索了以下解决方案:
- 插件
SyncedSideBar
可用,已亲测 - 文本中任意位置右击,选择
reveal_in_side_bar
可用,不过对当前文档有效,打开其他文档,还要再来一遍;此方法也可设置个快捷键,代码如下{ "keys": ["ctrl+shift+r"], "command": "reveal_in_side_bar" }
There is a simpler option to automate this: Create a new Plugin:
Menu Tools->New pluguin and save this:
import sublime, sublime_plugin
class SideBarListener(sublime_plugin.EventListener):
def on_activated(self, view):
view.window().run_command('reveal_in_side_bar')
The folder where to save this is selected by default, and extension (.py) also is added by default.
On windows, the folder is C:\Users\username\AppData\Roaming\Sublime Text 2\Packages\User
That’s quite usefull to modify a saved pluggin