Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: pinfo(1) configuration file |
| 3 | " Maintainer: Nikolai Weibull <source@pcppopper.org> |
| 4 | " URL: http://www.pcppopper.org/ |
| 5 | " Latest Revision: 2004-05-22 |
| 6 | " arch-tag: da2cfa1c-0350-45dc-b2d2-2bf3915bd0a2 |
| 7 | |
| 8 | if version < 600 |
| 9 | syntax clear |
| 10 | elseif exists("b:current_syntax") |
| 11 | finish |
| 12 | endif |
| 13 | |
| 14 | " Set iskeyword since we need `-' (and potentially others) in keywords. |
| 15 | " For version 5.x: Set it globally |
| 16 | " For version 6.x: Set it locally |
| 17 | if version >= 600 |
| 18 | command -nargs=1 SetIsk setlocal iskeyword=<args> |
| 19 | else |
| 20 | command -nargs=1 SetIsk set iskeyword=<args> |
| 21 | endif |
| 22 | SetIsk @,48-57,_,- |
| 23 | delcommand SetIsk |
| 24 | |
| 25 | " Ignore Case |
| 26 | syn case ignore |
| 27 | |
| 28 | " Todo |
| 29 | syn keyword pinfoTodo contained FIXME TODO XXX NOTE |
| 30 | |
| 31 | " Comments |
| 32 | syn region pinfoComment start='^#' end='$' contains=pinfoTodo |
| 33 | |
| 34 | " Keywords |
| 35 | syn keyword pinfoOptions MANUAL CUT-MAN-HEADERS CUT-EMPTY-MAN-LINES |
| 36 | syn keyword pinfoOptions RAW-FILENAME APROPOS DONT-HANDLE-WITHOUT-TAG-TABLE |
| 37 | syn keyword pinfoOptions HTTPVIEWER FTPVIEWER MAILEDITOR PRINTUTILITY |
| 38 | syn keyword pinfoOptions MANLINKS INFOPATH MAN-OPTIONS STDERR-REDIRECTION |
| 39 | syn keyword pinfoOptions LONG-MANUAL-LINKS FILTER-0xB7 QUIT-CONFIRMATION |
| 40 | syn keyword pinfoOptions QUIT-CONFIRM-DEFAULT CLEAR-SCREEN-AT-EXIT |
| 41 | syn keyword pinfoOptions CALL-READLINE-HISTORY HIGHLIGHTREGEXP SAFE-USER |
| 42 | syn keyword pinfoOptions SAFE-GROUP |
| 43 | |
| 44 | " Colors |
| 45 | syn keyword pinfoColors COL_NORMAL COL_TOPLINE COL_BOTTOMLINE COL_MENU |
| 46 | syn keyword pinfoColors COL_MENUSELECTED COL_NOTE COL_NOTESELECTED COL_URL |
| 47 | syn keyword pinfoColors COL_URLSELECTED COL_INFOHIGHLIGHT COL_MANUALBOLD |
| 48 | syn keyword pinfoColors COL_MANUALITALIC |
| 49 | syn keyword pinfoColorDefault COLOR_DEFAULT |
| 50 | syn keyword pinfoColorBold BOLD |
| 51 | syn keyword pinfoColorNoBold NO_BOLD |
| 52 | syn keyword pinfoColorBlink BLINK |
| 53 | syn keyword pinfoColorNoBlink NO_BLINK |
| 54 | syn keyword pinfoColorBlack COLOR_BLACK |
| 55 | syn keyword pinfoColorRed COLOR_RED |
| 56 | syn keyword pinfoColorGreen COLOR_GREEN |
| 57 | syn keyword pinfoColorYellow COLOR_YELLOW |
| 58 | syn keyword pinfoColorBlue COLOR_BLUE |
| 59 | syn keyword pinfoColorMagenta COLOR_MAGENTA |
| 60 | syn keyword pinfoColorCyan COLOR_CYAN |
| 61 | syn keyword pinfoColorWhite COLOR_WHITE |
| 62 | |
| 63 | " Keybindings |
| 64 | syn keyword pinfoKeys KEY_TOTALSEARCH_1 KEY_TOTALSEARCH_2 KEY_SEARCH_1 |
| 65 | syn keyword pinfoKeys KEY_SEARCH_2 KEY_SEARCH_AGAIN_1 KEY_SEARCH_AGAIN_2 |
| 66 | syn keyword pinfoKeys KEY_GOTO_1 KEY_GOTO_2 KEY_PREVNODE_1 KEY_PREVNODE_2 |
| 67 | syn keyword pinfoKeys KEY_NEXTNODE_1 KEY_NEXTNODE_2 KEY_UP_1 KEY_UP_2 |
| 68 | syn keyword pinfoKeys KEY_END_1 KEY_END_2 KEY_PGDN_1 KEY_PGDN_2 |
| 69 | syn keyword pinfoKeys KEY_PGDN_AUTO_1 KEY_PGDN_AUTO_2 KEY_HOME_1 KEY_HOME_2 |
| 70 | syn keyword pinfoKeys KEY_PGUP_1 KEY_PGUP_2 KEY_PGUP_AUTO_1 KEY_PGUP_AUTO_2 |
| 71 | syn keyword pinfoKeys KEY_DOWN_1 KEY_DOWN_2 KEY_TOP_1 KEY_TOP_2 KEY_BACK_1 |
| 72 | syn keyword pinfoKeys KEY_BACK_2 KEY_FOLLOWLINK_1 KEY_FOLLOWLINK_2 |
| 73 | syn keyword pinfoKeys KEY_REFRESH_1 KEY_REFRESH_2 KEY_SHELLFEED_1 |
| 74 | syn keyword pinfoKeys KEY_SHELLFEED_2 KEY_QUIT_1 KEY_QUIT_2 KEY_GOLINE_1 |
| 75 | syn keyword pinfoKeys KEY_GOLINE_2 KEY_PRINT_1 KEY_PRINT_2 |
| 76 | syn keyword pinfoKeys KEY_DIRPAGE_1 KEY_DIRPAGE_2 |
| 77 | |
| 78 | " Special Keys |
| 79 | syn keyword pinfoSpecialKeys KEY_BREAK KEY_DOWN KEY_UP KEY_LEFT KEY_RIGHT |
| 80 | syn keyword pinfoSpecialKeys KEY_DOWN KEY_HOME KEY_BACKSPACE KEY_NPAGE |
| 81 | syn keyword pinfoSpecialKeys KEY_PPAGE KEY_END KEY_IC KEY_DC |
| 82 | syn region pinfoSpecialKeys matchgroup=pinfoSpecialKeys transparent start=+KEY_\%(F\|CTRL\|ALT\)(+ end=+)+ |
| 83 | syn region pinfoSimpleKey matchgroup=pinfoSimpleKey start=+'+ skip=+\\'+ end=+'+ contains=pinfoSimpleKeyEscape |
| 84 | syn match pinfoSimpleKeyEscape +\\[\\nt']+ |
| 85 | syn match pinfoKeycode '\<\d\+\>' |
| 86 | |
| 87 | " Constants |
| 88 | syn keyword pinfoConstants TRUE FALSE YES NO |
| 89 | |
| 90 | " Define the default highlighting. |
| 91 | " For version 5.7 and earlier: only when not done already |
| 92 | " For version 5.8 and later: only when an item doesn't have highlighting yet |
| 93 | if version >= 508 || !exists("did_pinfo_syn_inits") |
| 94 | if version < 508 |
| 95 | let did_pinfo_syn_inits = 1 |
| 96 | command -nargs=+ HiLink hi link <args> |
| 97 | command -nargs=+ HiDef hi <args> |
| 98 | else |
| 99 | command -nargs=+ HiLink hi def link <args> |
| 100 | command -nargs=+ HiDef hi def <args> |
| 101 | endif |
| 102 | |
| 103 | HiLink pinfoTodo Todo |
| 104 | HiLink pinfoComment Comment |
| 105 | HiLink pinfoOptions Keyword |
| 106 | HiLink pinfoColors Keyword |
| 107 | HiLink pinfoColorDefault Normal |
| 108 | HiDef pinfoColorBold cterm=bold |
| 109 | HiDef pinfoColorNoBold cterm=none |
| 110 | " we can't access the blink attribute from Vim atm |
| 111 | HiDef pinfoColorBlink cterm=inverse |
| 112 | HiDef pinfoColorNoBlink cterm=none |
| 113 | HiDef pinfoColorBlack ctermfg=Black guifg=Black |
| 114 | HiDef pinfoColorRed ctermfg=DarkRed guifg=DarkRed |
| 115 | HiDef pinfoColorGreen ctermfg=DarkGreen guifg=DarkGreen |
| 116 | HiDef pinfoColorYellow ctermfg=DarkYellow guifg=DarkYellow |
| 117 | HiDef pinfoColorBlue ctermfg=DarkBlue guifg=DarkBlue |
| 118 | HiDef pinfoColorMagenta ctermfg=DarkMagenta guifg=DarkMagenta |
| 119 | HiDef pinfoColorCyan ctermfg=DarkCyan guifg=DarkCyan |
| 120 | HiDef pinfoColorWhite ctermfg=LightGray guifg=LightGray |
| 121 | HiLink pinfoKeys Keyword |
| 122 | HiLink pinfoSpecialKeys SpecialChar |
| 123 | HiLink pinfoSimpleKey String |
| 124 | HiLink pinfoSimpleKeyEscape SpecialChar |
| 125 | HiLink pinfoKeycode Number |
| 126 | HiLink pinfoConstants Constant |
| 127 | |
| 128 | delcommand HiLink |
| 129 | delcommand HiDef |
| 130 | endif |
| 131 | |
| 132 | let b:current_syntax = "pinfo" |
| 133 | |
| 134 | " vim: set sts=2 sw=2: |