Skip to content

Instantly share code, notes, and snippets.

@jbjornson
jbjornson / open_filename_under_cursor.py
Created September 1, 2011 13:09
Open the filename from either the current selection or the clipboard. If neither of these are files, then create a new filename based on the selection.
import sublime, sublime_plugin
import os.path, string
VALID_FILENAME_CHARS = "-_.() %s%s%s" % (string.ascii_letters, string.digits, "/:\\")
# { "keys": ["alt+o"], "command": "open_filename_under_cursor" }
# https://gist.github.com/1186126
class OpenFilenameUnderCursor(sublime_plugin.TextCommand):
def run(self, edit):
for region in self.view.sel():
@resure
resure / jump-to-dir.plugin.zsh
Created April 1, 2012 18:48
Jump-To-Dir Plugin for oh-my-zsh (inspired by Ryan Bates's config).
c() { cd ~/code/$1; }
_c() { _files -W ~/code -/; }
h() { cd ~/$1; }
_h() { _files -W ~/ -/; }
b() { cd ~/Dropbox/$1; }
_b() { _files -W ~/Dropbox/ -/; }
t() { cd ~/Temporary/$1; }