From 839078a9ac1862de745d1791520c85ab21afc021 Mon Sep 17 00:00:00 2001 From: marocchino Date: Sat, 12 Jun 2021 14:57:23 +0900 Subject: [PATCH] Remove no affect replace 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. --- autoload/elixir/util.vim | 2 -- 1 file changed, 2 deletions(-) diff --git a/autoload/elixir/util.vim b/autoload/elixir/util.vim index 927f92bf..0187590a 100644 --- a/autoload/elixir/util.vim +++ b/autoload/elixir/util.vim @@ -15,9 +15,7 @@ function! elixir#util#get_filename(word) abort " convert to snake_case let word = substitute(word,'\(\u\+\)\(\u\l\)','\1_\2','g') - let word = substitute(word,'\(\u\+\)\(\u\l\)','\1_\2','g') let word = substitute(word,'\(\l\|\d\)\(\u\)','\1_\2','g') - let word = substitute(word,'-','_','g') let word = tolower(word) return word