Add some missing filetypes

This commit is contained in:
Adam Stankiewicz
2020-10-04 22:20:23 +02:00
parent 04d110660e
commit 32b097f67e
11 changed files with 1124 additions and 132 deletions

View File

@@ -7,7 +7,7 @@ A collection of language packs for Vim.
> One to rule them all, one to find them, one to bring them all and in the darkness bind them. > One to rule them all, one to find them, one to bring them all and in the darkness bind them.
- It **won't affect your startup time**, as scripts are loaded only on demand\*. - It **won't affect your startup time**, as scripts are loaded only on demand\*.
- It **installs and updates 120+ times faster** than the <!--Package Count-->203<!--/Package Count--> packages it consists of. - It **installs and updates 120+ times faster** than the <!--Package Count-->207<!--/Package Count--> packages it consists of.
- It is more secure because scripts loaded for all extensions are generated by vim-polyglot (ftdetect). - It is more secure because scripts loaded for all extensions are generated by vim-polyglot (ftdetect).
- Solid syntax and indentation support (other features skipped). Only the best language packs. - Solid syntax and indentation support (other features skipped). Only the best language packs.
- All unnecessary files are ignored (like enormous documentation from php support). - All unnecessary files are ignored (like enormous documentation from php support).
@@ -77,6 +77,7 @@ If you need full functionality of any plugin, please use it directly with your p
- [automake](https://github.com/vim/vim/tree/master/runtime) - [automake](https://github.com/vim/vim/tree/master/runtime)
- [ave](https://github.com/vim/vim/tree/master/runtime) - [ave](https://github.com/vim/vim/tree/master/runtime)
- [awk](https://github.com/vim/vim/tree/master/runtime) - [awk](https://github.com/vim/vim/tree/master/runtime)
- [b](https://github.com/vim/vim/tree/master/runtime)
- [basic](https://github.com/vim/vim/tree/master/runtime) - [basic](https://github.com/vim/vim/tree/master/runtime)
- [blade](https://github.com/jwalton512/vim-blade) - [blade](https://github.com/jwalton512/vim-blade)
- [brewfile](https://github.com/bfontaine/Brewfile.vim) - [brewfile](https://github.com/bfontaine/Brewfile.vim)
@@ -112,6 +113,7 @@ If you need full functionality of any plugin, please use it directly with your p
- [fish](https://github.com/georgewitteman/vim-fish) - [fish](https://github.com/georgewitteman/vim-fish)
- [flatbuffers](https://github.com/dcharbon/vim-flatbuffers) - [flatbuffers](https://github.com/dcharbon/vim-flatbuffers)
- [forth](https://github.com/vim/vim/tree/master/runtime) - [forth](https://github.com/vim/vim/tree/master/runtime)
- [freebasic](https://github.com/vim/vim/tree/master/runtime)
- [fsharp](https://github.com/ionide/Ionide-vim) - [fsharp](https://github.com/ionide/Ionide-vim)
- [gdscript](https://github.com/calviken/vim-gdscript3) - [gdscript](https://github.com/calviken/vim-gdscript3)
- [git](https://github.com/tpope/vim-git) - [git](https://github.com/tpope/vim-git)
@@ -125,6 +127,7 @@ If you need full functionality of any plugin, please use it directly with your p
- [groovy](https://github.com/vim/vim/tree/master/runtime) - [groovy](https://github.com/vim/vim/tree/master/runtime)
- [grub](https://github.com/vim/vim/tree/master/runtime) - [grub](https://github.com/vim/vim/tree/master/runtime)
- [haml](https://github.com/tpope/vim-haml) - [haml](https://github.com/tpope/vim-haml)
- [hamster](https://github.com/vim/vim/tree/master/runtime)
- [handlebars](https://github.com/mustache/vim-mustache-handlebars) - [handlebars](https://github.com/mustache/vim-mustache-handlebars)
- [haproxy](https://github.com/CH-DanReif/haproxy.vim) - [haproxy](https://github.com/CH-DanReif/haproxy.vim)
- [haskell](https://github.com/neovimhaskell/haskell-vim) - [haskell](https://github.com/neovimhaskell/haskell-vim)
@@ -136,6 +139,7 @@ If you need full functionality of any plugin, please use it directly with your p
- [html5](https://github.com/othree/html5.vim) - [html5](https://github.com/othree/html5.vim)
- [htmldjango](https://github.com/vim/vim/tree/master/runtime) - [htmldjango](https://github.com/vim/vim/tree/master/runtime)
- [i3](https://github.com/mboughaba/i3config.vim) - [i3](https://github.com/mboughaba/i3config.vim)
- [ibasic](https://github.com/vim/vim/tree/master/runtime)
- [icalendar](https://github.com/chutzpah/icalendar.vim) - [icalendar](https://github.com/chutzpah/icalendar.vim)
- [idris2](https://github.com/edwinb/idris2-vim) - [idris2](https://github.com/edwinb/idris2-vim)
- [idris](https://github.com/idris-hackers/idris-vim) - [idris](https://github.com/idris-hackers/idris-vim)

View File

@@ -35,6 +35,7 @@ let s:globs = {
\ 'automake': '[Mm]akefile.am,GNUmakefile.am', \ 'automake': '[Mm]akefile.am,GNUmakefile.am',
\ 'ave': '*.ave', \ 'ave': '*.ave',
\ 'awk': '*.awk,*.gawk', \ 'awk': '*.awk,*.gawk',
\ 'b': '*.mch,*.ref,*.imp',
\ 'basic': '*.basic', \ 'basic': '*.basic',
\ 'blade': '*.blade,*.blade.php', \ 'blade': '*.blade,*.blade.php',
\ 'brewfile': 'Brewfile', \ 'brewfile': 'Brewfile',
@@ -78,6 +79,7 @@ let s:globs = {
\ 'fish': '*.fish', \ 'fish': '*.fish',
\ 'flow': '*.flow', \ 'flow': '*.flow',
\ 'forth': '*.fs,*.ft,*.fth', \ 'forth': '*.fs,*.ft,*.fth',
\ 'freebasic': '*.fb,*.bi',
\ 'fsharp': '*.fs,*.fsi,*.fsx', \ 'fsharp': '*.fs,*.fsi,*.fsx',
\ 'gdscript3': '*.gd', \ 'gdscript3': '*.gd',
\ 'gitcommit': 'COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG', \ 'gitcommit': 'COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG',
@@ -95,6 +97,7 @@ let s:globs = {
\ 'groovy': '*.groovy,*.grt,*.gtpl,*.gvy,*.gradle,Jenkinsfile', \ 'groovy': '*.groovy,*.grt,*.gtpl,*.gvy,*.gradle,Jenkinsfile',
\ 'grub': '', \ 'grub': '',
\ 'haml': '*.haml,*.haml.deface,*.hamlc,*.hamlbars', \ 'haml': '*.haml,*.haml.deface,*.hamlc,*.hamlbars',
\ 'hamster': '*.hsc,*.hsm',
\ 'haproxy': '*.cfg,haproxy.cfg,haproxy*.conf*', \ 'haproxy': '*.cfg,haproxy.cfg,haproxy*.conf*',
\ 'haskell': '*.hs,*.hs-boot,*.hsc,*.bpk,*.hsig', \ 'haskell': '*.hs,*.hs-boot,*.hsc,*.bpk,*.hsig',
\ 'haxe': '*.hx,*.hxsl', \ 'haxe': '*.hx,*.hxsl',
@@ -108,6 +111,7 @@ let s:globs = {
\ 'html.twig': '*.twig', \ 'html.twig': '*.twig',
\ 'htmldjango': '*.jinja,*.j2,*.jinja2,*.njk', \ 'htmldjango': '*.jinja,*.j2,*.jinja2,*.njk',
\ 'i3config': '*.i3.config,*.i3config,i3.config,i3config,.i3.config,.i3config', \ 'i3config': '*.i3.config,*.i3config,i3.config,i3config,.i3.config,.i3config',
\ 'ibasic': '*.iba,*.ibi',
\ 'icalendar': '*.ics', \ 'icalendar': '*.ics',
\ 'idris': '*.idr,*.lidr,idris-response', \ 'idris': '*.idr,*.lidr,idris-response',
\ 'idris2': '*.idr,*.ipkg,idris-response', \ 'idris2': '*.idr,*.ipkg,idris-response',

View File

@@ -117,6 +117,22 @@ augroup filetypedetect
" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE " DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
if !has_key(s:disabled_packages, 'hamster')
au BufNewFile,BufRead *.hsc,*.hsm setf hamster
endif
if !has_key(s:disabled_packages, 'freebasic')
au BufNewFile,BufRead *.bi,*.fb setf freebasic
endif
if !has_key(s:disabled_packages, 'ibasic')
au BufNewFile,BufRead *.iba,*.ibi setf ibasic
endif
if !has_key(s:disabled_packages, 'b')
au BufNewFile,BufRead *.imp,*.mch,*.ref setf b
endif
if !has_key(s:disabled_packages, 'sql') if !has_key(s:disabled_packages, 'sql')
au BufNewFile,BufRead *.bdy,*.ddl,*.fnc,*.pck,*.pkb,*.pks,*.plb,*.pls,*.plsql,*.prc,*.spc,*.sql,*.tpb,*.tps,*.trg,*.tyb,*.tyc,*.typ,*.vw setf sql au BufNewFile,BufRead *.bdy,*.ddl,*.fnc,*.pck,*.pkb,*.pks,*.plb,*.pls,*.plsql,*.prc,*.spc,*.sql,*.tpb,*.tps,*.trg,*.tyb,*.tyc,*.typ,*.vw setf sql
endif endif
@@ -1233,125 +1249,6 @@ if !exists("g:ft_ignore_pat")
let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$' let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$'
endif endif
" Vim help file
au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help
" Abaqus or Trasys
au BufNewFile,BufRead *.inp call polyglot#ft#Check_inp()
" A2ps printing utility
au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,a2psrc,.a2psrc setf a2ps
" AMPL
au BufNewFile,BufRead *.run setf ampl
" Ant
au BufNewFile,BufRead build.xml setf ant
" Arduino
au BufNewFile,BufRead *.ino,*.pde setf arduino
" Apache config file
au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf setf apache
au BufNewFile,BufRead */etc/apache2/sites-*/*.com setf apache
" XA65 MOS6510 cross assembler
au BufNewFile,BufRead *.a65 setf a65
" Applescript
au BufNewFile,BufRead *.scpt setf applescript
" Applix ELF
au BufNewFile,BufRead *.am
\ if expand("<afile>") !~? 'Makefile.am\>' | setf elf | endif
" ALSA configuration
au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf setf alsaconf
" Arc Macro Language
au BufNewFile,BufRead *.aml setf aml
" APT config file
au BufNewFile,BufRead apt.conf setf aptconf
au BufNewFile,BufRead */.aptitude/config setf aptconf
au BufNewFile,BufRead */etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf} setf aptconf
" Arch Inventory file
au BufNewFile,BufRead .arch-inventory,=tagging-method setf arch
" ART*Enterprise (formerly ART-IM)
au BufNewFile,BufRead *.art setf art
" AsciiDoc
au BufNewFile,BufRead *.asciidoc,*.adoc setf asciidoc
" ASN.1
au BufNewFile,BufRead *.asn,*.asn1 setf asn
" Active Server Pages (with Visual Basic Script)
au BufNewFile,BufRead *.asa
\ if exists("g:filetype_asa") |
\ exe "setf " . g:filetype_asa |
\ else |
\ setf aspvbs |
\ endif
" Active Server Pages (with Perl or Visual Basic Script)
au BufNewFile,BufRead *.asp
\ if exists("g:filetype_asp") |
\ exe "setf " . g:filetype_asp |
\ elseif getline(1) . getline(2) . getline(3) =~? "perlscript" |
\ setf aspperl |
\ else |
\ setf aspvbs |
\ endif
" Grub (must be before catch *.lst)
au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub
" Assembly (all kinds)
" *.lst is not pure assembly, it has two extra columns (address, byte codes)
au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call polyglot#ft#FTasm()
" Macro (VAX)
au BufNewFile,BufRead *.mar setf vmasm
" Atlas
au BufNewFile,BufRead *.atl,*.as setf atlas
" Autoit v3
au BufNewFile,BufRead *.au3 setf autoit
" Autohotkey
au BufNewFile,BufRead *.ahk setf autohotkey
" Automake
au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am setf automake
" Autotest .at files are actually m4
au BufNewFile,BufRead *.at setf m4
" Avenue
au BufNewFile,BufRead *.ave setf ave
" Awk
au BufNewFile,BufRead *.awk,*.gawk setf awk
" B
au BufNewFile,BufRead *.mch,*.ref,*.imp setf b
" BASIC or Visual Basic
au BufNewFile,BufRead *.bas call polyglot#ft#FTVB("basic")
" Visual Basic Script (close to Visual Basic) or Visual Basic .NET
au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb
" IBasic file (similar to QBasic)
au BufNewFile,BufRead *.iba,*.ibi setf ibasic
" FreeBasic file (similar to QBasic)
au BufNewFile,BufRead *.fb,*.bi setf freebasic
" Batch file for MSDOS. " Batch file for MSDOS.
au BufNewFile,BufRead *.bat,*.sys setf dosbatch au BufNewFile,BufRead *.bat,*.sys setf dosbatch
" *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd. " *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd.
@@ -1819,12 +1716,6 @@ au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash
au BufNewFile,BufRead gitolite.conf setf gitolite au BufNewFile,BufRead gitolite.conf setf gitolite
au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl
" Gnuplot scripts
au BufNewFile,BufRead *.gpi setf gnuplot
" Go (Google)
au BufNewFile,BufRead *.go setf go
" GrADS scripts " GrADS scripts
au BufNewFile,BufRead *.gs setf grads au BufNewFile,BufRead *.gs setf grads
@@ -1843,12 +1734,6 @@ au BufNewFile,BufRead */etc/group,*/etc/group-,*/etc/group.edit,*/etc/gshadow,*/
" GTK RC " GTK RC
au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
" Haml
au BufNewFile,BufRead *.haml setf haml
" Hamster Classic | Playground files
au BufNewFile,BufRead *.hsc,*.hsm setf hamster
" Haskell " Haskell
au BufNewFile,BufRead *.hs,*.hs-boot setf haskell au BufNewFile,BufRead *.hs,*.hs-boot setf haskell
au BufNewFile,BufRead *.lhs setf lhaskell au BufNewFile,BufRead *.lhs setf lhaskell

66
ftplugin/hamster.vim Normal file
View File

@@ -0,0 +1,66 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hamster') == -1
" Vim filetype plugin
" Language: Hamster Script
" Version: 2.0.6.0
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change: 2017 Mar 18
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
let b:undo_ftplugin = "setl fo< com< tw< commentstring<"
\ . "| unlet! b:match_ignorecase b:match_words b:match_skip"
" Set 'formatoptions' to break comment lines but not other lines,
" and insert the comment leader when hitting <CR> or using "o".
setlocal fo-=t fo+=croql
" Use the # sign for comments
setlocal comments=:#
" Format comments to be up to 78 characters long
if &tw == 0
setlocal tw=78
endif
" Comments start with a double quote
setlocal commentstring=#%s
" Move around functions.
noremap <silent><buffer> [[ :call search('^\s*sub\>', "bW")<CR>
noremap <silent><buffer> ]] :call search('^\s*sub\>', "W")<CR>
noremap <silent><buffer> [] :call search('^\s*endsub\>', "bW")<CR>
noremap <silent><buffer> ][ :call search('^\s*endsub\>', "W")<CR>
" Move around comments
noremap <silent><buffer> ]# :call search('^\s*#\@!', "W")<CR>
noremap <silent><buffer> [# :call search('^\s*#\@!', "bW")<CR>
" Let the matchit plugin know what items can be matched.
if exists("loaded_matchit")
let b:match_ignorecase = 0
let b:match_words =
\ '\<sub\>:\<return\>:\<endsub\>,' .
\ '\<do\|while\|repeat\|for\>:\<break\>:\<continue\>:\<loop\|endwhile\|until\|endfor\>,' .
\ '\<if\>:\<else\%[if]\>:\<endif\>'
" Ignore ":syntax region" commands, the 'end' argument clobbers if-endif
" let b:match_skip = 'getline(".") =~ "^\\s*sy\\%[ntax]\\s\\+region" ||
" \ synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string"'
endif
setlocal ignorecase
let &cpo = s:cpo_save
unlet s:cpo_save
setlocal cpo+=M " makes \%( match \)
endif

59
indent/hamster.vim Normal file
View File

@@ -0,0 +1,59 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hamster') == -1
" Vim indent file
" Language: Hamster Script
" Version: 2.0.6.0
" Last Change: Wed Nov 08 2006 12:02:42 PM
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentkeys+==~if,=~else,=~endif,=~endfor,=~endwhile
setlocal indentkeys+==~do,=~until,=~while,=~repeat,=~for,=~loop
setlocal indentkeys+==~sub,=~endsub
" Define the appropriate indent function but only once
setlocal indentexpr=HamGetFreeIndent()
if exists("*HamGetFreeIndent")
finish
endif
function HamGetIndent(lnum)
let ind = indent(a:lnum)
let prevline=getline(a:lnum)
" Add a shiftwidth to statements following if, else, elseif,
" case, select, default, do, until, while, for, start
if prevline =~? '^\s*\<\(if\|else\%(if\)\?\|for\|repeat\|do\|while\|sub\)\>'
let ind = ind + shiftwidth()
endif
" Subtract a shiftwidth from else, elseif, end(if|while|for), until
let line = getline(v:lnum)
if line =~? '^\s*\(else\|elseif\|loop\|until\|end\%(if\|while\|for\|sub\)\)\>'
let ind = ind - shiftwidth()
endif
return ind
endfunction
function HamGetFreeIndent()
" Find the previous non-blank line
let lnum = prevnonblank(v:lnum - 1)
" Use zero indent at the top of the file
if lnum == 0
return 0
endif
let ind=HamGetIndent(lnum)
return ind
endfunction
" vim:sw=2 tw=80
endif

View File

@@ -1943,3 +1943,40 @@ filetypes:
filenames: filenames:
- auto.master - auto.master
- config - config
---
name: b
remote: vim/vim:runtime
glob: '**/b.vim'
filetypes:
- name: b
extensions:
- mch
- ref
- imp
---
name: ibasic
remote: vim/vim:runtime
glob: '**/ibasic.vim'
filetypes:
- name: ibasic
extensions:
- iba
- ibi
---
name: freebasic
remote: vim/vim:runtime
glob: '**/freebasic.vim'
filetypes:
- name: freebasic
extensions:
- fb
- bi
---
name: hamster
remote: vim/vim:runtime
glob: '**/hamster.vim'
filetypes:
- name: hamster
extensions:
- hsc
- hsm

118
syntax/b.vim Normal file
View File

@@ -0,0 +1,118 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'b') == -1
" Vim syntax file
" Language: B (A Formal Method with refinement and mathematical proof)
" Maintainer: Mathieu Clabaut <mathieu.clabaut@gmail.com>
" Contributor: Csaba Hoch
" LastChange: 8 Dec 2007
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
" A bunch of useful B keywords
syn keyword bStatement MACHINE MODEL SEES OPERATIONS INCLUDES DEFINITIONS CONSTRAINTS CONSTANTS VARIABLES CONCRETE_CONSTANTS CONCRETE_VARIABLES ABSTRACT_CONSTANTS ABSTRACT_VARIABLES HIDDEN_CONSTANTS HIDDEN_VARIABLES ASSERT ASSERTIONS EXTENDS IMPLEMENTATION REFINEMENT IMPORTS USES INITIALISATION INVARIANT PROMOTES PROPERTIES REFINES SETS VALUES VARIANT VISIBLE_CONSTANTS VISIBLE_VARIABLES THEORY XLS THEOREMS LOCAL_OPERATIONS
syn keyword bLabel CASE IN EITHER OR CHOICE DO OF
syn keyword bConditional IF ELSE SELECT ELSIF THEN WHEN
syn keyword bRepeat WHILE FOR
syn keyword bOps bool card conc closure closure1 dom first fnc front not or id inter iseq iseq1 iterate last max min mod perm pred prj1 prj2 ran rel rev seq seq1 size skip succ tail union
syn keyword bKeywords LET VAR BE IN BEGIN END POW POW1 FIN FIN1 PRE SIGMA STRING UNION IS ANY WHERE
syn keyword bBoolean TRUE FALSE bfalse btrue
syn keyword bConstant PI MAXINT MININT User_Pass PatchProver PatchProverH0 PatchProverB0 FLAT ARI DED SUB RES
syn keyword bGuard binhyp band bnot bguard bsearch bflat bfresh bguardi bget bgethyp barith bgetresult bresult bgoal bmatch bmodr bnewv bnum btest bpattern bprintf bwritef bsubfrm bvrb blvar bcall bappend bclose
syn keyword bLogic or not
syn match bLogic "\(!\|#\|%\|&\|+->>\|+->\|-->>\|->>\|-->\|->\|/:\|/<:\|/<<:\|/=\|/\\\|/|\\\|::\|:\|;:\|<+\|<->\|<--\|<-\|<:\|<<:\|<<|\|<=>\|<|\|==\|=>\|>+>>\|>->\|>+>\|||\||->\)"
syn match bNothing /:=/
syn keyword cTodo contained TODO FIXME XXX
" String and Character constants
" Highlight special characters (those which have a backslash) differently
syn match bSpecial contained "\\[0-7][0-7][0-7]\=\|\\."
syn region bString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=bSpecial
syn match bCharacter "'[^\\]'"
syn match bSpecialCharacter "'\\.'"
syn match bSpecialCharacter "'\\[0-7][0-7]'"
syn match bSpecialCharacter "'\\[0-7][0-7][0-7]'"
"catch errors caused by wrong parenthesis
syn region bParen transparent start='(' end=')' contains=ALLBUT,bParenError,bIncluded,bSpecial,bTodo,bUserLabel,bBitField
syn match bParenError ")"
syn match bInParen contained "[{}]"
"integer number, or floating point number without a dot and with "f".
syn case ignore
syn match bNumber "\<[0-9]\+\>"
"syn match bIdentifier "\<[a-z_][a-z0-9_]*\>"
syn case match
syn region bComment start="/\*" end="\*/" contains=bTodo
syn match bComment "//.*" contains=bTodo
syntax match bCommentError "\*/"
syn keyword bType INT INTEGER BOOL NAT NATURAL NAT1 NATURAL1
syn region bPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=bComment,bString,bCharacter,bNumber,bCommentError
syn region bIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match bIncluded contained "<[^>]*>"
syn match bInclude "^\s*#\s*include\>\s*["<]" contains=bIncluded
syn region bDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,bPreCondit,bIncluded,bInclude,bDefine,bInParen
syn region bPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,bPreCondit,bIncluded,bInclude,bDefine,bInParen
syn sync ccomment bComment minlines=10
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
" The default methods for highlighting. Can be overridden later
hi def link bLabel Label
hi def link bUserLabel Label
hi def link bConditional Conditional
hi def link bRepeat Repeat
hi def link bLogic Special
hi def link bCharacter Character
hi def link bSpecialCharacter bSpecial
hi def link bNumber Number
hi def link bFloat Float
hi def link bOctalError bError
hi def link bParenError bError
" hi def link bInParen bError
hi def link bCommentError bError
hi def link bBoolean Identifier
hi def link bConstant Identifier
hi def link bGuard Identifier
hi def link bOperator Operator
hi def link bKeywords Operator
hi def link bOps Identifier
hi def link bStructure Structure
hi def link bStorageClass StorageClass
hi def link bInclude Include
hi def link bPreProc PreProc
hi def link bDefine Macro
hi def link bIncluded bString
hi def link bError Error
hi def link bStatement Statement
hi def link bPreCondit PreCondit
hi def link bType Type
hi def link bCommentError bError
hi def link bCommentString bString
hi def link bComment2String bString
hi def link bCommentSkip bComment
hi def link bString String
hi def link bComment Comment
hi def link bSpecial SpecialChar
hi def link bTodo Todo
"hi link bIdentifier Identifier
let b:current_syntax = "b"
" vim: ts=8
endif

261
syntax/freebasic.vim Normal file
View File

@@ -0,0 +1,261 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'freebasic') == -1
" Vim syntax file
" Language: FreeBasic
" Maintainer: Mark Manning <markem@sim1.us>
" Updated: 10/9/2019
" Version: 7.0b
"
" Description:
"
" Based originally on the work done by Allan Kelly <Allan.Kelly@ed.ac.uk>
" Updated by Mark Manning <markem@sim1.us>
" Applied FreeBasic support to the already excellent support
" for standard basic syntax (like QB).
"
" First version based on Micro$soft QBASIC circa
" 1989, as documented in 'Learn BASIC Now' by
" Halvorson&Rygmyr. Microsoft Press 1989. This syntax file
" not a complete implementation yet. Send suggestions to
" the maintainer.
"
" Quit when a (custom) syntax file was already loaded (Taken from c.vim)
"
if exists("b:current_syntax")
finish
endif
"
" Be sure to turn on the "case ignore" since current versions
" of freebasic support both upper as well as lowercase
" letters. - MEM 10/1/2006
"
syn case ignore
"
" This list of keywords is taken directly from the FreeBasic
" user's guide as presented by the FreeBasic online site.
"
syn keyword freebasicArrays ERASE LBOUND REDIM PRESERVE UBOUND
syn keyword freebasicBitManipulation BIT BITRESET BITSET HIBYTE HIWORD LOBYTE LOWORD SHL SHR
syn keyword freebasicCompilerSwitches DEFBYTE DEFDBL DEFINT DEFLNG DEFLNGINT DEFSHORT DEFSNG DEFSTR
syn keyword freebasicCompilerSwitches DEFUBYTE DEFUINT DEFULNGINT DEFUSHORT
syn match freebasicCompilerSwitches "\<option\s+\(BASE\|BYVAL\|DYNAMIC\|ESCAPE\|EXPLICIT\|NOKEYWORD\)\>"
syn match freebasicCompilerSwitches "\<option\s+\(PRIVATE\|STATIC\)\>"
syn region freebasicConditional start="\son\s+" skip=".*" end="gosub"
syn region freebasicConditional start="\son\s+" skip=".*" end="goto"
syn match freebasicConditional "\<select\s+case\>"
syn keyword freebasicConditional if iif then case else elseif with
syn match freebasicConsole "\<open\s+\(CONS\|ERR\|PIPE\|SCRN\)\>"
syn keyword freebasicConsole BEEP CLS CSRLIN LOCATE PRINT POS SPC TAB VIEW WIDTH
syn keyword freebasicDataTypes BYTE AS DIM CONST DOUBLE ENUM INTEGER LONG LONGINT SHARED SHORT STRING
syn keyword freebasicDataTypes SINGLE TYPE UBYTE UINTEGER ULONGINT UNION UNSIGNED USHORT WSTRING ZSTRING
syn keyword freebasicDateTime DATE DATEADD DATEDIFF DATEPART DATESERIAL DATEVALUE DAY HOUR MINUTE
syn keyword freebasicDateTime MONTH MONTHNAME NOW SECOND SETDATE SETTIME TIME TIMESERIAL TIMEVALUE
syn keyword freebasicDateTime TIMER YEAR WEEKDAY WEEKDAYNAME
syn keyword freebasicDebug ASSERT STOP
syn keyword freebasicErrorHandling ERR ERL ERROR LOCAL RESUME
syn match freebasicErrorHandling "\<resume\s+next\>"
syn match freebasicErrorHandling "\<on\s+error\>"
syn match freebasicFiles "\<get\s+#\>"
syn match freebasicFiles "\<input\s+#\>"
syn match freebasicFiles "\<line\s+input\s+#\>"
syn match freebasicFiles "\<put\s+#\>"
syn keyword freebasicFiles ACCESS APPEND BINARY BLOAD BSAVE CLOSE EOF FREEFILE INPUT LOC
syn keyword freebasicFiles LOCK LOF OPEN OUTPUT RANDOM RESET SEEK UNLOCK WRITE
syn keyword freebasicFunctions ALIAS ANY BYREF BYVAL CALL CDECL CONSTRUCTOR DESTRUCTOR
syn keyword freebasicFunctions DECLARE FUNCTION LIB OVERLOAD PASCAL STATIC SUB STDCALL
syn keyword freebasicFunctions VA_ARG VA_FIRST VA_NEXT
syn match freebasicGraphics "\<palette\s+get\>"
syn keyword freebasicGraphics ALPHA CIRCLE CLS COLOR CUSTOM DRAW FLIP GET
syn keyword freebasicGraphics IMAGECREATE IMAGEDESTROY LINE PAINT PALETTE PCOPY PMAP POINT
syn keyword freebasicGraphics PRESET PSET PUT RGB RGBA SCREEN SCREENCOPY SCREENINFO SCREENLIST
syn keyword freebasicGraphics SCREENLOCK SCREENPTR SCREENRES SCREENSET SCREENSYNC SCREENUNLOCK
syn keyword freebasicGraphics TRANS USING VIEW WINDOW
syn match freebasicHardware "\<open\s+com\>"
syn keyword freebasicHardware INP OUT WAIT LPT LPOS LPRINT
syn keyword freebasicLogical AND EQV IMP OR NOT XOR
syn keyword freebasicMath ABS ACOS ASIN ATAN2 ATN COS EXP FIX INT LOG MOD RANDOMIZE
syn keyword freebasicMath RND SGN SIN SQR TAN
syn keyword freebasicMemory ALLOCATE CALLOCATE CLEAR DEALLOCATE FIELD FRE PEEK POKE REALLOCATE
syn keyword freebasicMisc ASM DATA LET TO READ RESTORE SIZEOF SWAP OFFSETOF
syn keyword freebasicModularizing CHAIN COMMON EXPORT EXTERN DYLIBFREE DYLIBLOAD DYLIBSYMBOL
syn keyword freebasicModularizing PRIVATE PUBLIC
syn keyword freebasicMultithreading MUTEXCREATE MUTEXDESTROY MUTEXLOCK MUTEXUNLOCK THREADCREATE THREADWAIT
syn keyword freebasicShell CHDIR DIR COMMAND ENVIRON EXEC EXEPATH KILL NAME MKDIR RMDIR RUN
syn keyword freebasicEnviron SHELL SYSTEM WINDOWTITLE POINTERS
syn keyword freebasicLoops FOR LOOP WHILE WEND DO CONTINUE STEP UNTIL next
syn match freebasicInclude "\<#\s*\(inclib\|include\)\>"
syn match freebasicInclude "\<\$\s*include\>"
syn keyword freebasicPointer PROCPTR PTR SADD STRPTR VARPTR
syn keyword freebasicPredefined __DATE__ __FB_DOS__ __FB_LINUX__ __FB_MAIN__ __FB_MIN_VERSION__
syn keyword freebasicPredefined __FB_SIGNATURE__ __FB_VERSION__ __FB_WIN32__ __FB_VER_MAJOR__
syn keyword freebasicPredefined __FB_VER_MINOR__ __FB_VER_PATCH__ __FILE__ __FUNCTION__
syn keyword freebasicPredefined __LINE__ __TIME__
syn match freebasicPreProcessor "\<^#\s*\(define\|undef\)\>"
syn match freebasicPreProcessor "\<^#\s*\(ifdef\|ifndef\|else\|elseif\|endif\|if\)\>"
syn match freebasicPreProcessor "\<#\s*error\>"
syn match freebasicPreProcessor "\<#\s*\(print\|dynamic\|static\)\>"
syn keyword freebasicPreProcessor DEFINED ONCE
syn keyword freebasicProgramFlow END EXIT GOSUB GOTO
syn keyword freebasicProgramFlow IS RETURN SCOPE SLEEP
syn keyword freebasicString INSTR LCASE LEFT LEN LSET LTRIM MID RIGHT RSET RTRIM
syn keyword freebasicString SPACE STRING TRIM UCASE ASC BIN CHR CVD CVI CVL CVLONGINT
syn keyword freebasicString CVS CVSHORT FORMAT HEX MKD MKI MKL MKLONGINT MKS MKSHORT
syn keyword freebasicString OCT STR VAL VALLNG VALINT VALUINT VALULNG
syn keyword freebasicTypeCasting CAST CBYTE CDBL CINT CLNG CLNGINT CPTR CSHORT CSIGN CSNG
syn keyword freebasicTypeCasting CUBYTE CUINT CULNGINT CUNSG CURDIR CUSHORT
syn match freebasicUserInput "\<line\s+input\>"
syn keyword freebasicUserInput GETJOYSTICK GETKEY GETMOUSE INKEY INPUT MULTIKEY SETMOUSE
"
" Do the Basic variables names first. This is because it
" is the most inclusive of the tests. Later on we change
" this so the identifiers are split up into the various
" types of identifiers like functions, basic commands and
" such. MEM 9/9/2006
"
syn match freebasicIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>"
syn match freebasicGenericFunction "\<[a-zA-Z_][a-zA-Z0-9_]*\>\s*("me=e-1,he=e-1
"
" Function list
"
syn keyword freebasicTodo contained TODO
"
" Catch errors caused by wrong parenthesis
"
syn region freebasicParen transparent start='(' end=')' contains=ALLBUT,@freebasicParenGroup
syn match freebasicParenError ")"
syn match freebasicInParen contained "[{}]"
syn cluster freebasicParenGroup contains=freebasicParenError,freebasicSpecial,freebasicTodo,freebasicUserCont,freebasicUserLabel,freebasicBitField
"
" Integer number, or floating point number without a dot and with "f".
"
syn region freebasicHex start="&h" end="\W"
syn region freebasicHexError start="&h\x*[g-zG-Z]" end="\W"
syn region freebasicOctal start="&o" end="\W"
syn region freebasicOctalError start="&o[0-7]*[89a-zA-Z]" end="\W"
syn region freebasicBinary start="&b" end="\W"
syn region freebasicBinaryError start="&b[01]*[2-9a-zA-Z]" end="\W"
syn match freebasicInteger "\<\d\+\(u\=l\=\|lu\|f\)\>"
"
" Floating point number, with dot, optional exponent
"
syn match freebasicFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
"
" Floating point number, starting with a dot, optional exponent
"
syn match freebasicFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
"
" Floating point number, without dot, with exponent
"
syn match freebasicFloat "\<\d\+e[-+]\=\d\+[fl]\=\>"
"
" Octal number
"
syn case match
syn match freebasicOctal2 "\<0\o*\>"
syn match freebasicOctal2Error "\<0\o*[89a-zA-Z]"
"
" String and Character contstants
"
syn region freebasicString start='"' end='"' contains=freebasicSpecial,freebasicTodo
syn region freebasicString start="'" end="'" contains=freebasicSpecial,freebasicTodo
"
" Comments
"
syn match freebasicSpecial contained "\\\\."
syn region freebasicComment start="^rem" end="$" contains=freebasicSpecial,freebasicTodo
syn region freebasicComment start=":\s*rem" end="$" contains=freebasicSpecial,freebasicTodo
syn region freebasicComment start="\s*'" end="$" contains=freebasicSpecial,freebasicTodo
syn region freebasicComment start="^'" end="$" contains=freebasicSpecial,freebasicTodo
"
" Now do the comments and labels
"
syn match freebasicLabel "^\d"
syn match freebasicLabel "\<^\w+:\>"
syn region freebasicLineNumber start="^\d" end="\s"
"
" Create the clusters
"
syn cluster freebasicNumber contains=freebasicHex,freebasicOctal,freebasicOctal2,freebasicBinary,freebasicInteger,freebasicFloat
syn cluster freebasicError contains=freebasicHexError,freebasicOctalError,freebasicOctal2,freebasicBinary
"
" Used with OPEN statement
"
syn match freebasicFilenumber "#\d\+"
syn match freebasicMathOperator "[\+\-\=\|\*\/\>\<\%\()[\]]" contains=freebasicParen
"
" The default methods for highlighting. Can be overridden later
"
hi def link freebasicArrays StorageClass
hi def link freebasicBitManipulation Operator
hi def link freebasicCompilerSwitches PreCondit
hi def link freebasicConsole Special
hi def link freebasicDataTypes Type
hi def link freebasicDateTime Type
hi def link freebasicDebug Special
hi def link freebasicErrorHandling Special
hi def link freebasicFiles Special
hi def link freebasicFunctions Function
hi def link freebasicGraphics Function
hi def link freebasicHardware Special
hi def link freebasicLogical Conditional
hi def link freebasicMath Function
hi def link freebasicMemory Function
hi def link freebasicMisc Special
hi def link freebasicModularizing Special
hi def link freebasicMultithreading Special
hi def link freebasicShell Special
hi def link freebasicEnviron Special
hi def link freebasicPointer Special
hi def link freebasicPredefined PreProc
hi def link freebasicPreProcessor PreProc
hi def link freebasicProgramFlow Statement
hi def link freebasicString String
hi def link freebasicTypeCasting Type
hi def link freebasicUserInput Statement
hi def link freebasicComment Comment
hi def link freebasicConditional Conditional
hi def link freebasicError Error
hi def link freebasicIdentifier Identifier
hi def link freebasicInclude Include
hi def link freebasicGenericFunction Function
hi def link freebasicLabel Label
hi def link freebasicLineNumber Label
hi def link freebasicMathOperator Operator
hi def link freebasicNumber Number
hi def link freebasicSpecial Special
hi def link freebasicTodo Todo
let b:current_syntax = "freebasic"
" vim: ts=8
endif

374
syntax/hamster.vim Normal file
View File

@@ -0,0 +1,374 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hamster') == -1
" Vim syntax file
" Language: Hamster Scripting Language
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Last Change: Sun Oct 24 2004 7:11:50 PM
" Version: 2.0.6.0
" Description: Hamster Classic
" Hamster is a local server for news and mail. It's a windows-32-bit-program.
" It allows the use of multiple news- and mailserver and combines them to one
" mail- and newsserver for the news/mail-client. It load faster than a normal
" newsreader because many threads can run simultaneous. It contains scorefile
" for news and mail, a build-in script language, the GUI allows translation to
" other languages, it can be used in a network and that's not all features...
"
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
syn case ignore
syn keyword hamsterSpecial abs
syn keyword hamsterSpecial artaddheader
syn keyword hamsterSpecial artalloc
syn keyword hamsterSpecial artdelheader
syn keyword hamsterSpecial artfree
syn keyword hamsterSpecial artgetbody
syn keyword hamsterSpecial artgetheader
syn keyword hamsterSpecial artgetheaders
syn keyword hamsterSpecial artgettext
syn keyword hamsterSpecial artheaderexists
syn keyword hamsterSpecial artload
syn keyword hamsterSpecial artsave
syn keyword hamsterSpecial artsetbody
syn keyword hamsterSpecial artsetheader
syn keyword hamsterSpecial artsetheaders
syn keyword hamsterSpecial artsettext
syn keyword hamsterSpecial assert
syn keyword hamsterSpecial atadd
syn keyword hamsterSpecial atclear
syn keyword hamsterSpecial atcount
syn keyword hamsterSpecial ateverymins
syn keyword hamsterSpecial atexecute
syn keyword hamsterSpecial atfrom
syn keyword hamsterSpecial atondays
syn keyword hamsterSpecial atsubfunction
syn keyword hamsterSpecial atuntil
syn keyword hamsterSpecial beep
syn keyword hamsterSpecial break
syn keyword hamsterSpecial chr
syn keyword hamsterSpecial clearxcounter
syn keyword hamsterSpecial clipread
syn keyword hamsterSpecial clipwrite
syn keyword hamsterSpecial const
syn keyword hamsterSpecial constenum
syn keyword hamsterSpecial continue
syn keyword hamsterSpecial copy
syn keyword hamsterSpecial debug
syn keyword hamsterSpecial dec
syn keyword hamsterSpecial decodebase64
syn keyword hamsterSpecial decodeqp
syn keyword hamsterSpecial decodetime
syn keyword hamsterSpecial decxcounter
syn keyword hamsterSpecial delete
syn keyword hamsterSpecial deletehostsentry
syn keyword hamsterSpecial digest
syn keyword hamsterSpecial dirchange
syn keyword hamsterSpecial dircurrent
syn keyword hamsterSpecial direxists
syn keyword hamsterSpecial dirmake
syn keyword hamsterSpecial dirremove
syn keyword hamsterSpecial dirsystem
syn keyword hamsterSpecial dirwindows
syn keyword hamsterSpecial diskfreekb
syn keyword hamsterSpecial dllcall
syn keyword hamsterSpecial dllfree
syn keyword hamsterSpecial dlllasterror
syn keyword hamsterSpecial dllload
syn keyword hamsterSpecial dump
syn keyword hamsterSpecial encodetime
syn keyword hamsterSpecial entercontext
syn keyword hamsterSpecial errcatch
syn keyword hamsterSpecial errline
syn keyword hamsterSpecial errlineno
syn keyword hamsterSpecial errmodule
syn keyword hamsterSpecial errmsg
syn keyword hamsterSpecial errnum
syn keyword hamsterSpecial error
syn keyword hamsterSpecial errsender
syn keyword hamsterSpecial eval
syn keyword hamsterSpecial eventclose
syn keyword hamsterSpecial eventcreate
syn keyword hamsterSpecial eventmultiplewait
syn keyword hamsterSpecial eventpulse
syn keyword hamsterSpecial eventreset
syn keyword hamsterSpecial eventset
syn keyword hamsterSpecial eventwait
syn keyword hamsterSpecial execute
syn keyword hamsterSpecial false
syn keyword hamsterSpecial filecopy
syn keyword hamsterSpecial filedelete
syn keyword hamsterSpecial fileexists
syn keyword hamsterSpecial filemove
syn keyword hamsterSpecial filerename
syn keyword hamsterSpecial filesize
syn keyword hamsterSpecial filetime
syn keyword hamsterSpecial getenv
syn keyword hamsterSpecial getprocessidentifier
syn keyword hamsterSpecial getuptimedays
syn keyword hamsterSpecial getuptimehours
syn keyword hamsterSpecial getuptimemins
syn keyword hamsterSpecial getuptimesecs
syn keyword hamsterSpecial gosub
syn keyword hamsterSpecial goto
syn keyword hamsterSpecial hex
syn keyword hamsterSpecial icase
syn keyword hamsterSpecial iif
syn keyword hamsterSpecial inc
syn keyword hamsterSpecial incxcounter
syn keyword hamsterSpecial inidelete
syn keyword hamsterSpecial inierasesection
syn keyword hamsterSpecial iniread
syn keyword hamsterSpecial iniwrite
syn keyword hamsterSpecial inputbox
syn keyword hamsterSpecial inputpw
syn keyword hamsterSpecial int
syn keyword hamsterSpecial isint
syn keyword hamsterSpecial isstr
syn keyword hamsterSpecial leavecontext
syn keyword hamsterSpecial len
syn keyword hamsterSpecial listadd
syn keyword hamsterSpecial listalloc
syn keyword hamsterSpecial listappend
syn keyword hamsterSpecial listbox
syn keyword hamsterSpecial listclear
syn keyword hamsterSpecial listcount
syn keyword hamsterSpecial listdelete
syn keyword hamsterSpecial listdirs
syn keyword hamsterSpecial listexists
syn keyword hamsterSpecial listfiles
syn keyword hamsterSpecial listfiles
syn keyword hamsterSpecial listfree
syn keyword hamsterSpecial listget
syn keyword hamsterSpecial listgetkey
syn keyword hamsterSpecial listgettag
syn keyword hamsterSpecial listgettext
syn keyword hamsterSpecial listindexof
syn keyword hamsterSpecial listinsert
syn keyword hamsterSpecial listload
syn keyword hamsterSpecial listrasentries
syn keyword hamsterSpecial listsave
syn keyword hamsterSpecial listset
syn keyword hamsterSpecial listsetkey
syn keyword hamsterSpecial listsettag
syn keyword hamsterSpecial listsettext
syn keyword hamsterSpecial listsort
syn keyword hamsterSpecial localhostaddr
syn keyword hamsterSpecial localhostname
syn keyword hamsterSpecial lookuphostaddr
syn keyword hamsterSpecial lookuphostname
syn keyword hamsterSpecial lowercase
syn keyword hamsterSpecial memalloc
syn keyword hamsterSpecial memforget
syn keyword hamsterSpecial memfree
syn keyword hamsterSpecial memgetint
syn keyword hamsterSpecial memgetstr
syn keyword hamsterSpecial memsetint
syn keyword hamsterSpecial memsetstr
syn keyword hamsterSpecial memsize
syn keyword hamsterSpecial memvarptr
syn keyword hamsterSpecial msgbox
syn keyword hamsterSpecial ord
syn keyword hamsterSpecial paramcount
syn keyword hamsterSpecial paramstr
syn keyword hamsterSpecial popupbox
syn keyword hamsterSpecial pos
syn keyword hamsterSpecial print
syn keyword hamsterSpecial quit
syn keyword hamsterSpecial random
syn keyword hamsterSpecial randomize
syn keyword hamsterSpecial rasdial
syn keyword hamsterSpecial rasgetconnection
syn keyword hamsterSpecial rasgetip
syn keyword hamsterSpecial rashangup
syn keyword hamsterSpecial rasisconnected
syn keyword hamsterSpecial re_extract
syn keyword hamsterSpecial re_match
syn keyword hamsterSpecial re_parse
syn keyword hamsterSpecial re_split
syn keyword hamsterSpecial replace
syn keyword hamsterSpecial return
syn keyword hamsterSpecial runscript
syn keyword hamsterSpecial scriptpriority
syn keyword hamsterSpecial set
syn keyword hamsterSpecial sethostsentry_byaddr
syn keyword hamsterSpecial sethostsentry_byname
syn keyword hamsterSpecial setxcounter
syn keyword hamsterSpecial sgn
syn keyword hamsterSpecial shell
syn keyword hamsterSpecial sleep
syn keyword hamsterSpecial stopthread
syn keyword hamsterSpecial str
syn keyword hamsterSpecial syserrormessage
syn keyword hamsterSpecial testmailfilterline
syn keyword hamsterSpecial testnewsfilterline
syn keyword hamsterSpecial ticks
syn keyword hamsterSpecial time
syn keyword hamsterSpecial timegmt
syn keyword hamsterSpecial trace
syn keyword hamsterSpecial trim
syn keyword hamsterSpecial true
syn keyword hamsterSpecial uppercase
syn keyword hamsterSpecial utf7toucs16
syn keyword hamsterSpecial utf8toucs32
syn keyword hamsterSpecial var
syn keyword hamsterSpecial varset
syn keyword hamsterSpecial warning
syn keyword hamsterSpecial xcounter
" common functions
syn keyword hamsterFunction addlog
syn keyword hamsterFunction decodemimeheaderstring
syn keyword hamsterFunction decodetolocalcharset
syn keyword hamsterFunction gettasksactive
syn keyword hamsterFunction gettasksrun
syn keyword hamsterFunction gettaskswait
syn keyword hamsterFunction hamaddgroup
syn keyword hamsterFunction hamaddlog
syn keyword hamsterFunction hamaddpull
syn keyword hamsterFunction hamartcount
syn keyword hamsterFunction hamartdeletemid
syn keyword hamsterFunction hamartdeletemidingroup
syn keyword hamsterFunction hamartdeletenringroup
syn keyword hamsterFunction hamartimport
syn keyword hamsterFunction hamartlocatemid
syn keyword hamsterFunction hamartlocatemidingroup
syn keyword hamsterFunction hamartnomax
syn keyword hamsterFunction hamartnomin
syn keyword hamsterFunction hamarttext
syn keyword hamsterFunction hamarttextexport
syn keyword hamsterFunction hamchangepassword
syn keyword hamsterFunction hamcheckpurge
syn keyword hamsterFunction hamdelgroup
syn keyword hamsterFunction hamdelpull
syn keyword hamsterFunction hamdialogaddpull
syn keyword hamsterFunction hamdialogeditdirs
syn keyword hamsterFunction hamdialogmailkillfilelog
syn keyword hamsterFunction hamdialognewskillfilelog
syn keyword hamsterFunction hamdialogscripts
syn keyword hamsterFunction hamenvelopefrom
syn keyword hamsterFunction hamexepath
syn keyword hamsterFunction hamfetchmail
syn keyword hamsterFunction hamflush
syn keyword hamsterFunction hamgetstatus
syn keyword hamsterFunction hamgroupclose
syn keyword hamsterFunction hamgroupcount
syn keyword hamsterFunction hamgroupindex
syn keyword hamsterFunction hamgroupname
syn keyword hamsterFunction hamgroupnamebyhandle
syn keyword hamsterFunction hamgroupopen
syn keyword hamsterFunction hamgroupspath
syn keyword hamsterFunction hamhscpath
syn keyword hamsterFunction hamhsmpath
syn keyword hamsterFunction hamimapserver
syn keyword hamsterFunction hamisidle
syn keyword hamsterFunction hamlogspath
syn keyword hamsterFunction hammailexchange
syn keyword hamsterFunction hammailpath
syn keyword hamsterFunction hammailsoutpath
syn keyword hamsterFunction hammainfqdn
syn keyword hamsterFunction hammainwindow
syn keyword hamsterFunction hammessage
syn keyword hamsterFunction hammidfqdn
syn keyword hamsterFunction hamnewmail
syn keyword hamsterFunction hamnewserrpath
syn keyword hamsterFunction hamnewsjobsadd
syn keyword hamsterFunction hamnewsjobscheckactive
syn keyword hamsterFunction hamnewsjobsclear
syn keyword hamsterFunction hamnewsjobsdelete
syn keyword hamsterFunction hamnewsjobsfeed
syn keyword hamsterFunction hamnewsjobsgetcounter
syn keyword hamsterFunction hamnewsjobsgetparam
syn keyword hamsterFunction hamnewsjobsgetpriority
syn keyword hamsterFunction hamnewsjobsgetserver
syn keyword hamsterFunction hamnewsjobsgettype
syn keyword hamsterFunction hamnewsjobspost
syn keyword hamsterFunction hamnewsjobspostdef
syn keyword hamsterFunction hamnewsjobspull
syn keyword hamsterFunction hamnewsjobspulldef
syn keyword hamsterFunction hamnewsjobssetpriority
syn keyword hamsterFunction hamnewsjobsstart
syn keyword hamsterFunction hamnewsoutpath
syn keyword hamsterFunction hamnewspost
syn keyword hamsterFunction hamnewspull
syn keyword hamsterFunction hamnntpserver
syn keyword hamsterFunction hampassreload
syn keyword hamsterFunction hampath
syn keyword hamsterFunction hampop3server
syn keyword hamsterFunction hampostmaster
syn keyword hamsterFunction hampurge
syn keyword hamsterFunction hamrasdial
syn keyword hamsterFunction hamrashangup
syn keyword hamsterFunction hamrcpath
syn keyword hamsterFunction hamrebuildgloballists
syn keyword hamsterFunction hamrebuildhistory
syn keyword hamsterFunction hamrecoserver
syn keyword hamsterFunction hamreloadconfig
syn keyword hamsterFunction hamreloadipaccess
syn keyword hamsterFunction hamresetcounters
syn keyword hamsterFunction hamrotatelog
syn keyword hamsterFunction hamscorelist
syn keyword hamsterFunction hamscoretest
syn keyword hamsterFunction hamsendmail
syn keyword hamsterFunction hamsendmailauth
syn keyword hamsterFunction hamserverpath
syn keyword hamsterFunction hamsetlogin
syn keyword hamsterFunction hamshutdown
syn keyword hamsterFunction hamsmtpserver
syn keyword hamsterFunction hamstopalltasks
syn keyword hamsterFunction hamthreadcount
syn keyword hamsterFunction hamtrayicon
syn keyword hamsterFunction hamusenetacc
syn keyword hamsterFunction hamversion
syn keyword hamsterFunction hamwaitidle
syn keyword hamsterFunction raslasterror
syn keyword hamsterFunction rfctimezone
syn keyword hamsterFunction settasklimiter
syn keyword hamsterStatement if
syn keyword hamsterStatement else
syn keyword hamsterStatement elseif
syn keyword hamsterStatement endif
syn keyword hamsterStatement do
syn keyword hamsterStatement loop
syn keyword hamsterStatement while
syn keyword hamsterStatement endwhile
syn keyword hamsterStatement repeat
syn keyword hamsterStatement until
syn keyword hamsterStatement for
syn keyword hamsterStatement endfor
syn keyword hamsterStatement sub
syn keyword hamsterStatement endsub
syn keyword hamsterStatement label
" Strings and characters:
syn region hamsterString start=+"+ end=+"+ contains=@Spell
syn region hamsterString start=+'+ end=+'+ contains=@Spell
" Numbers:
syn match hamsterNumber "-\=\<\d*\.\=[0-9_]\>"
" Comments:
syn region hamsterHashComment start=/#/ end=/$/ contains=@Spell
syn cluster hamsterComment contains=hamsterHashComment
syn sync ccomment hamsterHashComment
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
hi def link hamsterHashComment Comment
hi def link hamsterSpecial Special
hi def link hamsterStatement Statement
hi def link hamsterString String
hi def link hamsterFunction Function
let b:current_syntax = "hamster"
" vim:sw=4
endif

180
syntax/ibasic.vim Normal file
View File

@@ -0,0 +1,180 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ibasic') == -1
" Vim syntax file
" Language: ibasic
" Maintainer: Mark Manning <markem@airmail.net>
" Originator: Allan Kelly <Allan.Kelly@ed.ac.uk>
" Created: 10/1/2006
" Updated: 10/21/2006
" Description: A vim file to handle the IBasic file format.
" Notes:
" Updated by Mark Manning <markem@airmail.net>
" Applied IBasic support to the already excellent support for standard
" basic syntax (like QB).
"
" First version based on Micro$soft QBASIC circa 1989, as documented in
" 'Learn BASIC Now' by Halvorson&Rygmyr. Microsoft Press 1989.
" This syntax file not a complete implementation yet.
" Send suggestions to the maintainer.
"
" This version is based upon the commands found in IBasic (www.pyxia.com).
" MEM 10/6/2006
"
" Quit when a (custom) syntax file was already loaded (Taken from c.vim)
"
if exists("b:current_syntax")
finish
endif
"
" Be sure to turn on the "case ignore" since current versions of basic
" support both upper as well as lowercase letters.
"
syn case ignore
"
" A bunch of useful BASIC keywords
"
syn keyword ibasicStatement beep bload bsave call absolute chain chdir circle
syn keyword ibasicStatement clear close cls color com common const data
syn keyword ibasicStatement loop draw end environ erase error exit field
syn keyword ibasicStatement files function get gosub goto
syn keyword ibasicStatement input input# ioctl key kill let line locate
syn keyword ibasicStatement lock unlock lprint using lset mkdir name
syn keyword ibasicStatement on error open option base out paint palette pcopy
syn keyword ibasicStatement pen play pmap poke preset print print# using pset
syn keyword ibasicStatement put randomize read redim reset restore resume
syn keyword ibasicStatement return rmdir rset run seek screen
syn keyword ibasicStatement shared shell sleep sound static stop strig sub
syn keyword ibasicStatement swap system timer troff tron type unlock
syn keyword ibasicStatement view wait width window write
syn keyword ibasicStatement date$ mid$ time$
"
" Do the basic variables names first. This is because it
" is the most inclusive of the tests. Later on we change
" this so the identifiers are split up into the various
" types of identifiers like functions, basic commands and
" such. MEM 9/9/2006
"
syn match ibasicIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>"
syn match ibasicGenericFunction "\<[a-zA-Z_][a-zA-Z0-9_]*\>\s*("me=e-1,he=e-1
"
" Function list
"
syn keyword ibasicBuiltInFunction abs asc atn cdbl cint clng cos csng csrlin cvd cvdmbf
syn keyword ibasicBuiltInFunction cvi cvl cvs cvsmbf eof erdev erl err exp fileattr
syn keyword ibasicBuiltInFunction fix fre freefile inp instr lbound len loc lof
syn keyword ibasicBuiltInFunction log lpos mod peek pen point pos rnd sadd screen seek
syn keyword ibasicBuiltInFunction setmem sgn sin spc sqr stick strig tab tan ubound
syn keyword ibasicBuiltInFunction val valptr valseg varptr varseg
syn keyword ibasicBuiltInFunction chr\$ command$ date$ environ$ erdev$ hex$ inkey$
syn keyword ibasicBuiltInFunction input$ ioctl$ lcases$ laft$ ltrim$ mid$ mkdmbf$ mkd$
syn keyword ibasicBuiltInFunction mki$ mkl$ mksmbf$ mks$ oct$ right$ rtrim$ space$
syn keyword ibasicBuiltInFunction str$ string$ time$ ucase$ varptr$
syn keyword ibasicTodo contained TODO
syn cluster ibasicFunctionCluster contains=ibasicBuiltInFunction,ibasicGenericFunction
syn keyword Conditional if else then elseif endif select case endselect
syn keyword Repeat for do while next enddo endwhile wend
syn keyword ibasicTypeSpecifier single double defdbl defsng
syn keyword ibasicTypeSpecifier int integer uint uinteger int64 uint64 defint deflng
syn keyword ibasicTypeSpecifier byte char string istring defstr
syn keyword ibasicDefine dim def declare
"
"catch errors caused by wrong parenthesis
"
syn cluster ibasicParenGroup contains=ibasicParenError,ibasicIncluded,ibasicSpecial,ibasicTodo,ibasicUserCont,ibasicUserLabel,ibasicBitField
syn region ibasicParen transparent start='(' end=')' contains=ALLBUT,@bParenGroup
syn match ibasicParenError ")"
syn match ibasicInParen contained "[{}]"
"
"integer number, or floating point number without a dot and with "f".
"
syn region ibasicHex start="&h" end="\W"
syn region ibasicHexError start="&h\x*[g-zG-Z]" end="\W"
syn match ibasicInteger "\<\d\+\(u\=l\=\|lu\|f\)\>"
"
"floating point number, with dot, optional exponent
"
syn match ibasicFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
"
"floating point number, starting with a dot, optional exponent
"
syn match ibasicFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
"
"floating point number, without dot, with exponent
"
syn match ibasicFloat "\<\d\+e[-+]\=\d\+[fl]\=\>"
"
"hex number
"
syn match ibasicIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>"
syn match ibasicFunction "\<[a-zA-Z_][a-zA-Z0-9_]*\>\s*("me=e-1,he=e-1
syn case match
syn match ibasicOctalError "\<0\o*[89]"
"
" String and Character contstants
"
syn region ibasicString start='"' end='"' contains=ibasicSpecial,ibasicTodo
syn region ibasicString start="'" end="'" contains=ibasicSpecial,ibasicTodo
"
" Comments
"
syn match ibasicSpecial contained "\\."
syn region ibasicComment start="^rem" end="$" contains=ibasicSpecial,ibasicTodo
syn region ibasicComment start=":\s*rem" end="$" contains=ibasicSpecial,ibasicTodo
syn region ibasicComment start="\s*'" end="$" contains=ibasicSpecial,ibasicTodo
syn region ibasicComment start="^'" end="$" contains=ibasicSpecial,ibasicTodo
"
" Now do the comments and labels
"
syn match ibasicLabel "^\d"
syn region ibasicLineNumber start="^\d" end="\s"
"
" Pre-compiler options : FreeBasic
"
syn region ibasicPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=ibasicString,ibasicCharacter,ibasicNumber,ibasicCommentError,ibasicSpaceError
syn match ibasicInclude "^\s*#\s*include\s*"
"
" Create the clusters
"
syn cluster ibasicNumber contains=ibasicHex,ibasicInteger,ibasicFloat
syn cluster ibasicError contains=ibasicHexError
"
" Used with OPEN statement
"
syn match ibasicFilenumber "#\d\+"
"
"syn sync ccomment ibasicComment
"
syn match ibasicMathOperator "[\+\-\=\|\*\/\>\<\%\()[\]]" contains=ibasicParen
"
" The default methods for highlighting. Can be overridden later
"
hi def link ibasicLabel Label
hi def link ibasicConditional Conditional
hi def link ibasicRepeat Repeat
hi def link ibasicHex Number
hi def link ibasicInteger Number
hi def link ibasicFloat Number
hi def link ibasicError Error
hi def link ibasicHexError Error
hi def link ibasicStatement Statement
hi def link ibasicString String
hi def link ibasicComment Comment
hi def link ibasicLineNumber Comment
hi def link ibasicSpecial Special
hi def link ibasicTodo Todo
hi def link ibasicGenericFunction Function
hi def link ibasicBuiltInFunction Function
hi def link ibasicTypeSpecifier Type
hi def link ibasicDefine Type
hi def link ibasicInclude Include
hi def link ibasicIdentifier Identifier
hi def link ibasicFilenumber ibasicTypeSpecifier
hi def link ibasicMathOperator Operator
let b:current_syntax = "ibasic"
" vim: ts=8
endif

View File

@@ -239,3 +239,7 @@ call TestFiletype('prolog')
call TestFiletype('tads') call TestFiletype('tads')
call TestFiletype('gitignore') call TestFiletype('gitignore')
call TestFiletype('sql') call TestFiletype('sql')
call TestFiletype('b')
call TestFiletype('ibasic')
call TestFiletype('freebasic')
call TestFiletype('hamster')