/LEGO-Snippets

LEGO Snippets in Sublime Text 2

Primary LanguagePython

About

LEGO Snippets in Sublime Text 2

How to install

  1. Get Package Control for Sublime Text 2. Installation is through the Sublime Text 2 console. This is accessed via the ctrl+` shortcut. Once open, paste the following command into the console.
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')
  1. Package Control: Add Repository https://github.com/maxlee/LEGO-Snippets
  2. Package Control: Install Package LEGO Snippets
  3. Restart ST2 editor

“Help! My snippets doesn’t work anymore in HTML/CSS files!”

By default, Emmet overrides Tab key behaviour and expands its own abbreviations instead native snippets. You can either disable this feature in user preferences (add "disable_tab_abbreviations": true setting into your Settings — User file) and use Ctrl+E or Ctrl+Alt+Enter to expand Emmet abbeviations or move your snippets to Emmet as described here. I’m investigating possibility to expand native snippets via Emmet Tab key handler.