Skip to content

nerdslabs/launcheditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LaunchEditor

Travis Hex Downloads

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

About

Open file in editor from Elixir

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages