Home Download Buy Blog Forum Support

API method to expand Build System Variables

API method to expand Build System Variables

Postby bizoo on Mon Mar 04, 2013 11:11 am

I like to have an API method that expand the Build System Variables what happened when used in the "cmd" tag in the .sublime-build:
Code: Select all
$file_path               The directory of the current file, e. g., C:\Files.
$file                   The full path to the current file, e. g., C:\Files\Chapter1.txt.
$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.
$packages               The full path to the Packages folder.
$project               The full path to the current project file.
$project_path           The directory of the current project file.
$project_name           The name portion of the current project file.
$project_extension       The extension portion of the current project file.
$project_base_name       The name only portion of the current project file.

A method in the View class look the right place to do this.
Some plugins use some kind of "cmd" too and need this kind of vars.
If the internal method is exposed, we don't need to do it by ourself for each plugins.
bizoo
 
Posts: 879
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: API method to expand Build System Variables

Postby wuub on Mon Mar 04, 2013 11:20 am

SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: API method to expand Build System Variables

Postby bizoo on Mon Mar 04, 2013 12:37 pm

:o
Whoa, never thought to do it this way. Very clever.
But very very hacky way to do it, so please jon give us an API method.
bizoo
 
Posts: 879
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: API method to expand Build System Variables

Postby bizoo on Mon Oct 07, 2013 9:00 am

bump.
Please, give us this API.
I've more and more plugins where I need it.
bizoo
 
Posts: 879
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: API method to expand Build System Variables

Postby bizoo on Fri Apr 04, 2014 8:43 am

As I have no more hope to see this feature coming, does anyone have an alternate solution or an implementation of this request ?
I want to execute an external program with the current file in parameters, but "exec" command doesn't expand variables.
bizoo
 
Posts: 879
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 3 guests