tyru / current-func-info.vim

Get current function name
http://www.vim.org/scripts/script.php?script_id=3197
62 stars 14 forks source link

Support for elixir function #21

Closed satchinjoshi closed 7 years ago

satchinjoshi commented 7 years ago

Changes:

Since ruby and elixir has similar syntax I have just copied from ruby/cfi.vim and renamed few things. Seems to be working with all variation of the function.

  def greet(%{age: age}) when 6 < age and age < 12, do: "Hiya"
  def greet(%{age: age}) when 12 < age and age < 18, do: "Whatever"
  def greet(%{age: age}) when 60 < age, do: "You kids get off my lawn"
  def greet(_), do: "Hello"
  def greet do
    "Hello"
  end
tyru commented 7 years ago

Thanks!