Very basic Midje alternate
This commit is contained in:
parent
ef422f66e2
commit
b92a9730f0
@ -1177,8 +1177,11 @@ function! fireplace#alternates() abort
|
|||||||
let alt = [substitute(ns, '\.test\.', '.', '')]
|
let alt = [substitute(ns, '\.test\.', '.', '')]
|
||||||
elseif ns =~# '-spec$'
|
elseif ns =~# '-spec$'
|
||||||
let alt = [ns[0:-6], ns . '-test']
|
let alt = [ns[0:-6], ns . '-test']
|
||||||
|
elseif ns =~# '\.t-\([^\.]\)'
|
||||||
|
let alt = [substitute(ns, '\.t-\([^\.]\)', '\.\1', '')]
|
||||||
else
|
else
|
||||||
let alt = [ns . '-test', substitute(ns, '\.', '.test.', ''), ns . '-spec']
|
let alt = [ns . '-test', substitute(ns, '\.', '.test.', ''), ns . '-spec',
|
||||||
|
\ substitute(ns, '\(.*\)\.\(.*\)', '\1.t-\2', '')]
|
||||||
endif
|
endif
|
||||||
return map(alt, 'tr(v:val, ".-", "/_") . ".clj"')
|
return map(alt, 'tr(v:val, ".-", "/_") . ".clj"')
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user