ST3
arch()
# =>
String
Returns the CPU architecture, which may be "x32" or "x64"
arch()
# =>
str
Returns the CPU architecture, which may be "x32" or "x64"
Decodes a JSON string into an object. If the string is invalid, a ValueError will be thrown.
encode_value(value, <pretty>)
# =>
str
Encode a JSON compatible value into a string representation. If pretty is set to True, the string will include newlines and indentation.
Expands any variables in the string value using the variables defined in the dictionary variables. value may also be a list or dict, in which case the structure will be recursively expanded. Strings should use snippet syntax, for example: expand_variables("Hello, ${name}", {"name": "Foo"})
find_resources(pattern)
# =>
[str]
Finds resources whose file name matches the given pattern.
get_clipboard()
# =>
String
Returns the contents of the clipboard.
get_clipboard(<size_limit>)
# =>
str
Returns the contents of the clipboard. size_limit is there to protect against unnecessarily large data, defaults to 16,777,216 characters
installed_packages_path()
# =>
String
Returns the path where all the user's *.sublime-package files are.
installed_packages_path()
# =>
str
Returns the path where all the user's .sublime-package files are located.
load_binary_resource(name)
# =>
bytes
Loads the given resource. The name should be in the format Packages/Default/Main.sublime-menu.
load_resource(name)
# =>
str
Loads the given resource. The name should be in the format Packages/Default/Main.sublime-menu.
load_settings(base_name)
# =>
Settings
Loads the named settings. The name should include a file name and extension, but not a path. The packages will be searched for files matching the base name, and the results will be collated into the settings object. Subsequent calls to load_settings with the name base_name will return the same object, and not load the settings from disk again.
Loads the named settings. The name should include a file name and extension, but not a path. The packages will be searched for files matching the base_name, and the results will be collated into the settings object. Subsequent calls to load_settings() with the base_name will return the same object, and not load the settings from disk again.
log_commands(flag)
# =>
None
Controls command logging. If enabled, all commands run from key bindings and the menu will be logged to the console.
log_input(flag)
# =>
None
Controls input logging. If enabled, all key presses will be logged to the console.
log_result_regex(flag)
# =>
None
Controls result regex logging. This is useful for debugging regular expressions used in build systems.
ok_cancel_dialog(string, <ok_button>)
# =>
bool
Displays an ok / cancel question dialog to the user. If ok_button is provided, this may be used as the text on the ok button. Returns True if the user presses the ok button.
ok_cancel_dialog(string, <ok_title>)
# =>
bool
Displays an ok / cancel question dialog to the user. If ok_title is provided, this may be used as the text on the ok button. Returns True if the user presses the ok button.
packages_path()
# =>
String
Returns the base path to the packages.
packages_path()
# =>
str
Returns the path where all the user's loose packages are located.
platform()
# =>
String
Returns the platform, which may be "osx", "linux" or "windows"
platform()
# =>
str
Returns the platform, which may be "osx", "linux" or "windows"
run_command(string, <args>)
# =>
None
Runs the named ApplicationCommand with the (optional) given arguments.
run_command(string, <args>)
# =>
None
Runs the named ApplicationCommand with the (optional) given args.
save_settings(base_name)
# =>
None
Flushes any in-memory changes to the named settings object to disk.
score_selector(scope, selector)
# =>
Int
Matches the selector against the given scope, returning a score. A score of 0 means no match, above 0 means a match. Different selectors may be compared against the same scope: a higher score means the selector is a better match for the scope.
score_selector(scope, selector)
# =>
int
Matches the selector against the given scope, returning a score. A score of 0 means no match, above 0 means a match. Different selectors may be compared against the same scope: a higher score means the selector is a better match for the scope.
set_timeout(callback, delay)
# =>
None
Calls the given callback after the given delay (in milliseconds). Callbacks with an equal delay will be run in the order they were added. It is safe to call setTimeout from multiple threads.
set_timeout(callback, delay)
# =>
None
Runs the callback in the main thread after the given delay (in milliseconds). Callbacks with an equal delay will be run in the order they were added.
set_timeout_async(callback, delay)
# =>
None
Runs the callback on an alternate thread after the given delay (in milliseconds).
status_message(string)
# =>
None
Sets the message that appears in the status bar.
version()
# =>
String
Returns the version number
version()
# =>
str
Returns the version number
yes_no_cancel_dialog(string, <yes_title>, <no_title>)
# =>
int
Displays a yes / no / cancel question dialog to the user. If yes_title and/or no_title are provided, they will be used as the text on the corresponding buttons on some platforms. Returns sublime.DIALOG_YES, sublime.DIALOG_NO or sublime.DIALOG_CANCEL.
Generated from the official documentation on Sat Oct 29 20:16:51 EEST 2016 by Leonid Shevtsov.