Sublime Forum

Folder path in sublime text build system

#1

My sublime project looks like this:

[code]{
“folders”:

    {
        "folder_exclude_patterns":
        
            ".bzr",
            "build",
            "webapps",
            "work",
            ".settings"
        ],
        "path": "/home/charles/project/Editor/trunk"
    }
],
"settings":
{
    "build_on_save": true,
    "filename_filter": "\\.(java)$",
    "tab_size": 4,
    "translate_tabs_to_spaces": false
},
"build_systems":

    {
        "name": "compile",
        "cmd": "ant", "-f", "dev.xml", "compile"]
    }
]

}[/code]

When I save a file the console says:

Buildfile: dev.xml does not exist! Build failed [Finished in 0.2s with exit code 1]
I know that I need to put something before dev.xml but I don’t know what.

I found some possibilities here: sublimetext.info/docs/en/referen … #variables

But What I need is the folder path

in my case…

Any idea how I can achieve this?

0 Likes

#2

Where do you save your .sublime-project file? Is this xml file located by “/home/charles/project/Editor/trunk/dev.xml”? U can not really access your open folders because that could be many. That’s why you usually save your project file in the “main root directory” and that way you could use “$project_path/dev.xml”.

Here is a more up-to-date version of the docs (even though there probably didn’t change too much): docs.sublimetext.info/en/latest/ … -variables

0 Likes