Sublime Text PlugIns and Addons What it is
Sublime Text Plug-Ins and Add-ons
What it is? � Open Source, Free Text Editor � Currently in Beta for Sublime Text 3 � Sublime Text 2 is good enough, still supported
Package Control � Allows you to install, remove, modify plug ins from Sublime Text � Ctlr+Shift+P or Cmd+Shift+P � import urllib 2, os, hashlib; h = '7183 a 2 d 3 e 96 f 11 eeadd 761 d 777 e 62404' + 'e 330 c 659 d 4 bb 41 d 3 bdf 022 e 94 cab 3 cd 0'; pf = 'Package Control. sublimepackage'; ipp = sublime. installed_packages_path(); os. makedirs( ipp ) if not os. path. exists(ipp) else None; urllib 2. install_opener( urllib 2. build_opener( urllib 2. Proxy. Handler()) ); by = urllib 2. urlopen( 'http: //sublime. wbond. net/' + pf. replace(' ', '%20')). read(); dh = hashlib. sha 256(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')
Package Control � Type: “Package Control: Install Package”
Package Control � Type the name of plug in � Hit enter
Bracket Highlighter � Hate counting brackets? � Shows a small icon in the margin to ID opening/closing brackets
Live. Reload � Instantly reloads the page whenever you save � Need to install extension for browser � Button appears in corner � Activate � Magic
Sublime. Linter � Shows errors and non best practice code � Node. js needs to be downloaded for Java. Script
Prefixr � Runs CSS through a database to make it cross browser compatible � Not automatic, have to press a button (or two)
Doc. Blockr � Streamlines creating comments � Type ‘ /* ’ and press ‘enter’ or ‘tab’ ◦ Creates a new line and the ‘ */ ’
Doc. Blockr � Before a function: creates a template comment � // followed by shift+enter creates comment decoration
Sidebar Enhancements � Adds ◦ ◦ functionionality to sidebar Open in browser Send to trash Cut/paste Etc. � Downside: Manual Installation
Git � Allows you to see the history of the file � Similar functionality to Smart. Git � Git must be installed � Path must be defined
Dayl Reese Themes � Gives you more options for color themes � Necessary? Eh. � Just cool to have the option to do
Links � Package Control: ◦ https: //sublime. wbond. net/ � Bracket Highlighter: ◦ https: //github. com/facelessuser/Bracket. Highlighter � Live. Reload: ◦ https: //github. com/dz 0 ny/Live. Reload-sublimetext 2 � Sublime. Linter: ◦ https: //github. com/Sublime. Linter-for-ST 2 � Prefixr: ◦ http: //wbond. net/sublime_packages/prefixr � Doc. Blockr: ◦ https: //github. com/spadgos/sublime-jsdocs � Sidebar Enhancements: ◦ https: //github. com/tito. Bouzout/Side. Bar. Enhancements � Git: ◦ https: //github. com/kemayo/sublime-text-git/wiki � Daryl Reese Themes: ◦ https: //github. com/daylerees/colour-schemes
Questions � 1. What are some of the benefits of Sublime Text over other text editora? � 2. Why should you install the plug-in package control? � 3. Name a plug-in for Sublime Text and explain what it does. � 4. What are some differences between ST 2 and ST 3 Beta?
- Slides: 16