This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Name: MultipleSelectionClearerTopOrBottom | |
# Requirements: Plugin for Sublime Text v2 and v3 | |
# Written by: mattst - https://github.com/mattst | |
# ST Command: multiple_selection_clearer_top_or_bottom | |
# Arg: pos: "top" or "bottom" | |
# Context Key: multiple_selection_clearer_top_or_bottom_key | |
# | |
# This plugin has been designed to be used with specific keys, those being the | |
# same ones as the Move Tab In Group plugin. The context key ensures that this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Command: open_selected_text_in_new_buffer | |
import sublime | |
import sublime_plugin | |
class OpenSelectedTextInNewBufferCommand(sublime_plugin.TextCommand): | |
""" | |
A Sublime Text plugin to create a new buffer, possibly in a new window, | |
which contains the selected text from the current buffer (if any). The |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# My enhanced version of the default ST paste_from_history.py plugin. | |
# | |
# Alterations to do the following: | |
# | |
# 1) Select the paste to text from an overlay instead of a pop-up menu. | |
# 2) Allow operation from widgets, i.e. console and input panel. | |
# 3) Ensure that text copied or cut with my various copy_and_cut_text | |
# plugins gets added to the ClipboardHistory storage list. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Proof of concept; retrieve the path of the syntax that a user has | |
# associated with any file extension in Sublime Text. | |
# | |
# 1) Create a temp file with the file extension of the desired syntax. | |
# 2) Open the temp file in ST with the API `open_file()` method; use a | |
# sublime.TRANSIENT buffer so that no tab is shown on the tab bar. | |
# 3) Retrieve the syntax ST has assigned to the view's settings. | |
# 4) Close the temp file's ST buffer. | |
# 5) Delete the temp file. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Name: MoveTabInGroup | |
# Requirements: Plugin for Sublime Text v2 and v3 | |
# Written by: mattst - https://github.com/mattst | |
# ST Command: move_tab_in_group | |
# Arg Required: direction: "left" or "right" | |
# Description: An ST plugin to move the active buffer's | |
# tab left and right on the tab bar. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# MIT License | |
# | |
# To use, assign keys to the "focus_most_recent_tab_closer" command, e.g. | |
# {"keys": ["ctrl+k", "ctrl+w"], "command": "focus_most_recent_tab_closer"}, | |
# | |
import sublime | |
import sublime_plugin | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Name: Expand Selection By Expression | |
# Author: mattst@i-dig.info | |
# Requires: Sublime Text v3 | |
# | |
# ST Command: expand_selection_by_expression | |
# Optional Arg: expression_type --> "regex" (default), "literal" | |
# Optional Arg: case_sensitive --> boolean (default is false) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Name: JumpToCharSeq (Jump To Character Sequence) | |
# Author: mattst@i-dig.info | |
# Requires: Sublime Text v3 | |
# | |
# ST Command: jump_to_char_seq | |
# Optional Arg: direction --> "forwards" (default), "backwards" | |
# Optional Arg: case_sensitive --> boolean (default is false) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Name: JumpToCharSeq (Jump To Character Sequence) | |
# Requirements: Plugin for Sublime Text v.3 | |
# Written by: mattst@i-dig.info | |
# | |
# ST Command: jump_to_char_seq | |
# | |
# Optional Arg: direction | |
# ----------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following methods are part of a project and are not stand-alone code. As | |
# such anyone wishing to re-use the code will have to modify it, note the use of | |
# the class variables `self.active_window` and `self.active_view` which would | |
# need to be changed to valid instances of the active `window` and `view`. | |
def set_syntax(self, path): | |
""" | |
Sets the syntax associated with the file extension of path. | |
There is no method to get the syntax of a file extension in the ST API. |