Skip to content

Instantly share code, notes, and snippets.

View sublimator's full-sized avatar

Nicholas Dudfield sublimator

View GitHub Profile
#!/usr/bin/env python
#coding: utf8
#################################### IMPORTS ###################################
# Std Libs
import re
from re import sre_parse, sre_compile
from itertools import izip, islice
#!/usr/bin/env python
#coding: utf8
#################################### IMPORTS ###################################
# Std Libs
import os
class Boost(object):
pass
#coding: utf8
#################################### IMPORTS ###################################
# Sublime Libs
import sublime
import sublime_plugin
################################################################################
class ReverseSelectionDirections(sublime_plugin.TextCommand):
#!python
from __future__ import with_statement
import glob
import os.path
import shutil
import zipfile
def isFileEntry(s):
#!/usr/bin/env python
#coding: utf8
#################################### IMPORTS ###################################
# Std Libs
import cgi
import os
import pprint
import string
import time
@sublimator
sublimator / commandschema.py
Created September 5, 2011 11:32
Commands and args
commands = {u'auto_complete': {},
u'build': {},
u'clear_bookmarks': {u'name': set([u'mark'])},
u'clear_fields': {},
u'clear_recent_files': {},
u'clear_recent_projects': {},
u'close': {},
u'close_all': {},
u'close_file': {},
u'close_folder_list': {},
@sublimator
sublimator / crasher.py
Created September 7, 2011 13:39
QP workaround
#coding: utf8
#################################### IMPORTS ###################################
# Std Libs
import threading
import time
import sys
# Sublime
import sublime
@sublimator
sublimator / indentation.py
Created September 8, 2011 11:53
Updated Indentation
import sublime
import sublime_plugin
import textwrap
def get_tab_size(view):
return int(view.settings().get('tab_size', 8))
def handle_tabs(view, string, offset=0):
if not view.settings().get('translateTabsToSpaces'):
tab_size = view.settings().get('tab_size', 8)
@sublimator
sublimator / scopecommands.py
Created September 11, 2011 11:47
Scope Commands
#coding: utf8
#################################### IMPORTS ###################################
# Sublime Libs
import sublime
import sublime_plugin
import bisect
################################### BINDINGS ###################################
[