Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (49 sloc) 1.08 KB

Sublime-Text-2-Snippets

A list of snippets that I frequently use in my daily life. I will have snippets for HTML, CSS, JavaScript and PHP.

Please note: All the snippets are triggered by the TAB character.

Global

Closure function

Keyword: fn

function() {
}

Laravel style comment

Keyword: /*l

/*
|--------------------------------------------------------------------------
| Title
|--------------------------------------------------------------------------
| 
| Description
| 
*/

Return true

Keyword: rett

return true;

Return false

Keyword: retf

return false;

PHP

Array

Keyword: rr

array() {
}

Var Dump

Keyword: vd

var_dump( $results );
exit;

Print R

Keyword: pr

echo '<pre>';
print_r( $results );
exit;

JavaScript

Console log

Keyword: log

console.log();

HTML

Twitter Bootstrap

Keyword: twb

Type 'twb' and press TAB to see a full list of commands available.