Skip to content

Instantly share code, notes, and snippets.

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@tinotriste
tinotriste / maybe-include-plugin.php
Created May 19, 2013 19:51 — forked from alexkingorg/maybe-include-plugin.php
Wordpress: Include plugin into theme
<?php
// Run this code on 'after_theme_setup', when plugins have already been loaded.
add_action('after_setup_theme', 'my_load_plugin');
// This function loads the plugin.
function my_load_plugin() {
// Check to see if your plugin has already been loaded. This can be done in several
// ways - here are a few examples:
@tinotriste
tinotriste / functions.php
Last active December 16, 2015 05:29 — forked from Knivrobot/functions.php
Wordpress: Use session cookies
<?php
//Enable sessions i wordpress
if ( !session_id() )
add_action( 'init', 'session_start' );
?>
@tinotriste
tinotriste / ie-conditional-comments.html
Last active December 16, 2015 05:29 — forked from ryarwood/if-ie.html
HTML: IE conditional comments
<!--[if IE]>
According to the conditional comment this is IE<br />
<![endif]-->
<!--[if IE 6]>
According to the conditional comment this is IE 6<br />
<![endif]-->
<!--[if IE 7]>
According to the conditional comment this is IE 7<br />
@tinotriste
tinotriste / get_header.php
Created April 15, 2013 01:26
Wordpress: Get header
<?php get_header(); ?>
@tinotriste
tinotriste / get_sidebar.php
Last active December 16, 2015 05:29
Wordpress: Get sidebar
<!-- start sidebar -->
<?php get_sidebar(); ?>
<!-- end sidebar -->
@tinotriste
tinotriste / wp_head.php
Last active December 16, 2015 05:29 — forked from envex/head.php
Wordpress: Head functions
<!-- wordpress head functions -->
<?php wp_head(); ?>
<!-- end of wordpress head -->
@tinotriste
tinotriste / image-replacement.css
Last active December 16, 2015 05:29 — forked from androide-osorio/gist:4102734
CSS: Image Replacement
.ir {
border: 0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@tinotriste
tinotriste / gist:5384910
Last active December 16, 2015 05:29
Sublime Text: Useful Shortcuts
h1. Sublime Text 2 - Useful Shortcuts (PC)
Loosely ordered with the commands I use most towards the top. Sublime also offer "full documentation":http://www.sublimetext.com/docs/2/.
h2. Editing
| *Ctrl+C* | copy current line (if no selection) |
| *Ctrl+X* | cut current line (if no selection) |
| *Ctrl+⇧+K*| delete line |
| *Ctrl+↩* | insert line after |