ST3
active_panel()
# =>
str or None
Returns the name of the currently open panel, or None if no panel is open. Will return built-in panel names (e.g. "console", "find", etc) in addition to output panels.
active_view_in_group(group)
# =>
View
Returns the currently edited view in the given group.
Returns the view associated with the named output panel, creating it if required. The output panel can be shown by running the show_panel window command, with the panel argument set to the name with an "output." prefix.
The optional unlisted parameter is a boolean to control if the output panel should be listed in the panel switcher.
destroy_output_panel(name)
# =>
None
Destroys the named output panel, hiding it if currently open.
extract_variables()
# =>
dict
Returns a dictionary of strings populated with contextual keys:
packages, platform, file, file_path, file_name, file_base_name, file_extension, folder, project, project_path, project_name, project_base_name, project_extension. This dict is suitable for passing to sublime.expand_variables().
Finds the named file in the list of open files, and returns the corresponding View, or None if no such file is open.
Returns the view associated with the named output panel, or None if the output panel does not exist.
focus_group(group)
# =>
None
Makes the given group active.
focus_group(group)
# =>
None
Makes the given group active.
focus_view(view)
# =>
None
Switches to the given view.
focus_view(view)
# =>
None
Switches to the given view.
folders()
# =>
[String]
Returns a list of the currently open folders.
folders()
# =>
[str]
Returns a list of the currently open folders.
get_output_panel(name)
# =>
View
Returns the view associated with the named output panel, created it if required. The output panel can be shown by running the show_panel window command, with the panel argument set to the name with an "output." prefix.
get_tabs_visible()
# =>
bool
Returns True if tabs will be shown for open files.
get_view_index(view)
# =>
(group, index)
Returns the group, and index within the group of the view. Returns -1 if not found.
get_view_index(view)
# =>
(int, int)
Returns the group, and index within the group of the view. Returns -1 if not found.
is_sidebar_visible()
# =>
bool
Returns True if the sidebar will be shown when contents are available.
is_status_bar_visible()
# =>
bool
Returns True if the status bar will be shown.
Returns all locations where the symbol is defined across files in the current project.
Returns all locations where the symbol is defined across open files.
new_file()
# =>
View
Creates a new file. The returned view will be empty, and its is_loaded method will return True.
Creates a new file. The returned view will be empty, and its is_loaded() method will return True.
open_file(file_name, <flags>)
# =>
View
Opens the named file, and returns the corresponding view. If the file is already opened, it will be brought to the front. Note that as file loading is asynchronous, operations on the returned view won't be possible until its is_loading() method returns False.
The optional flags parameter is a bitwise combination of:
Opens the named file, and returns the corresponding view. If the file is already opened, it will be brought to the front. Note that as file loading is asynchronous, operations on the returned view won't be possible until its is_loading() method returns False.
The optional flags parameter is a bitwise combination of:
panels()
# =>
[str]
Returns a list of the names of all panels that have not been marked as unlisted. Includes certain built-in panels in addition to output panels.
project_data()
# =>
dict
Returns the project data associated with the current window. The data is in the same format as the contents of a .sublime-project file.
project_file_name()
# =>
str
Returns name of the currently opened project file, if any.
run_command(string, <args>)
# =>
None
Runs the named WindowCommand with the (optional) given arguments.
run_command(string, <args>)
# =>
None
Runs the named WindowCommand with the (optional) given args. This method is able to run any sort of command, dispatching the command via input focus.
set_minimap_visible(flag)
# =>
None
Controls the visibility of the minimap.
set_project_data(data)
# =>
None
Updates the project data associated with the current window. If the window is associated with a .sublime-project file, the project file will be updated on disk, otherwise the window will store the data internally.
set_sidebar_visible(flag)
# =>
None
Sets the sidebar to be shown or hidden when contents are available.
set_status_bar_visible(flag)
# =>
None
Controls the visibility of the status bar.
set_tabs_visible(flag)
# =>
None
Controls if tabs will be shown for open files.
set_view_index(view, group, index)
# =>
None
Moves the view to the given group and index.
set_view_index(view, group, index)
# =>
None
Moves the view to the given group and index.
show_input_panel(caption, initial_text, on_done, on_change, on_cancel)
# =>
View
Shows the input panel, to collect a line of input from the user. on_done and on_change, if not None, should both be functions that expect a single string argument. on_cancel should be a function that expects no arguments. The view used for the input widget is returned.
Shows the input panel, to collect a line of input from the user. on_done and on_change, if not None, should both be functions that expect a single string argument. on_cancel should be a function that expects no arguments. The view used for the input widget is returned.
show_quick_panel(items, on_done, <flags>)
# =>
None
Shows a quick panel, to select an item in a list. on_done will be called once, with the index of the selected item. If the quick panel was cancelled, on_done will be called with an argument of -1.
Items may be an array of strings, or an array of string arrays. In the latter case, each entry in the quick panel will show multiple rows.
Flags currently only has one option, sublime.MONOSPACE_FONT
show_quick_panel(items, on_done, <flags>, <selected_index>, <on_highlighted>)
# =>
None
Shows a quick panel, to select an item in a list. on_done will be called once, with the index of the selected item. If the quick panel was cancelled, on_done will be called with an argument of -1.
items may be a list of strings, or a list of string lists. In the latter case, each entry in the quick panel will show multiple rows.
flags is a bitwise OR of sublime.MONOSPACE_FONT and sublime.KEEP_OPEN_ON_FOCUS_LOST
on_highlighted, if given, will be called every time the highlighted item in the quick panel is changed.
views_in_group(group)
# =>
[View]
Returns all open views in the given group.
Generated from the official documentation on Sat Oct 29 20:16:49 EEST 2016 by Leonid Shevtsov.