make vim plugin with elixir

9
Make vim plugin with elixir @marocchino

Upload: shim-won

Post on 14-Jan-2017

94 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: Make vim plugin with elixir

Make vim pluginwith elixir

@marocchino

Page 2: Make vim plugin with elixir

Want to make simple plugin

1234 |> Integer.to_string(16) |> String.duplicate(2)

String.duplicate(Integer.to_string(1234,16), 2)

https://github.com/marocchino/pipe_converter

こいう地味な砂上が割とあったので、プラグイン化したいと思って始めました。

でもこれelixirでしか使えないしなるべくelixirにしたかったんですけど

Page 3: Make vim plugin with elixir

Supported langs• ruby

• python

• lua

• perl

• mzscheme

• … no elixir or erlang

Page 4: Make vim plugin with elixir

Steps

• Make shell script

• Wrap script with viml

Page 5: Make vim plugin with elixir

Make shell script

Page 6: Make vim plugin with elixir

Mix• Rubygems + bundler + rake in Elixir

• $ mix new project_name

• ref: https://elixirschool.com/jp/lessons/basics/mix/

Page 7: Make vim plugin with elixir

escript• CLI interface for elixir, erlang

• ref: https://elixirschool.com/jp/lessons/basics/mix/

Page 8: Make vim plugin with elixir

Wrap script with VIML

Page 9: Make vim plugin with elixir

vim plugin