https://github.com/nerdslabs/launcheditor
Open file in editor from Elixir
https://github.com/nerdslabs/launcheditor
editor elixir launch
Last synced: about 2 months ago
JSON representation
Open file in editor from Elixir
- Host: GitHub
- URL: https://github.com/nerdslabs/launcheditor
- Owner: nerdslabs
- License: mit
- Created: 2018-11-07T11:04:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-02T07:10:43.000Z (over 6 years ago)
- Last Synced: 2025-03-15T09:47:57.906Z (2 months ago)
- Topics: editor, elixir, launch
- Language: Elixir
- Homepage:
- Size: 20.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# LaunchEditor
[](https://travis-ci.org/nerdslabs/launcheditor) [](https://hex.pm/packages/launcheditor) [](https://hex.pm/packages/launcheditor)
**Open file in current working editor from Elixir.**
### Installation:
```elixir
def deps do
[{:launcheditor, "~> 0.1.0"}]
end
```### Basic usage
```elixir
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`.
```elixir
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](https://www.jetbrains.com/objc/) | | | • |
| `atom` | [Atom](https://atom.io/) | • | ✓ | • |
| `atom-beta` | [Atom Beta](https://atom.io/beta) | | | • |
| `brackets` | [Brackets](http://brackets.io/) | • | ✓ | • |
| `clion` | [Clion](https://www.jetbrains.com/clion/) | | • | • |
| `code` | [Visual Studio Code](https://code.visualstudio.com/) | • | • | ✓ |
| `code-insiders` | [Visual Studio Code Insiders](https://code.visualstudio.com/insiders/) | • | • | • |
| `idea` | [IDEA](https://www.jetbrains.com/idea/) | • | • | • |
| `notepad++` | [Notepad++](https://notepad-plus-plus.org/download/v7.5.4.html) | | ✓ | |
| `pycharm` | [PyCharm](https://www.jetbrains.com/pycharm/) | • | • | • |
| `phpstorm` | [PhpStorm](https://www.jetbrains.com/phpstorm/) | • | • | • |
| `rubymine` | [RubyMine](https://www.jetbrains.com/ruby/) | • | • | • |
| `sublime` | [Sublime Text](https://www.sublimetext.com/) | • | ✓ | • |
| `visualstudio` | [Visual Studio](https://www.visualstudio.com/vs/) | | | • |
| `webstorm` | [WebStorm](https://www.jetbrains.com/webstorm/) | • | • | • |**Please [create issue](https://github.com/nerdslabs/launcheditor/issues/new?template=editor-report.md) with results of using supported but not tested editor.**
### TODO:
- Support of open file with specific line
- Support of terminal editors
- Test all editors