Setup some ruby tools bindings

Not doing ruby-tools-clear-string as evil/vim has that covered
This commit is contained in:
Chris McGrath 2015-07-29 10:58:47 +01:00 committed by syl20bnr
parent 79c4a81af6
commit 8c43762bfb
2 changed files with 10 additions and 3 deletions

View File

@ -8,7 +8,7 @@
- [[#prerequisites][Prerequisites]]
- [[#ruby-version-management][Ruby version management]]
- [[#key-bindings][Key bindings]]
- [[#ruby-enh-ruby-mode-robe-inf-ruby][Ruby (enh-ruby-mode, robe, inf-ruby)]]
- [[#ruby-enh-ruby-mode-robe-inf-ruby-ruby-tools][Ruby (enh-ruby-mode, robe, inf-ruby, ruby-tools)]]
- [[#ruby-test-mode][ruby-test-mode]]
* Description
@ -62,7 +62,7 @@ Possible values are =rbenv= and =rvm=.
* Key bindings
** Ruby (enh-ruby-mode, robe, inf-ruby)
** Ruby (enh-ruby-mode, robe, inf-ruby, ruby-tools)
| Key binding | Description |
|-------------+---------------------------------------------|
@ -74,6 +74,9 @@ Possible values are =rbenv= and =rvm=.
| ~SPC m s r~ | send region |
| ~SPC m s R~ | send region and switch to REPL |
| ~SPC m s s~ | switch to REPL |
| ~SPC m x '~ | Change symbol or " string to ' |
| ~SPC m x "~ | Change symbol or ' string to " |
| ~SPC m x :~ | Change string to symbol |
** ruby-test-mode

View File

@ -65,7 +65,11 @@
:init
(add-hook 'enh-ruby-mode-hook 'ruby-tools-mode)
:config
(spacemacs|hide-lighter ruby-tools-mode)))
(progn
(spacemacs|hide-lighter ruby-tools-mode)
(evil-leader/set-key-for-mode 'enh-ruby-mode "mx\'" 'ruby-tools-to-single-quote-string)
(evil-leader/set-key-for-mode 'enh-ruby-mode "mx\"" 'ruby-tools-to-double-quote-string)
(evil-leader/set-key-for-mode 'enh-ruby-mode "mx:" 'ruby-tools-to-symbol))))
(defun ruby/init-bundler ()
(use-package bundler