Skip to content

Instantly share code, notes, and snippets.

@D4v1X
Last active August 29, 2015 14:12
Show Gist options
  • Save D4v1X/8c9cae5fce39a4682043 to your computer and use it in GitHub Desktop.
Save D4v1X/8c9cae5fce39a4682043 to your computer and use it in GitHub Desktop.
Sublime Text 2

#Shortcut´s

  • Command + Shift + P [Package = Package Control Options]
  • Command + T [Change files in Sublime eg slesp:72]
  • Control + G [Line search (note: control)]
  • Command + R [Method search.]
  • Command + D [Select the next instance]
  • Command + / [Comment out (or in) the current line (or selection).]
  • Command + Shift + D [Duplicate the current line or selection]
  • Command + Option (Alt) + 2 [Switch to a 2 column layout]
  • Command + Option (Alt) + N [AdvancedNewFile]

#1.Install Sublime Text 2 #2.Install Package Control The simplest method of installation is through the Sublime Text console. The console is accessed via the

ctrl+`

shortcut or the View > Show Console menu. Once open, paste the appropriate Python code for your version of Sublime Text into the console.

import urllib2,os,hashlib; h = '2deb499853c4371624f5a07e27c334aa' + 'bf8c4e67d14fb0525ba4f89698a6d7e1'; 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()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')

#Install CTags As cool as these tricks are, and they are very cool, there is another way to move around that takes the cake. CTags. CTags in Sublime has an outside dependency. Homebrew is the simplest way to get it installed on your machine

brew install ctags

Additionally you will need the Sublime Plugin to use CTags in your project. Package Control provides a simple way to install CTags in Sublime.

Command + Shift + P
Package Install
CTags

#Install AdvancedNewFile AdvancedNewFile is that it’s a great combination of mkdir -p and touch.

Command + Shift + P
Package Install
AdvancedNewFile

//TODO

  • AdvancedNewFile – Create files regardless of directory presence.
  • Alignment – Align based on equal signs
  • CoffeeScript – Syntax highlighting for Coffeescript
  • ColorPick – Color picker
  • CTags – Described.
  • Cucumber – Syntax highlighting for Gherkin
  • DashDoc – Open documentation in the Dash.app for a selection
  • DetectSyntax – Handy for ruby projects that include Gemfiles and Rakefiles that are technically ruby and sets the syntax highlighting for you.
  • Git – Awesome way to use Git in sublime from Command + Shift + P
  • GitGutter – See where your changes are in your file compared to the last commit.
  • Package Control – Described.
  • Ruby Hash Converter – Convert 1.8 hashes to 1.9
  • ruby-slim.tmbundle – Slim syntax highlighting.
  • SCSS – Sass syntax highlighting.
  • SideBarEnhancements – Described.
  • Solarized Color Scheme – The solarized color theme.
  • SublimeREPL – Provides a REPL in Sublime for Python + Ruby.
  • TrailingSpaces – Removes trailing spaces on save.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment