def retarget_view(source, destination):
source = os.path.normcase(os.path.abspath(source))
destination = os.path.normcase(os.path.abspath(destination))
for window in sublime.windows():
for view in window.views():
path = os.path.abspath(view.file_name())
if os.path.normcase(path) == source:
view.retarget(destination)
评论列表
文章目录