Open file in current working editor from Elixir.
def deps do
[{:launcheditor, "~> 0.1.0"}]
end
LaunchEditor.run("lib/some_file.ex", 10)
Add LaunchEditor.Plug
to your application. If assets path is other than root /
like in Phoenix Framework you can change it by passing option assets_root
.
plug LaunchEditor.Plug, assets_root: "assets/"
To open file from browser you can send request:
/__open-in-editor?file=src/main.js
You can use it with Plug.Debugger
:
PLUG_EDITOR=/__open-in-editor?file=__FILE__&line=__LINE__ iex -S mix phx.server
✓ - tested | • - supported
Value | Editor | Linux | Windows | OSX |
---|---|---|---|---|
appcode |
AppCode | • | ||
atom |
Atom | • | ✓ | • |
atom-beta |
Atom Beta | • | ||
brackets |
Brackets | • | ✓ | • |
clion |
Clion | • | • | |
code |
Visual Studio Code | • | • | ✓ |
code-insiders |
Visual Studio Code Insiders | • | • | • |
idea |
IDEA | • | • | • |
notepad++ |
Notepad++ | ✓ | ||
pycharm |
PyCharm | • | • | • |
phpstorm |
PhpStorm | • | • | • |
rubymine |
RubyMine | • | • | • |
sublime |
Sublime Text | • | ✓ | • |
visualstudio |
Visual Studio | • | ||
webstorm |
WebStorm | • | • | • |
Please create issue with results of using supported but not tested editor.
- Support of open file with specific line
- Support of terminal editors
- Test all editors