Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:
[
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}
}| sessionCountdown = () => { | |
| const { session, updateSessionStatus } = this.props; | |
| clearTimeout(this.sessionTimer); | |
| clearTimeout(this.sessionWillExpireTimer); | |
| const sessionWillExpireIn = session.data.expirationDuration; | |
| if (sessionWillExpireIn) { | |
| this.sessionTimer = setTimeout(() => { | |
| updateSessionStatus(SESSION_STATUSES.WILL_EXPIRE); | |
| this.sessionWillExpireTimer = setTimeout(() => { |
| var Q = require('q'); | |
| function function_name(argument) { | |
| var deferred = Q.defer(); | |
| if (err) { | |
| deferred.reject(err); | |
| } else { | |
| deferred.resolve(imageLocation(id, type, 'thumb')); |
| /** | |
| * Make DB connection & prepare pool of connections | |
| */ | |
| 'use strict'; | |
| // Modules | |
| var dbSrc = require('node-mysql-q'), | |
| _ = require('underscore'); |
| "\e[1~": beginning-of-line | |
| "\e[4~": end-of-line | |
| “\e[5~”: history-search-backward | |
| “\e[6~”: history-search-forward | |
| "\e[3~": delete-char | |
| "\e[2~": quoted-insert | |
| "\e[5C": forward-word | |
| "\e[5D": backward-word | |
| "\e\e[C": forward-word | |
| "\e\e[D": backward-word |
Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:
[
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}
}| <snippet> | |
| <!-- put this file in /packages/User/<Folder Name>/console_log.sublime-snippet then restart your Sublime Text 2 --> | |
| <content><![CDATA[console.log($1);$0]]></content> | |
| <tabTrigger>conl</tabTrigger> | |
| <scope>text.html,source.js</scope> | |
| <description>console.log()</description> | |
| </snippet> | |
| <snippet> | |
| <!-- put this in another file /packages/User/<Folder Name>/console_dir.sublime-snippet then restart your Sublime Text 2 --> |
| (function ($) { | |
| var _init = $.ui.dialog.prototype._init; | |
| //Custom Dialog Init | |
| $.ui.dialog.prototype._init = function () { | |
| var self = this; | |
| // set max size of dialog | |
| var offSet = 20; | |
| var wWidth = $(window).width() - offSet; |