Skip to content

Instantly share code, notes, and snippets.

@nesbert
Last active December 12, 2015 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nesbert/4693271 to your computer and use it in GitHub Desktop.
Save nesbert/4693271 to your computer and use it in GitHub Desktop.
Guide to get Sublime Text 2 installed and running. Extended from http://1p1e1.tumblr.com/post/14262857223/9-reasons-you-must-install-sublime-text-2-code-like-a in short form. Also, included shortcuts, user & package settings.
<snippet>
<content><![CDATA[
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>${1:Page Title}</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
</head>
<body>
${2:body...}
</body>
</html>
]]></content>
<tabTrigger>beginhtml</tabTrigger>
<scope>text.html - source</scope>
<description>Boilerplate html.</description>
</snippet>

Set Up

  1. Download latest Sublime Text 2 (Link)

  2. Install "Package Control" via console (ctrl+`)

     import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print('Please restart Sublime Text to finish installation')
    
  3. Restart Sublime Text 2

  4. OS X Command Line (Link)

     ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
    

Packages

Via Package Control (shift + ⌘ + P, type install + enter).

  1. Package Control: Install Package and search for “CodeIntel”
  2. Package Control: Install Package and search for “SublimeLinter”
  3. Package Control: Install Package and search for “Modific”
  4. Package Control: Install Package and search for “TrailingSpaces”
  5. Package Control: Install Package and search for “Markdown Preview”
  6. Package Control: Install Package and search for “Theme - Soda”
  7. Package Control: Install Package and search for “AdvancedNewFile”

Goto

⌘ P   Goto Anything...
⌘ R   Goto Symbol...
⌃ G   Goto Line...
⌥ ⌘ → Next File
⌥ ⌘ ← Previous File
⌥ ⌘ ← Switch Header/Implementation
⌘ 1   Goto Tab 1...
⌘ 2   Goto Tab 2...
⌘ 3   Goto Tab 3...
⌃ L   Scroll to Selection
⌃ ⌥ ↑ Line Up
⌃ ⌥ ↓ Line Down

Tools

⇧ ⌘ P Command Palette...
⌃ `   Console

Packages

AdvancedNewFile

⌥ ⌘ N Create new files/folders...

Keyboard Symbol List

⌘ is command
⌥ is option
⌃ is control
⇧ is shift
⇪ is caps lock
← is left arrow
→ is right arrow
↑ is up arrow
↓ is down arrow
⇥ is tab
⇤ is backtab
↩ is return
⌤ is enter
⌫ is delete
⌦ is forward delete
⇞ is page up
⇟ is page down
↖ is home
↘ is end
⌧ is clear
␣ is space
⎋ is escape
⏏ is eject
{
"tab_size": 4,
"translate_tabs_to_spaces": true,
"draw_white_space": "all",
"color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme",
"ignored_packages":
[
"Vintage"
],
"soda_classic_tabs": false,
"theme": "Soda Dark.sublime-theme"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment