package publish
This commit is contained in:
parent
557b42af4f
commit
2774819384
2 changed files with 29 additions and 1 deletions
28
ftplugin/ats.vim
Normal file
28
ftplugin/ats.vim
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
if exists('b:ats_ftplugin')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:ats_ftplugin = 1
|
||||||
|
|
||||||
|
if !exists('g:ats_autoformat')
|
||||||
|
let g:ats_autoformat = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
set smarttab
|
||||||
|
au BufNewFile,BufRead *.*ats
|
||||||
|
\ set shiftwidth=2
|
||||||
|
|
||||||
|
setlocal commentstring=(*\ %s\ *)
|
||||||
|
|
||||||
|
function! AtsFormat()
|
||||||
|
exec 'normal! gg'
|
||||||
|
exec 'silent !atsfmt -i ' . expand('%')
|
||||||
|
exec 'e'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
if g:ats_autoformat == 1
|
||||||
|
augroup ats
|
||||||
|
autocmd BufWritePost *.ats,*.dats,*.sats,*.cats call AtsFormat()
|
||||||
|
augroup END
|
||||||
|
endif
|
||||||
|
|
||||||
|
command Format call AtsFormat()
|
|
@ -68,7 +68,7 @@ endif
|
||||||
|
|
||||||
" keyword highlighting
|
" keyword highlighting
|
||||||
syn keyword atsKeyword prefix postfix infix infixl infixr op nonfix
|
syn keyword atsKeyword prefix postfix infix infixl infixr op nonfix
|
||||||
syn keyword atsKeyword staload stadef sta dynload
|
syn keyword atsKeyword staload stadef sta dynload stacst
|
||||||
syn keyword atsCond if then else case sif
|
syn keyword atsCond if then else case sif
|
||||||
syn keyword atsRepeat while
|
syn keyword atsRepeat while
|
||||||
syn keyword atsException exception raise try
|
syn keyword atsException exception raise try
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue