我尝试创建简单的sublime 3
插件:
import sublime, sublime_plugin, os.path
class RelativeCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.insert(edit, 0, sublime.getClipboard())
它必须将当前文件路径插入到当前文件的开头。
我在sublime.getClipboard()
这里找到了方法。
但它失败了:
File "/Users/maks/Library/Application Support/Sublime Text 3/Packages/relative/relative.py", line 7, in run
self.view.insert(edit, 0, sublime.getClipboard())
AttributeError: 'module' object has no attribute 'getClipboard'