From df8f44304c092dd49059f72e97f294e51911e0e5 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Mon, 13 Feb 2012 10:05:41 -0600 Subject: [PATCH] vim: filetype epicscript --- .vim/ftdetect/epicscript.vim | 3 +++ .vim/syntax/epicscript.vim | 45 ++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .vim/ftdetect/epicscript.vim create mode 100644 .vim/syntax/epicscript.vim diff --git a/.vim/ftdetect/epicscript.vim b/.vim/ftdetect/epicscript.vim new file mode 100644 index 0000000..20be395 --- /dev/null +++ b/.vim/ftdetect/epicscript.vim @@ -0,0 +1,3 @@ +" Set filetype=epicscript for matching *.TXT files + +au! BufRead,BufNewFile *.TXT if getline(1) =~ '^NAME\=' | setfiletype epicscript | endif diff --git a/.vim/syntax/epicscript.vim b/.vim/syntax/epicscript.vim new file mode 100644 index 0000000..9c5f9e4 --- /dev/null +++ b/.vim/syntax/epicscript.vim @@ -0,0 +1,45 @@ +" Vim syntax file +" Language: Epic Release Script +" Maintainer: Tony Duckles +" Latest Revision: 10 Feb 2012 + +if exists("b:current_syntax") + finish +endif + +" comments +syntax match scriptComment "^REM.*$" + +" script init commands +syntax keyword scriptCommand NAME SETAPP CHECKKEY +" script control +syntax keyword scriptCommand STOP +" additional script control +syntax keyword scriptCommand SETOSDIR SETMDIR SETJOBS +" log control +syntax keyword scriptCommand NEWLOG SETLOG LOG +" general install commands +syntax keyword scriptCommand EXEC CONVERT JOB QCHKSUM +" general install load commands +syntax keyword scriptCommand UNPACK LOADROU LOADGLO LOADETAN LOADSQL LOADTX LOADSRPT IMPORT +" general install compile commands +syntax keyword scriptCommand CMLIB CMROU CMLIBFN CMROUITM CMROUDICT CMSCR CMSCRITM CMREC CMMENU CMTABLE CMQUERY CMTX +" general install update commands +syntax keyword scriptCommand UPDATEINDEX UPDATECAT UPDATEGRP UPDATEITEMTAB +" general ETAN commands +syntax keyword scriptCommand BUILDETAN NEWETAN SETETAN +" general install save commands +syntax keyword scriptCommand SAVEGLO SAVEROU SAVESQL SAVETX +" general install delete commands +syntax keyword scriptCommand DELROU DELREC DELSCR DELITM DELTAB DELDICT DELMENU DELGLO DELSI DELCAT DELSRPT DELTX DELBF + +syntax match scriptParamNum '^\d\+' nextgroup=scriptParamDlm skipwhite +syntax match scriptParamDlm '\~' nextgroup=scriptParamVal contained skipwhite +syntax match scriptParamVal '.*' contained + +hi def link scriptComment Comment +hi def link scriptCommand Type +hi def link scriptParamNum PreProc +hi def link scriptParamDlm Identifier +hi def link scriptParamVal Statement + -- 2.45.2