我发现了这个:https://github.com/kigiri/sublime-header-42
我放了包文件夹但是当我按ctrl + shift + h时,标题不会出现。
我该如何解决这个问题?
(我的操作系统:W8)
答案 0 :(得分:0)
我相信它与开箱即用的Windows不兼容,当我尝试安装它时,我在Sublime的控制台中出现此错误:
Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 550, in run_
return self.run(edit, **args)
File "C:\Users\Thibaut\AppData\Roaming\Sublime Text 3\Packages\sublime-header-42-master\Header.py", line 142, in run
self.view.replace(edit, line, self.generate(project))
File "C:\Users\Thibaut\AppData\Roaming\Sublime Text 3\Packages\sublime-header-42-master\Header.py", line 109, in generate
created = "Created: " + self.get_date() + " " + self.get_user()
File "C:\Users\Thibaut\AppData\Roaming\Sublime Text 3\Packages\sublime-header-42-master\Header.py", line 82, in get_user
return os.environ['USER']
File "./os.py", line 676, in __getitem__
KeyError: 'USER'
Windows 8+上没有USER
环境变量,因此如果您想使用它,您可能需要稍微更新一下脚本。只需将os.environ['USER']
替换为os.environ['USERNAME']
即可。但