" Vim syntax file
" Filename: foxpro.vim
" Version: 1.0
" Language: FoxPro for DOS/UNIX v2.6
" Maintainer: Bill W. Smith, Jr.
" Last Change: 15 May 2006
" This file replaces the FoxPro for DOS v2.x syntax file
" maintained by Powing Tse
"
" Change Log: added support for FoxPro Codebook highlighting
" corrected highlighting of comments that do NOT start in col 1
" corrected highlighting of comments at end of line (&&)
"
"
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" FoxPro Codebook Naming Conventions
syn match foxproCBConst "\<[c][A-Z][A-Za-z0-9_]*\>"
syn match foxproCBVar "\<[lgrt][acndlmf][A-Z][A-Za-z0-9_]*\>"
syn match foxproCBField "\<[a-z0-9]*\.[A-Za-z0-9_]*\>"
" PROPER CodeBook field names start with the data type and do NOT have _
syn match foxproCBField "\<[A-Za-z0-9]*\.[acndlm][A-Z][A-Za-z0-9]*\>"
syn match foxproCBWin "\"
" CodeBook 2.0 defined objects as follows
" This uses the hotkey from the screen builder as the second character
syn match foxproCBObject "\<[lgr][bfthnkoli][A-Z][A-Za-z0-9_]*\>"
" A later version added the following conventions for objects
syn match foxproCBObject "\"
syn match foxproCBObject "\"
syn match foxproCBObject "\"
syn match foxproCBObject "\"
syn match foxproCBObject "\"
syn match foxproCBObject "\"
syn match foxproCBObject "\"
syn match foxproCBObject "\"
syn match foxproCBObject "\"
syn match foxproCBObject "\"
syntax case ignore
" Highlight special characters
syn match foxproSpecial "^\s*!"
syn match foxproSpecial "&"
syn match foxproSpecial ";\s*$"
syn match foxproSpecial "^\s*="
syn match foxproSpecial "^\s*\\"
syn match foxproSpecial "^\s*\\\\"
syn match foxproSpecial "^\s*?"
syn match foxproSpecial "^\s*??"
syn match foxproSpecial "^\s*???"
syn match foxproSpecial "\\."
" @ Statements
syn match foxproAtSymbol contained "^\s*@"
syn match foxproAtCmd contained "\\|\\|\\|\\|\\|\\|\