27May

Sublime text 2 – preferences, personal key bindings

As a freelancer, I always start on new machines, downloading every time the software I need and adding back all my settings.

Those are my Sublime Text 2 user settings to save me a bit of time when coding.


[
	// br enter
	{
	  "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "<br />"}, "context":
	  [
	    {
	      "operand": "text.html",
	      "operator": "equal",
	      "match_all": true,
	      "key": "selector"
	    }
	  ]
	},
	// echo php
	{
	  "keys": ["super+e"], "command": "insert_snippet", "args": {"contents": "<?php echo $1; ?>"}, "context":
	  [
	    {
	      "operand": "text.html",
	      "operator": "equal",
	      "match_all": true,
	      "key": "selector"
	    }
	  ]
	},
	// console log 
	{
	  "keys": ["super+e"], "command": "insert_snippet", "args": {"contents": "console.log('=== $SELECTION $TM_FILENAME [$TM_LINE_NUMBER] ===', $SELECTION);${0}"}, "context":
	  [
	    {
	      "operand": "source.js",
	      "operator": "equal",
	      "match_all": true,
	      "key": "selector"
	    }
	  ]
	},
	// other
	{ "keys": ["super+shift+down"], "command": "duplicate_line" },
	{ "keys": ["super+u"], "command": "upper_case" },
	{ "keys": ["super+l"], "command": "lower_case" },
	{ "keys": ["alt+up"], "command": "swap_line_up" },
	{ "keys": ["alt+down"], "command": "swap_line_down" },
	{ "keys": ["super+alt+m"], "command": "minify" }
]

 

Subscribe
Notify of

0 Comments
Oldest
Newest
Inline Feedbacks
View all comments