Elixir text objects + Mix ecosystem tools
Plugin for working with Mix projects and Elixir files.
Some functionality, like text objects, depend on elixir.vim.
ad
/id
- Any macro with a do
block. Works on user-defined macros asaD
- Like ad
but include any assignment and/or attached comments (iD
id
).af
/if
- A function/macro definitionaF
- Like af
but include all heads, docs, annotations, attr
andslot
declarations, and even matching do_
-prefixed heads (iF
existsif
).iS
/aS
- A sigilim
/am
- A map or structiM
/aM
- A moduleic
/ac
- A comment or documentation'commentstring'
is dynamically set in embedded HEEx/Surface.:compiler
if the appropriate plugin is found.ctrl-]
in templates that will jump to a phx-hookphx-
:Mix
runs a mix command with autocomplete.
:Deps
doesn't just wrap Mix deps
but adds functionality like dynamically adding:Deps add floki
, for example) or jumping to your deps
:Deps
with no args).:Gen
is a unified command for running gen
tasks (with autocomplete!), eg:
:Gen migration add_name_to_users
:Gen live Accounts User users name:string age:integer
:IEx
starts a :term
window running iex.
-S mix
is the default; use :IEx!
to get a plain session.:term
See :help mixer
for more details!
Auto-close HTML tags. Mixer is aware of this plugin and will extend
g:closetag_regions
for you so it will work with your cursor inside
~H
or ~F
. Due to the way closetag is implemented, you must
configure the appropriate filetypes on your own.
Among other things, it lets you pipe and unpipe args.
Auto-adds end
after hitting <cr>
in insert mode (or just use copilot,
I guess).
Distributed under the same terms as Vim itself. See :help license
.