Skip to content

Commit 09a13b0

Browse files
author
José Valim
committed
Improve docs for IEx.Helpers.open
Signed-off-by: José Valim <[email protected]>
1 parent 5f96a9b commit 09a13b0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

lib/iex/lib/iex/helpers.ex

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,19 +240,24 @@ defmodule IEx.Helpers do
240240
241241
subl path/to/file:line
242242
243+
It is important that you choose an editor command that does
244+
not block nor that attempts to run an editor directly in the
245+
terminal. Command-line based editors likely extra configuration
246+
so they open up the given file and line in a separate window.
247+
243248
Custom editors are supported by using the __FILE__ and __LINE__
244-
notations. For example, vi/vim users can set `ELIXIR_EDITOR` to:
249+
notations, for example:
245250
246-
ELIXIR_EDITOR="vi +__LINE__ __FILE__"
251+
ELIXIR_EDITOR="my_editor +__LINE__ __FILE__"
247252
248253
and Elixir will properly interpolate values.
249254
250255
Since this function prints the result returned by the editor,
251256
`ELIXIR_EDITOR` can be set "echo" if you prefer to display the
252257
location rather than opening it.
253258
254-
Keep in mind the location may not exist when opening
255-
precompiled source code, such as Elixir itself.
259+
Keep in mind the location may not exist when opening precompiled
260+
source code.
256261
257262
## Examples
258263

0 commit comments

Comments
 (0)