Skip to content

Instantly share code, notes, and snippets.

import sublime
import sublime_plugin
class CursorCommand(sublime_plugin.TextCommand):
saved_cursors_map = {}
def run(self, edit, action="add"):
view = self.view
cursors = view.sel()
view_id = view.id()
import sublime
import sublime_plugin
import re
class CustomMoveToEndLineCommand(sublime_plugin.TextCommand):
prev_cursors_list = []
custom = True
def run(self, edit, extend=False):
@skuroda
skuroda / gist:5173451
Last active May 2, 2022 03:50
Snippet from modified dot.tmLanguage file.
{
"fileTypes": [
"dot",
"DOT"
],
"foldingStartMarker": "\\{",
"foldingStopMarker": "\\}",
"keyEquivalent": "^~G",
"name": "Graphviz (DOT)",
"patterns": [
[
{ "keys": ["ctrl+p"], "command": "previous_keyword_match", "context":
[
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+n"], "command": "next_keyword_match" }
]
@skuroda
skuroda / get_package_asset.py
Last active December 13, 2015 19:58
This method will help retrieve assets for Sublime Text 3 plugins.
"""
MIT License
Copyright (c) 2013 Scott Kuroda <scott.kuroda@gmail.com>
"""
import sublime
import os
import zipfile
import tempfile
import re