add basic ruby contrib layer #228

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@bru
Contributor
bru commented Dec 8, 2014

this contrib layer does a few things:

  1. swaps ruby-mode for enh-ruby-mode
  2. adds robe-mode to pilot inf-ruby and sets a few convenient keybindings
  3. adds a couple of keybindings for ruby-test-mode
  4. adds support for rbenv

It's all pretty basic for now, I hope I'll be able to refine it over time.

@trishume
Contributor
trishume commented Dec 8, 2014

Looks awesome

@syl20bnr syl20bnr commented on the diff Dec 9, 2014
contrib/lang/ruby/README.md
+
+or on the command line:
+
+```shell
+$ gem install pry
+```
+
+## Key bindings
+
+### enh-ruby-mode
+
+<kbd>SPC m i</kbd> start REPL
+<kbd>SPC m g</kbd> go to definition (robe-jump)
+<kbd>SPC m d</kbd> go to Documentation
+<kbd>SPC m R</kbd> reload environment (Rails)
+
@syl20bnr
syl20bnr Dec 9, 2014 Owner

I updated the conventions for key bindings, it gives us:

  • nothing changes here :-)
@syl20bnr syl20bnr commented on the diff Dec 9, 2014
contrib/lang/ruby/README.md
+
+### enh-ruby-mode
+
+<kbd>SPC m i</kbd> start REPL
+<kbd>SPC m g</kbd> go to definition (robe-jump)
+<kbd>SPC m d</kbd> go to Documentation
+<kbd>SPC m R</kbd> reload environment (Rails)
+
+### ruby-test-mode
+
+ruby-test-mode comes bundled with spacemacs, but this contribution adds
+a couple of useful keybindings:
+
+<kbd>SPC m t f</kbd> run test file
+<kbd>SPC m t p</kbd> run test at pointer
+
@syl20bnr
syl20bnr Dec 9, 2014 Owner

I updated the conventions for key bindings, it gives us:

  • m t b to test the buffer/file
  • m t f to test the function under point
@syl20bnr
Owner
syl20bnr commented Dec 9, 2014

This is a very cool layer ! Nice choice of key bindings, I'm sure that I prefer m t b instead of m t f for tests in the file but I'm not sure for m t f or m t p.
p is a pinky letter.
Maybe m t t for test of thing under point ?

@syl20bnr
Owner
syl20bnr commented Dec 9, 2014

Ideally we should have a good symmetry between <SPC> m s for sending content to REPL and <SPC> m t for testing.
This is why I prefere m t b and m s b for file/buffer.
We could have m t t and m s t for thing at point or m t f / m s f if this is almost always a function.

@syl20bnr
Owner
syl20bnr commented Dec 9, 2014

Maybe you could also bind the send to REPL commands if they exist ?

@bru
Contributor
bru commented Dec 9, 2014

@syl20bnr I see the conventions, yep they make sense, I'll amend the PR.
As mentioned in the request above, I plan to organically grow this (as I adapt my workflow to emacs), so I'm going to add the send to REPL shortly

@syl20bnr
Owner

I merged the layer and changed:

  • m t f --> m t b
  • m t p --> m t t
    Available in release 0.28.0
    You can safely delete your branch.

Great layer ! Thank you !
👍

@syl20bnr syl20bnr closed this Dec 10, 2014
@bru
Contributor
bru commented Dec 10, 2014

great, thx for merging, I'll try to add to it over time

On Wed, Dec 10, 2014 at 5:03 AM, Sylvain Benner notifications@github.com
wrote:

Closed #228 #228.


Reply to this email directly or view it on GitHub
#228 (comment).

Riccardo CAMBIASSI
http://twitter.com/bru

@bru bru deleted the bru:ruby_contrib_layer branch Jan 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment