python #SublimeText #Sublime:自动在侧边栏中显示文件

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python #SublimeText #Sublime:自动在侧边栏中显示文件相关的知识,希望对你有一定的参考价值。

# Plugin to show active file in left sidebar
# 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

# From http://stackoverflow.com/questions/9241845/sublime-text-2-link-with-editor-show-file-in-sidebar

以上是关于python #SublimeText #Sublime:自动在侧边栏中显示文件的主要内容,如果未能解决你的问题,请参考以下文章

无法让 subl 命令在 OSX 终端中工作 [重复]

Macbook Pro下安装subl命令,快速使用sublime打开代码

Macbook Pro下安装subl命令,快速使用sublime打开代码

Subl 命令不起作用 - 找不到命令

python用啥编辑器

sublime text2在windows中以命令行启动