Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove no affect replace #549

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marocchino
Copy link

this codes from https://github.com/tpope/vim-abolish/blob/master/plugin/abolish.vim#L120-L127

    let word = substitute(word,'\(\u\+\)\(\u\l\)','\1_\2','g')

line was duplicated.

    let word = substitute(word,'-','_','g')

elixir modules dose not allows kebab-case module name so we do not need it.

this codes from https://github.com/tpope/vim-abolish/blob/master/plugin/abolish.vim#L120-L127

```viml
    let word = substitute(word,'\(\u\+\)\(\u\l\)','\1_\2','g')
```

line was duplicated.

```viml
    let word = substitute(word,'-','_','g')
```

elixir modules dose not allows kebab-case module name so we do not need it.
@jbodah
Copy link
Collaborator

jbodah commented Jun 12, 2021

Is this a hard rule? I see here that underscore-style is a soft convention

@marocchino
Copy link
Author

It will be ArithmeticError.

> Kebab-Case
** (ArithmeticError) bad argument in arithmetic expression: Kebab - Case
    :erlang.-(Kebab, Case)

It may be possible to declare by putting an atom directly, but it can be ignored because aliases are not available.

> defmodule :"Aaa.Bbb.Kebab-Case" do
> end
 <<70, 79, 82, 49, 0, 0, 3, 244, 66, 69, 65, 77, 65, 116, 85, 56, 0, 0, 0, 137,
   0, 0, 0, 13, 18, 65, 97, 97, 46, 66, 98, 98, 46, 75, 101, 98, 97, 98, 45, 67,
   97, 115, 101, 8, 95, 95, 105, ...>>, nil}

> alias :"Aaa.Bbb.Kebab-Case"
:"Aaa.Bbb.Kebab-Case" # expect :"Kebab-Case"
> alias Aaa.Bbb.:"Kebab-Case"
** (SyntaxError) iex:12:15: syntax error before: 'Kebab-Case'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants