Skip to content

Commit 7843f89

Browse files
authored
Merge pull request #122 from nelstrom/compilerset-makeprg
Use CompilerSet to set the makeprg using local/global settings
2 parents 4dc79bd + dbe450d commit 7843f89

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

compiler/typescript.vim

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ if exists(":CompilerSet") != 2
1515
command! -nargs=* CompilerSet setlocal <args>
1616
endif
1717

18-
let &l:makeprg = g:typescript_compiler_binary . ' ' . g:typescript_compiler_options . ' $* %'
18+
let s:cpo_save = &cpo
19+
set cpo-=C
20+
21+
execute 'CompilerSet makeprg='
22+
\ . escape(g:typescript_compiler_binary, ' ')
23+
\ . '\ '
24+
\ . escape(g:typescript_compiler_options, ' ')
25+
\ . '\ $*\ %'
1926

2027
CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m
28+
29+
let &cpo = s:cpo_save
30+
unlet s:cpo_save

0 commit comments

Comments
 (0)