This extension for Nova provides code clips covering core Elixir constructs, LiveView, Testing and OTP"
Trigger | Description |
---|---|
case→ | case statement |
cond→ | cond statement |
def→ | def (multi-line) |
df→ | def (one-line) |
depf→ | defp |
defc→ | defcallback |
defd→ | defdelegate |
defe→ | defexception |
defi→ | defimpl |
dmac→ | defmacro |
defpro→ | defprotocol |
defs→ | defstruct |
do→ | do block |
doc→ | @doc |
fn→ | fn args -> end |
for→ | for item <- items do: end |
fori→ | for item <- items, into: [] do: end |
ife→ | if else end |
if→ | if end |
ii→ | IO.inspect() |
iin→ | IO.inspect( limit: infinity) |
ip→ | IO.puts("") |
::→ | key => value |
mdoc→ | @moduledoc """ """ |
p→ | |
pry→ | require IEx; IEx.pry |
_M→ | MODULE |
Trigger | Description |
---|---|
he→ | def handle_event |
hi→ | def handle_info |
lvm→ | defmodule Live |
lvt→ | defmodule LiveTest |
mount→ | def mount() |
render→ | def render() |
Trigger | Description |
---|---|
init→ | def init() |
sl→ | def start_link() |
Trigger | Description |
---|---|
ee→ | <%= %> |
for→ | for comprehension in eex |
if→ | if in eex |
else→ | <% else %> |
end→ | <% end %> |
cond→ | cond in eex |
Elixir Code Clips is based on Florin's VS Code extension
The MIT License (MIT)
Copyright (c) 2020, Mike Ratliff
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.