2

I work on two computers where the fullpath of the working folders are different. My current settings file is as follows:

{
    "folders":
    [
        {
            "path": "fullpath_to_working_folder",
        }
    ]
}

I want this folder to be changed when I switch to my other machine. I would be happy if there were a way to write an if statement but I don't know how to do it. Any recommendations?

4

1 回答 1

3

假设您使用的两台计算机上的路径的后半部分完全相同:也可以在.sublime-workspace文件中使用相对路径(而不是完整路径),如文档中所述:

该路径可能是相对于项目目录的,也可能是完全限定的路径。

您可以完全按照已有的方式使用它;只需放置相对路径而不是fullpath_to_working_folder(最好说有一个多余的逗号,但可能是错字)。

您还可以使用name设置,file_exclude_patterns设置等...

于 2013-05-15T13:12:37.203 回答