def retarget_all_views(source, destination):
if source[-1] != os.path.sep:
source += os.path.sep
if destination[-1] != os.path.sep:
destination += os.path.sep
for window in sublime.windows():
for view in window.views():
filename = view.file_name()
if os.path.commonprefix([source, filename]) == source:
view.retarget(
os.path.join(destination, filename[len(source):])
)
评论列表
文章目录