diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-05-10 17:18:44 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-05-10 17:18:44 +0200 |
commit | 446beb48d9795843c94860d7f62bdc7374aae1dd (patch) | |
tree | 20e64deaab382991a99d6d963e3ae22f13dba2d9 /runtime/syntax | |
parent | 1c2b2c12bb6883c2fbae239b99c8113ec546a855 (diff) | |
download | vim-446beb48d9795843c94860d7f62bdc7374aae1dd.zip |
Updated runtime files.
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/hostsaccess.vim | 27 | ||||
-rw-r--r-- | runtime/syntax/php.vim | 23 | ||||
-rw-r--r-- | runtime/syntax/readline.vim | 503 | ||||
-rw-r--r-- | runtime/syntax/sysctl.vim | 4 |
4 files changed, 403 insertions, 154 deletions
diff --git a/runtime/syntax/hostsaccess.vim b/runtime/syntax/hostsaccess.vim new file mode 100644 index 000000000..8a9f02eff --- /dev/null +++ b/runtime/syntax/hostsaccess.vim @@ -0,0 +1,27 @@ +" Vim syntax file +" Language: hosts.deny, hosts.allow configuration files +" Maintainer: Thilo Six <T.Six@gmx.de> +" Last Change: 2011 May 01 +" Derived From: conf.vim +" Credits: Bram Moolenaar +" +" This file is there to get at least a minimal highlighting. +" A later version may be improved. + + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" For a starter we just use conf.vim for highlighting +if version < 600 + so <sfile>:p:h/conf.vim +else + runtime! syntax/conf.vim + unlet b:current_syntax +endif + + +let b:current_syntax = "hostsaccess" +" vim: ts=8 sw=2 diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim index 4e6b95ca9..f9104ad7b 100644 --- a/runtime/syntax/php.vim +++ b/runtime/syntax/php.vim @@ -1,11 +1,10 @@ " Vim syntax file " Language: php PHP 3/4/5 -" Maintainer: Peter Hodge <toomuchphp-vim@yahoo.com> -" Last Change: June 9, 2006 -" URL: http://www.vim.org/scripts/script.php?script_id=1571 -" -" Former Maintainer: Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> -" Former URL: http://svn.debian.org/wsvn/pkg-vim/trunk/runtime/syntax/php.vim?op=file&rev=0&sc=0 +" Maintainer: Jason Woofenden <jason@jasonwoof.com> +" Last Change: April 28, 2011 +" URL: https://gitorious.org/jasonwoof/vim-syntax/blobs/master/php.vim +" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com> +" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " " Note: If you are using a colour terminal with dark background, you will probably find " the 'elflord' colorscheme is much better for PHP's syntax than the default @@ -327,6 +326,8 @@ syn match phpFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained display syn match phpSpecialChar "\\[abcfnrtyv\\]" contained display syn match phpSpecialChar "\\\d\{3}" contained contains=phpOctalError display syn match phpSpecialChar "\\x\x\{2}" contained display +syn match phpDoubleSpecialChar "\\\"" contained display +syn match phpSingleSpecialChar "\\[\\']" contained display " Error syn match phpOctalError "[89]" contained display @@ -355,13 +356,13 @@ endif " String if exists("php_parent_error_open") - syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex,phpDoubleSpecialChar contained keepend syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend - syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpSingleSpecialChar contained keepend else - syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex,phpDoubleSpecialChar contained extend keepend syn region phpBacktick matchgroup=None start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend - syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend extend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpSingleSpecialChar contained keepend extend endif " HereDoc @@ -613,6 +614,8 @@ if version >= 508 || !exists("did_php_syn_inits") HiLink phpInclude Include HiLink phpDefine Define HiLink phpSpecialChar SpecialChar + HiLink phpDoubleSpecialChar SpecialChar + HiLink phpSingleSpecialChar SpecialChar HiLink phpParent Delimiter HiLink phpIdentifierConst Delimiter HiLink phpParentError Error diff --git a/runtime/syntax/readline.vim b/runtime/syntax/readline.vim index 91094c797..06306d513 100644 --- a/runtime/syntax/readline.vim +++ b/runtime/syntax/readline.vim @@ -1,11 +1,11 @@ " Vim syntax file " Language: readline(3) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2009-05-25 +" Latest Revision: 2011-05-02 " readline_has_bash - if defined add support for bash specific " settings/functions -if exists("b:current_syntax") +if exists('b:current_syntax') finish endif @@ -14,163 +14,382 @@ set cpo&vim setlocal iskeyword+=- -syn keyword readlineTodo contained TODO FIXME XXX NOTE +syn match readlineKey contained + \ '\S' + \ nextgroup=readlineKeyTerminator -syn region readlineComment display oneline start='^\s*#' end='$' - \ contains=readlineTodo,@Spell +syn match readlineBegin display '^' + \ nextgroup=readlineComment, + \ readlineConditional, + \ readlineInclude, + \ readlineKeyName, + \ readlineKey, + \ readlineKeySeq, + \ readlineKeyword + \ skipwhite -syn match readlineString '^\s*[A-Za-z-]\+:'me=e-1 contains=readlineKeys -syn region readlineString display oneline start=+"+ skip=+\\\\\|\\"+ - \ end=+"+ contains=readlineKeysTwo +syn region readlineComment contained display oneline + \ start='#' + \ end='$' + \ contains=readlineTodo, + \ @Spell + +syn keyword readlineTodo contained + \ TODO + \ FIXME + \ XXX + \ NOTE + +syn match readlineConditional contained + \ '$if\>' + \ nextgroup=readlineTest, + \ readlineTestApp + \ skipwhite + +syn keyword readlineTest contained + \ mode + \ nextgroup=readlineTestModeEq + +syn match readlineTestModeEq contained + \ '=' + \ nextgroup=readlineEditingMode + +syn keyword readlineTest contained + \ term + \ nextgroup=readlineTestTermEq + +syn match readlineTestTermEq contained + \ '=' + \ nextgroup=readlineTestTerm + +syn match readlineTestTerm contained + \ '\S\+' + +syn match readlineTestApp contained + \ '\S\+' + +syn match readlineConditional contained display + \ '$\%(else\|endif\)\>' + +syn match readlineInclude contained display + \ '$include\>' + \ nextgroup=readlinePath + +syn match readlinePath contained display + \ '.\+' syn case ignore -syn keyword readlineKeys contained Control Meta Del Esc Escape LFD - \ Newline Ret Return Rubout Space Spc Tab +syn match readlineKeyName contained display + \ nextgroup=readlineKeySeparator, + \ readlineKeyTerminator + \ '\%(Control\|Del\|Esc\|Escape\|LFD\|Meta\|Newline\|Ret\|Return\|Rubout\|Space\|Spc\|Tab\)' syn case match -syn match readlineKeysTwo contained display - \ +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{3}\)+ +syn match readlineKeySeparator contained + \ '-' + \ nextgroup=readlineKeyName, + \ readlineKey + +syn match readlineKeyTerminator contained + \ ':' + \ nextgroup=readlineFunction + \ skipwhite -syn match readlineKeymaps contained display - \ 'emacs\(-standard\|-meta\|-ctlx\)\=' -syn match readlineKeymaps contained display - \ 'vi\(-move\|-command\|-insert\)\=' +syn region readlineKeySeq contained display oneline + \ start=+"+ + \ skip=+\\\\\|\\"+ + \ end=+"+ + \ contains=readlineKeyEscape + \ nextgroup=readlineKeyTerminator -syn keyword readlineBellStyles contained audible visible none +syn match readlineKeyEscape contained display + \ +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{2}\)+ -syn match readlineNumber contained display '\<\d\+\>' +syn keyword readlineKeyword contained + \ set + \ nextgroup=readlineVariable + \ skipwhite + +syn keyword readlineVariable contained + \ nextgroup=readlineBellStyle + \ skipwhite + \ bell-style + +syn keyword readlineVariable contained + \ nextgroup=readlineBoolean + \ skipwhite + \ bind-tty-special-chars + \ completion-ignore-case + \ completion-map-case + \ convert-meta + \ disable-completion + \ echo-control-characters + \ enable-keypad + \ enable-meta-key + \ expand-tilde + \ history-preserve-point + \ horizontal-scroll-mode + \ input-meta + \ meta-flag + \ mark-directories + \ mark-modified-lines + \ mark-symlinked-directories + \ match-hidden-files + \ menu-complete-display-prefix + \ output-meta + \ page-completions + \ print-completions-horizontally + \ revert-all-at-newline + \ show-all-if-ambiguous + \ show-all-if-unmodified + \ skip-completed-text + \ visible-stats + +syn keyword readlineVariable contained + \ nextgroup=readlineString + \ skipwhite + \ comment-begin + \ isearch-terminators + +syn keyword readlineVariable contained + \ nextgroup=readlineNumber + \ skipwhite + \ completion-display-width + \ completion-prefix-display-length + \ completion-query-items + \ history-size + +syn keyword readlineVariable contained + \ nextgroup=readlineEditingMode + \ skipwhite + \ editing-mode + +syn keyword readlineVariable contained + \ nextgroup=readlineKeymap + \ skipwhite + \ keymap + +syn keyword readlineBellStyle contained + \ audible + \ visible + \ none syn case ignore -syn keyword readlineBoolean contained on off +syn keyword readlineBoolean contained + \ on + \ off syn case match -syn keyword readlineIfOps contained mode term - -syn region readlineConditional display oneline transparent - \ matchgroup=readlineConditional - \ start='^\s*$if' end="$" - \ contains=readlineIfOps,readlineKeymaps -syn match readlineConditional display '^\s*$\(else\|endif\)\>' - -syn match readlineInclude display '^\s*$include\>' - -syn region readlineSet display oneline transparent - \ matchgroup=readlineKeyword start='^\s*set\>' - \ end="$"me=e-1 contains=readlineNumber, - \ readlineBoolean,readlineKeymaps, - \ readlineBellStyles,readlineSettings - -syn keyword readlineSettings contained bell-style comment-begin - \ completion-ignore-case completion-query-items - \ convert-meta disable-completion editing-mode - \ enable-keypad expand-tilde - \ horizontal-scroll-mode mark-directories - \ keymap mark-modified-lines meta-flag - \ input-meta output-meta - \ print-completions-horizontally - \ show-all-if-ambiguous visible-stats - \ prefer-visible-bell blink-matching-paren - \ match-hidden-files history-preserve-point - \ isearch-terminators - -syn region readlineBinding display oneline transparent - \ matchgroup=readlineKeyword start=':' end='$' - \ contains=readlineKeys,readlineFunctions - -syn keyword readlineFunctions contained display - \ beginning-of-line end-of-line forward-char - \ backward-char forward-word backward-word - \ clear-screen redraw-current-line - \ accept-line previous-history - \ next-history beginning-of-history - \ end-of-history reverse-search-history - \ forward-search-history - \ non-incremental-reverse-search-history - \ non-incremental-forward-search-history - \ history-search-forward - \ history-search-backward - \ yank-nth-arg yank-last-arg - \ delete-char backward-delete-char - \ forward-backward-delete-char quoted-insert - \ tab-insert self-insert transpose-chars - \ transpose-words upcase-word downcase-word - \ capitalize-word overwrite-mode kill-line - \ backward-kill-line unix-line-discard - \ kill-whole-line kill-word backward-kill-word - \ unix-word-rubout unix-filename-rubout - \ delete-horizontal-space kill-region - \ copy-region-as-kill copy-backward-word - \ copy-forward-word yank yank-pop - \ digit-argument universal-argument complete - \ possible-completions insert-completions - \ menu-complete delete-char-or-list - \ start-kbd-macro end-kbd-macro - \ call-last-kbd-macro re-read-init-file - \ abort do-uppercase-version prefix-meta - \ undo revert-line tilde-expand set-mark - \ exchange-point-and-mark character-search - \ character-search-backward insert-comment - \ dump-functions dump-variables dump-macros - \ emacs-editing-mode vi-editing-mode - \ vi-complete vi-char-search vi-redo - \ vi-search vi-arg-digit vi-append-eol - \ vi-prev-word vi-change-to vi-delete-to - \ vi-end-word vi-fetch-history vi-insert-beg - \ vi-search-again vi-put vi-replace - \ vi-subst vi-yank-to vi-first-print - \ vi-yank-arg vi-goto-mark vi-append-mode - \ vi-insertion-mode prev-history vi-set-mark - \ vi-search-again vi-put vi-change-char - \ vi-subst vi-delete vi-yank-to - \ vi-column vi-change-case vi-overstrike - \ vi-overstrike-delete do-lowercase-version - \ delete-char-or-list tty-status - \ arrow-key-prefix vi-back-to-indent vi-bword - \ vi-bWord vi-eword vi-eWord vi-fword vi-fWord - \ vi-next-word - \ vi-movement-mode +syn region readlineString contained display oneline + \ matchgroup=readlineStringDelimiter + \ start=+"+ + \ skip=+\\\\\|\\"+ + \ end=+"+ + +syn match readlineNumber contained display + \ '[+-]\d\+\>' + +syn keyword readlineEditingMode contained + \ emacs + \ vi + +syn match readlineKeymap contained display + \ 'emacs\%(-\%(standard\|meta\|ctlx\)\)\=\|vi\%(-\%(move\|command\|insert\)\)\=' + +syn keyword readlineFunction contained + \ beginning-of-line + \ end-of-line + \ forward-char + \ backward-char + \ forward-word + \ backward-word + \ clear-screen + \ redraw-current-line + \ + \ accept-line + \ previous-history + \ next-history + \ beginning-of-history + \ end-of-history + \ reverse-search-history + \ forward-search-history + \ non-incremental-reverse-search-history + \ non-incremental-forward-search-history + \ history-search-forward + \ history-search-backward + \ yank-nth-arg + \ yank-last-arg + \ + \ delete-char + \ backward-delete-char + \ forward-backward-delete-char + \ quoted-insert + \ tab-insert + \ self-insert + \ transpose-chars + \ transpose-words + \ upcase-word + \ downcase-word + \ capitalize-word + \ overwrite-mode + \ + \ kill-line + \ backward-kill-line + \ unix-line-discard + \ kill-whole-line + \ kill-word + \ backward-kill-word + \ unix-word-rubout + \ unix-filename-rubout + \ delete-horizontal-space + \ kill-region + \ copy-region-as-kill + \ copy-backward-word + \ copy-forward-word + \ yank + \ yank-pop + \ + \ digit-argument + \ universal-argument + \ + \ complete + \ possible-completions + \ insert-completions + \ menu-complete + \ menu-complete-or-backward + \ delete-char-or-list + \ + \ start-kbd-macro + \ end-kbd-macro + \ call-last-kbd-macro + \ + \ re-read-init-file + \ abort + \ do-uppercase-version + \ prefix-meta + \ undo + \ revert-line + \ tilde-expand + \ set-mark + \ exchange-point-and-mark + \ character-search + \ character-search-backward + \ skip-csi-sequence + \ insert-comment + \ dump-functions + \ dump-variables + \ dump-macros + \ emacs-editing-mode + \ vi-editing-mode + \ + \ vi-eof-maybe + \ vi-movement-mode + \ vi-undo + \ vi-match + \ vi-tilde-expand + \ vi-complete + \ vi-char-search + \ vi-redo + \ vi-search + \ vi-arg-digit + \ vi-append-eol + \ vi-prev-word + \ vi-change-to + \ vi-delete-to + \ vi-end-word + \ vi-char-search + \ vi-fetch-history + \ vi-insert-beg + \ vi-search-again + \ vi-put + \ vi-replace + \ vi-subst + \ vi-char-search + \ vi-next-word + \ vi-yank-to + \ vi-first-print + \ vi-yank-arg + \ vi-goto-mark + \ vi-append-mode + \ vi-prev-word + \ vi-change-to + \ vi-delete-to + \ vi-end-word + \ vi-char-search + \ vi-insert-mode + \ vi-set-mark + \ vi-search-again + \ vi-put + \ vi-change-char + \ vi-subst + \ vi-char-search + \ vi-undo + \ vi-next-word + \ vi-delete + \ vi-yank-to + \ vi-column + \ vi-change-case if exists("readline_has_bash") - syn keyword readlineFunctions contained - \ shell-expand-line history-expand-line - \ magic-space alias-expand-line - \ history-and-alias-expand-line - \ insert-last-argument operate-and-get-next - \ forward-backward-delete-char - \ delete-char-or-list complete-filename - \ possible-filename-completions - \ complete-username - \ possible-username-completions - \ complete-variable - \ possible-variable-completions - \ complete-hostname - \ possible-hostname-completions - \ complete-command - \ possible-command-completions - \ dynamic-complete-history - \ complete-into-braces - \ glob-expand-word glob-list-expansions - \ display-shell-version glob-complete-word - \ edit-and-execute-command + syn keyword readlineFunction contained + \ shell-expand-line + \ history-expand-line + \ magic-space + \ alias-expand-line + \ history-and-alias-expand-line + \ insert-last-argument + \ operate-and-get-next + \ forward-backward-delete-char + \ delete-char-or-list + \ complete-filename + \ possible-filename-completions + \ complete-username + \ possible-username-completions + \ complete-variable + \ possible-variable-completions + \ complete-hostname + \ possible-hostname-completions + \ complete-command + \ possible-command-completions + \ dynamic-complete-history + \ complete-into-braces + \ glob-expand-word + \ glob-list-expansions + \ display-shell-version + \ glob-complete-word + \ edit-and-execute-command endif -hi def link readlineComment Comment -hi def link readlineTodo Todo -hi def link readlineString String -hi def link readlineKeys SpecialChar -hi def link readlineKeysTwo SpecialChar -hi def link readlineKeymaps Constant -hi def link readlineBellStyles Constant -hi def link readlineNumber Number -hi def link readlineBoolean Boolean -hi def link readlineIfOps Type -hi def link readlineConditional Conditional -hi def link readlineInclude Include -hi def link readlineKeyword Keyword -hi def link readlineSettings Type -hi def link readlineFunctions Type - -let b:current_syntax = "readline" +hi def link readlineKey readlineKeySeq +hi def link readlineComment Comment +hi def link readlineTodo Todo +hi def link readlineConditional Conditional +hi def link readlineTest Type +hi def link readlineDelimiter Delimiter +hi def link readlineTestModeEq readlineEq +hi def link readlineTestTermEq readlineEq +hi def link readlineTestTerm readlineString +hi def link readlineTestAppEq readlineEq +hi def link readlineTestApp readlineString +hi def link readlineInclude Include +hi def link readlinePath String +hi def link readlineKeyName SpecialChar +hi def link readlineKeySeparator readlineKeySeq +hi def link readlineKeyTerminator readlineDelimiter +hi def link readlineKeySeq String +hi def link readlineKeyEscape SpecialChar +hi def link readlineKeyword Keyword +hi def link readlineVariable Identifier +hi def link readlineBellStyle Constant +hi def link readlineBoolean Boolean +hi def link readlineString String +hi def link readlineStringDelimiter readlineString +hi def link readlineNumber Number +hi def link readlineEditingMode Constant +hi def link readlineKeymap Constant +hi def link readlineFunction Function + +let b:current_syntax = 'readline' let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/syntax/sysctl.vim b/runtime/syntax/sysctl.vim index d16d458a9..748054fd7 100644 --- a/runtime/syntax/sysctl.vim +++ b/runtime/syntax/sysctl.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: sysctl.conf(5) configuration file " Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2006-04-19 +" Latest Revision: 2011-05-02 if exists("b:current_syntax") finish @@ -13,7 +13,7 @@ set cpo&vim syn match sysctlBegin display '^' \ nextgroup=sysctlToken,sysctlComment skipwhite -syn match sysctlToken contained display '\S\+' +syn match sysctlToken contained display '[^=]\+' \ nextgroup=sysctlTokenEq skipwhite syn match sysctlTokenEq contained display '=' nextgroup=sysctlValue skipwhite |