Skip to content

Instantly share code, notes, and snippets.

@yuitowest
yuitowest / gist:4064453
Created November 13, 2012 07:18
sublime text2 sidebar keymap
{ "keys": ["j"], "command": "move", "args": {"by": "lines", "forward": true}, "context":
[ {"key": "control", "operand": "sidebar_tree"} ]
},
{ "keys": ["k"], "command": "move", "args": {"by": "lines", "forward": false}, "context":
[ {"key": "control", "operand": "sidebar_tree"} ]
},
{ "keys": ["l"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
[ {"key": "control", "operand": "sidebar_tree"} ]
},
{ "keys": ["h"], "command": "move", "args": {"by": "characters", "forward": false}, "context":
@yuitowest
yuitowest / _hg
Created December 3, 2011 09:51
Zsh completion script for mercurial
#compdef hg
# Zsh completion script for mercurial. Rename this file to _hg and copy
# it into your zsh function path (/usr/share/zsh/site-functions for
# instance)
#
# If you do not want to install it globally, you can copy it somewhere
# else and add that directory to $fpath. This must be done before
# compinit is called. If the file is copied to ~/.zsh.d, your ~/.zshrc
# file could look like this:
var appendEntry = function(selector, entry) {
if (entry != undefined && entry.yt.length > 0) {
var $dl = $('<dl/>', {class: 'entry'});
$dl.append($('<dt/>', {class: 'title'}))
$dl.children("dt").append($('<a/>', {href: entry.url, text: entry.title}))
$dl.append($('<dd/>'));
$dl.children("dd").append("<ul/>");
for (i in entry.yt) {
var $li = $('<li/>');