SublimeERB

TextMate Style ERB Block for Sublime Text

  • 所有者: eddorre/SublimeERB
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

A Port of TextMate's ERB support for Sublime Text 2

Installation

Sublime Package Control

I suggest using Sublime Package Control. Once you have Sublime Package control installed, you can install "SublimeERB" in a few easy steps.

Press CTRL + SHIFT + P on Windows and Linux and CMD + SHIFT + P on a Mac to bring up Sublime's Command Palette, then type install package to bring up Package Control's package selector. It should be the first selection. Type "SublimeERB," which, again, should be the first selection, and then hit enter. You should now have the proper package installed, but you will still need to add a keybinding to use it.

Sublime Text 3 Beta Install

Make sure to follow the updated instructions for installing package control. Even with the package being installed via package control, you still need to modify your keybinding file as per the instructions below. The manual installation listed below still works for Sublime Text 3.

Manual Installation

Clone the repository and symlink file to Sublime's User Directory:

OS X

git clone git@github.com:eddorre/SublimeERB.git ~/.sublime_erb

ln -fs ~/.sublime_erb/ ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/SublimeERB

Linux

git clone git@github.com:eddorre/SublimeERB.git ~/.sublime_erb

ln -fs ~/.sublime_erb/ ~/.config/sublime-text-2/Packages/SublimeERB

Usage

Add Keybinding

Open your User Keybinding File and add the following keybinding to activate the toggle command in all file types:

  [
    { "keys": ["ctrl+shift+."], "command": "erb" }
  ]

...or only in the most common ERB contexts:

  [
    { "keys": ["ctrl+shift+."], "command": "erb", "context":
      [
        { "key": "selector", "operator": "equal", "operand": "text.html.ruby, text.haml, source.yaml, source.css, source.scss, source.js, source.coffee" }
      ]
    }
  ]

Now you can use ctrl+shift+. to create and toggle between ERB tags. NOTE: On a Mac use the command key for the ctrl key.

Update To Latest Version

  cd ~/.sublime_erb
  git pull --rebase

Sample

SublimeERB is Copyright (c) 2011 Carlos Rodriguez, released under the MIT License.

主要指標

概覽
名稱與所有者eddorre/SublimeERB
主編程語言Python
編程語言Python (語言數: 1)
平台
許可證
所有者活动
創建於2011-07-13 07:02:45
推送於2023-03-05 18:16:54
最后一次提交2014-03-18 23:38:51
發布數0
用户参与
星數287
關注者數11
派生數33
提交數54
已啟用問題?
問題數25
打開的問題數4
拉請求數9
打開的拉請求數2
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?