Converts files, selection and clipboard content from HTML or ERB to Slim using the htm2slim gem.
Most of this code base and this readme is from the html-to-haml project
In the command Pallette choose Package Control: Install Repository and select HTML2Slim
Clone the repository in your Sublime Text "Packages" directory:
git clone git@github.com:JohnAgan/sublime-html-to-slim.git "HTML2Slim"
The "Packages" directory is located at:
-
OS X:
~/Library/Application Support/Sublime Text 3/Packages/
-
Linux:
~/.config/sublime-text-3/Packages/
-
Windows:
%APPDATA%/Sublime Text 3/Packages/
- Convert hole ERB or HTML file
Shift+Alt+F
- creates new file in the same folder using the same name as the source ending with '.html.haml'. - Convert selection
Shift+Alt+S
- replaces selection of HTML or ERB with Slim content. - Convert clipboard content
Shift+Alt+V
- inserts Slim of converted clipboard HTML or ERB content.
- HTML2Slim: Convert file
- HTML2Slim: Convert selection
- HTML2Slim: Convert clipboard content