Skip to content

Commit cf5ef00

Browse files
author
Norman Köhring
committed
make alternating frontend/src to tests/frontend and back working
1 parent 0d8cd4a commit cf5ef00

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

plugin/angular.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ function! s:Alternate(cmd) abort
153153
elseif l:currentpath =~ "public/js"
154154
let l:newpaths = [substitute(l:currentpath, "public/js", "test/karma/unit", ""), substitute(substitute(l:currentpath, "public/js", "test/karma/unit", ""), ".js", ".spec.js", "")]
155155
elseif l:currentpath =~ "frontend/src"
156-
let l:newpaths = [substitute(l:currentpath, "frontend/src", "test/frontend", "")]
156+
let l:newpaths = [substitute(substitute(l:currentpath, "frontend/src", "tests/frontend", ""), ".js", ".spec.js", "")]
157+
elseif l:currentpath =~ "tests/frontend"
158+
let l:newpaths = [substitute(substitute(l:currentpath, "tests/frontend", "frontend/src", ""), ".spec.js", ".js", "")]
157159
endif
158160

159161
if l:newpaths != []

0 commit comments

Comments
 (0)