LaunchEditor
Open file in current working editor from Elixir.
Installation:
def deps do
[{:launcheditor, "~> 0.1.0"}]
end
Basic usage
LaunchEditor.run("lib/some_file.ex", 10)
Plug supported
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
Supported editors
✓ - 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.
TODO:
- Support of open file with specific line
- Support of terminal editors
- Test all editors