diff --git a/ftplugin/ats.vim b/ftplugin/ats.vim index d9c9fca..7dce0fc 100644 --- a/ftplugin/ats.vim +++ b/ftplugin/ats.vim @@ -32,6 +32,10 @@ function! AtsFormat() call setpos('.', cursor) endfunction +augroup ats + autocmd BufWritePre *.ats,*.dats,*.cats,*.sats execute 'lcd %:p:h' +augroup END + " format on write if g:ats_autoformat == 1 augroup ats diff --git a/syntax_checkers/ats/patscc.vim b/syntax_checkers/ats/patscc.vim index bd165bf..4355408 100644 --- a/syntax_checkers/ats/patscc.vim +++ b/syntax_checkers/ats/patscc.vim @@ -11,7 +11,9 @@ function! SyntaxCheckers_ats_patscc_GetLocList() dict \ 'args': '-DATS_MEMALLOC_LIBC -cleanaft', \ 'fname': shellescape(expand('%') )}) - let errorformat = '%f:%m' + let errorformat = + \ 'exit(ATS):%m,' . + \ '%f:%m' let loclist = SyntasticMake({ \ 'makeprg': makeprg,