From 2b691d7cf70be4511afd2246821b39d0369f03bb Mon Sep 17 00:00:00 2001 From: Ignat Insarov Date: Wed, 15 Jan 2020 15:29:16 +0300 Subject: [PATCH] Redirect `atsfmt`'s errors to nowhere. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We want automatic formatter to be silent. If it has an issue with the code, it can either silently fix it or ignore; it is the job of Syntastic to talk to us. Writing to stderr seems to break Vim's rendering on some terminals. --- ftplugin/ats.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftplugin/ats.vim b/ftplugin/ats.vim index 24383cc..5ae3761 100644 --- a/ftplugin/ats.vim +++ b/ftplugin/ats.vim @@ -32,7 +32,7 @@ let g:syntastic_ats_checkers = [ 'patscc' ] function! AtsFormat() let cursor = getpos('.') exec 'normal! gg' - exec 'silent !atsfmt -i ' . expand('%') + exec 'silent !atsfmt -i ' . expand('%') . ' 2>/dev/null' exec 'e' call setpos('.', cursor) endfunction