From 33b37f041737b6d4e2eadeaa3d36e6ee2c4cb6ac Mon Sep 17 00:00:00 2001 From: renan-ranelli Date: Mon, 16 Mar 2015 13:25:27 -0300 Subject: [PATCH 1/2] Add tips for smartparens users --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 0bde0a07..06302658 100644 --- a/README.md +++ b/README.md @@ -223,6 +223,25 @@ experience, you can add the following to your `elixir-mode-hook`: (ruby-end-mode +1))) ``` +Also, if you use [smartparens](https://github.com/Fuco1/smartparens) you can +piggyback on some of it's functionality for dealing with Ruby's `do .. end` +blocks. A sample configuration would be: + +```lisp +(sp-with-modes '(elixir-mode) + (sp-local-pair "fn" "end" + :when '(("SPC" "RET")) + :actions '(insert navigate)) + (sp-local-pair "do" "end" + :when '(("SPC" "RET")) + :post-handlers '(sp-ruby-def-post-handler) + :actions '(insert navigate)) + (sp-local-pair "case" "end" + :when '(("SPC" "RET")) + :post-handlers '(sp-ruby-def-post-handler) + :actions '(insert navigate))) +``` + ## Elixir Tooling Integration If you looking for elixir tooling integration for emacs, check: [alchemist.el](https://github.com/tonini/alchemist.el) From 628db997c4c8c68f6036a37fba104dbd88a0cbd3 Mon Sep 17 00:00:00 2001 From: renan-ranelli Date: Mon, 16 Mar 2015 16:06:44 -0300 Subject: [PATCH 2/2] Fix small typo Thanks @mattdeboard ! --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 06302658..6eb20994 100644 --- a/README.md +++ b/README.md @@ -224,7 +224,7 @@ experience, you can add the following to your `elixir-mode-hook`: ``` Also, if you use [smartparens](https://github.com/Fuco1/smartparens) you can -piggyback on some of it's functionality for dealing with Ruby's `do .. end` +piggyback on some of its functionality for dealing with Ruby's `do .. end` blocks. A sample configuration would be: ```lisp