https://github.com/johnagan/sublime-html-to-slim
Converts files, selection and clipboard content from HTML or ERB to Slim using the htm2slim gem
https://github.com/johnagan/sublime-html-to-slim
Last synced: about 1 year ago
JSON representation
Converts files, selection and clipboard content from HTML or ERB to Slim using the htm2slim gem
- Host: GitHub
- URL: https://github.com/johnagan/sublime-html-to-slim
- Owner: johnagan
- Created: 2013-12-29T15:51:27.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-12-29T16:35:45.000Z (over 12 years ago)
- Last Synced: 2025-03-30T09:05:19.981Z (about 1 year ago)
- Language: Python
- Size: 102 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HTML to Slim plugin for Sublime Text 3
Converts files, selection and clipboard content from HTML or ERB to Slim using the [htm2slim gem](https://github.com/slim-template/html2slim).
Most of this code base and this readme is from the [html-to-haml project](https://github.com/pavelpachkovskij/sublime-html-to-haml)
## Installation
### [Sublime Package Control](http://wbond.net/sublime_packages/package_control)
In the command Pallette choose **Package Control: Install Repository** and select **HTML2Slim**
### Git installation
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/
## Usage
* **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.
### In Command Palette:
* **HTML2Slim: Convert file**
* **HTML2Slim: Convert selection**
* **HTML2Slim: Convert clipboard content**