vim/ftplugin/mercuryhdr.sh
#!/bin/sh
# vim: ft=sh ff=unix ts=4 sw=4 tw=78 et
MODULE=$(echo $(basename "$1" ) | sed 's/\.m$//')
FILE="${MODULE}.m"
cat <<EOF
%----------------------------------------------------------------------------%
% vim: ft=mercury ff=unix ts=4 sw=4 et
%----------------------------------------------------------------------------%
% File: $FILE
% Copyright © $(date +%Y) $GIT_AUTHOR_NAME
% Main author: $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>
% Created on: $(date)
% Stability: low
%----------------------------------------------------------------------------%
% TODO: module documentation
%----------------------------------------------------------------------------%

:- module $MODULE.

:- interface.

% TODO: insert predicates & functions

%----------------------------------------------------------------------------%

% TODO: declare predicates & functions

%----------------------------------------------------------------------------%
%----------------------------------------------------------------------------%

:- implementation.

% TODO: include/import/use modules

%----------------------------------------------------------------------------%

% TODO: implement predicates & functions

%----------------------------------------------------------------------------%
:- end_module $MODULE.
%----------------------------------------------------------------------------%
EOF
