1" Vim syntax file 2" Language: readline(3) configuration file 3" Maintainer: Nikolai Weibull <[email protected]> 4" Latest Revision: 2006-04-19 5" readline_has_bash - if defined add support for bash specific 6" settings/functions 7 8if exists("b:current_syntax") 9 finish 10endif 11 12let s:cpo_save = &cpo 13set cpo&vim 14 15setlocal iskeyword=@,48-57,- 16 17syn keyword readlineTodo contained TODO FIXME XXX NOTE 18 19syn region readlineComment display oneline start='^\s*#' end='$' 20 \ contains=readlineTodo,@Spell 21 22syn match readlineString '^\s*[A-Za-z-]\+:'me=e-1 contains=readlineKeys 23syn region readlineString display oneline start=+"+ skip=+\\\\\|\\"+ 24 \ end=+"+ contains=readlineKeysTwo 25 26syn case ignore 27syn keyword readlineKeys contained Control Meta Del Esc Escape LFD 28 \ Newline Ret Return Rubout Space Spc Tab 29syn case match 30 31syn match readlineKeysTwo contained display 32 \ +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{3}\)+ 33 34syn match readlineKeymaps contained display 35 \ 'emacs\(-standard\|-meta\|-ctlx\)\=' 36syn match readlineKeymaps contained display 37 \ 'vi\(-move\|-command\|-insert\)\=' 38 39syn keyword readlineBellStyles contained audible visible none 40 41syn match readlineNumber contained display '\<\d\+\>' 42 43syn case ignore 44syn keyword readlineBoolean contained on off 45syn case match 46 47syn keyword readlineIfOps contained mode term 48 49syn region readlineConditional display oneline transparent 50 \ matchgroup=readlineConditional 51 \ start='^\s*$if' end="$" 52 \ contains=readlineIfOps,readlineKeymaps 53syn match readlineConditional display '^\s*$\(else\|endif\)\>' 54 55syn match readlineInclude display '^\s*$include\>' 56 57syn region readlineSet display oneline transparent 58 \ matchgroup=readlineKeyword start='^\s*set\>' 59 \ end="$"me=e-1 contains=readlineNumber, 60 \ readlineBoolean,readlineKeymaps, 61 \ readlineBellStyles,readlineSettings 62 63syn keyword readlineSettings contained bell-style comment-begin 64 \ completion-ignore-case completion-query-items 65 \ convert-meta disable-completion editing-mode 66 \ enable-keypad expand-tilde 67 \ horizontal-scroll-mode mark-directories 68 \ keymap mark-modified-lines meta-flag 69 \ input-meta output-meta 70 \ print-completions-horizontally 71 \ show-all-if-ambiguous visible-stats 72 \ prefer-visible-bell blink-matching-paren 73 \ match-hidden-files history-preserve-point 74 \ isearch-terminators 75 76syn region readlineBinding display oneline transparent 77 \ matchgroup=readlineKeyword start=':' end='$' 78 \ contains=readlineKeys,readlineFunctions 79 80syn keyword readlineFunctions contained display 81 \ beginning-of-line end-of-line forward-char 82 \ backward-char forward-word backward-word 83 \ clear-screen redraw-current-line 84 \ accept-line previous-history 85 \ next-history beginning-of-history 86 \ end-of-history reverse-search-history 87 \ forward-search-history 88 \ non-incremental-reverse-search-history 89 \ non-incremental-forward-search-history 90 \ history-search-forward 91 \ history-search-backward 92 \ yank-nth-arg yank-last-arg 93 \ delete-char backward-delete-char 94 \ forward-backward-delete-char quoted-insert 95 \ tab-insert self-insert transpose-chars 96 \ transpose-words upcase-word downcase-word 97 \ capitalize-word overwrite-mode kill-line 98 \ backward-kill-line unix-line-discard 99 \ kill-whole-line kill-word backward-kill-word 100 \ unix-word-rubout unix-filename-rubout 101 \ delete-horizontal-space kill-region 102 \ copy-region-as-kill copy-backward-word 103 \ copy-forward-word yank yank-pop 104 \ digit-argument universal-argument complete 105 \ possible-completions insert-completions 106 \ menu-complete delete-char-or-list 107 \ start-kbd-macro end-kbd-macro 108 \ call-last-kbd-macro re-read-init-file 109 \ abort do-uppercase-version prefix-meta 110 \ undo revert-line tilde-expand set-mark 111 \ exchange-point-and-mark character-search 112 \ character-search-backward insert-comment 113 \ dump-functions dump-variables dump-macros 114 \ emacs-editing-mode vi-editing-mode 115 \ vi-complete vi-char-search vi-redo 116 \ vi-search vi-arg-digit vi-append-eol 117 \ vi-prev-word vi-change-to vi-delete-to 118 \ vi-end-word vi-fetch-history vi-insert-beg 119 \ vi-search-again vi-put vi-replace 120 \ vi-subst vi-yank-to vi-first-print 121 \ vi-yank-arg vi-goto-mark vi-append-mode 122 \ vi-insertion-mode prev-history vi-set-mark 123 \ vi-search-again vi-put vi-change-char 124 \ vi-subst vi-delete vi-yank-to 125 \ vi-column vi-change-case vi-overstrike 126 \ vi-overstrike-delete do-lowercase-version 127 \ delete-char-or-list tty-status 128 \ arrow-key-prefix vi-back-to-indent vi-bword 129 \ vi-bWord vi-eword vi-eWord vi-fword vi-fWord 130 \ vi-next-word 131 132if exists("readline_has_bash") 133 syn keyword readlineFunctions contained 134 \ shell-expand-line history-expand-line 135 \ magic-space alias-expand-line 136 \ history-and-alias-expand-line 137 \ insert-last-argument operate-and-get-next 138 \ forward-backward-delete-char 139 \ delete-char-or-list complete-filename 140 \ possible-filename-completions 141 \ complete-username 142 \ possible-username-completions 143 \ complete-variable 144 \ possible-variable-completions 145 \ complete-hostname 146 \ possible-hostname-completions 147 \ complete-command 148 \ possible-command-completions 149 \ dynamic-complete-history 150 \ complete-into-braces 151 \ glob-expand-word glob-list-expansions 152 \ display-shell-version glob-complete-word 153 \ edit-and-execute-command 154endif 155 156hi def link readlineComment Comment 157hi def link readlineTodo Todo 158hi def link readlineString String 159hi def link readlineKeys SpecialChar 160hi def link readlineKeysTwo SpecialChar 161hi def link readlineKeymaps Constant 162hi def link readlineBellStyles Constant 163hi def link readlineNumber Number 164hi def link readlineBoolean Boolean 165hi def link readlineIfOps Type 166hi def link readlineConditional Conditional 167hi def link readlineInclude Include 168hi def link readlineKeyword Keyword 169hi def link readlineSettings Type 170hi def link readlineFunctions Type 171 172let b:current_syntax = "readline" 173 174let &cpo = s:cpo_save 175unlet s:cpo_save 176