Skip to content

Instantly share code, notes, and snippets.

View timsvoice's full-sized avatar
💭
👨🏻

Timothy Voice timsvoice

💭
👨🏻
View GitHub Profile

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

//
// Remove inline style="..."
// Preserve hidden content.
//
// Call the function like this:
//
// var all = document.getElementsByTagName('*');
// remove_style(all);
//
// Note: Selecting all elements in the page via a
.centered {
position:absolute;
top:10%;
right:10%;
bottom:10%;
left:10%;
background:url(image.jpg) no-repeat 50% 50%;
background-size:contain
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
<link rel="stylesheet" href="ink.css"> <!-- For testing only -->
<style type="text/css">
<!-- basic two-section layout -->
<table class="row">
<tr>
<td class="wrapper">
<table class="six columns">
<tr>
<td>
<!-- basic one-section layout -->
<table class="row">
<tr>
<td class="wrapper last">
<table class="twelve columns">
<tr>
<td>
<!-- container -->
<table class="container">
<tr>
<td>
</td>
</tr>
</table>
<!-- sub-column layout -->
<table class="row">
<tr>
<td class="wrapper last">
<table class="twelve columns">
<tr>
<td class="eight sub-columns">
<!-- block-grid layout -->
<table class="block-grid two-up">
<tr>
<td>
Column #1
</td><td> <!-- Make sure the tags are directly next to each other -->