Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: Screen Virtual Terminal Emulator/Manager Configuration File |
| 3 | " Maintainer: Nikolai Weibull <source@pcppopper.org> |
| 4 | " URL: http://www.pcppopper.org/vim/syntax/pcp/screen/ |
| 5 | " Latest Revision: 2004-05-22 |
| 6 | " arch-tag: 6a97fb8f-fc88-497f-9c55-e946734ba034 |
| 7 | |
| 8 | if version < 600 |
| 9 | syntax clear |
| 10 | elseif exists("b:current_syntax") |
| 11 | finish |
| 12 | endif |
| 13 | |
| 14 | " comments |
| 15 | syn region screenComment matchgroup=screenComment start="#" end="$" contains=screenTodo |
| 16 | |
| 17 | " todo |
| 18 | syn keyword screenTodo contained TODO FIXME XXX NOTE |
| 19 | |
| 20 | " string (can contain variables) |
| 21 | syn region screenString matchgroup=screenString start='"' skip='\\"' end='"\|$' contains=screenVariable,screenSpecial |
| 22 | |
| 23 | " literal string |
| 24 | syn region screenLiteral matchgroup=screenLiteral start="'" skip="\\'" end="'\|$" |
| 25 | |
| 26 | " environment variables |
| 27 | syn match screenVariable contained "$\(\h\w*\|{\h\w*}\)" |
| 28 | |
| 29 | " booleans |
| 30 | syn keyword screenBoolean on off |
| 31 | |
| 32 | " numbers |
| 33 | syn match screenNumbers "\<\d\+\>" |
| 34 | |
| 35 | " specials |
| 36 | syn match screenSpecials contained "%\([%aAdDhlmMstuwWyY?:{]\|[0-9]*n\|0?cC\)" |
| 37 | |
| 38 | " commands |
| 39 | syn keyword screenCommands acladd aclchg acldel aclgrp aclumask activity addacl allpartial at attrcolor |
| 40 | syn keyword screenCommands autodetach bell_msg bind bindkey bufferfile caption chacl chdir clear colon |
| 41 | syn keyword screenCommands command compacthist console copy copy_regcrlf debug detach digraph dinfo crlf |
| 42 | syn keyword screenCommands displays dumptermcap echo exec fit focus height help history |
| 43 | syn keyword screenCommands info kill lastmsg license lockscreen markkeys meta msgminwait msgwait |
| 44 | syn keyword screenCommands multiuser nethack next nonblock number only other partial_state |
| 45 | syn keyword screenCommands password paste pastefont pow_break pow_detach_msg prev printcmd process |
| 46 | syn keyword screenCommands quit readbuf readreg redisplay register remove removebuf reset resize screen |
| 47 | syn keyword screenCommands select sessionname setenv shelltitle silencewait verbose |
| 48 | syn keyword screenCommands sleep sorendition split startup_message stuff su suspend time |
| 49 | syn keyword screenCommands title umask version wall width writebuf xoff xon defmode hardstatus |
| 50 | syn keyword screenCommands altscreen break breaktype copy_reg defbreaktype defencoding deflog encoding |
| 51 | syn keyword screenCommands eval ignorecase ins_reg maxwin partial pow_detach setsid source unsetenv |
| 52 | syn keyword screenCommands windowlist windows |
| 53 | syn match screenCommands "\<\(def\)\=\(autonuke\|bce\|c1\|charset\|escape\|flow\|kanji\|login\|monitor\|hstatus\|obuflimit\)\>" |
| 54 | syn match screenCommands "\<\(def\)\=\(scrollback\|shell\|silence\|slowpaste\|utf8\|wrap\|writelock\|zombie\|gr\)\>" |
| 55 | syn match screenCommands "\<hard\(copy\(_append\|dir\)\=\|status\)\>" |
| 56 | syn match screenCommands "\<log\(file\|in\|tstamp\)\=\>" |
| 57 | syn match screenCommands "\<map\(default\|notnext\|timeout\)\>" |
| 58 | syn match screenCommands "\<term\(cap\|info\|capinfo\)\=\>" |
| 59 | syn match screenCommands "\<vbell\(_msg\|wait\)\=\>" |
| 60 | |
| 61 | if exists("screen_minlines") |
| 62 | let b:screen_minlines = screen_minlines |
| 63 | else |
| 64 | let b:screen_minlines = 10 |
| 65 | endif |
| 66 | exec "syn sync minlines=" . b:screen_minlines |
| 67 | |
| 68 | " Define the default highlighting. |
| 69 | " For version 5.7 and earlier: only when not done already |
| 70 | " For version 5.8 and later: only when an item doesn't have highlighting yet |
| 71 | if version >= 508 || !exists("did_screen_syn_inits") |
| 72 | if version < 508 |
| 73 | let did_screen_syn_inits = 1 |
| 74 | command -nargs=+ HiLink hi link <args> |
| 75 | else |
| 76 | command -nargs=+ HiLink hi def link <args> |
| 77 | endif |
| 78 | |
| 79 | HiLink screenComment Comment |
| 80 | HiLink screenTodo Todo |
| 81 | HiLink screenString String |
| 82 | HiLink screenLiteral String |
| 83 | HiLink screenVariable Identifier |
| 84 | HiLink screenBoolean Boolean |
| 85 | HiLink screenNumbers Number |
| 86 | HiLink screenSpecials Special |
| 87 | HiLink screenCommands Keyword |
| 88 | delcommand HiLink |
| 89 | endif |
| 90 | |
| 91 | let b:current_syntax = "screen" |
| 92 | |
| 93 | " vim: set sts=2 sw=2: |