Skip to content

Instantly share code, notes, and snippets.

mattst

Block or report user

Report or block mattst

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mattst
mattst / Layouts.sublime-commands
Last active Jun 2, 2019
Sublime Text layout additions for the Command Palette
View Layouts.sublime-commands
[
// Add all the layouts from: Menu --> View --> Layout
{ "caption": "Set Layout: Single", "command": "set_layout",
"args": { "cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]] } },
// Alternative name for the "Set Layout: Single" layout.
{ "caption": "Set Layout: Columns 1", "command": "set_layout",
@mattst
mattst / OpenSelectedTextInNewBufferCommand.py
Created Mar 19, 2019
ST Plugin OpenSelectedTextInNewBufferCommand
View OpenSelectedTextInNewBufferCommand.py
# 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
@mattst
mattst / PasteFromHistoryEnhanced.py
Created Jan 27, 2019
Enhanced version of the default Sublime Text paste_from_history.py plugin.
View PasteFromHistoryEnhanced.py
#
# 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.
@mattst
mattst / Test_CRF_Presets_For_Libx264_Encodes
Created Nov 9, 2018
Script to test encode speeds and file sizes for libx264 encodes with a range of CRF values and presets
View Test_CRF_Presets_For_Libx264_Encodes
#!/bin/bash
infile="TestClipTwoMin.mp4"
datafile="TestClipTwoMinData.csv"
crfs=("18" "19" "20" "21" "22" "23" "24" "25" "26" "27")
presets=("ultrafast" "superfast" "veryfast" "faster" "fast" "medium" "slow" "slower" "veryslow")
echo 'CRF,Preset,Time (Secs),Size (MB)' >> "$datafile"
@mattst
mattst / TestClipTwoMinData.csv
Created Nov 9, 2018
FFMPEG libx264 encodes 2 min video, CRFs 18 to 27, all presets except placebo, encode times and file sizes
View TestClipTwoMinData.csv
CRF Preset Time (Secs) Size (MB)
18 ultrafast 13.91 175.13
18 superfast 24.39 149.13
18 veryfast 36.39 87.97
18 faster 55.89 94.50
18 fast 79.71 97.76
18 medium 97.80 94.15
18 slow 145.07 91.47
18 slower 262.72 91.55
18 veryslow 503.44 84.07
@mattst
mattst / MoveTabInGroup.py
Last active Oct 27, 2018
An ST plugin to move the active buffer's tab left and right on the tab bar.
View MoveTabInGroup.py
#
# 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.
#
@mattst
mattst / MultipleSelectionClearerTopOrBottom.py
Last active Oct 27, 2018
An ST plugin to clear multiple selections to the top or bottom selection.
View MultipleSelectionClearerTopOrBottom.py
#
# 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
@mattst
mattst / FocusMostRecentTabCloser.py
Last active Sep 25, 2018
Sublime Text 3 Plugin - Closes the focused view and focuses the next most recent view
View FocusMostRecentTabCloser.py
#
# 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
@mattst
mattst / ExpandSelectionByExpression.py
Created Jun 22, 2018
ExpandSelectionByExpression.py
View ExpandSelectionByExpression.py
#
# 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)
#
@mattst
mattst / JumpToCharSeqFixed.py
Created Jun 22, 2018
JumpToCharSeqFixed.py
View JumpToCharSeqFixed.py
#
# 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)
#
You can’t perform that action at this time.