@@ -15,7 +15,6 @@ Provides font-locking, indentation and navigation support for the
15
15
- [ Usage] ( #usage )
16
16
- [ Interactive Commands] ( #interactive-commands )
17
17
- [ Configuration] ( #configuration )
18
- - [ Hooks] ( #hooks )
19
18
- [ Keymapping] ( #keymapping )
20
19
- [ Notes] ( #notes )
21
20
- [ Elixir Tooling Integration] ( #elixir-tooling-integration )
@@ -88,46 +87,6 @@ You can install `Elixir-Mode` manually by placing `Elixir-Mode` on your `load-pa
88
87
<td><code>elixir-mode</code></td>
89
88
<td>Switches to elixir-mode.</td>
90
89
</tr>
91
- <tr>
92
- <td><code>elixir-mode-compile-file</code></td>
93
- <td>Compile Elixir files. Works fine on <code>*.exs</code> files, too, if needed.</td>
94
- <tr>
95
- <td><code>elixir-cos-mode</code></td>
96
- <td>Applies compile-on-save minor mode.</td>
97
- </tr>
98
- <tr>
99
- <td><code>elixir-mode-iex</code></td>
100
- <td>
101
- Launch <code>iex</code> inside Emacs. Use <code>C-u</code>
102
- <a href="http://www.gnu.org/software/emacs/manual/html_node/elisp/Prefix-Command-Arguments.html">univesal-argument</a>
103
- to run <code>iex</code> with some additional arguments.
104
- </td>
105
- </tr>
106
- <tr>
107
- <td><code>elixir-mode-eval-on-region</code></td>
108
- <td>Evaluates the Elixir code on the marked region.
109
- This is bound to <code>C-c ,r</code> while in <code>elixir-mode</code>.</td>
110
- </tr>
111
- <tr>
112
- <td><code>elixir-mode-eval-on-current-line</code></td>
113
- <td>Evaluates the Elixir code on the current line.
114
- This is bound to <code>C-c ,c</code> while in <code>elixir-mode</code>.</td>
115
- </tr>
116
- <tr>
117
- <td><code>elixir-mode-eval-on-current-buffer</code></td>
118
- <td>Evaluates the Elixir code in the current buffer.
119
- This is bound to <code>C-c ,b</code> while in <code>elixir-mode</code>.</td>
120
- </tr>
121
- <tr>
122
- <td><code>elixir-mode-string-to-quoted-on-region</code></td>
123
- <td>Get the representation of the expression on the marked region.
124
- This is bound to <code>C-c ,a</code> while in <code>elixir-mode</code>.</td>
125
- </tr>
126
- <tr>
127
- <td><code>elixir-mode-string-to-quoted-on-current-line</code></td>
128
- <td>Get the representation of the expression on the current line.
129
- This is bound to <code>C-c ,l</code> while in <code>elixir-mode</code>.</td>
130
- </tr>
131
90
<tr>
132
91
<td><code>elixir-mode-opengithub</code></td>
133
92
<td>Open the GitHub page for Elixir.</td>
@@ -162,50 +121,6 @@ functionality easily.
162
121
(add-to-list 'auto-mode-alist '("\\.elixir2\\'" . elixir-mode))
163
122
```
164
123
165
- Custom variables for elixir-mode.
166
-
167
- <table >
168
- <tr>
169
- <th>Variable</th>
170
- <th>Default</th>
171
- <th>Description</th>
172
- </tr>
173
- <tr>
174
- <td><code>elixir-compiler-command (string)</code></td>
175
- <td><code>"elixirc"</code></td>
176
- <td>Command to compile Elixir code.</td>
177
- </tr>
178
- <tr>
179
- <td><code>elixir-iex-command (string)</code></td>
180
- <td><code>"iex"</code></td>
181
- <td>Command to start an interactive REPL in <code>IEX</code>.</td>
182
- </tr>
183
- <tr>
184
- <td><code>elixir-mode-cygwin-paths (boolean)</code></td>
185
- <td><code>t</code></td>
186
- <td>Should Cygwin paths be used on Windows?</td>
187
- </tr>
188
- <tr>
189
- <td><code>elixir-mode-cygwin-prefix (string)</code></td>
190
- <td><code>"/cygdrive/C"</code></td>
191
- <td>The prefix for Cygwin-style paths.</td>
192
- </tr>
193
- </table >
194
-
195
- ### Hooks
196
-
197
- Hooks can be used to add functionality to elixir-mode. This example
198
- adds compile on save.
199
-
200
- ``` lisp
201
- (defun elixir-mode-compile-on-save ()
202
- "Elixir mode compile files on save."
203
- (and (file-exists (buffer-file-name))
204
- (file-exists (elixir-mode-compiled-file-name))
205
- (elixir-cos-mode t)))
206
- (add-hook 'elixir-mode-hook 'elixir-mode-compile-on-save)
207
- ```
208
-
209
124
### Keymapping
210
125
211
126
Keymaps can be added to the ` elixir-mode-map ` variable.
@@ -231,12 +146,12 @@ blocks. A sample configuration would be:
231
146
``` lisp
232
147
(sp-with-modes '(elixir-mode)
233
148
(sp-local-pair "fn" "end"
234
- :when '(("SPC" "RET"))
235
- :actions '(insert navigate))
149
+ :when '(("SPC" "RET"))
150
+ :actions '(insert navigate))
236
151
(sp-local-pair "do" "end"
237
- :when '(("SPC" "RET"))
238
- :post-handlers '(sp-ruby-def-post-handler)
239
- :actions '(insert navigate)))
152
+ :when '(("SPC" "RET"))
153
+ :post-handlers '(sp-ruby-def-post-handler)
154
+ :actions '(insert navigate)))
240
155
```
241
156
242
157
## Elixir Tooling Integration
0 commit comments