Sublime Forum

What is $file_base_name in Build Systems?

#1

According to the docs:

$file: The full path to the current file, e. g., C:\Files\Chapter1.txt.
$file_path: The directory of the current file, e. g., C:\Files.
$file_name: The name portion of the current file, e. g., Chapter1.txt.
$file_extension: The extension portion of the current file, e. g., txt.
$file_base_name: The name only portion of the current file, e. g., Document.

In the context here I have absolutely no idea what “Document” is, where it came from, or even what it could refer to.

I’m trying to make sense of how to use the Build System to compile programs on Windows because sadly I cannot get the sublimeclang plugin to work (I am the author of issue 122 on that project on Github). The plugin works beautifully on my Macbook but clang doesn’t seem to be mature enough on windows.

0 Likes

#2

On my Build 2218 on Win7 it’s the name of the .sublime-build file itself:

toto.sublime-build -> toto

But I think it’s a bug.
It must probably be the basename of the current file.

0 Likes