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