Skip to content

Commit dd19bb0

Browse files
committed
[WIP] Return output without using exe command
1 parent d07cc6f commit dd19bb0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plugin/php-cs-fixer.vim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ fun! PhpCsFixerFix(path)
2828
let command = command.' --fixers='.g:php_cs_fixer_fixers_list
2929
endif
3030

31-
exe ':! echo '.command.' && '.command
31+
let output = system(command)
32+
if v:shell_error
33+
echohl Error | echo output | echohl None
34+
else
35+
" todo, count how many files have been updated
36+
echohl Title | echo output | echohl None
37+
endif
3238
endfun
3339

3440
fun! PhpCsFixerFixDirectory()

0 commit comments

Comments
 (0)