Products: IntelliJ IDEA, RubyMine

Vendor: Basil Gren


Provides fast Ruby code injections into erb files and ruby strings. Injector makes replacements as fast as you type shortcut text and also provides additional features. Examples:
  • '%%' --> <%- | -%>
  • '%=' --> <%= | -%>
  • '%-' --> <% | %>
  • '##' --> <%# | -%>
Templates can be added and/or changed in settings. See details in General Usage section. Feel free to report bugs and your suggestions to provided e-mail.
Downloads: 3804
Participated in rating: 2
Version Compatible builds Date
1.02 80.8000 09.05.2012 Download
5 updates are hidden show all updates
Screenshot #11552

Recent change notes


  • Fixed Injector exception throwed when typing characters in editors that are not linked to any project (for example, in Settings dialog).


  • Fixed throwing exception by Injector when task is changed in Task Manager with switching current context


  • Added Injector settings dialog, where you can specify own templates. The dialog accessible by right-click on Injector icon in status bar (opens very fast).
  • Added ignore shortcut option
  • Added ability to insert '#{}' into ruby strings, converting them to interpolated if necessary
  • Code optimization
  • Usage statistics added


  • Changed injection method. Now character sequence should be typed instead of one char to be replaced by template. This makes Injector not so annoying in some situations as it was before.
  • Added some new templates.


  • Fixed issue when Injector occasionally inserted ruby injections if replace key is hold.
  • Minor injection rules fix.


  • Injector have become much more unobtrusive. It injects code only within html text and attributes value, within <script> tag it's automatically disabled.
  • Performance improved.
  • Plugin state now persists between IDE restarts.
  • Minor bugs fixed.


  • Initital release

General usage instructions

Plugin provides fast ruby code injections. After typing shortcut text, it's replaced immediately by corresponding template. Examples are listed below:

  • '%%' --> <%- | -%>

  • '%=' --> <%= | -%>

  • '%-' --> <% | %>

  • '##' --> <%# | -%>

Templates are not inserted if cursor is already in Ruby-code block. You can change existing templates of define your own templates in settings dialog which is accessible in IDE Settings or by right-click on injector icon in status bar.
Injector provides insertion of '#{}' into Ruby strings. When cursor is placed in Ruby string, shortcut (default '##') is expanded info '#{}' and if string is non-interpolating (single-quoted), it's automatically converted to interpolating (double-quoted) string. This behavior and shortcut can be changed in settings.
To enable or disable Injector you can click on injector icon in the status bar or press default shortcut Ctrl+Comma(,).