Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
javascript:var allElements = document.getElementsByTagName('*');for (var i = 0, len = allElements.length; i < len; i++) {var element = allElements[i];if (window.getComputedStyle(element).getPropertyValue('user-select')==="none"){element.style.setProperty('user-select','auto');}};document.oncontextmenu= function(){return true;};document.body.onselectstart= function(){return true}; |
javascript:document.body.contentEditable = !(document.body.contentEditable=='true'); document.designMode=!(document.designMode=='true'); | |
javascript:var allElements = document.getElementsByTagName('*');for (var i = 0, len = allElements.length; i < len; i++) {var element = allElements[i];if (element.style.getPropertyValue('user-select') !=='unset'){element.style.setProperty('user-select','unset');}else {element.style.removeProperty('user-select')}};document.oncontextmenu= function(){return true;};document.body.onselectstart= function(){return true}; | |
javascript:var allElements = document.getElementsByTagName('*');for (var i = 0, len = allElements.length; i < len; i++) {var element = allElements[i];if (element.style.getPropertyValue('user-select') !=='unset'){element.style.setProperty('user-select','unset');}else {element.removeAttribute('style');}}; | |
document.oncontextmenu= function(){return true;};document.body.onselectstart= function(){return true}; |
for url in urls: | |
cmd_str="lftp_i {}" | |
cmd=str.format(cmd_str,url) | |
print(cmd) | |
cmd="source ~/.zshrc;"+cmd | |
print(cmd) | |
os.system(cmd) |
#!/usr/bin/env/python | |
# | |
# More of a reference of using jinaj2 without actual template files. | |
# This is great for a simple output transformation to standard out. | |
# | |
# Of course you will need to "sudo pip install jinja2" first! | |
# | |
# I like to refer to the following to remember how to use jinja2 :) | |
# http://jinja.pocoo.org/docs/templates/ | |
# |
for i in *.jpg; do sips -s format png $i --out `basename $i .jpg`.png ;done |
gang@debian:~$ sudo apt-get install netcat-openbsd | |
gang@debian:~$ cat /usr/local/bin/git-proxy-wrapper | |
#!/bin/bash | |
nc -xlocalhost:1080 -X5 $* | |
gang@debian:~$ export GIT_PROXY_COMMAND=/usr/local/bin/git-proxy-wrapper |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
Upgrading to Lion or Yosemite and WebStorm 9, I noticed key repeat was
turned off for the IdeaVim plugin h j k l keys.
defaults write -g ApplePressAndHoldEnabled -bool false
in a terminal will enable
key repeat for every app. This can alternatively be found in the accessibility
settings in OS X' preferences.
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
# that enables you to choose a character from a menu of options. If you are on Lion | |
# try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
# for input. | |
# | |
# It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, | |
# as it means you cannot press and hold h/j/k/l to move through your file. You have | |
# to repeatedly press the keys to navigate. |
#!/bin/sh | |
COMMENT="提交一次" | |
CWD=/Users/jc/Documents | |
if [[ $# > 0 ]];then | |
COMMENT=$1; | |
fi |