Plugin highlight: “Injector” brings single-key Ruby injections into ERB
If you use ERB for your Rails views, you should like this one.
It may not be a problem for you but I always stumble when typing
<% %>, let alone
<%# %>. Non-letter keys and you have to press Shift too. So, I was quite impressed when I saw this Injector plugin in our plugin repository recently.
It is pretty straightforward, a single character generates the whole closure and puts the caret inside.
‘%’ –> <% | %>
‘=’ –> <%= | %>
‘-‘ –> <% | -%>
‘#’ –> <%# | %>
And even though it sounds very simple, the author has put a good thought into his work. Here’s what plugin description says:
When character is just replaced (no other key presses are made), you can cancel replacement by pressing Backspace. Characters are not replaced if cursor is already in Ruby-code block. To enable or disable Injector you can click on injector icon in the status bar or press default shortcut Ctrl+Comma(,)
Kudos to Basil G. a.k.a. toXXIc!
To install the plugin open IDE Settings | Plugins, find the Injector plugin and choose Install.
Develop with pleasure!
Subscribe to Blog updates
Thanks, we've got you!
RubyMine 2020.3.4 and 2021.1.1 introduce the concept of trusted projects. It is designed to reduce the risks associated with opening projects from unknown or untrusted sources. Check out this blog post to learn more. As you might already know, when you open a project, RubyMine runs various tools lik…
RubyMine Navigation: Recent Locations PopupEarly Access Program
RubyMine 2019.1 is filled with features and options to help you navigate around your projects quickly without a mouse or touchpad. For example, you can quickly switch between tool windows, go to classes or actions, and open recently edited files. In our Navigate in RubyMine Like a Pro blog post, we …
How to work with Docker/Docker Compose from RubyMineEarly Access Program
To get the most recent information about Docker support in RubyMine, refer to our documentation: Tutorial: Docker Compose as a remote interpreter Tutorial: Docker as a remote interpreter RubyMine 2019.1 has a bunch of capabilities which allow you to work with Docker and Docker Compose. You can i…
Profile Ruby & Rails Apps With rbspy in RubyMineEarly Access Program
RubyMine 2019.1 adds support for rbspy – a great sampling profiler for Ruby (many thanks to @jvns!). This post will help you start profiling your Ruby/Rails apps with RubyMine in 5 minutes. Here are the exact steps: Identify the scenario to be analyzed Create a profiler configuration Run…