Pimp Your RubyMine

(The following is a very technical post, aimed at Ruby software developers.)

0. Introduction

I spend most of my day coding in Ruby. I alternate between two main code editors:

1. Sublime Text, “The Editor You’ll Fall in Love With“, which is truly beautiful and fun to work with. Sublime is sweet.
2. RubyMine, a [big-ass] IDE, Ruby’s equivalent of ‘Eclipse’, which has a lot of shortcomings. While I personally abhor the bloatware and, IMHO, mostly redundant functionalities IDEs offer, three main issues keep me using RubyMine as my dominant code editor (though I alternate):

a. Click-Through to definition
b. Superior breakpoints (set without typing code as ‘debugger/binding.pry’)
c. Superior code inspection and evaluation during debugging runtime

Though I would honestly love to use Sublime exclusively (and in fact, am using it to write this very post), points a-c are deal-breakers for me. Appropriate packages for Sublime Text seem to exist for these, but I have found them to be sadly inadequate/subpar. The end result is I find myself doing most of my day-to-day work in RubyMine. I am (obviously) not the only one, and come to think of it, I believe my team has a slight majority in RubyMine users over Sublime users. Huh.

So, if you too find yourself using RubyMine (and by all means, try Sublime ‘cuz it is awesome), you should spend the due diligence into pimping it up into the best (read: fastest, most lightweight) editor it can be. (This post will focus on usability, not technical performance.) Using RubyMine 6 – whose performance is not bad at all – the following creates an end result which gives Sublime a run for its money.

1. Setup:
– go to preferences: cmd+,
– find the keymap: preferences + search for ‘keymap’
– search for ‘find action’ and change[/add] its keyboard shortcut to shift+cmd+P, as in Sublime.
– Now access keymap via find-action+’keymap’ (Change current keymap)

Boom, now we are on fire. We can search for any action, and assign it a custom keyboard shortcut via find-action+keymap+search (cmd+shift+P, ‘keymap’, ‘Change current keymap’)

The following are some pimped keyboard shortcuts RubyMine offers (along with a few suggestions for changing some keys)

2. Your minimal set of ninja swiss-knife Code Editing/Debugging keyboard shortcuts:

(These are all awesome. You should seriously be using at least the following set all the time.)
find action: shift+cmd+P (see above)
go to file: cmd+shift+O (change this to cmd+P, as in Sublime, via keymap. Consistency [with yourself and with others] is good.).
toggle breakpoint: cmd+F8  (sweet! change this to cmd+B[reakpoint..], and remove the conflicts. )
click-through, go to declaration: cmd+B (sweet!) change this to cmd+D[eclaration..], and remove the conflicts).
go back/fwd: cmd+alt+left/right {recommend switching to cmd+'[‘/’]’}
step over: F8
step into: F7
open code evaluation window: alt+F8
edit keyboard shortcut for anything (as above) – cmd+shift+P, ‘keymap’, ‘change current keymap’, find action name (you can use the default keymap as a reference for action names).

3. Prettiness (it counts):
– set theme (cmd+, search for ‘fonts’) as ‘monokai’ (same as sublime); increase font size to 14. (and save as your own theme name.)
– edit menus appearance to your liking by going to Preferences (cmd+,), the ‘appearance’.
– hide all menus by menu->view->uncheck all toolbars ()
– disable code analysis on right-hand side (next to vertical scrollbar) by right-clicking it, ‘customize highlighting level’, ‘none’. (It actually has some pretty good tips, but syntax tips are notoriously problematic, especially unless the entire team is using the same one.)

Awesomeness. If you have further tips, hit me up. No go forth and remember – real men don’t use the mouse.

Advertisements