Skip to content

Update README.md section on auto pairing options #398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 6 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@ functionality easily.

Keymaps can be added to the `elixir-mode-map` variable.

## Notes
### Pairing

If you want to use `ruby-end-mode` for a more comfortable editing
experience, you can add the following to your `elixir-mode-hook`:
[Smartparens](https://github.com/Fuco1/smartparens) has direct support for Elixir.

Alternatively, if you want to use `ruby-end-mode`, you can add the following to your `elixir-mode-hook`:

```lisp
(add-to-list 'elixir-mode-hook
Expand All @@ -140,21 +141,6 @@ 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 its 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)))
```

## Elixir Tooling Integration

If you looking for elixir tooling integration for Emacs, check: [alchemist.el](https://github.com/tonini/alchemist.el)
Expand All @@ -172,8 +158,8 @@ Please read [CONTRIBUTING.md](https://github.com/elixir-lang/emacs-elixir/blob/m

## License

Copyright © 2011-2015 Samuel Tonini, Matt DeBoard, Andreas Fuchs, secondplanet and
[contributors](https://github.com/tonini/alchemist.el/contributors).
Copyright © 2011-2017 Samuel Tonini, Matt DeBoard, Andreas Fuchs, secondplanet and
[contributors](https://github.com/elixir-lang/emacs-elixir/contributors).

Distributed under the GNU General Public License, version 3

Expand Down