# Project for Vim plug-in for ATS-Postiats

**URL:** <https://discourse.ats-lang.org/t/project-for-vim-plug-in-for-ats-postiats/199>\
**Category:** Google Group\
**Created:** [February 10, 2014, 6:49am UTC](https://discourse.ats-lang.org/t/project-for-vim-plug-in-for-ats-postiats/199 "2014-02-10T06:49:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhiqiang\_Ren](https://avatars.discourse-cdn.com/v4/letter/z/9fc29f/32.png) [@Zhiqiang\_Ren](https://discourse.ats-lang.org/u/Zhiqiang_Ren)\
**Post date:** [February 10, 2014, 6:49am UTC](https://discourse.ats-lang.org/t/project-for-vim-plug-in-for-ats-postiats/199/1 "2014-02-10T06:49:55Z")

</div>

Project for Vim plug-in for ATS-Postiats

Hi all,

I started a project for building Vim plug-in for ATS-Postiats by imitating  
the similar project for Go language on Github. The repository is

> **[alex-ren/org.ats-lang.toolats](https://github.com/alex-ren/org.ats-lang.toolats/tree/master/org.ats-lang.toolats.vim)**
>
> Tools for ATS-Anairiats and ATS-Postiats. Contribute to alex-ren/org.ats-lang.toolats development by creating an account on GitHub.

Currently the plug-in can detect the file types of ATS source file (sats or  
dats) and load the corresponding compiler plug-in. The compiler plug-in  
sets the variable “makeprg” and the pattern for errorformat. Basically, you  
can now open a .dats file and type “:make” and vim would jump to the line  
of error. The actually value for “makeprg” now is “patsopt -tc -d %”. You  
can type “:set makeprg=make” to inform Vim to use make for compiling if a  
Makefile is provided.

I haven’t done extensive test about the pattern I wrote for matching the  
error message output by patsopt. If you find any problem using the compiler  
plug-in, please let me know. Also I try to achieve such result that if you  
set “makeprg” to “make” and the project consists of both ATS source file  
and C source file, Vim should be able to jump to appropriate file  
containing error. It’s not clear that the error message from patsopt and  
gcc are completely compatible. If you happen to find out certain  
incompatibility, please let me know.

The next work is to implement the plug-in for syntax highlighting.

If you like using ATS and Vim, please join me to develop handy plug-ins for  
ATS-Postiats.
