Sublime Text 2 - Link with Editor / Show file in sidebar

后端 未结 5 1681
时光取名叫无心
时光取名叫无心 2020-12-13 01:59

I\'m looking for a feature like Eclipse\'s Link with Editor. Basically, I want whatever file I\'m editing to be shown in its place in the file tree.

5条回答
  •  离开以前
    2020-12-13 02:15

    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

提交回复
热议问题