Skip to content

Instantly share code, notes, and snippets.

@liamcain
liamcain / autofilename.py
Created January 13, 2012 19:35
Autocomplete Filenames in Sublime Text 2
import sublime, sublime_plugin, os, re
class FileNameComplete(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
completions = []
sel = view.sel()[0].a
if "string" in view.syntax_name(sel):
pass
@liamcain
liamcain / deselect.py
Created January 13, 2012 19:34
A Deselect Plugin for Sublime Text 2
import sublime, sublime_plugin
#add a keybinding for deselect set to enter
class DeselectCommand(sublime_plugin.TextCommand):
def run(self, edit):
end = self.view.sel()[0].b
pt = sublime.Region(end, end)
self.view.sel().clear()
self.view.sel().add(pt)
@liamcain
liamcain / Default (OSX).sublime-keymap
Created September 16, 2011 21:04
OSX keybindings for volcano
[
{
"args": {
"token_type": "char",
"cmd" : "toggle"
},
"command": "volcanise",
"context": [],
"keys": [
"ctrl+,"