diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-10-29 17:47:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-29 17:47:27 +0100 |
commit | f5406dfe7772dca82e31f27c042c5718198f0ec8 (patch) | |
tree | 4dd3a3c82b0f4e762d36501f19a652fc6b41ee48 /runtime | |
parent | cf93b5e9f9eea1b08ca8d7cb124265867b2f3bf9 (diff) | |
parent | 6d1827aebc88698b75094029fb0a9e45c1d67632 (diff) | |
download | rneovim-f5406dfe7772dca82e31f27c042c5718198f0ec8.tar.gz rneovim-f5406dfe7772dca82e31f27c042c5718198f0ec8.tar.bz2 rneovim-f5406dfe7772dca82e31f27c042c5718198f0ec8.zip |
Merge #9164 from justinmk/vim-a2a80162deb1
vim-patch: runtime updates
Diffstat (limited to 'runtime')
176 files changed, 6270 insertions, 3057 deletions
diff --git a/runtime/autoload/RstFold.vim b/runtime/autoload/RstFold.vim new file mode 100644 index 0000000000..5becb04685 --- /dev/null +++ b/runtime/autoload/RstFold.vim @@ -0,0 +1,48 @@ +" Author: Antony Lee <anntzer.lee@gmail.com> +" Description: Helper functions for reStructuredText syntax folding +" Last Modified: 2018-01-07 + +function s:CacheRstFold() + let closure = {'header_types': {}, 'max_level': 0, 'levels': {}} + function closure.Process(match) dict + let curline = getcurpos()[1] + if has_key(self.levels, curline - 1) + " For over+under-lined headers, the regex will match both at the + " overline and at the title itself; in that case, skip the second match. + return + endif + let lines = split(a:match, '\n') + let key = repeat(lines[-1][0], len(lines)) + if !has_key(self.header_types, key) + let self.max_level += 1 + let self.header_types[key] = self.max_level + endif + let self.levels[curline] = self.header_types[key] + endfunction + let save_cursor = getcurpos() + silent keeppatterns %s/\v^%(%(([=`:.'"~^_*+#-])\1+\n)?.{1,2}\n([=`:.'"~^_*+#-])\2+)|%(%(([=`:.''"~^_*+#-])\3{2,}\n)?.{3,}\n([=`:.''"~^_*+#-])\4{2,})$/\=closure.Process(submatch(0))/gn + call setpos('.', save_cursor) + let b:RstFoldCache = closure.levels +endfunction + +function RstFold#GetRstFold() + if !has_key(b:, 'RstFoldCache') + call s:CacheRstFold() + endif + if has_key(b:RstFoldCache, v:lnum) + return '>' . b:RstFoldCache[v:lnum] + else + return '=' + endif +endfunction + +function RstFold#GetRstFoldText() + if !has_key(b:, 'RstFoldCache') + call s:CacheRstFold() + endif + let indent = repeat(' ', b:RstFoldCache[v:foldstart] - 1) + let thisline = getline(v:foldstart) + " For over+under-lined headers, skip the overline. + let text = thisline =~ '^\([=`:.''"~^_*+#-]\)\1\+$' ? getline(v:foldstart + 1) : thisline + return indent . text +endfunction diff --git a/runtime/autoload/csscomplete.vim b/runtime/autoload/csscomplete.vim index 50048a37fd..f6c5a6c391 100644 --- a/runtime/autoload/csscomplete.vim +++ b/runtime/autoload/csscomplete.vim @@ -4,7 +4,7 @@ " plus CSS Speech Module <http://www.w3.org/TR/css3-speech/> " Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com ) " Original Author: Mikolaj Machowski ( mikmach AT wp DOT pl ) -" Last Change: 2016 Jan 11 +" Last Change: 2018 Jul 02 let s:values = split("all additive-symbols align-content align-items align-self animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size block-size border border-block-end border-block-end-color border-block-end-style border-block-end-width border-block-start border-block-start-color border-block-start-style border-block-start-width border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-inline-end border-inline-end-color border-inline-end-style border-inline-end-width border-inline-start border-inline-start-color border-inline-start-style border-inline-start-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside caption-side clear clip clip-path color columns column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width content counter-increment counter-reset cue cue-before cue-after cursor direction display empty-cells fallback filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font font-family font-feature-settings font-kerning font-language-override font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-weight grid grid-area grid-auto-columns grid-auto-flow grid-auto-position grid-auto-rows grid-column grid-column-start grid-column-end grid-row grid-row-start grid-row-end grid-template grid-template-areas grid-template-rows grid-template-columns height hyphens image-rendering image-resolution image-orientation ime-mode inline-size isolation justify-content left letter-spacing line-break line-height list-style list-style-image list-style-position list-style-type margin margin-block-end margin-block-start margin-bottom margin-inline-end margin-inline-start margin-left margin-right margin-top marks mask mask-type max-block-size max-height max-inline-size max-width max-zoom min-block-size min-height min-inline-size min-width min-zoom mix-blend-mode negative object-fit object-position offset-block-end offset-block-start offset-inline-end offset-inline-start opacity order orientation orphans outline outline-color outline-offset outline-style outline-width overflow overflow-wrap overflow-x overflow-y pad padding padding-block-end padding-block-start padding-bottom padding-inline-end padding-inline-start padding-left padding-right padding-top page-break-after page-break-before page-break-inside pause-before pause-after pause perspective perspective-origin pointer-events position prefix quotes range resize rest rest-before rest-after right ruby-align ruby-merge ruby-position scroll-behavior scroll-snap-coordinate scroll-snap-destination scroll-snap-points-x scroll-snap-points-y scroll-snap-type scroll-snap-type-x scroll-snap-type-y shape-image-threshold shape-margin shape-outside speak speak-as suffix symbols system table-layout tab-size text-align text-align-last text-combine-upright text-decoration text-decoration-color text-decoration-line text-emphasis text-emphasis-color text-emphasis-position text-emphasis-style text-indent text-orientation text-overflow text-rendering text-shadow text-transform text-underline-position top touch-action transform transform-box transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi unicode-range user-zoom vertical-align visibility voice-balance voice-duration voice-family voice-pitch voice-rate voice-range voice-stress voice-volume white-space widows width will-change word-break word-spacing word-wrap writing-mode z-index zoom") @@ -19,7 +19,6 @@ function! csscomplete#CompleteCSS(findstart, base) while start >= 0 && line[start - 1] =~ '\%(\k\|-\)' let start -= 1 endwhile - let b:after = line[compl_begin :] let b:compl_context = line[0:compl_begin] return start endif @@ -37,11 +36,14 @@ function! csscomplete#CompleteCSS(findstart, base) " 5. if @ complete at-rule " 6. if ! complete important if exists("b:compl_context") + let line = getline('.') + let compl_begin = col('.') - 2 + let after = line[compl_begin:] let line = b:compl_context - let after = b:after unlet! b:compl_context else let line = a:base + let after = '' endif let res = [] diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 2603c6822f..81fdc9d956 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -1,7 +1,7 @@ " Vim functions for file type detection " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2017 Nov 11 +" Last Change: 2017 Dec 05 " These functions are moved here from runtime/filetype.vim to make startup " faster. @@ -618,7 +618,11 @@ func dist#ft#FTperl() setf perl return 1 endif - if search('^use\s\s*\k', 'nc', 30) + let save_cursor = getpos('.') + call cursor(1,1) + let has_use = search('^use\s\s*\k', 'c', 30) + call setpos('.', save_cursor) + if has_use setf perl return 1 endif diff --git a/runtime/autoload/spellfile.vim b/runtime/autoload/spellfile.vim index 84584c6e29..9ec6091218 100644 --- a/runtime/autoload/spellfile.vim +++ b/runtime/autoload/spellfile.vim @@ -20,6 +20,7 @@ function! spellfile#LoadFile(lang) endif return endif + let lang = tolower(a:lang) " If the URL changes we try all files again. if s:spellfile_URL != g:spellfile_URL @@ -28,13 +29,13 @@ function! spellfile#LoadFile(lang) endif " I will say this only once! - if has_key(s:donedict, a:lang . &enc) + if has_key(s:donedict, lang . &enc) if &verbose echomsg 'spellfile#LoadFile(): Tried this language/encoding before.' endif return endif - let s:donedict[a:lang . &enc] = 1 + let s:donedict[lang . &enc] = 1 " Find spell directories we can write in. let [dirlist, dirchoices] = spellfile#GetDirChoices() @@ -94,7 +95,7 @@ function! spellfile#LoadFile(lang) let newbufnr = winbufnr(0) endif - let fname = a:lang . '.ascii.spl' + let fname = lang . '.ascii.spl' echo 'Could not find it, trying ' . fname . '...' call spellfile#Nread(fname) if getline(2) !~ 'VIMspell' diff --git a/runtime/autoload/xmlformat.vim b/runtime/autoload/xmlformat.vim new file mode 100644 index 0000000000..f227b5ee25 --- /dev/null +++ b/runtime/autoload/xmlformat.vim @@ -0,0 +1,111 @@ +" Vim plugin for formatting XML +" Last Change: Thu, 22 May 2018 21:26:55 +0100 +" Version: 0.1 +" Author: Christian Brabandt <cb@256bit.org> +" Repository: https://github.com/chrisbra/vim-xml-ftplugin +" License: VIM License +" Documentation: see :h xmlformat.txt (TODO!) +" --------------------------------------------------------------------- +" Load Once: {{{1 +if exists("g:loaded_xmlformat") || &cp + finish +endif +let g:loaded_xmlformat = 1 +let s:keepcpo = &cpo +set cpo&vim + +" Main function: Format the input {{{1 +func! xmlformat#Format() + " only allow reformatting through the gq command + " (e.g. Vim is in normal mode) + if mode() != 'n' + " do not fall back to internal formatting + return 0 + endif + let sw = shiftwidth() + let prev = prevnonblank(v:lnum-1) + let s:indent = indent(prev)/sw + let result = [] + let lastitem = prev ? getline(prev) : '' + let is_xml_decl = 0 + " split on `<`, but don't split on very first opening < + for item in split(join(getline(v:lnum, (v:lnum + v:count - 1))), '.\@<=[>]\zs') + if s:EndTag(item) + let s:indent = s:DecreaseIndent() + call add(result, s:Indent(item)) + elseif s:EmptyTag(lastitem) + call add(result, s:Indent(item)) + elseif s:StartTag(lastitem) && s:IsTag(item) + let s:indent += 1 + call add(result, s:Indent(item)) + else + if !s:IsTag(item) + " Simply split on '<' + let t=split(item, '.<\@=\zs') + let s:indent+=1 + call add(result, s:Indent(t[0])) + let s:indent = s:DecreaseIndent() + call add(result, s:Indent(t[1])) + else + call add(result, s:Indent(item)) + endif + endif + let lastitem = item + endfor + + if !empty(result) + exe v:lnum. ",". (v:lnum + v:count - 1). 'd' + call append(v:lnum - 1, result) + " Might need to remove the last line, if it became empty because of the + " append() call + let last = v:lnum + len(result) + if getline(last) is '' + exe last. 'd' + endif + endif + + " do not run internal formatter! + return 0 +endfunc +" Check if given tag is XML Declaration header {{{1 +func! s:IsXMLDecl(tag) + return a:tag =~? '^\s*<?xml\s\?\%(version="[^"]*"\)\?\s\?\%(encoding="[^"]*"\)\? ?>\s*$' +endfunc +" Return tag indented by current level {{{1 +func! s:Indent(item) + return repeat(' ', shiftwidth()*s:indent). s:Trim(a:item) +endfu +" Return item trimmed from leading whitespace {{{1 +func! s:Trim(item) + if exists('*trim') + return trim(a:item) + else + return matchstr(a:item, '\S\+.*') + endif +endfunc +" Check if tag is a new opening tag <tag> {{{1 +func! s:StartTag(tag) + return a:tag =~? '^\s*<[^/?]' +endfunc +" Remove one level of indentation {{{1 +func! s:DecreaseIndent() + return (s:indent > 0 ? s:indent - 1 : 0) +endfunc +" Check if tag is a closing tag </tag> {{{1 +func! s:EndTag(tag) + return a:tag =~? '^\s*</' +endfunc +" Check that the tag is actually a tag and not {{{1 +" something like "foobar</foobar>" +func! s:IsTag(tag) + return s:Trim(a:tag)[0] == '<' +endfunc +" Check if tag is empty <tag/> {{{1 +func! s:EmptyTag(tag) + return a:tag =~ '/>\s*$' +endfunc +" Restoration And Modelines: {{{1 +let &cpo= s:keepcpo +unlet s:keepcpo +" Modeline {{{1 +" vim: fdm=marker fdl=0 ts=2 et sw=0 sts=-1 diff --git a/runtime/doc/arabic.txt b/runtime/doc/arabic.txt index 07350083c6..a3d979e519 100644 --- a/runtime/doc/arabic.txt +++ b/runtime/doc/arabic.txt @@ -313,4 +313,4 @@ There is one known minor bug, No other bugs are known to exist. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 2f9d8aa7f7..bacd0e7cf1 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -20,7 +20,7 @@ files matching *.c. You can also use autocommands to implement advanced features, such as editing compressed files (see |gzip-example|). The usual place to put autocommands is in your vimrc file. - *E203* *E204* *E143* *E855* *E937* + *E203* *E204* *E143* *E855* *E937* *E952* WARNING: Using autocommands is very powerful, and may lead to unexpected side effects. Be careful not to destroy your text. - It's a good idea to do some testing on an expendable copy of a file first. @@ -44,6 +44,8 @@ effects. Be careful not to destroy your text. Add {cmd} to the list of commands that Vim will execute automatically on {event} for a file matching {pat} |autocmd-patterns|. + Note: A quote character is seen as argument to the + :autocmd and won't start a comment. Vim always adds the {cmd} after existing autocommands, so that the autocommands execute in the order in which they were given. See |autocmd-nested| for [nested]. @@ -79,7 +81,8 @@ will appear twice. To avoid this, define your autocommands in a group, so that you can easily clear them: > augroup vimrc - autocmd! " Remove all vimrc autocommands + " Remove all vimrc autocommands + autocmd! au BufNewFile,BufRead *.html so <sfile>:h/html.vim augroup END @@ -133,6 +136,8 @@ prompt. When one command outputs two messages this can happen anyway. plugins, syntax highlighting, etc. :au[tocmd]! [group] Remove ALL autocommands. + Note: a quote will be seen as argument to the :autocmd + and won't start a comment. Warning: You should normally not do this without a group, it breaks plugins, syntax highlighting, etc. @@ -313,6 +318,7 @@ Name triggered by ~ |TabNew| when creating a new tab page |TabNewEntered| after entering a new tab page |TabClosed| after closing a tab page +|CmdlineChanged| after a change was made to the command-line text |CmdlineEnter| after entering cmdline mode |CmdlineLeave| before leaving cmdline mode |CmdwinEnter| after entering the command-line window @@ -332,6 +338,7 @@ Name triggered by ~ |TextChangedP| after a change was made to the text in Insert mode when popup menu visible +|ColorSchemePre| before loading a color scheme |ColorScheme| after loading a color scheme |RemoteReply| a reply from a server Vim was received @@ -513,6 +520,10 @@ CmdUndefined When a user command is used but it isn't command is defined. An alternative is to always define the user command and have it invoke an autoloaded function. See |autoload|. + *CmdlineChanged* +CmdlineChanged After a change was made to the text in the + command line. Be careful not to mess up + the command line, it may cause Vim to lock up. *CmdlineEnter* CmdlineEnter After moving the cursor to the command line, where the user can type a command or search @@ -559,6 +570,10 @@ ColorScheme After loading a color scheme. |:colorscheme| set, and <amatch> for the new colorscheme name. + *ColorSchemePre* +ColorSchemePre Before loading a color scheme. |:colorscheme| + Useful to setup removing things added by a + color scheme, before another one is loaded. *CompleteDone* CompleteDone After Insert mode completion is done. Either @@ -651,7 +666,10 @@ FileChangedRO Before making the first change to a read-only ExitPre When using `:quit`, `:wq` in a way it makes Vim exit, or using `:qall`, just after |QuitPre|. Can be used to close any - non-essential window. + non-essential window. Exiting may still be + cancelled if there is a modified buffer that + isn't automatically saved, use |VimLeavePre| + for really exiting. *FileChangedShell* FileChangedShell When Vim notices that the modification time of a file has changed since editing started. @@ -936,6 +954,7 @@ SwapExists Detected an existing swap file when starting It is not allowed to change to another buffer, change a buffer name or change directory here. + {only available with the +eval feature} *Syntax* Syntax When the 'syntax' option has been set. The pattern is matched against the syntax name. @@ -996,6 +1015,10 @@ TextChangedP After a change was made to the text in the User Never executed automatically. To be used for autocommands that are only executed with ":doautocmd". + Note that when `:doautocmd User MyEvent` is + used while there are no matching autocommands, + you will get an error. If you don't want + that, define a dummy autocommand yourself. *UserGettingBored* UserGettingBored When the user presses the same key 42 times. Just kidding! :-) @@ -1044,9 +1067,10 @@ WinEnter After entering another window. Not done for If the window is for another buffer, Vim executes the BufEnter autocommands after the WinEnter autocommands. - Note: When using ":split fname" the WinEnter - event is triggered after the split but before - the file "fname" is loaded. + Note: For split and tabpage commands the + WinEnter event is triggered after the split + or tab command but before the file is loaded. + *WinLeave* WinLeave Before leaving a window. If the window to be entered next is for a different buffer, Vim @@ -1356,7 +1380,7 @@ Careful: '[ and '] change when using commands that change the buffer. In commands which expect a file name, you can use "<afile>" for the file name that is being read |:<afile>| (you can also use "%" for the current file name). "<abuf>" can be used for the buffer number of the currently effective -buffer. This also works for buffers that doesn't have a name. But it doesn't +buffer. This also works for buffers that don't have a name. But it doesn't work for files without a buffer (e.g., with ":r file"). *gzip-example* diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index f3dd0bd6df..ec122d3a13 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -99,7 +99,7 @@ is an error when 'cpoptions' includes the 'E' flag. J Join [count] lines, with a minimum of two lines. Remove the indent and insert up to two spaces (see below). Fails when on the last line of the buffer. - If [count] is too big it is reduce to the number of + If [count] is too big it is reduced to the number of lines available. *v_J* @@ -416,7 +416,7 @@ This depends on the 'nrformats' option: For decimals a leading negative sign is considered for incrementing or decrementing, for binary, octal and hex values, it won't be considered. To -ignore the sign Visually select the number before using CTRL-A or CTRL-X. +ignore the sign Visually select the number before using CTRL-A or CTRL-X. For numbers with leading zeros (including all octal and hexadecimal numbers), Vim preserves the number of characters in the number when possible. CTRL-A on @@ -501,6 +501,7 @@ If the 'shiftround' option is on, the indent is rounded to a multiple of If the 'smartindent' option is on, or 'cindent' is on and 'cinkeys' contains '#' with a zero value, shift right does not affect lines starting with '#' (these are supposed to be C preprocessor lines that must stay in column 1). +This can be changed with the 'cino' option, see |cino-#|. When the 'expandtab' option is off (this is the default) Vim uses <Tab>s as much as possible to make the indent. You can use ">><<" to replace an indent @@ -1371,6 +1372,55 @@ to the name of an external program for Vim to use for text formatting. The 'textwidth' and other options have no effect on formatting by an external program. + *format-formatexpr* +The 'formatexpr' option can be set to a Vim script function that performs +reformatting of the buffer. This should usually happen in an |ftplugin|, +since formatting is highly dependent on the type of file. It makes +sense to use an |autoload| script, so the corresponding script is only loaded +when actually needed and the script should be called <filetype>format.vim. + +For example, the XML filetype plugin distributed with Vim in the $VIMRUNTIME +directory, sets the 'formatexpr' option to: > + + setlocal formatexpr=xmlformat#Format() + +That means, you will find the corresponding script, defining the +xmlformat#Format() function, in the directory: +`$VIMRUNTIME/autoload/xmlformat.vim` + +Here is an example script that removes trailing whitespace from the selected +text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: > + + func! format#Format() + " only reformat on explicit gq command + if mode() != 'n' + " fall back to Vims internal reformatting + return 1 + endif + let lines = getline(v:lnum, v:lnum + v:count - 1) + call map(lines, {key, val -> substitute(val, '\s\+$', '', 'g')}) + call setline('.', lines) + + " do not run internal formatter! + return 0 + endfunc + +You can then enable the formatting by executing: > + setlocal formatexpr=format#Format() + +Note: this function explicitly returns non-zero when called from insert mode +(which basically means, text is inserted beyond the 'textwidth' limit). This +causes Vim to fall back to reformat the text by using the internal formatter. + +However, if the |gq| command is used to reformat the text, the function +will receive the selected lines, trim trailing whitespace from those lines and +put them back in place. If you are going to split single lines into multiple +lines, be careful not to overwrite anything. + +If you want to allow reformatting of text from insert or replace mode, one has +to be very careful, because the function might be called recursively. For +debugging it helps to set the 'debug' option. + *right-justify* There is no command in Vim to right justify text. You can do it with an external command, like "par" (e.g.: "!}par" to format until the end of the @@ -1753,4 +1803,4 @@ The sorting can be interrupted, but if you interrupt it too late in the process you may end up with duplicated lines. This also depends on the system library function used. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index e72799c65b..d51940c69e 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -378,10 +378,13 @@ CTRL-D List names that match the pattern in front of the cursor. match is inserted. After the last match, the first is used again (wrap around). The behavior can be changed with the 'wildmode' option. + *c_<S-Tab>* +<S-Tab> Like 'wildchar' or <Tab>, but begin with the last match and + then go to the previous match. *c_CTRL-N* CTRL-N After using 'wildchar' which got multiple matches, go to next match. Otherwise recall more recent command-line from history. -<S-Tab> *c_CTRL-P* *c_<S-Tab>* + *c_CTRL-P* CTRL-P After using 'wildchar' which got multiple matches, go to previous match. Otherwise recall older command-line from history. @@ -841,7 +844,8 @@ These modifiers can be given, in this order: directory. :. Reduce file name to be relative to current directory, if possible. File name is unmodified if it is not below the - current directory. + current directory, but on MS-Windows the drive is removed if + it is the current drive. For maximum shortness, use ":~:.". :h Head of the file name (the last component and any separators removed). Cannot be used with :e, :r or :t. @@ -1105,4 +1109,4 @@ The character used for the pattern indicates the type of command-line: @ string for |input()| - text for |:insert| or |:append| - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/debug.txt b/runtime/doc/debug.txt index 422255fa02..441d31c7b9 100644 --- a/runtime/doc/debug.txt +++ b/runtime/doc/debug.txt @@ -170,4 +170,4 @@ Visual C++ 2005 Express Edition can be downloaded for free from: http://msdn.microsoft.com/vstudio/express/visualC/default.aspx ========================================================================= - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index bd195b78b2..cd81236f32 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -265,4 +265,4 @@ External UIs are expected to implement these common features: this event. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index 50b53bcd3e..766240dfb0 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -372,12 +372,16 @@ Example (this does almost the same as 'diffexpr' being empty): > endif silent execute "!diff -a --binary " . opt . v:fname_in . " " . v:fname_new . \ " > " . v:fname_out + redraw! endfunction The "-a" argument is used to force comparing the files as text, comparing as binaries isn't useful. The "--binary" argument makes the files read in binary mode, so that a CTRL-Z doesn't end the text on DOS. +The `redraw!` command may not be needed, depending on whether executing a +shell command shows something on the display or not. + *E810* *E97* Vim will do a test if the diff output looks alright. If it doesn't, you will get an error message. Possible causes: @@ -429,4 +433,4 @@ evaluating 'patchexpr'. This hopefully avoids that files in the current directory are accidentally patched. Vim will also delete files starting with v:fname_in and ending in ".rej" and ".orig". - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt index d3b03c6ef6..f05c73d737 100644 --- a/runtime/doc/digraph.txt +++ b/runtime/doc/digraph.txt @@ -1484,4 +1484,4 @@ char digraph hex dec official name ~ ſt ft FB05 64261 LATIN SMALL LIGATURE LONG S T st st FB06 64262 LATIN SMALL LIGATURE ST - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 5aa09503cd..34fb779fe7 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -376,6 +376,15 @@ On Unix and a few other systems you can also use backticks for the file name argument, for example: > :next `find . -name ver\\*.c -print` :view `ls -t *.patch \| head -n1` +Vim will run the command in backticks using the 'shell' and use the standard +output as argument for the given Vim command (error messages from the shell +command will be discarded). +To see what shell command Vim is running, set the 'verbose' option to 4. When +the shell command returns a non-zero exit code, an error message will be +displayed and the Vim command will be aborted. To avoid this make the shell +always return zero like so: > + :next `find . -name ver\\*.c -print \|\| true` + The backslashes before the star are required to prevent the shell from expanding "ver*.c" prior to execution of the find program. The backslash before the shell pipe symbol "|" prevents Vim from parsing it as command @@ -824,8 +833,8 @@ flag is used for the ":substitute" command to avoid an error for files where Note: When the 'write' option is off, you are not able to write any file. *:w* *:write* - *E502* *E503* *E504* *E505* - *E512* *E514* *E667* *E796* + *E502* *E503* *E504* *E505* + *E512* *E514* *E667* *E796* *E949* :w[rite] [++opt] Write the whole buffer to the current file. This is the normal way to save changes to a file. It fails when the 'readonly' option is set or when there is @@ -881,6 +890,9 @@ used, for example, when the write fails and you want to try again later with ":w #". This can be switched off by removing the 'A' flag from the 'cpoptions' option. +Note that the 'fsync' option matters here. If it's set it may make writes +slower (but safer). + *:sav* *:saveas* :sav[eas][!] [++opt] {file} Save the current buffer under the name {file} and set @@ -1542,4 +1554,4 @@ There are three different types of searching: currently work with 'path' items that contain a URL or use the double star with depth limiter (/usr/**2) or upward search (;) notations. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 3f02365dab..20c0ce0876 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2101,6 +2101,7 @@ gettabvar({nr}, {varname} [, {def}]) gettabwinvar({tabnr}, {winnr}, {name} [, {def}]) any {name} in {winnr} in tab page {tabnr} getwininfo([{winid}]) List list of windows +getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window getwinposx() Number X coord in pixels of GUI Vim window getwinposy() Number Y coord in pixels of GUI Vim window getwinvar({nr}, {varname} [, {def}]) @@ -2194,6 +2195,8 @@ msgpackdump({list}) List dump a list of objects to msgpack msgpackparse({list}) List parse msgpack to a list of objects nextnonblank({lnum}) Number line nr of non-blank line >= {lnum} nr2char({expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr} +option_restore({list}) none restore options saved by option_save() +option_save({list}) List save options values nvim_...({args}...) any call nvim |api| functions or({expr}, {expr}) Number bitwise OR pathshorten({expr}) String shorten directory names in a path @@ -2336,7 +2339,7 @@ tolower({expr}) String the String {expr} switched to lowercase toupper({expr}) String the String {expr} switched to uppercase tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr} to chars in {tostr} -trim({text}[, {mask}]) String trim characters in {mask} from {text} +trim({text} [, {mask}]) String trim characters in {mask} from {text} trunc({expr}) Float truncate Float {expr} type({name}) Number type of variable {name} undofile({name}) String undo file name for {name} @@ -2611,6 +2614,8 @@ bufexists({expr}) *bufexists()* The result is a Number, which is |TRUE| if a buffer called {expr} exists. If the {expr} argument is a number, buffer numbers are used. + Number zero is the alternate buffer for the current window. + If the {expr} argument is a string it must match a buffer name exactly. The name can be: - Relative to the current directory. @@ -3235,6 +3240,7 @@ executable({expr}) *executable()* 1 exists 0 does not exist -1 not implemented on this system + |exepath()| can be used to get the full path of an executable. execute({command} [, {silent}]) *execute()* Execute {command} and capture its output. @@ -3884,7 +3890,7 @@ getbufinfo([{dict}]) endfor < To get buffer-local options use: > - getbufvar({bufnr}, '&') + getbufvar({bufnr}, '&option_name') < *getbufline()* @@ -4310,6 +4316,7 @@ getqflist([{what}]) *getqflist()* list item is a dictionary with these entries: bufnr number of buffer that has the file name, use bufname() to get the name + module module name lnum line number in the buffer (first line is 1) col column number (first column is 1) vcol |TRUE|: "col" is visual column @@ -4334,51 +4341,63 @@ getqflist([{what}]) *getqflist()* If the optional {what} dictionary argument is supplied, then returns only the items listed in {what} as a dictionary. The following string items are supported in {what}: - context get the context stored with |setqflist()| + changedtick get the total number of changes made + to the list |quickfix-changedtick| + context get the |quickfix-context| efm errorformat to use when parsing "lines". If not present, then the 'errorformat' option value is used. id get information for the quickfix list with |quickfix-ID|; zero means the id for the current list or the list specified by "nr" + idx index of the current entry in the list items quickfix list entries - lines use 'errorformat' to extract items from a list - of lines and return the resulting entries. - Only a |List| type is accepted. The current - quickfix list is not modified. + lines parse a list of lines using 'efm' and return + the resulting entries. Only a |List| type is + accepted. The current quickfix list is not + modified. See |quickfix-parse|. nr get information for this quickfix list; zero means the current quickfix list and "$" means the last quickfix list - title get the list title - winid get the |window-ID| (if opened) + size number of entries in the quickfix list + title get the list title |quickfix-title| + winid get the quickfix |window-ID| all all of the above quickfix properties - Non-string items in {what} are ignored. + Non-string items in {what} are ignored. To get the value of a + particular item, set it to zero. If "nr" is not present then the current quickfix list is used. If both "nr" and a non-zero "id" are specified, then the list specified by "id" is used. - To get the number of lists in the quickfix stack, set 'nr' to - '$' in {what}. The 'nr' value in the returned dictionary + To get the number of lists in the quickfix stack, set "nr" to + "$" in {what}. The "nr" value in the returned dictionary contains the quickfix stack size. - When 'text' is specified, all the other items are ignored. The - returned dictionary contains the entry 'items' with the list - of entries. - In case of error processing {what}, an empty dictionary is - returned. + When "lines" is specified, all the other items except "efm" + are ignored. The returned dictionary contains the entry + "items" with the list of entries. The returned dictionary contains the following entries: - context context information stored with |setqflist()| - id quickfix list ID |quickfix-ID| - items quickfix list entries - nr quickfix list number - title quickfix list title text - winid quickfix |window-ID| (if opened) - - Examples: > + changedtick total number of changes made to the + list |quickfix-changedtick| + context quickfix list context. See |quickfix-context| + If not present, set to "". + id quickfix list ID |quickfix-ID|. If not + present, set to 0. + idx index of the current entry in the list. If not + present, set to 0. + items quickfix list entries. If not present, set to + an empty list. + nr quickfix list number. If not present, set to 0 + size number of entries in the quickfix list. If not + present, set to 0. + title quickfix list title text. If not present, set + to "". + winid quickfix |window-ID|. If not present, set to 0 + + Examples (See also |getqflist-examples|): > :echo getqflist({'all': 1}) :echo getqflist({'nr': 2, 'title': 1}) :echo getqflist({'lines' : ["F1:10:L10"]}) < - getreg([{regname} [, 1 [, {list}]]]) *getreg()* The result is a String, which is the contents of register {regname}. Example: > @@ -4457,6 +4476,9 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()* :let list_is_on = gettabwinvar(1, 2, '&list') :echo "myvar = " . gettabwinvar(3, 1, 'myvar') < + To obtain all window-local variables use: > + gettabwinvar({tabnr}, {winnr}, '&') + *getwinposx()* getwinposx() The result is a Number, which is the X coordinate in pixels of the left hand side of the GUI Vim window. The result will be @@ -4482,22 +4504,19 @@ getwininfo([{winid}]) *getwininfo()* Each List item is a Dictionary with the following entries: bufnr number of buffer in the window height window height (excluding winbar) - winbar 1 if the window has a toolbar, 0 - otherwise loclist 1 if showing a location list quickfix 1 if quickfix or location list window tabnr tab page number variables a reference to the dictionary with window-local variables width window width + winbar 1 if the window has a toolbar, 0 + otherwise wincol leftmost screen column of the window winid |window-ID| winnr window number winrow topmost screen column of the window - To obtain all window-local variables use: > - gettabwinvar({tabnr}, {winnr}, '&') - getwinvar({winnr}, {varname} [, {def}]) *getwinvar()* Like |gettabwinvar()| for the current tabpage. Examples: > @@ -5340,7 +5359,8 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()* listing. When there is no mapping for {name}, an empty String is - returned. + returned. When the mapping for {name} is empty, then "<Nop>" + is returned. The {name} can have special key names, like in the ":map" command. @@ -5407,9 +5427,10 @@ mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()* mapping that matches with {name}, while maparg() only finds a mapping for {name} exactly. When there is no mapping that starts with {name}, an empty - String is returned. If there is one, the rhs of that mapping + String is returned. If there is one, the RHS of that mapping is returned. If there are several mappings that start with - {name}, the rhs of one of them is returned. + {name}, the RHS of one of them is returned. This will be + "<Nop>" if the RHS is empty. The mappings local to the current buffer are checked first, then the global mappings. This function can be used to check if a mapping can be added @@ -5565,8 +5586,6 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]]) < Matches added by |matchaddpos()| are returned by |getmatches()| with an entry "pos1", "pos2", etc., with the value a list like the {pos} item. - These matches cannot be set via |setmatches()|, however they - can still be deleted by |clearmatches()|. matcharg({nr}) *matcharg()* Selects the {nr} match item, as set with a |:match|, @@ -6594,6 +6613,8 @@ searchpair({start}, {middle}, {end} [, {flags} [, {skip} When {skip} is omitted or empty, every match is accepted. When evaluating {skip} causes an error the search is aborted and -1 returned. + {skip} can be a string, a lambda, a funcref or a partial. + Anything else makes the function fail. For {stopline} and {timeout} see |search()|. @@ -6935,7 +6956,7 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()* only the items listed in {what} are set. The first {list} argument is ignored. The following items can be specified in {what}: - context any Vim type can be stored as a context + context quickfix list context. See |quickfix-context| efm errorformat to use when parsing text from "lines". If this is not present, then the 'errorformat' option value is used. @@ -6957,10 +6978,10 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()* list is modified, "id" should be used instead of "nr" to specify the list. - Examples: > + Examples (See also |setqflist-examples|): > :call setqflist([], 'r', {'title': 'My search'}) :call setqflist([], 'r', {'nr': 2, 'title': 'Errors'}) - :call setqflist([], 'a', {'id':myid, 'lines':["F1:10:L10"]}) + :call setqflist([], 'a', {'id':qfid, 'lines':["F1:10:L10"]}) < Returns zero for success, -1 for failure. @@ -8007,7 +8028,7 @@ tr({src}, {fromstr}, {tostr}) *tr()* echo tr("<blob>", "<>", "{}") < returns "{blob}" -trim({text}[, {mask}]) *trim()* +trim({text} [, {mask}]) *trim()* Return {text} as a String where any character in {mask} is removed from the beginning and end of {text}. If {mask} is not given, {mask} is all characters up to 0x20, @@ -8016,12 +8037,12 @@ trim({text}[, {mask}]) *trim()* This code deals with multibyte characters properly. Examples: > - echo trim(" \r\t\t\r RESERVE \t \t\n\x0B\x0B")."_TAIL" + echo trim(" some text ") +< returns "some text" > + echo trim(" \r\t\t\r RESERVE \t\n\x0B\xA0") . "_TAIL" < returns "RESERVE_TAIL" > - echo trim("needrmvRESERVEnnneeedddrrmmmmvv", "ednmrv") -< returns "RESERVE" > - echo trim("rm<blob1><blob2><any_chars>rrmm<blob1><blob2><blob2>", "rm<blob1><blob2>") -< returns "any_chas" + echo trim("rm<Xrm<>X>rrm", "rm<>") +< returns "Xrm<>X" (characters in the middle are not removed) trunc({expr}) *trunc()* Return the largest integral value with magnitude less than or @@ -8545,6 +8566,8 @@ visual Compiled with Visual mode. visualextra Compiled with extra Visual mode commands. |blockwise-operators|. vreplace Compiled with |gR| and |gr| commands. +vtp Compiled for vcon support |+vtp| (check vcon to find + out if it works in the current console)). wildignore Compiled with 'wildignore' option. wildmenu Compiled with 'wildmenu' option. win32 Windows version of Vim (32 or 64 bit). @@ -8769,8 +8792,7 @@ may be larger. It is also possible to define a function without any arguments. You must still supply the () then. -It is allowed to define another function inside a function -body. +It is allowed to define another function inside a function body. *local-variables* Inside a function local variables can be used. These will disappear when the @@ -10691,7 +10713,7 @@ The sandbox is also used for the |:sandbox| command. These items are not allowed in the sandbox: - changing the buffer text - - defining or changing mapping, autocommands, functions, user commands + - defining or changing mapping, autocommands, user commands - setting certain options (see |option-summary|) - setting certain v: variables (see |v:var|) *E794* - executing a shell command @@ -10713,6 +10735,7 @@ location. Insecure in this context are: - sourcing a .nvimrc or .exrc in the current directory - while executing in the sandbox - value coming from a modeline +- executing a function that was defined in the sandbox Note that when in the sandbox and saving an option value and restoring it, the option will still be marked as it was set in the sandbox. diff --git a/runtime/doc/farsi.txt b/runtime/doc/farsi.txt index a824c469b0..c5421137f8 100644 --- a/runtime/doc/farsi.txt +++ b/runtime/doc/farsi.txt @@ -205,4 +205,4 @@ changes made in the current line. For more information about the bugs refer to rileft.txt. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 6ac14e4122..55e49efff0 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -273,6 +273,10 @@ then Vim will load all plugins in these directories and below: Note that the last one is the value of $VIMRUNTIME which has been expanded. +Note that when using a plugin manager or |packages| many directories will be +added to 'runtimepath'. These plugins each require their own directory, don't +put them directly in ~/.vim/plugin. + What if it looks like your plugin is not being loaded? You can find out what happens when Vim starts up by using the |-V| argument: > @@ -570,7 +574,7 @@ By default the following options are set, in accordance with PEP8: > setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8 To disable this behaviour, set the following variable in your vimrc: > - + let g:python_recommended_style = 0 @@ -750,4 +754,23 @@ You can change the default by defining the variable g:tex_flavor to the format Currently no other formats are recognized. - vim:tw=78:ts=8:ft=help:norl: +VIM *ft-vim-plugin* + +The Vim filetype plugin defines mappings to move to the start and end of +functions with [[ and ]]. Move around comments with ]" and [". + +The mappings can be disabled with: > + let g:no_vim_maps = 1 + + +ZIMBU *ft-zimbu-plugin* + +The Zimbu filetype plugin defines mappings to move to the start and end of +functions with [[ and ]]. + +The mappings can be disabled with: > + let g:no_zimbu_maps = 1 +< + + + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt index c644d63280..b7d92fb229 100644 --- a/runtime/doc/fold.txt +++ b/runtime/doc/fold.txt @@ -595,4 +595,4 @@ used. Otherwise the values from the window where the buffer was edited last are used. ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/ft_ada.txt b/runtime/doc/ft_ada.txt index c1aa0904c4..771ccc3302 100644 --- a/runtime/doc/ft_ada.txt +++ b/runtime/doc/ft_ada.txt @@ -249,7 +249,7 @@ g:decada.Make_Command string External command used for |g:decada.Make()| (|'makeprg'|). *g:decada.Error_Format* -g:decada.Error_Format| string +g:decada.Error_Format string Error format (|'errorformat'|). ============================================================================== diff --git a/runtime/doc/ft_rust.txt b/runtime/doc/ft_rust.txt index 750ba76afc..ff2e0ca56f 100644 --- a/runtime/doc/ft_rust.txt +++ b/runtime/doc/ft_rust.txt @@ -1,4 +1,6 @@ -*ft_rust.txt* Filetype plugin for Rust +*ft_rust.txt* For Vim version 8.1. Last change: 2017 Nov 02 + +This is documentation for the Rust filetype plugin. ============================================================================== CONTENTS *rust* @@ -234,4 +236,4 @@ It also has a few other mappings: Note: This binding is only available in MacVim. ============================================================================== - vim:tw=78:sw=4:noet:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/ft_sql.txt b/runtime/doc/ft_sql.txt index 29268f5753..324e2e44af 100644 --- a/runtime/doc/ft_sql.txt +++ b/runtime/doc/ft_sql.txt @@ -773,4 +773,4 @@ Setting the filetype back to Perl sets all the usual "perl" related items back as they were. -vim:tw=78:ts=8:ft=help:norl: +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index 0c2cc9c865..06609a77e1 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -71,7 +71,7 @@ and only the first one that is found is read. :winp[os] Display current position of the top left corner of the GUI vim window in pixels. Does not work in all versions. - Also see |getwinposx()| and |getwinposy()|. + Also see |getwinpos()|, |getwinposx()| and |getwinposy()|. :winp[os] {X} {Y} *E466* Put the GUI vim window at the given {X} and {Y} coordinates. @@ -639,4 +639,4 @@ This creates a popup menu that doesn't exist on the main menu-bar. Note that a menu that starts with ']' will not be displayed. - vim:tw=78:sw=4:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/hebrew.txt b/runtime/doc/hebrew.txt index 642d80adc7..2f4b137bd3 100644 --- a/runtime/doc/hebrew.txt +++ b/runtime/doc/hebrew.txt @@ -134,4 +134,4 @@ The result is that all Hebrew characters are displayed as ~x. To solve this problem, set isprint=@,128-255. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index 8a83cbc79c..2ae2504b02 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -182,4 +182,4 @@ will try to find help for it. Especially for options in single quotes, e.g. 'hlsearch'. ------------------------------------------------------------------------------ - vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl: + vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:noet:ft=help:norl: diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt index adc72d1835..ba6dd02a29 100644 --- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -364,4 +364,4 @@ highlighting. So do these: You can find the details in $VIMRUNTIME/syntax/help.vim - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt index 451d525ea8..f05b3bb8ed 100644 --- a/runtime/doc/if_cscop.txt +++ b/runtime/doc/if_cscop.txt @@ -371,4 +371,4 @@ Cscope Home Page (http://cscope.sourceforge.net/): > \:vert scs find a <C-R>=expand("<cword>")<CR><CR> < - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index e33f89e771..dfa1d6e212 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -705,12 +705,31 @@ Raising SystemExit exception in python isn't endorsed way to quit vim, use: > You can test what Python version is available with: > if has('python') echo 'there is Python 2.x' - elseif has('python3') + endif + if has('python3') echo 'there is Python 3.x' endif Note however, that if Python 2 and 3 are both available, but not loaded, these has() calls will try to load them. +To avoid loading the dynamic library, only check if Vim was compiled with +python support: > + if has('python_compiled') + echo 'compiled with Python 2.x support' + if has('python_dynamic') + echo 'Python 2.x dynamically loaded' + endif + endif + if has('python3_compiled') + echo 'compiled with Python 3.x support' + if has('python3_dynamic') + echo 'Python 3.x dynamically loaded' + endif + endif + +This also tells you whether Python is dynamically loaded, which will fail if +the runtime library cannot be found. + ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt index d9dbc685d7..3c7c800fbf 100644 --- a/runtime/doc/if_ruby.txt +++ b/runtime/doc/if_ruby.txt @@ -180,4 +180,4 @@ $curwin The current window object. $curbuf The current buffer object. ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index 7ba5a373dc..e95725920b 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -410,10 +410,10 @@ The examples below assume a 'shiftwidth' of 4. *cino-(* (N When in unclosed parentheses, indent N characters from the line with the unclosed parentheses. Add a 'shiftwidth' for every - unclosed parentheses. When N is 0 or the unclosed parentheses - is the first non-white character in its line, line up with the - next non-white character after the unclosed parentheses. - (default 'shiftwidth' * 2). + extra unclosed parentheses. When N is 0 or the unclosed + parentheses is the first non-white character in its line, line + up with the next non-white character after the unclosed + parentheses. (default 'shiftwidth' * 2). cino= cino=(0 > if (c1 && (c2 || if (c1 && (c2 || @@ -424,7 +424,8 @@ The examples below assume a 'shiftwidth' of 4. { { < *cino-u* - uN Same as (N, but for one level deeper. (default 'shiftwidth'). + uN Same as (N, but for one nesting level deeper. + (default 'shiftwidth'). cino= cino=u2 > if (c123456789 if (c123456789 @@ -902,6 +903,25 @@ In PHP braces are not required inside 'case/default' blocks therefore 'case:' and 'default:' are indented at the same level than the 'switch()' to avoid meaningless indentation. You can use the above option to return to the traditional way. +------------- + + *PHP_noArrowMatching* +By default the indent script will indent multi-line chained calls by matching +the position of the '->': > + + $user_name_very_long->name() + ->age() + ->info(); + +You can revert to the classic way of indenting by setting this option to 1: > + :let g:PHP_noArrowMatching = 1 + +You will obtain the following result: > + + $user_name_very_long->name() + ->age() + ->info(); + PYTHON *ft-python-indent* @@ -1132,4 +1152,4 @@ indent for a continuation line, a line that starts with a backslash: > Three times shiftwidth is the default value. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index f4f43aeac2..ed3f9a1776 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -944,7 +944,7 @@ tag command note action in Visual mode ~ |v_i{| i{ same as iB |v_i}| i} same as iB |v_o| o move cursor to other corner of area -|v_r| r 2 delete highlighted area and start insert +|v_r| r 2 replace highlighted area with a character |v_s| s 2 delete highlighted area and start insert |v_u| u 2 make highlighted area lowercase |v_v| v make Visual mode characterwise or stop @@ -1615,4 +1615,4 @@ tag command action ~ |:~| :~ repeat last ":substitute" - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index ef4e211d16..d42c5082c0 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -410,12 +410,12 @@ An example for using CTRL-G U: > inoremap ( ()<C-G>U<Left> This makes it possible to use the cursor keys in Insert mode, without breaking -the undo sequence and therefore using |.| (redo) will work as expected. -Also entering a text like (with the "(" mapping from above): > +the undo sequence and therefore using |.| (redo) will work as expected. +Also entering a text like (with the "(" mapping from above): Lorem ipsum (dolor -will be repeatable by the |.|to the expected +will be repeatable by using |.| to the expected Lorem ipsum (dolor) @@ -1508,15 +1508,15 @@ that begin with the filetype, "php", in this case. For example these syntax groups are included by default with the PHP: phpEnvVar, phpIntVar, phpFunctions. -If you wish non-filetype syntax items to also be included, you can use a -regular expression syntax (added in version 13.0 of autoload\syntaxcomplete.vim) -to add items. Looking at the output from ":syntax list" while editing a PHP file -I can see some of these entries: > +If you wish non-filetype syntax items to also be included, you can use a +regular expression syntax (added in version 13.0 of +autoload/syntaxcomplete.vim) to add items. Looking at the output from +":syntax list" while editing a PHP file I can see some of these entries: > htmlArg,htmlTag,htmlTagName,javaScriptStatement,javaScriptGlobalObjects To pick up any JavaScript and HTML keyword syntax groups while editing a PHP -file, you can use 3 different regexs, one for each language. Or you can -simply restrict the include groups to a particular value, without using +file, you can use 3 different regexs, one for each language. Or you can +simply restrict the include groups to a particular value, without using a regex string: > let g:omni_syntax_group_include_php = 'php\w\+,javaScript\w\+,html\w\+' let g:omni_syntax_group_include_php = 'phpFunctions,phpMethods' @@ -1529,9 +1529,9 @@ highlight. These items will be available within the omni completion list. Some people may find this list unwieldy or are only interested in certain items. There are two ways to prune this list (if necessary). If you find -certain syntax groups you do not wish displayed you can use two different -methods to identify these groups. The first specifically lists the syntax -groups by name. The second uses a regular expression to identify both +certain syntax groups you do not wish displayed you can use two different +methods to identify these groups. The first specifically lists the syntax +groups by name. The second uses a regular expression to identify both syntax groups. Simply add one the following to your vimrc: > let g:omni_syntax_group_exclude_php = 'phpCoreConstant,phpConstant' let g:omni_syntax_group_exclude_php = 'php\w*Constant' @@ -1554,22 +1554,22 @@ vimrc: > For plugin developers, the plugin exposes a public function OmniSyntaxList. This function can be used to request a List of syntax items. When editing a -SQL file (:e syntax.sql) you can use the ":syntax list" command to see the +SQL file (:e syntax.sql) you can use the ":syntax list" command to see the various groups and syntax items. For example: > - syntax list - -Yields data similar to this: > - sqlOperator xxx some prior all like and any escape exists in is not - or intersect minus between distinct - links to Operator - sqlType xxx varbit varchar nvarchar bigint int uniqueidentifier - date money long tinyint unsigned xml text smalldate - double datetime nchar smallint numeric time bit char - varbinary binary smallmoney - image float integer timestamp real decimal + syntax list + +Yields data similar to this: + sqlOperator xxx some prior all like and any escape exists in is not ~ + or intersect minus between distinct ~ + links to Operator ~ + sqlType xxx varbit varchar nvarchar bigint int uniqueidentifier ~ + date money long tinyint unsigned xml text smalldate ~ + double datetime nchar smallint numeric time bit char ~ + varbinary binary smallmoney ~ + image float integer timestamp real decimal ~ There are two syntax groups listed here: sqlOperator and sqlType. To retrieve -a List of syntax items you can call OmniSyntaxList a number of different +a List of syntax items you can call OmniSyntaxList a number of different ways. To retrieve all syntax items regardless of syntax group: > echo OmniSyntaxList( [] ) @@ -1586,7 +1586,6 @@ From within a plugin, you would typically assign the output to a List: > let myKeywords = [] let myKeywords = OmniSyntaxList( ['sqlKeyword'] ) - SQL *ft-sql-omni* @@ -1973,4 +1972,4 @@ self explanatory. Using the long or the short version depends on the [READ ERRORS] not all of the file could be read - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 443cce98e1..bf2e86ae46 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -559,9 +559,9 @@ Virtual Replace mode Virtual Replace mode is similar to Replace mode, but If the 'showmode' option is on "-- VREPLACE --" is shown at the bottom of the window. -Insert Normal mode Entered when CTRL-O given in Insert mode. This is - like Normal mode, but after executing one command Vim - returns to Insert mode. +Insert Normal mode Entered when CTRL-O is typed in Insert mode (see + |i_CTRL-O|). This is like Normal mode, but after + executing one command Vim returns to Insert mode. If the 'showmode' option is on "-- (insert) --" is shown at the bottom of the window. @@ -838,4 +838,4 @@ buffer lines logical lines window lines screen lines ~ 6. ~ ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 836ac890be..0898dd98b9 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -866,7 +866,9 @@ an additional rule: full-id In front of the match is a non-keyword character, or this is where the line or insertion starts. Exception: When the abbreviation is only one character, it is not recognized if there is a non-keyword - character in front of it, other than a space or a tab. + character in front of it, other than a space or a tab. However, for + the command line "'<,'>" (or any other marks) is ignored, as if the + command line starts after it. end-id In front of the match is a keyword character, or a space or a tab, or this is where the line or insertion starts. @@ -1487,4 +1489,4 @@ local to the script and use mappings local to the script. When the user invokes the user command, it will run in the context of the script it was defined in. This matters if |<SID>| is used in a command. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index d38c4fd019..24d9d01af0 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -1185,4 +1185,4 @@ Contributions specifically for the multi-byte features by: Taro Muraoka <koron@tka.att.ne.jp> Yasuhiro Matsumoto <mattn@mail.goo.ne.jp> - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index 96c28009c4..d52905fc36 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -69,7 +69,7 @@ See `:messages` above. LIST OF MESSAGES *E222* *E228* *E232* *E256* *E293* *E298* *E304* *E317* *E318* *E356* *E438* *E439* *E440* *E316* *E320* *E322* - *E323* *E341* *E473* *E570* *E685* > + *E323* *E341* *E473* *E570* *E685* *E950* > Add to read buffer makemap: Illegal mode Cannot create BalloonEval with both message and callback @@ -90,6 +90,7 @@ LIST OF MESSAGES Internal error Internal error: {function} fatal error in cs_manage_matches + Invalid count for del_bytes(): {N} This is an internal error. If you can reproduce it, please send in a bug report. |bugs| @@ -843,4 +844,4 @@ The |g<| command can be used to see the last page of previous command output. This is especially useful if you accidentally typed <Space> at the hit-enter prompt. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/mlang.txt b/runtime/doc/mlang.txt index 8284d38fa4..a19d9fd2f4 100644 --- a/runtime/doc/mlang.txt +++ b/runtime/doc/mlang.txt @@ -203,4 +203,4 @@ a message adapt to language preferences of the user, > :endif < - vim:tw=78:sw=4:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index 92af525ecf..84867318a4 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -986,12 +986,13 @@ These commands are not marks themselves, but jump to a mark: ============================================================================== 8. Jumps *jump-motions* -A "jump" is one of the following commands: "'", "`", "G", "/", "?", "n", -"N", "%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and -the commands that start editing a new file. If you make the cursor "jump" -with one of these commands, the position of the cursor before the jump is +A "jump" is a command that normally moves the cursor several lines away. If +you make the cursor "jump" the position of the cursor before the jump is remembered. You can return to that position with the "''" and "``" command, -unless the line containing that position was changed or deleted. +unless the line containing that position was changed or deleted. The +following commands are "jump" commands: "'", "`", "G", "/", "?", "n", "N", +"%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and the +commands that start editing a new file. *CTRL-O* CTRL-O Go to [count] Older cursor position in jump list @@ -1117,7 +1118,7 @@ remembered. *:changes* :changes Print the change list. A ">" character indicates the current position. Just after a change it is below the - newest entry, indicating that "g;" takes you to the + newest entry, indicating that `g;` takes you to the newest entry position. The first column indicates the count needed to take you to this position. Example: @@ -1127,8 +1128,8 @@ remembered. 1 14 54 the latest changed line > - The "3g;" command takes you to line 9. Then the - output of ":changes is: + The `3g;` command takes you to line 9. Then the + output of `:changes` is: change line col text ~ > 0 9 8 bla bla bla @@ -1294,4 +1295,4 @@ L To line [count] from bottom of window (default: Last position is in a status line, that window is made the active window and the cursor is not moved. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index bfdc09662e..0076049b94 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -575,8 +575,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'ambiwidth'* *'ambw'* 'ambiwidth' 'ambw' string (default: "single") global - {only available when compiled with the |+multi_byte| - feature} Tells Vim what to do with characters with East Asian Width Class Ambiguous (such as Euro, Registered Sign, Copyright Sign, Greek letters, Cyrillic letters). @@ -611,8 +609,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'autochdir'* *'acd'* *'noautochdir'* *'noacd'* 'autochdir' 'acd' boolean (default off) global - {only available when compiled with it, use - exists("+autochdir") to check} When on, Vim will change the current working directory whenever you open a file, switch buffers, delete a buffer or open/close a window. It will change to the directory containing the file which was opened @@ -679,7 +675,9 @@ A jump table for the options with a short description can be found at |Q_op|. global or local to buffer |global-local| When a file has been detected to have been changed outside of Vim and it has not been changed inside of Vim, automatically read it again. - When the file has been deleted this is not done. |timestamp| + When the file has been deleted this is not done, so you have the text + from before it was deleted. When it appears again then it is read. + |timestamp| If this option has a local value, use this command to switch back to using the global value: > :set autoread< @@ -909,8 +907,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'backupskip'* *'bsk'* 'backupskip' 'bsk' string (default: "/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*") global - {not available when compiled without the |+wildignore| - feature} A list of file patterns. When one of the patterns matches with the name of the file which is written, no backup file is created. Both the specified file name and the full path name of the file are used. @@ -1014,8 +1010,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'bomb'* *'nobomb'* 'bomb' boolean (default off) local to buffer - {only available when compiled with the |+multi_byte| - feature} When writing a file and the following conditions are met, a BOM (Byte Order Mark) is prepended to the file: - this option is on @@ -1035,16 +1029,12 @@ A jump table for the options with a short description can be found at |Q_op|. *'breakat'* *'brk'* 'breakat' 'brk' string (default " ^I!@*-+;:,./?") global - {not available when compiled without the |+linebreak| - feature} This option lets you choose which characters might cause a line break if 'linebreak' is on. Only works for ASCII characters. *'breakindent'* *'bri'* 'breakindent' 'bri' boolean (default off) local to window - {not available when compiled without the |+linebreak| - feature} Every wrapped line will continue visually indented (same amount of space as the beginning of that line), thus preserving horizontal blocks of text. @@ -1052,8 +1042,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'breakindentopt'* *'briopt'* 'breakindentopt' 'briopt' string (default empty) local to window - {not available when compiled without the |+linebreak| - feature} Settings for 'breakindent'. It can consist of the following optional items and must be separated by a comma: min:{n} Minimum text width that will be kept after @@ -1066,14 +1054,13 @@ A jump table for the options with a short description can be found at |Q_op|. characters. It permits dynamic French paragraph indentation (negative) or emphasizing the line continuation (positive). - sbr Display the 'showbreak' value before applying the + sbr Display the 'showbreak' value before applying the additional indent. The default value for min is 20 and shift is 0. *'browsedir'* *'bsdir'* 'browsedir' 'bsdir' string (default: "last") global - {only for Mac and Win32 GUI} Which directory to use for the file browser: last Use same directory as with last file browser, where a file was opened or saved. @@ -1084,8 +1071,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'bufhidden'* *'bh'* 'bufhidden' 'bh' string (default: "") local to buffer - {not available when compiled without the |+quickfix| - feature} This option specifies what happens when a buffer is no longer displayed in a window: <empty> follow the global 'hidden' option @@ -1161,8 +1146,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'casemap'* *'cmp'* 'casemap' 'cmp' string (default: "internal,keepascii") global - {only available when compiled with the |+multi_byte| - feature} Specifies details about changing the case of letters. It may contain these words, separated by a comma: internal Use internal case mapping functions, the current @@ -1176,8 +1159,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'cdpath'* *'cd'* *E344* *E346* 'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,") global - {not available when compiled without the - |+file_in_path| feature} This is a list of directories which will be searched when using the |:cd| and |:lcd| commands, provided that the directory being searched for has a relative path, not an absolute part starting with "/", "./" @@ -1216,8 +1197,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'charconvert'* *'ccv'* *E202* *E214* *E513* 'charconvert' 'ccv' string (default "") global - {only available when compiled with the |+multi_byte| - and |+eval| features} An expression that is used for character encoding conversion. It is evaluated when a file that is to be read or has been written has a different encoding from what is desired. @@ -1335,8 +1314,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'colorcolumn'* *'cc'* 'colorcolumn' 'cc' string (default "") local to window - {not available when compiled without the |+syntax| - feature} 'colorcolumn' is a comma separated list of screen columns that are highlighted with ColorColumn |hl-ColorColumn|. Useful to align text. Will make screen redrawing slower. @@ -1377,8 +1354,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'commentstring'* *'cms'* *E537* 'commentstring' 'cms' string (default "/*%s*/") local to buffer - {not available when compiled without the |+folding| - feature} A template for a comment. The "%s" in the value is replaced with the comment text. Currently only used to add markers for folding, see |fold-marker|. @@ -1421,8 +1396,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'completefunc'* *'cfu'* 'completefunc' 'cfu' string (default: empty) local to buffer - {not available when compiled without the |+eval| - or |+insert_expand| features} This option specifies a function to be used for Insert mode completion with CTRL-X CTRL-U. |i_CTRL-X_CTRL-U| See |complete-functions| for an explanation of how the function is @@ -1433,8 +1406,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'completeopt'* *'cot'* 'completeopt' 'cot' string (default: "menu,preview") global - {not available when compiled without the - |+insert_expand| feature} A comma separated list of options for Insert mode completion |ins-completion|. The supported values are: @@ -1563,10 +1534,10 @@ A jump table for the options with a short description can be found at |Q_op|. See also |map_bar|. *cpo-B* B A backslash has no special meaning in mappings, - abbreviations and the "to" part of the menu commands. - Remove this flag to be able to use a backslash like a - CTRL-V. For example, the command ":map X \<Esc>" - results in X being mapped to: + abbreviations, user commands and the "to" part of the + menu commands. Remove this flag to be able to use a + backslash like a CTRL-V. For example, the command + ":map X \<Esc>" results in X being mapped to: 'B' included: "\^[" (^[ is a real <Esc>) 'B' excluded: "<Esc>" (5 characters) *cpo-c* @@ -1597,7 +1568,7 @@ A jump table for the options with a short description can be found at |Q_op|. *cpo-E* E It is an error when using "y", "d", "c", "g~", "gu" or "gU" on an Empty region. The operators only work when - at least one character is to be operate on. Example: + at least one character is to be operated on. Example: This makes "y0" fail in the first column. *cpo-f* f When included, a ":read" command with a file name @@ -1816,8 +1787,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'cursorcolumn'* *'cuc'* *'nocursorcolumn'* *'nocuc'* 'cursorcolumn' 'cuc' boolean (default off) local to window - {not available when compiled without the |+syntax| - feature} Highlight the screen column of the cursor with CursorColumn |hl-CursorColumn|. Useful to align text. Will make screen redrawing slower. @@ -1830,8 +1799,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'cursorline'* *'cul'* *'nocursorline'* *'nocul'* 'cursorline' 'cul' boolean (default off) local to window - {not available when compiled without the |+syntax| - feature} Highlight the screen line of the cursor with CursorLine |hl-CursorLine|. Useful to easily spot the cursor. Will make screen redrawing slower. @@ -1871,8 +1838,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'delcombine'* *'deco'* *'nodelcombine'* *'nodeco'* 'delcombine' 'deco' boolean (default off) global - {only available when compiled with the |+multi_byte| - feature} If editing Unicode and this option is set, backspace and Normal mode "x" delete each combining character on its own. When it is off (the default) the character along with its combining characters are @@ -1969,8 +1934,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'digraph'* *'dg'* *'nodigraph'* *'nodg'* 'digraph' 'dg' boolean (default off) global - {not available when compiled without the |+digraphs| - feature} Enable the entering of digraphs in Insert mode with {char1} <BS> {char2}. See |digraphs|. @@ -2052,9 +2015,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'emoji'* *'emo'* 'emoji' 'emo' boolean (default: on) global - {not in Vi} - {only available when compiled with the |+multi_byte| - feature} When on all Unicode emoji characters are considered to be full width. @@ -2122,8 +2082,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'errorfile'* *'ef'* 'errorfile' 'ef' string (default: "errors.err") global - {not available when compiled without the |+quickfix| - feature} Name of the errorfile for the QuickFix mode (see |:cf|). When the "-q" command-line argument is used, 'errorfile' is set to the following argument. See |-q|. @@ -2136,8 +2094,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'errorformat'* *'efm'* 'errorformat' 'efm' string (default is very long) global or local to buffer |global-local| - {not available when compiled without the |+quickfix| - feature} Scanf-like description of the format for the lines in the error file (see |errorformat|). @@ -2220,8 +2176,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'fileencodings'* *'fencs'* 'fileencodings' 'fencs' string (default: "ucs-bom,utf-8,default,latin1") global - {only available when compiled with the |+multi_byte| - feature} This is a list of character encodings considered when starting to edit an existing file. When a file is read, Vim tries to use the first mentioned character encoding. If an error is detected, the next one @@ -2378,8 +2332,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'fillchars'* *'fcs'* 'fillchars' 'fcs' string (default "") global - {not available when compiled without the |+windows| - and |+folding| features} Characters to fill the statuslines and vertical separators. It is a comma separated list of items: @@ -2418,7 +2370,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'* 'fixendofline' 'fixeol' boolean (default on) local to buffer - {not in Vi} When writing a file and this option is on, <EOL> at the end of file will be restored if missing. Turn this option off if you want to preserve the situation from the original file. @@ -2436,8 +2387,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldclose'* *'fcl'* 'foldclose' 'fcl' string (default "") global - {not available when compiled without the |+folding| - feature} When set to "all", a fold is closed when the cursor isn't in it and its level is higher than 'foldlevel'. Useful if you want folds to automatically close when moving out of them. @@ -2445,8 +2394,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldcolumn'* *'fdc'* 'foldcolumn' 'fdc' number (default 0) local to window - {not available when compiled without the |+folding| - feature} When non-zero, a column with the specified width is shown at the side of the window which indicates open and closed folds. The maximum value is 12. @@ -2455,8 +2402,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldenable'* *'fen'* *'nofoldenable'* *'nofen'* 'foldenable' 'fen' boolean (default on) local to window - {not available when compiled without the |+folding| - feature} When off, all folds are open. This option can be used to quickly switch between showing all text unfolded and viewing the text with folds (including manually opened or closed folds). It can be toggled @@ -2468,8 +2413,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldexpr'* *'fde'* 'foldexpr' 'fde' string (default: "0") local to window - {not available when compiled without the |+folding| - or |+eval| features} The expression used for when 'foldmethod' is "expr". It is evaluated for each line to obtain its fold level. See |fold-expr|. @@ -2484,8 +2427,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldignore'* *'fdi'* 'foldignore' 'fdi' string (default: "#") local to window - {not available when compiled without the |+folding| - feature} Used only when 'foldmethod' is "indent". Lines starting with characters in 'foldignore' will get their fold level from surrounding lines. White space is skipped before checking for this character. @@ -2494,8 +2435,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldlevel'* *'fdl'* 'foldlevel' 'fdl' number (default: 0) local to window - {not available when compiled without the |+folding| - feature} Sets the fold level: Folds with a higher level will be closed. Setting this option to zero will close all folds. Higher numbers will close fewer folds. @@ -2505,8 +2444,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldlevelstart'* *'fdls'* 'foldlevelstart' 'fdls' number (default: -1) global - {not available when compiled without the |+folding| - feature} Sets 'foldlevel' when starting to edit another buffer in a window. Useful to always start editing with all folds closed (value zero), some folds closed (one) or no folds closed (99). @@ -2520,8 +2457,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldmarker'* *'fmr'* *E536* 'foldmarker' 'fmr' string (default: "{{{,}}}") local to window - {not available when compiled without the |+folding| - feature} The start and end marker used when 'foldmethod' is "marker". There must be one comma, which separates the start and end marker. The marker is a literal string (a regular expression would be too slow). @@ -2530,8 +2465,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldmethod'* *'fdm'* 'foldmethod' 'fdm' string (default: "manual") local to window - {not available when compiled without the |+folding| - feature} The kind of folding used for the current window. Possible values: |fold-manual| manual Folds are created manually. |fold-indent| indent Lines with equal indent form a fold. @@ -2543,8 +2476,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldminlines'* *'fml'* 'foldminlines' 'fml' number (default: 1) local to window - {not available when compiled without the |+folding| - feature} Sets the number of screen lines above which a fold can be displayed closed. Also for manually closed folds. With the default value of one a fold can only be closed if it takes up two or more screen lines. @@ -2556,8 +2487,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldnestmax'* *'fdn'* 'foldnestmax' 'fdn' number (default: 20) local to window - {not available when compiled without the |+folding| - feature} Sets the maximum nesting of folds for the "indent" and "syntax" methods. This avoids that too many folds will be created. Using more than 20 doesn't work, because the internal limit is 20. @@ -2566,8 +2495,6 @@ A jump table for the options with a short description can be found at |Q_op|. 'foldopen' 'fdo' string (default: "block,hor,mark,percent,quickfix, search,tag,undo") global - {not available when compiled without the |+folding| - feature} Specifies for which type of commands folds will be opened, if the command moves the cursor into a closed fold. It is a comma separated list of items. @@ -2602,8 +2529,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'foldtext'* *'fdt'* 'foldtext' 'fdt' string (default: "foldtext()") local to window - {not available when compiled without the |+folding| - feature} An expression which is used to specify the text displayed for a closed fold. See |fold-foldtext|. @@ -2616,8 +2541,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'formatexpr'* *'fex'* 'formatexpr' 'fex' string (default "") local to buffer - {not available when compiled without the |+eval| - feature} Expression which is evaluated to format a range of lines for the |gq| operator or automatic formatting (see 'formatoptions'). When this option is empty 'formatprg' is used. @@ -2829,7 +2752,6 @@ A jump table for the options with a short description can be found at |Q_op|. *E235* *E596* 'guifont' 'gfn' string (default "") global - {only available when compiled with GUI enabled} This is a list of fonts which will be used for the GUI version of Vim. In its simplest form the value is just one font name. When the font cannot be found you will get an error message. To try other @@ -2896,8 +2818,6 @@ A jump table for the options with a short description can be found at |Q_op|. *E250* *E252* *E234* *E597* *E598* 'guifontset' 'gfs' string (default "") global - {only available when compiled with GUI enabled and - with the |+xfontset| feature} When not empty, specifies two (or more) fonts to be used. The first one for normal English, the second one for your special language. See |xfontset|. @@ -2918,7 +2838,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'guifontwide'* *'gfw'* *E231* *E533* *E534* 'guifontwide' 'gfw' string (default "") global - {only available when compiled with GUI enabled} When not empty, specifies a comma-separated list of fonts to be used for double-width characters. The first font that can be loaded is used. @@ -2937,7 +2856,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'guioptions'* *'go'* 'guioptions' 'go' string (default "egmrLT" (MS-Windows)) global - {only available when compiled with GUI enabled} This option only has an effect in the GUI version of Vim. It is a sequence of letters which describes what components and options of the GUI should be used. @@ -3033,8 +2951,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'guitablabel'* *'gtl'* 'guitablabel' 'gtl' string (default empty) global - {only available when compiled with GUI enabled and - with the |+windows| feature} When nonempty describes the text to use in a label of the GUI tab pages line. When empty and when the result is empty Vim will use a default label. See |setting-guitablabel| for more info. @@ -3051,8 +2967,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'guitabtooltip'* *'gtt'* 'guitabtooltip' 'gtt' string (default empty) global - {only available when compiled with GUI enabled and - with the |+windows| feature} When nonempty describes the text to use in a tooltip for the GUI tab pages line. When empty Vim will use a default tooltip. This option is otherwise just like 'guitablabel' above. @@ -3077,8 +2991,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'helpheight'* *'hh'* 'helpheight' 'hh' number (default 20) global - {not available when compiled without the |+windows| - feature} Minimal initial height of the help window when it is opened with the ":help" command. The initial height of the help window is half of the current window, or (when the 'ea' option is on) the same as other @@ -3088,8 +3000,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'helplang'* *'hlg'* 'helplang' 'hlg' string (default: messages language or empty) global - {only available when compiled with the |+multi_lang| - feature} Comma separated list of languages. Vim will use the first language for which the desired help can be found. The English help will always be used as a last resort. You can add "en" to prefer English over @@ -3143,8 +3053,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'* 'hlsearch' 'hls' boolean (default on) global - {not available when compiled without the - |+extra_search| feature} When there is a previous search pattern, highlight all its matches. The |hl-Search| highlight group determines the highlighting. Note that only the matching text is highlighted, any offsets are not applied. @@ -3164,8 +3072,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'icon'* *'noicon'* 'icon' boolean (default off, on when title can be restored) global - {not available when compiled without the |+title| - feature} When on, the icon text of the window will be set to the value of 'iconstring' (if it is not empty), or to the name of the file currently being edited. Only the last part of the name is used. @@ -3175,15 +3081,12 @@ A jump table for the options with a short description can be found at |Q_op|. *'iconstring'* 'iconstring' string (default "") global - {not available when compiled without the |+title| - feature} When this option is not empty, it will be used for the icon text of the window. This happens only when the 'icon' option is on. Only works if the terminal supports setting window icon text When this option contains printf-style '%' items, they will be expanded according to the rules used for 'statusline'. See 'titlestring' for example settings. - {not available when compiled without the |+statusline| feature} *'ignorecase'* *'ic'* *'noignorecase'* *'noic'* 'ignorecase' 'ic' boolean (default off) @@ -3197,8 +3100,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'imcmdline'* *'imc'* *'noimcmdline'* *'noimc'* 'imcmdline' 'imc' boolean (default off) global - {only available when compiled with the |+xim|, - |+multi_byte_ime| or |global-ime| features} When set the Input Method is always on when starting to edit a command line, unless entering a search pattern (see 'imsearch' for that). Setting this option is useful when your input method allows entering @@ -3208,8 +3109,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'imdisable'* *'imd'* *'noimdisable'* *'noimd'* 'imdisable' 'imd' boolean (default off, on for some systems (SGI)) global - {only available when compiled with the |+xim|, - |+multi_byte_ime| or |global-ime| features} When set the Input Method is never used. This is useful to disable the IM when it doesn't work properly. Currently this option is on by default for SGI/IRIX machines. This @@ -3265,8 +3164,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'include'* *'inc'* 'include' 'inc' string (default "^\s*#\s*include") global or local to buffer |global-local| - {not available when compiled without the - |+find_in_path| feature} Pattern to be used to find an include command. It is a search pattern, just like for the "/" command (See |pattern|). The default value is for C programs. This option is used for the commands "[i", @@ -3282,8 +3179,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'includeexpr'* *'inex'* 'includeexpr' 'inex' string (default "") local to buffer - {not available when compiled without the - |+find_in_path| or |+eval| features} Expression to be used to transform the string found with the 'include' option to a file name. Mostly useful to change "." to "/" for Java: > :set includeexpr=substitute(v:fname,'\\.','/','g') @@ -3306,6 +3201,7 @@ A jump table for the options with a short description can be found at |Q_op|. so far, matches. The matched string is highlighted. If the pattern is invalid or not found, nothing is shown. The screen will be updated often, this is only useful on fast terminals. + Also applies to the `:s`, `:g` and `:v` commands. Note that the match will be shown, but the cursor will return to its original position when no match is found and when pressing <Esc>. You still need to finish the search command with <Enter> to move the @@ -3318,9 +3214,9 @@ A jump table for the options with a short description can be found at |Q_op|. The |hl-IncSearch| highlight group determines the highlighting. When 'hlsearch' is on, all matched strings are highlighted too while typing a search command. See also: 'hlsearch'. - If you don't want turn 'hlsearch' on, but want to highlight all matches - while searching, you can turn on and off 'hlsearch' with autocmd. - Example: > + If you don't want to turn 'hlsearch' on, but want to highlight all + matches while searching, you can turn on and off 'hlsearch' with + autocmd. Example: > augroup vimrc-incsearch-highlight autocmd! autocmd CmdlineEnter /,\? :set hlsearch @@ -3533,8 +3429,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'keymap'* *'kmp'* *E544* 'keymap' 'kmp' string (default "") local to buffer - {only available when compiled with the |+keymap| - feature} Name of a keyboard mapping. See |mbyte-keymap|. Setting this option to a valid keymap name has the side effect of setting 'iminsert' to one, so that the keymap becomes effective. @@ -3575,8 +3469,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'langmap'* *'lmap'* *E357* *E358* 'langmap' 'lmap' string (default "") global - {only available when compiled with the |+langmap| - feature} This option allows switching your keyboard into a special language mode. When you are typing text in Insert mode the characters are inserted directly. When in Normal mode the 'langmap' option takes @@ -3620,8 +3512,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'langmenu'* *'lm'* 'langmenu' 'lm' string (default "") global - {only available when compiled with the |+menu| and - |+multi_lang| features} Language to use for menu translation. Tells which file is loaded from the "lang" directory in 'runtimepath': > "lang/menu_" . &langmenu . ".vim" @@ -3670,8 +3560,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'linebreak'* *'lbr'* *'nolinebreak'* *'nolbr'* 'linebreak' 'lbr' boolean (default off) local to window - {not available when compiled without the |+linebreak| - feature} If on, Vim will wrap long lines at a character in 'breakat' rather than at the last character that fits on the screen. Unlike 'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file, @@ -3711,8 +3599,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'lisp'* *'nolisp'* 'lisp' boolean (default off) local to buffer - {not available when compiled without the |+lispindent| - feature} Lisp mode: When <Enter> is typed in insert mode set the indent for the next line to Lisp standards (well, sort of). Also happens with "cc" or "S". 'autoindent' must also be on for this to work. The 'p' @@ -3726,8 +3612,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'lispwords'* *'lw'* 'lispwords' 'lw' string (default is very long) global or local to buffer |global-local| - {not available when compiled without the |+lispindent| - feature} Comma separated list of words that influence the Lisp indenting. |'lisp'| @@ -3820,8 +3704,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'makeef'* *'mef'* 'makeef' 'mef' string (default: "") global - {not available when compiled without the |+quickfix| - feature} Name of the errorfile for the |:make| command (see |:make_makeprg|) and the |:grep| command. When it is empty, an internally generated temp file will be used. @@ -3837,9 +3719,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'makeencoding'* *'menc'* 'makeencoding' 'menc' string (default "") global or local to buffer |global-local| - {only available when compiled with the |+multi_byte| - feature} - {not in Vi} Encoding used for reading the output of external commands. When empty, encoding is not converted. This is used for `:make`, `:lmake`, `:grep`, `:lgrep`, `:grepadd`, @@ -3905,14 +3784,12 @@ A jump table for the options with a short description can be found at |Q_op|. *'maxfuncdepth'* *'mfd'* 'maxfuncdepth' 'mfd' number (default 100) global - {not available when compiled without the |+eval| - feature} Maximum depth of function calls for user functions. This normally catches endless recursion. When using a recursive function with more depth, set 'maxfuncdepth' to a bigger number. But this will use more memory, there is the danger of failing when memory is exhausted. Increasing this limit above 200 also changes the maximum for Ex - command resursion, see |E169|. + command recursion, see |E169|. See also |:function|. *'maxmapdepth'* *'mmd'* *E223* @@ -3935,13 +3812,14 @@ A jump table for the options with a short description can be found at |Q_op|. Running into the limit often means that the pattern is very inefficient or too complex. This may already happen with the pattern "\(.\)*" on a very long line. ".*" works much better. - Vim may run out of memory before hitting the 'maxmempattern' limit. + Might also happen on redraw, when syntax rules try to match a complex + text structure. + Vim may run out of memory before hitting the 'maxmempattern' limit, in + which case you get an "Out of memory" error instead. *'menuitems'* *'mis'* 'menuitems' 'mis' number (default 25) global - {not available when compiled without the |+menu| - feature} Maximum number of items to use in a menu. Used for menus that are generated from a list of items, e.g., the Buffers menu. Changing this option has no direct effect, the menu must be refreshed first. @@ -3949,8 +3827,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'mkspellmem'* *'msm'* 'mkspellmem' 'msm' string (default "460000,2000,500") global - {not available when compiled without the |+syntax| - feature} Parameters for |:mkspell|. This tunes when to start compressing the word tree. Compression can be slow when there are many words, but it's needed to avoid running out of memory. The amount of memory used @@ -4024,6 +3900,8 @@ A jump table for the options with a short description can be found at |Q_op|. an explanation. When 'buftype' is "nowrite" or "nofile" this option may be set, but will be ignored. + Note that the text may actually be the same, e.g. 'modified' is set + when using "rA" on an "A". *'more'* *'nomore'* 'more' boolean (Vim default: on, Vi default: off) @@ -4133,6 +4011,8 @@ A jump table for the options with a short description can be found at |Q_op|. In the "popup" model the right mouse button produces a pop-up menu. You need to define this first, see |popup-menu|. + In a terminal the popup menu works if Vim is compiled with the + |+insert_expand| option. Note that you can further refine the meaning of buttons with mappings. See |mouse-overview|. But mappings are NOT used for modeless selection. @@ -4162,8 +4042,6 @@ A jump table for the options with a short description can be found at |Q_op|. 'mouseshape' 'mouses' string (default "i:beam,r:beam,s:updown,sd:cross, m:no,ml:up-arrow,v:rightup-arrow") global - {only available when compiled with the |+mouseshape| - feature} This option tells Vim what the mouse pointer should look like in different modes. The option is a comma separated list of parts, much like used for 'guicursor'. Each part consist of a mode/location-list @@ -4277,8 +4155,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'numberwidth'* *'nuw'* 'numberwidth' 'nuw' number (Vim default: 4 Vi default: 8) local to window - {only available when compiled with the |+linebreak| - feature} Minimal number of columns to use for the line number. Only relevant when the 'number' or 'relativenumber' option is set or printing lines with a line number. Since one space is always between the number and @@ -4293,8 +4169,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'omnifunc'* *'ofu'* 'omnifunc' 'ofu' string (default: empty) local to buffer - {not available when compiled without the |+eval| - or |+insert_expand| features} This option specifies a function to be used for Insert mode omni completion with CTRL-X CTRL-O. |i_CTRL-X_CTRL-O| See |complete-functions| for an explanation of how the function is @@ -4327,7 +4201,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'packpath'* *'pp'* 'packpath' 'pp' string (default: see 'runtimepath') - {not in Vi} Directories used to find packages. See |packages|. @@ -4422,11 +4295,11 @@ A jump table for the options with a short description can be found at |Q_op|. copy of the original file will be kept. The name of the copy is the name of the original file with the string in the 'patchmode' option appended. This option should start with a dot. Use a string like - ".org". 'backupdir' must not be empty for this to work (Detail: The - backup file is renamed to the patchmode file after the new file has - been successfully written, that's why it must be possible to write a - backup file). If there was no file to be backed up, an empty file is - created. + ".orig" or ".org". 'backupdir' must not be empty for this to work + (Detail: The backup file is renamed to the patchmode file after the + new file has been successfully written, that's why it must be possible + to write a backup file). If there was no file to be backed up, an + empty file is created. When the 'backupskip' pattern matches, a patchmode file is not made. Using 'patchmode' for compressed files appends the extension at the end (e.g., "file.gz.orig"), thus the resulting name isn't always @@ -4462,7 +4335,6 @@ A jump table for the options with a short description can be found at |Q_op|. "http://www.vim.org" will make ":find index.html" work. - Search upwards and downwards in a directory tree using "*", "**" and ";". See |file-searching| for info and syntax. - {not available when compiled without the |+path_extra| feature} - Careful with '\' characters, type two to get one in the option: > :set path=.,c:\\include < Or just use '/' instead: > @@ -4505,8 +4377,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'previewheight'* *'pvh'* 'previewheight' 'pvh' number (default 12) global - {not available when compiled without the |+windows| or - |+quickfix| features} Default height for a preview window. Used for |:ptag| and associated commands. Used for |CTRL-W_}| when no count is given. @@ -4514,8 +4384,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'pvw'* *'nopvw'* *E590* 'previewwindow' 'pvw' boolean (default off) local to window - {not available when compiled without the |+windows| or - |+quickfix| features} Identifies the preview window. Only one window can have this option set. It's normally not set directly, but by using one of the commands |:ptag|, |:pedit|, etc. @@ -4523,8 +4391,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'printdevice'* *'pdev'* 'printdevice' 'pdev' string (default empty) global - {only available when compiled with the |+printer| - feature} The name of the printer to be used for |:hardcopy|. See |pdev-option|. This option cannot be set from a |modeline| or in the |sandbox|, for @@ -4533,16 +4399,12 @@ A jump table for the options with a short description can be found at |Q_op|. *'printencoding'* *'penc'* 'printencoding' 'penc' String (default empty, except for some systems) global - {only available when compiled with the |+printer| - and |+postscript| features} Sets the character encoding used when printing. See |penc-option|. *'printexpr'* *'pexpr'* 'printexpr' 'pexpr' String (default: see below) global - {only available when compiled with the |+printer| - and |+postscript| features} Expression used to print the PostScript produced with |:hardcopy|. See |pexpr-option|. This option cannot be set from a |modeline| or in the |sandbox|, for @@ -4551,39 +4413,30 @@ A jump table for the options with a short description can be found at |Q_op|. *'printfont'* *'pfn'* 'printfont' 'pfn' string (default "courier") global - {only available when compiled with the |+printer| - feature} The name of the font that will be used for |:hardcopy|. See |pfn-option|. *'printheader'* *'pheader'* 'printheader' 'pheader' string (default "%<%f%h%m%=Page %N") global - {only available when compiled with the |+printer| - feature} The format of the header produced in |:hardcopy| output. See |pheader-option|. *'printmbcharset'* *'pmbcs'* 'printmbcharset' 'pmbcs' string (default "") global - {only available when compiled with the |+printer|, - |+postscript| and |+multi_byte| features} The CJK character set to be used for CJK output from |:hardcopy|. See |pmbcs-option|. *'printmbfont'* *'pmbfn'* 'printmbfont' 'pmbfn' string (default "") global - {only available when compiled with the |+printer|, - |+postscript| and |+multi_byte| features} List of font names to be used for CJK output from |:hardcopy|. See |pmbfn-option|. *'printoptions'* *'popt'* 'printoptions' 'popt' string (default "") global - {only available when compiled with |+printer| feature} List of items that control the format of the output of |:hardcopy|. See |popt-option|. @@ -4595,8 +4448,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'pumheight'* *'ph'* 'pumheight' 'ph' number (default 0) global - {not available when compiled without the - |+insert_expand| feature} Determines the maximum number of items to show in the popup menu for Insert mode completion. When zero as much space as available is used. |ins-completion-menu|. @@ -4626,8 +4477,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'redrawtime'* *'rdt'* 'redrawtime' 'rdt' number (default 2000) global - {only available when compiled with the |+reltime| - feature} Time in milliseconds for redrawing the display. Applies to 'hlsearch', 'inccommand' and |:match| highlighting. When redrawing takes more than this many milliseconds no further @@ -4751,8 +4600,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'rulerformat'* *'ruf'* 'rulerformat' 'ruf' string (default empty) global - {not available when compiled without the |+statusline| - feature} When this option is not empty, it determines the content of the ruler string, as displayed for the 'ruler' option. The format of this option is like that of 'statusline'. @@ -4841,6 +4688,8 @@ A jump table for the options with a short description can be found at |Q_op|. to find files which replace a distributed runtime files. You can put a directory after $VIMRUNTIME to find files which add to distributed runtime files. + When Vim is started with |--clean| the home directory entries are not + included. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. @@ -4866,8 +4715,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'scrollbind'* *'scb'* *'noscrollbind'* *'noscb'* 'scrollbind' 'scb' boolean (default off) local to window - {not available when compiled without the |+scrollbind| - feature} See also |scroll-binding|. When this option is set, the current window scrolls as other scrollbind windows (windows that also have this option set) scroll. This option is useful for viewing the @@ -4901,8 +4748,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'scrollopt'* *'sbo'* 'scrollopt' 'sbo' string (default "ver,jump") global - {not available when compiled without the |+scrollbind| - feature} This is a comma-separated list of words that specifies how 'scrollbind' windows should behave. 'sbo' stands for ScrollBind Options. @@ -5019,6 +4864,8 @@ A jump table for the options with a short description can be found at |Q_op|. tabpages all tab pages; without this only the current tab page is restored, so that you can make a session for each tab page separately + terminal include terminal windows where the command can be + restored unix with Unix end-of-line format (single <NL>), even when on Windows or DOS winpos position of the whole Vim window @@ -5400,8 +5247,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'showbreak'* *'sbr'* *E595* 'showbreak' 'sbr' string (default "") global - {not available when compiled without the |+linebreak| - feature} String to put at the start of lines that have been wrapped. Useful values are "> " or "+++ ": > :set showbreak=>\ @@ -5471,8 +5316,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'showtabline'* *'stal'* 'showtabline' 'stal' number (default 1) global - {not available when compiled without the |+windows| - feature} The value of this option specifies when the line with tab page labels will be displayed: 0: never @@ -5532,8 +5375,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'smartindent'* *'si'* *'nosmartindent'* *'nosi'* 'smartindent' 'si' boolean (default off) local to buffer - {not available when compiled without the - |+smartindent| feature} Do smart autoindenting when starting a new line. Works for C-like programs, but can also be used for other languages. 'cindent' does something like this, works better in most cases, but is more strict, @@ -5593,16 +5434,12 @@ A jump table for the options with a short description can be found at |Q_op|. *'spell'* *'nospell'* 'spell' boolean (default off) local to window - {not available when compiled without the |+syntax| - feature} When on spell checking will be done. See |spell|. The languages are specified with 'spelllang'. *'spellcapcheck'* *'spc'* 'spellcapcheck' 'spc' string (default "[.?!]\_[\])'" \t]\+") local to buffer - {not available when compiled without the |+syntax| - feature} Pattern to locate the end of a sentence. The following word will be checked to start with a capital letter. If not then it is highlighted with SpellCap |hl-SpellCap| (unless the word is also badly spelled). @@ -5616,8 +5453,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'spellfile'* *'spf'* 'spellfile' 'spf' string (default empty) local to buffer - {not available when compiled without the |+syntax| - feature} Name of the word list file where words are added for the |zg| and |zw| commands. It must end in ".{encoding}.add". You need to include the path, otherwise the file is placed in the current directory. @@ -5642,8 +5477,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'spelllang'* *'spl'* 'spelllang' 'spl' string (default "en") local to buffer - {not available when compiled without the |+syntax| - feature} A comma separated list of word list names. When the 'spell' option is on spellchecking will be done for these languages. Example: > set spelllang=en_us,nl,medical @@ -5682,8 +5515,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'spellsuggest'* *'sps'* 'spellsuggest' 'sps' string (default "best") global - {not available when compiled without the |+syntax| - feature} Methods used for spelling suggestions. Both for the |z=| command and the |spellsuggest()| function. This is a comma-separated list of items: @@ -5747,8 +5578,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'* 'splitbelow' 'sb' boolean (default off) global - {not available when compiled without the |+windows| - feature} When on, splitting a window will put the new window below the current one. |:split| @@ -5774,8 +5603,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'statusline'* *'stl'* *E540* *E542* 'statusline' 'stl' string (default empty) global or local to window |global-local| - {not available when compiled without the |+statusline| - feature} When nonempty, this option determines the content of the status line. Also see |status-line|. @@ -5922,7 +5749,7 @@ A jump table for the options with a short description can be found at |Q_op|. line is displayed. The current buffer and current window will be set temporarily to that of the window (and buffer) whose statusline is currently being drawn. The expression will evaluate in this context. - The variable "actual_curbuf" is set to the 'bufnr()' number of the + The variable "g:actual_curbuf" is set to the `bufnr()` number of the real current buffer. The 'statusline' option will be evaluated in the |sandbox| if set from @@ -5980,8 +5807,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'suffixesadd'* *'sua'* 'suffixesadd' 'sua' string (default "") local to buffer - {not available when compiled without the - |+file_in_path| feature} Comma separated list of suffixes, which are used when searching for a file for the "gf", "[I", etc. commands. Example: > :set suffixesadd=.java @@ -6003,6 +5828,7 @@ A jump table for the options with a short description can be found at |Q_op|. Also see |swap-file|. If you want to open a new buffer without creating a swap file for it, use the |:noswapfile| modifier. + See 'directory' for where the swap file is created. This option is used together with 'bufhidden' and 'buftype' to specify special kinds of buffers. See |special-buffers|. @@ -6031,8 +5857,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'synmaxcol'* *'smc'* 'synmaxcol' 'smc' number (default 3000) local to buffer - {not available when compiled without the |+syntax| - feature} Maximum column in which to search for syntax items. In long lines the text after this column is not highlighted and following lines may not be highlighted correctly, because the syntax state is cleared. @@ -6043,8 +5867,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'syntax'* *'syn'* 'syntax' 'syn' string (default empty) local to buffer - {not available when compiled without the |+syntax| - feature} When this option is set, the syntax with this name is loaded, unless syntax highlighting has been switched off with ":syntax off". Otherwise this option does not always reflect the current syntax (the @@ -6072,8 +5894,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'tabline'* *'tal'* 'tabline' 'tal' string (default empty) global - {not available when compiled without the |+windows| - feature} When nonempty, this option determines the content of the tab pages line at the top of the Vim window. When empty Vim will use a default tab pages line. See |setting-tabline| for more info. @@ -6095,8 +5915,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'tabpagemax'* *'tpm'* 'tabpagemax' 'tpm' number (default 50) global - {not available when compiled without the |+windows| - feature} Maximum number of tab pages to be opened by the |-p| command line argument or the ":tab all" command. |tabpage| @@ -6182,7 +6000,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'tagcase'* *'tc'* 'tagcase' 'tc' string (default "followic") global or local to buffer |global-local| - {not in Vi} This option specifies how case is handled when searching the tags file: followic Follow the 'ignorecase' option @@ -6216,8 +6033,7 @@ A jump table for the options with a short description can be found at |Q_op|. a directory tree. See |file-searching|. E.g., "/lib/**/tags" will find all files named "tags" below "/lib". The filename itself cannot contain wildcards, it is used as-is. E.g., "/lib/**/tags?" will find - files called "tags?". {not available when compiled without the - |+path_extra| feature} + files called "tags?". The |tagfiles()| function can be used to get a list of the file names actually used. The use of |:set+=| and |:set-=| is preferred when adding or removing @@ -6284,7 +6100,7 @@ A jump table for the options with a short description can be found at |Q_op|. non-keyword characters (white space is preferred). Maximum line length is 510 bytes. To obtain a file to be used here, check out this ftp site: - [Sorry this link doesn't work anymore, do you know the right one?] + [Sorry this link doesn't work anymore, do you know the right one?] ftp://ftp.ox.ac.uk/pub/wordlists/ First get the README file. To include a comma in a file name precede it with a backslash. Spaces after a comma are ignored, otherwise spaces are included in the file @@ -6382,7 +6198,6 @@ A jump table for the options with a short description can be found at |Q_op|. separating space only when needed. NOTE: Use of special characters in 'titlestring' may cause the display to be garbled (e.g., when it contains a CR or NL character). - {not available when compiled without the |+statusline| feature} *'ttyfast'* *'tf'* *'nottyfast'* *'notf'* 'ttyfast' 'tf' Removed. |vim-differences| {Nvim} @@ -6390,7 +6205,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'undodir'* *'udir'* *E5003* 'undodir' 'udir' string (default "$XDG_DATA_HOME/nvim/undo") global - {only when compiled with the |+persistent_undo| feature} List of directory names for undo files, separated with commas. See |'backupdir'| for details of the format. "." means using the directory of the file. The undo file name for @@ -6409,7 +6223,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'undofile'* *'noundofile'* *'udf'* *'noudf'* 'undofile' 'udf' boolean (default off) local to buffer - {only when compiled with the |+persistent_undo| feature} When on, Vim automatically saves undo history to an undo file when writing a buffer to a file, and restores undo history from the same file on buffer read. @@ -6513,8 +6326,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'viewdir'* *'vdir'* 'viewdir' 'vdir' string (default: "$XDG_DATA_HOME/nvim/view") global - {not available when compiled without the |+mksession| - feature} Name of the directory where to store files for |:mkview|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. @@ -6522,8 +6333,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'viewoptions'* *'vop'* 'viewoptions' 'vop' string (default: "folds,options,cursor,curdir") global - {not available when compiled without the |+mksession| - feature} Changes the effect of the |:mkview| command. It is a comma separated list of words. Each word enables saving and restoring something: word save and restore ~ @@ -6546,8 +6355,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'virtualedit'* *'ve'* 'virtualedit' 've' string (default "") global - {not available when compiled without the - |+virtualedit| feature} A comma separated list of these words: block Allow virtual editing in Visual block mode. insert Allow virtual editing in Insert mode. @@ -6638,8 +6445,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'wildignore'* *'wig'* 'wildignore' 'wig' string (default "") global - {not available when compiled without the |+wildignore| - feature} A list of file patterns. A file that matches with one of these patterns is ignored when expanding |wildcards|, completing file or directory names, and influences the result of |expand()|, |glob()| and @@ -6665,8 +6470,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'* 'wildmenu' 'wmnu' boolean (default on) global - {not available if compiled without the |+wildmenu| - feature} When 'wildmenu' is on, command-line completion operates in an enhanced mode. On pressing 'wildchar' (usually <Tab>) to invoke completion, the possible matches are shown just above the command line, with the @@ -6742,8 +6545,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'wildoptions'* *'wop'* 'wildoptions' 'wop' string (default "") global - {not available when compiled without the |+wildignore| - feature} A list of words that change how command line completion is done. Currently only one word is allowed: tagfile When using CTRL-D to list matching tags, the kind of @@ -6789,8 +6590,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'winheight'* *'wh'* *E591* 'winheight' 'wh' number (default 1) global - {not available when compiled without the |+windows| - feature} Minimal number of lines for the current window. This is not a hard minimum, Vim will use fewer lines if there is not enough room. If the focus goes to a window that is smaller, its size is increased, at the @@ -6829,8 +6628,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'* 'winfixheight' 'wfh' boolean (default off) local to window - {not available when compiled without the |+windows| - feature} Keep the window height when windows are opened or closed and 'equalalways' is set. Also for |CTRL-W_=|. Set by default for the |preview-window| and |quickfix-window|. @@ -6839,8 +6636,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'* 'winfixwidth' 'wfw' boolean (default off) local to window - {not available when compiled without the |+windows| - feature} Keep the window width when windows are opened or closed and 'equalalways' is set. Also for |CTRL-W_=|. The width may be changed anyway when running out of room. @@ -6848,8 +6643,6 @@ A jump table for the options with a short description can be found at |Q_op|. *'winminheight'* *'wmh'* 'winminheight' 'wmh' number (default 1) global - {not available when compiled without the |+windows| - feature} The minimal height of a window, when it's not the current window. This is a hard minimum, windows will never become smaller. When set to zero, windows may be "squashed" to zero lines (i.e. just a @@ -6960,4 +6753,4 @@ A jump table for the options with a short description can be found at |Q_op|. When negative, all redrawn characters cause a delay, even if the character already was displayed by the UI. For debugging purposes. - vim:tw=78:ts=8:ft=help:noet:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index cc485b655d..88b7f65209 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -282,6 +282,14 @@ the "#" is under your left hand middle finger (search to the left and up) and the "*" is under your right hand middle finger (search to the right and down). (this depends on your keyboard layout though). + *E956* +In very rare cases a regular expression is used recursively. This can happen +when executing a pattern takes a long time and when checkig for messages on +channels a callback is invoked that also uses a pattern or an autocommand is +triggered. In most cases this should be fine, but if a pattern is in use when +it's used again it fails. Usually this means there is something wrong with +the pattern. + ============================================================================== 2. The definition of a pattern *search-pattern* *pattern* *[pattern]* *regular-expression* *regexp* *Pattern* @@ -888,7 +896,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on): becomes invalid. Vim doesn't automatically update the matches. Similar to moving the cursor for "\%#" |/\%#|. - */\%l* */\%>l* */\%<l* + */\%l* */\%>l* */\%<l* *E951* \%23l Matches in a specific line. \%<23l Matches above a specific line (lower line number). \%>23l Matches below a specific line (higher line number). @@ -1148,7 +1156,8 @@ x A single character, with no special meaning, matches itself - Matching with a collection can be slow, because each character in the text has to be compared with each character in the collection. Use one of the other atoms above when possible. Example: "\d" is - much faster than "[0-9]" and matches the same characters. + much faster than "[0-9]" and matches the same characters. However, + the new |NFA| regexp engine deals with this better than the old one. */\%[]* *E69* *E70* *E369* \%[] A sequence of optionally matched atoms. This always matches. @@ -1390,4 +1399,4 @@ Finally, these constructs are unique to Perl: ":2match" for another plugin. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/pi_gzip.txt b/runtime/doc/pi_gzip.txt index f024db1260..0363a8e34a 100644 --- a/runtime/doc/pi_gzip.txt +++ b/runtime/doc/pi_gzip.txt @@ -38,4 +38,4 @@ compression. Thus editing the patchmode file will not give you the automatic decompression. You have to rename the file if you want this. ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index b41629c0f0..a0e071d4dd 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -4098,4 +4098,4 @@ netrw: ============================================================================== Modelines: {{{1 - vim:tw=78:ts=8:ft=help:norl:fdm=marker + vim:tw=78:ts=8:noet:ft=help:norl:fdm=marker diff --git a/runtime/doc/pi_paren.txt b/runtime/doc/pi_paren.txt index 4b425c6cbb..77083362da 100644 --- a/runtime/doc/pi_paren.txt +++ b/runtime/doc/pi_paren.txt @@ -56,4 +56,4 @@ used. This plugin also helps to skip matches in comments. This is unrelated to the matchparen highlighting, they use a different mechanism. ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/pi_spec.txt b/runtime/doc/pi_spec.txt index f4949db2af..6d45a0f064 100644 --- a/runtime/doc/pi_spec.txt +++ b/runtime/doc/pi_spec.txt @@ -108,4 +108,4 @@ If you don't like the release updating feature and don't want to answer Good luck!! -vim:tw=78:ts=8:ft=help:norl: +vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/pi_tar.txt b/runtime/doc/pi_tar.txt index a189d006dd..59b318b7fd 100644 --- a/runtime/doc/pi_tar.txt +++ b/runtime/doc/pi_tar.txt @@ -148,4 +148,4 @@ Copyright 2005-2012: *tar-copyright* v1 (original) * Michael Toren (see http://michael.toren.net/code/) ============================================================================== -vim:tw=78:ts=8:ft=help +vim:tw=78:ts=8:noet:ft=help diff --git a/runtime/doc/pi_zip.txt b/runtime/doc/pi_zip.txt index c20bda1fa1..7a5e7166ba 100644 --- a/runtime/doc/pi_zip.txt +++ b/runtime/doc/pi_zip.txt @@ -149,4 +149,4 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright* v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing ============================================================================== -vim:tw=78:ts=8:ft=help:fdm=marker +vim:tw=78:ts=8:noet:ft=help:fdm=marker diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt index 3ffb52b5ae..084ad4e521 100644 --- a/runtime/doc/print.txt +++ b/runtime/doc/print.txt @@ -36,6 +36,8 @@ Note: If you have problems printing with |:hardcopy|, an alternative is to use 'printexpr' through |v:cmdarg|. Otherwise [arguments] is ignored. 'printoptions' can be used to specify paper size, duplex, etc. + Note: If you want PDF, there are tools such as + "ps2pdf" that can convert the PostScript to PDF. :[range]ha[rdcopy][!] >{filename} As above, but write the resulting PostScript in file @@ -729,4 +731,4 @@ to adjust the number of lines before a formfeed character to prevent accidental blank pages. ============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 6939dd6836..7aa81f612b 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -33,7 +33,7 @@ compiler (see |errorformat| below). *quickfix-ID* Each quickfix list has a unique identifier called the quickfix ID and this -number will not change within a Vim session. The getqflist() function can be +number will not change within a Vim session. The |getqflist()| function can be used to get the identifier assigned to a list. There is also a quickfix list number which may change whenever more than ten lists are added to a quickfix stack. @@ -51,6 +51,14 @@ When a window with a location list is split, the new window gets a copy of the location list. When there are no longer any references to a location list, the location list is destroyed. + *quickfix-changedtick* +Every quickfix and location list has a read-only changedtick variable that +tracks the total number of changes made to the list. Every time the quickfix +list is modified, this count is incremented. This can be used to perform an +action only when the list has changed. The |getqflist()| and |getloclist()| +functions can be used to query the current value of changedtick. You cannot +change the changedtick variable. + The following quickfix commands can be used. The location list commands are similar to the quickfix commands, replacing the 'c' prefix in the quickfix command with 'l'. @@ -281,6 +289,10 @@ processing a quickfix or location list command, it will be aborted. from the last error backwards, -1 being the last error. The 'switchbuf' settings are respected when jumping to a buffer. + The |:filter| command can be used to display only the + quickfix entries matching a supplied pattern. The + pattern is matched against the filename, module name, + pattern and text of the entry. :cl[ist] +{count} List the current and next {count} valid errors. This is similar to ":clist from from+count", where "from" @@ -299,8 +311,7 @@ processing a quickfix or location list command, it will be aborted. 8386: ^ ~ 8387: symbol: method Fmainx() ~ - *:lli* *:llist* -:lli[st] [from] [, [to]] +:lli[st] [from] [, [to]] *:lli* *:llist* Same as ":clist", except the location list for the current window is used instead of the quickfix list. @@ -333,6 +344,51 @@ use this code: > au QuickfixCmdPost make call QfMakeConv() Another option is using 'makeencoding'. + *quickfix-title* +Every quickfix and location list has a title. By default the title is set to +the command that created the list. The |getqflist()| and |getloclist()| +functions can be used to get the title of a quickfix and a location list +respectively. The |setqflist()| and |setloclist()| functions can be used to +modify the title of a quickfix and location list respectively. Examples: > + call setqflist([], 'a', {'title' : 'Cmd output'}) + echo getqflist({'title' : 1}) + call setloclist(3, [], 'a', {'title' : 'Cmd output'}) + echo getloclist(3, {'title' : 1}) +< + *quickfix-size* +You can get the number of entries (size) in a quickfix and a location list +using the |getqflist()| and |getloclist()| functions respectively. Examples: > + echo getqflist({'size' : 1}) + echo getloclist(5, {'size' : 1}) +< + *quickfix-context* +Any Vim type can be associated as a context with a quickfix or location list. +The |setqflist()| and the |setloclist()| functions can be used to associate a +context with a quickfix and a location list respectively. The |getqflist()| +and the |getloclist()| functions can be used to retrieve the context of a +quickfix and a location list respectively. This is useful for a Vim plugin +dealing with multiple quickfix/location lists. +Examples: > + + let somectx = {'name' : 'Vim', 'type' : 'Editor'} + call setqflist([], 'a', {'context' : somectx}) + echo getqflist({'context' : 1}) + + let newctx = ['red', 'green', 'blue'] + call setloclist(2, [], 'a', {'id' : qfid, 'context' : newctx}) + echo getloclist(2, {'id' : qfid, 'context' : 1}) +< + *quickfix-parse* +You can parse a list of lines using 'errorformat' without creating or +modifying a quickfix list using the |getqflist()| function. Examples: > + echo getqflist({'lines' : ["F1:10:Line10", "F2:20:Line20"]}) + echo getqflist({'lines' : systemlist('grep -Hn quickfix *')}) +This returns a dictionary where the 'items' key contains the list of quickfix +entries parsed from lines. The following shows how to use a custom +'errorformat' to parse the lines without modifying the 'errorformat' option: > + echo getqflist({'efm' : '%f#%l#%m', 'lines' : ['F1#10#Line']}) +< + EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: *:cdo* :cdo[!] {cmd} Execute {cmd} in each valid entry in the quickfix list. @@ -358,8 +414,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: autocommand event is disabled by adding it to 'eventignore'. This considerably speeds up editing each buffer. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} Also see |:bufdo|, |:tabdo|, |:argdo|, |:windo|, |:ldo|, |:cfdo| and |:lfdo|. @@ -372,8 +427,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: :{cmd} etc. < Otherwise it works the same as `:cdo`. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} *:ldo* :ld[o][!] {cmd} Execute {cmd} in each valid entry in the location list @@ -386,8 +440,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: etc. < Only valid entries in the location list are used. Otherwise it works the same as `:cdo`. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} *:lfdo* :lfdo[!] {cmd} Execute {cmd} in each file in the location list for @@ -399,8 +452,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: :{cmd} etc. < Otherwise it works the same as `:ldo`. - {not in Vi} {not available when compiled without the - |+listcmds| feature} + {not in Vi} ============================================================================= 2. The error window *quickfix-window* @@ -533,6 +585,117 @@ In all of the above cases, if the location list for the selected window is not yet set, then it is set to the location list displayed in the location list window. + *quickfix-window-ID* +You can use the |getqflist()| and |getloclist()| functions to obtain the +window ID of the quickfix window and location list window respectively (if +present). Examples: > + echo getqflist({'winid' : 1}).winid + echo getloclist(2, {'winid' : 1}).winid +< + *getqflist-examples* +The |getqflist()| and |getloclist()| functions can be used to get the various +attributes of a quickfix and location list respectively. Some examples for +using these functions are below: +> + " get the title of the current quickfix list + :echo getqflist({'title' : 0}).title + + " get the identifier of the current quickfix list + :let qfid = getqflist({'id' : 0}).id + + " get the identifier of the fourth quickfix list in the stack + :let qfid = getqflist({'nr' : 4, 'id' : 0}).id + + " check whether a quickfix list with a specific identifier exists + :if getqflist({'id' : qfid}).id == qfid + + " get the index of the current quickfix list in the stack + :let qfnum = getqflist({'nr' : 0}).nr + + " get the items of a quickfix list specified by an identifier + :echo getqflist({'id' : qfid, 'items' : 0}).items + + " get the number of entries in a quickfix list specified by an id + :echo getqflist({'id' : qfid, 'size' : 0}).size + + " get the context of the third quickfix list in the stack + :echo getqflist({'nr' : 3, 'context' : 0}).context + + " get the number of quickfix lists in the stack + :echo getqflist({'nr' : '$'}).nr + + " get the number of times the current quickfix list is changed + :echo getqflist({'changedtick' : 0}).changedtick + + " get the current entry in a quickfix list specified by an identifier + :echo getqflist({'id' : qfid, 'idx' : 0}).idx + + " get all the quickfix list attributes using an identifier + :echo getqflist({'id' : qfid, 'all' : 0}) + + " parse text from a List of lines and return a quickfix list + :let myList = ["a.java:10:L10", "b.java:20:L20"] + :echo getqflist({'lines' : myList}).items + + " parse text using a custom 'efm' and return a quickfix list + :echo getqflist({'lines' : ['a.c#10#Line 10'], 'efm':'%f#%l#%m'}).items + + " get the quickfix list window id + :echo getqflist({'winid' : 0}).winid + + " get the context of the current location list + :echo getloclist(0, {'context' : 0}).context + + " get the location list window id of the third window + :echo getloclist(3, {'winid' : 0}).winid +< + *setqflist-examples* +The |setqflist()| and |setloclist()| functions can be used to set the various +attributes of a quickfix and location list respectively. Some examples for +using these functions are below: +> + " create an empty quickfix list with a title and a context + :let t = 'Search results' + :let c = {'cmd' : 'grep'} + :call setqflist([], ' ', {'title' : t, 'context' : c}) + + " set the title of the current quickfix list + :call setqflist([], 'a', {'title' : 'Mytitle'}) + + " set the context of a quickfix list specified by an identifier + :call setqflist([], 'a', {'id' : qfid, 'context' : {'val' : 100}}) + + " create a new quickfix list from a command output + :call setqflist([], ' ', {'lines' : systemlist('grep -Hn main *.c')}) + + " parse text using a custom efm and add to a particular quickfix list + :call setqflist([], 'a', {'id' : qfid, + \ 'lines' : ["a.c#10#L10", "b.c#20#L20"], 'efm':'%f#%l#%m'}) + + " add items to the quickfix list specified by an identifier + :let newItems = [{'filename' : 'a.txt', 'lnum' : 10, 'text' : "Apple"}, + \ {'filename' : 'b.txt', 'lnum' : 20, 'text' : "Orange"}] + :call setqflist([], 'a', {'id' : qfid, 'items' : newItems}) + + " empty a quickfix list specified by an identifier + :call setqflist([], 'r', {'id' : qfid, 'items' : []}) + + " free all the quickfix lists in the stack + :call setqflist([], 'f') + + " set the title of the fourth quickfix list + :call setqflist([], 'a', {'nr' : 4, 'title' : 'SomeTitle'}) + + " create a new quickfix list at the end of the stack + :call setqflist([], ' ', {'nr' : '$', + \ 'lines' : systemlist('grep -Hn class *.java')}) + + " create a new location list from a command output + :call setloclist(0, [], ' ', {'lines' : systemlist('grep -Hn main *.c')}) + + " replace the location list entries for the third window + :call setloclist(3, [], 'r', {'items' : newItems}) +< ============================================================================= 3. Using more than one list of errors *quickfix-error-lists* @@ -577,6 +740,14 @@ list, one newer list is overwritten. This is especially useful if you are browsing with ":grep" |grep|. If you want to keep the more recent error lists, use ":cnewer 99" first. +To get the number of lists in the quickfix and location list stack, you can +use the |getqflist()| and |getloclist()| functions respectively with the list +number set to the special value '$'. Examples: > + echo getqflist({'nr' : '$'}).nr + echo getloclist(3, {'nr' : '$'}).nr +To get the number of the current list in the stack: > + echo getqflist({'nr' : 0}).nr +< ============================================================================= 4. Using :make *:make_makeprg* @@ -1069,7 +1240,7 @@ or > to indicate the column of the error. This is to be used in a multi-line error message. See |errorformat-javac| for a useful example. -The "%s" conversion specifies the text to search for to locate the error line. +The "%s" conversion specifies the text to search for, to locate the error line. The text is used as a literal string. The anchors "^" and "$" are added to the text to locate the error line exactly matching the search text and the text is prefixed with the "\V" atom to make it "very nomagic". The "%s" @@ -1338,6 +1509,22 @@ The backslashes before the pipe character are required to avoid it to be recognized as a command separator. The backslash before each space is required for the set command. + *cfilter-plugin* *Cfilter* *Lfilter* +If you have too many matching messages, you can use the cfilter plugin to +reduce the number of entries. Load the plugin with: > + packadd cfilter + +Then you can use these command: > + :Cfilter[!] /{pat}/ + :Lfilter[!] /{pat}/ + +:Cfilter creates a new quickfix list from entries matching {pat} in the +current quickfix list. Both the file name and the text of the entries are +matched against {pat}. If ! is supplied, then entries not matching {pat} are +used. + +:Lfilter does the same as :Cfilter but operates on the current location list. + ============================================================================= 8. The directory stack *quickfix-directory-stack* @@ -1575,4 +1762,4 @@ by Vim. - vim:noet:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 7067c60d2f..cf0efd7a75 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -614,7 +614,8 @@ Short explanation of each option: *option-list* 'backupext' 'bex' extension used for the backup file 'backupskip' 'bsk' no backup for files that match these patterns 'balloondelay' 'bdlay' delay in mS before a balloon may pop up -'ballooneval' 'beval' switch on balloon evaluation +'ballooneval' 'beval' switch on balloon evaluation in the GUI +'balloonevalterm' 'bevalterm' switch on balloon evaluation in the terminal 'balloonexpr' 'bexpr' expression to show in balloon 'belloff' 'bo' do not ring the bell for these reasons 'binary' 'bin' read/write/edit file in binary mode @@ -809,6 +810,7 @@ Short explanation of each option: *option-list* 'printoptions' 'popt' controls the format of :hardcopy output 'prompt' 'prompt' enable prompt in Ex mode 'pumheight' 'ph' maximum height of the popup menu +'pumwidth' 'pw' minimum width of the popup menu 'pythondll' name of the Python 2 dynamic library 'pythonthreedll' name of the Python 3 dynamic library 'quoteescape' 'qe' escape characters used in a string @@ -906,6 +908,8 @@ Short explanation of each option: *option-list* 'undoreload' 'ur' max nr of lines to save for undo on a buffer reload 'updatecount' 'uc' after this many characters flush swap file 'updatetime' 'ut' after this many milliseconds flush swap file +'varsofttabstop' 'vsts' a list of number of spaces when typing <Tab> +'vartabstop' 'vts' a list of number of spaces for <Tab>s 'verbose' 'vbs' give informative messages 'verbosefile' 'vfile' file to write messages in 'viewdir' 'vdir' directory where to store files with :mkview @@ -1372,4 +1376,4 @@ Context-sensitive completion on the command-line: |zN| zN fold normal set 'foldenable' |zi| zi invert 'foldenable' - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt index ffea514870..654a9cde7b 100644 --- a/runtime/doc/recover.txt +++ b/runtime/doc/recover.txt @@ -170,4 +170,4 @@ Once you are sure the recovery is ok delete the swap file. Otherwise, you will continue to get warning messages that the ".swp" file already exists. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/remote.txt b/runtime/doc/remote.txt index 039d8b582e..142d7b492a 100644 --- a/runtime/doc/remote.txt +++ b/runtime/doc/remote.txt @@ -169,7 +169,8 @@ name on the 'VimRegistry' property on the root window. A non GUI Vim with access to the X11 display (|xterm-clipboard| enabled), can also act as a command server if a server name is explicitly given with the ---servername argument. +--servername argument, or when Vim was build with the |+autoservername| +feature. An empty --servername argument will cause the command server to be disabled. @@ -190,4 +191,4 @@ When using gvim, the --remote-wait only works properly this way: > start /w gvim --remote-wait file.txt < - vim:tw=78:sw=4:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 42889cca50..82a8c4c5cc 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -226,6 +226,10 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. If the directory pack/*/opt/{name}/after exists it is added at the end of 'runtimepath'. + If loading packages from "pack/*/start" was skipped, + then this directory is searched first: + pack/*/start/{name} ~ + Note that {name} is the directory name, not the name of the .vim file. All the files matching the pattern pack/*/opt/{name}/plugin/**/*.vim ~ @@ -958,4 +962,4 @@ mind there are various things that may clobber the results: - The "self" time is wrong when a function is used recursively. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/rileft.txt b/runtime/doc/rileft.txt index ba9bb1eba7..8fd67c9602 100644 --- a/runtime/doc/rileft.txt +++ b/runtime/doc/rileft.txt @@ -112,4 +112,4 @@ o When both 'rightleft' and 'revins' are on: 'textwidth' does not work. o There is no full bidirectionality (bidi) support. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/russian.txt b/runtime/doc/russian.txt index 8c6076146c..724c4f9454 100644 --- a/runtime/doc/russian.txt +++ b/runtime/doc/russian.txt @@ -68,4 +68,4 @@ In order to use the Russian documentation, make sure you have set the releases of gettext. =============================================================================== - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt index 99ebd26db3..7906214111 100644 --- a/runtime/doc/scroll.txt +++ b/runtime/doc/scroll.txt @@ -27,6 +27,7 @@ seen): *CTRL-E* CTRL-E Scroll window [count] lines downwards in the buffer. + The text moves upwards on the screen. Mnemonic: Extra lines. *CTRL-D* @@ -65,6 +66,7 @@ seen): *CTRL-Y* CTRL-Y Scroll window [count] lines upwards in the buffer. + The text moves downwards on the screen. Note: When using the MS-Windows key bindings CTRL-Y is remapped to redo. @@ -248,4 +250,4 @@ the scroll wheel move one line or half a page in Normal mode: > :map <S-ScrollWheelDown> <C-D> You can also use Alt and Ctrl modifiers. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index 7cdb460943..a26c0a3ac9 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -196,4 +196,4 @@ JUMPING TO A SIGN *:sign-jump* *E157* have a name. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index 718b5d4c1f..875f3f2c08 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1733,4 +1733,4 @@ This isn't ideal, because the longer Vim is running the higher the counts become. But in practice it is a noticeable improvement over not using the word count. - vim:tw=78:sw=4:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/sponsor.txt b/runtime/doc/sponsor.txt index cfdf21abea..cb6bdad358 100644 --- a/runtime/doc/sponsor.txt +++ b/runtime/doc/sponsor.txt @@ -213,4 +213,4 @@ is done. But a receipt is possible. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index aebb0ef6ec..1da2441929 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1101,6 +1101,8 @@ SHADA FILE NAME *shada-file-name* - The "-i" Vim argument can be used to set another file name, |-i|. When the file name given is "NONE" (all uppercase), no ShaDa file is ever read or written. Also not for the commands below! +- The 'viminfofile' option can be used like the "-i" argument. In fact, the + value form the "-i" argument is stored in the 'viminfofile' option. - For the commands below, another file name can be given, overriding the default and the name given with 'shada' or "-i" (unless it's NONE). diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index c3664ece18..e96b109ceb 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1947,7 +1947,7 @@ set "lite_minlines" to the value you desire. Example: > LPC *lpc.vim* *ft-lpc-syntax* -LPC stands for a simple, memory-efficient language: Lars Pensj| C. The +LPC stands for a simple, memory-efficient language: Lars Pensjö C. The file name of LPC is usually *.c. Recognizing these files as LPC would bother users writing only C programs. If you want to use LPC syntax in Vim, you should set a variable in your vimrc file: > @@ -2748,13 +2748,10 @@ Ruby syntax will perform spellchecking of strings if you define SCHEME *scheme.vim* *ft-scheme-syntax* -By default only R5RS keywords are highlighted and properly indented. +By default only R7RS keywords are highlighted and properly indented. -MzScheme-specific stuff will be used if b:is_mzscheme or g:is_mzscheme -variables are defined. - -Also scheme.vim supports keywords of the Chicken Scheme->C compiler. Define -b:is_chicken or g:is_chicken, if you need them. +scheme.vim also supports extensions of the CHICKEN Scheme->C compiler. +Define b:is_chicken or g:is_chicken, if you need them. SDL *sdl.vim* *ft-sdl-syntax* @@ -2848,17 +2845,17 @@ This covers syntax highlighting for the older Unix (Bourne) sh, and newer shells such as bash, dash, posix, and the Korn shells. Vim attempts to determine which shell type is in use by specifying that -various filenames are of specific types: > +various filenames are of specific types, e.g.: > ksh : .kshrc* *.ksh bash: .bashrc* bashrc bash.bashrc .bash_profile* *.bash < -If none of these cases pertain, then the first line of the file is examined -(ex. looking for /bin/sh /bin/ksh /bin/bash). If the first line specifies a -shelltype, then that shelltype is used. However some files (ex. .profile) are -known to be shell files but the type is not apparent. Furthermore, on many -systems sh is symbolically linked to "bash" (Linux, Windows+cygwin) or "ksh" -(Posix). +See $VIMRUNTIME/filetype.vim for the full list of patterns. If none of these +cases pertain, then the first line of the file is examined (ex. looking for +/bin/sh /bin/ksh /bin/bash). If the first line specifies a shelltype, then +that shelltype is used. However some files (ex. .profile) are known to be +shell files but the type is not apparent. Furthermore, on many systems sh is +symbolically linked to "bash" (Linux, Windows+cygwin) or "ksh" (Posix). One may specify a global default by instantiating one of the following variables in your vimrc: @@ -4585,7 +4582,9 @@ in their own color. runtime colors/evening.vim hi Statement ctermfg=Blue guifg=Blue -< After the color scheme has been loaded the +< Before the color scheme will be loaded the + |ColorSchemePre| autocommand event is triggered. + After the color scheme has been loaded the |ColorScheme| autocommand event is triggered. For info about writing a colorscheme file: > :edit $VIMRUNTIME/colors/README.txt @@ -4947,6 +4946,11 @@ StatusLine status line of current window StatusLineNC status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. + *hl-StatusLineTerm* +StatusLineTerm status line of current window, if it is a |terminal| window. + *hl-StatusLineTermNC* +StatusLineTermNC status lines of not-current windows that is a |terminal| + window. *hl-TabLine* TabLine tab pages line, not active tab page label *hl-TabLineFill* @@ -5250,4 +5254,4 @@ literal text specify the size of that text (in bytes): "<\@1<=span" Matches the same, but only tries one byte before "span". - vim:tw=78:sw=4:ts=8:ft=help:norl: + vim:tw=78:sw=4:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index 6be7cf9746..a0459d27bc 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -203,7 +203,8 @@ gT Go to the previous tab page. Wraps around from the first one :tabN[ext] {count} {count}<C-PageUp> {count}gT Go {count} tab pages back. Wraps around from the first one - to the last one. + to the last one. Note that the use of {count} is different + from |:tabnext|, where it is used as the tab page number. :tabr[ewind] *:tabfir* *:tabfirst* *:tabr* *:tabrewind* :tabfir[st] Go to the first tab page. @@ -230,8 +231,10 @@ REORDERING TAB PAGES: :tabm[ove] [N] *:tabm* *:tabmove* :[N]tabm[ove] Move the current tab page to after tab page N. Use zero to - make the current tab page the first one. Without N the tab - page is made the last one. > + make the current tab page the first one. N is counted before + the move, thus if the second tab is the current one, + `:tabmove 1` and `:tabmove 2` have no effect. + Without N the tab page is made the last one. > :.tabmove " do nothing :-tabmove " move the tab page to the left :+tabmove " move the tab page to the right @@ -463,4 +466,4 @@ If you want to show something specific for a tab page, you might want to use a tab page local variable. |t:var| - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index f0ad2cfd43..367da7750e 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -31,12 +31,12 @@ An easy way back is with the CTRL-T command. Also read about the tag stack below. *:ta* *:tag* *E426* *E429* -:[count]ta[g][!] {ident} - Jump to the definition of {ident}, using the - information in the tags file(s). Put {ident} in the +:[count]ta[g][!] {name} + Jump to the definition of {name}, using the + information in the tags file(s). Put {name} in the tag stack. See |tag-!| for [!]. - {ident} can be a regexp pattern, see |tag-regexp|. - When there are several matching tags for {ident}, jump + {name} can be a regexp pattern, see |tag-regexp|. + When there are several matching tags for {name}, jump to the [count] one. When [count] is omitted the first one is jumped to. See |tag-matchlist| for jumping to other matching tags. @@ -44,15 +44,15 @@ below. g<LeftMouse> *g<LeftMouse>* <C-LeftMouse> *<C-LeftMouse>* *CTRL-]* CTRL-] Jump to the definition of the keyword under the - cursor. Same as ":tag {ident}", where {ident} is the + cursor. Same as ":tag {name}", where {name} is the keyword under or after cursor. - When there are several matching tags for {ident}, jump + When there are several matching tags for {name}, jump to the [count] one. When no [count] is given the first one is jumped to. See |tag-matchlist| for jumping to other matching tags. *v_CTRL-]* -{Visual}CTRL-] Same as ":tag {ident}", where {ident} is the text that +{Visual}CTRL-] Same as ":tag {name}", where {name} is the text that is highlighted. *telnet-CTRL-]* @@ -76,7 +76,7 @@ When there are multiple matches for a tag, this priority is used: Note that when the current file changes, the priority list is mostly not changed, to avoid confusion when using ":tnext". It is changed when using -":tag {ident}". +":tag {name}". The ignore-case matches are not found for a ":tag" command when: - the 'ignorecase' option is off and 'tagcase' is "followic" @@ -161,7 +161,7 @@ You can get from main to FuncA by using CTRL-] on the call to FuncA. Then you can CTRL-] to get to FuncC. If you now want to go back to main you can use CTRL-T twice. Then you can CTRL-] to FuncB. -If you issue a ":ta {ident}" or CTRL-] command, this tag is inserted at the +If you issue a ":ta {name}" or CTRL-] command, this tag is inserted at the current position in the stack. If the stack was full (it can hold up to 20 entries), the oldest entry is deleted and the older entries shift one position up (their index number is decremented by one). If the last used @@ -185,14 +185,14 @@ between them. Note that these commands don't change the tag stack, they keep the same entry. *:ts* *:tselect* -:ts[elect][!] [ident] List the tags that match [ident], using the +:ts[elect][!] [name] List the tags that match [name], using the information in the tags file(s). - When [ident] is not given, the last tag name from the + When [name] is not given, the last tag name from the tag stack is used. See |tag-!| for [!]. With a '>' in the first column is indicated which is the current position in the list (if there is one). - [ident] can be a regexp pattern, see |tag-regexp|. + [name] can be a regexp pattern, see |tag-regexp|. See |tag-priority| for the priorities used in the listing. Example output: @@ -220,7 +220,7 @@ the same entry. type 'q' and enter the number. *:sts* *:stselect* -:sts[elect][!] [ident] Does ":tselect[!] [ident]" and splits the window for +:sts[elect][!] [name] Does ":tselect[!] [name]" and splits the window for the selected tag. *g]* @@ -231,11 +231,11 @@ g] Like CTRL-], but use ":tselect" instead of ":tag". identifier. *:tj* *:tjump* -:tj[ump][!] [ident] Like ":tselect", but jump to the tag directly when +:tj[ump][!] [name] Like ":tselect", but jump to the tag directly when there is only one match. *:stj* *:stjump* -:stj[ump][!] [ident] Does ":tjump[!] [ident]" and splits the window for the +:stj[ump][!] [name] Does ":tjump[!] [name]" and splits the window for the selected tag. *g_CTRL-]* @@ -267,9 +267,9 @@ g CTRL-] Like CTRL-], but use ":tjump" instead of ":tag". :tl[ast][!] Jump to last matching tag. See |tag-!| for [!]. *:lt* *:ltag* -:lt[ag][!] [ident] Jump to tag [ident] and add the matching tags to a new - location list for the current window. [ident] can be - a regexp pattern, see |tag-regexp|. When [ident] is +:lt[ag][!] [name] Jump to tag [name] and add the matching tags to a new + location list for the current window. [name] can be + a regexp pattern, see |tag-regexp|. When [name] is not given, the last tag name from the tag stack is used. The search pattern to locate the tag line is prefixed with "\V" to escape all the special @@ -300,11 +300,11 @@ the same as above, with a "p" prepended. {not available when compiled without the |+quickfix| feature} *:pts* *:ptselect* -:pts[elect][!] [ident] Does ":tselect[!] [ident]" and shows the new tag in a +:pts[elect][!] [name] Does ":tselect[!] [name]" and shows the new tag in a "Preview" window. See |:ptag| for more info. *:ptj* *:ptjump* -:ptj[ump][!] [ident] Does ":tjump[!] [ident]" and shows the new tag in a +:ptj[ump][!] [name] Does ":tjump[!] [name]" and shows the new tag in a "Preview" window. See |:ptag| for more info. *:ptn* *:ptnext* @@ -819,4 +819,4 @@ Common arguments for the commands above: < For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern is used as a literal string, not as a search pattern. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt index 011e0f0565..1362b730b7 100644 --- a/runtime/doc/tips.txt +++ b/runtime/doc/tips.txt @@ -446,4 +446,4 @@ A slightly more advanced version is used in the |matchparen| plugin. autocmd InsertEnter * match none < - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/uganda.txt b/runtime/doc/uganda.txt index cdd677cbd5..97a67befb9 100644 --- a/runtime/doc/uganda.txt +++ b/runtime/doc/uganda.txt @@ -281,4 +281,4 @@ Address to send checks to: This address is expected to be valid for a long time. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/undo.txt b/runtime/doc/undo.txt index f8f6049119..a500e87e35 100644 --- a/runtime/doc/undo.txt +++ b/runtime/doc/undo.txt @@ -383,4 +383,4 @@ if it is not what you want do 'u.'. This will remove the contents of the first put, and repeat the put command for the second register. Repeat the 'u.' until you got what you want. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_01.txt b/runtime/doc/usr_01.txt index bc55e7cdce..f96043c409 100644 --- a/runtime/doc/usr_01.txt +++ b/runtime/doc/usr_01.txt @@ -109,4 +109,4 @@ donate part of the profit to help AIDS victims in Uganda. See |iccf|. Next chapter: |usr_02.txt| The first steps in Vim -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_02.txt b/runtime/doc/usr_02.txt index a1e3d606ec..9ebbd11ac7 100644 --- a/runtime/doc/usr_02.txt +++ b/runtime/doc/usr_02.txt @@ -687,4 +687,4 @@ Summary: *help-summary* > Next chapter: |usr_03.txt| Moving around -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt index 989914687f..2649534900 100644 --- a/runtime/doc/usr_03.txt +++ b/runtime/doc/usr_03.txt @@ -650,4 +650,4 @@ You will notice a few special marks. These include: Next chapter: |usr_04.txt| Making small changes -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_04.txt b/runtime/doc/usr_04.txt index e02a50e494..a327a09a71 100644 --- a/runtime/doc/usr_04.txt +++ b/runtime/doc/usr_04.txt @@ -511,4 +511,4 @@ else: Next chapter: |usr_05.txt| Set your settings -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index 2485f106b4..38e858801b 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -317,8 +317,9 @@ when you use Vim. There are only two steps for adding a global plugin: GETTING A GLOBAL PLUGIN Where can you find plugins? +- Some are always loaded, you can see them in the directory $VIMRUNTIME/plugin. - Some come with Vim. You can find them in the directory $VIMRUNTIME/macros - and its sub-directories. + and its sub-directories and under $VIM/vimfiles/pack/dist/opt/. - Download from the net. There is a large collection on http://www.vim.org. - They are sometimes posted in a Vim |maillist|. - You could write one yourself, see |write-plugin|. @@ -609,4 +610,4 @@ This does mean there is less room to edit text, thus it's a compromise. Next chapter: |usr_06.txt| Using syntax highlighting -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_06.txt b/runtime/doc/usr_06.txt index 48f672be78..beffb92877 100644 --- a/runtime/doc/usr_06.txt +++ b/runtime/doc/usr_06.txt @@ -274,4 +274,4 @@ others look at the colored text. Next chapter: |usr_07.txt| Editing more than one file -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_07.txt b/runtime/doc/usr_07.txt index 683c9879a7..c44a54d76c 100644 --- a/runtime/doc/usr_07.txt +++ b/runtime/doc/usr_07.txt @@ -476,4 +476,4 @@ This protects you from accidentally overwriting another file. Next chapter: |usr_08.txt| Splitting windows -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_08.txt b/runtime/doc/usr_08.txt index ef91bf9c0a..559ca6f1ef 100644 --- a/runtime/doc/usr_08.txt +++ b/runtime/doc/usr_08.txt @@ -597,4 +597,4 @@ For more information about tab pages see |tab-page|. Next chapter: |usr_09.txt| Using the GUI -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_09.txt b/runtime/doc/usr_09.txt index f53076a2ec..757d13e0f3 100644 --- a/runtime/doc/usr_09.txt +++ b/runtime/doc/usr_09.txt @@ -5,9 +5,10 @@ Using the GUI -Vim works in an ordinary terminal. GVim can do the same things and a few -more. The GUI offers menus, a toolbar, scrollbars and other items. This -chapter is about these extra things that the GUI offers. +Vim works in an ordinary terminal, while gVim has a Graphical User Interface +(GUI). It can do the same things and a few more. The GUI offers menus, a +toolbar, scrollbars and other items. This chapter is about these extra things +that the GUI offers. |09.1| Parts of the GUI |09.2| Using the mouse @@ -282,4 +283,4 @@ You can tune the way Select mode works with the 'selectmode' option. Next chapter: |usr_10.txt| Making big changes -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_10.txt b/runtime/doc/usr_10.txt index 044cb1582b..3646786052 100644 --- a/runtime/doc/usr_10.txt +++ b/runtime/doc/usr_10.txt @@ -820,4 +820,4 @@ has written. To tell Vim to redraw the screen: > Next chapter: |usr_11.txt| Recovering from a crash -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_11.txt b/runtime/doc/usr_11.txt index 42aa1d9100..ad3c0de541 100644 --- a/runtime/doc/usr_11.txt +++ b/runtime/doc/usr_11.txt @@ -234,7 +234,7 @@ that file, be prepared to redo your last changes. WHAT TO DO? *swap-exists-choices* -If dialogs are supported you will be asked to select one of five choices: +If dialogs are supported you will be asked to select one of six choices: Swap file ".main.c.swp" already exists! ~ [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort, (D)elete it: ~ @@ -299,4 +299,4 @@ If you really don't want to see this message, you can add the 'A' flag to the Next chapter: |usr_12.txt| Clever tricks -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_12.txt b/runtime/doc/usr_12.txt index e87ed81c97..21efa36a25 100644 --- a/runtime/doc/usr_12.txt +++ b/runtime/doc/usr_12.txt @@ -343,4 +343,4 @@ matches and where they are. Next chapter: |usr_20.txt| Typing command-line commands quickly -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_20.txt b/runtime/doc/usr_20.txt index 3b8eeae175..8eee7aedb7 100644 --- a/runtime/doc/usr_20.txt +++ b/runtime/doc/usr_20.txt @@ -381,4 +381,4 @@ there can be only one. Next chapter: |usr_21.txt| Go away and come back -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_21.txt b/runtime/doc/usr_21.txt index cfb8c90027..99a78e7b05 100644 --- a/runtime/doc/usr_21.txt +++ b/runtime/doc/usr_21.txt @@ -488,4 +488,4 @@ For more details see |modeline|. Next chapter: |usr_22.txt| Finding the file to edit -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_22.txt b/runtime/doc/usr_22.txt index 255211f668..96fc02aaa5 100644 --- a/runtime/doc/usr_22.txt +++ b/runtime/doc/usr_22.txt @@ -397,4 +397,4 @@ can't be editing nothing! Next chapter: |usr_23.txt| Editing other files -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_23.txt b/runtime/doc/usr_23.txt index cb776d2b5c..810da05ff8 100644 --- a/runtime/doc/usr_23.txt +++ b/runtime/doc/usr_23.txt @@ -256,4 +256,4 @@ decompression. You might need to install the programs first. Next chapter: |usr_24.txt| Inserting quickly -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_24.txt b/runtime/doc/usr_24.txt index b74ed879e0..3c4ff6f55e 100644 --- a/runtime/doc/usr_24.txt +++ b/runtime/doc/usr_24.txt @@ -538,8 +538,8 @@ a 16 bit and a 32 bit number (e.g., for a Unicode character): > *24.9* Digraphs Some characters are not on the keyboard. For example, the copyright character -(). To type these characters in Vim, you use digraphs, where two characters -represent one. To enter a , for example, you press three keys: > +(©). To type these characters in Vim, you use digraphs, where two characters +represent one. To enter a ©, for example, you press three keys: > CTRL-K Co @@ -549,12 +549,12 @@ To find out what digraphs are available, use the following command: > Vim will display the digraph table. Here are three lines of it: - AC ~_ 159 NS | 160 !I 161 Ct 162 Pd 163 Cu 164 Ye 165 ~ - BB 166 SE 167 ': 168 Co 169 -a 170 << 171 NO 172 ~ - -- 173 Rg 174 'm 175 DG 176 +- 177 2S 178 3S 179 ~ + AC ~_ 159 NS | 160 !I ¡ 161 Ct ¢ 162 Pd £ 163 Cu ¤ 164 Ye ¥ 165 ~ + BB ¦ 166 SE § 167 ': ¨ 168 Co © 169 -a ª 170 << « 171 NO ¬ 172 ~ + -- 173 Rg ® 174 'm ¯ 175 DG ° 176 +- ± 177 2S ² 178 3S ³ 179 ~ This shows, for example, that the digraph you get by typing CTRL-K Pd is the -character (). This is character number 163 (decimal). +character (£). This is character number 163 (decimal). Pd is short for Pound. Most digraphs are selected to give you a hint about the character they will produce. If you look through the list you will understand the logic. @@ -569,9 +569,9 @@ that combination. Thus CTRL-K dP also works. Since there is no digraph for You can define your own digraphs. Example: > - :digraph a" + :digraph a" ä -This defines that CTRL-K a" inserts an character. You can also specify the +This defines that CTRL-K a" inserts an ä character. You can also specify the character with a decimal number. This defines the same digraph: > :digraph a" 228 @@ -603,4 +603,4 @@ This deletes up to the third word into register g. Next chapter: |usr_25.txt| Editing formatted text -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_25.txt b/runtime/doc/usr_25.txt index ae3d3c4422..3a58af6412 100644 --- a/runtime/doc/usr_25.txt +++ b/runtime/doc/usr_25.txt @@ -579,4 +579,4 @@ The "gR" command uses Virtual Replace mode. This preserves the layout: Next chapter: |usr_26.txt| Repeating -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_26.txt b/runtime/doc/usr_26.txt index 7b0b940da2..4e8f1979f4 100644 --- a/runtime/doc/usr_26.txt +++ b/runtime/doc/usr_26.txt @@ -207,4 +207,4 @@ start all over, use the "-W" argument. It overwrites any existing file. Next chapter: |usr_27.txt| Search commands and patterns -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_27.txt b/runtime/doc/usr_27.txt index afea67bd0b..cd01308c6e 100644 --- a/runtime/doc/usr_27.txt +++ b/runtime/doc/usr_27.txt @@ -225,9 +225,9 @@ specify a line offset, this can cause trouble. For example: > /const/-2 This finds the next word "const" and then moves two lines up. If you -use "n" to search again, Vim could start at the current position and find the same -"const" match. Then using the offset again, you would be back where you started. -You would be stuck! +use "n" to search again, Vim could start at the current position and find the +same "const" match. Then using the offset again, you would be back where you +started. You would be stuck! It could be worse: Suppose there is another match with "const" in the next line. Then repeating the forward search would find this match and move two lines up. Thus you would actually move the cursor back! @@ -560,4 +560,4 @@ and "\w" for "[0-9A-Za-z_]". Next chapter: |usr_28.txt| Folding -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_28.txt b/runtime/doc/usr_28.txt index 24e995d9ab..86aa20597e 100644 --- a/runtime/doc/usr_28.txt +++ b/runtime/doc/usr_28.txt @@ -423,4 +423,4 @@ the defined folds. Then you can delete or add folds manually. Next chapter: |usr_29.txt| Moving through programs -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_29.txt b/runtime/doc/usr_29.txt index b0cb9d7e88..3381d1870c 100644 --- a/runtime/doc/usr_29.txt +++ b/runtime/doc/usr_29.txt @@ -608,4 +608,4 @@ for the identifier. Example (cursor on "idx"): Next chapter: |usr_30.txt| Editing programs -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_30.txt b/runtime/doc/usr_30.txt index 786f2d1800..b729c7a263 100644 --- a/runtime/doc/usr_30.txt +++ b/runtime/doc/usr_30.txt @@ -640,4 +640,4 @@ For more details see |format-comments|. Next chapter: |usr_31.txt| Exploiting the GUI -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_31.txt b/runtime/doc/usr_31.txt index 2354e27b42..fb9a4fd223 100644 --- a/runtime/doc/usr_31.txt +++ b/runtime/doc/usr_31.txt @@ -269,4 +269,4 @@ another font size, for example. Next chapter: |usr_32.txt| The undo tree -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_32.txt b/runtime/doc/usr_32.txt index fca802872d..8b489ea1e0 100644 --- a/runtime/doc/usr_32.txt +++ b/runtime/doc/usr_32.txt @@ -177,4 +177,4 @@ use the |undotree()| function. To see what it returns: > Next chapter: |usr_40.txt| Make new commands -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_40.txt b/runtime/doc/usr_40.txt index 4092af703e..e5d55fb857 100644 --- a/runtime/doc/usr_40.txt +++ b/runtime/doc/usr_40.txt @@ -654,4 +654,4 @@ To set it back to the normal behavior, make 'eventignore' empty: > Next chapter: |usr_41.txt| Write a Vim script -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 7978074550..4adb69aaee 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -882,9 +882,11 @@ Interactive: *interactive-functions* GUI: *gui-functions* getfontname() get name of current font being used - getwinposx() X position of the GUI Vim window - getwinposy() Y position of the GUI Vim window + getwinpos() position of the Vim window + getwinposx() X position of the Vim window + getwinposy() Y position of the Vim window balloon_show() set the balloon content + balloon_split() split a message for a balloon Vim server: *server-functions* serverlist() return the list of server names @@ -900,6 +902,7 @@ Vim server: *server-functions* Window size and position: *window-size-functions* winheight() get height of a specific window winwidth() get width of a specific window + win_screenpos() get screen position of a window winrestcmd() return command to restore window sizes winsaveview() get view of current window winrestview() restore saved view of current window @@ -919,7 +922,8 @@ Testing: *test-functions* assert_false() assert that an expression is false assert_true() assert that an expression is true assert_exception() assert that a command throws an exception - assert_fails() assert that a function call fails + assert_beeps() assert that a command beeps + assert_fails() assert that a command fails Timers: *timer-functions* timer_start() create a timer @@ -2510,4 +2514,4 @@ utility is recommended. Next chapter: |usr_42.txt| Add new menus -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_42.txt b/runtime/doc/usr_42.txt index ad04555f8c..501f02e745 100644 --- a/runtime/doc/usr_42.txt +++ b/runtime/doc/usr_42.txt @@ -355,4 +355,4 @@ is... Next chapter: |usr_43.txt| Using filetypes -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_43.txt b/runtime/doc/usr_43.txt index 765a525692..04e9f9c000 100644 --- a/runtime/doc/usr_43.txt +++ b/runtime/doc/usr_43.txt @@ -175,4 +175,4 @@ and sources a script or executes a function to check the contents of the file. Next chapter: |usr_44.txt| Your own syntax highlighted -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_44.txt b/runtime/doc/usr_44.txt index b06557b950..722c3de26c 100644 --- a/runtime/doc/usr_44.txt +++ b/runtime/doc/usr_44.txt @@ -716,4 +716,4 @@ up scrolling backwards and CTRL-L. Next chapter: |usr_45.txt| Select your language -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_45.txt b/runtime/doc/usr_45.txt index 9bbbe82113..ae2aae7596 100644 --- a/runtime/doc/usr_45.txt +++ b/runtime/doc/usr_45.txt @@ -392,4 +392,4 @@ Don't type the spaces. See |i_CTRL-V_digit| for the details. ============================================================================== -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/usr_toc.txt b/runtime/doc/usr_toc.txt index ed14d78d22..148dd161ac 100644 --- a/runtime/doc/usr_toc.txt +++ b/runtime/doc/usr_toc.txt @@ -335,4 +335,4 @@ Make Vim work as you like it. ============================================================================== -Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: +Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 9412899ea3..917419e0f5 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -381,6 +381,7 @@ N *+virtualedit* |'virtualedit'| S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200. N *+visualextra* extra Visual mode commands |blockwise-operators| N *+vreplace* |gR| and |gr| + *+vtp* on MS-Windows console: support for 'termguicolors' N *+wildignore* |'wildignore'| N *+wildmenu* |'wildmenu'| *+windows* more than one window diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt index bf90fe1754..d908f484c6 100644 --- a/runtime/doc/vi_diff.txt +++ b/runtime/doc/vi_diff.txt @@ -363,4 +363,4 @@ Move cursor beyond lines. and figures easily. - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index 1731bbd030..252a1ca8b8 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -524,4 +524,4 @@ g CTRL-H Start Select mode, blockwise. This is like CTRL-V, but starts Select mode instead of Visual mode. Mnemonic: "get Highlighted". - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index e83377471c..44464c1cef 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1046,10 +1046,8 @@ list of buffers. |unlisted-buffer| :%bdelete " delete all buffers < :bdelete[!] {bufname} *E93* *E94* - Like ":bdelete[!] [N]", but buffer given by name. Note that a - buffer whose name is a number cannot be referenced by that - name; use the buffer number instead. Insert a backslash - before a space in a buffer name. + Like ":bdelete[!] [N]", but buffer given by name, see + |{bufname}|. :bdelete[!] N1 N2 ... Do ":bdelete[!]" for buffer N1, N2, etc. The arguments can be @@ -1085,10 +1083,8 @@ list of buffers. |unlisted-buffer| into a loaded buffer. :bunload[!] {bufname} - Like ":bunload[!] [N]", but buffer given by name. Note that a - buffer whose name is a number cannot be referenced by that - name; use the buffer number instead. Insert a backslash - before a space in a buffer name. + Like ":bunload[!] [N]", but buffer given by name. + Also see |{bufname}|. :N,Mbunload[!] Do ":bunload[!]" for all buffers in the range N to M |inclusive|. @@ -1106,10 +1102,16 @@ list of buffers. |unlisted-buffer| list, without setting the 'buflisted' flag. Also see |+cmd|. -:[N]b[uffer][!] [+cmd] {bufname} - Edit buffer for {bufname} from the buffer list. See - |:buffer-!| for [!]. This will also edit a buffer that is not - in the buffer list, without setting the 'buflisted' flag. +:[N]b[uffer][!] [+cmd] {bufname} *{bufname}* + Edit buffer for {bufname} from the buffer list. A partial + name also works, so long as it is unique in the list of + buffers. + Note that a buffer whose name is a number cannot be referenced + by that name; use the buffer number instead. + Insert a backslash before a space in a buffer name. + See |:buffer-!| for [!]. + This will also edit a buffer that is not in the buffer list, + without setting the 'buflisted' flag. Also see |+cmd|. :[N]sb[uffer] [+cmd] [N] *:sb* *:sbuffer* @@ -1121,7 +1123,7 @@ list of buffers. |unlisted-buffer| Also see |+cmd|. :[N]sb[uffer] [+cmd] {bufname} - Split window and edit buffer for {bufname} from the buffer + Split window and edit buffer for |{bufname}| from the buffer list. This will also edit a buffer that is not in the buffer list, without setting the 'buflisted' flag. Note: If what you want to do is split the buffer, make a copy @@ -1271,4 +1273,4 @@ unlisted The buffer is not in the buffer list. It is not used for :setlocal nobuflisted < - vim:tw=78:ts=8:ft=help:norl: + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 3c158d9012..6fdc02aaf0 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -227,14 +227,15 @@ au BufNewFile,BufRead *.bl setf blank au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml " Bazel (http://bazel.io) -autocmd BufRead,BufNewFile *.bzl,WORKSPACE setf bzl +autocmd BufRead,BufNewFile *.bzl,WORKSPACE,BUILD.bazel setf bzl if has("fname_case") " There is another check for BUILD further below. - autocmd BufRead,BufNewFile BUILD setf bzl + autocmd BufRead,BufNewFile BUILD setf bzl endif " C or lpc au BufNewFile,BufRead *.c call dist#ft#FTlpc() +au BufNewFile,BufRead *.lpc,*.ulpc setf lpc " Calendar au BufNewFile,BufRead calendar setf calendar @@ -374,7 +375,7 @@ au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf au BufNewFile,BufRead configure.in,configure.ac setf config " CUDA Cumpute Unified Device Architecture -au BufNewFile,BufRead *.cu setf cuda +au BufNewFile,BufRead *.cu,*.cuh setf cuda " Dockerfile au BufNewFile,BufRead Dockerfile,*.Dockerfile setf dockerfile @@ -424,6 +425,13 @@ au BufNewFile,BufRead control \| setf debcontrol \| endif +" Debian Copyright +au BufNewFile,BufRead */debian/copyright setf debcopyright +au BufNewFile,BufRead copyright + \ if getline(1) =~ '^Format:' + \| setf debcopyright + \| endif + " Debian Sources.list au BufNewFile,BufRead */etc/apt/sources.list setf debsources au BufNewFile,BufRead */etc/apt/sources.list.d/*.list setf debsources @@ -574,7 +582,7 @@ au BufNewFile,BufRead auto.master setf conf au BufNewFile,BufRead *.mas,*.master setf master " Forth -au BufNewFile,BufRead *.fs,*.ft setf forth +au BufNewFile,BufRead *.fs,*.ft,*.fth setf forth " Reva Forth au BufNewFile,BufRead *.frt setf reva @@ -601,12 +609,12 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom " Git -au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit -au BufNewFile,BufRead *.git/config,.gitconfig,.gitmodules setf gitconfig -au BufNewFile,BufRead *.git/modules/*/config setf gitconfig -au BufNewFile,BufRead */.config/git/config setf gitconfig +au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit +au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig setf gitconfig +au BufNewFile,BufRead */.config/git/config setf gitconfig +au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig if !empty($XDG_CONFIG_HOME) - au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig + au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig endif au BufNewFile,BufRead git-rebase-todo setf gitrebase au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail @@ -1148,8 +1156,9 @@ au BufNewFile,BufRead *.pod6 setf pod6 " Also .ctp for Cake template file au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php -" Pike -au BufNewFile,BufRead *.pike,*.lpc,*.ulpc,*.pmod setf pike +" Pike and Cmod +au BufNewFile,BufRead *.pike,*.pmod setf pike +au BufNewFile,BufRead *.cmod setf cmod " Pinfo config au BufNewFile,BufRead */etc/pinforc,*/.pinforc setf pinfo @@ -1250,9 +1259,9 @@ au BufNewFile,BufRead */etc/protocols setf protocols " Pyrex au BufNewFile,BufRead *.pyx,*.pxd setf pyrex -" Python, Python Shell Startup Files +" Python, Python Shell Startup and Python Stub Files " Quixote (Python-based web framework) -au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl setf python +au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,*.ptl,*.pyi setf python " Radiance au BufNewFile,BufRead *.rad,*.mat setf radiance @@ -1401,8 +1410,8 @@ au BufNewFile,BufRead *.sdl,*.pr setf sdl " sed au BufNewFile,BufRead *.sed setf sed -" Sieve (RFC 3028) -au BufNewFile,BufRead *.siv setf sieve +" Sieve (RFC 3028, 5228) +au BufNewFile,BufRead *.siv,*.sieve setf sieve " Sendmail au BufNewFile,BufRead sendmail.cf setf sm @@ -1449,7 +1458,7 @@ au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog') " Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc. " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts -au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD* call dist#ft#SetFileTypeSH("bash") +au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD* call dist#ft#SetFileTypeSH("bash") au BufNewFile,BufRead .kshrc*,*.ksh call dist#ft#SetFileTypeSH("ksh") au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1)) @@ -1756,6 +1765,9 @@ au BufNewFile,BufRead *.vroom setf vroom " Webmacro au BufNewFile,BufRead *.wm setf webmacro +" WebAssembly +au BufNewFile,BufRead *.wast,*.wat setf wast + " Wget config au BufNewFile,BufRead .wgetrc,wgetrc setf wget @@ -1852,6 +1864,9 @@ au BufNewFile,BufRead */etc/xdg/menus/*.menu setf xml " ATI graphics driver configuration au BufNewFile,BufRead fglrxrc setf xml +" Web Services Description Language (WSDL) +au BufNewFile,BufRead *.wsdl setf xml + " XLIFF (XML Localisation Interchange File Format) is also XML au BufNewFile,BufRead *.xlf setf xml au BufNewFile,BufRead *.xliff setf xml @@ -1924,6 +1939,9 @@ au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif " Most of these should call s:StarSetf() to avoid names ending in .gz and the " like are used. +" More Apache style config files +au BufNewFile,BufRead */etc/proftpd/*.conf*,*/etc/proftpd/conf.*/* call s:StarSetf('apachestyle') + " More Apache config files au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache') au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.d/*.conf* call s:StarSetf('apache') diff --git a/runtime/ftplugin/chicken.vim b/runtime/ftplugin/chicken.vim new file mode 100644 index 0000000000..4dc1e57d0a --- /dev/null +++ b/runtime/ftplugin/chicken.vim @@ -0,0 +1,54 @@ +" CHICKEN-specific Vim customizations +" Last Change: 2018-03-05 +" Author: Evan Hanson <evhan@foldling.org> +" Maintainer: Evan Hanson <evhan@foldling.org> +" URL: https://foldling.org/vim/ftplugin/chicken.vim +" Notes: These are supplemental settings, to be loaded after the core +" Scheme ftplugin file (ftplugin/scheme.vim). Enable it by setting +" b:is_chicken=1 and filetype=scheme. + +if !exists('b:did_scheme_ftplugin') + finish +endif + +setl keywordprg=chicken-doc + +setl lispwords+=and-let* +setl lispwords+=compiler-typecase +setl lispwords+=condition-case +setl lispwords+=define-compiler-syntax +setl lispwords+=define-constant +setl lispwords+=define-external +setl lispwords+=define-for-syntax +setl lispwords+=define-foreign-type +setl lispwords+=define-inline +setl lispwords+=define-location +setl lispwords+=define-record +setl lispwords+=define-record-printer +setl lispwords+=define-specialization +setl lispwords+=fluid-let +setl lispwords+=foreign-lambda* +setl lispwords+=foreign-primitive +setl lispwords+=foreign-safe-lambda* +setl lispwords+=functor +setl lispwords+=handle-exceptions +setl lispwords+=let-compiler-syntax +setl lispwords+=let-location +setl lispwords+=let-optionals +setl lispwords+=let-optionals* +setl lispwords+=letrec-values +setl lispwords+=match +setl lispwords+=match-let +setl lispwords+=match-let* +setl lispwords+=match-letrec +setl lispwords+=module +setl lispwords+=receive +setl lispwords+=set!-values +setl lispwords+=test-group + +let b:undo_ftplugin = b:undo_ftplugin . ' keywordprg<' + +if exists('g:loaded_matchit') && !exists('b:match_words') + let b:match_words = '#>:<#' + let b:undo_ftplugin = b:undo_ftplugin . ' | unlet! b:match_words' +endif diff --git a/runtime/ftplugin/cmake.vim b/runtime/ftplugin/cmake.vim new file mode 100644 index 0000000000..e81cd4071c --- /dev/null +++ b/runtime/ftplugin/cmake.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin +" Language: CMake +" Maintainer: Keith Smiley <keithbsmiley@gmail.com> +" Last Change: 2017 Dec 24 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl commentstring<" + +setlocal commentstring=#\ %s diff --git a/runtime/ftplugin/debchangelog.vim b/runtime/ftplugin/debchangelog.vim index d2718db88e..a78f7811f1 100644 --- a/runtime/ftplugin/debchangelog.vim +++ b/runtime/ftplugin/debchangelog.vim @@ -1,22 +1,22 @@ " Vim filetype plugin file (GUI menu, folding and completion) " Language: Debian Changelog -" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> +" Maintainer: Debian Vim Maintainers " Former Maintainers: Michael Piefel <piefel@informatik.hu-berlin.de> " Stefano Zacchiroli <zack@debian.org> -" Last Change: 2014-01-31 +" Last Change: 2018-01-28 " License: Vim License -" URL: http://hg.debian.org/hg/pkg-vim/vim/file/unstable/runtime/ftplugin/debchangelog.vim +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debchangelog.vim " Bug completion requires apt-listbugs installed for Debian packages or " python-launchpadlib installed for Ubuntu packages -if exists("b:did_ftplugin") +if exists('b:did_ftplugin') finish endif let b:did_ftplugin=1 " {{{1 Local settings (do on every load) -if exists("g:debchangelog_fold_enable") +if exists('g:debchangelog_fold_enable') setlocal foldmethod=expr setlocal foldexpr=DebGetChangelogFold(v:lnum) setlocal foldtext=DebChangelogFoldText() @@ -28,10 +28,10 @@ setlocal tw=78 setlocal comments=f:* " Clean unloading -let b:undo_ftplugin = "setlocal tw< comments< foldmethod< foldexpr< foldtext<" +let b:undo_ftplugin = 'setlocal tw< comments< foldmethod< foldexpr< foldtext<' " }}}1 -if exists("g:did_changelog_ftplugin") +if exists('g:did_changelog_ftplugin') finish endif @@ -44,41 +44,41 @@ let g:did_changelog_ftplugin = 1 " Returns full name, either from $DEBFULLNAME or debianfullname. " TODO Is there a way to determine name from anywhere else? function <SID>FullName() - if exists("$DEBFULLNAME") + if exists('$DEBFULLNAME') return $DEBFULLNAME - elseif exists("g:debianfullname") + elseif exists('g:debianfullname') return g:debianfullname else - return "Your Name" + return 'Your Name' endif endfunction " Returns email address, from $DEBEMAIL, $EMAIL or debianemail. function <SID>Email() - if exists("$DEBEMAIL") + if exists('$DEBEMAIL') return $DEBEMAIL - elseif exists("$EMAIL") + elseif exists('$EMAIL') return $EMAIL - elseif exists("g:debianemail") + elseif exists('g:debianemail') return g:debianemail else - return "your@email.address" + return 'your@email.address' endif endfunction " Returns date in RFC822 format. function <SID>Date() let savelang = v:lc_time - execute "language time C" - let dateandtime = strftime("%a, %d %b %Y %X %z") - execute "language time " . savelang + execute 'language time C' + let dateandtime = strftime('%a, %d %b %Y %X %z') + execute 'language time ' . savelang return dateandtime endfunction function <SID>WarnIfNotUnfinalised() - if match(getline("."), " -- [[:alpha:]][[:alnum:].]")!=-1 + if match(getline('.'), ' -- [[:alpha:]][[:alnum:].]')!=-1 echohl WarningMsg - echo "The entry has not been unfinalised before editing." + echo 'The entry has not been unfinalised before editing.' echohl None return 1 endif @@ -86,10 +86,10 @@ function <SID>WarnIfNotUnfinalised() endfunction function <SID>Finalised() - let savelinenum = line(".") - normal 1G - call search("^ -- ") - if match(getline("."), " -- [[:alpha:]][[:alnum:].]")!=-1 + let savelinenum = line('.') + 1 + call search('^ -- ') + if match(getline('.'), ' -- [[:alpha:]][[:alnum:].]')!=-1 let returnvalue = 1 else let returnvalue = 0 @@ -109,54 +109,54 @@ function NewVersion() amenu disable Changelog.Unfinalise amenu enable Changelog.Finalise call append(0, substitute(getline(1), '-\([[:digit:]]\+\))', '-$$\1)', '')) - call append(1, "") - call append(2, "") - call append(3, " -- ") - call append(4, "") - call Urgency("low") - normal 1G0 - call search(")") - normal h - normal + call append(1, '') + call append(2, '') + call append(3, ' -- ') + call append(4, '') + call Urgency('low') + normal! 1G0 + call search(')') + normal! h + normal! call setline(1, substitute(getline(1), '-\$\$', '-', '')) - if exists("g:debchangelog_fold_enable") + if exists('g:debchangelog_fold_enable') foldopen endif call AddEntry() endfunction function AddEntry() - normal 1G - call search("^ -- ") - normal kk - call append(".", " * ") - normal jjj + 1 + call search('^ -- ') + .-2 + call append('.', ' * ') + .+3 let warn=<SID>WarnIfNotUnfinalised() - normal kk + .-2 if warn echohl MoreMsg - call input("Hit ENTER") + call input('Hit ENTER') echohl None endif startinsert! endfunction function CloseBug() - normal 1G - call search("^ -- ") + 1 + call search('^ -- ') let warn=<SID>WarnIfNotUnfinalised() - normal kk - call append(".", " * (closes: #" . input("Bug number to close: ") . ")") - normal j^ll + .-2 + call append('.', ' * (closes: #' . input('Bug number to close: ') . ')') + normal! j^ll startinsert endfunction function Distribution(dist) - call setline(1, substitute(getline(1), ') *\%(UNRELEASED\|\l\+\);', ") " . a:dist . ";", "")) + call setline(1, substitute(getline(1), ') *\%(UNRELEASED\|\l\+\);', ') ' . a:dist . ';', '')) endfunction function Urgency(urg) - call setline(1, substitute(getline(1), "urgency=.*$", "urgency=" . a:urg, "")) + call setline(1, substitute(getline(1), 'urgency=.*$', 'urgency=' . a:urg, '')) endfunction function <SID>UnfinaliseMenu() @@ -172,9 +172,9 @@ endfunction function Unfinalise() call <SID>UnfinaliseMenu() - normal 1G - call search("^ -- ") - call setline(".", " -- ") + 1 + call search('^ -- ') + call setline('.', ' -- ') endfunction function <SID>FinaliseMenu() @@ -190,9 +190,9 @@ endfunction function Finalise() call <SID>FinaliseMenu() - normal 1G - call search("^ -- ") - call setline(".", " -- " . <SID>FullName() . " <" . <SID>Email() . "> " . <SID>Date()) + 1 + call search('^ -- ') + call setline('.', ' -- ' . <SID>FullName() . ' <' . <SID>Email() . '> ' . <SID>Date()) endfunction @@ -239,7 +239,7 @@ function! s:getAuthor(zonestart, zoneend) let linepos = a:zoneend while linepos >= a:zonestart let line = getline(linepos) - if line =~ '^ --' + if line =~# '^ --' return substitute(line, '^ --\s*\([^<]\+\)\s*.*', '\1', '') endif let linepos -= 1 @@ -254,7 +254,7 @@ function! DebGetPkgSrcName(lineno) let pkgname = '' while lineidx > 0 let curline = getline(lineidx) - if curline =~ '^\S' + if curline =~# '^\S' let pkgname = matchlist(curline, '^\(\S\+\).*$')[1] break endif @@ -264,7 +264,7 @@ function! DebGetPkgSrcName(lineno) endfunction function! DebChangelogFoldText() - if v:folddashes == '-' " changelog entry fold + if v:folddashes ==# '-' " changelog entry fold return foldtext() . ' -- ' . s:getAuthor(v:foldstart, v:foldend) . ' ' endif return foldtext() @@ -272,19 +272,19 @@ endfunction function! DebGetChangelogFold(lnum) let line = getline(a:lnum) - if line =~ '^\w\+' + if line =~# '^\w\+' return '>1' " beginning of a changelog entry endif - if line =~ '^\s\+\[.*\]' + if line =~# '^\s\+\[.*\]' return '>2' " beginning of an author-specific chunk endif - if line =~ '^ --' + if line =~# '^ --' return '1' endif return '=' endfunction -if exists("g:debchangelog_fold_enable") +if exists('g:debchangelog_fold_enable') silent! foldopen! " unfold the entry the cursor is on (usually the first one) endif @@ -305,13 +305,13 @@ fun! DebCompleteBugs(findstart, base) let try_colidx = col('.') - 1 let colidx = -1 " default to no-completion-possible - while try_colidx > 0 && line[try_colidx - 1] =~ '\s\|\d\|#\|,\|:' + while try_colidx > 0 && line[try_colidx - 1] =~# '\s\|\d\|#\|,\|:' let try_colidx = try_colidx - 1 - if line[try_colidx] == '#' && colidx == -1 + if line[try_colidx] ==# '#' && colidx == -1 " found hash, where we complete from: let colidx = try_colidx - elseif line[try_colidx] == ':' - if try_colidx > 1 && strpart(line, try_colidx - 2, 3) =~ '\clp:' + elseif line[try_colidx] ==# ':' + if try_colidx > 1 && strpart(line, try_colidx - 2, 3) =~? '\clp:' let g:debchangelog_complete_mode = 'lp' endif break @@ -320,7 +320,7 @@ fun! DebCompleteBugs(findstart, base) return colidx else " return matches: let bug_lines = [] - if g:debchangelog_complete_mode == 'lp' + if g:debchangelog_complete_mode ==? 'lp' if ! has('python') echoerr 'vim must be built with Python support to use LP bug completion' return @@ -363,7 +363,7 @@ EOF for line in bug_lines let parts = matchlist(line, '^\s*\(#\S\+\)\s*-\s*\(.*\)$') " filter only those which match a:base: - if parts[1] !~ "^" . a:base + if parts[1] !~ '^' . a:base continue endif let completion = {} diff --git a/runtime/ftplugin/debcontrol.vim b/runtime/ftplugin/debcontrol.vim index 7871d9897f..3a6e39a682 100644 --- a/runtime/ftplugin/debcontrol.vim +++ b/runtime/ftplugin/debcontrol.vim @@ -1,18 +1,18 @@ " Vim filetype plugin file (GUI menu and folding) " Language: Debian control files -" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> +" Maintainer: Debian Vim Maintainers " Former Maintainer: Pierre Habouzit <madcoder@debian.org> -" Last Change: 2008-03-08 -" URL: http://hg.debian.org/hg/pkg-vim/vim/raw-file/tip/runtime/ftplugin/debcontrol.vim +" Last Change: 2018-01-28 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debcontrol.vim " Do these settings once per buffer -if exists("b:did_ftplugin") +if exists('b:did_ftplugin') finish endif let b:did_ftplugin=1 " {{{1 Local settings (do on every load) -if exists("g:debcontrol_fold_enable") +if exists('g:debcontrol_fold_enable') setlocal foldmethod=expr setlocal foldexpr=DebControlFold(v:lnum) setlocal foldtext=DebControlFoldText() @@ -20,7 +20,7 @@ endif setlocal textwidth=0 " Clean unloading -let b:undo_ftplugin = "setlocal tw< foldmethod< foldexpr< foldtext<" +let b:undo_ftplugin = 'setlocal tw< foldmethod< foldexpr< foldtext<' " }}}1 @@ -32,7 +32,7 @@ function! s:getField(f, lnum) while line !~ '^'.a:f.':' let fwdsteps += 1 let line = getline(a:lnum + fwdsteps) - if line == '' + if line ==# '' return 'unknown' endif endwhile @@ -40,9 +40,9 @@ function! s:getField(f, lnum) endfunction function! DebControlFoldText() - if v:folddashes == '-' " debcontrol entry fold + if v:folddashes ==# '-' " debcontrol entry fold let type = substitute(getline(v:foldstart), ':.*', '', '') - if type == 'Source' + if type ==# 'Source' let ftext = substitute(foldtext(), ' *Source: *', ' ', '') return ftext . ' -- ' . s:getField('Maintainer', v:foldstart) . ' ' endif @@ -56,11 +56,11 @@ endfunction function! DebControlFold(l) " This is for not merging blank lines around folds to them - if getline(a:l) =~ '^Source:' + if getline(a:l) =~# '^Source:' return '>1' endif - if getline(a:l) =~ '^Package:' + if getline(a:l) =~# '^Package:' return '>1' endif diff --git a/runtime/ftplugin/logtalk.dict b/runtime/ftplugin/logtalk.dict index e3b9e6f2a4..3fcdfc6f6a 100644 --- a/runtime/ftplugin/logtalk.dict +++ b/runtime/ftplugin/logtalk.dict @@ -1,164 +1,262 @@ -encoding +abolish +abolish_category +abolish_events +abolish_object +abolish_protocol +abs +acos +acyclic_term +after +alias +always_true_or_false_goals +arg +asin +asserta +assertz +atan +atan2 +atom +atomic +atom_chars +atom_chars +atom_codes +atom_codes +atom_concat +atom_concat +atom_length +at_end_of_stream +bagof +before +built_in +call +callable calls +catch category +category_property +ceiling +char_code +char_conversion +clause +clean +close +code_prefix +coinduction +coinductive +compare +complements +complements +complements_object +compound +conforms_to_protocol +context +context_switching_calls +copy_term +cos +create_category +create_logtalk_flag +create_object +create_protocol +current_category +current_char_conversion +current_event +current_input +current_logtalk_flag +current_object +current_op +current_output +current_predicate +current_prolog_flag +current_protocol +debug +define_events +deprecated +discontiguous +div +domain_error +duplicated_directives dynamic +dynamic_declarations +elif +else +encoding +encoding_directive +endif end_category end_object end_protocol -info -initialization -object -protocol -synchronized -threaded -uses -alias -discontiguous -meta_predicate -mode -op -private -protected -public -current_object -current_protocol -current_category -object_property -protocol_property -category_property -create_object -create_protocol -create_category -abolish_object -abolish_protocol -abolish_category -complements -complements_object +engines +ensure_loaded +evaluation_error +events +existence_error +exp +expand_goal +expand_term +export extends +extends_category extends_object extends_protocol -extends_category +fail +false +findall +float +float_fractional_part +float_integer_part +floor +flush_output +forall +forward +functor +get_byte +get_char +get_code +goal_expansion +ground +halt +hook +if +ignore implements implements_protocol imports imports_category +include +info +initialization instantiates instantiates_class -specializes -specializes_class -abolish_events -current_event -define_events -logtalk_load +instantiation_error +integer +keysort +lambda_variables +log logtalk_compile logtalk_library_path -current_logtalk_flag -set_logtalk_flag -threaded_call -threaded_once -threaded_ignore -threaded_exit -threaded_peek -threaded_wait -threaded_notify -self -this -sender -parameter -before -after -phrase -expand_term -goal_expansion -term_expansion -true -fail -call -catch -throw -unify_with_occurs_check -var -atom -integer -float -atomic -compound +logtalk_load +logtalk_load_context +logtalk_make +logtalk_make_target_action +max +meta_non_terminal +meta_predicate +min +missing_directives +mod +mode +modules +multifile +nl nonvar number -arg -copy_term -functor -current_predicate -predicate_property -abolish -assertz -asserta -clause -retract -retractall -bagof -findall -forall -setof -current_input -current_output -set_input -set_output +numbervars +number_chars +number_chars +number_codes +number_codes +object +object_property +once +op open -close -flush_output -stream_property -at_end_of_stream -set_stream_position -get_char -get_code +optimize +parameter +peek_byte peek_char peek_code +permission_error +phrase +portability +predicate_property +private +prolog_compatible_version +prolog_compiler +prolog_dialect +prolog_loader +prolog_version +protected +protocol +protocol_property +public +put_byte put_char put_code -nl -get_byte -peek_byte -put_byte read read_term -write -writeq -write_canonical -atom_chars -atom_codes -atom_concat -number_chars -number_codes -current_op -char_conversion -current_char_conversion -once -repeat -atom_length -atom_concat -sub_atom -atom_chars -atom_codes -char_code -number_chars -number_codes -set_prolog_flag -current_prolog_flag -halt -abs -atan -ceiling -cos -exp -float_fractional_part -float_integer_part -floor -log -mod +redefined_built_ins +reexport +reload rem +repeat +report +representation_error +resource_error +retract +retractall round +scratch_directory +self +sender +setof +set_input +set_logtalk_flag +set_output +set_prolog_flag +set_stream_position sign sin +singleton_variables +sort +source_data +specializes +specializes_class sqrt +stream_property +subsumes_term +sub_atom +suspicious_calls +synchronized +syntax_error +system_error +tabling +tan +term_expansion +term_variables +this +threaded +threaded_call +threaded_engine +threaded_engine_create +threaded_engine_destroy +threaded_engine_fetch +threaded_engine_next +threaded_engine_next_reified +threaded_engine_post +threaded_engine_self +threaded_engine_yield +threaded_exit +threaded_ignore +threaded_notify +threaded_once +threaded_peek +threaded_wait +threads +throw +trivial_goal_fails +true truncate +type_error +undefined_predicates +underscore_variables +unify_with_occurs_check +unknown_entities +unknown_predicates +uses +use_module +var +version +write +writeq +write_canonical +xor diff --git a/runtime/ftplugin/logtalk.vim b/runtime/ftplugin/logtalk.vim index e71307a399..667907ce5f 100644 --- a/runtime/ftplugin/logtalk.vim +++ b/runtime/ftplugin/logtalk.vim @@ -1,7 +1,7 @@ " Logtalk filetype plugin file " Language: Logtalk " Maintainer: Paulo Moura <pmoura@logtalk.org> -" Latest Revision: 2007-07-06 +" Latest Revision: 2018-08-03 if exists("b:did_ftplugin") finish @@ -10,9 +10,10 @@ let b:did_ftplugin = 1 let b:undo_ftplugin = "setl ts< sw< fdm< fdc< ai< dict<" -"setlocal ts=4 +setlocal ts=4 setlocal sw=4 setlocal fdm=syntax +setlocal fdn=10 setlocal fdc=2 setlocal autoindent setlocal dict=$VIMRUNTIME/ftplugin/logtalk.dict diff --git a/runtime/ftplugin/nsis.vim b/runtime/ftplugin/nsis.vim index 949691bf6e..1a35127c86 100644 --- a/runtime/ftplugin/nsis.vim +++ b/runtime/ftplugin/nsis.vim @@ -1,22 +1,43 @@ " Vim ftplugin file -" Language: NSIS script -" Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2008-07-09 - -let s:cpo_save = &cpo -set cpo&vim +" Language: NSIS script +" Maintainer: Ken Takata +" URL: https://github.com/k-takata/vim-nsis +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Last Change: 2018-01-26 if exists("b:did_ftplugin") finish endif + +let s:cpo_save = &cpo +set cpo&vim + let b:did_ftplugin = 1 let b:undo_ftplugin = "setl com< cms< fo< def< inc<" + \ " | unlet! b:match_ignorecase b:match_words" setlocal comments=s1:/*,mb:*,ex:*/,b:#,:; commentstring=;\ %s setlocal formatoptions-=t formatoptions+=croql setlocal define=^\\s*!define\\%(\\%(utc\\)\\=date\\|math\\)\\= setlocal include=^\\s*!include\\%(/NONFATAL\\)\\= +if exists("loaded_matchit") + let b:match_ignorecase = 1 + let b:match_words = + \ '\${\%(If\|IfNot\|Unless\)}:\${\%(Else\|ElseIf\|ElseIfNot\|ElseUnless\)}:\${\%(EndIf\|EndUnless\)},' . + \ '\${Select}:\${EndSelect},' . + \ '\${Switch}:\${EndSwitch},' . + \ '\${\%(Do\|DoWhile\|DoUntil\)}:\${\%(Loop\|LoopWhile\|LoopUntil\)},' . + \ '\${\%(For\|ForEach\)}:\${Next},' . + \ '\<Function\>:\<FunctionEnd\>,' . + \ '\<Section\>:\<SectionEnd\>,' . + \ '\<SectionGroup\>:\<SectionGroupEnd\>,' . + \ '\<PageEx\>:\<PageExEnd\>,' . + \ '\${MementoSection}:\${MementoSectionEnd},' . + \ '!if\%(\%(macro\)\?n\?def\)\?\>:!else\>:!endif\>,' . + \ '!macro\>:!macroend\>' +endif + let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim index 54926418de..5c4a59b1a9 100644 --- a/runtime/ftplugin/python.vim +++ b/runtime/ftplugin/python.vim @@ -3,7 +3,7 @@ " Maintainer: Tom Picton <tom@tompicton.co.uk> " Previous Maintainer: James Sully <sullyj3@gmail.com> " Previous Maintainer: Johannes Zellner <johannes@zellner.org> -" Last Change: Thur, 09 November 2017 +" Last Change: Sun, 15 April 2018 " https://github.com/tpict/vim-ftplugin-python if exists("b:did_ftplugin") | finish | endif @@ -14,12 +14,33 @@ set cpo&vim setlocal cinkeys-=0# setlocal indentkeys-=0# setlocal include=^\\s*\\(from\\\|import\\) -setlocal includeexpr=substitute(v:fname,'\\.','/','g') + +" For imports with leading .., append / and replace additional .s with ../ +let b:grandparent_match = '^\(.\.\)\(\.*\)' +let b:grandparent_sub = '\=submatch(1)."/".repeat("../",strlen(submatch(2)))' + +" For imports with a single leading ., replace it with ./ +let b:parent_match = '^\.\(\.\)\@!' +let b:parent_sub = './' + +" Replace any . sandwiched between word characters with / +let b:child_match = '\(\w\)\.\(\w\)' +let b:child_sub = '\1/\2' + +setlocal includeexpr=substitute(substitute(substitute( + \v:fname, + \b:grandparent_match,b:grandparent_sub,''), + \b:parent_match,b:parent_sub,''), + \b:child_match,b:child_sub,'g') + setlocal suffixesadd=.py setlocal comments=b:#,fb:- setlocal commentstring=#\ %s setlocal omnifunc=pythoncomplete#Complete +if has('python3') + setlocal omnifunc=python3complete#Complete +endif set wildignore+=*.pyc @@ -32,35 +53,35 @@ let b:prev='\v^\s*(class\|def\|async def)>' let b:next_end='\v\S\n*(%$\|^(\s*\n*)*(class\|def\|async def)\|^\S)' let b:prev_end='\v\S\n*(^(\s*\n*)*(class\|def\|async def)\|^\S)' -execute "nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '". b:next_toplevel."', 'W')<cr>" -execute "nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '". b:prev_toplevel."', 'Wb')<cr>" -execute "nnoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', 0)<cr>" -execute "nnoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', 0)<cr>" -execute "nnoremap <silent> <buffer> ]m :call <SID>Python_jump('n', '". b:next."', 'W')<cr>" -execute "nnoremap <silent> <buffer> [m :call <SID>Python_jump('n', '". b:prev."', 'Wb')<cr>" -execute "nnoremap <silent> <buffer> ]M :call <SID>Python_jump('n', '". b:next_end."', 'W', 0)<cr>" -execute "nnoremap <silent> <buffer> [M :call <SID>Python_jump('n', '". b:prev_end."', 'Wb', 0)<cr>" - -execute "onoremap <silent> <buffer> ]] :call <SID>Python_jump('o', '". b:next_toplevel."', 'W')<cr>" -execute "onoremap <silent> <buffer> [[ :call <SID>Python_jump('o', '". b:prev_toplevel."', 'Wb')<cr>" -execute "onoremap <silent> <buffer> ][ :call <SID>Python_jump('o', '". b:next_endtoplevel."', 'W', 0)<cr>" -execute "onoremap <silent> <buffer> [] :call <SID>Python_jump('o', '". b:prev_endtoplevel."', 'Wb', 0)<cr>" -execute "onoremap <silent> <buffer> ]m :call <SID>Python_jump('o', '". b:next."', 'W')<cr>" -execute "onoremap <silent> <buffer> [m :call <SID>Python_jump('o', '". b:prev."', 'Wb')<cr>" -execute "onoremap <silent> <buffer> ]M :call <SID>Python_jump('o', '". b:next_end."', 'W', 0)<cr>" -execute "onoremap <silent> <buffer> [M :call <SID>Python_jump('o', '". b:prev_end."', 'Wb', 0)<cr>" - -execute "xnoremap <silent> <buffer> ]] :call <SID>Python_jump('x', '". b:next_toplevel."', 'W')<cr>" -execute "xnoremap <silent> <buffer> [[ :call <SID>Python_jump('x', '". b:prev_toplevel."', 'Wb')<cr>" -execute "xnoremap <silent> <buffer> ][ :call <SID>Python_jump('x', '". b:next_endtoplevel."', 'W', 0)<cr>" -execute "xnoremap <silent> <buffer> [] :call <SID>Python_jump('x', '". b:prev_endtoplevel."', 'Wb', 0)<cr>" -execute "xnoremap <silent> <buffer> ]m :call <SID>Python_jump('x', '". b:next."', 'W')<cr>" -execute "xnoremap <silent> <buffer> [m :call <SID>Python_jump('x', '". b:prev."', 'Wb')<cr>" -execute "xnoremap <silent> <buffer> ]M :call <SID>Python_jump('x', '". b:next_end."', 'W', 0)<cr>" -execute "xnoremap <silent> <buffer> [M :call <SID>Python_jump('x', '". b:prev_end."', 'Wb', 0)<cr>" +execute "nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '". b:next_toplevel."', 'W', v:count1)<cr>" +execute "nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '". b:prev_toplevel."', 'Wb', v:count1)<cr>" +execute "nnoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', 0, v:count1)<cr>" +execute "nnoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', 0, v:count1)<cr>" +execute "nnoremap <silent> <buffer> ]m :call <SID>Python_jump('n', '". b:next."', 'W', v:count1)<cr>" +execute "nnoremap <silent> <buffer> [m :call <SID>Python_jump('n', '". b:prev."', 'Wb', v:count1)<cr>" +execute "nnoremap <silent> <buffer> ]M :call <SID>Python_jump('n', '". b:next_end."', 'W', 0, v:count1)<cr>" +execute "nnoremap <silent> <buffer> [M :call <SID>Python_jump('n', '". b:prev_end."', 'Wb', 0, v:count1)<cr>" + +execute "onoremap <silent> <buffer> ]] :call <SID>Python_jump('o', '". b:next_toplevel."', 'W', v:count1)<cr>" +execute "onoremap <silent> <buffer> [[ :call <SID>Python_jump('o', '". b:prev_toplevel."', 'Wb', v:count1)<cr>" +execute "onoremap <silent> <buffer> ][ :call <SID>Python_jump('o', '". b:next_endtoplevel."', 'W', 0, v:count1)<cr>" +execute "onoremap <silent> <buffer> [] :call <SID>Python_jump('o', '". b:prev_endtoplevel."', 'Wb', 0, v:count1)<cr>" +execute "onoremap <silent> <buffer> ]m :call <SID>Python_jump('o', '". b:next."', 'W', v:count1)<cr>" +execute "onoremap <silent> <buffer> [m :call <SID>Python_jump('o', '". b:prev."', 'Wb', v:count1)<cr>" +execute "onoremap <silent> <buffer> ]M :call <SID>Python_jump('o', '". b:next_end."', 'W', 0, v:count1)<cr>" +execute "onoremap <silent> <buffer> [M :call <SID>Python_jump('o', '". b:prev_end."', 'Wb', 0, v:count1)<cr>" + +execute "xnoremap <silent> <buffer> ]] :call <SID>Python_jump('x', '". b:next_toplevel."', 'W', v:count1)<cr>" +execute "xnoremap <silent> <buffer> [[ :call <SID>Python_jump('x', '". b:prev_toplevel."', 'Wb', v:count1)<cr>" +execute "xnoremap <silent> <buffer> ][ :call <SID>Python_jump('x', '". b:next_endtoplevel."', 'W', 0, v:count1)<cr>" +execute "xnoremap <silent> <buffer> [] :call <SID>Python_jump('x', '". b:prev_endtoplevel."', 'Wb', 0, v:count1)<cr>" +execute "xnoremap <silent> <buffer> ]m :call <SID>Python_jump('x', '". b:next."', 'W', v:count1)<cr>" +execute "xnoremap <silent> <buffer> [m :call <SID>Python_jump('x', '". b:prev."', 'Wb', v:count1)<cr>" +execute "xnoremap <silent> <buffer> ]M :call <SID>Python_jump('x', '". b:next_end."', 'W', 0, v:count1)<cr>" +execute "xnoremap <silent> <buffer> [M :call <SID>Python_jump('x', '". b:prev_end."', 'Wb', 0, v:count1)<cr>" if !exists('*<SID>Python_jump') - fun! <SID>Python_jump(mode, motion, flags, ...) range + fun! <SID>Python_jump(mode, motion, flags, count, ...) range let l:startofline = (a:0 >= 1) ? a:1 : 1 if a:mode == 'x' @@ -71,7 +92,7 @@ if !exists('*<SID>Python_jump') normal! 0 endif - let cnt = v:count1 + let cnt = a:count mark ' while cnt > 0 call search(a:motion, a:flags) diff --git a/runtime/ftplugin/rst.vim b/runtime/ftplugin/rst.vim index e61213e7a5..9d737cde44 100644 --- a/runtime/ftplugin/rst.vim +++ b/runtime/ftplugin/rst.vim @@ -1,10 +1,12 @@ -" Vim filetype plugin file -" Language: reStructuredText documentation format -" Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2008-07-09 +" reStructuredText filetype plugin file +" Language: reStructuredText documentation format +" Maintainer: Marshall Ward <marshall.ward@gmail.com> +" Original Maintainer: Nikolai Weibull <now@bitwi.se> +" Website: https://github.com/marshallward/vim-restructuredtext +" Latest Revision: 2018-01-07 if exists("b:did_ftplugin") - finish + finish endif let b:did_ftplugin = 1 @@ -16,5 +18,25 @@ let b:undo_ftplugin = "setl com< cms< et< fo<" setlocal comments=fb:.. commentstring=..\ %s expandtab setlocal formatoptions+=tcroql +" reStructuredText standard recommends that tabs be expanded to 8 spaces +" The choice of 3-space indentation is to provide slightly better support for +" directives (..) and ordered lists (1.), although it can cause problems for +" many other cases. +" +" More sophisticated indentation rules should be revisted in the future. + +if !exists("g:rst_style") || g:rst_style != 0 + setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8 +endif + +if has('patch-7.3.867') " Introduced the TextChanged event. + setlocal foldmethod=expr + setlocal foldexpr=RstFold#GetRstFold() + setlocal foldtext=RstFold#GetRstFoldText() + augroup RstFold + autocmd TextChanged,InsertLeave <buffer> unlet! b:RstFoldCache + augroup END +endif + let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/ftplugin/scheme.vim b/runtime/ftplugin/scheme.vim index ab1543a5ee..62fd327e07 100644 --- a/runtime/ftplugin/scheme.vim +++ b/runtime/ftplugin/scheme.vim @@ -1,45 +1,57 @@ -" Vim filetype plugin -" Language: Scheme -" Maintainer: Sergey Khorev <sergey.khorev@gmail.com> -" URL: http://sites.google.com/site/khorser/opensource/vim -" Original author: Dorai Sitaram <ds26@gte.com> -" Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html -" Last Change: Oct 23, 2013 - -" Only do this when not done yet for this buffer -if exists("b:did_ftplugin") +" Vim filetype plugin file +" Language: Scheme (R7RS) +" Last Change: 2018-03-05 +" Author: Evan Hanson <evhan@foldling.org> +" Maintainer: Evan Hanson <evhan@foldling.org> +" Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com> +" URL: https://foldling.org/vim/ftplugin/scheme.vim + +if exists('b:did_ftplugin') finish endif -" Don't load another plugin for this buffer -let b:did_ftplugin = 1 +let s:cpo = &cpo +set cpo&vim -" Copy-paste from ftplugin/lisp.vim -setl comments=:; -setl define=^\\s*(def\\k* -setl formatoptions-=t -setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94 setl lisp +setl comments=:;;;;,:;;;,:;;,:;,sr:#\|,mb:\|,ex:\|# setl commentstring=;%s +setl define=^\\s*(def\\k* +setl iskeyword=33,35-39,42-43,45-58,60-90,94,95,97-122,126 -setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|# +let b:undo_ftplugin = 'setl lisp< comments< commentstring< define< iskeyword<' -" Scheme-specific settings -if exists("b:is_mzscheme") || exists("is_mzscheme") - " improve indenting - setl iskeyword+=#,%,^ - setl lispwords+=module,parameterize,let-values,let*-values,letrec-values - setl lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case - setl lispwords+=define-signature,unit,unit/sig,compund-unit/sig,define-values/invoke-unit/sig -endif +setl lispwords=case +setl lispwords+=define +setl lispwords+=define-record-type +setl lispwords+=define-syntax +setl lispwords+=define-values +setl lispwords+=do +setl lispwords+=guard +setl lispwords+=lambda +setl lispwords+=let +setl lispwords+=let* +setl lispwords+=let*-values +setl lispwords+=let-syntax +setl lispwords+=let-values +setl lispwords+=letrec +setl lispwords+=letrec* +setl lispwords+=letrec-syntax +setl lispwords+=parameterize +setl lispwords+=set! +setl lispwords+=syntax-rules +setl lispwords+=unless +setl lispwords+=when + +let b:undo_ftplugin = b:undo_ftplugin . ' lispwords<' -if exists("b:is_chicken") || exists("is_chicken") - " improve indenting - setl iskeyword+=#,%,^ - setl lispwords+=let-optionals,let-optionals*,declare - setl lispwords+=let-values,let*-values,letrec-values - setl lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case - setl lispwords+=cond-expand,and-let*,foreign-lambda,foreign-lambda* +let b:did_scheme_ftplugin = 1 + +if exists('b:is_chicken') || exists('g:is_chicken') + exe 'ru! ftplugin/chicken.vim' endif -let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lispwords< lisp< commentstring<" +unlet b:did_scheme_ftplugin +let b:did_ftplugin = 1 +let &cpo = s:cpo +unlet s:cpo diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index f34655f330..eb8061d84f 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Vim " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2017 Nov 06 +" Last Change: 2018 Aug 07 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -14,8 +14,28 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo-=C -let b:undo_ftplugin = "setl fo< isk< com< tw< commentstring< keywordprg<" - \ . "| unlet! b:match_ignorecase b:match_words b:match_skip" +if !exists('*VimFtpluginUndo') + func VimFtpluginUndo() + setl fo< isk< com< tw< commentstring< keywordprg< + if exists('b:did_add_maps') + silent! nunmap <buffer> [[ + silent! vunmap <buffer> [[ + silent! nunmap <buffer> ]] + silent! vunmap <buffer> ]] + silent! nunmap <buffer> [] + silent! vunmap <buffer> [] + silent! nunmap <buffer> ][ + silent! vunmap <buffer> ][ + silent! nunmap <buffer> ]" + silent! vunmap <buffer> ]" + silent! nunmap <buffer> [" + silent! vunmap <buffer> [" + endif + unlet! b:match_ignorecase b:match_words b:match_skip b:did_add_maps + endfunc +endif + +let b:undo_ftplugin = "call VimFtpluginUndo()" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting <CR> or using "o". @@ -42,21 +62,25 @@ setlocal commentstring=\"%s " Prefer Vim help instead of manpages. setlocal keywordprg=:help -" Move around functions. -nnoremap <silent><buffer> [[ m':call search('^\s*fu\%[nction]\>', "bW")<CR> -vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "bW")<CR> -nnoremap <silent><buffer> ]] m':call search('^\s*fu\%[nction]\>', "W")<CR> -vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "W")<CR> -nnoremap <silent><buffer> [] m':call search('^\s*endf*\%[unction]\>', "bW")<CR> -vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "bW")<CR> -nnoremap <silent><buffer> ][ m':call search('^\s*endf*\%[unction]\>', "W")<CR> -vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "W")<CR> - -" Move around comments -nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> -vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> -nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> -vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> +if !exists("no_plugin_maps") && !exists("no_vim_maps") + let b:did_add_maps = 1 + + " Move around functions. + nnoremap <silent><buffer> [[ m':call search('^\s*fu\%[nction]\>', "bW")<CR> + vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "bW")<CR> + nnoremap <silent><buffer> ]] m':call search('^\s*fu\%[nction]\>', "W")<CR> + vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "W")<CR> + nnoremap <silent><buffer> [] m':call search('^\s*endf*\%[unction]\>', "bW")<CR> + vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "bW")<CR> + nnoremap <silent><buffer> ][ m':call search('^\s*endf*\%[unction]\>', "W")<CR> + vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "W")<CR> + + " Move around comments + nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> + vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> + nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> + vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> +endif " Let the matchit plugin know what items can be matched. if exists("loaded_matchit") diff --git a/runtime/ftplugin/wast.vim b/runtime/ftplugin/wast.vim new file mode 100644 index 0000000000..0d9e98d37a --- /dev/null +++ b/runtime/ftplugin/wast.vim @@ -0,0 +1,17 @@ +" Vim filetype plugin file +" Language: WebAssembly +" Maintainer: rhysd <lin90162@yahoo.co.jp> +" Last Change: Jul 29, 2018 +" For bugs, patches and license go to https://github.com/rhysd/vim-wasm + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=s:(;,e:;),:;; +setlocal commentstring=(;%s;) +setlocal formatoptions-=t +setlocal iskeyword+=$,.,/ + +let b:undo_ftplugin = "setlocal comments< commentstring< formatoptions< iskeyword<" diff --git a/runtime/ftplugin/xml.vim b/runtime/ftplugin/xml.vim index 236e870537..573a6ba441 100644 --- a/runtime/ftplugin/xml.vim +++ b/runtime/ftplugin/xml.vim @@ -1,8 +1,10 @@ " Vim filetype plugin file " Language: xml -" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> -" Last Changed: 20 Jan 2009 -" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin +" Maintainer: Christian Brabandt <cb@256bit.org> +" Last Changed: May 08th, 2018 +" Repository: https://github.com/chrisbra/vim-xml-ftplugin +" Previous Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> +" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 @@ -10,16 +12,16 @@ let b:did_ftplugin = 1 " Make sure the continuation lines below do not cause problems in " compatibility mode. let s:save_cpo = &cpo -set cpo-=C +set cpo&vim setlocal commentstring=<!--%s--> -setlocal comments=s:<!--,m:\ \ \ \ \ ,e:--> +" Remove the middlepart from the comments section, as this causes problems: +" https://groups.google.com/d/msg/vim_dev/x4GT-nqa0Kg/jvtRnEbtAnMJ +setlocal comments=s:<!--,e:--> setlocal formatoptions-=t -if !exists("g:ft_xml_autocomment") || (g:ft_xml_autocomment == 1) - setlocal formatoptions+=croql -endif - +setlocal formatoptions+=croql +setlocal formatexpr=xmlformat#Format() " XML: thanks to Johannes Zellner and Akbar Ibrahim " - case sensitive @@ -39,7 +41,6 @@ if exists("loaded_matchit") \ '<\@<=\%([^ \t>/]\+\)\%(\s\+[^/>]*\|$\):/>' endif -" " For Omni completion, by Mikolaj Machowski. if exists('&ofu') setlocal ofu=xmlcomplete#CompleteTags @@ -47,17 +48,17 @@ endif command! -nargs=+ XMLns call xmlcomplete#CreateConnection(<f-args>) command! -nargs=? XMLent call xmlcomplete#CreateEntConnection(<f-args>) - " Change the :browse e filter to primarily show xml-related files. -if has("gui_win32") +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter="XML Files (*.xml)\t*.xml\n" . - \ "DTD Files (*.dtd)\t*.dtd\n" . - \ "All Files (*.*)\t*.*\n" + \ "DTD Files (*.dtd)\t*.dtd\n" . + \ "XSD Files (*.xsd)\t*.xsd\n" . + \ "All Files (*.*)\t*.*\n" endif " Undo the stuff we changed. -let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" . - \ " | unlet! b:match_ignorecase b:match_words b:browsefilter" +let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions< formatexpr< " . + \ " | unlet! b:match_ignorecase b:match_words b:browsefilter" " Restore the saved compatibility options. let &cpo = s:save_cpo diff --git a/runtime/ftplugin/zimbu.vim b/runtime/ftplugin/zimbu.vim index 558aea7df0..24674776cb 100644 --- a/runtime/ftplugin/zimbu.vim +++ b/runtime/ftplugin/zimbu.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Zimbu " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2012 Sep 08 +" Last Change: 2017 Dec 05 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -135,8 +135,10 @@ iabbr <buffer> <expr> until GCUpperSpace("until") iabbr <buffer> <expr> while GCUpperSpace("while") iabbr <buffer> <expr> repeat GCUpper("repeat") -nnoremap <silent> <buffer> [[ m`:call ZimbuGoStartBlock()<CR> -nnoremap <silent> <buffer> ]] m`:call ZimbuGoEndBlock()<CR> +if !exists("no_plugin_maps") && !exists("no_zimbu_maps") + nnoremap <silent> <buffer> [[ m`:call ZimbuGoStartBlock()<CR> + nnoremap <silent> <buffer> ]] m`:call ZimbuGoEndBlock()<CR> +endif " Using a function makes sure the search pattern is restored func! ZimbuGoStartBlock() diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim index 37697841fd..ba043e968a 100644 --- a/runtime/indent/html.vim +++ b/runtime/indent/html.vim @@ -2,7 +2,7 @@ " Header: "{{{ " Maintainer: Bram Moolenaar " Original Author: Andy Wokula <anwoku@yahoo.de> -" Last Change: 2017 Jun 13 +" Last Change: 2018 Mar 28 " Version: 1.0 " Description: HTML indent script with cached state for faster indenting on a " range of lines. @@ -56,6 +56,9 @@ let s:cpo_save = &cpo set cpo-=C "}}} +" Pattern to match the name of a tag, including custom elements. +let s:tagname = '\w\+\(-\w\+\)*' + " Check and process settings from b:html_indent and g:html_indent... variables. " Prefer using buffer-local settings over global settings, so that there can " be defaults for all HTML files and exceptions for specific types of HTML @@ -213,7 +216,8 @@ endfunc "}}} " Add known tag pairs. " Self-closing tags and tags that are sometimes {{{ " self-closing (e.g., <p>) are not here (when encountering </p> we can find -" the matching <p>, but not the other way around). +" the matching <p>, but not the other way around). Known self-closing tags: +" 'p', 'img', 'source'. " Old HTML tags: call s:AddITags(s:indent_tags, [ \ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big', @@ -230,9 +234,9 @@ call s:AddITags(s:indent_tags, [ call s:AddITags(s:indent_tags, [ \ 'area', 'article', 'aside', 'audio', 'bdi', 'canvas', \ 'command', 'data', 'datalist', 'details', 'embed', 'figcaption', - \ 'figure', 'footer', 'header', 'keygen', 'mark', 'meter', 'nav', 'output', - \ 'progress', 'rp', 'rt', 'ruby', 'section', 'source', 'summary', 'svg', - \ 'time', 'track', 'video', 'wbr']) + \ 'figure', 'footer', 'header', 'keygen', 'main', 'mark', 'meter', + \ 'nav', 'output', 'picture', 'progress', 'rp', 'rt', 'ruby', 'section', + \ 'summary', 'svg', 'time', 'track', 'video', 'wbr']) " Tags added for web components: call s:AddITags(s:indent_tags, [ @@ -280,7 +284,7 @@ func! s:CountITags(text) let s:nextrel = 0 " relative indent steps for next line [unit &sw]: let s:block = 0 " assume starting outside of a block let s:countonly = 1 " don't change state - call substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g') + call substitute(a:text, '<\zs/\=' . s:tagname . '\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g') let s:countonly = 0 endfunc "}}} @@ -292,7 +296,7 @@ func! s:CountTagsAndState(text) let s:nextrel = 0 " relative indent steps for next line [unit &sw]: let s:block = b:hi_newstate.block - let tmp = substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g') + let tmp = substitute(a:text, '<\zs/\=' . s:tagname . '\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g') if s:block == 3 let b:hi_newstate.scripttype = s:GetScriptType(matchstr(tmp, '\C.*<SCRIPT\>\zs[^>]*')) endif @@ -530,7 +534,7 @@ func! s:FreshState(lnum) let swendtag = match(text, '^\s*</') >= 0 " If previous line ended in a closing tag, line up with the opening tag. - if !swendtag && text =~ '</\w\+\s*>\s*$' + if !swendtag && text =~ '</' . s:tagname . '\s*>\s*$' call cursor(state.lnum, 99999) normal! F< let start_lnum = HtmlIndent_FindStartTag() @@ -860,7 +864,7 @@ func! HtmlIndent_FindStartTag() " The cursor must be on or before a closing tag. " If found, positions the cursor at the match and returns the line number. " Otherwise returns 0. - let tagname = matchstr(getline('.')[col('.') - 1:], '</\zs\w\+\ze') + let tagname = matchstr(getline('.')[col('.') - 1:], '</\zs' . s:tagname . '\ze') let start_lnum = searchpair('<' . tagname . '\>', '', '</' . tagname . '\>', 'bW') if start_lnum > 0 return start_lnum @@ -876,7 +880,7 @@ func! HtmlIndent_FindTagEnd() " a self-closing tag, to the matching ">". " Limited to look up to b:html_indent_line_limit lines away. let text = getline('.') - let tagname = matchstr(text, '\w\+\|!--', col('.')) + let tagname = matchstr(text, s:tagname . '\|!--', col('.')) if tagname == '!--' call search('--\zs>') elseif s:get_tag('/' . tagname) != 0 @@ -921,9 +925,22 @@ func! s:InsideTag(foundHtmlString) else let idx = match(text, '\s\zs[_a-zA-Z0-9-]\+="') endif + if idx == -1 + " try <tag attr + let idx = match(text, '<' . s:tagname . '\s\+\zs\w') + endif + if idx == -1 + " after just <tag indent one level more + let idx = match(text, '<' . s:tagname . '$') + if idx >= 0 + call cursor(lnum, idx) + return virtcol('.') + shiftwidth() + endif + endif if idx > 0 - " Found the attribute. TODO: assumes spaces, no Tabs. - return idx + " Found the attribute to align with. + call cursor(lnum, idx) + return virtcol('.') endif endwhile return -1 diff --git a/runtime/indent/javascript.vim b/runtime/indent/javascript.vim index 2861716287..f3bf96aa97 100644 --- a/runtime/indent/javascript.vim +++ b/runtime/indent/javascript.vim @@ -2,7 +2,7 @@ " Language: Javascript " Maintainer: Chris Paul ( https://github.com/bounceme ) " URL: https://github.com/pangloss/vim-javascript -" Last Change: September 18, 2017 +" Last Change: December 4, 2017 " Only load this indent file when no other was loaded. if exists('b:did_indent') @@ -10,10 +10,6 @@ if exists('b:did_indent') endif let b:did_indent = 1 -" indent correctly if inside <script> -" vim/vim@690afe1 for the switch from cindent -let b:html_indent_script1 = 'inc' - " Now, set up our indentation expression and keys that trigger it. setlocal indentexpr=GetJavascriptIndent() setlocal autoindent nolisp nosmartindent @@ -25,13 +21,6 @@ setlocal indentkeys+=0],0) let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys<' -" Regex of syntax group names that are or delimit string or are comments. -let b:syng_strcom = get(b:,'syng_strcom','string\|comment\|regex\|special\|doc\|template\%(braces\)\@!') -let b:syng_str = get(b:,'syng_str','string\|template\|special') -" template strings may want to be excluded when editing graphql: -" au! Filetype javascript let b:syng_str = '^\%(.*template\)\@!.*string\|special' -" au! Filetype javascript let b:syng_strcom = '^\%(.*template\)\@!.*string\|comment\|regex\|special\|doc' - " Only define the function once. if exists('*GetJavascriptIndent') finish @@ -40,6 +29,23 @@ endif let s:cpo_save = &cpo set cpo&vim +" indent correctly if inside <script> +" vim/vim@690afe1 for the switch from cindent +" overridden with b:html_indent_script1 +call extend(g:,{'html_indent_script1': 'inc'},'keep') + +" Regex of syntax group names that are or delimit string or are comments. +let s:bvars = { + \ 'syng_strcom': 'string\|comment\|regex\|special\|doc\|template\%(braces\)\@!', + \ 'syng_str': 'string\|template\|special' } +" template strings may want to be excluded when editing graphql: +" au! Filetype javascript let b:syng_str = '^\%(.*template\)\@!.*string\|special' +" au! Filetype javascript let b:syng_strcom = '^\%(.*template\)\@!.*string\|comment\|regex\|special\|doc' + +function s:GetVars() + call extend(b:,extend(s:bvars,{'js_cache': [0,0,0]}),'keep') +endfunction + " Get shiftwidth value if exists('*shiftwidth') function s:sw() @@ -104,21 +110,22 @@ endfunction function s:SkipFunc() if s:top_col == 1 throw 'out of bounds' - endif - let s:top_col = 0 - if s:check_in + elseif s:check_in if eval(s:skip_expr) return 1 endif let s:check_in = 0 elseif getline('.') =~ '\%<'.col('.').'c\/.\{-}\/\|\%>'.col('.').'c[''"]\|\\$' if eval(s:skip_expr) - let s:looksyn = a:firstline return 1 endif - elseif search('\m`\|\${\|\*\/','nW'.s:z,s:looksyn) && eval(s:skip_expr) - let s:check_in = 1 - return 1 + elseif search('\m`\|\${\|\*\/','nW'.s:z,s:looksyn) + if eval(s:skip_expr) + let s:check_in = 1 + return 1 + endif + else + let s:synid_cache[:] += [[line2byte('.') + col('.') - 1], ['']] endif let [s:looksyn, s:top_col] = getpos('.')[1:2] endfunction @@ -159,19 +166,29 @@ function s:Token() return s:LookingAt() =~ '\k' ? expand('<cword>') : s:LookingAt() endfunction -function s:PreviousToken() - let l:col = col('.') +function s:PreviousToken(...) + let [l:pos, tok] = [getpos('.'), ''] if search('\m\k\{1,}\|\S','ebW') - if search('\m\*\%#\/\|\/\/\%<'.a:firstline.'l','nbW',line('.')) && eval(s:in_comm) - if s:SearchLoop('\S\ze\_s*\/[/*]','bW',s:in_comm) - return s:Token() + if getline('.')[col('.')-2:col('.')-1] == '*/' + if eval(s:in_comm) && !s:SearchLoop('\S\ze\_s*\/[/*]','bW',s:in_comm) + call setpos('.',l:pos) + else + let tok = s:Token() endif - call cursor(a:firstline, l:col) else - return s:Token() + let two = a:0 || line('.') != l:pos[1] ? strridx(getline('.')[:col('.')],'//') + 1 : 0 + if two && eval(s:in_comm) + call cursor(0,two) + let tok = s:PreviousToken(1) + if tok is '' + call setpos('.',l:pos) + endif + else + let tok = s:Token() + endif endif endif - return '' + return tok endfunction function s:Pure(f,...) @@ -183,23 +200,30 @@ function s:SearchLoop(pat,flags,expr) endfunction function s:ExprCol() + if getline('.')[col('.')-2] == ':' + return 1 + endif let bal = 0 - while s:SearchLoop('[{}?]\|\_[^:]\zs::\@!','bW',s:skip_expr) + while s:SearchLoop('[{}?:]','bW',s:skip_expr) if s:LookingAt() == ':' + if getline('.')[col('.')-2] == ':' + call cursor(0,col('.')-1) + continue + endif let bal -= 1 elseif s:LookingAt() == '?' - let bal += 1 - if bal == 1 - break + if getline('.')[col('.'):col('.')+1] =~ '^\.\d\@!' + continue + elseif !bal + return 1 endif + let bal += 1 elseif s:LookingAt() == '{' - let bal = !s:IsBlock() - break + return !s:IsBlock() elseif !s:GetPair('{','}','bW',s:skip_expr) break endif endwhile - return s:Nat(bal) endfunction " configurable regexes that define continuation lines, not including (, {, or [. @@ -208,30 +232,29 @@ let s:opfirst = '^' . get(g:,'javascript_opfirst', let s:continuation = get(g:,'javascript_continuation', \ '\C\%([<=,.~!?/*^%|&:]\|+\@<!+\|-\@<!-\|=\@<!>\|\<\%(typeof\|new\|delete\|void\|in\|instanceof\|await\)\)') . '$' -function s:Continues(ln,con) - let tok = matchstr(a:con[-15:],s:continuation) +function s:Continues() + let tok = matchstr(strpart(getline('.'),col('.')-15,15),s:continuation) if tok =~ '[a-z:]' - call cursor(a:ln, len(a:con)) return tok == ':' ? s:ExprCol() : s:PreviousToken() != '.' elseif tok !~ '[/>]' return tok isnot '' endif - return s:SynAt(a:ln, len(a:con)) !~? (tok == '>' ? 'jsflow\|^html' : 'regex') + return s:SynAt(line('.'),col('.')) !~? (tok == '>' ? 'jsflow\|^html' : 'regex') endfunction " Check if line 'lnum' has a balanced amount of parentheses. -function s:Balanced(lnum) - let [l:open, l:line] = [0, getline(a:lnum)] - let pos = match(l:line, '[][(){}]') +function s:Balanced(lnum,line) + let l:open = 0 + let pos = match(a:line, '[][(){}]') while pos != -1 if s:SynAt(a:lnum,pos + 1) !~? b:syng_strcom - let l:open += match(' ' . l:line[pos],'[[({]') + let l:open += match(' ' . a:line[pos],'[[({]') if l:open < 0 return endif endif - let pos = match(l:line, !l:open ? '[][(){}]' : '()' =~ l:line[pos] ? - \ '[()]' : '{}' =~ l:line[pos] ? '[{}]' : '[][]', pos + 1) + let pos = match(a:line, !l:open ? '[][(){}]' : '()' =~ a:line[pos] ? + \ '[()]' : '{}' =~ a:line[pos] ? '[{}]' : '[][]', pos + 1) endwhile return !l:open endfunction @@ -244,27 +267,38 @@ function s:OneScope() \ s:Pure('s:PreviousToken') != '.' && !(tok == 'while' && s:DoWhile()) elseif s:Token() =~# '^else$\|^do$' return s:Pure('s:PreviousToken') != '.' + elseif strpart(getline('.'),col('.')-2,2) == '=>' + call cursor(0,col('.')-1) + if s:PreviousToken() == ')' + return s:GetPair('(', ')', 'bW', s:skip_expr) + endif + return 1 endif - return strpart(getline('.'),col('.')-2,2) == '=>' endfunction function s:DoWhile() let cpos = searchpos('\m\<','cbW') - if s:SearchLoop('\C[{}]\|\<\%(do\|while\)\>','bW',s:skip_expr) - if s:{s:LookingAt() == '}' && s:GetPair('{','}','bW',s:skip_expr) ? - \ 'Previous' : ''}Token() ==# 'do' && s:IsBlock() - return 1 + while s:SearchLoop('\C[{}]\|\<\%(do\|while\)\>','bW',s:skip_expr) + if s:LookingAt() =~ '\a' + if s:Pure('s:IsBlock') + if s:LookingAt() ==# 'd' + return 1 + endif + break + endif + elseif s:LookingAt() != '}' || !s:GetPair('{','}','bW',s:skip_expr) + break endif - call call('cursor',cpos) - endif + endwhile + call call('cursor',cpos) endfunction " returns total offset from braceless contexts. 'num' is the lineNr which " encloses the entire context, 'cont' if whether a:firstline is a continued " expression, which could have started in a braceless context -function s:IsContOne(num,cont) - let [l:num, b_l] = [a:num + !a:num, 0] - let pind = a:num ? indent(a:num) + s:sw() : 0 +function s:IsContOne(cont) + let [l:num, b_l] = [b:js_cache[1] + !b:js_cache[1], 0] + let pind = b:js_cache[1] ? indent(b:js_cache[1]) + s:sw() : 0 let ind = indent('.') + !a:cont while line('.') > l:num && ind > pind || line('.') == l:num if indent('.') < ind && s:OneScope() @@ -282,20 +316,16 @@ function s:IsContOne(num,cont) return b_l endfunction -function s:Class() - return (s:Token() ==# 'class' || s:PreviousToken() =~# '^class$\|^extends$') && - \ s:PreviousToken() != '.' -endfunction - function s:IsSwitch() - return s:PreviousToken() !~ '[.*]' && - \ (!s:GetPair('{','}','cbW',s:skip_expr) || s:IsBlock() && !s:Class()) + call call('cursor',b:js_cache[1:]) + return search('\m\C\%#.\_s*\%(\%(\/\/.*\_$\|\/\*\_.\{-}\*\/\)\@>\_s*\)*\%(case\|default\)\>','nWc'.s:z) endfunction " https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader function s:IsBlock() let tok = s:PreviousToken() if join(s:stack) =~? 'xml\|jsx' && s:SynAt(line('.'),col('.')-1) =~? 'xml\|jsx' + let s:in_jsx = 1 return tok != '{' elseif tok =~ '\k' if tok ==# 'type' @@ -320,7 +350,7 @@ function s:IsBlock() endfunction function GetJavascriptIndent() - let b:js_cache = get(b:,'js_cache',[0,0,0]) + call s:GetVars() let s:synid_cache = [[],[]] let l:line = getline(v:lnum) " use synstack as it validates syn state and works in an empty line @@ -334,7 +364,7 @@ function GetJavascriptIndent() return -1 endif elseif s:stack[-1] =~? b:syng_str - if b:js_cache[0] == v:lnum - 1 && s:Balanced(v:lnum-1) + if b:js_cache[0] == v:lnum - 1 && s:Balanced(v:lnum-1,getline(v:lnum-1)) let b:js_cache[0] = v:lnum endif return -1 @@ -361,7 +391,7 @@ function GetJavascriptIndent() call cursor(v:lnum,1) let idx = index([']',')','}'],l:line[0]) if b:js_cache[0] > l:lnum && b:js_cache[0] < v:lnum || - \ b:js_cache[0] == l:lnum && s:Balanced(l:lnum) + \ b:js_cache[0] == l:lnum && s:Balanced(l:lnum,pline) call call('cursor',b:js_cache[1:]) else let [s:looksyn, s:top_col, s:check_in, s:l1] = [v:lnum - 1,0,0, @@ -382,10 +412,10 @@ function GetJavascriptIndent() let [b:js_cache[0], num] = [v:lnum, b:js_cache[1]] - let [num_ind, is_op, b_l, l:switch_offset] = [s:Nat(indent(num)),0,0,0] + let [num_ind, is_op, b_l, l:switch_offset, s:in_jsx] = [s:Nat(indent(num)),0,0,0,0] if !num || s:LookingAt() == '{' && s:IsBlock() let ilnum = line('.') - if num && s:LookingAt() == ')' && s:GetPair('(',')','bW',s:skip_expr) + if num && !s:in_jsx && s:LookingAt() == ')' && s:GetPair('(',')','bW',s:skip_expr) if ilnum == num let [num, num_ind] = [line('.'), indent('.')] endif @@ -399,23 +429,24 @@ function GetJavascriptIndent() endif endif if idx == -1 && pline[-1:] !~ '[{;]' + call cursor(l:lnum, len(pline)) let sol = matchstr(l:line,s:opfirst) if sol is '' || sol == '/' && s:SynAt(v:lnum, \ 1 + len(getline(v:lnum)) - len(l:line)) =~? 'regex' - if s:Continues(l:lnum,pline) + if s:Continues() let is_op = s:sw() endif - elseif num && sol =~# '^\%(in\%(stanceof\)\=\|\*\)$' - call call('cursor',b:js_cache[1:]) - if s:PreviousToken() =~ '\k' && s:Class() - return num_ind + s:sw() - endif - let is_op = s:sw() + elseif num && sol =~# '^\%(in\%(stanceof\)\=\|\*\)$' && + \ s:LookingAt() == '}' && s:GetPair('{','}','bW',s:skip_expr) && + \ s:PreviousToken() == ')' && s:GetPair('(',')','bW',s:skip_expr) && + \ (s:PreviousToken() == ']' || s:LookingAt() =~ '\k' && + \ s:{s:PreviousToken() == '*' ? 'Previous' : ''}Token() !=# 'function') + return num_ind + s:sw() else let is_op = s:sw() endif call cursor(l:lnum, len(pline)) - let b_l = s:Nat(s:IsContOne(b:js_cache[1],is_op) - (!is_op && l:line =~ '^{')) * s:sw() + let b_l = s:Nat(s:IsContOne(is_op) - (!is_op && l:line =~ '^{')) * s:sw() endif elseif idx.s:LookingAt().&cino =~ '^-1(.*(' && (search('\m\S','nbW',num) || s:ParseCino('U')) let pval = s:ParseCino('(') @@ -431,10 +462,10 @@ function GetJavascriptIndent() " main return if l:line =~ '^[])}]\|^|}' - if l:line_raw[0] == ')' && getline(num)[b:js_cache[2]-1] == '(' + if l:line_raw[0] == ')' if s:ParseCino('M') return indent(l:lnum) - elseif &cino =~# 'm' && !s:ParseCino('m') + elseif num && &cino =~# 'm' && !s:ParseCino('m') return virtcol('.') - 1 endif endif diff --git a/runtime/indent/logtalk.vim b/runtime/indent/logtalk.vim index 5b69663e1d..8e36f86115 100644 --- a/runtime/indent/logtalk.vim +++ b/runtime/indent/logtalk.vim @@ -1,5 +1,5 @@ " Maintainer: Paulo Moura <pmoura@logtalk.org> -" Revised on: 2008.06.02 +" Revised on: 2018.08.04 " Language: Logtalk " This Logtalk indent file is a modified version of the Prolog @@ -42,6 +42,9 @@ function! GetLogtalkIndent() " Check for clause head on previous line elseif pline =~ ':-\s*\(%.*\)\?$' let ind = ind + shiftwidth() + " Check for grammar rule head on previous line + elseif pline =~ '-->\s*\(%.*\)\?$' + let ind = ind + shiftwidth() " Check for entity closing directive on previous line elseif pline =~ '^\s*:-\send_\(object\|protocol\|category\)\.\(%.*\)\?$' let ind = ind - shiftwidth() diff --git a/runtime/indent/nsis.vim b/runtime/indent/nsis.vim new file mode 100644 index 0000000000..223f4fa28e --- /dev/null +++ b/runtime/indent/nsis.vim @@ -0,0 +1,91 @@ +" Vim indent file +" Language: NSIS script +" Maintainer: Ken Takata +" URL: https://github.com/k-takata/vim-nsis +" Last Change: 2018-01-21 +" Filenames: *.nsi +" License: VIM License + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal nosmartindent +setlocal noautoindent +setlocal indentexpr=GetNsisIndent(v:lnum) +setlocal indentkeys=!^F,o,O +setlocal indentkeys+==~${Else,=~${EndIf,=~${EndUnless,=~${AndIf,=~${AndUnless,=~${OrIf,=~${OrUnless,=~${Case,=~${Default,=~${EndSelect,=~${EndSwith,=~${Loop,=~${Next,=~${MementoSectionEnd,=~FunctionEnd,=~SectionEnd,=~SectionGroupEnd,=~PageExEnd,0=~!macroend,0=~!if,0=~!else,0=~!endif + +if exists("*GetNsisIndent") + finish +endif + +function! GetNsisIndent(lnum) + " If this line is explicitly joined: If the previous line was also joined, + " line it up with that one, otherwise add two 'shiftwidth' + if getline(a:lnum - 1) =~ '\\$' + if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$' + return indent(a:lnum - 1) + endif + return indent(a:lnum - 1) + shiftwidth() * 2 + endif + + " Grab the current line, stripping comments. + let l:thisl = substitute(getline(a:lnum), '[;#].*$', '', '') + " Check if this line is a conditional preprocessor line. + let l:preproc = l:thisl =~? '^\s*!\%(if\|else\|endif\)' + + " Grab the previous line, stripping comments. + " Skip preprocessor lines and continued lines. + let l:prevlnum = a:lnum + while 1 + let l:prevlnum = prevnonblank(l:prevlnum - 1) + if l:prevlnum == 0 + " top of file + return 0 + endif + let l:prevl = substitute(getline(l:prevlnum), '[;#].*$', '', '') + let l:prevpreproc = l:prevl =~? '^\s*!\%(if\|else\|endif\)' + if l:preproc == l:prevpreproc && getline(l:prevlnum - 1) !~? '\\$' + break + endif + endwhile + let l:previ = indent(l:prevlnum) + let l:ind = l:previ + + if l:preproc + " conditional preprocessor + if l:prevl =~? '^\s*!\%(if\%(\%(macro\)\?n\?def\)\?\|else\)\>' + let l:ind += shiftwidth() + endif + if l:thisl =~? '^\s*!\%(else\|endif\)\?\>' + let l:ind -= shiftwidth() + endif + return l:ind + endif + + if l:prevl =~? '^\s*\%(\${\%(If\|IfNot\|Unless\|ElseIf\|ElseIfNot\|ElseUnless\|Else\|AndIf\|AndIfNot\|AndUnless\|OrIf\|OrIfNot\|OrUnless\|Select\|Case\|Case[2-5]\|CaseElse\|Default\|Switch\|Do\|DoWhile\|DoUntil\|For\|ForEach\|MementoSection\)}\|Function\>\|Section\>\|SectionGroup\|PageEx\>\|!macro\>\)' + " previous line opened a block + let l:ind += shiftwidth() + endif + if l:thisl =~? '^\s*\%(\${\%(ElseIf\|ElseIfNot\|ElseUnless\|Else\|EndIf\|EndUnless\|AndIf\|AndIfNot\|AndUnless\|OrIf\|OrIfNot\|OrUnless\|Loop\|LoopWhile\|LoopUntil\|Next\|MementoSectionEnd\)\>}\?\|FunctionEnd\>\|SectionEnd\>\|SectionGroupEnd\|PageExEnd\>\|!macroend\>\)' + " this line closed a block + let l:ind -= shiftwidth() + elseif l:thisl =~? '^\s*\${\%(Case\|Case[2-5]\|CaseElse\|Default\)\>}\?' + if l:prevl !~? '^\s*\${\%(Select\|Switch\)}' + let l:ind -= shiftwidth() + endif + elseif l:thisl =~? '^\s*\${\%(EndSelect\|EndSwitch\)\>}\?' + " this line closed a block + if l:prevl =~? '^\s*\${\%(Select\|Switch\)}' + let l:ind -= shiftwidth() + else + let l:ind -= shiftwidth() * 2 + endif + endif + + return l:ind +endfunction + +" vim: ts=8 sw=2 sts=2 diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim index 35dddaa270..b0430dea8d 100644 --- a/runtime/indent/php.vim +++ b/runtime/indent/php.vim @@ -3,8 +3,8 @@ " Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr> " URL: http://www.2072productions.com/vim/indent/php.vim " Home: https://github.com/2072/PHP-Indenting-for-VIm -" Last Change: 2017 Jun 13 -" Version: 1.62 +" Last Change: 2018 May 18th +" Version: 1.66 " " " Type :help php-indent for available options @@ -82,6 +82,12 @@ else let b:PHP_outdentphpescape = 1 endif +if exists("PHP_noArrowMatching") + let b:PHP_noArrowMatching = PHP_noArrowMatching +else + let b:PHP_noArrowMatching = 0 +endif + if exists("PHP_vintage_case_default_indent") && PHP_vintage_case_default_indent let b:PHP_vintage_case_default_indent = 1 @@ -130,7 +136,7 @@ endif let s:PHP_validVariable = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)' let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|\%(}\s*\)\?else\>\|do\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|trait\>\|use\>\|interface\>\|abstract\>\|final\>\|try\>\|\%(}\s*\)\=catch\>\|\%(}\s*\)\=finally\>\)' -let s:functionDecl = '\<function\>\%(\s\+'.s:PHP_validVariable.'\)\=\s*(.*' +let s:functionDecl = '\<function\>\%(\s\+&\='.s:PHP_validVariable.'\)\=\s*(.*' let s:endline = '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$' let s:unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.s:endline @@ -140,7 +146,6 @@ let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!' let s:structureHead = '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline . '\|\<new\s\+class\>' - let s:escapeDebugStops = 0 function! DebugPrintReturn(scriptLine) @@ -257,7 +262,7 @@ endfun function! Skippmatch() " {{{ let synname = synIDattr(synID(line("."), col("."), 0), "name") - if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# '^php\%(Doc\)\?Comment' && b:UserIsTypingComment + if synname ==? "Delimiter" || synname ==? "phpRegionDelimiter" || synname =~? "^phpParent" || synname ==? "phpArrayParens" || synname =~? '^php\%(Block\|Brace\)' || synname ==? "javaScriptBraces" || synname =~? '^php\%(Doc\)\?Comment' && b:UserIsTypingComment return 0 else return 1 @@ -297,6 +302,48 @@ function! BalanceDirection (str) return balance endfun +function! StripEndlineComments (line) + return substitute(a:line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','') +endfun + +function! FindArrowIndent (lnum) " {{{ + + let parrentArrowPos = 0 + let lnum = a:lnum + while lnum > 1 + let last_line = getline(lnum) + if last_line =~ '^\s*->' + let parrentArrowPos = indent(a:lnum) + break + else + call cursor(lnum, 1) + let cleanedLnum = StripEndlineComments(last_line) + if cleanedLnum =~ '->' + if ! b:PHP_noArrowMatching + let parrentArrowPos = searchpos('->', 'W', lnum)[1] - 1 + else + let parrentArrowPos = indent(lnum) + shiftwidth() + endif + break + elseif cleanedLnum =~ ')'.s:endline && BalanceDirection(last_line) < 0 + call searchpos(')'.s:endline, 'cW', lnum) + let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()') + if openedparent != lnum + let lnum = openedparent + else + let openedparent = -1 + endif + + else + let parrentArrowPos = indent(lnum) + shiftwidth() + break + endif + endif + endwhile + + return parrentArrowPos +endfun "}}} + function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{ if getline(a:lnum) =~# '^\s*}\s*else\%(if\)\=\>' @@ -368,7 +415,7 @@ function! FindTheSwitchIndent (lnum) " {{{ endfunction "}}} -let s:SynPHPMatchGroups = {'phpParent':1, 'Delimiter':1, 'Define':1, 'Storageclass':1, 'StorageClass':1, 'Structure':1, 'Exception':1} +let s:SynPHPMatchGroups = {'phpparent':1, 'delimiter':1, 'define':1, 'storageclass':1, 'structure':1, 'exception':1} function! IslinePHP (lnum, tofind) " {{{ let cline = getline(a:lnum) @@ -384,7 +431,7 @@ function! IslinePHP (lnum, tofind) " {{{ let synname = synIDattr(synID(a:lnum, coltotest, 0), "name") - if synname == 'phpStringSingle' || synname == 'phpStringDouble' || synname == 'phpBacktick' + if synname ==? 'phpStringSingle' || synname ==? 'phpStringDouble' || synname ==? 'phpBacktick' if cline !~ '^\s*[''"`]' return "SpecStringEntrails" else @@ -392,7 +439,7 @@ function! IslinePHP (lnum, tofind) " {{{ end end - if get(s:SynPHPMatchGroups, synname) || synname =~ '^php' || synname =~? '^javaScript' + if get(s:SynPHPMatchGroups, tolower(synname)) || synname =~ '^php' || synname =~? '^javaScript' return synname else return "" @@ -423,6 +470,10 @@ endfunc call ResetPhpOptions() +function! GetPhpIndentVersion() + return "1.66-bundle" +endfun + function! GetPhpIndent() let b:GetLastRealCodeLNum_ADD = 0 @@ -480,14 +531,14 @@ function! GetPhpIndent() endif if synname!="" - if synname == "SpecStringEntrails" + if synname ==? "SpecStringEntrails" let b:InPHPcode = -1 " thumb down let b:InPHPcode_tofind = "" - elseif synname != "phpHereDoc" && synname != "phpHereDocDelimiter" + elseif synname !=? "phpHereDoc" && synname !=? "phpHereDocDelimiter" let b:InPHPcode = 1 let b:InPHPcode_tofind = "" - if synname =~# '^php\%(Doc\)\?Comment' + if synname =~? '^php\%(Doc\)\?Comment' let b:UserIsTypingComment = 1 let b:InPHPcode_checked = 0 endif @@ -556,7 +607,7 @@ function! GetPhpIndent() if 1 == b:InPHPcode - if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=~"Delimiter" + if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=~?"Delimiter" if cline !~? s:PHP_startindenttag let b:InPHPcode = 0 let b:InPHPcode_tofind = s:PHP_startindenttag @@ -712,7 +763,8 @@ function! GetPhpIndent() let last_line_num = GetLastRealCodeLNum(last_line_num - 1) let previous_line = getline(last_line_num) endwhile - + elseif cline =~ '^\s*->' + return FindArrowIndent(lnum) elseif last_line =~# unstated && cline !~ '^\s*);\='.endline let ind = ind + shiftwidth() " we indent one level further when the preceding line is not stated return ind + addSpecial @@ -724,7 +776,7 @@ function! GetPhpIndent() let isSingleLineBlock = 0 while 1 - if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX + if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline call cursor(last_line_num, 1) if previous_line !~ '^}' @@ -793,8 +845,7 @@ function! GetPhpIndent() let AntepenultimateLine = getline(plinnum) - let last_line = substitute(last_line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','') - + let last_line = StripEndlineComments(last_line) if ind == b:PHP_default_indenting if last_line =~ terminated && last_line !~# s:defaultORcase @@ -804,11 +855,13 @@ function! GetPhpIndent() if !LastLineClosed + let openedparent = -1 + if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(\[]'.endline && BalanceDirection(last_line) > 0 let dontIndent = 0 - if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*[)\]]\+\s*{'.endline && last_line !~ s:structureHead + if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*[)\]]\+\(\s*:\s*'.s:PHP_validVariable.'\)\=\s*{'.endline && last_line !~ s:structureHead let dontIndent = 1 endif @@ -819,18 +872,17 @@ function! GetPhpIndent() if b:PHP_BracesAtCodeLevel || b:PHP_vintage_case_default_indent == 1 let b:PHP_CurrentIndentLevel = ind - return ind + addSpecial endif - elseif last_line =~ '\S\+\s*),'.endline && BalanceDirection(last_line) < 0 + elseif last_line =~ '),'.endline && BalanceDirection(last_line) < 0 call cursor(lnum, 1) - call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag + call searchpos('),'.endline, 'cW') let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()') if openedparent != lnum let ind = indent(openedparent) endif - elseif last_line =~ '^\s*'.s:blockstart + elseif last_line =~ s:structureHead let ind = ind + shiftwidth() @@ -838,9 +890,17 @@ function! GetPhpIndent() let ind = ind + shiftwidth() endif + + if openedparent >= 0 + let last_line = StripEndlineComments(getline(openedparent)) + endif + endif + + if cline =~ '^\s*[)\]];\=' + let ind = ind - shiftwidth() endif - if cline =~ '^\s*[)\]];\=' + if last_line =~ '^\s*->' && last_line !~? s:structureHead && BalanceDirection(last_line) <= 0 let ind = ind - shiftwidth() endif diff --git a/runtime/indent/sas.vim b/runtime/indent/sas.vim index d591b2796e..9cc9e025c4 100644 --- a/runtime/indent/sas.vim +++ b/runtime/indent/sas.vim @@ -1,8 +1,8 @@ " Vim indent file " Language: SAS " Maintainer: Zhen-Huan Hu <wildkeny@gmail.com> -" Version: 3.0.1 -" Last Change: Mar 13, 2017 +" Version: 3.0.3 +" Last Change: Jun 26, 2018 if exists("b:did_indent") finish @@ -27,9 +27,9 @@ let s:section_run = '\v%(^|;)\s*run\s*;' let s:section_end = '\v%(^|;)\s*%(quit|enddata)\s*;' " Regex that captures the start of a control block (anything inside a section) -let s:block_str = '\v<%(do>%([^;]+<%(to|over)>[^;]+)=|%(define|layout|method|select)>[^;]+|begingraph)\s*;' +let s:block_str = '\v<%(do>%([^;]+<%(to|over|while)>[^;]+)=|%(compute|define\s+%(column|footer|header|style|table|tagset|crosstabs|statgraph)|edit|layout|method|select)>[^;]+|begingraph)\s*;' " Regex that captures the end of a control block (anything inside a section) -let s:block_end = '\v<%(end|endlayout|endgraph)\s*;' +let s:block_end = '\v<%(end|endcomp|endlayout|endgraph)\s*;' " Regex that captures the start of a macro let s:macro_str = '\v%(^|;)\s*\%macro>' @@ -52,7 +52,7 @@ function! s:PrevMatch(lnum, regex) let prev_lnum = prevnonblank(a:lnum - 1) while prev_lnum > 0 let prev_line = getline(prev_lnum) - if prev_line =~ a:regex + if prev_line =~? a:regex break else let prev_lnum = prevnonblank(prev_lnum - 1) @@ -71,11 +71,11 @@ function! GetSASIndent() let prev_line = getline(prev_lnum) " Previous non-blank line contains the start of a macro/section/block " while not the end of a macro/section/block (at the same line) - if (prev_line =~ s:section_str && prev_line !~ s:section_run && prev_line !~ s:section_end) || - \ (prev_line =~ s:block_str && prev_line !~ s:block_end) || - \ (prev_line =~ s:macro_str && prev_line !~ s:macro_end) - let ind = indent(prev_lnum) + &sts - elseif prev_line =~ s:section_run && prev_line !~ s:section_end + if (prev_line =~? s:section_str && prev_line !~? s:section_run && prev_line !~? s:section_end) || + \ (prev_line =~? s:block_str && prev_line !~? s:block_end) || + \ (prev_line =~? s:macro_str && prev_line !~? s:macro_end) + let ind = indent(prev_lnum) + shiftwidth() + elseif prev_line =~? s:section_run && prev_line !~? s:section_end let prev_section_str_lnum = s:PrevMatch(v:lnum, s:section_str) let prev_section_end_lnum = max([ \ s:PrevMatch(v:lnum, s:section_end), @@ -83,9 +83,9 @@ function! GetSASIndent() \ s:PrevMatch(v:lnum, s:program_end)]) " Check if the section supports run-processing if prev_section_end_lnum < prev_section_str_lnum && - \ getline(prev_section_str_lnum) =~ '\v%(^|;)\s*proc\s+%(' . + \ getline(prev_section_str_lnum) =~? '\v%(^|;)\s*proc\s+%(' . \ join(s:run_processing_procs, '|') . ')>' - let ind = indent(prev_lnum) + &sts + let ind = indent(prev_lnum) + shiftwidth() else let ind = indent(prev_lnum) endif @@ -95,26 +95,26 @@ function! GetSASIndent() endif " Re-adjustments based on the inputs of the current line let curr_line = getline(v:lnum) - if curr_line =~ s:program_end + if curr_line =~? s:program_end " End of the program " Same indentation as the first non-blank line return indent(nextnonblank(1)) - elseif curr_line =~ s:macro_end + elseif curr_line =~? s:macro_end " Current line is the end of a macro " Match the indentation of the start of the macro return indent(s:PrevMatch(v:lnum, s:macro_str)) - elseif curr_line =~ s:block_end && curr_line !~ s:block_str + elseif curr_line =~? s:block_end && curr_line !~? s:block_str " Re-adjust if current line is the end of a block " while not the beginning of a block (at the same line) " Returning the indent of previous block start directly " would not work due to nesting - let ind = ind - &sts - elseif curr_line =~ s:section_str || curr_line =~ s:section_run || curr_line =~ s:section_end + let ind = ind - shiftwidth() + elseif curr_line =~? s:section_str || curr_line =~? s:section_run || curr_line =~? s:section_end " Re-adjust if current line is the start/end of a section " since the end of a section could be inexplicit let prev_section_str_lnum = s:PrevMatch(v:lnum, s:section_str) " Check if the previous section supports run-processing - if getline(prev_section_str_lnum) =~ '\v%(^|;)\s*proc\s+%(' . + if getline(prev_section_str_lnum) =~? '\v%(^|;)\s*proc\s+%(' . \ join(s:run_processing_procs, '|') . ')>' let prev_section_end_lnum = max([ \ s:PrevMatch(v:lnum, s:section_end), @@ -128,7 +128,7 @@ function! GetSASIndent() \ s:PrevMatch(v:lnum, s:program_end)]) endif if prev_section_end_lnum < prev_section_str_lnum - let ind = ind - &sts + let ind = ind - shiftwidth() endif endif return ind diff --git a/runtime/indent/scheme.vim b/runtime/indent/scheme.vim index a16f4f9ea1..496da3267d 100644 --- a/runtime/indent/scheme.vim +++ b/runtime/indent/scheme.vim @@ -1,11 +1,14 @@ " Vim indent file -" Language: Scheme -" Maintainer: Sergey Khorev <sergey.khorev@gmail.com> -" Last Change: 2005 Jun 24 +" Language: Scheme +" Last Change: 2018 Jan 31 +" Maintainer: Evan Hanson <evhan@foldling.org> +" Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com> +" URL: https://foldling.org/vim/indent/scheme.vim " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif +" Use the Lisp indenting runtime! indent/lisp.vim diff --git a/runtime/indent/sh.vim b/runtime/indent/sh.vim index fd9a6a9c92..32bc9f35bb 100644 --- a/runtime/indent/sh.vim +++ b/runtime/indent/sh.vim @@ -1,12 +1,16 @@ " Vim indent file " Language: Shell Script " Maintainer: Christian Brabandt <cb@256bit.org> -" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org> " Original Author: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2017-08-08 +" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org> +" Latest Revision: 2018-03-26 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-sh-indent " Changelog: +" 20180724 - make check for zsh syntax more rigid (needs word-boundaries) +" 20180326 - better support for line continuation +" 20180325 - better detection of function definitions +" 20180127 - better support for zsh complex commands " 20170808: - better indent of line continuation " 20170502: - get rid of buffer-shiftwidth function " 20160912: - preserve indentation of here-doc blocks @@ -59,12 +63,15 @@ function! GetShIndent() if lnum == 0 return 0 endif + let line = getline(lnum) let pnum = prevnonblank(lnum - 1) - + let pline = getline(pnum) let ind = indent(lnum) - let line = getline(lnum) - if line =~ '^\s*\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\|foreach\)\>' + + " Check contents of previous lines + if line =~ '^\s*\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\|foreach\)\>' || + \ (&ft is# 'zsh' && line =~ '\<\%(if\|then\|do\|else\|elif\|case\|while\|until\|for\|select\|foreach\)\>') if line !~ '\<\%(fi\|esac\|done\|end\)\>\s*\%(#.*\)\=$' let ind += s:indent_value('default') endif @@ -72,21 +79,35 @@ function! GetShIndent() if !s:is_case_ended(line) let ind += s:indent_value('case-statements') endif - elseif line =~ '^\s*\<\k\+\>\s*()\s*{' || line =~ '^\s*{' || line =~ '^\s*function\s*\w\S\+\s*\%(()\)\?\s*{' + " function definition + elseif s:is_function_definition(line) if line !~ '}\s*\%(#.*\)\=$' let ind += s:indent_value('default') endif elseif s:is_continuation_line(line) - if pnum == 0 || !s:is_continuation_line(getline(pnum)) + if pnum == 0 || !s:is_continuation_line(pline) let ind += s:indent_value('continuation-line') endif - elseif pnum != 0 && s:is_continuation_line(getline(pnum)) - let ind = indent(s:find_continued_lnum(pnum)) + elseif s:end_block(line) && !s:start_block(line) + let ind -= s:indent_value('default') + elseif pnum != 0 && s:is_continuation_line(pline) && !s:end_block(getline(v:lnum)) + " only add indent, if line and pline is in the same block + let i = v:lnum + let ind2 = indent(s:find_continued_lnum(pnum)) + while !s:is_empty(getline(i)) && i > pnum + let i -= 1 + endw + if i == pnum + let ind += ind2 + else + let ind = ind2 + endif endif let pine = line + " Check content of current line let line = getline(v:lnum) - if line =~ '^\s*\%(then\|do\|else\|elif\|fi\|done\|end\)\>' || line =~ '^\s*}' + if line =~ '^\s*\%(then\|do\|else\|elif\|fi\|done\|end\)\>' || s:end_block(line) let ind -= s:indent_value('default') elseif line =~ '^\s*esac\>' && s:is_case_empty(getline(v:lnum - 1)) let ind -= s:indent_value('default') @@ -112,14 +133,24 @@ function! GetShIndent() " statements, executed within a here document. Keep the current indent elseif match(map(synstack(v:lnum, 1), 'synIDattr(v:val, "name")'), '\c\mheredoc') > -1 return indent(v:lnum) + elseif s:is_comment(line) && s:is_empty(getline(v:lnum-1)) + return indent(v:lnum) endif - return ind + return ind > 0 ? ind : 0 endfunction function! s:is_continuation_line(line) - return a:line =~ '\%(\%(^\|[^\\]\)\\\|&&\|||\||\)' . + " Comment, cannot be a line continuation + if a:line =~ '^\s*#' + return 0 + else + " start-of-line + " \\ or && or || or | + " followed optionally by { or # + return a:line =~ '\%(\%(^\|[^\\]\)\\\|&&\|||\||\)' . \ '\s*\({\s*\)\=\(#.*\)\=$' + endif endfunction function! s:find_continued_lnum(lnum) @@ -130,6 +161,12 @@ function! s:find_continued_lnum(lnum) return i endfunction +function! s:is_function_definition(line) + return a:line =~ '^\s*\<\k\+\>\s*()\s*{' || + \ a:line =~ '^\s*{' || + \ a:line =~ '^\s*function\s*\w\S\+\s*\%(()\)\?\s*{' +endfunction + function! s:is_case_label(line, pnum) if a:line !~ '^\s*(\=.*)' return 0 @@ -195,5 +232,29 @@ function! s:escape(pattern) return '\V'. escape(a:pattern, '\\') endfunction +function! s:is_empty(line) + return a:line =~ '^\s*$' +endfunction + +function! s:end_block(line) + return a:line =~ '^\s*}' +endfunction + +function! s:start_block(line) + return a:line =~ '{\s*\(#.*\)\?$' +endfunction + +function! s:find_start_block(lnum) + let i = a:lnum + while i > 1 && !s:start_block(getline(i)) + let i -= 1 + endwhile + return i +endfunction + +function! s:is_comment(line) + return a:line =~ '^\s*#' +endfunction + let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/indent/tex.vim b/runtime/indent/tex.vim index 1a4d8b1cb6..a748cfbb40 100644 --- a/runtime/indent/tex.vim +++ b/runtime/indent/tex.vim @@ -2,7 +2,7 @@ " Language: LaTeX " Maintainer: Yichao Zhou <broken.zhou AT gmail.com> " Created: Sat, 16 Feb 2002 16:50:19 +0100 -" Version: 0.9.4 +" Version: 1.0.0 " Please email me if you found something I can do. Comments, bug report and " feature request are welcome. @@ -62,6 +62,8 @@ " (*) Fix a bug between g:tex_noindent_env and g:tex_indent_items " Now g:tex_noindent_env='document\|verbatim\|itemize' (Emacs " style) is supported. Thanks Miles Wheeler for reporting. +" 2018/02/07 by Yichao Zhou <broken.zhou AT gmail.com> +" (*) Make indentation more smart in the normal mode " " }}} @@ -91,19 +93,14 @@ " If this variable is set, item-environments are indented like Emacs does " it, i.e., continuation lines are indented with a shiftwidth. " -" NOTE: I've already set the variable below; delete the corresponding line -" if you don't like this behaviour. -" -" Per default, it is unset. -" -" set unset -" ---------------------------------------------------------------- -" \begin{itemize} \begin{itemize} -" \item blablabla \item blablabla -" bla bla bla bla bla bla -" \item blablabla \item blablabla -" bla bla bla bla bla bla -" \end{itemize} \end{itemize} +" set unset +" ------------------------------------------------------ +" \begin{itemize} \begin{itemize} +" \item blablabla \item blablabla +" bla bla bla bla bla bla +" \item blablabla \item blablabla +" bla bla bla bla bla bla +" \end{itemize} \end{itemize} " " " * g:tex_items @@ -290,8 +287,9 @@ function! GetTeXIndent() " {{{ endif endif - if stay - " If there is no obvious indentation hint, we trust our user. + if stay && mode() == 'i' + " If there is no obvious indentation hint, and indentation is triggered + " in insert mode, we trust our user. if empty(cline) return ind else diff --git a/runtime/indent/wast.vim b/runtime/indent/wast.vim new file mode 100644 index 0000000000..1be234b6e9 --- /dev/null +++ b/runtime/indent/wast.vim @@ -0,0 +1,17 @@ +" Vim indent file +" Language: WebAssembly +" Maintainer: rhysd <lin90162@yahoo.co.jp> +" Last Change: Jul 29, 2018 +" For bugs, patches and license go to https://github.com/rhysd/vim-wasm + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +" WebAssembly text format is S-expression. We can reuse LISP indentation +" logic. +setlocal indentexpr=lispindent('.') +setlocal noautoindent nosmartindent + +let b:undo_indent = "setl lisp< indentexpr<" diff --git a/runtime/indent/xml.vim b/runtime/indent/xml.vim index 87ffb329b5..dcafb467a6 100644 --- a/runtime/indent/xml.vim +++ b/runtime/indent/xml.vim @@ -1,6 +1,8 @@ " Language: xml -" Maintainer: Johannes Zellner <johannes@zellner.org> -" Last Change: 2017 Jun 13 +" Repository: https://github.com/chrisbra/vim-xml-ftplugin +" Maintainer: Christian Brabandt <cb@256bit.org> +" Previous Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Change: 20180724 - Correctly indent xml comments https://github.com/vim/vim/issues/3200 " Notes: 1) does not indent pure non-xml code (e.g. embedded scripts) " 2) will be confused by unbalanced tags in comments " or CDATA sections. @@ -55,9 +57,6 @@ fun! <SID>XmlIndentSynCheck(lnum) if '' != syn1 && syn1 !~ 'xml' && '' != syn2 && syn2 !~ 'xml' " don't indent pure non-xml code return 0 - elseif syn1 =~ '^xmlComment' && syn2 =~ '^xmlComment' - " indent comments specially - return -1 endif endif return 1 diff --git a/runtime/keymap/oldturkic-orkhon_utf-8.vim b/runtime/keymap/oldturkic-orkhon_utf-8.vim new file mode 100644 index 0000000000..e1f0015a2a --- /dev/null +++ b/runtime/keymap/oldturkic-orkhon_utf-8.vim @@ -0,0 +1,143 @@ +" Maintainer: Oliver Corff <oliver.corff@email.de> +" Last Changed: 2018 Feb 12 + +scriptencoding utf-8 + +" oto = Old Turkic, Orkhon +let b:keymap_name = "oto" +highlight lCursor guibg=red guifg=NONE + +" map F8 to toggle keymap (Ctrl-^ not present on keyboard) +noremap <F8> :let &iminsert = ! &iminsert<CR> +lnoremap <F8> <C-^> +noremap! <F8> <C-^> + +loadkeymap +A 𐰀 10C00 OLD TURKIC LETTER ORKHON A +00 𐰀 10C00 OLD TURKIC LETTER ORKHON A +I 𐰃 10C03 OLD TURKIC LETTER ORKHON I +03 𐰃 10C03 OLD TURKIC LETTER ORKHON I +O 𐰆 10C06 OLD TURKIC LETTER ORKHON O +U 𐰆 10C06 OLD TURKIC LETTER ORKHON O +06 𐰆 10C06 OLD TURKIC LETTER ORKHON O +OE 𐰇 10C07 OLD TURKIC LETTER ORKHON OE +UE 𐰇 10C07 OLD TURKIC LETTER ORKHON OE +07 𐰇 10C07 OLD TURKIC LETTER ORKHON OE +ab 𐰉 10C09 OLD TURKIC LETTER ORKHON AB +b1 𐰉 10C09 OLD TURKIC LETTER ORKHON AB +09 𐰉 10C09 OLD TURKIC LETTER ORKHON AB +aeb 𐰋 10C0B OLD TURKIC LETTER ORKHON AEB +eb 𐰋 10C0B OLD TURKIC LETTER ORKHON AEB +b2 𐰋 10C0B OLD TURKIC LETTER ORKHON AEB +0b 𐰋 10C0B OLD TURKIC LETTER ORKHON AEB +ag 𐰍 10C0D OLD TURKIC LETTER ORKHON AG +g1 𐰍 10C0D OLD TURKIC LETTER ORKHON AG +0d 𐰍 10C0D OLD TURKIC LETTER ORKHON AG +aeg 𐰏 10C0F OLD TURKIC LETTER ORKHON AEG +eg 𐰏 10C0F OLD TURKIC LETTER ORKHON AEG +g2 𐰏 10C0F OLD TURKIC LETTER ORKHON AEG +0f 𐰏 10C0F OLD TURKIC LETTER ORKHON AEG +ad 𐰑 10C11 OLD TURKIC LETTER ORKHON AD +d1 𐰑 10C11 OLD TURKIC LETTER ORKHON AD +11 𐰑 10C11 OLD TURKIC LETTER ORKHON AD +aed 𐰓 10C13 OLD TURKIC LETTER ORKHON AED +ed 𐰓 10C13 OLD TURKIC LETTER ORKHON AED +d2 𐰓 10C13 OLD TURKIC LETTER ORKHON AED +13 𐰓 10C13 OLD TURKIC LETTER ORKHON AED +ez 𐰔 10C14 OLD TURKIC LETTER ORKHON EZ +z 𐰔 10C14 OLD TURKIC LETTER ORKHON EZ +14 𐰔 10C14 OLD TURKIC LETTER ORKHON EZ +ay 𐰖 10C16 OLD TURKIC LETTER ORKHON AY +y1 𐰖 10C16 OLD TURKIC LETTER ORKHON AY +16 𐰖 10C16 OLD TURKIC LETTER ORKHON AY +aey 𐰘 10C18 OLD TURKIC LETTER ORKHON AEY +ey 𐰘 10C18 OLD TURKIC LETTER ORKHON AEY +y2 𐰘 10C18 OLD TURKIC LETTER ORKHON AEY +18 𐰘 10C18 OLD TURKIC LETTER ORKHON AEY +aek 𐰚 10C1A OLD TURKIC LETTER ORKHON AEK +k 𐰚 10C1A OLD TURKIC LETTER ORKHON AEK +1a 𐰚 10C1A OLD TURKIC LETTER ORKHON AEK +oek 𐰜 10C1C OLD TURKIC LETTER ORKHON OEK +q 𐰜 10C1C OLD TURKIC LETTER ORKHON OEK +1c 𐰜 10C1C OLD TURKIC LETTER ORKHON OEK +al 𐰞 10C1E OLD TURKIC LETTER ORKHON AL +l1 𐰞 10C1E OLD TURKIC LETTER ORKHON AL +1e 𐰞 10C1E OLD TURKIC LETTER ORKHON AL +ael 𐰠 10C20 OLD TURKIC LETTER ORKHON AEL +el 𐰠 10C20 OLD TURKIC LETTER ORKHON AEL +l2 𐰠 10C20 OLD TURKIC LETTER ORKHON AEL +20 𐰠 10C20 OLD TURKIC LETTER ORKHON AEL +elt 𐰡 10C21 OLD TURKIC LETTER ORKHON ELT +lt 𐰡 10C21 OLD TURKIC LETTER ORKHON ELT +21 𐰡 10C21 OLD TURKIC LETTER ORKHON ELT +em 𐰢 10C22 OLD TURKIC LETTER ORKHON EM +m 𐰢 10C22 OLD TURKIC LETTER ORKHON EM +22 𐰢 10C22 OLD TURKIC LETTER ORKHON EM +an 𐰣 10C23 OLD TURKIC LETTER ORKHON AN +n1 𐰣 10C23 OLD TURKIC LETTER ORKHON AN +23 𐰣 10C23 OLD TURKIC LETTER ORKHON AN +en 𐰤 10C24 OLD TURKIC LETTER ORKHON AEN +n2 𐰤 10C24 OLD TURKIC LETTER ORKHON AEN +24 𐰤 10C24 OLD TURKIC LETTER ORKHON AEN +ent 𐰦 10C26 OLD TURKIC LETTER ORKHON ENT +nt 𐰦 10C26 OLD TURKIC LETTER ORKHON ENT +26 𐰦 10C26 OLD TURKIC LETTER ORKHON ENT +enc 𐰨 10C28 OLD TURKIC LETTER ORKHON ENC +nc 𐰨 10C28 OLD TURKIC LETTER ORKHON ENC +28 𐰨 10C28 OLD TURKIC LETTER ORKHON ENC +eny 𐰪 10C2A OLD TURKIC LETTER ORKHON ENY +ny 𐰪 10C2A OLD TURKIC LETTER ORKHON ENY +2a 𐰪 10C2A OLD TURKIC LETTER ORKHON ENY +eng 𐰭 10C2D OLD TURKIC LETTER ORKHON ENG +ng 𐰭 10C2D OLD TURKIC LETTER ORKHON ENG +2d 𐰭 10C2D OLD TURKIC LETTER ORKHON ENG +ep 𐰯 10C2F OLD TURKIC LETTER ORKHON EP +p 𐰯 10C2F OLD TURKIC LETTER ORKHON EP +2f 𐰯 10C2F OLD TURKIC LETTER ORKHON EP +op 𐰰 10C30 OLD TURKIC LETTER ORKHON OP +up 𐰰 10C30 OLD TURKIC LETTER ORKHON OP +30 𐰰 10C30 OLD TURKIC LETTER ORKHON OP +ic 𐰱 10C31 OLD TURKIC LETTER ORKHON IC +31 𐰱 10C31 OLD TURKIC LETTER ORKHON IC +ec 𐰲 10C32 OLD TURKIC LETTER ORKHON EC +32 𐰲 10C32 OLD TURKIC LETTER ORKHON EC +aq 𐰴 10C34 OLD TURKIC LETTER ORKHON AQ +34 𐰴 10C34 OLD TURKIC LETTER ORKHON AQ +iq 𐰶 10C36 OLD TURKIC LETTER ORKHON IQ +yq 𐰶 10C36 OLD TURKIC LETTER ORKHON IQ +36 𐰶 10C36 OLD TURKIC LETTER ORKHON IQ +oq 𐰸 10C38 OLD TURKIC LETTER ORKHON OQ +uq 𐰸 10C38 OLD TURKIC LETTER ORKHON OQ +38 𐰸 10C38 OLD TURKIC LETTER ORKHON OQ +ar 𐰺 10C3A OLD TURKIC LETTER ORKHON AR +r1 𐰺 10C3A OLD TURKIC LETTER ORKHON AR +3a 𐰺 10C3A OLD TURKIC LETTER ORKHON AR +aer 𐰼 10C3C OLD TURKIC LETTER ORKHON AER +er 𐰼 10C3C OLD TURKIC LETTER ORKHON AER +r2 𐰼 10C3C OLD TURKIC LETTER ORKHON AER +3c 𐰼 10C3C OLD TURKIC LETTER ORKHON AER +as 𐰽 10C3D OLD TURKIC LETTER ORKHON AS +s1 𐰽 10C3D OLD TURKIC LETTER ORKHON AS +3d 𐰽 10C3D OLD TURKIC LETTER ORKHON AS +aes 𐰾 10C3E OLD TURKIC LETTER ORKHON AES +es 𐰾 10C3E OLD TURKIC LETTER ORKHON AES +s2 𐰾 10C3E OLD TURKIC LETTER ORKHON AES +3e 𐰾 10C3E OLD TURKIC LETTER ORKHON AES +ash 𐰿 10C3F OLD TURKIC LETTER ORKHON ASH +sh1 𐰿 10C3F OLD TURKIC LETTER ORKHON ASH +3f 𐰿 10C3F OLD TURKIC LETTER ORKHON ASH +esh 𐱁 10C41 OLD TURKIC LETTER ORKHON ESH +sh2 𐱁 10C41 OLD TURKIC LETTER ORKHON ESH +41 𐱁 10C41 OLD TURKIC LETTER ORKHON ESH +at 𐱃 10C43 OLD TURKIC LETTER ORKHON AT +t1 𐱃 10C43 OLD TURKIC LETTER ORKHON AT +43 𐱃 10C43 OLD TURKIC LETTER ORKHON AT +aet 𐱅 10C45 OLD TURKIC LETTER ORKHON AET +et 𐱅 10C45 OLD TURKIC LETTER ORKHON AET +t2 𐱅 10C45 OLD TURKIC LETTER ORKHON AET +45 𐱅 10C45 OLD TURKIC LETTER ORKHON AET +ot 𐱇 10C47 OLD TURKIC LETTER ORKHON OT +ut 𐱇 10C47 OLD TURKIC LETTER ORKHON OT +47 𐱇 10C47 OLD TURKIC LETTER ORKHON OT +bash 𐱈 10C48 OLD TURKIC LETTER ORKHON BASH +48 𐱈 10C48 OLD TURKIC LETTER ORKHON BASH diff --git a/runtime/keymap/oldturkic-yenisei_utf-8.vim b/runtime/keymap/oldturkic-yenisei_utf-8.vim new file mode 100644 index 0000000000..f939f0a405 --- /dev/null +++ b/runtime/keymap/oldturkic-yenisei_utf-8.vim @@ -0,0 +1,115 @@ +" Maintainer: Oliver Corff <oliver.corff@yemail.de> +" Last Changed: 2018 Feb 12 + +" All characters are given literally, conversion to another encoding (e.g., +" UTF-8) should work. +scriptencoding utf-8 + +let b:keymap_name = "oto" +highlight lCursor guibg=red guifg=NONE + +" map F8 to toggle keymap (Ctrl-^ not present on keyboard) +noremap <F8> :let &iminsert = ! &iminsert<CR> +lnoremap <F8> <C-^> +noremap! <F8> <C-^> + +loadkeymap +A 𐰁 10C01 OLD TURKIC LETTER YENISEI A +01 𐰁 10C01 OLD TURKIC LETTER YENISEI A +AE 𐰂 10C02 OLD TURKIC LETTER YENISEI AE +02 𐰂 10C02 OLD TURKIC LETTER YENISEI AE +I 𐰄 10C04 OLD TURKIC LETTER YENISEI I +04 𐰄 10C04 OLD TURKIC LETTER YENISEI I +E 𐰅 10C05 OLD TURKIC LETTER YENISEI E +05 𐰅 10C05 OLD TURKIC LETTER YENISEI E +OE 𐰈 10C08 OLD TURKIC LETTER YENISEI OE +UE 𐰈 10C08 OLD TURKIC LETTER YENISEI OE +08 𐰈 10C08 OLD TURKIC LETTER YENISEI OE +ab 𐰊 10C0A OLD TURKIC LETTER YENISEI AB +b1 𐰊 10C0A OLD TURKIC LETTER YENISEI AB +0a 𐰊 10C0A OLD TURKIC LETTER YENISEI AB +aeb 𐰌 10C0C OLD TURKIC LETTER YENISEI AEB +eb 𐰌 10C0C OLD TURKIC LETTER YENISEI AEB +b2 𐰌 10C0C OLD TURKIC LETTER YENISEI AEB +0c 𐰌 10C0C OLD TURKIC LETTER YENISEI AEB +ag 𐰎 10C0E OLD TURKIC LETTER YENISEI AG +g1 𐰎 10C0E OLD TURKIC LETTER YENISEI AG +0e 𐰎 10C0E OLD TURKIC LETTER YENISEI AG +aeg 𐰐 10C10 OLD TURKIC LETTER YENISEI AEG +eg 𐰐 10C10 OLD TURKIC LETTER YENISEI AEG +g2 𐰐 10C10 OLD TURKIC LETTER YENISEI AEG +10 𐰐 10C10 OLD TURKIC LETTER YENISEI AEG +ad 𐰒 10C12 OLD TURKIC LETTER YENISEI AD +d1 𐰒 10C12 OLD TURKIC LETTER YENISEI AD +12 𐰒 10C12 OLD TURKIC LETTER YENISEI AD +ez 𐰕 10C15 OLD TURKIC LETTER YENISEI EZ +z 𐰕 10C15 OLD TURKIC LETTER YENISEI EZ +15 𐰕 10C15 OLD TURKIC LETTER YENISEI EZ +ay 𐰗 10C17 OLD TURKIC LETTER YENISEI AY +y1 𐰗 10C17 OLD TURKIC LETTER YENISEI AY +17 𐰗 10C17 OLD TURKIC LETTER YENISEI AY +aey 𐰙 10C19 OLD TURKIC LETTER YENISEI AEY +ey 𐰙 10C19 OLD TURKIC LETTER YENISEI AEY +y2 𐰙 10C19 OLD TURKIC LETTER YENISEI AEY +19 𐰙 10C19 OLD TURKIC LETTER YENISEI AEY +aek 𐰛 10C1B OLD TURKIC LETTER YENISEI AEK +ak 𐰛 10C1B OLD TURKIC LETTER YENISEI AEK +k 𐰛 10C1B OLD TURKIC LETTER YENISEI AEK +1b 𐰛 10C1B OLD TURKIC LETTER YENISEI AEK +oek 𐰝 10C1D OLD TURKIC LETTER YENISEI OEK +ök 𐰝 10C1D OLD TURKIC LETTER YENISEI OEK +uek 𐰝 10C1D OLD TURKIC LETTER YENISEI OEK +ük 𐰝 10C1D OLD TURKIC LETTER YENISEI OEK +1d 𐰝 10C1D OLD TURKIC LETTER YENISEI OEK +al 𐰟 10C1F OLD TURKIC LETTER YENISEI AL +l 𐰟 10C1F OLD TURKIC LETTER YENISEI AL +l1 𐰟 10C1F OLD TURKIC LETTER YENISEI AL +1f 𐰟 10C1F OLD TURKIC LETTER YENISEI AL +aen 𐰥 10C25 OLD TURKIC LETTER YENISEI AEN +en 𐰥 10C25 OLD TURKIC LETTER YENISEI AEN +n2 𐰥 10C25 OLD TURKIC LETTER YENISEI AEN +25 𐰥 10C25 OLD TURKIC LETTER YENISEI AEN +ent 𐰧 10C27 OLD TURKIC LETTER YENISEI ENT +nt 𐰧 10C27 OLD TURKIC LETTER YENISEI ENT +27 𐰧 10C27 OLD TURKIC LETTER YENISEI ENT +enc 𐰩 10C29 OLD TURKIC LETTER YENISEI ENC +nc 𐰩 10C29 OLD TURKIC LETTER YENISEI ENC +29 𐰩 10C29 OLD TURKIC LETTER YENISEI ENC +eny 𐰫 10C2B OLD TURKIC LETTER YENISEI ENY +ny 𐰫 10C2B OLD TURKIC LETTER YENISEI ENY +2b 𐰫 10C2B OLD TURKIC LETTER YENISEI ENY +ang 𐰬 10C2C OLD TURKIC LETTER YENISEI ANG +ng 𐰬 10C2C OLD TURKIC LETTER YENISEI ANG +2c 𐰬 10C2C OLD TURKIC LETTER YENISEI ANG +aeng 𐰮 10C2E OLD TURKIC LETTER YENISEI AENG +eng 𐰮 10C2E OLD TURKIC LETTER YENISEI AENG +2e 𐰮 10C2E OLD TURKIC LETTER YENISEI AENG +ec 𐰳 10C33 OLD TURKIC LETTER YENISEI EC +c 𐰳 10C33 OLD TURKIC LETTER YENISEI EC +33 𐰳 10C33 OLD TURKIC LETTER YENISEI EC +aq 𐰵 10C35 OLD TURKIC LETTER YENISEI AQ +q 𐰵 10C35 OLD TURKIC LETTER YENISEI AQ +35 𐰵 10C35 OLD TURKIC LETTER YENISEI AQ +iq 𐰷 10C37 OLD TURKIC LETTER YENISEI IQ +yq 𐰷 10C37 OLD TURKIC LETTER YENISEI IQ +37 𐰷 10C37 OLD TURKIC LETTER YENISEI IQ +oq 𐰹 10C39 OLD TURKIC LETTER YENISEI OQ +uq 𐰹 10C39 OLD TURKIC LETTER YENISEI OQ +39 𐰹 10C39 OLD TURKIC LETTER YENISEI OQ +ar 𐰻 10C3B OLD TURKIC LETTER YENISEI AR +r 𐰻 10C3B OLD TURKIC LETTER YENISEI AR +r1 𐰻 10C3B OLD TURKIC LETTER YENISEI AR +3b 𐰻 10C3B OLD TURKIC LETTER YENISEI AR +ash 𐱀 10C40 OLD TURKIC LETTER YENISEI ASH +sh1 𐱀 10C40 OLD TURKIC LETTER YENISEI ASH +40 𐱀 10C40 OLD TURKIC LETTER YENISEI ASH +esh 𐱂 10C42 OLD TURKIC LETTER YENISEI ESH +sh2 𐱂 10C42 OLD TURKIC LETTER YENISEI ESH +42 𐱂 10C42 OLD TURKIC LETTER YENISEI ESH +at 𐱄 10C44 OLD TURKIC LETTER YENISEI AT +t1 𐱄 10C44 OLD TURKIC LETTER YENISEI AT +44 𐱄 10C44 OLD TURKIC LETTER YENISEI AT +aet 𐱆 10C46 OLD TURKIC LETTER YENISEI AET +et 𐱆 10C46 OLD TURKIC LETTER YENISEI AET +t2 𐱆 10C46 OLD TURKIC LETTER YENISEI AET +46 𐱆 10C46 OLD TURKIC LETTER YENISEI AET diff --git a/runtime/menu.vim b/runtime/menu.vim index 6e1b22c921..e9734d7cd0 100644 --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -754,7 +754,7 @@ func! s:BMMunge(fname, bnum) let name = a:fname if name == '' if !exists("g:menutrans_no_file") - let g:menutrans_no_file = "[No file]" + let g:menutrans_no_file = "[No Name]" endif let name = g:menutrans_no_file else @@ -891,7 +891,10 @@ if has("spell") let s:suglist = spellsuggest(w, 10) endif if len(s:suglist) > 0 - let s:changeitem = 'Change\ "' . escape(w, ' .'). '"\ to' + if !exists("g:menutrans_spell_change_ARG_to") + let g:menutrans_spell_change_ARG_to = 'Change\ "%s"\ to' + endif + let s:changeitem = printf(g:menutrans_spell_change_ARG_to, escape(w, ' .')) let s:fromword = w let pri = 1 " set 'cpo' to include the <CR> @@ -903,10 +906,16 @@ if has("spell") let pri += 1 endfor - let s:additem = 'Add\ "' . escape(w, ' .') . '"\ to\ Word\ List' + if !exists("g:menutrans_spell_add_ARG_to_word_list") + let g:menutrans_spell_add_ARG_to_word_list = 'Add\ "%s"\ to\ Word\ List' + endif + let s:additem = printf(g:menutrans_spell_add_ARG_to_word_list, escape(w, ' .')) exe 'anoremenu 1.6 PopUp.' . s:additem . ' :spellgood ' . w . '<CR>' - let s:ignoreitem = 'Ignore\ "' . escape(w, ' .') . '"' + if !exists("g:menutrans_spell_ignore_ARG") + let g:menutrans_spell_ignore_ARG = 'Ignore\ "%s"' + endif + let s:ignoreitem = printf(g:menutrans_spell_ignore_ARG, escape(w, ' .')) exe 'anoremenu 1.7 PopUp.' . s:ignoreitem . ' :spellgood! ' . w . '<CR>' anoremenu 1.8 PopUp.-SpellSep- : diff --git a/runtime/mswin.vim b/runtime/mswin.vim index da869a9fc7..5ec21491fe 100644 --- a/runtime/mswin.vim +++ b/runtime/mswin.vim @@ -57,10 +57,11 @@ vmap <S-Insert> <C-V> " Use CTRL-Q to do what CTRL-V used to do noremap <C-Q> <C-V> -" Use CTRL-S for saving, also in Insert mode +" Use CTRL-S for saving, also in Insert mode (<C-O> doesn't work well when +" using completions). noremap <C-S> :update<CR> vnoremap <C-S> <C-C>:update<CR> -inoremap <C-S> <C-O>:update<CR> +inoremap <C-S> <Esc>:update<CR>gi " For CTRL-V to work autoselect must be off. " On Unix we have two selections, autoselect can be used. diff --git a/runtime/optwin.vim b/runtime/optwin.vim index 0c9f0ed45e..1742c64c3e 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -614,11 +614,17 @@ if has("gui") endif call append("$", "linespace\tnumber of pixel lines to use between characters") call append("$", " \tset lsp=" . &lsp) - if has("balloon_eval") + if has("balloon_eval") || has("balloon_eval_term") call append("$", "balloondelay\tdelay in milliseconds before a balloon may pop up") call append("$", " \tset bdlay=" . &bdlay) - call append("$", "ballooneval\twhether the balloon evaluation is to be used") - call <SID>BinOptionG("beval", &beval) + if has("balloon_eval") + call append("$", "ballooneval\tuse balloon evaluation in the GUI") + call <SID>BinOptionG("beval", &beval) + endif + if has("balloon_eval_term") + call append("$", "balloonevalterm\tuse balloon evaluation in the terminal") + call <SID>BinOptionG("bevalterm", &beval) + endif if has("eval") call append("$", "balloonexpr\texpression to show in balloon eval") call append("$", " \tset bexpr=" . &bexpr) @@ -759,6 +765,10 @@ if has("insert_expand") call <SID>OptionG("cot", &cot) call append("$", "pumheight\tmaximum height of the popup menu") call <SID>OptionG("ph", &ph) + if exists("&pw") + call append("$", "pumwidth\tminimum width of the popup menu") + call <SID>OptionG("pw", &pw) + endif call append("$", "completefunc\tuser defined function for Insert mode completion") call append("$", "\t(local to buffer)") call <SID>OptionL("cfu") diff --git a/runtime/plugin/matchparen.vim b/runtime/plugin/matchparen.vim index 4f68fd87bc..23d4beea87 100644 --- a/runtime/plugin/matchparen.vim +++ b/runtime/plugin/matchparen.vim @@ -1,6 +1,6 @@ " Vim plugin for showing matching parens " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2017 Sep 30 +" Last Change: 2018 Jun 23 " Exit quickly when: " - this plugin was already loaded (or disabled) diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 18263e2842..ab66c0c0a1 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types in scripts " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last change: 2017 Nov 11 +" Last change: 2018 Feb 03 " This file is called by an autocommand for every file that has just been " loaded into a buffer. It checks if the type of file can be recognized by @@ -100,6 +100,10 @@ if s:line1 =~# "^#!" elseif s:name =~# 'make\>' set ft=make + " Pike + elseif s:name =~# '^pike\%(\>\|[0-9]\)' + set ft=pike + " Lua elseif s:name =~# 'lua' set ft=lua @@ -129,7 +133,7 @@ if s:line1 =~# "^#!" set ft=ruby " JavaScript - elseif s:name =~# 'node\(js\)\=\>' || s:name =~# 'rhino\>' + elseif s:name =~# 'node\(js\)\=\>\|js\>' || s:name =~# 'rhino\>' set ft=javascript " BC calculator @@ -172,6 +176,10 @@ if s:line1 =~# "^#!" elseif s:name =~# 'scala\>' set ft=scala + " Clojure + elseif s:name =~# 'clojure' + set ft=clojure + endif unlet s:name diff --git a/runtime/syntax/apachestyle.vim b/runtime/syntax/apachestyle.vim index 3695a11421..bd5c89d30f 100644 --- a/runtime/syntax/apachestyle.vim +++ b/runtime/syntax/apachestyle.vim @@ -1,8 +1,10 @@ " Vim syntax file " Language: Apache-Style configuration files (proftpd.conf/apache.conf/..) -" Maintainer: Christian Hammers <ch@westend.com> -" URL: none +" Maintainer: Ben RUBSON <ben.rubson@gmail.com> +" Former Maintainer: Christian Hammers <ch@westend.com> " ChangeLog: +" 2017-12-17,ch +" correctly detect comments " 2001-05-04,ch " adopted Vim 6.0 syntax style " 1999-10-28,ch @@ -27,8 +29,8 @@ endif syn case ignore -syn match apComment /^\s*#.*$/ syn match apOption /^\s*[^ \t#<=]*/ +syn match apComment /^\s*#.*$/ "syn match apLastValue /[^ \t<=#]*$/ contains=apComment ugly " tags diff --git a/runtime/syntax/autodoc.vim b/runtime/syntax/autodoc.vim new file mode 100644 index 0000000000..67a627e46c --- /dev/null +++ b/runtime/syntax/autodoc.vim @@ -0,0 +1,101 @@ +" Vim syntax file +" Language: Autodoc +" Maintainer: Stephen R. van den Berg <srb@cuci.nl> +" Last Change: 2018 Jan 23 +" Version: 2.9 +" Remark: Included by pike.vim, cmod.vim and optionally c.vim +" Remark: In order to make c.vim use it, set: c_autodoc + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case match + +" A bunch of useful autodoc keywords +syn keyword autodocStatement contained appears belongs global +syn keyword autodocStatement contained decl directive inherit +syn keyword autodocStatement contained deprecated obsolete bugs +syn keyword autodocStatement contained copyright example fixme note param returns +syn keyword autodocStatement contained seealso thanks throws constant +syn keyword autodocStatement contained member index elem +syn keyword autodocStatement contained value type item + +syn keyword autodocRegion contained enum mapping code multiset array +syn keyword autodocRegion contained int string section mixed ol ul dl +syn keyword autodocRegion contained class module namespace +syn keyword autodocRegion contained endenum endmapping endcode endmultiset +syn keyword autodocRegion contained endarray endint endstring endsection +syn keyword autodocRegion contained endmixed endol endul enddl +syn keyword autodocRegion contained endclass endmodule endnamespace + +syn keyword autodocIgnore contained ignore endignore + +syn keyword autodocStatAcc contained b i u tt url pre sub sup +syn keyword autodocStatAcc contained ref rfc xml dl expr image + +syn keyword autodocTodo contained TODO FIXME XXX + +syn match autodocLineStart display "\(//\|/\?\*\)\@2<=!" +syn match autodocWords "[^!@{}[\]]\+" display contains=@Spell + +syn match autodocLink "@\[[^[\]]\+]"hs=s+2,he=e-1 display contains=autodocLead +syn match autodocAtStmt "@[a-z]\+\%(\s\|$\)\@="hs=s+1 display contains=autodocStatement,autodocIgnore,autodocLead,autodocRegion + +" Due to limitations of the matching algorithm, we cannot highlight +" nested autodocNStmtAcc structures correctly +syn region autodocNStmtAcc start="@[a-z]\+{" end="@}" contains=autodocStatAcc,autodocLead keepend + +syn match autodocUrl contained display ".\+" +syn region autodocAtUrlAcc start="{"ms=s+1 end="@}"he=e-1,me=e-2 contained display contains=autodocUrl,autodocLead keepend +syn region autodocNUrlAcc start="@url{" end="@}" contains=autodocStatAcc,autodocAtUrlAcc,autodocLead transparent + +syn match autodocSpecial "@@" display +syn match autodocLead "@" display contained + +"when wanted, highlight trailing white space +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match autodocSpaceError display excludenl "\s\+$" + endif + if !exists("c_no_tab_space_error") + syn match autodocSpaceError display " \+\t"me=e-1 + endif +endif + +if exists("c_minlines") + let b:c_minlines = c_minlines +else + if !exists("c_no_if0") + let b:c_minlines = 50 " #if 0 constructs can be long + else + let b:c_minlines = 15 " mostly for () constructs + endif +endif +exec "syn sync ccomment autodocComment minlines=" . b:c_minlines + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet +hi def link autodocStatement Statement +hi def link autodocStatAcc Statement +hi def link autodocRegion Structure +hi def link autodocAtStmt Error +hi def link autodocNStmtAcc Identifier +hi def link autodocLink Type +hi def link autodocTodo Todo +hi def link autodocSpaceError Error +hi def link autodocLineStart SpecialComment +hi def link autodocSpecial SpecialChar +hi def link autodocUrl Underlined +hi def link autodocLead Statement +hi def link autodocIgnore Delimiter + +let b:current_syntax = "autodoc" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index f659a87b71..1143ca7dd7 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -13,6 +13,14 @@ set cpo&vim let s:ft = matchstr(&ft, '^\([^.]\)\+') +" Optional embedded Autodoc parsing +" To enable it add: let g:c_autodoc = 1 +" to your .vimrc +if exists("c_autodoc") + syn include @cAutodoc <sfile>:p:h/autodoc.vim + unlet b:current_syntax +endif + " A bunch of useful C keywords syn keyword cStatement goto break return continue asm syn keyword cLabel case default @@ -377,6 +385,13 @@ syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInP syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell +" Optional embedded Autodoc parsing +if exists("c_autodoc") + syn match cAutodocReal display contained "\%(//\|[/ \t\v]\*\|^\*\)\@2<=!.*" contains=@cAutodoc containedin=cComment,cCommentL + syn cluster cCommentGroup add=cAutodocReal + syn cluster cPreProcGroup add=cAutodocReal +endif + " Highlight User Labels syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString if s:ft ==# 'c' || exists("cpp_no_cpp11") diff --git a/runtime/syntax/cabal.vim b/runtime/syntax/cabal.vim index 6641294a31..8af47d4042 100644 --- a/runtime/syntax/cabal.vim +++ b/runtime/syntax/cabal.vim @@ -1,8 +1,22 @@ " Vim syntax file -" Language: Haskell Cabal Build file -" Maintainer: Vincent Berthoux <twinside@gmail.com> -" File Types: .cabal -" Last Change: 2010 May 18 +" Language: Haskell Cabal Build file +" Author: Vincent Berthoux <twinside@gmail.com> +" Maintainer: Marcin Szamotulski <profunctor@pm.me> +" Previous Maintainer: Vincent Berthoux <twinside@gmail.com> +" File Types: .cabal +" Last Change: 15 May 2018 +" v1.5: Incorporated changes from +" https://github.com/sdiehl/haskell-vim-proto/blob/master/vim/syntax/cabal.vim +" Use `syn keyword` instead of `syn match`. +" Added cabalStatementRegion to limit matches of keywords, which fixes +" the highlighting of description's value. +" Added cabalVersionRegion to limit the scope of cabalVersionOperator +" and cabalVersion matches. +" Added cabalLanguage keyword. +" Added calbalTitle, cabalAuthor and cabalMaintainer syntax groups. +" Added ! and ^>= operators (calbal 2.0) +" Added build-type keywords +" v1.4: Add benchmark support, thanks to Simon Meier " v1.3: Updated to the last version of cabal " Added more highlighting for cabal function, true/false " and version number. Also added missing comment highlighting. @@ -23,97 +37,205 @@ if exists("b:current_syntax") finish endif -syn keyword cabalCategory Library library Executable executable Flag flag -syn keyword cabalCategory source-repository Source-Repository - -syn keyword cabalConditional if else -syn match cabalOperator "&&\|||\|!\|==\|>=\|<=" -syn keyword cabalFunction os arche impl flag -syn match cabalComment /--.*$/ -syn match cabalVersion "\d\+\(.\(\d\)\+\)\+" - -syn match cabalTruth "\ctrue" -syn match cabalTruth "\cfalse" - -syn match cabalCompiler "\cghc" -syn match cabalCompiler "\cnhc" -syn match cabalCompiler "\cyhc" -syn match cabalCompiler "\chugs" -syn match cabalCompiler "\chbc" -syn match cabalCompiler "\chelium" -syn match cabalCompiler "\cjhc" -syn match cabalCompiler "\clhc" - - -syn match cabalStatement "\cauthor" -syn match cabalStatement "\cbranch" -syn match cabalStatement "\cbug-reports" -syn match cabalStatement "\cbuild-depends" -syn match cabalStatement "\cbuild-tools" -syn match cabalStatement "\cbuild-type" -syn match cabalStatement "\cbuildable" -syn match cabalStatement "\cc-sources" -syn match cabalStatement "\ccabal-version" -syn match cabalStatement "\ccategory" -syn match cabalStatement "\ccc-options" -syn match cabalStatement "\ccopyright" -syn match cabalStatement "\ccpp-options" -syn match cabalStatement "\cdata-dir" -syn match cabalStatement "\cdata-files" -syn match cabalStatement "\cdefault" -syn match cabalStatement "\cdescription" -syn match cabalStatement "\cexecutable" -syn match cabalStatement "\cexposed-modules" -syn match cabalStatement "\cexposed" -syn match cabalStatement "\cextensions" -syn match cabalStatement "\cextra-lib-dirs" -syn match cabalStatement "\cextra-libraries" -syn match cabalStatement "\cextra-source-files" -syn match cabalStatement "\cextra-tmp-files" -syn match cabalStatement "\cfor example" -syn match cabalStatement "\cframeworks" -syn match cabalStatement "\cghc-options" -syn match cabalStatement "\cghc-prof-options" -syn match cabalStatement "\cghc-shared-options" -syn match cabalStatement "\chomepage" -syn match cabalStatement "\chs-source-dirs" -syn match cabalStatement "\chugs-options" -syn match cabalStatement "\cinclude-dirs" -syn match cabalStatement "\cincludes" -syn match cabalStatement "\cinstall-includes" -syn match cabalStatement "\cld-options" -syn match cabalStatement "\clicense-file" -syn match cabalStatement "\clicense" -syn match cabalStatement "\clocation" -syn match cabalStatement "\cmain-is" -syn match cabalStatement "\cmaintainer" -syn match cabalStatement "\cmodule" -syn match cabalStatement "\cname" -syn match cabalStatement "\cnhc98-options" -syn match cabalStatement "\cother-modules" -syn match cabalStatement "\cpackage-url" -syn match cabalStatement "\cpkgconfig-depends" -syn match cabalStatement "\cstability" -syn match cabalStatement "\csubdir" -syn match cabalStatement "\csynopsis" -syn match cabalStatement "\ctag" -syn match cabalStatement "\ctested-with" -syn match cabalStatement "\ctype" -syn match cabalStatement "\cversion" +" this file uses line continuation +let s:cpo_save = &cpo +set cpo&vim + +" set iskeyword for this syntax script +syn iskeyword @,48-57,192-255,- + +" Case sensitive matches +syn case match + +syn keyword cabalConditional if else +syn keyword cabalFunction os arche impl flag +syn match cabalComment /--.*$/ + +" Case insensitive matches +syn case ignore + +syn keyword cabalCategory contained + \ executable + \ library + \ benchmark + \ test-suite + \ source-repository + \ flag + \ custom-setup +syn match cabalCategoryTitle contained /[^{]*\ze{\?/ +syn match cabalCategoryRegion + \ contains=cabalCategory,cabalCategoryTitle + \ nextgroup=cabalCategory skipwhite + \ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|custom-setup\)\+\s*\%(.*$\|$\)/ +syn keyword cabalTruth true false + +" cabalStatementRegion which limits the scope of cabalStatement keywords, this +" way they are not highlighted in description. +syn region cabalStatementRegion start=+^\s*\(--\)\@<!\k\+\s*:+ end=+:+ +syn keyword cabalStatement contained containedin=cabalStatementRegion + \ default-language + \ default-extensions + \ author + \ branch + \ bug-reports + \ build-depends + \ build-tools + \ build-type + \ buildable + \ c-sources + \ cabal-version + \ category + \ cc-options + \ copyright + \ cpp-options + \ data-dir + \ data-files + \ default + \ description + \ executable + \ exposed-modules + \ exposed + \ extensions + \ extra-tmp-files + \ extra-doc-files + \ extra-lib-dirs + \ extra-libraries + \ extra-source-files + \ exta-tmp-files + \ for example + \ frameworks + \ ghc-options + \ ghc-prof-options + \ ghc-shared-options + \ homepage + \ hs-source-dirs + \ hugs-options + \ include-dirs + \ includes + \ install-includes + \ ld-options + \ license + \ license-file + \ location + \ main-is + \ maintainer + \ manual + \ module + \ name + \ nhc98-options + \ other-extensions + \ other-modules + \ package-url + \ pkgconfig-depends + \ setup-depends + \ stability + \ subdir + \ synopsis + \ tag + \ tested-with + \ type + \ version + \ virtual-modules + +" operators and version operators +syn match cabalOperator /&&\|||\|!/ +syn match cabalVersionOperator contained + \ /!\|==\|\^\?>=\|<=\|<\|>/ +" match version: `[%]\@<!` is to exclude `%20` in http addresses. +syn match cabalVersion contained + \ /[%$_-]\@<!\<\d\+\%(\.\d\+\)*\%(\.\*\)\?\>/ +" cabalVersionRegion which limits the scope of cabalVersion pattern. +syn match cabalVersionRegionA + \ contains=cabalVersionOperator,cabalVersion + \ keepend + \ /\%(==\|\^\?>=\|<=\|<\|>\)\s*\d\+\%(\.\d\+\)*\%(\.\*\)\?\>/ +" version inside `version: ...` +syn match cabalVersionRegionB + \ contains=cabalStatementRegion,cabalVersionOperator,cabalVersion + \ /^\s*\%(cabal-\)\?version\s*:.*$/ + +syn keyword cabalLanguage Haskell98 Haskell2010 + +" title region +syn match cabalName contained /:\@<=.*/ +syn match cabalNameRegion + \ contains=cabalStatementRegion,cabalName + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*name\s*:.*$/ + +" author region +syn match cabalAuthor contained /:\@<=.*/ +syn match cabalAuthorRegion + \ contains=cabalStatementRegion,cabalStatement,cabalAuthor + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*author\s*:.*$/ + +" maintainer region +syn match cabalMaintainer contained /:\@<=.*/ +syn match cabalMaintainerRegion + \ contains=cabalStatementRegion,cabalStatement,cabalMaintainer + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*maintainer\s*:.*$/ + +" license region +syn match cabalLicense contained /:\@<=.*/ +syn match cabalLicenseRegion + \ contains=cabalStatementRegion,cabalStatement,cabalLicense + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*license\s*:.*$/ + +" license-file region +syn match cabalLicenseFile contained /:\@<=.*/ +syn match cabalLicenseFileRegion + \ contains=cabalStatementRegion,cabalStatement,cabalLicenseFile + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*license-file\s*:.*$/ + +" tested-with region with compilers and versions +syn keyword cabalCompiler contained ghc nhc yhc hugs hbc helium jhc lhc +syn match cabalTestedWithRegion + \ contains=cabalStatementRegion,cabalStatement,cabalCompiler,cabalVersionRegionA + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*tested-with\s*:.*$/ + +" build type keywords +syn keyword cabalBuildType contained + \ simple custom configure +syn match cabalBuildTypeRegion + \ contains=cabalStatementRegion,cabalStatement,cabalBuildType + \ nextgroup=cabalStatementRegion + \ /^\c\s*build-type\s*:.*$/ " Define the default highlighting. " Only when an item doesn't have highlighting yet - -hi def link cabalVersion Number -hi def link cabalTruth Boolean -hi def link cabalComment Comment -hi def link cabalStatement Statement -hi def link cabalCategory Type -hi def link cabalFunction Function -hi def link cabalConditional Conditional -hi def link cabalOperator Operator -hi def link cabalCompiler Constant +hi def link cabalName Title +hi def link cabalAuthor Normal +hi def link cabalMaintainer Normal +hi def link cabalCategoryTitle Title +hi def link cabalLicense Normal +hi def link cabalLicenseFile Normal +hi def link cabalBuildType Keyword +hi def link cabalVersion Number +hi def link cabalTruth Boolean +hi def link cabalComment Comment +hi def link cabalStatement Statement +hi def link cabalLanguage Type +hi def link cabalCategory Type +hi def link cabalFunction Function +hi def link cabalConditional Conditional +hi def link cabalOperator Operator +hi def link cabalVersionOperator Operator +hi def link cabalCompiler Constant let b:current_syntax = "cabal" +let &cpo = s:cpo_save +unlet! s:cpo_save + " vim: ts=8 diff --git a/runtime/syntax/chicken.vim b/runtime/syntax/chicken.vim new file mode 100644 index 0000000000..c3f949f823 --- /dev/null +++ b/runtime/syntax/chicken.vim @@ -0,0 +1,77 @@ +" Vim syntax file +" Language: Scheme (CHICKEN) +" Last Change: 2018-02-05 +" Author: Evan Hanson <evhan@foldling.org> +" Maintainer: Evan Hanson <evhan@foldling.org> +" URL: https://foldling.org/vim/syntax/chicken.vim +" Notes: This is supplemental syntax, to be loaded after the core Scheme +" syntax file (syntax/scheme.vim). Enable it by setting b:is_chicken=1 +" and filetype=scheme. + +" Only to be used on top of the Scheme syntax. +if !exists('b:did_scheme_syntax') + finish +endif + +" Lighten parentheses. +hi! def link schemeParentheses Comment + +" foo#bar +syn match schemeExtraSyntax /[^ #'`\t\n()\[\]"|;]\+#[^ '`\t\n()\[\]"|;]\+/ + +" ##foo#bar +syn match schemeExtraSyntax /##[^ '`\t\n()\[\]"|;]\+/ + +" Heredocs. +syn region schemeString start=/#<[<#]\s*\z(.*\)/ end=/^\z1$/ + +" Keywords. +syn match schemeKeyword /#[!:][a-zA-Z0-9!$%&*+-./:<=>?@^_~#]\+/ +syn match schemeKeyword /[a-zA-Z0-9!$%&*+-./:<=>?@^_~#]\+:\>/ + +" C/C++ syntax. +let s:c = globpath(&rtp, 'syntax/cpp.vim', 0, 1) +if len(s:c) + exe 'syn include @c ' s:c[0] + syn region c matchgroup=schemeComment start=/#>/ end=/<#/ contains=@c +endif + +syn keyword schemeSyntax define-record + +syn keyword schemeLibrarySyntax declare +syn keyword schemeLibrarySyntax module +syn keyword schemeLibrarySyntax reexport +syn keyword schemeLibrarySyntax require-library + +syn keyword schemeTypeSyntax --> +syn keyword schemeTypeSyntax -> +syn keyword schemeTypeSyntax : +syn keyword schemeTypeSyntax assume +syn keyword schemeTypeSyntax compiler-typecase +syn keyword schemeTypeSyntax define-specialization +syn keyword schemeTypeSyntax define-type +syn keyword schemeTypeSyntax the + +syn keyword schemeExtraSyntax and-let* +syn keyword schemeExtraSyntax match +syn keyword schemeExtraSyntax match-lambda +syn keyword schemeExtraSyntax match-lambda* + +syn keyword schemeSpecialSyntax define-compiler-syntax +syn keyword schemeSpecialSyntax define-constant +syn keyword schemeSpecialSyntax define-external +syn keyword schemeSpecialSyntax define-inline +syn keyword schemeSpecialSyntax foreign-code +syn keyword schemeSpecialSyntax foreign-declare +syn keyword schemeSpecialSyntax foreign-lambda +syn keyword schemeSpecialSyntax foreign-lambda* +syn keyword schemeSpecialSyntax foreign-primitive +syn keyword schemeSpecialSyntax foreign-safe-lambda +syn keyword schemeSpecialSyntax foreign-safe-lambda* +syn keyword schemeSpecialSyntax foreign-value + +syn keyword schemeSyntaxSyntax begin-for-syntax +syn keyword schemeSyntaxSyntax define-for-syntax +syn keyword schemeSyntaxSyntax er-macro-transformer +syn keyword schemeSyntaxSyntax ir-macro-transformer +syn keyword schemeSyntaxSyntax require-library-for-syntax diff --git a/runtime/syntax/cmod.vim b/runtime/syntax/cmod.vim new file mode 100644 index 0000000000..ea37682ff6 --- /dev/null +++ b/runtime/syntax/cmod.vim @@ -0,0 +1,144 @@ +" Vim syntax file +" Language: Cmod +" Current Maintainer: Stephen R. van den Berg <srb@cuci.nl> +" Last Change: 2018 Jan 23 +" Version: 2.9 +" Remark: Is used to edit Cmod files for Pike development. +" Remark: Includes a highlighter for any embedded Autodoc format. + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Read the C syntax to start with +runtime! syntax/c.vim +unlet b:current_syntax + +if !exists("c_autodoc") + " For embedded Autodoc documentation + syn include @cmodAutodoc <sfile>:p:h/autodoc.vim + unlet b:current_syntax +endif + +" Supports rotating amongst several same-level preprocessor conditionals +packadd! matchit +let b:match_words = "({:}\\@1<=),^\s*#\s*\%(if\%(n\?def\)\|else\|el\%(se\)\?if\|endif\)\>" + +" Cmod extensions +syn keyword cmodStatement __INIT INIT EXIT GC_RECURSE GC_CHECK +syn keyword cmodStatement EXTRA OPTIMIZE RETURN +syn keyword cmodStatement ADD_EFUN ADD_EFUN2 ADD_FUNCTION +syn keyword cmodStatement MK_STRING MK_STRING_SVALUE CONSTANT_STRLEN + +syn keyword cmodStatement SET_SVAL pop_n_elems pop_stack +syn keyword cmodStatement SIMPLE_ARG_TYPE_ERROR Pike_sp Pike_fp MKPCHARP +syn keyword cmodStatement SET_SVAL_TYPE REF_MAKE_CONST_STRING INC_PCHARP +syn keyword cmodStatement PTR_FROM_INT INHERIT_FROM_PTR +syn keyword cmodStatement DECLARE_CYCLIC BEGIN_CYCLIC END_CYCLIC +syn keyword cmodStatement UPDATE_LOCATION UNSAFE_IS_ZERO SAFE_IS_ZERO +syn keyword cmodStatement MKPCHARP_STR APPLY_MASTER current_storage +syn keyword cmodStatement PIKE_MAP_VARIABLE size_shift +syn keyword cmodStatement THREADS_ALLOW THREADS_DISALLOW + +syn keyword cmodStatement add_integer_constant ref_push_object +syn keyword cmodStatement push_string apply_svalue free_svalue +syn keyword cmodStatement get_inherit_storage get_storage +syn keyword cmodStatement make_shared_binary_string push_int64 +syn keyword cmodStatement begin_shared_string end_shared_string +syn keyword cmodStatement add_ref fast_clone_object clone_object +syn keyword cmodStatement push_undefined push_int ref_push_string +syn keyword cmodStatement free_string push_ulongest free_object +syn keyword cmodStatement convert_stack_top_to_bignum push_array +syn keyword cmodStatement push_object reduce_stack_top_bignum +syn keyword cmodStatement push_static_text apply_current +syn keyword cmodStatement assign_svalue free_program destruct_object +syn keyword cmodStatement start_new_program low_inherit stack_swap +syn keyword cmodStatement generic_error_program end_program +syn keyword cmodStatement free_array apply_external copy_mapping +syn keyword cmodStatement push_constant_text ref_push_mapping +syn keyword cmodStatement mapping_insert mapping_string_insert_string +syn keyword cmodStatement f_aggregate_mapping f_aggregate apply +syn keyword cmodStatement push_mapping push_svalue low_mapping_lookup +syn keyword cmodStatement assign_svalues_no_free f_add +syn keyword cmodStatement push_empty_string stack_dup assign_lvalue +syn keyword cmodStatement low_mapping_string_lookup allocate_mapping +syn keyword cmodStatement copy_shared_string make_shared_binary_string0 +syn keyword cmodStatement f_call_function f_index f_utf8_to_string +syn keyword cmodStatement finish_string_builder init_string_builder +syn keyword cmodStatement reset_string_builder free_string_builder +syn keyword cmodStatement string_builder_putchar get_all_args +syn keyword cmodStatement add_shared_strings check_all_args +syn keyword cmodStatement do_inherit add_string_constant +syn keyword cmodStatement add_program_constant set_init_callback +syn keyword cmodStatement simple_mapping_string_lookup +syn keyword cmodStatement f_sprintf push_text string_has_null +syn keyword cmodStatement end_and_resize_shared_string + +syn keyword cmodStatement args sp + +syn keyword cmodStatement free + +syn keyword cmodConstant ID_PROTECTED ID_FINAL PIKE_DEBUG +syn keyword cmodConstant NUMBER_NUMBER +syn keyword cmodConstant PIKE_T_INT PIKE_T_STRING PIKE_T_ARRAY +syn keyword cmodConstant PIKE_T_MULTISET PIKE_T_OBJECT PIKE_T_MAPPING +syn keyword cmodConstant NUMBER_UNDEFINED PIKE_T_PROGRAM PIKE_T_FUNCTION +syn keyword cmodConstant T_OBJECT T_STRING T_ARRAY T_MAPPING + +syn keyword cmodException SET_ONERROR UNSET_ONERROR ONERROR +syn keyword cmodException CALL_AND_UNSET_ONERROR + +syn keyword cmodDebug Pike_fatal Pike_error check_stack + +syn keyword cmodAccess public protected private INHERIT +syn keyword cmodAccess CTYPE CVAR PIKEVAR PIKEFUN + +syn keyword cmodModifier efun export flags optflags optfunc +syn keyword cmodModifier type rawtype errname name c_name prototype +syn keyword cmodModifier program_flags gc_trivial PMOD_EXPORT +syn keyword cmodModifier ATTRIBUTE noclone noinline +syn keyword cmodModifier tOr tFuncV tInt tMix tVoid tStr tMap tPrg +syn keyword cmodModifier tSetvar tArr tMult tMultiset +syn keyword cmodModifier tArray tMapping tString tSetvar tVar + +syn keyword cmodType bool mapping string multiset array mixed +syn keyword cmodType object function program auto svalue +syn keyword cmodType bignum longest zero pike_string +syn keyword cmodType this this_program THIS INT_TYPE INT64 INT32 +syn keyword cmodType p_wchar2 PCHARP p_wchar1 p_wchar0 MP_INT + +syn keyword cmodOperator _destruct create __hash _sizeof _indices _values +syn keyword cmodOperator _is_type _sprintf _equal _m_delete _get_iterator +syn keyword cmodOperator _search _types _serialize _deserialize +syn keyword cmodOperator _size_object _random _sqrt TYPEOF SUBTYPEOF +syn keyword cmodOperator LIKELY UNLIKELY + +syn keyword cmodStructure DECLARATIONS PIKECLASS DECLARE_STORAGE + +if !exists("c_autodoc") + syn match cmodAutodocReal display contained "\%(//\|[/ \t\v]\*\|^\*\)\@2<=!.*" contains=@cmodAutodoc containedin=cComment,cCommentL + syn cluster cCommentGroup add=cmodAutodocReal + syn cluster cPreProcGroup add=cmodAutodocReal +endif + +" Default highlighting +hi def link cmodAccess Statement +hi def link cmodOperator Operator +hi def link cmodStatement Statement +hi def link cmodConstant Constant +hi def link cmodModifier Type +hi def link cmodType Type +hi def link cmodStorageClass StorageClass +hi def link cmodStructure Structure +hi def link cmodException Exception +hi def link cmodDebug Debug + +let b:current_syntax = "cmod" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/runtime/syntax/config.vim b/runtime/syntax/config.vim index c6d4e6b363..3636ed4130 100644 --- a/runtime/syntax/config.vim +++ b/runtime/syntax/config.vim @@ -1,9 +1,10 @@ " Vim syntax file " Language: configure.in script: M4 with sh -" Maintainer: Christian Hammesr <ch@lathspell.westend.com> -" Last Change: 2015 Jan 14 +" Former Maintainer: Christian Hammesr <ch@lathspell.westend.com> +" Last Change: 2018 Feb 03 " (patch from Yngve Inntjore Levinsen to detect AC_MSG) " (patch from Khym Chanur to add @Spell) +" (patch from James McCoy to fix paren matching) " Well, I actually even do not know much about m4. This explains why there " is probably very much missing here, yet ! @@ -30,8 +31,8 @@ syn keyword configspecial cat rm eval syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell " Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string. -syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell -syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell +syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell +syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell " Define the default highlighting. " Only when an item doesn't have highlighting yet @@ -45,6 +46,7 @@ hi def link confignumber Number hi def link configkeyword Keyword hi def link configspecial Special hi def link configstring String +hi def link configmsg String let b:current_syntax = "config" diff --git a/runtime/syntax/cs.vim b/runtime/syntax/cs.vim index 0443a1ff3d..116afe0b72 100644 --- a/runtime/syntax/cs.vim +++ b/runtime/syntax/cs.vim @@ -1,10 +1,12 @@ " Vim syntax file -" Language: C# -" Maintainer: Anduin Withers <awithers@anduin.com> -" Former Maintainer: Johannes Zellner <johannes@zellner.org> -" Last Change: Fri Aug 14 13:56:37 PDT 2009 -" Filenames: *.cs -" $Id: cs.vim,v 1.4 2006/05/03 21:20:02 vimboss Exp $ +" Language: C# +" Maintainer: Nick Jensen <nickspoon@gmail.com> +" Former Maintainers: Anduin Withers <awithers@anduin.com> +" Johannes Zellner <johannes@zellner.org> +" Last Change: 2018-06-29 +" Filenames: *.cs +" License: Vim (see :h license) +" Repository: https://github.com/nickspoons/vim-cs " " REFERENCES: " [1] ECMA TC39: C# Language Specification (WD13Oct01.doc) @@ -17,136 +19,190 @@ let s:cs_cpo_save = &cpo set cpo&vim -" type -syn keyword csType bool byte char decimal double float int long object sbyte short string uint ulong ushort void -" storage -syn keyword csStorage class delegate enum interface namespace struct -" repeat / condition / label -syn keyword csRepeat break continue do for foreach goto return while -syn keyword csConditional else if switch -syn keyword csLabel case default +syn keyword csType bool byte char decimal double float int long object sbyte short string T uint ulong ushort var void dynamic +syn keyword csStorage delegate enum interface namespace struct +syn keyword csRepeat break continue do for foreach goto return while +syn keyword csConditional else if switch +syn keyword csLabel case default +syn match csOperatorError display +::+ +syn match csGlobal display +global::+ " user labels (see [1] 8.6 Statements) -syn match csLabel display +^\s*\I\i*\s*:\([^:]\)\@=+ -" modifier -syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile -" constant -syn keyword csConstant false null true -" exception -syn keyword csException try catch finally throw - -" TODO: -syn keyword csUnspecifiedStatement as base checked event fixed in is lock new operator out params ref sizeof stackalloc this typeof unchecked unsafe using -" TODO: -syn keyword csUnsupportedStatement add remove value -" TODO: -syn keyword csUnspecifiedKeyword explicit implicit +syn match csLabel display +^\s*\I\i*\s*:\([^:]\)\@=+ +syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile +syn keyword csConstant false null true +syn keyword csException try catch finally throw when +syn keyword csLinq ascending by descending equals from group in into join let on orderby select where +syn keyword csAsync async await +syn keyword csUnspecifiedStatement as base checked event fixed in is lock nameof operator out params ref sizeof stackalloc this typeof unchecked unsafe using +syn keyword csUnsupportedStatement add remove value +syn keyword csUnspecifiedKeyword explicit implicit " Contextual Keywords -syn match csContextualStatement /\<yield[[:space:]\n]\+\(return\|break\)/me=s+5 -syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interface\)/me=s+7 -syn match csContextualStatement /\<\(get\|set\)[[:space:]\n]*{/me=s+3 -syn match csContextualStatement /\<where\>[^:]\+:/me=s+5 +syn match csContextualStatement /\<yield[[:space:]\n]\+\(return\|break\)/me=s+5 +syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interface\)/me=s+7 +syn match csContextualStatement /\<\(get\|set\)\(;\|[[:space:]\n]*{\)/me=s+3 +syn match csContextualStatement /\<where\>[^:]\+:/me=s+5 + +" Punctuation +syn match csBraces "[{}\[\]]" display +syn match csParens "[()]" display +syn match csOpSymbols "[+\-><=]\{1,2}" display +syn match csOpSymbols "[!><+\-*/]=" display +syn match csOpSymbols "[!*/^]" display +syn match csOpSymbols "=>" display +syn match csEndColon ";" display +syn match csLogicSymbols "&&" display +syn match csLogicSymbols "||" display +syn match csLogicSymbols "?" display +syn match csLogicSymbols ":" display " Comments " " PROVIDES: @csCommentHook -" -" TODO: include strings ? -" -syn keyword csTodo contained TODO FIXME XXX NOTE -syn region csComment start="/\*" end="\*/" contains=@csCommentHook,csTodo,@Spell -syn match csComment "//.*$" contains=@csCommentHook,csTodo,@Spell +syn keyword csTodo contained TODO FIXME XXX NOTE HACK TBD +syn region csComment start="/\*" end="\*/" contains=@csCommentHook,csTodo,@Spell +syn match csComment "//.*$" contains=@csCommentHook,csTodo,@Spell " xml markup inside '///' comments -syn cluster xmlRegionHook add=csXmlCommentLeader -syn cluster xmlCdataHook add=csXmlCommentLeader -syn cluster xmlStartTagHook add=csXmlCommentLeader -syn keyword csXmlTag contained Libraries Packages Types Excluded ExcludedTypeName ExcludedLibraryName -syn keyword csXmlTag contained ExcludedBucketName TypeExcluded Type TypeKind TypeSignature AssemblyInfo -syn keyword csXmlTag contained AssemblyName AssemblyPublicKey AssemblyVersion AssemblyCulture Base -syn keyword csXmlTag contained BaseTypeName Interfaces Interface InterfaceName Attributes Attribute -syn keyword csXmlTag contained AttributeName Members Member MemberSignature MemberType MemberValue -syn keyword csXmlTag contained ReturnValue ReturnType Parameters Parameter MemberOfPackage -syn keyword csXmlTag contained ThreadingSafetyStatement Docs devdoc example overload remarks returns summary -syn keyword csXmlTag contained threadsafe value internalonly nodoc exception param permission platnote -syn keyword csXmlTag contained seealso b c i pre sub sup block code note paramref see subscript superscript -syn keyword csXmlTag contained list listheader item term description altcompliant altmember +syn cluster xmlRegionHook add=csXmlCommentLeader +syn cluster xmlCdataHook add=csXmlCommentLeader +syn cluster xmlStartTagHook add=csXmlCommentLeader +syn keyword csXmlTag contained Libraries Packages Types Excluded ExcludedTypeName ExcludedLibraryName +syn keyword csXmlTag contained ExcludedBucketName TypeExcluded Type TypeKind TypeSignature AssemblyInfo +syn keyword csXmlTag contained AssemblyName AssemblyPublicKey AssemblyVersion AssemblyCulture Base +syn keyword csXmlTag contained BaseTypeName Interfaces Interface InterfaceName Attributes Attribute +syn keyword csXmlTag contained AttributeName Members Member MemberSignature MemberType MemberValue +syn keyword csXmlTag contained ReturnValue ReturnType Parameters Parameter MemberOfPackage +syn keyword csXmlTag contained ThreadingSafetyStatement Docs devdoc example overload remarks returns summary +syn keyword csXmlTag contained threadsafe value internalonly nodoc exception param permission platnote +syn keyword csXmlTag contained seealso b c i pre sub sup block code note paramref see subscript superscript +syn keyword csXmlTag contained list listheader item term description altcompliant altmember syn cluster xmlTagHook add=csXmlTag -syn match csXmlCommentLeader +\/\/\/+ contained -syn match csXmlComment +\/\/\/.*$+ contains=csXmlCommentLeader,@csXml,@Spell -syntax include @csXml syntax/xml.vim -hi def link xmlRegion Comment +syn match csXmlCommentLeader +\/\/\/+ contained +syn match csXmlComment +\/\/\/.*$+ contains=csXmlCommentLeader,@csXml,@Spell +syn include @csXml syntax/xml.vim +hi def link xmlRegion Comment " [1] 9.5 Pre-processing directives -syn region csPreCondit - \ start="^\s*#\s*\(define\|undef\|if\|elif\|else\|endif\|line\|error\|warning\)" - \ skip="\\$" end="$" contains=csComment keepend -syn region csRegion matchgroup=csPreCondit start="^\s*#\s*region.*$" - \ end="^\s*#\s*endregion" transparent fold contains=TOP +syn region csPreCondit start="^\s*#\s*\(define\|undef\|if\|elif\|else\|endif\|line\|error\|warning\)" skip="\\$" end="$" contains=csComment keepend +syn region csRegion matchgroup=csPreCondit start="^\s*#\s*region.*$" end="^\s*#\s*endregion" transparent fold contains=TOP +syn region csSummary start="^\s*/// <summary" end="^\%\(\s*///\)\@!" transparent fold keepend +syn region csClassType start="@\@1<!\<class\>"hs=s+6 end="[:\n{]"me=e-1 contains=csClass +syn region csNewType start="@\@1<!\<new\>"hs=s+4 end="[;\n{(<\[]"me=e-1 contains=csNew contains=csNewType +syn region csIsType start=" is "hs=s+4 end="[A-Za-z0-9]\+" oneline contains=csIsAs +syn region csIsType start=" as "hs=s+4 end="[A-Za-z0-9]\+" oneline contains=csIsAs +syn keyword csNew new contained +syn keyword csClass class contained +syn keyword csIsAs is as " Strings and constants -syn match csSpecialError contained "\\." -syn match csSpecialCharError contained "[^']" +syn match csSpecialError "\\." contained +syn match csSpecialCharError "[^']" contained " [1] 9.4.4.4 Character literals -syn match csSpecialChar contained +\\["\\'0abfnrtvx]+ -" unicode characters -syn match csUnicodeNumber +\\\(u\x\{4}\|U\x\{8}\)+ contained contains=csUnicodeSpecifier -syn match csUnicodeSpecifier +\\[uU]+ contained -syn region csVerbatimString start=+@"+ end=+"+ skip=+""+ contains=csVerbatimSpec,@Spell -syn match csVerbatimSpec +@"+he=s+1 contained -syn region csString start=+"+ end=+"+ end=+$+ contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell -syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError -syn match csCharacter "'\\''" contains=csSpecialChar -syn match csCharacter "'[^\\]'" -syn match csNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" -syn match csNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" -syn match csNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" -syn match csNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" +syn match csSpecialChar +\\["\\'0abfnrtvx]+ contained display +syn match csUnicodeNumber +\\u\x\{4}+ contained contains=csUnicodeSpecifier display +syn match csUnicodeNumber +\\U\x\{8}+ contained contains=csUnicodeSpecifier display +syn match csUnicodeSpecifier +\\[uU]+ contained display + +syn region csString matchgroup=csQuote start=+"+ end=+"+ end=+$+ extend contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell +syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError display +syn match csCharacter "'\\''" contains=csSpecialChar display +syn match csCharacter "'[^\\]'" display +syn match csNumber "\<0[0-7]*[lL]\=\>" display +syn match csNumber "\<0[xX]\x\+[lL]\=\>" display +syn match csNumber "\<\d\+[lL]\=\>" display +syn match csNumber "\<\d\+\.\d*\%\([eE][-+]\=\d\+\)\=[fFdD]\=" display +syn match csNumber "\.\d\+\%\([eE][-+]\=\d\+\)\=[fFdD]\=" display +syn match csNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" display +syn match csNumber "\<\d\+\%\([eE][-+]\=\d\+\)\=[fFdD]\>" display + +syn region csInterpolatedString matchgroup=csQuote start=+\$"+ end=+"+ end=+$+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,@Spell + +syn region csInterpolation matchgroup=csInterpolationDelimiter start=+{+ end=+}+ keepend contained contains=@csAll,csBracketed,csInterpolationAlign,csInterpolationFormat +syn match csEscapedInterpolation "{{" transparent contains=NONE display +syn match csEscapedInterpolation "}}" transparent contains=NONE display +syn region csInterpolationAlign matchgroup=csInterpolationAlignDel start=+,+ end=+}+ end=+:+me=e-1 contained contains=csNumber,csConstant,csCharacter,csParens,csOpSymbols,csString,csBracketed display +syn match csInterpolationFormat +:[^}]\+}+ contained contains=csInterpolationFormatDel display +syn match csInterpolationAlignDel +,+ contained display +syn match csInterpolationFormatDel +:+ contained display + +syn region csVerbatimString matchgroup=csQuote start=+@"+ end=+"+ skip=+""+ extend contains=csVerbatimQuote,@Spell +syn match csVerbatimQuote +""+ contained +syn match csQuoteError +@$"+he=s+2,me=s+2 + +syn region csInterVerbString matchgroup=csQuote start=+\$@"+ end=+"+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell + +syn region csBracketed matchgroup=csParens start=+(+ end=+)+ contained transparent contains=@csAll,csBracketed + +syn cluster csAll contains=csCharacter,csClassType,csComment,csContextualStatement,csEndColon,csInterpolatedString,csIsType,csLabel,csLogicSymbols,csNewType,csConstant,csNumber,csOpSymbols,csOperatorError,csParens,csPreCondit,csRegion,csString,csSummary,csUnicodeNumber,csUnicodeSpecifier,csVerbatimString " The default highlighting. -hi def link csType Type -hi def link csStorage StorageClass -hi def link csRepeat Repeat -hi def link csConditional Conditional -hi def link csLabel Label -hi def link csModifier StorageClass -hi def link csConstant Constant -hi def link csException Exception -hi def link csUnspecifiedStatement Statement -hi def link csUnsupportedStatement Statement -hi def link csUnspecifiedKeyword Keyword -hi def link csContextualStatement Statement -hi def link csOperatorError Error - -hi def link csTodo Todo -hi def link csComment Comment - -hi def link csSpecialError Error -hi def link csSpecialCharError Error -hi def link csString String -hi def link csVerbatimString String -hi def link csVerbatimSpec SpecialChar -hi def link csPreCondit PreCondit -hi def link csCharacter Character -hi def link csSpecialChar SpecialChar -hi def link csNumber Number -hi def link csUnicodeNumber SpecialChar -hi def link csUnicodeSpecifier SpecialChar +hi def link csType Type +hi def link csNewType Type +hi def link csClassType Type +hi def link csIsType Type +hi def link csStorage StorageClass +hi def link csClass StorageClass +hi def link csRepeat Repeat +hi def link csConditional Conditional +hi def link csLabel Label +hi def link csModifier StorageClass +hi def link csConstant Constant +hi def link csException Exception +hi def link csUnspecifiedStatement Statement +hi def link csUnsupportedStatement Statement +hi def link csUnspecifiedKeyword Keyword +hi def link csNew Statement +hi def link csLinq Statement +hi def link csIsAs Keyword +hi def link csAsync Keyword +hi def link csContextualStatement Statement +hi def link csOperatorError Error +hi def link csInterfaceDeclaration Include + +hi def link csTodo Todo +hi def link csComment Comment + +hi def link csEndColon Statement +hi def link csOpSymbols Operator +hi def link csLogicSymbols Boolean +hi def link csBraces Function +hi def link csParens Operator + +hi def link csSpecialError Error +hi def link csSpecialCharError Error +hi def link csString String +hi def link csQuote String +hi def link csQuoteError Error +hi def link csInterpolatedString String +hi def link csVerbatimString String +hi def link csInterVerbString String +hi def link csVerbatimQuote SpecialChar +hi def link csPreCondit PreCondit +hi def link csCharacter Character +hi def link csSpecialChar SpecialChar +hi def link csNumber Number +hi def link csUnicodeNumber SpecialChar +hi def link csUnicodeSpecifier SpecialChar +hi def link csInterpolationDelimiter Delimiter +hi def link csInterpolationAlignDel csInterpolationDelimiter +hi def link csInterpolationFormat csInterpolationDelimiter +hi def link csInterpolationFormatDel csInterpolationDelimiter " xml markup -hi def link csXmlCommentLeader Comment -hi def link csXmlComment Comment -hi def link csXmlTag Statement +hi def link csXmlCommentLeader Comment +hi def link csXmlComment Comment +hi def link csXmlTag Statement let b:current_syntax = "cs" let &cpo = s:cs_cpo_save unlet s:cs_cpo_save -" vim: ts=8 +" vim: vts=16,28 diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim index 23db7b10e8..ecdbc1795c 100644 --- a/runtime/syntax/css.vim +++ b/runtime/syntax/css.vim @@ -4,10 +4,10 @@ " Claudio Fleiner <claudio@fleiner.com> (Maintainer) " Yeti (Add full CSS2, HTML4 support) " Nikolai Weibull (Add CSS2 support) -" Maintainer: Jules Wang <w.jq0722@gmail.com> " URL: https://github.com/JulesWang/css.vim -" Last Change: 2017 Jan 14 -" cssClassName updated by Ryuichi Hayashida Jan 2016 +" Maintainer: Jules Wang <w.jq0722@gmail.com> +" Last Change: 2018 Feb. 27 +" cssClassName updated by Ryuichi Hayashida Jan 2016 " quit when a syntax file was already loaded if !exists("main_syntax") @@ -69,74 +69,12 @@ endtry " digits syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators -syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)\>" contains=cssUnitDecorators +syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)\>" contains=cssUnitDecorators +syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=%" contains=cssUnitDecorators syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)\>" contains=cssUnitDecorators - -syn match cssIncludeKeyword /@\(-[a-z]\+-\)\=\(media\|keyframes\|import\|charset\|namespace\|page\)/ contained -" @media -syn region cssInclude start=/@media\>/ end=/\ze{/ skipwhite skipnl contains=cssMediaProp,cssValueLength,cssMediaKeyword,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType,cssIncludeKeyword,cssMediaComma,cssComment nextgroup=cssMediaBlock -syn keyword cssMediaType contained screen print aural braille embossed handheld projection tty tv speech all contained skipwhite skipnl -syn keyword cssMediaKeyword only not and contained -syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssTagName,cssClassName,cssIdentifier,cssPseudoClass,cssSelectorOp,cssSelectorOp2,cssAttributeSelector fold -syn match cssMediaComma "," skipwhite skipnl contained - -" Reference: http://www.w3.org/TR/css3-mediaqueries/ -syn keyword cssMediaProp contained width height orientation scan grid -syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(\(device\)-\)\=aspect-ratio/ -syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-pixel-ratio/ -syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-\(height\|width\)/ -syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(height\|width\|resolution\|monochrome\|color\(-index\)\=\)/ -syn keyword cssMediaAttr contained portrait landscape progressive interlace - -" @page -" http://www.w3.org/TR/css3-page/ -syn match cssPage "@page\>[^{]*{\@=" contains=cssPagePseudo,cssIncludeKeyword nextgroup=cssPageWrap transparent skipwhite skipnl -syn match cssPagePseudo /:\(left\|right\|first\|blank\)/ contained skipwhite skipnl -syn region cssPageWrap contained transparent matchgroup=cssBraces start="{" end="}" contains=cssPageMargin,cssPageProp,cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks -syn match cssPageMargin /@\(\(top\|left\|right\|bottom\)-\(left\|center\|right\|middle\|bottom\)\)\(-corner\)\=/ contained nextgroup=cssDefinition skipwhite skipnl -syn keyword cssPageProp contained content size -" http://www.w3.org/TR/CSS2/page.html#break-inside -syn keyword cssPageProp contained orphans widows - -" @keyframe -" http://www.w3.org/TR/css3-animations/#keyframes -syn match cssKeyFrame "@\(-[a-z]\+-\)\=keyframes\>[^{]*{\@=" nextgroup=cssKeyFrameWrap contains=cssVendor,cssIncludeKeyword skipwhite skipnl transparent -syn region cssKeyFrameWrap contained transparent matchgroup=cssBraces start="{" end="}" contains=cssKeyFrameSelector -syn match cssKeyFrameSelector /\(\d*%\|from\|to\)\=/ contained skipwhite skipnl nextgroup=cssDefinition - -" @import -syn region cssInclude start=/@import\>/ end=/\ze;/ transparent contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssIncludeKeyword,cssURL,cssMediaProp,cssValueLength,cssMediaKeyword,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType -syn region cssInclude start=/@charset\>/ end=/\ze;/ transparent contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssIncludeKeyword -syn region cssInclude start=/@namespace\>/ end=/\ze;/ transparent contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssIncludeKeyword - -" @font-face -" http://www.w3.org/TR/css3-fonts/#at-font-face-rule -syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl -syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssCommonAttr,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssFontDescriptorAttr,cssNoise - -syn match cssFontDescriptorProp contained "\<font-family\>" -syn keyword cssFontDescriptorProp contained src -syn match cssFontDescriptorProp contained "\<font-\(style\|weight\|stretch\)\>" -syn match cssFontDescriptorProp contained "\<unicode-range\>" -syn match cssFontDescriptorProp contained "\<font-\(variant\|feature-settings\)\>" - -" src functions -syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend -" font-sytle and font-weight attributes -syn keyword cssFontDescriptorAttr contained normal italic oblique bold -" font-stretch attributes -syn match cssFontDescriptorAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>" -" unicode-range attributes -syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+" -syn match cssFontDescriptorAttr contained "U+\x\+-\x\+" -" font-feature-settings attributes -syn keyword cssFontDescriptorAttr contained on off - - - " The 16 basic color names syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow @@ -162,8 +100,8 @@ syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajow syn keyword cssColor contained oldlace olivedrab orange orangered orchid syn match cssColor contained /\<pale\(goldenrod\|green\|turquoise\|violetred\)\>/ syn keyword cssColor contained papayawhip peachpuff peru pink plum powderblue -syn keyword cssColor contained rosybrown royalblue saddlebrown salmon sandybrown -syn keyword cssColor contained seagreen seashell sienna skyblue slateblue +syn keyword cssColor contained rosybrown royalblue rebeccapurple saddlebrown salmon +syn keyword cssColor contained sandybrown seagreen seashell sienna skyblue slateblue syn keyword cssColor contained slategray slategrey snow springgreen steelblue tan syn keyword cssColor contained thistle tomato turquoise violet wheat syn keyword cssColor contained whitesmoke yellowgreen @@ -180,10 +118,11 @@ syn match cssImportant contained "!\s*important\>" syn match cssColor contained "\<transparent\>" syn match cssColor contained "\<currentColor\>" syn match cssColor contained "\<white\>" -syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>" contains=cssUnitDecorators -syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>" contains=cssUnitDecorators +syn match cssColor contained "#\x\{3,4\}\>" contains=cssUnitDecorators +syn match cssColor contained "#\x\{6\}\>" contains=cssUnitDecorators +syn match cssColor contained "#\x\{8\}\>" contains=cssUnitDecorators -syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" contains=cssStringQ,cssStringQQ oneline +syn region cssURL contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma @@ -224,7 +163,6 @@ syn keyword cssBackgroundAttr contained left center right top bottom " background-repeat attributes syn match cssBackgroundAttr contained "\<no-repeat\>" syn match cssBackgroundAttr contained "\<repeat\(-[xy]\)\=\>" -syn keyword cssBackgroundAttr contained space round " background-size attributes syn keyword cssBackgroundAttr contained cover contain @@ -236,7 +174,7 @@ syn match cssBorderProp contained "\<box-decoration-break\>" syn match cssBorderProp contained "\<box-shadow\>" " border-image attributes -syn keyword cssBorderAttr contained stretch round space fill +syn keyword cssBorderAttr contained stretch round fill " border-style attributes syn keyword cssBorderAttr contained dotted dashed solid double groove ridge inset outset @@ -264,14 +202,18 @@ syn match cssDimensionProp contained "\<\(min\|max\)-\(width\|height\)\>" syn keyword cssDimensionProp contained height syn keyword cssDimensionProp contained width -" shadow and sizing are in other property groups -syn match cssFlexibleBoxProp contained "\<box-\(align\|direction\|flex\|ordinal-group\|orient\|pack\|shadow\|sizing\)\>" -syn keyword cssFlexibleBoxAttr contained start end baseline -syn keyword cssFlexibleBoxAttr contained reverse -syn keyword cssFlexibleBoxAttr contained single multiple -syn keyword cssFlexibleBoxAttr contained horizontal -syn match cssFlexibleBoxAttr contained "\<vertical\(-align\)\@!\>" "escape vertical-align -syn match cssFlexibleBoxAttr contained "\<\(inline\|block\)-axis\>" +" CSS Flexible Box Layout Module Level 1 +" http://www.w3.org/TR/css3-flexbox/ +" CSS Box Alignment Module Level 3 +" http://www.w3.org/TR/css-align-3/ +syn match cssFlexibleBoxProp contained "\<flex\(-\(direction\|wrap\|flow\|grow\|shrink\|basis\)\)\=\>" +syn match cssFlexibleBoxProp contained "\<\(align\|justify\)\(-\(items\|self\|content\)\)\=\>" +syn keyword cssFlexibleBoxProp contained order + +syn match cssFlexibleBoxAttr contained "\<\(row\|column\|wrap\)\(-reverse\)\=\>" +syn keyword cssFlexibleBoxAttr contained nowrap stretch baseline center +syn match cssFlexibleBoxAttr contained "\<flex\(-\(start\|end\)\)\=\>" +syn match cssFlexibleBoxAttr contained "\<space\(-\(between\|around\)\)\=\>" " CSS Fonts Module Level 3 " http://www.w3.org/TR/css-fonts-3/ @@ -279,11 +221,11 @@ syn match cssFontProp contained "\<font\(-\(family\|\|feature-settings\|kerning\ " font attributes syn keyword cssFontAttr contained icon menu caption -syn match cssFontAttr contained "\<small-\(caps\|caption\)\>" syn match cssFontAttr contained "\<message-box\>" syn match cssFontAttr contained "\<status-bar\>" syn keyword cssFontAttr contained larger smaller syn match cssFontAttr contained "\<\(x\{1,2\}-\)\=\(large\|small\)\>" +syn match cssFontAttr contained "\<small-\(caps\|caption\)\>" " font-family attributes syn match cssFontAttr contained "\<\(sans-\)\=serif\>" syn keyword cssFontAttr contained Antiqua Arial Black Book Charcoal Comic Courier Dingbats Gadget Geneva Georgia Grande Helvetica Impact Linotype Lucida MS Monaco Neue New Palatino Roboto Roman Symbol Tahoma Times Trebuchet Verdana Webdings Wingdings York Zapf @@ -312,12 +254,16 @@ syn match cssMultiColumnProp contained "\<break-\(after\|before\|inside\)\>" syn match cssMultiColumnProp contained "\<column-\(count\|fill\|gap\|rule\(-\(color\|style\|width\)\)\=\|span\|width\)\>" syn keyword cssMultiColumnProp contained columns syn keyword cssMultiColumnAttr contained balance medium -syn keyword cssMultiColumnAttr contained always avoid left right page column -syn match cssMultiColumnAttr contained "\<avoid-\(page\|column\)\>" +syn keyword cssMultiColumnAttr contained always left right page column +syn match cssMultiColumnAttr contained "\<avoid\(-\(page\|column\)\)\=\>" " http://www.w3.org/TR/css3-break/#page-break syn match cssMultiColumnProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>" +" http://www.w3.org/TR/SVG11/interact.html +syn match cssInteractProp contained "\<pointer-events\>" +syn match cssInteractAttr contained "\<\(visible\)\=\(Painted\|Fill\|Stroke\)\=\>" + " TODO find following items in w3c docs. syn keyword cssGeneratedContentProp contained quotes crop syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>" @@ -325,7 +271,12 @@ syn match cssGeneratedContentProp contained "\<move-to\>" syn match cssGeneratedContentProp contained "\<page-policy\>" syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>" -syn match cssGridProp contained "\<grid-\(columns\|rows\)\>" +" https://www.w3.org/TR/css-grid-1/ +syn match cssGridProp contained "\<grid\>" +syn match cssGridProp contained "\<grid\(-\(template\|auto\)\)\=\(-\(columns\|rows\|areas\)\)\>" +syn match cssGridProp contained "\<grid-\(column\|row\)\(-\(start\|end\|gap\)\)\=\>" +syn match cssGridProp contained "\<grid-\(area\|gap\)\>" +syn match cssGridProp contained "\<grid-auto-flow\>" syn match cssHyerlinkProp contained "\<target\(-\(name\|new\|position\)\)\=\>" @@ -339,14 +290,14 @@ syn keyword cssListAttr contained inside outside syn keyword cssPositioningProp contained bottom clear clip display float left syn keyword cssPositioningProp contained position right top visibility syn match cssPositioningProp contained "\<z-index\>" -syn keyword cssPositioningAttr contained block compact +syn keyword cssPositioningAttr contained block compact grid syn match cssPositioningAttr contained "\<table\(-\(row-group\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>" syn keyword cssPositioningAttr contained left right both syn match cssPositioningAttr contained "\<list-item\>" -syn match cssPositioningAttr contained "\<inline\(-\(block\|box\|table\)\)\=\>" -syn keyword cssPositioningAttr contained static relative absolute fixed +syn match cssPositioningAttr contained "\<inline\(-\(block\|box\|table\|grid\|flex\)\)\=\>" +syn keyword cssPositioningAttr contained static relative absolute fixed subgrid -syn keyword cssPrintAttr contained landscape portrait crop cross always avoid +syn keyword cssPrintAttr contained landscape portrait crop cross always syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>" syn keyword cssTableAttr contained fixed collapse separate show hide once always @@ -419,17 +370,20 @@ syn keyword cssUIAttr contained both horizontal vertical syn match cssUIProp contained "\<text-overflow\>" syn keyword cssUIAttr contained clip ellipsis -" Already highlighted Props: font content +syn match cssUIProp contained "\<image-rendering\>" +syn keyword cssUIAttr contained pixellated +syn match cssUIAttr contained "\<crisp-edges\>" + "------------------------------------------------ " Webkit/iOS specific attributes -syn match cssUIAttr contained '\(preserve-3d\)' +syn match cssUIAttr contained '\<preserve-3d\>' " IE specific attributes -syn match cssIEUIAttr contained '\(bicubic\)' +syn match cssIEUIAttr contained '\<bicubic\>' " Webkit/iOS specific properties -syn match cssUIProp contained '\(tap-highlight-color\|user-select\|touch-callout\)' +syn match cssUIProp contained '\<tap-highlight-color\|user-select\|touch-callout\>' " IE specific properties -syn match cssIEUIProp contained '\(interpolation-mode\|zoom\|filter\)' +syn match cssIEUIProp contained '\<interpolation-mode\|zoom\|filter\>' " Webkit/Firebox specific properties/attributes syn keyword cssUIProp contained appearance @@ -454,11 +408,25 @@ syn keyword cssAuralAttr contained male female child code digits continuous " mobile text syn match cssMobileTextProp contained "\<text-size-adjust\>" - +syn keyword cssMediaProp contained width height orientation scan grid +syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(\(device\)-\)\=aspect-ratio/ +syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-pixel-ratio/ +syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-\(height\|width\)/ +syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(height\|width\|resolution\|monochrome\|color\(-index\)\=\)/ +syn keyword cssMediaAttr contained portrait landscape progressive interlace +syn match cssKeyFrameProp /\d*%\|from\|to/ contained nextgroup=cssDefinition +syn match cssPageMarginProp /@\(\(top\|left\|right\|bottom\)-\(left\|center\|right\|middle\|bottom\)\)\(-corner\)\=/ contained nextgroup=cssDefinition +syn keyword cssPageProp contained content size +syn keyword cssPageProp contained orphans widows +syn keyword cssFontDescriptorProp contained src +syn match cssFontDescriptorProp contained "\<unicode-range\>" +" unicode-range attributes +syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+" +syn match cssFontDescriptorAttr contained "U+\x\+-\x\+" syn match cssBraces contained "[{}]" syn match cssError contained "{@<>" -syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks,cssNoise fold +syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssAttributeSelector,cssClassName,cssIdentifier,cssAtRule,cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks,cssNoise fold syn match cssBraceError "}" syn match cssAttrComma "," @@ -477,7 +445,7 @@ syn match cssPseudoClassId contained "\<focus\(-inner\)\=\>" syn match cssPseudoClassId contained "\<\(input-\)\=placeholder\>" " Misc highlight groups -syntax match cssUnitDecorators /\(#\|-\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|ch\|rem\|vh\|vw\|vmin\|vmax\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained +syntax match cssUnitDecorators /\(#\|-\|+\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|ch\|rem\|vh\|vw\|vmin\|vmax\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained syntax match cssNoise contained /\(:\|;\|\/\)/ " Comment @@ -490,7 +458,7 @@ syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEsc syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ " Vendor Prefix -syn match cssVendor contained "\(-\(webkit\|moz\|o\|ms\)-\)" +syn match cssVendor contained "-\(webkit\|moz\|o\|ms\)-" " Various CSS Hack characters " In earlier versions of IE (6 and 7), one can prefix property names @@ -508,6 +476,34 @@ syn region cssAttrRegion start=/:/ end=/\ze\(;\|)\|}\)/ contained contains=css.* " 'transition' has Props after ':'. syn region cssAttrRegion start=/transition\s*:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*Prop,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise +syn match cssAtKeyword /@\(font-face\|media\|keyframes\|import\|charset\|namespace\|page\|supports\)/ contained + +syn keyword cssAtRuleLogical only not and contained + +" @media +" Reference: http://www.w3.org/TR/css3-mediaqueries/ +syn region cssAtRule start=/@media\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType,cssComment nextgroup=cssDefinition +syn keyword cssMediaType contained screen print aural braille embossed handheld projection tty tv speech all contained + +" @page +" http://www.w3.org/TR/css3-page/ +syn region cssAtRule start=/@page\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssPagePseudo,cssComment nextgroup=cssDefinition +syn match cssPagePseudo /:\(left\|right\|first\|blank\)/ contained skipwhite skipnl +" @keyframe +" http://www.w3.org/TR/css3-animations/#keyframes +syn region cssAtRule start=/@\(-[a-z]\+-\)\=keyframes\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssVendor,cssComment nextgroup=cssDefinition + +syn region cssAtRule start=/@import\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword,cssURL,cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssMediaType +syn region cssAtRule start=/@charset\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword +syn region cssAtRule start=/@namespace\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword + +" @font-face +" http://www.w3.org/TR/css3-fonts/#at-font-face-rule +syn match cssAtRule "@font-face\>" nextgroup=cssFontDescriptorBlock +" @supports +" https://www.w3.org/TR/css3-conditional/#at-supports +syn region cssAtRule start=/@supports\>/ end=/\ze{/ skipwhite skipnl contains=cssAtRuleLogical,cssAttrRegion,css.*Prop,cssValue.*,cssVendor,cssAtKeyword,cssComment nextgroup=cssDefinition + if main_syntax == "css" syn sync minlines=10 @@ -537,6 +533,7 @@ hi def link cssFontProp cssProp hi def link cssGeneratedContentProp cssProp hi def link cssGridProp cssProp hi def link cssHyerlinkProp cssProp +hi def link cssInteractProp cssProp hi def link cssLineboxProp cssProp hi def link cssListProp cssProp hi def link cssMarqueeProp cssProp @@ -567,6 +564,7 @@ hi def link cssFontAttr cssAttr hi def link cssGeneratedContentAttr cssAttr hi def link cssGridAttr cssAttr hi def link cssHyerlinkAttr cssAttr +hi def link cssInteractAttr cssAttr hi def link cssLineboxAttr cssAttr hi def link cssListAttr cssAttr hi def link cssMarginAttr cssAttr @@ -603,8 +601,8 @@ hi def link cssFunctionName Function hi def link cssFunctionComma Function hi def link cssColor Constant hi def link cssIdentifier Function -hi def link cssInclude Include -hi def link cssIncludeKeyword atKeyword +hi def link cssAtRule Include +hi def link cssAtKeyword PreProc hi def link cssImportant Special hi def link cssBraces Function hi def link cssBraceError Error @@ -613,20 +611,16 @@ hi def link cssUnicodeEscape Special hi def link cssStringQQ String hi def link cssStringQ String hi def link cssAttributeSelector String -hi def link cssMedia atKeyword hi def link cssMediaType Special hi def link cssMediaComma Normal -hi def link cssMediaKeyword Statement +hi def link cssAtRuleLogical Statement hi def link cssMediaProp cssProp hi def link cssMediaAttr cssAttr -hi def link cssPage atKeyword hi def link cssPagePseudo PreProc -hi def link cssPageMargin atKeyword +hi def link cssPageMarginProp cssAtKeyword hi def link cssPageProp cssProp -hi def link cssKeyFrame atKeyword -hi def link cssKeyFrameSelector Constant +hi def link cssKeyFrameProp Constant hi def link cssFontDescriptor Special -hi def link cssFontDescriptorFunction Constant hi def link cssFontDescriptorProp cssProp hi def link cssFontDescriptorAttr cssAttr hi def link cssUnicodeRange Constant @@ -636,7 +630,6 @@ hi def link cssProp StorageClass hi def link cssAttr Constant hi def link cssUnitDecorators Number hi def link cssNoise Noise -hi def link atKeyword PreProc let b:current_syntax = "css" diff --git a/runtime/syntax/cuda.vim b/runtime/syntax/cuda.vim index cfc70b9ea8..13d70e343a 100644 --- a/runtime/syntax/cuda.vim +++ b/runtime/syntax/cuda.vim @@ -1,15 +1,15 @@ " Vim syntax file " Language: CUDA (NVIDIA Compute Unified Device Architecture) " Maintainer: Timothy B. Terriberry <tterribe@users.sourceforge.net> -" Last Change: 2007 Oct 13 +" Last Change: 2018 Feb 06 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif -" Read the C syntax to start with -runtime! syntax/c.vim +" Read the C++ syntax to start with +runtime! syntax/cpp.vim " CUDA extentions syn keyword cudaStorageClass __device__ __global__ __host__ diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim index 6e6ed1951a..edaaf6128f 100644 --- a/runtime/syntax/debchangelog.vim +++ b/runtime/syntax/debchangelog.vim @@ -1,13 +1,13 @@ " Vim syntax file " Language: Debian changelog files -" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> +" Maintainer: Debian Vim Maintainers " Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Wichert Akkerman <wakkerma@debian.org> -" Last Change: 2017 Apr 23 -" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debchangelog.vim +" Last Change: 2018 May 03 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim " Standard syntax initialization -if exists("b:current_syntax") +if exists('b:current_syntax') finish endif @@ -21,7 +21,7 @@ let s:binNMU='binary-only=yes' syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ " exe 'syn match debchangelogFirstKV contained "; \('.s:urgency.'\|'.s:binNMU.'\)"' exe 'syn match debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"' -syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|%(wheezy|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful)%(-%(security|proposed|updates|backports|commercial|partner))=)+" +syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|%(wheezy|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful|bionic|cosmic)%(-%(security|proposed|updates|backports|commercial|partner))=)+" syn match debchangelogVersion contained "(.\{-})" syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*" @@ -46,6 +46,6 @@ hi def link debchangelogVersion Identifier hi def link debchangelogTarget Identifier hi def link debchangelogEmail Special -let b:current_syntax = "debchangelog" +let b:current_syntax = 'debchangelog' " vim: ts=8 sw=2 diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim index b8790747aa..9085cd01d5 100644 --- a/runtime/syntax/debcontrol.vim +++ b/runtime/syntax/debcontrol.vim @@ -1,13 +1,13 @@ " Vim syntax file " Language: Debian control files -" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> +" Maintainer: Debian Vim Maintainers " Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Wichert Akkerman <wakkerma@debian.org> -" Last Change: 2017 Nov 04 -" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debcontrol.vim +" Last Change: 2018 Aug 11 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim " Standard syntax initialization -if exists("b:current_syntax") +if exists('b:current_syntax') finish endif @@ -30,7 +30,7 @@ let s:kernels = ['linux', 'hurd', 'kfreebsd', 'knetbsd', 'kopensolaris', 'netbsd let s:archs = [ \ 'alpha', 'amd64', 'armeb', 'armel', 'armhf', 'arm64', 'avr32', 'hppa' \, 'i386', 'ia64', 'lpia', 'm32r', 'm68k', 'mipsel', 'mips64el', 'mips' - \, 'powerpcspe', 'powerpc', 'ppc64el', 'ppc64', 's390x', 's390', 'sh3eb' + \, 'powerpcspe', 'powerpc', 'ppc64el', 'ppc64', 'riscv64', 's390x', 's390', 'sh3eb' \, 'sh3', 'sh4eb', 'sh4', 'sh', 'sparc64', 'sparc', 'x32' \ ] let s:pairs = [ @@ -40,8 +40,8 @@ let s:pairs = [ " Define some common expressions we can use later on syn keyword debcontrolArchitecture contained all any -exe 'syn keyword debcontrolArchitecture contained '. join(map(s:kernels, {k,v -> v .'-any'})) -exe 'syn keyword debcontrolArchitecture contained '. join(map(s:archs, {k,v -> 'any-'.v})) +exe 'syn keyword debcontrolArchitecture contained '. join(map(copy(s:kernels), {k,v -> v .'-any'})) +exe 'syn keyword debcontrolArchitecture contained '. join(map(copy(s:archs), {k,v -> 'any-'.v})) exe 'syn keyword debcontrolArchitecture contained '. join(s:archs) exe 'syn keyword debcontrolArchitecture contained '. join(s:pairs) @@ -52,7 +52,7 @@ let s:sections = [ \, 'devel', 'doc', 'editors', 'education', 'electronics', 'embedded' \, 'fonts', 'games', 'gnome', 'gnustep', 'gnu-r', 'golang', 'graphics' \, 'hamradio', 'haskell', 'httpd', 'interpreters', 'introspection' - \, 'java', 'javascript', 'kde', 'kernel', 'libs', 'libdevel', 'lisp' + \, 'java\%(script\)\=', 'kde', 'kernel', 'libs', 'libdevel', 'lisp' \, 'localization', 'mail', 'math', 'metapackages', 'misc', 'net' \, 'news', 'ocaml', 'oldlibs', 'otherosfs', 'perl', 'php', 'python' \, 'ruby', 'rust', 'science', 'shells', 'sound', 'text', 'tex' @@ -87,44 +87,29 @@ syn match debcontrolComment "^#.*$" contains=@Spell syn case ignore -" List of all legal keys, in order, from deb-src-control(5) -" Source fields -syn match debcontrolKey contained "^\%(Source\|Maintainer\|Uploaders\|Standards-Version\|Description\|Homepage\|Bugs\|Rules-Requires-Root\): *" -syn match debcontrolKey contained "^\%(XS-\)\=Vcs-\%(Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\|Browser\): *" -syn match debcontrolKey contained "^\%(Origin\|Section\|Priority\): *" -syn match debcontrolKey contained "^Build-\%(Depends\|Conflicts\)\%(-Arch\|-Indep\)\=: *" - -" Binary fields -syn match debcontrolKey contained "^\%(Package\%(-Type\)\=\|Architecture\|Build-Profiles\): *" -syn match debcontrolKey contained "^\%(\%(Build-\)\=Essential\|Multi-Arch\|Tag\): *" -syn match debcontrolKey contained "^\%(\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\): *" -syn match debcontrolKey contained "^\%(Subarchitecture\|Kernel-Version\|Installer-Menu-Item\): *" - -" User-defined fields -syn match debcontrolKey contained "^X[SBC]\{0,3\}\%(-Private\)\=-[-a-zA-Z0-9]\+: *" - -syn match debcontrolDeprecatedKey contained "^\%(\%(XS-\)\=DM-Upload-Allowed\): *" +" Handle all fields from deb-src-control(5) " Fields for which we do strict syntax checking -syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline -syn region debcontrolStrictField start="^Multi-Arch" end="$" contains=debcontrolKey,debcontrolMultiArch oneline -syn region debcontrolStrictField start="^\%(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline -syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKey,debcontrolPriority oneline -syn region debcontrolStrictField start="^Section" end="$" contains=debcontrolKey,debcontrolSection oneline -syn region debcontrolStrictField start="^\%(XC-\)\=Package-Type" end="$" contains=debcontrolKey,debcontrolPackageType oneline -syn region debcontrolStrictField start="^Homepage" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend -syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-\%(Browser\|Arch\|Bzr\|Darcs\|Hg\)" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend -syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Svn" end="$" contains=debcontrolKey,debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend -syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Cvs" end="$" contains=debcontrolKey,debcontrolVcsCvs oneline keepend -syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Git" end="$" contains=debcontrolKey,debcontrolVcsGit oneline keepend -syn region debcontrolStrictField start="^\%(XS-\)\=DM-Upload-Allowed" end="$" contains=debcontrolDeprecatedKey,debcontrolDmUpload oneline -syn region debcontrolStrictField start="^Rules-Requires-Root" end="$" contains=debcontrolKey,debcontrolR3 oneline -syn region debcontrolStrictField start="^\%(Build-\)\=Essential" end="$" contains=debcontrolKey,debcontrolYesNo oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Architecture: *" end="$" contains=debcontrolArchitecture,debcontrolSpace oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Multi-Arch: *" end="$" contains=debcontrolMultiArch oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(Package\|Source\): *" end="$" contains=debcontrolName oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Priority: *" end="$" contains=debcontrolPriority oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Section: *" end="$" contains=debcontrolSection oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XC-\)\=Package-Type: *" end="$" contains=debcontrolPackageType oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Homepage: *" end="$" contains=debcontrolHTTPUrl oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-\%(Browser\|Arch\|Bzr\|Darcs\|Hg\): *" end="$" contains=debcontrolHTTPUrl oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-Svn: *" end="$" contains=debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-Cvs: *" end="$" contains=debcontrolVcsCvs oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-Git: *" end="$" contains=debcontrolVcsGit oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Rules-Requires-Root: *" end="$" contains=debcontrolR3 oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(Build-\)\=Essential: *" end="$" contains=debcontrolYesNo oneline + +syn region debcontrolStrictField matchgroup=debcontrolDeprecatedKey start="^\%(XS-\)\=DM-Upload-Allowed: *" end="$" contains=debcontrolDmUpload oneline " Catch-all for the other legal fields -syn region debcontrolField start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\|Build-Profiles\|Tag\|Subarchitecture\|Kernel-Version\|Installer-Menu-Item\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline -syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\|Uploaders\|X[SBC]\{0,3\}\%(Private-\)\=-[-a-zA-Z0-9]\+\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment -syn region debcontrolMultiFieldSpell start="^\%(Description\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell +syn region debcontrolField matchgroup=debcontrolKey start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\%(-Triggers\)\=\|Build-Profiles\|Tag\|Subarchitecture\|Kernel-Version\|Installer-Menu-Item\): " end="$" contains=debcontrolVariable,debcontrolEmail oneline +syn region debcontrolMultiField matchgroup=debcontrolKey start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\|Uploaders\|X[SBC]\{0,3\}\%(Private-\)\=-[-a-zA-Z0-9]\+\): *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolEmail,debcontrolVariable,debcontrolComment +syn region debcontrolMultiFieldSpell matchgroup=debcontrolKey start="^Description: *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell " Associate our matches and regions with pretty colours hi def link debcontrolKey Keyword @@ -150,7 +135,7 @@ hi def link debcontrolR3 Identifier hi def link debcontrolComment Comment hi def link debcontrolElse Special -let b:current_syntax = "debcontrol" +let b:current_syntax = 'debcontrol' let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/syntax/debcopyright.vim b/runtime/syntax/debcopyright.vim new file mode 100644 index 0000000000..c85ca372d0 --- /dev/null +++ b/runtime/syntax/debcopyright.vim @@ -0,0 +1,33 @@ +" Vim syntax file +" Language: Debian copyright file +" Maintainer: Debian Vim Maintainers +" Last Change: 2018 Feb 05 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcopyright.vim + +" Standard syntax initialization +if exists('b:current_syntax') + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case match + +syn match debcopyrightUrl "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" +syn match debcopyrightKey "^\%(Format\|Upstream-Name\|Upstream-Contact\|Disclaimer\|Source\|Comment\|Files\|Copyright\|License\): *" +syn match debcopyrightEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+" +syn match debcopyrightEmail "<.\{-}>" +syn match debcopyrightComment "^#.*$" contains=@Spell + +hi def link debcopyrightUrl Identifier +hi def link debcopyrightKey Keyword +hi def link debcopyrightEmail Identifier +hi def link debcopyrightComment Comment + +let b:current_syntax = 'debcopyright' + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim index 6791ece294..74e8d42d1c 100644 --- a/runtime/syntax/debsources.vim +++ b/runtime/syntax/debsources.vim @@ -1,12 +1,12 @@ " Vim syntax file " Language: Debian sources.list -" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> +" Maintainer: Debian Vim Maintainers " Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> -" Last Change: 2017 Oct 28 -" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim +" Last Change: 2018 Aug 11 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim " Standard syntax initialization -if exists("b:current_syntax") +if exists('b:current_syntax') finish endif @@ -25,7 +25,7 @@ let s:supported = [ \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', \ 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy', \ - \ 'trusty', 'xenial', 'zesty', 'artful', 'bionic', 'devel' + \ 'trusty', 'xenial', 'bionic', 'cosmic', 'devel' \ ] let s:unsupported = [ \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', @@ -34,12 +34,12 @@ let s:unsupported = [ \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', - \ 'utopic', 'vivid', 'wily', 'yakkety' + \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful' \ ] let &cpo=s:cpo " Match uri's -syn match debsourcesUri +\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++ +syn match debsourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+' exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:supported, '\|'). '\)\>\([-[:alnum:]_./]*\)+' exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:unsupported, '\|') .'\)\>\([-[:alnum:]_./]*\)+' @@ -51,4 +51,4 @@ hi def link debsourcesUnsupportedDistrKeyword WarningMsg hi def link debsourcesComment Comment hi def link debsourcesUri Constant -let b:current_syntax = "debsources" +let b:current_syntax = 'debsources' diff --git a/runtime/syntax/dircolors.vim b/runtime/syntax/dircolors.vim index 3d7f63dc55..74a7068488 100644 --- a/runtime/syntax/dircolors.vim +++ b/runtime/syntax/dircolors.vim @@ -2,7 +2,7 @@ " Language: dircolors(1) input file " Maintainer: Jan Larres <jan@majutsushi.net> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2013-08-17 +" Latest Revision: 2018-02-19 if exists("b:current_syntax") finish @@ -135,6 +135,12 @@ function! s:preview_color(linenr) abort elseif item >= 40 && item <= 47 " ANSI SGR background color let hi_str .= s:get_hi_str(item - 40, 'bg') + elseif item >= 90 && item <= 97 + " ANSI SGR+8 foreground color (xterm 16-color support) + let hi_str .= s:get_hi_str(item - 82, 'fg') + elseif item >= 100 && item <= 107 + " ANSI SGR+8 background color (xterm 16-color support) + let hi_str .= s:get_hi_str(item - 92, 'bg') elseif item == 38 " Foreground for terminals with 88/256 color support let color = s:get_256color(colors) diff --git a/runtime/syntax/doxygen.vim b/runtime/syntax/doxygen.vim index 6bd3726279..adc0c41dd6 100644 --- a/runtime/syntax/doxygen.vim +++ b/runtime/syntax/doxygen.vim @@ -2,11 +2,10 @@ " Language: doxygen on top of c, cpp, idl, java, php " Maintainer: Michael Geddes <vimmer@frog.wheelycreek.net> " Author: Michael Geddes -" Last Changes: Jan 2009 (\tparam by Domnique Pelle, Aug 2013) -" Nov 2017 (@throws by Domnique Pelle) -" Version: 1.23 +" Last Change: November 2017 (\throws by Candy Gumdrop) +" Version: 1.27 " -" Copyright 2004-2008 Michael Geddes +" Copyright 2004-2017 Michael Geddes " Please feel free to use, modify & distribute all or part of this script, " providing this copyright message remains. " I would appreciate being acknowledged in any derived scripts, and would @@ -59,52 +58,76 @@ try " " C/C++ Style line comments - syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO keepend fold containedin=phpRegion - syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenStartL,@Spell keepend skipwhite skipnl nextgroup=doxygenComment2 fold containedin=phpRegion + syn match doxygenCommentWhite +\s*\ze/\*\(\*/\)\@![*!]+ containedin=phpRegion + syn match doxygenCommentWhite +\s*\ze//[/!]+ containedin=phpRegion + syn match doxygenCommentWhite +\s*\ze/\*\(\*/\)\@![*!]+ + syn match doxygenCommentWhite +\s*\ze//[/!]+ containedin=phpRegion + + syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO,doxygenLeadingWhite keepend fold containedin=phpRegion + syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenLeadingLWhite,doxygenStartL,@Spell keepend skipwhite skipnl nextgroup=doxygenCommentWhite2 fold containedin=phpRegion syn region doxygenCommentL start=+//[/!]<+me=e-2 end=+$+ contains=doxygenStartL,@Spell keepend skipwhite skipnl fold containedin=phpRegion syn region doxygenCommentL start=+//@\ze[{}]+ end=+$+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial,@Spell fold containedin=phpRegion + syn region doxygenComment start=+/\*@\ze[{}]+ end=+\*/+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial,@Spell fold containedin=phpRegion " Single line brief followed by multiline comment. + syn match doxygenCommentWhite2 +\_s*\ze/\*\(\*/\)\@![*!]+ contained nextgroup=doxygenComment2 syn region doxygenComment2 start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contained contains=doxygenSyncStart2,doxygenStart2,doxygenTODO keepend fold " This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched. syn match doxygenSyncStart2 +[^*/]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenSkipComment,doxygenStartSkip2 skipwhite skipnl " Skip empty lines at the start for when comments start on the 2nd/3rd line. - syn match doxygenStartSkip2 +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBody,doxygenStartSpecial,doxygenStartSkip skipwhite skipnl - syn match doxygenStartSkip2 +^\s*\*$+ contained nextgroup=doxygenBody,doxygenStartSpecial,,doxygenStartSkip skipwhite skipnl + syn match doxygenStartSkip2 +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBody,doxygenStartSpecial,doxygenStartSkipWhite skipwhite skipnl + syn match doxygenStartSkip2 +^\s*\*$+ contained nextgroup=doxygenBody,doxygenStartSpecial,doxygenStartSkipWhite skipwhite skipnl syn match doxygenStart2 +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenStartSkip2 skipwhite skipnl " Match the Starting pattern (effectively creating the start of a BNF) if !exists('g:doxygen_javadoc_autobrief') || g:doxygen_javadoc_autobrief - syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl - syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenPrevL,doxygenBriefL,doxygenSpecial skipwhite + syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkipWhite,doxygenPage skipwhite skipnl + syn match doxygenLeadingLWhite +\s\++ contained nextgroup=doxygenPrevL,doxygenBriefL,doxygenSpecial + syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenLeaingLWhite,doxygenPrevL,doxygenBriefL,doxygenSpecial " Match the first sentence as a brief comment if ! exists('g:doxygen_end_punctuation') let g:doxygen_end_punctuation='[.]' endif - exe 'syn region doxygenBrief contained start=+[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]+ start=+\(^\s*\)\@<!\*/\@!+ start=+\<\k+ skip=+'.doxygen_end_punctuation.'\S\@=+ end=+'.doxygen_end_punctuation.'+ end=+\(\s*\(\n\s*\*\=\s*\)[@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\@=+ contains=doxygenSmallSpecial,doxygenContinueComment,doxygenBriefEndComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipnl nextgroup=doxygenBody' + exe 'syn region doxygenBrief contained start=+[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]+ start=+\(^\s*\)\@<!\*/\@!+ start=+\<\k+ skip=+'.doxygen_end_punctuation.'\S\@=+ end=+'.doxygen_end_punctuation.'+ end=+\(\s*\(\n\s*\*\=\s*\)[@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\@=+ contains=doxygenSmallSpecial,doxygenContinueCommentWhite,doxygenLeadingWhite,doxygenBriefEndComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipnl nextgroup=doxygenBody' syn match doxygenBriefEndComment +\*/+ contained exe 'syn region doxygenBriefL start=+@\k\@!\|[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@]+ start=+\<+ skip=+'.doxygen_end_punctuation.'\S+ end=+'.doxygen_end_punctuation.'\|$+ contained contains=doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell keepend' syn match doxygenPrevL +<+ contained nextgroup=doxygenBriefL,doxygenSpecial skipwhite else - syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl - syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenPrevL,doxygenLine,doxygenSpecial skipwhite + syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkipWhite,doxygenPage skipwhite skipnl + syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenLeadingLWhite,doxygenPrevL,doxygenLine,doxygenSpecial + syn match doxygenLeadingLWhite +\s\++ contained nextgroup=doxygenPrevL,doxygenLine,doxygenSpecial syn region doxygenLine start=+@\k\@!\|[\\@]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@<]+ start=+\<+ end='$' contained contains=doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell keepend syn match doxygenPrevL +<+ contained nextgroup=doxygenLine,doxygenSpecial skipwhite endif " This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched. - syn match doxygenSyncStart +\ze[^*/]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl + syn match doxygenSyncStart +\ze[^*/]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkipWhite,doxygenPage skipwhite skipnl + " Match an [@\]brief so that it moves to body-mode. + " + " + " syn match doxygenBriefLine contained + syn match doxygenBriefSpecial contained +[@\\]+ nextgroup=doxygenBriefWord skipwhite + " syn region doxygenFindBriefSpecial start=+[@\\]brief\>+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained + syn region doxygenFindBriefSpecial start=+[@\\]brief\>+ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained + + + +" end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ +"syn region doxygenBriefLine contained start=+\<\k+ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contains=doxygenContinueCommentWhite,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipwhite keepend matchgroup=xxx +syn region doxygenBriefLine contained start=+\<\k+ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ skipwhite keepend matchgroup=xxx +" syn region doxygenBriefLine matchgroup=xxxy contained start=+\<\k.\++ skip=+^\s*\k+ end=+end+ skipwhite keepend +"doxygenFindBriefSpecial, + "" syn region doxygenSpecialMultilineDesc start=+.\++ contained contains=doxygenSpecialContinueCommentWhite,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell skipwhite keepend - syn region doxygenBriefLine contained start=+\<\k+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ contains=doxygenContinueComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenHyperLink,doxygenHashLink,@Spell skipwhite keepend " Match a '<' for applying a comment to the previous element. - syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenBody,doxygenSpecial,doxygenStartSkip skipwhite + syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenBody,doxygenSpecial,doxygenStartSkipWhite skipwhite if exists("c_comment_strings") " These are anti-Doxygen comments. If there are more than two asterisks or 3 '/'s @@ -123,10 +146,11 @@ endif "syn region doxygenBodyBit contained start=+$+ " The main body of a doxygen comment. - syn region doxygenBody contained start=+\(/\*[*!]\)\@<!<\|[^<]\|$+ matchgroup=doxygenEndComment end=+\*/+re=e-2,me=e-2 contains=doxygenContinueComment,doxygenTODO,doxygenSpecial,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell + syn region doxygenBody contained start=+\(/\*[*!]\)\@<!<\|[^<]\|$+ matchgroup=doxygenEndComment end=+\*/+re=e-2,me=e-2 contains=doxygenContinueCommentWhite,doxygenTODO,doxygenSpecial,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell " These allow the skipping of comment continuation '*' characters. - syn match doxygenContinueComment contained +^\s*\*/\@!\s*+ + syn match doxygenContinueCommentWhite contained +^\s*\ze\*+ nextgroup=doxygenContinueComment + syn match doxygenContinueComment contained +\*/\@!+ " Catch a Brief comment without punctuation - flag it as an error but " make sure the end comment is picked up also. @@ -135,27 +159,19 @@ endif " Skip empty lines at the start for when comments start on the 2nd/3rd line. if !exists('g:doxygen_javadoc_autobrief') || g:doxygen_javadoc_autobrief - syn match doxygenStartSkip +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl - syn match doxygenStartSkip +^\s*\*$+ contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl + syn match doxygenStartSkipWhite +^\s*\ze\*/\@!+ contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkipWhite,doxygenPage skipwhite skipnl + "syn match doxygenStartSkipWhite +^\s*\ze\*$+ contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkipWhite,doxygenPage skipwhite skipnl else - syn match doxygenStartSkip +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage,doxygenBody skipwhite skipnl - syn match doxygenStartSkip +^\s*\*$+ contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage,doxygenBody skipwhite skipnl + syn match doxygenStartSkipWhite +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkipWhite,doxygenPage,doxygenBody skipwhite skipnl + syn match doxygenStartSkipWhite +^\s*\*$+ contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkipWhite,doxygenPage,doxygenBody skipwhite skipnl endif - " Match an [@\]brief so that it moves to body-mode. - " - " - " syn match doxygenBriefLine contained - syn match doxygenBriefSpecial contained +[@\\]+ nextgroup=doxygenBriefWord skipwhite - syn region doxygenFindBriefSpecial start=+[@\\]brief\>+ end=+\(\n\s*\*\=\s*\([@\\]\([npcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained - - " Create the single word matching special identifiers. fun! s:DxyCreateSmallSpecial( kword, name ) let mx='[-:0-9A-Za-z_%=&+*/!~>|]\@<!\([-0-9A-Za-z_%=+*/!~>|#]\+[-0-9A-Za-z_%=+*/!~>|]\@!\|\\[\\<>&.]@\|[.,][0-9a-zA-Z_]\@=\|::\|([^)]*)\|&[0-9a-zA-Z]\{2,7};\)\+' - exe 'syn region doxygenSpecial'.a:name.'Word contained start=+'.a:kword.'+ end=+\(\_s\+'.mx.'\)\@<=[-a-zA-Z_0-9+*/^%|~!=&\\]\@!+ skipwhite contains=doxygenContinueComment,doxygen'.a:name.'Word' + exe 'syn region doxygenSpecial'.a:name.'Word contained start=+'.a:kword.'+ end=+\(\_s\+'.mx.'\)\@<=[-a-zA-Z_0-9+*/^%|~!=&\\]\@!+ skipwhite contains=doxygenContinueCommentWhite,doxygen'.a:name.'Word' exe 'syn match doxygen'.a:name.'Word contained "\_s\@<='.mx.'" contains=doxygenHtmlSpecial,@Spell keepend' endfun call s:DxyCreateSmallSpecial('p', 'Code') @@ -180,40 +196,42 @@ endif " Match parameters and retvals (highlighting the first word as special). syn match doxygenParamDirection contained "\v\[(\s*in>((]\s*\[|\s*,\s*)out>)=|out>((]\s*\[|\s*,\s*)in>)=)\]" nextgroup=doxygenParamName skipwhite - syn keyword doxygenParam contained param tparam nextgroup=doxygenParamName,doxygenParamDirection skipwhite + syn keyword doxygenParam contained param nextgroup=doxygenParamName,doxygenParamDirection skipwhite + syn keyword doxygenTParam contained tparam nextgroup=doxygenParamName skipwhite syn match doxygenParamName contained +[A-Za-z0-9_:]\++ nextgroup=doxygenSpecialMultilineDesc skipwhite syn keyword doxygenRetval contained retval throw throws exception nextgroup=doxygenParamName skipwhite " Match one line identifiers. syn keyword doxygenOther contained addindex anchor \ dontinclude endhtmlonly endlatexonly showinitializer hideinitializer - \ example htmlonly image include ingroup internal latexonly line - \ overload related relates relatedalso relatesalso sa skip skipline + \ example htmlonly image include includelineno ingroup internal latexonly line + \ overload relates relatesalso sa skip skipline \ until verbinclude version addtogroup htmlinclude copydoc dotfile \ xmlonly endxmlonly - \ nextgroup=doxygenSpecialOnelineDesc + \ nextgroup=doxygenSpecialOnelineDesc copybrief copydetails copyright dir extends + \ implements - syn region doxygenCodeRegion contained matchgroup=doxygenOther start=+\<code\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endcode\>+ contains=doxygenCodeRegionSpecial,doxygenContinueComment,doxygenErrorComment,@NoSpell + syn region doxygenCodeRegion contained matchgroup=doxygenOther start=+\<code\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endcode\>+ contains=doxygenCodeRegionSpecial,doxygenContinueCommentWhite,doxygenErrorComment,@NoSpell syn match doxygenCodeRegionSpecial contained +[\\@]\(endcode\>\)\@=+ - syn region doxygenVerbatimRegion contained matchgroup=doxygenOther start=+\<verbatim\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endverbatim\>+ contains=doxygenVerbatimRegionSpecial,doxygenContinueComment,doxygenErrorComment,@NoSpell + syn region doxygenVerbatimRegion contained matchgroup=doxygenOther start=+\<verbatim\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endverbatim\>+ contains=doxygenVerbatimRegionSpecial,doxygenContinueCommentWhite,doxygenErrorComment,@NoSpell syn match doxygenVerbatimRegionSpecial contained +[\\@]\(endverbatim\>\)\@=+ - if exists('b:current_syntax') + if exists('b:current_syntax') let b:doxygen_syntax_save=b:current_syntax unlet b:current_syntax endif syn include @Dotx syntax/dot.vim - if exists('b:doxygen_syntax_save') + if exists('b:doxygen_syntax_save') let b:current_syntax=b:doxygen_syntax_save unlet b:doxygen_syntax_save else unlet b:current_syntax endif - syn region doxygenDotRegion contained matchgroup=doxygenOther start=+\<dot\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<enddot\>+ contains=doxygenDotRegionSpecial,doxygenErrorComment,doxygenContinueComment,@NoSpell,@Dotx + syn region doxygenDotRegion contained matchgroup=doxygenOther start=+\<dot\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<enddot\>+ contains=doxygenDotRegionSpecial,doxygenErrorComment,doxygenContinueCommentWhite,@NoSpell,@Dotx syn match doxygenDotRegionSpecial contained +[\\@]\(enddot\>\)\@=+ " Match single line identifiers. @@ -224,13 +242,13 @@ endif syn keyword doxygenOther contained par nextgroup=doxygenHeaderLine syn region doxygenHeaderLine start=+.+ end=+^+ contained skipwhite nextgroup=doxygenSpecialMultilineDesc - syn keyword doxygenOther contained arg author authors date deprecated li result return returns see invariant note post pre remark remarks since test nextgroup=doxygenSpecialMultilineDesc + syn keyword doxygenOther contained arg author authors date deprecated li return returns see invariant note post pre remarks since test nextgroup=doxygenSpecialMultilineDesc syn keyword doxygenOtherTODO contained todo attention nextgroup=doxygenSpecialMultilineDesc syn keyword doxygenOtherWARN contained warning nextgroup=doxygenSpecialMultilineDesc syn keyword doxygenOtherBUG contained bug nextgroup=doxygenSpecialMultilineDesc " Handle \link, \endlink, highlighting the link-to and the link text bits separately. - syn region doxygenOtherLink matchgroup=doxygenOther start=+\<link\>+ end=+[\@]\@<=endlink\>+ contained contains=doxygenLinkWord,doxygenContinueComment,doxygenLinkError,doxygenEndlinkSpecial + syn region doxygenOtherLink matchgroup=doxygenOther start=+\<link\>+ end=+[\@]\@<=endlink\>+ contained contains=doxygenLinkWord,doxygenContinueCommentWhite,doxygenLinkError,doxygenEndlinkSpecial syn match doxygenEndlinkSpecial contained +[\\@]\zeendlink\>+ syn match doxygenLinkWord "[_a-zA-Z:#()][_a-z0-9A-Z:#()]*\>" contained skipnl nextgroup=doxygenLinkRest,doxygenContinueLinkComment @@ -250,7 +268,7 @@ endif " Handle section syn keyword doxygenOther defgroup section subsection subsubsection weakgroup contained skipwhite nextgroup=doxygenSpecialIdent - syn region doxygenSpecialSectionDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenContinueComment + syn region doxygenSpecialSectionDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenContinueCommentWhite syn match doxygenSpecialIdent "\<[a-zA-Z_0-9]\+\>" contained nextgroup=doxygenSpecialSectionDesc " Does the one-line description for the one-line type identifiers. @@ -260,8 +278,12 @@ endif " Handle the multiline description for the multiline type identifiers. " Continue until an 'empty' line (can contain a '*' continuation) or until the " next whole-line @ command \ command. - syn region doxygenSpecialMultilineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenSpecialContinueComment,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell skipwhite keepend - syn match doxygenSpecialContinueComment contained +^\s*\*/\@!\s*+ nextgroup=doxygenSpecial skipwhite + syn region doxygenSpecialMultilineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([npcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenSpecialContinueCommentWhite,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup,@Spell skipwhite keepend + +" syn match doxygenSpecialContinueComment contained +^\s*\*/\@!\s*+ nextgroup=doxygenSpecial skipwhite + syn match doxygenSpecialContinueCommentWhite contained +^\s*\ze\*+ nextgroup=doxygenSpecialContinueComment + syn match doxygenSpecialContinueComment contained +\*/\@!+ + " Handle special cases 'bold' and 'group' syn keyword doxygenBold contained bold nextgroup=doxygenSpecialHeading @@ -288,7 +310,7 @@ endif " Supported HTML subset. Not perfect, but okay. syn case ignore - syn region doxygenHtmlTag contained matchgroup=doxygenHtmlCh start=+\v\</=\ze([biuap]|em|strong|img|br|center|code|dfn|d[ldt]|hr|h[0-3]|li|[ou]l|pre|small|sub|sup|table|tt|var|caption|src|alt|longdesc|name|height|width|usemap|ismap|href|type)>+ skip=+\\<\|\<\k\+=\("[^"]*"\|'[^']*\)+ end=+>+ contains=doxygenHtmlCmd,doxygenContinueComment,doxygenHtmlVar + syn region doxygenHtmlTag contained matchgroup=doxygenHtmlCh start=+\v\</=\ze([biuap]|em|strong|img|br|center|code|dfn|d[ldt]|hr|h[0-3]|li|[ou]l|pre|small|sub|sup|table|tt|var|caption|src|alt|longdesc|name|height|width|usemap|ismap|href|type)>+ skip=+\\<\|\<\k\+=\("[^"]*"\|'[^']*\)+ end=+>+ contains=doxygenHtmlCmd,doxygenContinueCommentWhite,doxygenHtmlVar syn keyword doxygenHtmlCmd contained b i em strong u img a br p center code dfn dl dd dt hr h1 h2 h3 li ol ul pre small sub sup table tt var caption nextgroup=doxygenHtmlVar skipwhite syn keyword doxygenHtmlVar contained src alt longdesc name height width usemap ismap href type nextgroup=doxygenHtmlEqu skipwhite syn match doxygenHtmlEqu contained +=+ nextgroup=doxygenHtmlExpr skipwhite @@ -298,7 +320,7 @@ endif syn cluster doxygenHtmlGroup contains=doxygenHtmlCode,doxygenHtmlBold,doxygenHtmlUnderline,doxygenHtmlItalic,doxygenHtmlSpecial,doxygenHtmlTag,doxygenHtmlLink - syn cluster doxygenHtmlTop contains=@Spell,doxygenHtmlSpecial,doxygenHtmlTag,doxygenContinueComment + syn cluster doxygenHtmlTop contains=@Spell,doxygenHtmlSpecial,doxygenHtmlTag,doxygenContinueCommentWhite " Html Support syn region doxygenHtmlLink contained start=+<[aA]\>\s*\(\n\s*\*\s*\)\=\(\(name\|href\)=\("[^"]*"\|'[^']*'\)\)\=\s*>+ end=+</[aA]>+me=e-4 contains=@doxygenHtmlTop hi link doxygenHtmlLink Underlined @@ -343,7 +365,7 @@ endif syn cluster rcGroup add=doxygen.* let s:my_syncolor=0 - if !exists(':SynColor') + if !exists(':SynColor') command -nargs=+ SynColor hi def <args> let s:my_syncolor=1 endif @@ -469,6 +491,8 @@ endif call s:Doxygen_Hilights() + syn match doxygenLeadingWhite +\(^\s*\*\)\@<=\s*+ contained + " This is still a proposal, but won't do any harm. aug doxygengroup au! @@ -483,6 +507,7 @@ endif SynLink doxygenOtherTODO Todo SynLink doxygenOtherWARN Todo SynLink doxygenOtherBUG Todo + SynLink doxygenLeadingLWhite doxygenBody SynLink doxygenErrorSpecial Error SynLink doxygenErrorEnd Error @@ -517,7 +542,10 @@ endif SynLink doxygenBriefL doxygenBrief SynLink doxygenBriefLine doxygenBrief SynLink doxygenHeaderLine doxygenSpecialHeading - SynLink doxygenStartSkip doxygenContinueComment + SynLink doxygenCommentWhite Normal + SynLink doxygenCommentWhite2 doxygenCommentWhite + SynLink doxygenContinueCommentWhite doxygenCommentWhite + SynLink doxygenStartSkipWhite doxygenContinueCommentWhite SynLink doxygenLinkWord doxygenParamName SynLink doxygenLinkRest doxygenSpecialMultilineDesc SynLink doxygenHyperLink doxygenLinkWord @@ -591,5 +619,5 @@ finally let &cpo = s:cpo_save unlet s:cpo_save endtry - +let suppress_doxygen=1 " vim:et sw=2 sts=2 diff --git a/runtime/syntax/html.vim b/runtime/syntax/html.vim index 5f943a9496..cde5269d02 100644 --- a/runtime/syntax/html.vim +++ b/runtime/syntax/html.vim @@ -3,8 +3,8 @@ " Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net> " Previous Maintainer: Claudio Fleiner <claudio@fleiner.com> " Repository: https://notabug.org/jorgesumle/vim-html-syntax -" Last Change: 2017 Sep 30 -" included patch from Christian Brabandt to make use of the strikethrough attributes +" Last Change: 2018 May 31 +" Included patch from Jay Sitter to add WAI-ARIA htmlArg keywords " " Please check :help html.vim for some comments and a description of the options @@ -77,6 +77,29 @@ syn keyword htmlArg contained size src start target text type url syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1 +" aria attributes +syn match htmlArg contained "\<\(aria-activedescendant\|aria-atomic\)\>" +syn match htmlArg contained "\<\(aria-autocomplete\|aria-busy\|aria-checked\)\>" +syn match htmlArg contained "\<\(aria-colcount\|aria-colindex\|aria-colspan\)\>" +syn match htmlArg contained "\<\(aria-controls\|aria-current\)\>" +syn match htmlArg contained "\<\(aria-describedby\|aria-details\)\>" +syn match htmlArg contained "\<\(aria-disabled\|aria-dropeffect\)\>" +syn match htmlArg contained "\<\(aria-errormessage\|aria-expanded\)\>" +syn match htmlArg contained "\<\(aria-flowto\|aria-grabbed\|aria-haspopup\)\>" +syn match htmlArg contained "\<\(aria-hidden\|aria-invalid\)\>" +syn match htmlArg contained "\<\(aria-keyshortcuts\|aria-label\)\>" +syn match htmlArg contained "\<\(aria-labelledby\|aria-level\|aria-live\)\>" +syn match htmlArg contained "\<\(aria-modal\|aria-multiline\)\>" +syn match htmlArg contained "\<\(aria-multiselectable\|aria-orientation\)\>" +syn match htmlArg contained "\<\(aria-owns\|aria-placeholder\|aria-posinset\)\>" +syn match htmlArg contained "\<\(aria-pressed\|aria-readonly\|aria-relevant\)\>" +syn match htmlArg contained "\<\(aria-required\|aria-roledescription\)\>" +syn match htmlArg contained "\<\(aria-rowcount\|aria-rowindex\|aria-rowspan\)\>" +syn match htmlArg contained "\<\(aria-selected\|aria-setsize\|aria-sort\)\>" +syn match htmlArg contained "\<\(aria-valuemax\|aria-valuemin\)\>" +syn match htmlArg contained "\<\(aria-valuenow\|aria-valuetext\)\>" +syn keyword htmlArg contained role + " Netscape extensions syn keyword htmlTagName contained frame noframes frameset nobr blink syn keyword htmlTagName contained layer ilayer nolayer spacer @@ -100,11 +123,11 @@ syn keyword htmlArg contained summary tabindex valuetype version " html 5 arg names syn keyword htmlArg contained allowfullscreen async autocomplete autofocus syn keyword htmlArg contained autoplay challenge contenteditable contextmenu -syn keyword htmlArg contained controls crossorigin default dirname download -syn keyword htmlArg contained draggable dropzone form formaction formenctype -syn keyword htmlArg contained formmethod formnovalidate formtarget hidden -syn keyword htmlArg contained high icon inputmode keytype kind list loop low -syn keyword htmlArg contained max min minlength muted nonce novalidate open +syn keyword htmlArg contained controls crossorigin default dialog dirname +syn keyword htmlArg contained download draggable dropzone form formaction +syn keyword htmlArg contained formenctype formmethod formnovalidate formtarget +syn keyword htmlArg contained hidden high icon inputmode keytype kind list loop +syn keyword htmlArg contained low max min minlength muted nonce novalidate open syn keyword htmlArg contained optimum pattern placeholder poster preload syn keyword htmlArg contained radiogroup required reversed sandbox spellcheck syn keyword htmlArg contained sizes srcset srcdoc srclang step title translate diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim index 89320597f1..c9bb5dc2d4 100644 --- a/runtime/syntax/java.vim +++ b/runtime/syntax/java.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Java " Maintainer: Claudio Fleiner <claudio@fleiner.com> -" URL: http://www.fleiner.com/vim/syntax/java.vim -" Last Change: 2015 March 01 +" URL: https://github.com/fleiner/vim/blob/master/runtime/syntax/java.vim +" Last Change: 2018 July 26 " Please check :help java.vim for comments on some of the options available. @@ -29,8 +29,6 @@ syn match javaOK "\.\.\." syn match javaError2 "#\|=<" hi def link javaError2 javaError - - " keyword definitions syn keyword javaExternal native package syn match javaExternal "\<import\>\(\s\+static\>\)\?" @@ -40,7 +38,7 @@ syn keyword javaRepeat while for do syn keyword javaBoolean true false syn keyword javaConstant null syn keyword javaTypedef this super -syn keyword javaOperator new instanceof +syn keyword javaOperator var new instanceof syn keyword javaType boolean char byte short int long float double syn keyword javaType void syn keyword javaStatement return @@ -54,17 +52,25 @@ syn match javaTypedef "\.\s*\<class\>"ms=s+1 syn keyword javaClassDecl enum syn match javaClassDecl "^class\>" syn match javaClassDecl "[^.]\s*\<class\>"ms=s+1 -syn match javaAnnotation "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>\(([^)]*)\)\=" contains=javaString +syn match javaAnnotation "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>" contains=javaString syn match javaClassDecl "@interface\>" syn keyword javaBranch break continue nextgroup=javaUserLabelRef skipwhite syn match javaUserLabelRef "\k\+" contained syn match javaVarArg "\.\.\." syn keyword javaScopeDecl public protected private abstract +" Java Modules(Since Java 9, for "module-info.java" file) +if fnamemodify(bufname("%"), ":t") == "module-info.java" + syn keyword javaModuleStorageClass module transitive + syn keyword javaModuleStmt open requires exports opens uses provides + syn keyword javaModuleExternal to with + syn cluster javaTop add=javaModuleStorageClass,javaModuleStmt,javaModuleExternal +endif + if exists("java_highlight_java_lang_ids") let java_highlight_all=1 endif -if exists("java_highlight_all") || exists("java_highlight_java") || exists("java_highlight_java_lang") +if exists("java_highlight_all") || exists("java_highlight_java") || exists("java_highlight_java_lang") " java.lang.* syn match javaLangClass "\<System\>" syn keyword javaR_JavaLang NegativeArraySizeException ArrayStoreException IllegalStateException RuntimeException IndexOutOfBoundsException UnsupportedOperationException ArrayIndexOutOfBoundsException ArithmeticException ClassCastException EnumConstantNotPresentException StringIndexOutOfBoundsException IllegalArgumentException IllegalMonitorStateException IllegalThreadStateException NumberFormatException NullPointerException TypeNotPresentException SecurityException @@ -296,6 +302,7 @@ hi def link javaStorageClass StorageClass hi def link javaMethodDecl javaStorageClass hi def link javaClassDecl javaStorageClass hi def link javaScopeDecl javaStorageClass + hi def link javaBoolean Boolean hi def link javaSpecial Special hi def link javaSpecialError Error @@ -329,6 +336,12 @@ hi def link htmlComment Special hi def link htmlCommentPart Special hi def link javaSpaceError Error +if fnamemodify(bufname("%"), ":t") == "module-info.java" + hi def link javaModuleStorageClass StorageClass + hi def link javaModuleStmt Statement + hi def link javaModuleExternal Include +endif + let b:current_syntax = "java" if main_syntax == 'java' diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim index 9589b1938f..78714d0170 100644 --- a/runtime/syntax/javascript.vim +++ b/runtime/syntax/javascript.vim @@ -7,8 +7,9 @@ " (ss) repaired several quoting and grouping glitches " (ss) fixed regex parsing issue with multiple qualifiers [gi] " (ss) additional factoring of keywords, globals, and members -" Last Change: 2012 Oct 05 +" Last Change: 2018 Jul 28 " 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke) +" 2018 Apr 14: adjusted javaScriptRegexpString (LongJohnCoder) " tuning parameters: " unlet javaScript_fold @@ -34,10 +35,13 @@ syn region javaScriptComment start="/\*" end="\*/" contains=@Spell,java syn match javaScriptSpecial "\\\d\d\d\|\\." syn region javaScriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=javaScriptSpecial,@htmlPreproc syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=javaScriptSpecial,@htmlPreproc +syn region javaScriptStringT start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=javaScriptSpecial,javaScriptEmbed,@htmlPreproc + +syn region javaScriptEmbed start=+${+ end=+}+ contains=@javaScriptEmbededExpr syn match javaScriptSpecialCharacter "'\\.'" syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" -syn region javaScriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gim]\{0,2\}\s*$+ end=+/[gim]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline +syn region javaScriptRegexpString start=+[,(=+]\s*/[^/*]+ms=e-1,me=e-1 skip=+\\\\\|\\/+ end=+/[gimuys]\{0,2\}\s*$+ end=+/[gimuys]\{0,2\}\s*[+;.,)\]}]+me=e-1 end=+/[gimuys]\{0,2\}\s\+\/+me=e-1 contains=@htmlPreproc,javaScriptComment oneline syn keyword javaScriptConditional if else switch syn keyword javaScriptRepeat while for do in @@ -56,6 +60,8 @@ syn keyword javaScriptMember document event location syn keyword javaScriptDeprecated escape unescape syn keyword javaScriptReserved abstract boolean byte char class const debugger double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile +syn cluster javaScriptEmbededExpr contains=javaScriptBoolean,javaScriptNull,javaScriptIdentifier,javaScriptStringD,javaScriptStringS,javaScriptStringT + if exists("javaScript_fold") syn match javaScriptFunction "\<function\>" syn region javaScriptFunctionFold start="\<function\>.*[^};]$" end="^\z1}.*$" transparent fold keepend @@ -86,6 +92,7 @@ hi def link javaScriptCommentTodo Todo hi def link javaScriptSpecial Special hi def link javaScriptStringS String hi def link javaScriptStringD String +hi def link javaScriptStringT String hi def link javaScriptCharacter Character hi def link javaScriptSpecialCharacter javaScriptSpecial hi def link javaScriptNumber javaScriptValue @@ -113,6 +120,8 @@ hi def link javaScriptDeprecated Exception hi def link javaScriptReserved Keyword hi def link javaScriptDebug Debug hi def link javaScriptConstant Label +hi def link javaScriptEmbed Special + let b:current_syntax = "javascript" diff --git a/runtime/syntax/lisp.vim b/runtime/syntax/lisp.vim index b02eb09d0a..b6aa04b2c7 100644 --- a/runtime/syntax/lisp.vim +++ b/runtime/syntax/lisp.vim @@ -1,9 +1,9 @@ " Vim syntax file " Language: Lisp " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: May 02, 2016 -" Version: 26 -" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP +" Last Change: Feb 15, 2018 +" Version: 27 +" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_LISP " " Thanks to F Xavier Noria for a list of 978 Common Lisp symbols taken from HyperSpec " Clisp additions courtesy of http://clisp.cvs.sourceforge.net/*checkout*/clisp/clisp/emacs/lisp.vim @@ -40,8 +40,8 @@ syn case ignore " --------------------------------------------------------------------- " Lists: {{{1 -syn match lispSymbol contained ![^()'`,"; \t]\+! -syn match lispBarSymbol contained !|..\{-}|! +syn match lispSymbol contained ![^()'`,"; \t]\+! +syn match lispBarSymbol contained !|..\{-}|! if exists("g:lisp_rainbow") && g:lisp_rainbow != 0 syn region lispParen0 matchgroup=hlLevel0 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen1 syn region lispParen1 contained matchgroup=hlLevel1 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen2 @@ -71,320 +71,320 @@ syn match lispLeadWhite contained "^\s\+" " --------------------------------------------------------------------- " Standard Lisp Functions and Macros: {{{1 -syn keyword lispFunc * find-method pprint-indent -syn keyword lispFunc ** find-package pprint-linear -syn keyword lispFunc *** find-restart pprint-logical-block -syn keyword lispFunc + find-symbol pprint-newline -syn keyword lispFunc ++ finish-output pprint-pop -syn keyword lispFunc +++ first pprint-tab -syn keyword lispFunc - fixnum pprint-tabular -syn keyword lispFunc / flet prin1 -syn keyword lispFunc // float prin1-to-string -syn keyword lispFunc /// float-digits princ -syn keyword lispFunc /= float-precision princ-to-string -syn keyword lispFunc 1+ float-radix print -syn keyword lispFunc 1- float-sign print-not-readable -syn keyword lispFunc < floating-point-inexact print-not-readable-object -syn keyword lispFunc <= floating-point-invalid-operation print-object -syn keyword lispFunc = floating-point-overflow print-unreadable-object -syn keyword lispFunc > floating-point-underflow probe-file -syn keyword lispFunc >= floatp proclaim -syn keyword lispFunc abort floor prog -syn keyword lispFunc abs fmakunbound prog* -syn keyword lispFunc access force-output prog1 -syn keyword lispFunc acons format prog2 -syn keyword lispFunc acos formatter progn -syn keyword lispFunc acosh fourth program-error -syn keyword lispFunc add-method fresh-line progv -syn keyword lispFunc adjoin fround provide -syn keyword lispFunc adjust-array ftruncate psetf -syn keyword lispFunc adjustable-array-p ftype psetq -syn keyword lispFunc allocate-instance funcall push -syn keyword lispFunc alpha-char-p function pushnew -syn keyword lispFunc alphanumericp function-keywords putprop -syn keyword lispFunc and function-lambda-expression quote -syn keyword lispFunc append functionp random -syn keyword lispFunc apply gbitp random-state -syn keyword lispFunc applyhook gcd random-state-p -syn keyword lispFunc apropos generic-function rassoc -syn keyword lispFunc apropos-list gensym rassoc-if -syn keyword lispFunc aref gentemp rassoc-if-not -syn keyword lispFunc arithmetic-error get ratio -syn keyword lispFunc arithmetic-error-operands get-decoded-time rational -syn keyword lispFunc arithmetic-error-operation get-dispatch-macro-character rationalize -syn keyword lispFunc array get-internal-real-time rationalp -syn keyword lispFunc array-dimension get-internal-run-time read -syn keyword lispFunc array-dimension-limit get-macro-character read-byte -syn keyword lispFunc array-dimensions get-output-stream-string read-char -syn keyword lispFunc array-displacement get-properties read-char-no-hang -syn keyword lispFunc array-element-type get-setf-expansion read-delimited-list -syn keyword lispFunc array-has-fill-pointer-p get-setf-method read-eval-print -syn keyword lispFunc array-in-bounds-p get-universal-time read-from-string -syn keyword lispFunc array-rank getf read-line -syn keyword lispFunc array-rank-limit gethash read-preserving-whitespace -syn keyword lispFunc array-row-major-index go read-sequence -syn keyword lispFunc array-total-size graphic-char-p reader-error -syn keyword lispFunc array-total-size-limit handler-bind readtable -syn keyword lispFunc arrayp handler-case readtable-case -syn keyword lispFunc ash hash-table readtablep -syn keyword lispFunc asin hash-table-count real -syn keyword lispFunc asinh hash-table-p realp -syn keyword lispFunc assert hash-table-rehash-size realpart -syn keyword lispFunc assoc hash-table-rehash-threshold reduce -syn keyword lispFunc assoc-if hash-table-size reinitialize-instance -syn keyword lispFunc assoc-if-not hash-table-test rem -syn keyword lispFunc atan host-namestring remf -syn keyword lispFunc atanh identity remhash -syn keyword lispFunc atom if remove -syn keyword lispFunc base-char if-exists remove-duplicates -syn keyword lispFunc base-string ignorable remove-if -syn keyword lispFunc bignum ignore remove-if-not -syn keyword lispFunc bit ignore-errors remove-method -syn keyword lispFunc bit-and imagpart remprop -syn keyword lispFunc bit-andc1 import rename-file -syn keyword lispFunc bit-andc2 in-package rename-package -syn keyword lispFunc bit-eqv in-package replace -syn keyword lispFunc bit-ior incf require -syn keyword lispFunc bit-nand initialize-instance rest -syn keyword lispFunc bit-nor inline restart -syn keyword lispFunc bit-not input-stream-p restart-bind -syn keyword lispFunc bit-orc1 inspect restart-case -syn keyword lispFunc bit-orc2 int-char restart-name -syn keyword lispFunc bit-vector integer return -syn keyword lispFunc bit-vector-p integer-decode-float return-from -syn keyword lispFunc bit-xor integer-length revappend -syn keyword lispFunc block integerp reverse -syn keyword lispFunc boole interactive-stream-p room -syn keyword lispFunc boole-1 intern rotatef -syn keyword lispFunc boole-2 internal-time-units-per-second round -syn keyword lispFunc boole-and intersection row-major-aref -syn keyword lispFunc boole-andc1 invalid-method-error rplaca -syn keyword lispFunc boole-andc2 invoke-debugger rplacd -syn keyword lispFunc boole-c1 invoke-restart safety -syn keyword lispFunc boole-c2 invoke-restart-interactively satisfies -syn keyword lispFunc boole-clr isqrt sbit -syn keyword lispFunc boole-eqv keyword scale-float -syn keyword lispFunc boole-ior keywordp schar -syn keyword lispFunc boole-nand labels search -syn keyword lispFunc boole-nor lambda second -syn keyword lispFunc boole-orc1 lambda-list-keywords sequence -syn keyword lispFunc boole-orc2 lambda-parameters-limit serious-condition -syn keyword lispFunc boole-set last set -syn keyword lispFunc boole-xor lcm set-char-bit -syn keyword lispFunc boolean ldb set-difference -syn keyword lispFunc both-case-p ldb-test set-dispatch-macro-character -syn keyword lispFunc boundp ldiff set-exclusive-or -syn keyword lispFunc break least-negative-double-float set-macro-character -syn keyword lispFunc broadcast-stream least-negative-long-float set-pprint-dispatch -syn keyword lispFunc broadcast-stream-streams least-negative-normalized-double-float set-syntax-from-char -syn keyword lispFunc built-in-class least-negative-normalized-long-float setf -syn keyword lispFunc butlast least-negative-normalized-short-float setq -syn keyword lispFunc byte least-negative-normalized-single-float seventh -syn keyword lispFunc byte-position least-negative-short-float shadow -syn keyword lispFunc byte-size least-negative-single-float shadowing-import -syn keyword lispFunc call-arguments-limit least-positive-double-float shared-initialize -syn keyword lispFunc call-method least-positive-long-float shiftf -syn keyword lispFunc call-next-method least-positive-normalized-double-float short-float -syn keyword lispFunc capitalize least-positive-normalized-long-float short-float-epsilon -syn keyword lispFunc car least-positive-normalized-short-float short-float-negative-epsilon -syn keyword lispFunc case least-positive-normalized-single-float short-site-name -syn keyword lispFunc catch least-positive-short-float signal -syn keyword lispFunc ccase least-positive-single-float signed-byte -syn keyword lispFunc cdr length signum -syn keyword lispFunc ceiling let simple-condition -syn keyword lispFunc cell-error let* simple-array -syn keyword lispFunc cell-error-name lisp simple-base-string -syn keyword lispFunc cerror lisp-implementation-type simple-bit-vector -syn keyword lispFunc change-class lisp-implementation-version simple-bit-vector-p -syn keyword lispFunc char list simple-condition-format-arguments -syn keyword lispFunc char-bit list* simple-condition-format-control -syn keyword lispFunc char-bits list-all-packages simple-error -syn keyword lispFunc char-bits-limit list-length simple-string -syn keyword lispFunc char-code listen simple-string-p -syn keyword lispFunc char-code-limit listp simple-type-error -syn keyword lispFunc char-control-bit load simple-vector -syn keyword lispFunc char-downcase load-logical-pathname-translations simple-vector-p -syn keyword lispFunc char-equal load-time-value simple-warning -syn keyword lispFunc char-font locally sin -syn keyword lispFunc char-font-limit log single-flaot-epsilon -syn keyword lispFunc char-greaterp logand single-float -syn keyword lispFunc char-hyper-bit logandc1 single-float-epsilon -syn keyword lispFunc char-int logandc2 single-float-negative-epsilon -syn keyword lispFunc char-lessp logbitp sinh -syn keyword lispFunc char-meta-bit logcount sixth -syn keyword lispFunc char-name logeqv sleep -syn keyword lispFunc char-not-equal logical-pathname slot-boundp -syn keyword lispFunc char-not-greaterp logical-pathname-translations slot-exists-p -syn keyword lispFunc char-not-lessp logior slot-makunbound -syn keyword lispFunc char-super-bit lognand slot-missing -syn keyword lispFunc char-upcase lognor slot-unbound -syn keyword lispFunc char/= lognot slot-value -syn keyword lispFunc char< logorc1 software-type -syn keyword lispFunc char<= logorc2 software-version -syn keyword lispFunc char= logtest some -syn keyword lispFunc char> logxor sort -syn keyword lispFunc char>= long-float space -syn keyword lispFunc character long-float-epsilon special -syn keyword lispFunc characterp long-float-negative-epsilon special-form-p -syn keyword lispFunc check-type long-site-name special-operator-p -syn keyword lispFunc cis loop speed -syn keyword lispFunc class loop-finish sqrt -syn keyword lispFunc class-name lower-case-p stable-sort -syn keyword lispFunc class-of machine-instance standard -syn keyword lispFunc clear-input machine-type standard-char -syn keyword lispFunc clear-output machine-version standard-char-p -syn keyword lispFunc close macro-function standard-class -syn keyword lispFunc clrhash macroexpand standard-generic-function -syn keyword lispFunc code-char macroexpand-1 standard-method -syn keyword lispFunc coerce macroexpand-l standard-object -syn keyword lispFunc commonp macrolet step -syn keyword lispFunc compilation-speed make-array storage-condition -syn keyword lispFunc compile make-array store-value -syn keyword lispFunc compile-file make-broadcast-stream stream -syn keyword lispFunc compile-file-pathname make-char stream-element-type -syn keyword lispFunc compiled-function make-concatenated-stream stream-error -syn keyword lispFunc compiled-function-p make-condition stream-error-stream -syn keyword lispFunc compiler-let make-dispatch-macro-character stream-external-format -syn keyword lispFunc compiler-macro make-echo-stream streamp -syn keyword lispFunc compiler-macro-function make-hash-table streamup -syn keyword lispFunc complement make-instance string -syn keyword lispFunc complex make-instances-obsolete string-capitalize -syn keyword lispFunc complexp make-list string-char -syn keyword lispFunc compute-applicable-methods make-load-form string-char-p -syn keyword lispFunc compute-restarts make-load-form-saving-slots string-downcase -syn keyword lispFunc concatenate make-method string-equal -syn keyword lispFunc concatenated-stream make-package string-greaterp -syn keyword lispFunc concatenated-stream-streams make-pathname string-left-trim -syn keyword lispFunc cond make-random-state string-lessp -syn keyword lispFunc condition make-sequence string-not-equal -syn keyword lispFunc conjugate make-string string-not-greaterp -syn keyword lispFunc cons make-string-input-stream string-not-lessp -syn keyword lispFunc consp make-string-output-stream string-right-strim -syn keyword lispFunc constantly make-symbol string-right-trim -syn keyword lispFunc constantp make-synonym-stream string-stream -syn keyword lispFunc continue make-two-way-stream string-trim -syn keyword lispFunc control-error makunbound string-upcase -syn keyword lispFunc copy-alist map string/= -syn keyword lispFunc copy-list map-into string< -syn keyword lispFunc copy-pprint-dispatch mapc string<= -syn keyword lispFunc copy-readtable mapcan string= -syn keyword lispFunc copy-seq mapcar string> -syn keyword lispFunc copy-structure mapcon string>= -syn keyword lispFunc copy-symbol maphash stringp -syn keyword lispFunc copy-tree mapl structure -syn keyword lispFunc cos maplist structure-class -syn keyword lispFunc cosh mask-field structure-object -syn keyword lispFunc count max style-warning -syn keyword lispFunc count-if member sublim -syn keyword lispFunc count-if-not member-if sublis -syn keyword lispFunc ctypecase member-if-not subseq -syn keyword lispFunc debug merge subsetp -syn keyword lispFunc decf merge-pathname subst -syn keyword lispFunc declaim merge-pathnames subst-if -syn keyword lispFunc declaration method subst-if-not -syn keyword lispFunc declare method-combination substitute -syn keyword lispFunc decode-float method-combination-error substitute-if -syn keyword lispFunc decode-universal-time method-qualifiers substitute-if-not -syn keyword lispFunc defclass min subtypep -syn keyword lispFunc defconstant minusp svref -syn keyword lispFunc defgeneric mismatch sxhash -syn keyword lispFunc define-compiler-macro mod symbol -syn keyword lispFunc define-condition most-negative-double-float symbol-function -syn keyword lispFunc define-method-combination most-negative-fixnum symbol-macrolet -syn keyword lispFunc define-modify-macro most-negative-long-float symbol-name -syn keyword lispFunc define-setf-expander most-negative-short-float symbol-package -syn keyword lispFunc define-setf-method most-negative-single-float symbol-plist -syn keyword lispFunc define-symbol-macro most-positive-double-float symbol-value -syn keyword lispFunc defmacro most-positive-fixnum symbolp -syn keyword lispFunc defmethod most-positive-long-float synonym-stream -syn keyword lispFunc defpackage most-positive-short-float synonym-stream-symbol -syn keyword lispFunc defparameter most-positive-single-float sys -syn keyword lispFunc defsetf muffle-warning system -syn keyword lispFunc defstruct multiple-value-bind t -syn keyword lispFunc deftype multiple-value-call tagbody -syn keyword lispFunc defun multiple-value-list tailp -syn keyword lispFunc defvar multiple-value-prog1 tan -syn keyword lispFunc delete multiple-value-seteq tanh -syn keyword lispFunc delete-duplicates multiple-value-setq tenth -syn keyword lispFunc delete-file multiple-values-limit terpri -syn keyword lispFunc delete-if name-char the -syn keyword lispFunc delete-if-not namestring third -syn keyword lispFunc delete-package nbutlast throw -syn keyword lispFunc denominator nconc time -syn keyword lispFunc deposit-field next-method-p trace -syn keyword lispFunc describe nil translate-logical-pathname -syn keyword lispFunc describe-object nintersection translate-pathname -syn keyword lispFunc destructuring-bind ninth tree-equal -syn keyword lispFunc digit-char no-applicable-method truename -syn keyword lispFunc digit-char-p no-next-method truncase -syn keyword lispFunc directory not truncate -syn keyword lispFunc directory-namestring notany two-way-stream -syn keyword lispFunc disassemble notevery two-way-stream-input-stream -syn keyword lispFunc division-by-zero notinline two-way-stream-output-stream -syn keyword lispFunc do nreconc type -syn keyword lispFunc do* nreverse type-error -syn keyword lispFunc do-all-symbols nset-difference type-error-datum -syn keyword lispFunc do-exeternal-symbols nset-exclusive-or type-error-expected-type -syn keyword lispFunc do-external-symbols nstring type-of -syn keyword lispFunc do-symbols nstring-capitalize typecase -syn keyword lispFunc documentation nstring-downcase typep -syn keyword lispFunc dolist nstring-upcase unbound-slot -syn keyword lispFunc dotimes nsublis unbound-slot-instance -syn keyword lispFunc double-float nsubst unbound-variable -syn keyword lispFunc double-float-epsilon nsubst-if undefined-function -syn keyword lispFunc double-float-negative-epsilon nsubst-if-not unexport -syn keyword lispFunc dpb nsubstitute unintern -syn keyword lispFunc dribble nsubstitute-if union -syn keyword lispFunc dynamic-extent nsubstitute-if-not unless -syn keyword lispFunc ecase nth unread -syn keyword lispFunc echo-stream nth-value unread-char -syn keyword lispFunc echo-stream-input-stream nthcdr unsigned-byte -syn keyword lispFunc echo-stream-output-stream null untrace -syn keyword lispFunc ed number unuse-package -syn keyword lispFunc eighth numberp unwind-protect -syn keyword lispFunc elt numerator update-instance-for-different-class -syn keyword lispFunc encode-universal-time nunion update-instance-for-redefined-class -syn keyword lispFunc end-of-file oddp upgraded-array-element-type -syn keyword lispFunc endp open upgraded-complex-part-type -syn keyword lispFunc enough-namestring open-stream-p upper-case-p -syn keyword lispFunc ensure-directories-exist optimize use-package -syn keyword lispFunc ensure-generic-function or use-value -syn keyword lispFunc eq otherwise user -syn keyword lispFunc eql output-stream-p user-homedir-pathname -syn keyword lispFunc equal package values -syn keyword lispFunc equalp package-error values-list -syn keyword lispFunc error package-error-package vector -syn keyword lispFunc etypecase package-name vector-pop -syn keyword lispFunc eval package-nicknames vector-push -syn keyword lispFunc eval-when package-shadowing-symbols vector-push-extend -syn keyword lispFunc evalhook package-use-list vectorp -syn keyword lispFunc evenp package-used-by-list warn -syn keyword lispFunc every packagep warning -syn keyword lispFunc exp pairlis when -syn keyword lispFunc export parse-error wild-pathname-p -syn keyword lispFunc expt parse-integer with-accessors -syn keyword lispFunc extended-char parse-namestring with-compilation-unit -syn keyword lispFunc fboundp pathname with-condition-restarts -syn keyword lispFunc fceiling pathname-device with-hash-table-iterator -syn keyword lispFunc fdefinition pathname-directory with-input-from-string -syn keyword lispFunc ffloor pathname-host with-open-file -syn keyword lispFunc fifth pathname-match-p with-open-stream -syn keyword lispFunc file-author pathname-name with-output-to-string -syn keyword lispFunc file-error pathname-type with-package-iterator -syn keyword lispFunc file-error-pathname pathname-version with-simple-restart -syn keyword lispFunc file-length pathnamep with-slots -syn keyword lispFunc file-namestring peek-char with-standard-io-syntax -syn keyword lispFunc file-position phase write -syn keyword lispFunc file-stream pi write-byte -syn keyword lispFunc file-string-length plusp write-char -syn keyword lispFunc file-write-date pop write-line -syn keyword lispFunc fill position write-sequence -syn keyword lispFunc fill-pointer position-if write-string -syn keyword lispFunc find position-if-not write-to-string -syn keyword lispFunc find-all-symbols pprint y-or-n-p -syn keyword lispFunc find-class pprint-dispatch yes-or-no-p -syn keyword lispFunc find-if pprint-exit-if-list-exhausted zerop -syn keyword lispFunc find-if-not pprint-fill +syn keyword lispFunc < find-method pprint-indent +syn keyword lispFunc <= find-package pprint-linear +syn keyword lispFunc = find-restart pprint-logical-block +syn keyword lispFunc > find-symbol pprint-newline +syn keyword lispFunc >= finish-output pprint-pop +syn keyword lispFunc - first pprint-tab +syn keyword lispFunc / fixnum pprint-tabular +syn keyword lispFunc /= flet prin1 +syn keyword lispFunc // float prin1-to-string +syn keyword lispFunc /// float-digits princ +syn keyword lispFunc * floating-point-inexact princ-to-string +syn keyword lispFunc ** floating-point-invalid-operation print +syn keyword lispFunc *** floating-point-overflow print-not-readable +syn keyword lispFunc + floating-point-underflow print-not-readable-object +syn keyword lispFunc ++ floatp print-object +syn keyword lispFunc +++ float-precision print-unreadable-object +syn keyword lispFunc 1- float-radix probe-file +syn keyword lispFunc 1+ float-sign proclaim +syn keyword lispFunc abort floor prog +syn keyword lispFunc abs fmakunbound prog* +syn keyword lispFunc access force-output prog1 +syn keyword lispFunc acons format prog2 +syn keyword lispFunc acos formatter progn +syn keyword lispFunc acosh fourth program-error +syn keyword lispFunc add-method fresh-line progv +syn keyword lispFunc adjoin fround provide +syn keyword lispFunc adjustable-array-p ftruncate psetf +syn keyword lispFunc adjust-array ftype psetq +syn keyword lispFunc allocate-instance funcall push +syn keyword lispFunc alpha-char-p function pushnew +syn keyword lispFunc alphanumericp function-keywords putprop +syn keyword lispFunc and function-lambda-expression quote +syn keyword lispFunc append functionp random +syn keyword lispFunc apply gbitp random-state +syn keyword lispFunc applyhook gcd random-state-p +syn keyword lispFunc apropos generic-function rassoc +syn keyword lispFunc apropos-list gensym rassoc-if +syn keyword lispFunc aref gentemp rassoc-if-not +syn keyword lispFunc arithmetic-error get ratio +syn keyword lispFunc arithmetic-error-operands get-decoded-time rational +syn keyword lispFunc arithmetic-error-operation get-dispatch-macro-character rationalize +syn keyword lispFunc array getf rationalp +syn keyword lispFunc array-dimension gethash read +syn keyword lispFunc array-dimension-limit get-internal-real-time read-byte +syn keyword lispFunc array-dimensions get-internal-run-time read-char +syn keyword lispFunc array-displacement get-macro-character read-char-no-hang +syn keyword lispFunc array-element-type get-output-stream-string read-delimited-list +syn keyword lispFunc array-has-fill-pointer-p get-properties reader-error +syn keyword lispFunc array-in-bounds-p get-setf-expansion read-eval-print +syn keyword lispFunc arrayp get-setf-method read-from-string +syn keyword lispFunc array-rank get-universal-time read-line +syn keyword lispFunc array-rank-limit go read-preserving-whitespace +syn keyword lispFunc array-row-major-index graphic-char-p read-sequence +syn keyword lispFunc array-total-size handler-bind readtable +syn keyword lispFunc array-total-size-limit handler-case readtable-case +syn keyword lispFunc ash hash-table readtablep +syn keyword lispFunc asin hash-table-count real +syn keyword lispFunc asinh hash-table-p realp +syn keyword lispFunc assert hash-table-rehash-size realpart +syn keyword lispFunc assoc hash-table-rehash-threshold reduce +syn keyword lispFunc assoc-if hash-table-size reinitialize-instance +syn keyword lispFunc assoc-if-not hash-table-test rem +syn keyword lispFunc atan host-namestring remf +syn keyword lispFunc atanh identity remhash +syn keyword lispFunc atom if remove +syn keyword lispFunc base-char if-exists remove-duplicates +syn keyword lispFunc base-string ignorable remove-if +syn keyword lispFunc bignum ignore remove-if-not +syn keyword lispFunc bit ignore-errors remove-method +syn keyword lispFunc bit-and imagpart remprop +syn keyword lispFunc bit-andc1 import rename-file +syn keyword lispFunc bit-andc2 incf rename-package +syn keyword lispFunc bit-eqv initialize-instance replace +syn keyword lispFunc bit-ior inline require +syn keyword lispFunc bit-nand in-package rest +syn keyword lispFunc bit-nor in-package restart +syn keyword lispFunc bit-not input-stream-p restart-bind +syn keyword lispFunc bit-orc1 inspect restart-case +syn keyword lispFunc bit-orc2 int-char restart-name +syn keyword lispFunc bit-vector integer return +syn keyword lispFunc bit-vector-p integer-decode-float return-from +syn keyword lispFunc bit-xor integer-length revappend +syn keyword lispFunc block integerp reverse +syn keyword lispFunc boole interactive-stream-p room +syn keyword lispFunc boole-1 intern rotatef +syn keyword lispFunc boole-2 internal-time-units-per-second round +syn keyword lispFunc boolean intersection row-major-aref +syn keyword lispFunc boole-and invalid-method-error rplaca +syn keyword lispFunc boole-andc1 invoke-debugger rplacd +syn keyword lispFunc boole-andc2 invoke-restart safety +syn keyword lispFunc boole-c1 invoke-restart-interactively satisfies +syn keyword lispFunc boole-c2 isqrt sbit +syn keyword lispFunc boole-clr keyword scale-float +syn keyword lispFunc boole-eqv keywordp schar +syn keyword lispFunc boole-ior labels search +syn keyword lispFunc boole-nand lambda second +syn keyword lispFunc boole-nor lambda-list-keywords sequence +syn keyword lispFunc boole-orc1 lambda-parameters-limit serious-condition +syn keyword lispFunc boole-orc2 last set +syn keyword lispFunc boole-set lcm set-char-bit +syn keyword lispFunc boole-xor ldb set-difference +syn keyword lispFunc both-case-p ldb-test set-dispatch-macro-character +syn keyword lispFunc boundp ldiff set-exclusive-or +syn keyword lispFunc break least-negative-double-float setf +syn keyword lispFunc broadcast-stream least-negative-long-float set-macro-character +syn keyword lispFunc broadcast-stream-streams least-negative-normalized-double-float set-pprint-dispatch +syn keyword lispFunc built-in-class least-negative-normalized-long-float setq +syn keyword lispFunc butlast least-negative-normalized-short-float set-syntax-from-char +syn keyword lispFunc byte least-negative-normalized-single-float seventh +syn keyword lispFunc byte-position least-negative-short-float shadow +syn keyword lispFunc byte-size least-negative-single-float shadowing-import +syn keyword lispFunc call-arguments-limit least-positive-double-float shared-initialize +syn keyword lispFunc call-method least-positive-long-float shiftf +syn keyword lispFunc call-next-method least-positive-normalized-double-float short-float +syn keyword lispFunc capitalize least-positive-normalized-long-float short-float-epsilon +syn keyword lispFunc car least-positive-normalized-short-float short-float-negative-epsilon +syn keyword lispFunc case least-positive-normalized-single-float short-site-name +syn keyword lispFunc catch least-positive-short-float signal +syn keyword lispFunc ccase least-positive-single-float signed-byte +syn keyword lispFunc cdr length signum +syn keyword lispFunc ceiling let simple-array +syn keyword lispFunc cell-error let* simple-base-string +syn keyword lispFunc cell-error-name lisp simple-bit-vector +syn keyword lispFunc cerror lisp-implementation-type simple-bit-vector-p +syn keyword lispFunc change-class lisp-implementation-version simple-condition +syn keyword lispFunc char list simple-condition-format-arguments +syn keyword lispFunc char< list* simple-condition-format-control +syn keyword lispFunc char<= list-all-packages simple-error +syn keyword lispFunc char= listen simple-string +syn keyword lispFunc char> list-length simple-string-p +syn keyword lispFunc char>= listp simple-type-error +syn keyword lispFunc char/= load simple-vector +syn keyword lispFunc character load-logical-pathname-translations simple-vector-p +syn keyword lispFunc characterp load-time-value simple-warning +syn keyword lispFunc char-bit locally sin +syn keyword lispFunc char-bits log single-flaot-epsilon +syn keyword lispFunc char-bits-limit logand single-float +syn keyword lispFunc char-code logandc1 single-float-epsilon +syn keyword lispFunc char-code-limit logandc2 single-float-negative-epsilon +syn keyword lispFunc char-control-bit logbitp sinh +syn keyword lispFunc char-downcase logcount sixth +syn keyword lispFunc char-equal logeqv sleep +syn keyword lispFunc char-font logical-pathname slot-boundp +syn keyword lispFunc char-font-limit logical-pathname-translations slot-exists-p +syn keyword lispFunc char-greaterp logior slot-makunbound +syn keyword lispFunc char-hyper-bit lognand slot-missing +syn keyword lispFunc char-int lognor slot-unbound +syn keyword lispFunc char-lessp lognot slot-value +syn keyword lispFunc char-meta-bit logorc1 software-type +syn keyword lispFunc char-name logorc2 software-version +syn keyword lispFunc char-not-equal logtest some +syn keyword lispFunc char-not-greaterp logxor sort +syn keyword lispFunc char-not-lessp long-float space +syn keyword lispFunc char-super-bit long-float-epsilon special +syn keyword lispFunc char-upcase long-float-negative-epsilon special-form-p +syn keyword lispFunc check-type long-site-name special-operator-p +syn keyword lispFunc cis loop speed +syn keyword lispFunc class loop-finish sqrt +syn keyword lispFunc class-name lower-case-p stable-sort +syn keyword lispFunc class-of machine-instance standard +syn keyword lispFunc clear-input machine-type standard-char +syn keyword lispFunc clear-output machine-version standard-char-p +syn keyword lispFunc close macroexpand standard-class +syn keyword lispFunc clrhash macroexpand-1 standard-generic-function +syn keyword lispFunc code-char macroexpand-l standard-method +syn keyword lispFunc coerce macro-function standard-object +syn keyword lispFunc commonp macrolet step +syn keyword lispFunc compilation-speed make-array storage-condition +syn keyword lispFunc compile make-array store-value +syn keyword lispFunc compiled-function make-broadcast-stream stream +syn keyword lispFunc compiled-function-p make-char stream-element-type +syn keyword lispFunc compile-file make-concatenated-stream stream-error +syn keyword lispFunc compile-file-pathname make-condition stream-error-stream +syn keyword lispFunc compiler-let make-dispatch-macro-character stream-external-format +syn keyword lispFunc compiler-macro make-echo-stream streamp +syn keyword lispFunc compiler-macro-function make-hash-table streamup +syn keyword lispFunc complement make-instance string +syn keyword lispFunc complex make-instances-obsolete string< +syn keyword lispFunc complexp make-list string<= +syn keyword lispFunc compute-applicable-methods make-load-form string= +syn keyword lispFunc compute-restarts make-load-form-saving-slots string> +syn keyword lispFunc concatenate make-method string>= +syn keyword lispFunc concatenated-stream make-package string/= +syn keyword lispFunc concatenated-stream-streams make-pathname string-capitalize +syn keyword lispFunc cond make-random-state string-char +syn keyword lispFunc condition make-sequence string-char-p +syn keyword lispFunc conjugate make-string string-downcase +syn keyword lispFunc cons make-string-input-stream string-equal +syn keyword lispFunc consp make-string-output-stream string-greaterp +syn keyword lispFunc constantly make-symbol string-left-trim +syn keyword lispFunc constantp make-synonym-stream string-lessp +syn keyword lispFunc continue make-two-way-stream string-not-equal +syn keyword lispFunc control-error makunbound string-not-greaterp +syn keyword lispFunc copy-alist map string-not-lessp +syn keyword lispFunc copy-list mapc stringp +syn keyword lispFunc copy-pprint-dispatch mapcan string-right-strim +syn keyword lispFunc copy-readtable mapcar string-right-trim +syn keyword lispFunc copy-seq mapcon string-stream +syn keyword lispFunc copy-structure maphash string-trim +syn keyword lispFunc copy-symbol map-into string-upcase +syn keyword lispFunc copy-tree mapl structure +syn keyword lispFunc cos maplist structure-class +syn keyword lispFunc cosh mask-field structure-object +syn keyword lispFunc count max style-warning +syn keyword lispFunc count-if member sublim +syn keyword lispFunc count-if-not member-if sublis +syn keyword lispFunc ctypecase member-if-not subseq +syn keyword lispFunc debug merge subsetp +syn keyword lispFunc decf merge-pathname subst +syn keyword lispFunc declaim merge-pathnames subst-if +syn keyword lispFunc declaration method subst-if-not +syn keyword lispFunc declare method-combination substitute +syn keyword lispFunc decode-float method-combination-error substitute-if +syn keyword lispFunc decode-universal-time method-qualifiers substitute-if-not +syn keyword lispFunc defclass min subtypep +syn keyword lispFunc defconstant minusp svref +syn keyword lispFunc defgeneric mismatch sxhash +syn keyword lispFunc define-compiler-macro mod symbol +syn keyword lispFunc define-condition most-negative-double-float symbol-function +syn keyword lispFunc define-method-combination most-negative-fixnum symbol-macrolet +syn keyword lispFunc define-modify-macro most-negative-long-float symbol-name +syn keyword lispFunc define-setf-expander most-negative-short-float symbolp +syn keyword lispFunc define-setf-method most-negative-single-float symbol-package +syn keyword lispFunc define-symbol-macro most-positive-double-float symbol-plist +syn keyword lispFunc defmacro most-positive-fixnum symbol-value +syn keyword lispFunc defmethod most-positive-long-float synonym-stream +syn keyword lispFunc defpackage most-positive-short-float synonym-stream-symbol +syn keyword lispFunc defparameter most-positive-single-float sys +syn keyword lispFunc defsetf muffle-warning system +syn keyword lispFunc defstruct multiple-value-bind t +syn keyword lispFunc deftype multiple-value-call tagbody +syn keyword lispFunc defun multiple-value-list tailp +syn keyword lispFunc defvar multiple-value-prog1 tan +syn keyword lispFunc delete multiple-value-seteq tanh +syn keyword lispFunc delete-duplicates multiple-value-setq tenth +syn keyword lispFunc delete-file multiple-values-limit terpri +syn keyword lispFunc delete-if name-char the +syn keyword lispFunc delete-if-not namestring third +syn keyword lispFunc delete-package nbutlast throw +syn keyword lispFunc denominator nconc time +syn keyword lispFunc deposit-field next-method-p trace +syn keyword lispFunc describe nil translate-logical-pathname +syn keyword lispFunc describe-object nintersection translate-pathname +syn keyword lispFunc destructuring-bind ninth tree-equal +syn keyword lispFunc digit-char no-applicable-method truename +syn keyword lispFunc digit-char-p no-next-method truncase +syn keyword lispFunc directory not truncate +syn keyword lispFunc directory-namestring notany two-way-stream +syn keyword lispFunc disassemble notevery two-way-stream-input-stream +syn keyword lispFunc division-by-zero notinline two-way-stream-output-stream +syn keyword lispFunc do nreconc type +syn keyword lispFunc do* nreverse typecase +syn keyword lispFunc do-all-symbols nset-difference type-error +syn keyword lispFunc documentation nset-exclusive-or type-error-datum +syn keyword lispFunc do-exeternal-symbols nstring type-error-expected-type +syn keyword lispFunc do-external-symbols nstring-capitalize type-of +syn keyword lispFunc dolist nstring-downcase typep +syn keyword lispFunc do-symbols nstring-upcase unbound-slot +syn keyword lispFunc dotimes nsublis unbound-slot-instance +syn keyword lispFunc double-float nsubst unbound-variable +syn keyword lispFunc double-float-epsilon nsubst-if undefined-function +syn keyword lispFunc double-float-negative-epsilon nsubst-if-not unexport +syn keyword lispFunc dpb nsubstitute unintern +syn keyword lispFunc dribble nsubstitute-if union +syn keyword lispFunc dynamic-extent nsubstitute-if-not unless +syn keyword lispFunc ecase nth unread +syn keyword lispFunc echo-stream nthcdr unread-char +syn keyword lispFunc echo-stream-input-stream nth-value unsigned-byte +syn keyword lispFunc echo-stream-output-stream null untrace +syn keyword lispFunc ed number unuse-package +syn keyword lispFunc eighth numberp unwind-protect +syn keyword lispFunc elt numerator update-instance-for-different-class +syn keyword lispFunc encode-universal-time nunion update-instance-for-redefined-class +syn keyword lispFunc end-of-file oddp upgraded-array-element-type +syn keyword lispFunc endp open upgraded-complex-part-type +syn keyword lispFunc enough-namestring open-stream-p upper-case-p +syn keyword lispFunc ensure-directories-exist optimize use-package +syn keyword lispFunc ensure-generic-function or user +syn keyword lispFunc eq otherwise user-homedir-pathname +syn keyword lispFunc eql output-stream-p use-value +syn keyword lispFunc equal package values +syn keyword lispFunc equalp package-error values-list +syn keyword lispFunc error package-error-package variable +syn keyword lispFunc etypecase package-name vector +syn keyword lispFunc eval package-nicknames vectorp +syn keyword lispFunc evalhook packagep vector-pop +syn keyword lispFunc eval-when package-shadowing-symbols vector-push +syn keyword lispFunc evenp package-used-by-list vector-push-extend +syn keyword lispFunc every package-use-list warn +syn keyword lispFunc exp pairlis warning +syn keyword lispFunc export parse-error when +syn keyword lispFunc expt parse-integer wild-pathname-p +syn keyword lispFunc extended-char parse-namestring with-accessors +syn keyword lispFunc fboundp pathname with-compilation-unit +syn keyword lispFunc fceiling pathname-device with-condition-restarts +syn keyword lispFunc fdefinition pathname-directory with-hash-table-iterator +syn keyword lispFunc ffloor pathname-host with-input-from-string +syn keyword lispFunc fifth pathname-match-p with-open-file +syn keyword lispFunc file-author pathname-name with-open-stream +syn keyword lispFunc file-error pathnamep with-output-to-string +syn keyword lispFunc file-error-pathname pathname-type with-package-iterator +syn keyword lispFunc file-length pathname-version with-simple-restart +syn keyword lispFunc file-namestring peek-char with-slots +syn keyword lispFunc file-position phase with-standard-io-syntax +syn keyword lispFunc file-stream pi write +syn keyword lispFunc file-string-length plusp write-byte +syn keyword lispFunc file-write-date pop write-char +syn keyword lispFunc fill position write-line +syn keyword lispFunc fill-pointer position-if write-sequence +syn keyword lispFunc find position-if-not write-string +syn keyword lispFunc find-all-symbols pprint write-to-string +syn keyword lispFunc find-class pprint-dispatch yes-or-no-p +syn keyword lispFunc find-if pprint-exit-if-list-exhausted y-or-n-p +syn keyword lispFunc find-if-not pprint-fill zerop syn match lispFunc "\<c[ad]\+r\>" if exists("g:lispsyntax_clisp") @@ -563,50 +563,50 @@ syn sync lines=100 " Define Highlighting: {{{1 if !exists("skip_lisp_syntax_inits") - hi def link lispCommentRegion lispComment + hi def link lispCommentRegion lispComment hi def link lispAtomNmbr lispNumber hi def link lispAtomMark lispMark hi def link lispInStringString lispString - hi def link lispAtom Identifier - hi def link lispAtomBarSymbol Special + hi def link lispAtom Identifier + hi def link lispAtomBarSymbol Special hi def link lispBarSymbol Special hi def link lispComment Comment hi def link lispConcat Statement - hi def link lispDecl Statement - hi def link lispFunc Statement - hi def link lispKey Type - hi def link lispMark Delimiter + hi def link lispDecl Statement + hi def link lispFunc Statement + hi def link lispKey Type + hi def link lispMark Delimiter hi def link lispNumber Number hi def link lispParenError Error - hi def link lispEscapeSpecial Type + hi def link lispEscapeSpecial Type hi def link lispString String - hi def link lispTodo Todo - hi def link lispVar Statement + hi def link lispTodo Todo + hi def link lispVar Statement if exists("g:lisp_rainbow") && g:lisp_rainbow != 0 if &bg == "dark" - hi def hlLevel0 ctermfg=red guifg=red1 - hi def hlLevel1 ctermfg=yellow guifg=orange1 - hi def hlLevel2 ctermfg=green guifg=yellow1 - hi def hlLevel3 ctermfg=cyan guifg=greenyellow - hi def hlLevel4 ctermfg=magenta guifg=green1 - hi def hlLevel5 ctermfg=red guifg=springgreen1 - hi def hlLevel6 ctermfg=yellow guifg=cyan1 - hi def hlLevel7 ctermfg=green guifg=slateblue1 - hi def hlLevel8 ctermfg=cyan guifg=magenta1 - hi def hlLevel9 ctermfg=magenta guifg=purple1 + hi def hlLevel0 ctermfg=red guifg=red1 + hi def hlLevel1 ctermfg=yellow guifg=orange1 + hi def hlLevel2 ctermfg=green guifg=yellow1 + hi def hlLevel3 ctermfg=cyan guifg=greenyellow + hi def hlLevel4 ctermfg=magenta guifg=green1 + hi def hlLevel5 ctermfg=red guifg=springgreen1 + hi def hlLevel6 ctermfg=yellow guifg=cyan1 + hi def hlLevel7 ctermfg=green guifg=slateblue1 + hi def hlLevel8 ctermfg=cyan guifg=magenta1 + hi def hlLevel9 ctermfg=magenta guifg=purple1 else - hi def hlLevel0 ctermfg=red guifg=red3 - hi def hlLevel1 ctermfg=darkyellow guifg=orangered3 - hi def hlLevel2 ctermfg=darkgreen guifg=orange2 - hi def hlLevel3 ctermfg=blue guifg=yellow3 - hi def hlLevel4 ctermfg=darkmagenta guifg=olivedrab4 - hi def hlLevel5 ctermfg=red guifg=green4 - hi def hlLevel6 ctermfg=darkyellow guifg=paleturquoise3 - hi def hlLevel7 ctermfg=darkgreen guifg=deepskyblue4 - hi def hlLevel8 ctermfg=blue guifg=darkslateblue - hi def hlLevel9 ctermfg=darkmagenta guifg=darkviolet + hi def hlLevel0 ctermfg=red guifg=red3 + hi def hlLevel1 ctermfg=darkyellow guifg=orangered3 + hi def hlLevel2 ctermfg=darkgreen guifg=orange2 + hi def hlLevel3 ctermfg=blue guifg=yellow3 + hi def hlLevel4 ctermfg=darkmagenta guifg=olivedrab4 + hi def hlLevel5 ctermfg=red guifg=green4 + hi def hlLevel6 ctermfg=darkyellow guifg=paleturquoise3 + hi def hlLevel7 ctermfg=darkgreen guifg=deepskyblue4 + hi def hlLevel8 ctermfg=blue guifg=darkslateblue + hi def hlLevel9 ctermfg=darkmagenta guifg=darkviolet endif endif diff --git a/runtime/syntax/logtalk.vim b/runtime/syntax/logtalk.vim index 532f83d3bf..a7fe9ce925 100644 --- a/runtime/syntax/logtalk.vim +++ b/runtime/syntax/logtalk.vim @@ -2,7 +2,7 @@ " " Language: Logtalk " Maintainer: Paulo Moura <pmoura@logtalk.org> -" Last Change: February 4, 2012 +" Last Change: August 3, 2018 " quit when a syntax file was already loaded @@ -79,13 +79,13 @@ syn region logtalkDir matchgroup=logtalkDirTag start=":- elif(" matchgroup=log syn match logtalkDirTag ":- else\." syn match logtalkDirTag ":- endif\." syn region logtalkDir matchgroup=logtalkDirTag start=":- alias(" matchgroup=logtalkDirTag end=")\." contains=ALL -syn region logtalkDir matchgroup=logtalkDirTag start=":- calls(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- coinductive(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- encoding(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- initialization(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- info(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- mode(" matchgroup=logtalkDirTag end=")\." contains=logtalkOperator, logtalkAtom syn region logtalkDir matchgroup=logtalkDirTag start=":- dynamic(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn match logtalkDirTag ":- built_in\." syn match logtalkDirTag ":- dynamic\." syn region logtalkDir matchgroup=logtalkDirTag start=":- discontiguous(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- multifile(" matchgroup=logtalkDirTag end=")\." contains=ALL @@ -131,17 +131,20 @@ syn match logtalkBuiltIn "\<\(instantiat\|specializ\)es_class\ze(" syn match logtalkBuiltIn "\<\(abolish\|define\)_events\ze(" syn match logtalkBuiltIn "\<current_event\ze(" -syn match logtalkBuiltIn "\<\(curren\|se\)t_logtalk_flag\ze(" +syn match logtalkBuiltIn "\<\(create\|current\|set\)_logtalk_flag\ze(" -syn match logtalkBuiltIn "\<logtalk_\(compile\|l\(ibrary_path\|oad\|oad_context\)\)\ze(" +syn match logtalkBuiltIn "\<logtalk_\(compile\|l\(ibrary_path\|oad\|oad_context\)\|make\(_target_action\)\?\)\ze(" +syn match logtalkBuiltIn "\<logtalk_make\>" syn match logtalkBuiltIn "\<\(for\|retract\)all\ze(" syn match logtalkBuiltIn "\<threaded\(_\(call\|once\|ignore\|exit\|peek\|wait\|notify\)\)\?\ze(" +syn match logtalkBuiltIn "\<threaded_engine\(_\(create\|destroy\|self\|next\|next_reified\|yield\|post\|fetch\)\)\?\ze(" " Logtalk built-in methods +syn match logtalkBuiltInMethod "\<context\ze(" syn match logtalkBuiltInMethod "\<parameter\ze(" syn match logtalkBuiltInMethod "\<se\(lf\|nder\)\ze(" syn match logtalkBuiltInMethod "\<this\ze(" @@ -159,6 +162,8 @@ syn match logtalkBuiltInMethod "\<f\(ind\|or\)all\ze(" syn match logtalkBuiltInMethod "\<before\ze(" syn match logtalkBuiltInMethod "\<after\ze(" +syn match logtalkBuiltInMethod "\<forward\ze(" + syn match logtalkBuiltInMethod "\<expand_\(goal\|term\)\ze(" syn match logtalkBuiltInMethod "\<\(goal\|term\)_expansion\ze(" syn match logtalkBuiltInMethod "\<phrase\ze(" @@ -174,6 +179,7 @@ syn match logtalkOperator "@" syn match logtalkKeyword "\<true\>" syn match logtalkKeyword "\<fail\>" +syn match logtalkKeyword "\<false\>" syn match logtalkKeyword "\<ca\(ll\|tch\)\ze(" syn match logtalkOperator "!" " syn match logtalkOperator "," @@ -181,11 +187,14 @@ syn match logtalkOperator ";" syn match logtalkOperator "-->" syn match logtalkOperator "->" syn match logtalkKeyword "\<throw\ze(" +syn match logtalkKeyword "\<\(instantiation\|system\)_error\>" +syn match logtalkKeyword "\<\(type\|domain\|existence\|permission\|representation\|evaluation\|resource\|syntax\)_error\ze(" " Term unification syn match logtalkOperator "=" +syn match logtalkKeyword "\<subsumes_term\ze(" syn match logtalkKeyword "\<unify_with_occurs_check\ze(" syn match logtalkOperator "\\=" @@ -199,6 +208,7 @@ syn match logtalkKeyword "\<float\ze(" syn match logtalkKeyword "\<c\(allable\|ompound\)\ze(" syn match logtalkKeyword "\<n\(onvar\|umber\)\ze(" syn match logtalkKeyword "\<ground\ze(" +syn match logtalkKeyword "\<acyclic_term\ze(" " Term comparison @@ -219,14 +229,20 @@ syn match logtalkKeyword "\<arg\ze(" syn match logtalkOperator "=\.\." syn match logtalkKeyword "\<copy_term\ze(" syn match logtalkKeyword "\<numbervars\ze(" +syn match logtalkKeyword "\<term_variables\ze(" + + +" Predicate aliases + +syn match logtalkOperator "\<as\>" -" Arithemtic evaluation +" Arithmetic evaluation syn match logtalkOperator "\<is\>" -" Arithemtic comparison +" Arithmetic comparison syn match logtalkOperator "=:=" syn match logtalkOperator "=\\=" @@ -299,16 +315,18 @@ syn match logtalkOperator "-" syn match logtalkOperator "\*" syn match logtalkOperator "//" syn match logtalkOperator "/" +syn match logtalkKeyword "\<div\ze(" syn match logtalkKeyword "\<r\(ound\|em\)\ze(" syn match logtalkKeyword "\<e\>" syn match logtalkKeyword "\<pi\>" +syn match logtalkKeyword "\<div\>" syn match logtalkKeyword "\<rem\>" -syn match logtalkKeyword "\<mod\ze(" +syn match logtalkKeyword "\<m\(ax\|in\|od\)\ze(" syn match logtalkKeyword "\<mod\>" syn match logtalkKeyword "\<abs\ze(" syn match logtalkKeyword "\<sign\ze(" syn match logtalkKeyword "\<flo\(or\|at\(_\(integer\|fractional\)_part\)\?\)\ze(" -syn match logtalkKeyword "\<truncate\ze(" +syn match logtalkKeyword "\<t\(an\|runcate\)\ze(" syn match logtalkKeyword "\<ceiling\ze(" @@ -317,7 +335,7 @@ syn match logtalkKeyword "\<ceiling\ze(" syn match logtalkOperator "\*\*" syn match logtalkKeyword "\<s\(in\|qrt\)\ze(" syn match logtalkKeyword "\<cos\ze(" -syn match logtalkKeyword "\<atan\ze(" +syn match logtalkKeyword "\<a\(cos\|sin\|tan\|tan2\)\ze(" syn match logtalkKeyword "\<exp\ze(" syn match logtalkKeyword "\<log\ze(" @@ -329,6 +347,7 @@ syn match logtalkOperator "<<" syn match logtalkOperator "/\\" syn match logtalkOperator "\\/" syn match logtalkOperator "\\" +syn match logtalkKeyword "\<xor\ze(" " Logtalk list operator @@ -347,7 +366,7 @@ syn match logtalkNumber "\<\d\+\>" syn match logtalkNumber "\<\d\+\.\d\+\>" syn match logtalkNumber "\<\d\+[eE][-+]\=\d\+\>" syn match logtalkNumber "\<\d\+\.\d\+[eE][-+]\=\d\+\>" -syn match logtalkNumber "\<0'.\|0''\|0'\"\>" +syn match logtalkNumber "\<0'[\\]\?.\|0''\|0'\"\>" syn match logtalkNumber "\<0b[0-1]\+\>" syn match logtalkNumber "\<0o\o\+\>" syn match logtalkNumber "\<0x\x\+\>" diff --git a/runtime/syntax/mix.vim b/runtime/syntax/mix.vim index 9ab98eacf8..564d344cc8 100644 --- a/runtime/syntax/mix.vim +++ b/runtime/syntax/mix.vim @@ -2,7 +2,7 @@ " Language: MIX (Donald Knuth's assembly language used in TAOCP) " Maintainer: Wu Yongwei <wuyongwei@gmail.com> " Filenames: *.mixal *.mix -" Last Change: 2013 Nov 13 +" Last Change: 2017-11-26 15:21:36 +0800 " Quit when a syntax file was already loaded if exists("b:current_syntax") @@ -16,7 +16,7 @@ syn case ignore " Special processing of ALF directive: implementations vary whether quotation " marks are needed -syn match mixAlfParam #\s\{1,2\}"\?[^"]\{,5\}"\?# contains=mixAlfDirective,mixString nextgroup=mixEndComment contained +syn match mixAlfParam #\s\{1,2\}"\?[^"]\{,5\}"\?# contains=mixString nextgroup=mixEndComment contained " Region for parameters syn match mixParam #[-+*/:=0-9a-z,()"]\+# contains=mixIdentifier,mixSpecial,mixNumber,mixString,mixLabel nextgroup=mixEndComment contained @@ -46,6 +46,7 @@ syn keyword mixDirective ALF nextgroup=mixAlfParam contained " Opcodes syn keyword mixOpcode NOP HLT NUM CHAR FLOT FIX nextgroup=mixEndComment contained syn keyword mixOpcode FADD FSUB FMUL FDIV FCMP MOVE ADD SUB MUL DIV IOC IN OUT JRED JBUS JMP JSJ JOV JNOV JL JE JG JLE JNE JGE SLA SRA SLAX SRAX SLC SRC nextgroup=mixParam contained skipwhite +syn keyword mixOpcode SLB SRB JAE JAO JXE JXO nextgroup=mixParam contained skipwhite syn match mixOpcode "LD[AX1-6]N\?\>" nextgroup=mixParam contained skipwhite syn match mixOpcode "ST[AX1-6JZ]\>" nextgroup=mixParam contained skipwhite @@ -58,7 +59,7 @@ syn match mixOpcode "J[AX1-6]N\?[NZP]\>" nextgroup=mixParam contained skipwhite " Switch back to being case sensitive syn case match -" Registers (only to used in comments now) +" Registers (only to be used in comments now) syn keyword mixRegister rA rX rI1 rI2 rI3 rI4 rI5 rI6 rJ contained " The default highlighting diff --git a/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim index e4395fdf59..830664e0eb 100644 --- a/runtime/syntax/muttrc.vim +++ b/runtime/syntax/muttrc.vim @@ -2,9 +2,9 @@ " Language: Mutt setup files " Original: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> " Maintainer: Kyle Wheeler <kyle-muttrc.vim@memoryhole.net> -" Last Change: 18 August 2016 +" Last Change: 21 May 2018 -" This file covers mutt version 1.7.0 +" This file covers mutt version 1.10.0 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -104,142 +104,175 @@ syn match muttrcKeyName contained "<F[0-9]\+>" syn keyword muttrcVarBool skipwhite contained \ allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split \ auto_tag autoedit beep beep_new bounce_delivered braille_friendly - \ check_mbox_size check_new collapse_unread confirmappend confirmcreate - \ crypt_autoencrypt crypt_autopgp crypt_autosign crypt_autosmime - \ crypt_confirmhook crypt_opportunistic_encrypt crypt_replyencrypt - \ crypt_replysign crypt_replysignencrypted crypt_timestamp crypt_use_gpgme - \ crypt_use_pka delete_untag digest_collapse duplicate_threads edit_hdrs - \ edit_headers encode_from envelope_from fast_reply fcc_clear followup_to - \ force_name forw_decode forw_decrypt forw_quote forward_decode forward_decrypt - \ forward_quote hdrs header help hidden_host hide_limited hide_missing - \ hide_thread_subject hide_top_limited hide_top_missing honor_disposition - \ idn_decode idn_encode ignore_linear_white_space ignore_list_reply_to - \ imap_check_subscribed imap_list_subscribed imap_passive imap_peek - \ imap_servernoise implicit_autoview include_onlyfirst keep_flagged + \ browser_abbreviate_mailboxes change_folder_next check_mbox_size check_new + \ collapse_unread confirmappend confirmcreate crypt_autoencrypt crypt_autopgp + \ crypt_autosign crypt_autosmime crypt_confirmhook crypt_opportunistic_encrypt + \ crypt_replyencrypt crypt_replysign crypt_replysignencrypted crypt_timestamp + \ crypt_use_gpgme crypt_use_pka delete_untag digest_collapse duplicate_threads + \ edit_hdrs edit_headers encode_from envelope_from fast_reply fcc_clear + \ flag_safe followup_to force_name forw_decode forw_decrypt forw_quote + \ forward_decode forward_decrypt forward_quote hdrs header + \ header_color_partial help hidden_host hide_limited hide_missing + \ hide_thread_subject hide_top_limited hide_top_missing history_remove_dups + \ honor_disposition idn_decode idn_encode ignore_linear_white_space + \ ignore_list_reply_to imap_check_subscribed imap_list_subscribed imap_passive + \ imap_peek imap_servernoise implicit_autoview include_onlyfirst keep_flagged \ mail_check_recent mail_check_stats mailcap_sanitize maildir_check_cur \ maildir_header_cache_verify maildir_trash mark_old markers menu_move_off \ menu_scroll message_cache_clean meta_key metoo mh_purge mime_forward_decode - \ narrow_tree pager_stop pgp_auto_decode pgp_auto_traditional pgp_autoencrypt - \ pgp_autoinline pgp_autosign pgp_check_exit pgp_create_traditional - \ pgp_ignore_subkeys pgp_long_ids pgp_replyencrypt pgp_replyinline pgp_replysign - \ pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable pgp_strict_enc - \ pgp_use_gpg_agent pipe_decode pipe_split pop_auth_try_all pop_last - \ postpone_encrypt postpone_encrypt_as print_decode print_split prompt_after - \ read_only reflow_space_quotes reflow_text reflow_wrap reply_self resolve - \ resume_draft_files resume_edited_draft_files reverse_alias reverse_name - \ reverse_realname rfc2047_parameters save_address save_empty save_name score - \ sidebar_folder_indent sidebar_new_mail_only sidebar_next_new_wrap - \ sidebar_short_path sidebar_sort sidebar_visible sig_dashes sig_on_top - \ smart_wrap smime_ask_cert_label smime_decrypt_use_default_key smime_is_default - \ sort_re ssl_force_tls ssl_use_sslv2 ssl_use_sslv3 ssl_use_tlsv1 - \ ssl_usesystemcerts ssl_verify_dates ssl_verify_host status_on_top strict_mime - \ strict_threads suspend text_flowed thorough_search thread_received tilde - \ ts_enabled uncollapse_jump use_8bitmime use_domain use_envelope_from use_from - \ use_idn use_ipv6 user_agent wait_key weed wrap_search write_bcc + \ mime_type_query_first narrow_tree pager_stop pgp_auto_decode + \ pgp_auto_traditional pgp_autoencrypt pgp_autoinline pgp_autosign + \ pgp_check_exit pgp_create_traditional pgp_ignore_subkeys pgp_long_ids + \ pgp_replyencrypt pgp_replyinline pgp_replysign pgp_replysignencrypted + \ pgp_retainable_sigs pgp_self_encrypt pgp_self_encrypt_as pgp_show_unusable + \ pgp_strict_enc pgp_use_gpg_agent pipe_decode pipe_split pop_auth_try_all + \ pop_last postpone_encrypt postpone_encrypt_as print_decode print_split + \ prompt_after read_only reflow_space_quotes reflow_text reflow_wrap + \ reply_self resolve resume_draft_files resume_edited_draft_files + \ reverse_alias reverse_name reverse_realname rfc2047_parameters save_address + \ save_empty save_name score sidebar_folder_indent sidebar_new_mail_only + \ sidebar_next_new_wrap sidebar_short_path sidebar_sort sidebar_visible + \ sig_dashes sig_on_top smart_wrap smime_ask_cert_label + \ smime_decrypt_use_default_key smime_is_default smime_self_encrypt + \ smime_self_encrypt_as sort_re ssl_force_tls ssl_use_sslv2 ssl_use_sslv3 + \ ssl_use_tlsv1 ssl_usesystemcerts ssl_verify_dates ssl_verify_host + \ ssl_verify_partial_chains status_on_top strict_mime strict_threads suspend + \ text_flowed thorough_search thread_received tilde ts_enabled uncollapse_jump + \ use_8bitmime use_domain use_envelope_from use_from use_idn use_ipv6 + \ uncollapse_new user_agent wait_key weed wrap_search write_bcc \ nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained - \ noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc noaskcc noattach_split - \ noauto_tag noautoedit nobeep nobeep_new nobounce_delivered nobraille_friendly - \ nocheck_mbox_size nocheck_new nocollapse_unread noconfirmappend noconfirmcreate - \ nocrypt_autoencrypt nocrypt_autopgp nocrypt_autosign nocrypt_autosmime - \ nocrypt_confirmhook nocrypt_opportunistic_encrypt nocrypt_replyencrypt - \ nocrypt_replysign nocrypt_replysignencrypted nocrypt_timestamp nocrypt_use_gpgme - \ nocrypt_use_pka nodelete_untag nodigest_collapse noduplicate_threads noedit_hdrs - \ noedit_headers noencode_from noenvelope_from nofast_reply nofcc_clear nofollowup_to - \ noforce_name noforw_decode noforw_decrypt noforw_quote noforward_decode noforward_decrypt - \ noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited nohide_missing - \ nohide_thread_subject nohide_top_limited nohide_top_missing nohonor_disposition - \ noidn_decode noidn_encode noignore_linear_white_space noignore_list_reply_to - \ noimap_check_subscribed noimap_list_subscribed noimap_passive noimap_peek - \ noimap_servernoise noimplicit_autoview noinclude_onlyfirst nokeep_flagged - \ nomail_check_recent nomail_check_stats nomailcap_sanitize nomaildir_check_cur - \ nomaildir_header_cache_verify nomaildir_trash nomark_old nomarkers nomenu_move_off - \ nomenu_scroll nomessage_cache_clean nometa_key nometoo nomh_purge nomime_forward_decode - \ nonarrow_tree nopager_stop nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt + \ noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc noaskcc + \ noattach_split noauto_tag noautoedit nobeep nobeep_new nobounce_delivered + \ nobraille_friendly nobrowser_abbreviate_mailboxes nochange_folder_next + \ nocheck_mbox_size nocheck_new nocollapse_unread noconfirmappend + \ noconfirmcreate nocrypt_autoencrypt nocrypt_autopgp nocrypt_autosign + \ nocrypt_autosmime nocrypt_confirmhook nocrypt_opportunistic_encrypt + \ nocrypt_replyencrypt nocrypt_replysign nocrypt_replysignencrypted + \ nocrypt_timestamp nocrypt_use_gpgme nocrypt_use_pka nodelete_untag + \ nodigest_collapse noduplicate_threads noedit_hdrs noedit_headers + \ noencode_from noenvelope_from nofast_reply nofcc_clear noflag_safe + \ nofollowup_to noforce_name noforw_decode noforw_decrypt noforw_quote + \ noforward_decode noforward_decrypt noforward_quote nohdrs noheader + \ noheader_color_partial nohelp nohidden_host nohide_limited nohide_missing + \ nohide_thread_subject nohide_top_limited nohide_top_missing + \ nohistory_remove_dups nohonor_disposition noidn_decode noidn_encode + \ noignore_linear_white_space noignore_list_reply_to noimap_check_subscribed + \ noimap_list_subscribed noimap_passive noimap_peek noimap_servernoise + \ noimplicit_autoview noinclude_onlyfirst nokeep_flagged nomail_check_recent + \ nomail_check_stats nomailcap_sanitize nomaildir_check_cur + \ nomaildir_header_cache_verify nomaildir_trash nomark_old nomarkers + \ nomenu_move_off nomenu_scroll nomessage_cache_clean nometa_key nometoo + \ nomh_purge nomime_forward_decode nomime_type_query_first nonarrow_tree + \ nopager_stop nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt \ nopgp_autoinline nopgp_autosign nopgp_check_exit nopgp_create_traditional - \ nopgp_ignore_subkeys nopgp_long_ids nopgp_replyencrypt nopgp_replyinline nopgp_replysign - \ nopgp_replysignencrypted nopgp_retainable_sigs nopgp_show_unusable nopgp_strict_enc - \ nopgp_use_gpg_agent nopipe_decode nopipe_split nopop_auth_try_all nopop_last - \ nopostpone_encrypt nopostpone_encrypt_as noprint_decode noprint_split noprompt_after - \ noread_only noreflow_space_quotes noreflow_text noreflow_wrap noreply_self noresolve - \ noresume_draft_files noresume_edited_draft_files noreverse_alias noreverse_name - \ noreverse_realname norfc2047_parameters nosave_address nosave_empty nosave_name noscore - \ nosidebar_folder_indent nosidebar_new_mail_only nosidebar_next_new_wrap - \ nosidebar_short_path nosidebar_sort nosidebar_visible nosig_dashes nosig_on_top - \ nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key nosmime_is_default - \ nosort_re nossl_force_tls nossl_use_sslv2 nossl_use_sslv3 nossl_use_tlsv1 - \ nossl_usesystemcerts nossl_verify_dates nossl_verify_host nostatus_on_top nostrict_mime - \ nostrict_threads nosuspend notext_flowed nothorough_search nothread_received notilde - \ nots_enabled nouncollapse_jump nouse_8bitmime nouse_domain nouse_envelope_from nouse_from - \ nouse_idn nouse_ipv6 nouser_agent nowait_key noweed nowrap_search nowrite_bcc + \ nopgp_ignore_subkeys nopgp_long_ids nopgp_replyencrypt nopgp_replyinline + \ nopgp_replysign nopgp_replysignencrypted nopgp_retainable_sigs + \ nopgp_self_encrypt nopgp_self_encrypt_as nopgp_show_unusable + \ nopgp_strict_enc nopgp_use_gpg_agent nopipe_decode nopipe_split + \ nopop_auth_try_all nopop_last nopostpone_encrypt nopostpone_encrypt_as + \ noprint_decode noprint_split noprompt_after noread_only + \ noreflow_space_quotes noreflow_text noreflow_wrap noreply_self noresolve + \ noresume_draft_files noresume_edited_draft_files noreverse_alias + \ noreverse_name noreverse_realname norfc2047_parameters nosave_address + \ nosave_empty nosave_name noscore nosidebar_folder_indent + \ nosidebar_new_mail_only nosidebar_next_new_wrap nosidebar_short_path + \ nosidebar_sort nosidebar_visible nosig_dashes nosig_on_top nosmart_wrap + \ nosmime_ask_cert_label nosmime_decrypt_use_default_key nosmime_is_default + \ nosmime_self_encrypt nosmime_self_encrypt_as nosort_re nossl_force_tls + \ nossl_use_sslv2 nossl_use_sslv3 nossl_use_tlsv1 nossl_usesystemcerts + \ nossl_verify_dates nossl_verify_host nossl_verify_partial_chains + \ nostatus_on_top nostrict_mime nostrict_threads nosuspend notext_flowed + \ nothorough_search nothread_received notilde nots_enabled nouncollapse_jump + \ nouse_8bitmime nouse_domain nouse_envelope_from nouse_from nouse_idn + \ nouse_ipv6 nouncollapse_new nouser_agent nowait_key noweed nowrap_search + \ nowrite_bcc \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained - \ invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc invaskcc invattach_split - \ invauto_tag invautoedit invbeep invbeep_new invbounce_delivered invbraille_friendly - \ invcheck_mbox_size invcheck_new invcollapse_unread invconfirmappend invconfirmcreate - \ invcrypt_autoencrypt invcrypt_autopgp invcrypt_autosign invcrypt_autosmime - \ invcrypt_confirmhook invcrypt_opportunistic_encrypt invcrypt_replyencrypt - \ invcrypt_replysign invcrypt_replysignencrypted invcrypt_timestamp invcrypt_use_gpgme - \ invcrypt_use_pka invdelete_untag invdigest_collapse invduplicate_threads invedit_hdrs - \ invedit_headers invencode_from invenvelope_from invfast_reply invfcc_clear invfollowup_to - \ invforce_name invforw_decode invforw_decrypt invforw_quote invforward_decode invforward_decrypt - \ invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited invhide_missing - \ invhide_thread_subject invhide_top_limited invhide_top_missing invhonor_disposition - \ invidn_decode invidn_encode invignore_linear_white_space invignore_list_reply_to - \ invimap_check_subscribed invimap_list_subscribed invimap_passive invimap_peek - \ invimap_servernoise invimplicit_autoview invinclude_onlyfirst invkeep_flagged - \ invmail_check_recent invmail_check_stats invmailcap_sanitize invmaildir_check_cur - \ invmaildir_header_cache_verify invmaildir_trash invmark_old invmarkers invmenu_move_off - \ invmenu_scroll invmessage_cache_clean invmeta_key invmetoo invmh_purge invmime_forward_decode - \ invnarrow_tree invpager_stop invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt - \ invpgp_autoinline invpgp_autosign invpgp_check_exit invpgp_create_traditional - \ invpgp_ignore_subkeys invpgp_long_ids invpgp_replyencrypt invpgp_replyinline invpgp_replysign - \ invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable invpgp_strict_enc - \ invpgp_use_gpg_agent invpipe_decode invpipe_split invpop_auth_try_all invpop_last - \ invpostpone_encrypt invpostpone_encrypt_as invprint_decode invprint_split invprompt_after - \ invread_only invreflow_space_quotes invreflow_text invreflow_wrap invreply_self invresolve - \ invresume_draft_files invresume_edited_draft_files invreverse_alias invreverse_name - \ invreverse_realname invrfc2047_parameters invsave_address invsave_empty invsave_name invscore - \ invsidebar_folder_indent invsidebar_new_mail_only invsidebar_next_new_wrap - \ invsidebar_short_path invsidebar_sort invsidebar_visible invsig_dashes invsig_on_top - \ invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key invsmime_is_default - \ invsort_re invssl_force_tls invssl_use_sslv2 invssl_use_sslv3 invssl_use_tlsv1 - \ invssl_usesystemcerts invssl_verify_dates invssl_verify_host invstatus_on_top invstrict_mime - \ invstrict_threads invsuspend invtext_flowed invthorough_search invthread_received invtilde - \ invts_enabled invuncollapse_jump invuse_8bitmime invuse_domain invuse_envelope_from invuse_from - \ invuse_idn invuse_ipv6 invuser_agent invwait_key invweed invwrap_search invwrite_bcc + \ invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc + \ invaskcc invattach_split invauto_tag invautoedit invbeep invbeep_new + \ invbounce_delivered invbraille_friendly invbrowser_abbreviate_mailboxes + \ invchange_folder_next invcheck_mbox_size invcheck_new invcollapse_unread + \ invconfirmappend invconfirmcreate invcrypt_autoencrypt invcrypt_autopgp + \ invcrypt_autosign invcrypt_autosmime invcrypt_confirmhook + \ invcrypt_opportunistic_encrypt invcrypt_replyencrypt invcrypt_replysign + \ invcrypt_replysignencrypted invcrypt_timestamp invcrypt_use_gpgme + \ invcrypt_use_pka invdelete_untag invdigest_collapse invduplicate_threads + \ invedit_hdrs invedit_headers invencode_from invenvelope_from invfast_reply + \ invfcc_clear invflag_safe invfollowup_to invforce_name invforw_decode + \ invforw_decrypt invforw_quote invforward_decode invforward_decrypt + \ invforward_quote invhdrs invheader invheader_color_partial invhelp + \ invhidden_host invhide_limited invhide_missing invhide_thread_subject + \ invhide_top_limited invhide_top_missing invhistory_remove_dups + \ invhonor_disposition invidn_decode invidn_encode + \ invignore_linear_white_space invignore_list_reply_to + \ invimap_check_subscribed invimap_list_subscribed invimap_passive + \ invimap_peek invimap_servernoise invimplicit_autoview invinclude_onlyfirst + \ invkeep_flagged invmail_check_recent invmail_check_stats invmailcap_sanitize + \ invmaildir_check_cur invmaildir_header_cache_verify invmaildir_trash + \ invmark_old invmarkers invmenu_move_off invmenu_scroll + \ invmessage_cache_clean invmeta_key invmetoo invmh_purge + \ invmime_forward_decode invmime_type_query_first invnarrow_tree invpager_stop + \ invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt + \ invpgp_autoinline invpgp_autosign invpgp_check_exit + \ invpgp_create_traditional invpgp_ignore_subkeys invpgp_long_ids + \ invpgp_replyencrypt invpgp_replyinline invpgp_replysign + \ invpgp_replysignencrypted invpgp_retainable_sigs invpgp_self_encrypt + \ invpgp_self_encrypt_as invpgp_show_unusable invpgp_strict_enc + \ invpgp_use_gpg_agent invpipe_decode invpipe_split invpop_auth_try_all + \ invpop_last invpostpone_encrypt invpostpone_encrypt_as invprint_decode + \ invprint_split invprompt_after invread_only invreflow_space_quotes + \ invreflow_text invreflow_wrap invreply_self invresolve invresume_draft_files + \ invresume_edited_draft_files invreverse_alias invreverse_name + \ invreverse_realname invrfc2047_parameters invsave_address invsave_empty + \ invsave_name invscore invsidebar_folder_indent invsidebar_new_mail_only + \ invsidebar_next_new_wrap invsidebar_short_path invsidebar_sort + \ invsidebar_visible invsig_dashes invsig_on_top invsmart_wrap + \ invsmime_ask_cert_label invsmime_decrypt_use_default_key invsmime_is_default + \ invsmime_self_encrypt invsmime_self_encrypt_as invsort_re invssl_force_tls + \ invssl_use_sslv2 invssl_use_sslv3 invssl_use_tlsv1 invssl_usesystemcerts + \ invssl_verify_dates invssl_verify_host invssl_verify_partial_chains + \ invstatus_on_top invstrict_mime invstrict_threads invsuspend invtext_flowed + \ invthorough_search invthread_received invtilde invts_enabled + \ invuncollapse_jump invuse_8bitmime invuse_domain invuse_envelope_from + \ invuse_from invuse_idn invuse_ipv6 invuncollapse_new invuser_agent + \ invwait_key invweed invwrap_search invwrite_bcc \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained - \ abort_nosubject abort_unmodified bounce copy crypt_verify_sig delete - \ fcc_attach forward_edit honor_followup_to include mime_forward + \ abort_nosubject abort_unmodified abort_noattach bounce copy crypt_verify_sig + \ delete fcc_attach forward_edit honor_followup_to include mime_forward \ mime_forward_rest mime_fwd move pgp_mime_auto pgp_verify_sig pop_delete \ pop_reconnect postpone print quit recall reply_to ssl_starttls \ nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained - \ noabort_nosubject noabort_unmodified nobounce nocopy nocrypt_verify_sig nodelete - \ nofcc_attach noforward_edit nohonor_followup_to noinclude nomime_forward - \ nomime_forward_rest nomime_fwd nomove nopgp_mime_auto nopgp_verify_sig nopop_delete - \ nopop_reconnect nopostpone noprint noquit norecall noreply_to nossl_starttls + \ noabort_nosubject noabort_unmodified noabort_noattach nobounce nocopy + \ nocrypt_verify_sig nodelete nofcc_attach noforward_edit nohonor_followup_to + \ noinclude nomime_forward nomime_forward_rest nomime_fwd nomove + \ nopgp_mime_auto nopgp_verify_sig nopop_delete nopop_reconnect nopostpone + \ noprint noquit norecall noreply_to nossl_starttls \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained - \ invabort_nosubject invabort_unmodified invbounce invcopy invcrypt_verify_sig invdelete - \ invfcc_attach invforward_edit invhonor_followup_to invinclude invmime_forward - \ invmime_forward_rest invmime_fwd invmove invpgp_mime_auto invpgp_verify_sig invpop_delete - \ invpop_reconnect invpostpone invprint invquit invrecall invreply_to invssl_starttls + \ invabort_nosubject invabort_unmodified invabort_noattach invbounce invcopy + \ invcrypt_verify_sig invdelete invfcc_attach invforward_edit + \ invhonor_followup_to invinclude invmime_forward invmime_forward_rest + \ invmime_fwd invmove invpgp_mime_auto invpgp_verify_sig invpop_delete + \ invpop_reconnect invpostpone invprint invquit invrecall invreply_to + \ invssl_starttls \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarNum skipwhite contained - \ connect_timeout history imap_keepalive imap_pipeline_depth mail_check - \ mail_check_stats_interval menu_context net_inc pager_context pager_index_lines - \ pgp_timeout pop_checkinterval read_inc save_history score_threshold_delete - \ score_threshold_flag score_threshold_read search_context sendmail_wait - \ sidebar_width sleep_time smime_timeout ssl_min_dh_prime_bits time_inc timeout - \ wrap wrap_headers wrapmargin write_inc + \ connect_timeout error_history history imap_keepalive imap_pipeline_depth + \ imap_poll_timeout mail_check mail_check_stats_interval menu_context net_inc + \ pager_context pager_index_lines pgp_timeout pop_checkinterval read_inc + \ save_history score_threshold_delete score_threshold_flag + \ score_threshold_read search_context sendmail_wait sidebar_width sleep_time + \ smime_timeout ssl_min_dh_prime_bits time_inc timeout wrap wrap_headers + \ wrapmargin write_inc \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn match muttrcFormatErrors contained /%./ @@ -284,7 +317,7 @@ syn match muttrcAliasFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\ syn match muttrcQueryFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[acent%]/ syn match muttrcQueryFormatConditionals contained /%?[e]?/ nextgroup=muttrcFormatConditionals2 " The following info was pulled from mutt_attach_fmt in recvattach.c -syn match muttrcAttachFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CcDdefImMnQstTuX%]/ +syn match muttrcAttachFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[CcDdeFfImMnQstTuX%]/ syn match muttrcAttachFormatEscapes contained /%[>|*]./ syn match muttrcAttachFormatConditionals contained /%?[CcdDefInmMQstTuX]?/ nextgroup=muttrcFormatConditionals2 syn match muttrcFormatConditionals2 contained /[^?]*?/ @@ -308,7 +341,7 @@ syn match muttrcPGPFormatConditionals contained /%?[nkualfct]?/ syn match muttrcPGPCmdFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[pfsar%]/ syn match muttrcPGPCmdFormatConditionals contained /%?[pfsar]?/ nextgroup=muttrcFormatConditionals2 " The following info was pulled from status_format_str in status.c -syn match muttrcStatusFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[bdfFhlLmMnopPrsStuvV%]/ +syn match muttrcStatusFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[bdfFhlLmMnopPRrsStuvV%]/ syn match muttrcStatusFormatEscapes contained /%[>|*]./ syn match muttrcStatusFormatConditionals contained /%?[bdFlLmMnoptuV]?/ nextgroup=muttrcFormatConditionals2 " This matches the documentation, but directly contradicts the code @@ -357,27 +390,27 @@ syn match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad, syn match muttrcVarStr contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite - \ alias_file assumed_charset attach_charset attach_sep certificate_file charset - \ config_charset content_type default_hook display_filter dotlock_program - \ dsn_notify dsn_return editor entropy_file envelope_from_address escape folder - \ forw_format forward_format from gecos_mask hdr_format header_cache - \ header_cache_compress header_cache_pagesize history_file hostname - \ imap_authenticators imap_delim_chars imap_headers imap_idle imap_login - \ imap_pass imap_user indent_str indent_string ispell locale mailcap_path mask - \ mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied mh_seq_unseen - \ mixmaster msg_format pager pgp_decryption_okay pgp_good_sign - \ pgp_mime_signature_description pgp_mime_signature_filename pgp_sign_as - \ pgp_sort_keys pipe_sep pop_authenticators pop_host pop_pass pop_user - \ post_indent_str post_indent_string postpone_encrypt_as postponed preconnect - \ print_cmd print_command query_command quote_regexp realname record - \ reply_regexp send_charset sendmail shell sidebar_delim sidebar_delim_chars - \ sidebar_divider_char sidebar_format sidebar_indent_string sidebar_sort_method - \ signature simple_search smileys smime_ca_location smime_certificates - \ smime_default_key smime_encrypt_with smime_keys smime_sign_as - \ smime_sign_digest_alg smtp_authenticators smtp_pass smtp_url sort sort_alias - \ sort_aux sort_browser spam_separator spoolfile ssl_ca_certificates_file - \ ssl_ciphers ssl_client_cert status_chars tmpdir to_chars trash ts_icon_format - \ ts_status_format tunnel visual + \ abort_noattach_regexp alias_file assumed_charset attach_charset attach_sep + \ attribution_locale certificate_file charset config_charset content_type + \ default_hook display_filter dotlock_program dsn_notify dsn_return editor + \ entropy_file envelope_from_address escape folder forw_format + \ forward_attribution_intro forward_attribution_trailer forward_format from gecos_mask + \ hdr_format header_cache header_cache_compress header_cache_pagesize history_file + \ hostname imap_authenticators imap_delim_chars imap_headers imap_idle imap_login + \ imap_pass imap_user indent_str indent_string ispell locale mailcap_path + \ mark_macro_prefix mask mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied + \ mh_seq_unseen mime_type_query_command mixmaster msg_format new_mail_command pager + \ pgp_default_key pgp_decryption_okay pgp_good_sign pgp_mime_signature_description + \ pgp_mime_signature_filename pgp_sign_as pgp_sort_keys pipe_sep pop_authenticators + \ pop_host pop_pass pop_user post_indent_str post_indent_string postpone_encrypt_as + \ postponed preconnect print_cmd print_command query_command quote_regexp realname + \ record reply_regexp send_charset sendmail shell sidebar_delim sidebar_delim_chars + \ sidebar_divider_char sidebar_format sidebar_indent_string sidebar_sort_method + \ signature simple_search smileys smime_ca_location smime_certificates + \ smime_default_key smime_encrypt_with smime_keys smime_sign_as smime_sign_digest_alg + \ smtp_authenticators smtp_pass smtp_url sort sort_alias sort_aux sort_browser + \ spam_separator spoolfile ssl_ca_certificates_file ssl_ciphers ssl_client_cert + \ status_chars tmpdir to_chars trash ts_icon_format ts_status_format tunnel visual \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr " Present in 1.4.2.1 (pgp_create_traditional was a bool then) @@ -396,6 +429,7 @@ syn keyword muttrcCommand skipwhite \ mailto_allow mime_lookup my_hdr pgp-hook push score sidebar_whitelist source \ unalternative_order unalternative_order unauto_view ungroup unhdr_order \ unignore unmailboxes unmailto_allow unmime_lookup unmono unmy_hdr unscore + \ unsidebar_whitelist syn keyword muttrcCommand skipwhite charset-hook nextgroup=muttrcRXString syn keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks @@ -430,7 +464,7 @@ syn match muttrcVariableInner contained "\$[a-zA-Z_-]\+" syn match muttrcEscapedVariable contained "\\\$[a-zA-Z_-]\+" syn match muttrcBadAction contained "[^<>]\+" contains=muttrcEmail -syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|parent\|pipe\|postpone\|print\|purge\|recall\|resend\|save\|send\|tag\|undelete\)-message\>" +syn match muttrcFunction contained "\<\%(attach\|bounce\|copy\|delete\|display\|flag\|forward\|mark\|parent\|pipe\|postpone\|print\|purge\|recall\|resend\|root\|save\|send\|tag\|undelete\)-message\>" syn match muttrcFunction contained "\<\%(delete\|next\|previous\|read\|tag\|break\|undelete\)-thread\>" syn match muttrcFunction contained "\<link-threads\>" syn match muttrcFunction contained "\<\%(backward\|capitalize\|downcase\|forward\|kill\|upcase\)-word\>" @@ -442,10 +476,12 @@ syn match muttrcFunction contained "\<current-\%(bottom\|middle\|top\)\>" syn match muttrcFunction contained "\<decode-\%(copy\|save\)\>" syn match muttrcFunction contained "\<delete-\%(char\|pattern\|subthread\)\>" syn match muttrcFunction contained "\<display-\%(address\|toggle-weed\)\>" -syn match muttrcFunction contained "\<edit\%(-\%(bcc\|cc\|description\|encoding\|fcc\|file\|from\|headers\|mime\|reply-to\|subject\|to\|type\)\)\?\>" +syn match muttrcFunction contained "\<echo\>" +syn match muttrcFunction contained "\<edit\%(-\%(bcc\|cc\|description\|encoding\|fcc\|file\|from\|headers\|label\|mime\|reply-to\|subject\|to\|type\)\)\?\>" syn match muttrcFunction contained "\<enter-\%(command\|mask\)\>" +syn match muttrcFunction contained "\<error-history\>" syn match muttrcFunction contained "\<half-\%(up\|down\)\>" -syn match muttrcFunction contained "\<history-\%(up\|down\)\>" +syn match muttrcFunction contained "\<history-\%(up\|down\|search\)\>" syn match muttrcFunction contained "\<kill-\%(eol\|eow\|line\)\>" syn match muttrcFunction contained "\<next-\%(line\|new\%(-then-unread\)\?\|page\|subthread\|undeleted\|unread\|unread-mailbox\)\>" syn match muttrcFunction contained "\<previous-\%(line\|new\%(-then-unread\)\?\|page\|subthread\|undeleted\|unread\)\>" @@ -458,6 +494,9 @@ syn match muttrcFunction contained "\<sidebar-\%(next\|next-new\|open\|page-down syn match muttrcFunction contained "\<toggle-\%(mailboxes\|new\|quoted\|subscribed\|unlink\|write\)\>" syn match muttrcFunction contained "\<undelete-\%(pattern\|subthread\)\>" syn match muttrcFunction contained "\<collapse-\%(parts\|thread\|all\)\>" +syn match muttrcFunction contained "\<rename-attachment\>" +syn match muttrcFunction contained "\<subjectrx\>" +syn match muttrcFunction contained "\<\%(un\)\?setenv\>" syn match muttrcFunction contained "\<view-\%(attach\|attachments\|file\|mailcap\|name\|text\)\>" syn match muttrcFunction contained "\<\%(backspace\|backward-char\|bol\|bottom\|bottom-page\|buffy-cycle\|clear-flag\|complete\%(-query\)\?\|copy-file\|create-alias\|detach-file\|eol\|exit\|extract-keys\|\%(imap-\)\?fetch-mail\|forget-passphrase\|forward-char\|group-reply\|help\|ispell\|jump\|limit\|list-reply\|mail\|mail-key\|mark-as-new\|middle-page\|new-mime\|noop\|pgp-menu\|query\|query-append\|quit\|quote-char\|read-subthread\|redraw-screen\|refresh\|rename-file\|reply\|select-new\|set-flag\|shell-escape\|skip-quoted\|sort\|subscribe\|sync-mailbox\|top\|top-page\|transpose-chars\|unsubscribe\|untag-pattern\|verify-key\|what-key\|write-fcc\)\>" syn keyword muttrcFunction contained imap-logout-all @@ -559,6 +598,7 @@ syn match muttrcOptPattern contained skipwhite /[.]/ nextgroup=muttrcString,mutt syn region muttrcPattern contained matchgroup=Type keepend skipwhite start=+"+ skip=+\\"+ end=+"+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas syn region muttrcPattern contained matchgroup=Type keepend skipwhite start=+'+ skip=+\\'+ end=+'+ contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas syn region muttrcPattern contained keepend skipwhite start=+[~](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat +syn region muttrcPattern contained keepend skipwhite start=+[~][<>](+ end=+)+ skip=+\\)+ contains=muttrcSimplePat syn match muttrcPattern contained skipwhite /[~][A-Za-z]/ contains=muttrcSimplePat syn match muttrcPattern contained skipwhite /[.]/ syn region muttrcPatternInner contained keepend start=+"[~=%!(^]+ms=s+1 skip=+\\"+ end=+"+me=e-1 contains=muttrcSimplePat,muttrcUnHighlightSpace,muttrcSimplePatMetas diff --git a/runtime/syntax/neomuttrc.vim b/runtime/syntax/neomuttrc.vim index ea9d1f0885..7ff89879d9 100644 --- a/runtime/syntax/neomuttrc.vim +++ b/runtime/syntax/neomuttrc.vim @@ -1,10 +1,10 @@ " Vim syntax file " Language: NeoMutt setup files " Maintainer: Guillaume Brogi <gui-gui@netcourrier.com> -" Last Change: 2017 Oct 28 +" Last Change: 2018-03-25 " Original version based on syntax/muttrc.vim -" This file covers NeoMutt 20170912 +" This file covers NeoMutt 2018-03-23 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -134,7 +134,7 @@ syntax region muttrcStrftimeFormatStr contained skipwhite keepend start=+'+ skip " Format escapes and conditionals syntax match muttrcFormatConditionals2 contained /[^?]*?/ -function s:escapesConditionals(baseName, sequence, alignment, secondary) +function! s:escapesConditionals(baseName, sequence, alignment, secondary) exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?\%(' . a:sequence . '\|%\)/' if a:alignment exec 'syntax match muttrc' . a:baseName . 'Escapes contained /%[>|*]./' @@ -146,43 +146,40 @@ function s:escapesConditionals(baseName, sequence, alignment, secondary) endif endfunction -" flatcap compiled a list of formats here: https://pastebin.com/raw/5QXhiP6L -" UPDATE -" The following info was pulled from hdr_format_str in hdrline.c -call s:escapesConditionals('IndexFormat', '[AaBbCcDdEeFfgHIiJKLlMmNnOPqrSsTtuvWXxYyZz(<[{]\|G[a-zA-Z]\+', 1, 1) -" The following info was pulled from alias_format_str in addrbook.c +" CHECKED 2018-04-18 +" Ref: index_format_str() in hdrline.c +call s:escapesConditionals('IndexFormat', '[AaBbCcDdEeFfgHIiJKLlMmNnOPqRrSsTtuvWXxYyZz(<[{]\|G[a-zA-Z]\+', 1, 1) +" Ref: alias_format_str() in addrbook.c syntax match muttrcAliasFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[afnrt%]/ -" The following info was pulled from newsgroup_format_str in browser.c +" Ref: group_index_format_str() in browser.c call s:escapesConditionals('GroupIndexFormat', '[CdfMNns]', 1, 1) -" The following info was pulled from cb_format_str in sidebar.c +" Ref: sidebar_format_str() in sidebar.c call s:escapesConditionals('SidebarFormat', '[BdFLNnSt!]', 1, 1) -" The following info was pulled from query_format_str in query.c +" Ref: query_format_str() in query.c call s:escapesConditionals('QueryFormat', '[acent]', 0, 1) -" The following info was pulled from mutt_attach_fmt in recvattach.c +" Ref: attach_format_str() in recvattach.c call s:escapesConditionals('AttachFormat', '[CcDdeFfIMmnQsTtuX]', 1, 1) -" The following info was pulled from compose_format_str in compose.c +" Ref: compose_format_str() in compose.c syntax match muttrcComposeFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[ahlv%]/ syntax match muttrcComposeFormatEscapes contained /%[>|*]./ -" The following info was pulled from folder_format_str in browser.c -call s:escapesConditionals('FolderFormat', '[CDdfFglNstu]', 1, 0) -" The following info was pulled from mix_entry_fmt in remailer.c +" Ref: folder_format_str() in browser.c +call s:escapesConditionals('FolderFormat', '[CDdFfglmNnstu]', 1, 0) +" Ref: mix_format_str() in remailer.c call s:escapesConditionals('MixFormat', '[acns]', 0, 0) -" The following info was pulled from crypt_entry_fmt in crypt-gpgme.c -" and pgp_entry_fmt in pgpkey.c (note that crypt_entry_fmt supports -" 'p', but pgp_entry_fmt does not). +" Ref: status_format_str() in status.c +call s:escapesConditionals('StatusFormat', '[bdFfhLlMmnoPpRrSstuVv]', 1, 1) +" Ref: fmt_smime_command() in ncrypt/smime.c +call s:escapesConditionals('SmimeFormat', '[aCcdfiks]', 0, 1) +" Ref: crypt_format_str() in ncrypt/crypt_gpgme.c +" Ref: pgp_entry_fmt() in ncrypt/pgpkey.c +" Note: crypt_format_str() supports 'p', but pgp_entry_fmt() does not call s:escapesConditionals('PGPFormat', '[acfklnptu[]', 0, 0) -" The following info was pulled from _mutt_fmt_pgp_command in -" pgpinvoke.c +" Ref: fmt_pgp_command() ncrypt/pgpinvoke.c call s:escapesConditionals('PGPCmdFormat', '[afprs]', 0, 1) -" The following info was pulled from status_format_str in status.c -call s:escapesConditionals('StatusFormat', '[bdFfhLlMmnoPprSstuVu]', 1, 1) -" This matches the documentation, but directly contradicts the code -" (according to the code, this should be identical to the -" muttrcPGPCmdFormatEscapes + +" This matches the documentation, but directly contradicts the code +" (according to the code, this should be identical to the muttrcPGPCmdFormatEscapes syntax match muttrcPGPGetKeysFormatEscapes contained /%\%(\%(-\?[0-9]\+\)\?\%(\.[0-9]\+\)\?\)\?[:_]\?[acfklntu[%]/ -" The following info was pulled from _mutt_fmt_smime_command in -" smime.c -call s:escapesConditionals('SmimeFormat', '[aCcdfiks]', 0, 1) syntax region muttrcTimeEscapes contained start=+%{+ end=+}+ contains=muttrcStrftimeEscapes syntax region muttrcTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes @@ -190,36 +187,36 @@ syntax region muttrcTimeEscapes contained start=+%(+ end=+)+ contains=muttrcStrf syntax region muttrcTimeEscapes contained start=+%<+ end=+>+ contains=muttrcStrftimeEscapes syntax region muttrcPGPTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes -syntax match muttrcVarEqualsAliasFmt contained skipwhite "=" nextgroup=muttrcAliasFormatStr -syntax match muttrcVarEqualsAttachFmt contained skipwhite "=" nextgroup=muttrcAttachFormatStr -syntax match muttrcVarEqualsComposeFmt contained skipwhite "=" nextgroup=muttrcComposeFormatStr -syntax match muttrcVarEqualsFolderFmt contained skipwhite "=" nextgroup=muttrcFolderFormatStr -syntax match muttrcVarEqualsIdxFmt contained skipwhite "=" nextgroup=muttrcIndexFormatStr -syntax match muttrcVarEqualsGrpIdxFmt contained skipwhite "=" nextgroup=muttrcGroupIndexFormatStr -syntax match muttrcVarEqualsMixFmt contained skipwhite "=" nextgroup=muttrcMixFormatStr -syntax match muttrcVarEqualsPGPFmt contained skipwhite "=" nextgroup=muttrcPGPFormatStr -syntax match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr -syntax match muttrcVarEqualsPGPCmdFmt contained skipwhite "=" nextgroup=muttrcPGPCmdFormatStr -syntax match muttrcVarEqualsSdbFmt contained skipwhite "=" nextgroup=muttrcSidebarFormatStr -syntax match muttrcVarEqualsStatusFmt contained skipwhite "=" nextgroup=muttrcStatusFormatStr +syntax match muttrcVarEqualsAliasFmt contained skipwhite "=" nextgroup=muttrcAliasFormatStr +syntax match muttrcVarEqualsAttachFmt contained skipwhite "=" nextgroup=muttrcAttachFormatStr +syntax match muttrcVarEqualsComposeFmt contained skipwhite "=" nextgroup=muttrcComposeFormatStr +syntax match muttrcVarEqualsFolderFmt contained skipwhite "=" nextgroup=muttrcFolderFormatStr +syntax match muttrcVarEqualsGrpIdxFmt contained skipwhite "=" nextgroup=muttrcGroupIndexFormatStr +syntax match muttrcVarEqualsIdxFmt contained skipwhite "=" nextgroup=muttrcIndexFormatStr +syntax match muttrcVarEqualsMixFmt contained skipwhite "=" nextgroup=muttrcMixFormatStr +syntax match muttrcVarEqualsPGPCmdFmt contained skipwhite "=" nextgroup=muttrcPGPCmdFormatStr +syntax match muttrcVarEqualsPGPFmt contained skipwhite "=" nextgroup=muttrcPGPFormatStr syntax match muttrcVarEqualsPGPGetKeysFmt contained skipwhite "=" nextgroup=muttrcPGPGetKeysFormatStr -syntax match muttrcVarEqualsSmimeFmt contained skipwhite "=" nextgroup=muttrcSmimeFormatStr -syntax match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=muttrcStrftimeFormatStr +syntax match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr +syntax match muttrcVarEqualsSdbFmt contained skipwhite "=" nextgroup=muttrcSidebarFormatStr +syntax match muttrcVarEqualsSmimeFmt contained skipwhite "=" nextgroup=muttrcSmimeFormatStr +syntax match muttrcVarEqualsStatusFmt contained skipwhite "=" nextgroup=muttrcStatusFormatStr +syntax match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=muttrcStrftimeFormatStr syntax match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr +" CHECKED 2018-04-18 " List of the different screens in mutt -" UPDATE -syntax keyword muttrcMenu contained alias attach browser compose editor index pager postpone pgp mix query generic +syntax keyword muttrcMenu contained alias attach browser compose editor generic index key_select_pgp key_select_smime mix pager pgp postpone query smime syntax match muttrcMenuList "\S\+" contained contains=muttrcMenu syntax match muttrcMenuCommas /,/ contained +" CHECKED 2018-04-18 " List of hooks in Commands in init.h -" UPDATE syntax keyword muttrcHooks contained skipwhite - \ account-hook append-hook charset-hook - \ close-hook crypt-hook fcc-hook fcc-save-hook folder-hook iconv-hook mbox-hook - \ message-hook open-hook pgp-hook reply-hook save-hook send-hook send2-hook + \ account-hook append-hook close-hook crypt-hook fcc-hook fcc-save-hook + \ folder-hook iconv-hook mbox-hook message-hook open-hook pgp-hook + \ reply-hook save-hook send-hook send2-hook syntax keyword muttrcHooks skipwhite shutdown-hook startup-hook timeout-hook nextgroup=muttrcCommand syntax region muttrcSpamPattern contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPattern nextgroup=muttrcString,muttrcStringNL @@ -375,28 +372,29 @@ syntax keyword muttrcMonoAttrib contained bold none normal reverse standout unde syntax keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField,muttrcColorCompose syntax match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono +" CHECKED 2018-04-18 " List of fields in Fields in color.c -" UPDATE -syntax keyword muttrcColorField skipwhite contained - \ attach_headers attachment bold error hdrdefault index_author index_collapsed - \ index_date index_label index_number index_size index_subject index_tags - \ indicator markers message normal progress prompt quoted search sidebar_divider +syntax keyword muttrcColorField skipwhite contained + \ attachment attach_headers body bold error hdrdefault header index + \ index_author index_collapsed index_date index_flags index_label + \ index_number index_size index_subject index_tag index_tags indicator + \ markers message normal progress prompt quoted search sidebar_divider \ sidebar_flagged sidebar_highlight sidebar_indicator sidebar_new \ sidebar_ordinary sidebar_spoolfile signature status tilde tree underline - \ body header index index_flags index_tag \ nextgroup=muttrcColor syntax match muttrcColorField contained "\<quoted\d\=\>" syntax match muttrcColorCompose skipwhite contained /\s*compose\s*/ nextgroup=muttrcColorComposeField + +" CHECKED 2018-04-18 " List of fields in ComposeFields in color.c -" UPDATE syntax keyword muttrcColorComposeField skipwhite contained - \ header security_encrypt security_sign security_both security_none + \ header security_both security_encrypt security_none security_sign \ nextgroup=muttrcColorFG,muttrcColorFGNL syntax region muttrcColorLine keepend start=/^\s*color\s\+/ skip=+\\$+ end=+$+ contains=muttrcColorKeyword,muttrcComment,muttrcUnHighlightSpace -function s:boolQuadGen(type, vars, deprecated) +function! s:boolQuadGen(type, vars, deprecated) let l:novars = copy(a:vars) call map(l:novars, '"no" . v:val') let l:invvars = copy(a:vars) @@ -414,104 +412,107 @@ function s:boolQuadGen(type, vars, deprecated) exec 'syntax keyword muttrcVar' . l:type . ' skipwhite contained ' . join(l:invvars) . ' nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr' endfunction +" CHECKED 2018-04-18 " List of DT_BOOL in MuttVars in init.h -" UPDATE call s:boolQuadGen('Bool', [ - \ 'allow_8bit', 'allow_ansi', 'arrow_cursor', 'ascii_chars', 'askbcc', 'askcc', - \ 'ask_follow_up', 'ask_x_comment_to', 'attach_split', 'autoedit', 'auto_tag', - \ 'beep', 'beep_new', 'bounce_delivered', 'braille_friendly', 'check_mbox_size', - \ 'check_new', 'collapse_all', 'collapse_flagged', 'collapse_unread', - \ 'confirmappend', 'confirmcreate', 'crypt_autoencrypt', 'crypt_autopgp', - \ 'crypt_autosign', 'crypt_autosmime', 'crypt_confirmhook', - \ 'crypt_opportunistic_encrypt', 'crypt_replyencrypt', 'crypt_replysign', - \ 'crypt_replysignencrypted', 'crypt_timestamp', 'crypt_use_gpgme', - \ 'crypt_use_pka', 'delete_untag', 'digest_collapse', 'duplicate_threads', - \ 'edit_headers', 'encode_from', 'fast_reply', 'fcc_clear', 'flag_safe', - \ 'followup_to', 'force_name', 'forward_decode', 'forward_decrypt', - \ 'forward_quote', 'forward_references', 'hdrs', 'header', - \ 'header_cache_compress', 'header_color_partial', 'help', 'hidden_host', - \ 'hide_limited', 'hide_missing', 'hide_thread_subject', 'hide_top_limited', - \ 'hide_top_missing', 'history_remove_dups', 'honor_disposition', 'idn_decode', - \ 'idn_encode', 'ignore_linear_white_space', 'ignore_list_reply_to', - \ 'imap_check_subscribed', 'imap_idle', 'imap_list_subscribed', 'imap_passive', - \ 'imap_peek', 'imap_servernoise', 'implicit_autoview', 'include_onlyfirst', - \ 'keep_flagged', 'keywords_legacy', 'keywords_standard', 'mailcap_sanitize', - \ 'mail_check_recent', 'mail_check_stats', 'maildir_check_cur', - \ 'maildir_header_cache_verify', 'maildir_trash', 'markers', 'mark_old', - \ 'menu_move_off', 'menu_scroll', 'message_cache_clean', 'meta_key', 'metoo', - \ 'mh_purge', 'mime_forward_decode', 'mime_subject', 'mime_type_query_first', - \ 'narrow_tree', 'nm_record', 'nntp_listgroup', 'nntp_load_description', - \ 'pager_stop', 'pgp_auto_decode', 'pgp_autoinline', 'pgp_check_exit', - \ 'pgp_ignore_subkeys', 'pgp_long_ids', 'pgp_replyinline', - \ 'pgp_retainable_sigs', 'pgp_self_encrypt', 'pgp_show_unusable', - \ 'pgp_strict_enc', 'pgp_use_gpg_agent', 'pipe_decode', 'pipe_split', - \ 'pop_auth_try_all', 'pop_last', 'postpone_encrypt', 'print_decode', - \ 'print_split', 'prompt_after', 'read_only', 'reflow_space_quotes', - \ 'reflow_text', 'reply_self', 'reply_with_xorig', 'resolve', - \ 'resume_draft_files', 'resume_edited_draft_files', 'reverse_alias', - \ 'reverse_name', 'reverse_realname', 'rfc2047_parameters', 'save_address', - \ 'save_empty', 'save_name', 'save_unsubscribed', 'score', 'show_new_news', - \ 'show_only_unread', 'sidebar_folder_indent', 'sidebar_new_mail_only', - \ 'sidebar_next_new_wrap', 'sidebar_on_right', 'sidebar_short_path', - \ 'sidebar_visible', 'sig_dashes', 'sig_on_top', 'smart_wrap', - \ 'smime_ask_cert_label', 'smime_decrypt_use_default_key', 'smime_is_default', - \ 'smime_self_encrypt', 'sort_re', 'ssl_force_tls', 'ssl_use_sslv2', - \ 'ssl_use_sslv3', 'ssl_usesystemcerts', 'ssl_use_tlsv1', 'ssl_use_tlsv1_1', - \ 'ssl_use_tlsv1_2', 'ssl_verify_dates', 'ssl_verify_host', - \ 'ssl_verify_partial_chains', 'status_on_top', 'strict_threads', 'suspend', - \ 'text_flowed', 'thorough_search', 'thread_received', 'tilde', 'ts_enabled', - \ 'uncollapse_jump', 'uncollapse_new', 'use_8bitmime', 'use_domain', - \ 'use_envelope_from', 'use_from', 'use_ipv6', 'user_agent', - \ 'virtual_spoolfile', 'wait_key', 'weed', 'wrap_search', 'write_bcc', - \ 'x_comment_to' + \ 'allow_8bit', 'allow_ansi', 'arrow_cursor', 'ascii_chars', 'askbcc', + \ 'askcc', 'ask_follow_up', 'ask_x_comment_to', 'attach_split', 'autoedit', + \ 'auto_tag', 'beep', 'beep_new', 'bounce_delivered', 'braille_friendly', + \ 'change_folder_next', 'check_mbox_size', 'check_new', 'collapse_all', + \ 'collapse_flagged', 'collapse_unread', 'confirmappend', 'confirmcreate', + \ 'crypt_autoencrypt', 'crypt_autopgp', 'crypt_autosign', 'crypt_autosmime', + \ 'crypt_confirmhook', 'crypt_opportunistic_encrypt', 'crypt_replyencrypt', + \ 'crypt_replysign', 'crypt_replysignencrypted', 'crypt_timestamp', + \ 'crypt_use_gpgme', 'crypt_use_pka', 'delete_untag', 'digest_collapse', + \ 'duplicate_threads', 'edit_headers', 'encode_from', 'fast_reply', + \ 'fcc_clear', 'flag_safe', 'followup_to', 'force_name', 'forward_decode', + \ 'forward_decrypt', 'forward_quote', 'forward_references', 'hdrs', + \ 'header', 'header_cache_compress', 'header_color_partial', 'help', + \ 'hidden_host', 'hide_limited', 'hide_missing', 'hide_thread_subject', + \ 'hide_top_limited', 'hide_top_missing', 'history_remove_dups', + \ 'honor_disposition', 'idn_decode', 'idn_encode', 'ignore_list_reply_to', + \ 'imap_check_subscribed', 'imap_idle', 'imap_list_subscribed', + \ 'imap_passive', 'imap_peek', 'imap_servernoise', 'implicit_autoview', + \ 'include_onlyfirst', 'keep_flagged', 'mailcap_sanitize', + \ 'maildir_check_cur', 'maildir_header_cache_verify', 'maildir_trash', + \ 'mail_check_recent', 'mail_check_stats', 'markers', 'mark_old', + \ 'menu_move_off', 'menu_scroll', 'message_cache_clean', 'meta_key', + \ 'metoo', 'mh_purge', 'mime_forward_decode', 'mime_subject', + \ 'mime_type_query_first', 'narrow_tree', 'nm_record', 'nntp_listgroup', + \ 'nntp_load_description', 'pager_stop', 'pgp_autoinline', + \ 'pgp_auto_decode', 'pgp_check_exit', 'pgp_ignore_subkeys', 'pgp_long_ids', + \ 'pgp_replyinline', 'pgp_retainable_sigs', 'pgp_self_encrypt', + \ 'pgp_show_unusable', 'pgp_strict_enc', 'pgp_use_gpg_agent', 'pipe_decode', + \ 'pipe_split', 'pop_auth_try_all', 'pop_last', 'postpone_encrypt', + \ 'print_decode', 'print_split', 'prompt_after', 'read_only', + \ 'reflow_space_quotes', 'reflow_text', 'reply_self', 'reply_with_xorig', + \ 'resolve', 'resume_draft_files', 'resume_edited_draft_files', + \ 'reverse_alias', 'reverse_name', 'reverse_realname', 'rfc2047_parameters', + \ 'save_address', 'save_empty', 'save_name', 'save_unsubscribed', 'score', + \ 'show_new_news', 'show_only_unread', 'sidebar_folder_indent', + \ 'sidebar_new_mail_only', 'sidebar_next_new_wrap', 'sidebar_on_right', + \ 'sidebar_short_path', 'sidebar_visible', 'sig_dashes', 'sig_on_top', + \ 'smart_wrap', 'smime_ask_cert_label', 'smime_decrypt_use_default_key', + \ 'smime_is_default', 'smime_self_encrypt', 'sort_re', 'ssl_force_tls', + \ 'ssl_usesystemcerts', 'ssl_use_sslv2', 'ssl_use_sslv3', 'ssl_use_tlsv1', + \ 'ssl_use_tlsv1_1', 'ssl_use_tlsv1_2', 'ssl_verify_dates', + \ 'ssl_verify_host', 'ssl_verify_partial_chains', 'status_on_top', + \ 'strict_threads', 'suspend', 'text_flowed', 'thorough_search', + \ 'thread_received', 'tilde', 'ts_enabled', 'uncollapse_jump', + \ 'uncollapse_new', 'user_agent', 'use_8bitmime', 'use_domain', + \ 'use_envelope_from', 'use_from', 'use_ipv6', 'virtual_spoolfile', + \ 'wait_key', 'weed', 'wrap_search', 'write_bcc', 'x_comment_to' \ ], 0) +" CHECKED 2018-04-18 " Deprecated Bools -" UPDATE " List of DT_SYNONYM synonyms of Bools in MuttVars in init.h call s:boolQuadGen('Bool', [ - \ 'edit_hdrs', 'envelope_from', 'forw_decode', 'forw_decrypt', 'forw_quote', - \ 'pgp_autoencrypt', 'pgp_autosign', 'pgp_auto_traditional', - \ 'pgp_create_traditional', 'pgp_replyencrypt', 'pgp_replysign', - \ 'pgp_replysignencrypted', 'xterm_set_titles' + \ 'edit_hdrs', 'envelope_from', 'forw_decode', 'forw_decrypt', + \ 'forw_quote', 'ignore_linear_white_space', 'pgp_autoencrypt', + \ 'pgp_autosign', 'pgp_auto_traditional', 'pgp_create_traditional', + \ 'pgp_replyencrypt', 'pgp_replysign', 'pgp_replysignencrypted', + \ 'xterm_set_titles' \ ], 1) +" CHECKED 2018-04-18 " List of DT_QUAD in MuttVars in init.h -" UPDATE call s:boolQuadGen('Quad', [ \ 'abort_noattach', 'abort_nosubject', 'abort_unmodified', 'bounce', \ 'catchup_newsgroup', 'copy', 'crypt_verify_sig', 'delete', 'fcc_attach', \ 'followup_to_poster', 'forward_edit', 'honor_followup_to', 'include', - \ 'mime_forward', 'mime_forward_rest', 'move', 'pgp_encrypt_self', - \ 'pgp_mime_auto', 'pop_delete', 'pop_reconnect', 'post_moderated', 'postpone', - \ 'print', 'quit', 'recall', 'reply_to', 'smime_encrypt_self', 'ssl_starttls', + \ 'mime_forward', 'mime_forward_rest', 'move', 'pgp_mime_auto', + \ 'pop_delete', 'pop_reconnect', 'postpone', 'post_moderated', 'print', + \ 'quit', 'recall', 'reply_to', 'ssl_starttls' \ ], 0) +" CHECKED 2018-04-18 " Deprecated Quads -" UPDATE " List of DT_SYNONYM synonyms of Quads in MuttVars in init.h call s:boolQuadGen('Quad', [ - \ 'mime_fwd', 'pgp_verify_sig' + \ 'mime_fwd', 'pgp_encrypt_self', 'pgp_verify_sig', 'smime_encrypt_self' \ ], 1) +" CHECKED 2018-04-18 " List of DT_NUMBER in MuttVars in init.h -" UPDATE syntax keyword muttrcVarNum skipwhite contained \ connect_timeout debug_level history imap_keepalive imap_pipeline_depth - \ imap_poll_timeout mail_check mail_check_stats_interval menu_context net_inc - \ nm_db_limit nm_open_timeout nm_query_window_current_position + \ imap_poll_timeout mail_check mail_check_stats_interval menu_context + \ net_inc nm_db_limit nm_open_timeout nm_query_window_current_position \ nm_query_window_duration nntp_context nntp_poll pager_context \ pager_index_lines pgp_timeout pop_checkinterval read_inc reflow_wrap - \ save_history score_threshold_delete score_threshold_flag score_threshold_read - \ search_context sendmail_wait sidebar_width skip_quoted_offset sleep_time - \ smime_timeout ssl_min_dh_prime_bits time_inc timeout wrap wrap_headers - \ wrapmargin write_inc + \ save_history score_threshold_delete score_threshold_flag + \ score_threshold_read search_context sendmail_wait sidebar_component_depth + \ sidebar_width skip_quoted_offset sleep_time smime_timeout + \ ssl_min_dh_prime_bits timeout time_inc wrap wrap_headers write_inc + \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr +syntax keyword muttrcVarDeprecatedNum contained skipwhite + \ wrapmargin \ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr +" CHECKED 2018-04-18 " List of DT_STRING in MuttVars in init.h -" UPDATE " Special cases first, and all the rest at the end -" A lot of special cases are format, flatcap compiled a list here https://pastebin.com/raw/5QXhiP6L " Formats themselves must be updated in their respective groups " See s:escapesConditionals syntax match muttrcVarStr contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr @@ -523,49 +524,52 @@ syntax keyword muttrcVarStr contained skipwhite attribution index_format message " Deprecated format syntax keyword muttrcVarDeprecatedStr contained skipwhite hdr_format msg_format nextgroup=muttrcVarEqualsIdxFmt syntax keyword muttrcVarStr contained skipwhite mix_entry_format nextgroup=muttrcVarEqualsMixFmt -syntax keyword muttrcVarStr contained skipwhite - \ pgp_decode_command pgp_verify_command pgp_decrypt_command - \ pgp_clearsign_command pgp_sign_command pgp_encrypt_sign_command - \ pgp_encrypt_only_command pgp_import_command pgp_export_command - \ pgp_verify_key_command pgp_list_secring_command pgp_list_pubring_command +syntax keyword muttrcVarStr contained skipwhite + \ pgp_clearsign_command pgp_decode_command pgp_decrypt_command + \ pgp_encrypt_only_command pgp_encrypt_sign_command pgp_export_command + \ pgp_import_command pgp_list_pubring_command pgp_list_secring_command + \ pgp_sign_command pgp_verify_command pgp_verify_key_command \ nextgroup=muttrcVarEqualsPGPCmdFmt syntax keyword muttrcVarStr contained skipwhite pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt syntax keyword muttrcVarStr contained skipwhite pgp_getkeys_command nextgroup=muttrcVarEqualsPGPGetKeysFmt syntax keyword muttrcVarStr contained skipwhite query_format nextgroup=muttrcVarEqualsQueryFmt syntax keyword muttrcVarStr contained skipwhite - \ smime_decrypt_command smime_verify_command smime_verify_opaque_command - \ smime_sign_command smime_sign_opaque_command smime_encrypt_command - \ smime_pk7out_command smime_get_cert_command smime_get_signer_cert_command - \ smime_import_cert_command smime_get_cert_email_command + \ smime_decrypt_command smime_encrypt_command smime_get_cert_command + \ smime_get_cert_email_command smime_get_signer_cert_command + \ smime_import_cert_command smime_pk7out_command smime_sign_command + \ smime_verify_command smime_verify_opaque_command \ nextgroup=muttrcVarEqualsSmimeFmt syntax keyword muttrcVarStr contained skipwhite ts_icon_format ts_status_format status_format nextgroup=muttrcVarEqualsStatusFmt " Deprecated format syntax keyword muttrcVarDeprecatedStr contained skipwhite xterm_icon xterm_title nextgroup=muttrcVarEqualsStatusFmt syntax keyword muttrcVarStr contained skipwhite date_format nextgroup=muttrcVarEqualsStrftimeFmt -syntax keyword muttrcVarStr contained skipwhite group_index_format nextgroup=muttrcVarEqualsGrpIdxFmt +syntax keyword muttrcVarStr contained skipwhite group_index_format nextgroup=muttrcVarEqualsGrpIdxFmt syntax keyword muttrcVarStr contained skipwhite sidebar_format nextgroup=muttrcVarEqualsSdbFmt syntax keyword muttrcVarStr contained skipwhite \ assumed_charset attach_charset attach_sep attribution_locale charset - \ config_charset content_type default_hook dsn_notify dsn_return empty_subject - \ escape forward_attribution_intro forward_attribution_trailer forward_format - \ header_cache_pagesize hostname imap_authenticators imap_delim_chars - \ imap_headers imap_login imap_pass imap_user indent_string mailcap_path - \ mark_macro_prefix mh_seq_flagged mh_seq_replied mh_seq_unseen - \ mime_type_query_command newsgroups_charset news_server nm_default_uri - \ nm_exclude_tags nm_hidden_tags nm_query_type nm_query_window_current_search - \ nm_query_window_timebase nm_record_tags nm_unread_tag nntp_authenticators - \ nntp_pass nntp_user pgp_self_encrypt_as pgp_sign_as pipe_sep - \ pop_authenticators pop_host pop_pass pop_user post_indent_string - \ postpone_encrypt_as preconnect realname send_charset + \ config_charset content_type default_hook dsn_notify dsn_return + \ empty_subject escape forward_attribution_intro forward_attribution_trailer + \ forward_format header_cache_pagesize hidden_tags hostname + \ imap_authenticators imap_delim_chars imap_headers imap_login imap_pass + \ imap_user indent_string mailcap_path mark_macro_prefix mh_seq_flagged + \ mh_seq_replied mh_seq_unseen mime_type_query_command newsgroups_charset + \ news_server nm_default_uri nm_exclude_tags nm_query_type + \ nm_query_window_current_search nm_query_window_timebase nm_record_tags + \ nm_unread_tag nntp_authenticators nntp_pass nntp_user pgp_default_key + \ pgp_sign_as pipe_sep pop_authenticators pop_host pop_pass pop_user + \ postpone_encrypt_as post_indent_string preconnect realname send_charset \ show_multipart_alternative sidebar_delim_chars sidebar_divider_char \ sidebar_indent_string simple_search smime_default_key smime_encrypt_with - \ smime_self_encrypt_as smime_sign_digest_alg smtp_authenticators smtp_pass - \ smtp_url spam_separator ssl_ciphers tunnel xlabel_delimiter + \ smime_sign_as smime_sign_digest_alg smtp_authenticators smtp_pass smtp_url + \ spam_separator ssl_ciphers tunnel \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " Deprecated strings syntax keyword muttrcVarDeprecatedStr contained skipwhite - \ forw_format indent_str post_indent_str smime_sign_as + \ forw_format indent_str pgp_self_encrypt_as post_indent_str + \ smime_self_encrypt_as \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr + +" CHECKED 2018-04-18 " List of DT_ADDRESS syntax keyword muttrcVarStr contained skipwhite envelope_from_address from nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_HCACHE @@ -574,6 +578,8 @@ syntax keyword muttrcVarStr contained skipwhite header_cache_backend nextgroup=m syntax keyword muttrcVarStr contained skipwhite mbox_type nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_MBTABLE syntax keyword muttrcVarStr contained skipwhite flag_chars from_chars status_chars to_chars nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr + +" CHECKED 2018-04-18 " List of DT_PATH syntax keyword muttrcVarStr contained skipwhite \ alias_file certificate_file debug_file display_filter editor entropy_file @@ -583,20 +589,24 @@ syntax keyword muttrcVarStr contained skipwhite \ smime_certificates smime_keys spoolfile ssl_ca_certificates_file \ ssl_client_cert tmpdir trash visual \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr -" List of deprecated DT_PATH -syntax keyword muttrcVarDeprecatedStr contained skipwhite print_cmd nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr + +" CHECKED 2018-04-18 " List of DT_REGEX syntax keyword muttrcVarStr contained skipwhite - \ attach_keyword gecos_mask mask pgp_decryption_okay pgp_good_sign quote_regexp - \ reply_regexp smileys + \ abort_noattach_regex gecos_mask mask pgp_decryption_okay pgp_good_sign + \ quote_regex reply_regex smileys \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr +" List of deprecated DT_PATH +syntax keyword muttrcVarDeprecatedStr contained skipwhite print_cmd nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr +" List of deprecated DT_REGEX +syntax keyword muttrcVarDeprecatedStr contained skipwhite abort_noattach_regexp attach_keyword quote_regexp reply_regexp nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr " List of DT_SORT syntax keyword muttrcVarStr contained skipwhite \ pgp_sort_keys sidebar_sort_method sort sort_alias sort_aux sort_browser \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr +" CHECKED 2018-04-18 " List of commands in Commands in init.h -" UPDATE " Remember to remove hooks, they have already been dealt with syntax keyword muttrcCommand skipwhite charset-hook nextgroup=muttrcRXString syntax keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks @@ -609,19 +619,16 @@ syntax keyword muttrcCommand skipwhite unalias nextgroup=muttrcUnAliasKey,muttrc syntax keyword muttrcCommand skipwhite set unset reset toggle nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr,muttrcVarDeprecatedBool,muttrcVarDeprecatedQuad,muttrcVarDeprecatedStr syntax keyword muttrcCommand skipwhite exec nextgroup=muttrcFunction syntax keyword muttrcCommand skipwhite - \ alternative_order attachments auto_view hdr_order ifdef ifndef ignore lua - \ lua-source mailboxes mailto_allow mime_lookup my_hdr push score setenv - \ sidebar_whitelist source subjectrx tag-formats tag-transforms - \ unalternative_order unattachments unauto_view uncolor unhdr_order unignore - \ unmailboxes unmailto_allow unmime_lookup unmono unmy_hdr unscore unsetenv - \ unsidebar_whitelist unsubjectrx unvirtual-mailboxes virtual-mailboxes - + \ alternative_order attachments auto_view finish hdr_order ifdef ifndef + \ ignore lua lua-source mailboxes mailto_allow mime_lookup my_hdr push score + \ setenv sidebar_whitelist source subjectrx subscribe-to tag-formats + \ tag-transforms unalternative_order unattachments unauto_view uncolor + \ unhdr_order unignore unmailboxes unmailto_allow unmime_lookup unmono + \ unmy_hdr unscore unsetenv unsidebar_whitelist unsubjectrx unsubscribe-from + \ unvirtual-mailboxes virtual-mailboxes + +" CHECKED 2018-04-18 " List of functions in functions.h -" UPDATE -syntax match muttrcFunction contained "\<accept\>" -syntax match muttrcFunction contained "\<append\>" -syntax match muttrcFunction contained "\<attach-file\>" -syntax match muttrcFunction contained "\<attach-key\>" syntax match muttrcFunction contained "\<accept\>" syntax match muttrcFunction contained "\<append\>" syntax match muttrcFunction contained "\<attach-file\>" @@ -632,8 +639,8 @@ syntax match muttrcFunction contained "\<backspace\>" syntax match muttrcFunction contained "\<backward-char\>" syntax match muttrcFunction contained "\<backward-word\>" syntax match muttrcFunction contained "\<bol\>" -syntax match muttrcFunction contained "\<bottom\>" syntax match muttrcFunction contained "\<bottom-page\>" +syntax match muttrcFunction contained "\<bottom\>" syntax match muttrcFunction contained "\<bounce-message\>" syntax match muttrcFunction contained "\<break-thread\>" syntax match muttrcFunction contained "\<buffy-cycle\>" @@ -643,10 +650,10 @@ syntax match muttrcFunction contained "\<catchup\>" syntax match muttrcFunction contained "\<chain-next\>" syntax match muttrcFunction contained "\<chain-prev\>" syntax match muttrcFunction contained "\<change-dir\>" -syntax match muttrcFunction contained "\<change-folder\>" syntax match muttrcFunction contained "\<change-folder-readonly\>" -syntax match muttrcFunction contained "\<change-newsgroup\>" +syntax match muttrcFunction contained "\<change-folder\>" syntax match muttrcFunction contained "\<change-newsgroup-readonly\>" +syntax match muttrcFunction contained "\<change-newsgroup\>" syntax match muttrcFunction contained "\<change-vfolder\>" syntax match muttrcFunction contained "\<check-new\>" syntax match muttrcFunction contained "\<check-traditional-pgp\>" @@ -654,8 +661,8 @@ syntax match muttrcFunction contained "\<clear-flag\>" syntax match muttrcFunction contained "\<collapse-all\>" syntax match muttrcFunction contained "\<collapse-parts\>" syntax match muttrcFunction contained "\<collapse-thread\>" -syntax match muttrcFunction contained "\<complete\>" syntax match muttrcFunction contained "\<complete-query\>" +syntax match muttrcFunction contained "\<complete\>" syntax match muttrcFunction contained "\<compose-to-sender\>" syntax match muttrcFunction contained "\<copy-file\>" syntax match muttrcFunction contained "\<copy-message\>" @@ -668,7 +675,6 @@ syntax match muttrcFunction contained "\<decode-copy\>" syntax match muttrcFunction contained "\<decode-save\>" syntax match muttrcFunction contained "\<decrypt-copy\>" syntax match muttrcFunction contained "\<decrypt-save\>" -syntax match muttrcFunction contained "\<delete\>" syntax match muttrcFunction contained "\<delete-char\>" syntax match muttrcFunction contained "\<delete-entry\>" syntax match muttrcFunction contained "\<delete-mailbox\>" @@ -676,13 +682,13 @@ syntax match muttrcFunction contained "\<delete-message\>" syntax match muttrcFunction contained "\<delete-pattern\>" syntax match muttrcFunction contained "\<delete-subthread\>" syntax match muttrcFunction contained "\<delete-thread\>" +syntax match muttrcFunction contained "\<delete\>" syntax match muttrcFunction contained "\<detach-file\>" syntax match muttrcFunction contained "\<display-address\>" syntax match muttrcFunction contained "\<display-filename\>" syntax match muttrcFunction contained "\<display-message\>" syntax match muttrcFunction contained "\<display-toggle-weed\>" syntax match muttrcFunction contained "\<downcase-word\>" -syntax match muttrcFunction contained "\<edit\>" syntax match muttrcFunction contained "\<edit-bcc\>" syntax match muttrcFunction contained "\<edit-cc\>" syntax match muttrcFunction contained "\<edit-description\>" @@ -696,11 +702,14 @@ syntax match muttrcFunction contained "\<edit-label\>" syntax match muttrcFunction contained "\<edit-message\>" syntax match muttrcFunction contained "\<edit-mime\>" syntax match muttrcFunction contained "\<edit-newsgroups\>" +syntax match muttrcFunction contained "\<edit-or-view-raw-message\>" +syntax match muttrcFunction contained "\<edit-raw-message\>" syntax match muttrcFunction contained "\<edit-reply-to\>" syntax match muttrcFunction contained "\<edit-subject\>" syntax match muttrcFunction contained "\<edit-to\>" syntax match muttrcFunction contained "\<edit-type\>" syntax match muttrcFunction contained "\<edit-x-comment-to\>" +syntax match muttrcFunction contained "\<edit\>" syntax match muttrcFunction contained "\<end-cond\>" syntax match muttrcFunction contained "\<enter-command\>" syntax match muttrcFunction contained "\<enter-mask\>" @@ -723,11 +732,13 @@ syntax match muttrcFunction contained "\<get-children\>" syntax match muttrcFunction contained "\<get-message\>" syntax match muttrcFunction contained "\<get-parent\>" syntax match muttrcFunction contained "\<goto-folder\>" +syntax match muttrcFunction contained "\<goto-parent\>" syntax match muttrcFunction contained "\<group-reply\>" syntax match muttrcFunction contained "\<half-down\>" syntax match muttrcFunction contained "\<half-up\>" syntax match muttrcFunction contained "\<help\>" syntax match muttrcFunction contained "\<history-down\>" +syntax match muttrcFunction contained "\<history-search\>" syntax match muttrcFunction contained "\<history-up\>" syntax match muttrcFunction contained "\<imap-fetch-mail\>" syntax match muttrcFunction contained "\<imap-logout-all\>" @@ -739,29 +750,32 @@ syntax match muttrcFunction contained "\<kill-eow\>" syntax match muttrcFunction contained "\<kill-line\>" syntax match muttrcFunction contained "\<kill-word\>" syntax match muttrcFunction contained "\<last-entry\>" -syntax match muttrcFunction contained "\<limit\>" syntax match muttrcFunction contained "\<limit-current-thread\>" +syntax match muttrcFunction contained "\<limit\>" syntax match muttrcFunction contained "\<link-threads\>" syntax match muttrcFunction contained "\<list-reply\>" -syntax match muttrcFunction contained "\<mail\>" syntax match muttrcFunction contained "\<mail-key\>" +syntax match muttrcFunction contained "\<mail\>" syntax match muttrcFunction contained "\<mark-as-new\>" syntax match muttrcFunction contained "\<mark-message\>" syntax match muttrcFunction contained "\<middle-page\>" syntax match muttrcFunction contained "\<mix\>" -syntax match muttrcFunction contained "\<modify-labels\>" syntax match muttrcFunction contained "\<modify-labels-then-hide\>" +syntax match muttrcFunction contained "\<modify-labels\>" +syntax match muttrcFunction contained "\<modify-tags-then-hide\>" +syntax match muttrcFunction contained "\<modify-tags\>" syntax match muttrcFunction contained "\<new-mime\>" syntax match muttrcFunction contained "\<next-entry\>" syntax match muttrcFunction contained "\<next-line\>" -syntax match muttrcFunction contained "\<next-new\>" syntax match muttrcFunction contained "\<next-new-then-unread\>" +syntax match muttrcFunction contained "\<next-new\>" syntax match muttrcFunction contained "\<next-page\>" syntax match muttrcFunction contained "\<next-subthread\>" syntax match muttrcFunction contained "\<next-thread\>" syntax match muttrcFunction contained "\<next-undeleted\>" -syntax match muttrcFunction contained "\<next-unread\>" syntax match muttrcFunction contained "\<next-unread-mailbox\>" +syntax match muttrcFunction contained "\<next-unread\>" +syntax match muttrcFunction contained "\<noop\>" syntax match muttrcFunction contained "\<parent-message\>" syntax match muttrcFunction contained "\<pgp-menu\>" syntax match muttrcFunction contained "\<pipe-entry\>" @@ -770,8 +784,8 @@ syntax match muttrcFunction contained "\<post-message\>" syntax match muttrcFunction contained "\<postpone-message\>" syntax match muttrcFunction contained "\<previous-entry\>" syntax match muttrcFunction contained "\<previous-line\>" -syntax match muttrcFunction contained "\<previous-new\>" syntax match muttrcFunction contained "\<previous-new-then-unread\>" +syntax match muttrcFunction contained "\<previous-new\>" syntax match muttrcFunction contained "\<previous-page\>" syntax match muttrcFunction contained "\<previous-subthread\>" syntax match muttrcFunction contained "\<previous-thread\>" @@ -782,8 +796,8 @@ syntax match muttrcFunction contained "\<print-message\>" syntax match muttrcFunction contained "\<purge-message\>" syntax match muttrcFunction contained "\<purge-thread\>" syntax match muttrcFunction contained "\<quasi-delete\>" -syntax match muttrcFunction contained "\<query\>" syntax match muttrcFunction contained "\<query-append\>" +syntax match muttrcFunction contained "\<query\>" syntax match muttrcFunction contained "\<quit\>" syntax match muttrcFunction contained "\<quote-char\>" syntax match muttrcFunction contained "\<read-subthread\>" @@ -801,40 +815,41 @@ syntax match muttrcFunction contained "\<resend-message\>" syntax match muttrcFunction contained "\<root-message\>" syntax match muttrcFunction contained "\<save-entry\>" syntax match muttrcFunction contained "\<save-message\>" -syntax match muttrcFunction contained "\<search\>" syntax match muttrcFunction contained "\<search-next\>" syntax match muttrcFunction contained "\<search-opposite\>" syntax match muttrcFunction contained "\<search-reverse\>" syntax match muttrcFunction contained "\<search-toggle\>" +syntax match muttrcFunction contained "\<search\>" syntax match muttrcFunction contained "\<select-entry\>" syntax match muttrcFunction contained "\<select-new\>" syntax match muttrcFunction contained "\<send-message\>" syntax match muttrcFunction contained "\<set-flag\>" syntax match muttrcFunction contained "\<shell-escape\>" syntax match muttrcFunction contained "\<show-limit\>" +syntax match muttrcFunction contained "\<show-log-messages\>" syntax match muttrcFunction contained "\<show-version\>" -syntax match muttrcFunction contained "\<sidebar-next\>" syntax match muttrcFunction contained "\<sidebar-next-new\>" +syntax match muttrcFunction contained "\<sidebar-next\>" syntax match muttrcFunction contained "\<sidebar-open\>" syntax match muttrcFunction contained "\<sidebar-page-down\>" syntax match muttrcFunction contained "\<sidebar-page-up\>" -syntax match muttrcFunction contained "\<sidebar-prev\>" syntax match muttrcFunction contained "\<sidebar-prev-new\>" +syntax match muttrcFunction contained "\<sidebar-prev\>" syntax match muttrcFunction contained "\<sidebar-toggle-virtual\>" syntax match muttrcFunction contained "\<sidebar-toggle-visible\>" syntax match muttrcFunction contained "\<skip-quoted\>" syntax match muttrcFunction contained "\<smime-menu\>" -syntax match muttrcFunction contained "\<sort\>" syntax match muttrcFunction contained "\<sort-mailbox\>" syntax match muttrcFunction contained "\<sort-reverse\>" -syntax match muttrcFunction contained "\<subscribe\>" +syntax match muttrcFunction contained "\<sort\>" syntax match muttrcFunction contained "\<subscribe-pattern\>" +syntax match muttrcFunction contained "\<subscribe\>" syntax match muttrcFunction contained "\<sync-mailbox\>" syntax match muttrcFunction contained "\<tag-entry\>" syntax match muttrcFunction contained "\<tag-message\>" syntax match muttrcFunction contained "\<tag-pattern\>" -syntax match muttrcFunction contained "\<tag-prefix\>" syntax match muttrcFunction contained "\<tag-prefix-cond\>" +syntax match muttrcFunction contained "\<tag-prefix\>" syntax match muttrcFunction contained "\<tag-subthread\>" syntax match muttrcFunction contained "\<tag-thread\>" syntax match muttrcFunction contained "\<toggle-disposition\>" @@ -846,8 +861,8 @@ syntax match muttrcFunction contained "\<toggle-recode\>" syntax match muttrcFunction contained "\<toggle-subscribed\>" syntax match muttrcFunction contained "\<toggle-unlink\>" syntax match muttrcFunction contained "\<toggle-write\>" -syntax match muttrcFunction contained "\<top\>" syntax match muttrcFunction contained "\<top-page\>" +syntax match muttrcFunction contained "\<top\>" syntax match muttrcFunction contained "\<transpose-chars\>" syntax match muttrcFunction contained "\<uncatchup\>" syntax match muttrcFunction contained "\<undelete-entry\>" @@ -855,8 +870,8 @@ syntax match muttrcFunction contained "\<undelete-message\>" syntax match muttrcFunction contained "\<undelete-pattern\>" syntax match muttrcFunction contained "\<undelete-subthread\>" syntax match muttrcFunction contained "\<undelete-thread\>" -syntax match muttrcFunction contained "\<unsubscribe\>" syntax match muttrcFunction contained "\<unsubscribe-pattern\>" +syntax match muttrcFunction contained "\<unsubscribe\>" syntax match muttrcFunction contained "\<untag-pattern\>" syntax match muttrcFunction contained "\<upcase-word\>" syntax match muttrcFunction contained "\<update-encoding\>" @@ -864,11 +879,12 @@ syntax match muttrcFunction contained "\<verify-key\>" syntax match muttrcFunction contained "\<vfolder-from-query\>" syntax match muttrcFunction contained "\<vfolder-window-backward\>" syntax match muttrcFunction contained "\<vfolder-window-forward\>" -syntax match muttrcFunction contained "\<view-attach\>" syntax match muttrcFunction contained "\<view-attachments\>" +syntax match muttrcFunction contained "\<view-attach\>" syntax match muttrcFunction contained "\<view-file\>" syntax match muttrcFunction contained "\<view-mailcap\>" syntax match muttrcFunction contained "\<view-name\>" +syntax match muttrcFunction contained "\<view-raw-message\>" syntax match muttrcFunction contained "\<view-text\>" syntax match muttrcFunction contained "\<what-key\>" syntax match muttrcFunction contained "\<write-fcc\>" @@ -1029,4 +1045,5 @@ let b:current_syntax = "neomuttrc" let &cpo = s:cpo_save unlet s:cpo_save -"EOF vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim + +" vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim isk+=- diff --git a/runtime/syntax/ninja.vim b/runtime/syntax/ninja.vim index f34588f60c..a53567e585 100644 --- a/runtime/syntax/ninja.vim +++ b/runtime/syntax/ninja.vim @@ -1,16 +1,16 @@ " ninja build file syntax. " Language: ninja build file as described at -" http://martine.github.com/ninja/manual.html -" Version: 1.4 -" Last Change: 2014/05/13 +" http://ninja-build.org/manual.html +" Version: 1.5 +" Last Change: 2018/04/05 " Maintainer: Nicolas Weber <nicolasweber@gmx.de> -" Version 1.4 of this script is in the upstream vim repository and will be +" Version 1.5 of this script is in the upstream vim repository and will be " included in the next vim release. If you change this, please send your change " upstream. " ninja lexer and parser are at -" https://github.com/martine/ninja/blob/master/src/lexer.in.cc -" https://github.com/martine/ninja/blob/master/src/manifest_parser.cc +" https://github.com/ninja-build/ninja/blob/master/src/lexer.in.cc +" https://github.com/ninja-build/ninja/blob/master/src/manifest_parser.cc if exists("b:current_syntax") finish @@ -21,7 +21,10 @@ set cpo&vim syn case match -syn match ninjaComment /#.*/ contains=@Spell +" Comments are only matched when the # is at the beginning of the line (with +" optional whitespace), as long as the prior line didn't end with a $ +" continuation. +syn match ninjaComment /\(\$\n\)\@<!\_^\s*#.*$/ contains=@Spell " Toplevel statements are the ones listed here and " toplevel variable assignments (ident '=' value). @@ -38,12 +41,13 @@ syn match ninjaKeyword "^subninja\>" " limited set of magic variables, 'build' allows general " let assignments. " manifest_parser.cc, ParseRule() -syn region ninjaRule start="^rule" end="^\ze\S" contains=ALL transparent -syn keyword ninjaRuleCommand contained command deps depfile description generator +syn region ninjaRule start="^rule" end="^\ze\S" contains=TOP transparent +syn keyword ninjaRuleCommand contained containedin=ninjaRule command + \ deps depfile description generator \ pool restat rspfile rspfile_content -syn region ninjaPool start="^pool" end="^\ze\S" contains=ALL transparent -syn keyword ninjaPoolCommand contained depth +syn region ninjaPool start="^pool" end="^\ze\S" contains=TOP transparent +syn keyword ninjaPoolCommand contained containedin=ninjaPool depth " Strings are parsed as follows: " lexer.in.cc, ReadEvalString() diff --git a/runtime/syntax/nsis.vim b/runtime/syntax/nsis.vim index 3a343dd430..f6d5cab6a8 100644 --- a/runtime/syntax/nsis.vim +++ b/runtime/syntax/nsis.vim @@ -1,52 +1,72 @@ " Vim syntax file -" Language: NSIS script, for version of NSIS 1.91 and later -" Maintainer: Alex Jakushev <Alex.Jakushev@kemek.lt> -" Last Change: 2004 May 12 +" Language: NSIS script, for version of NSIS 3.03 and later +" Maintainer: Ken Takata +" URL: https://github.com/k-takata/vim-nsis +" Previous Maintainer: Alex Jakushev <Alex.Jakushev@kemek.lt> +" Last Change: 2018-02-07 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + syn case ignore -"COMMENTS +"Pseudo definitions +syn match nsisLine nextgroup=@nsisPseudoStatement skipwhite "^" +syn cluster nsisPseudoStatement contains=nsisFirstComment,nsisLocalLabel,nsisGlobalLabel +syn cluster nsisPseudoStatement add=nsisDefine,nsisPreCondit,nsisMacro,nsisInclude,nsisSystem +syn cluster nsisPseudoStatement add=nsisAttribute,nsisCompiler,nsisVersionInfo,nsisInstruction,nsisStatement + +"COMMENTS (4.1) syn keyword nsisTodo todo attention note fixme readme -syn region nsisComment start=";" end="$" contains=nsisTodo -syn region nsisComment start="#" end="$" contains=nsisTodo - -"LABELS -syn match nsisLocalLabel "\a\S\{-}:" -syn match nsisGlobalLabel "\.\S\{-1,}:" - -"PREPROCESSOR -syn match nsisPreprocSubst "${.\{-}}" -syn match nsisDefine "!define\>" -syn match nsisDefine "!undef\>" -syn match nsisPreCondit "!ifdef\>" -syn match nsisPreCondit "!ifndef\>" -syn match nsisPreCondit "!endif\>" -syn match nsisPreCondit "!else\>" -syn match nsisMacro "!macro\>" -syn match nsisMacro "!macroend\>" -syn match nsisMacro "!insertmacro\>" - -"COMPILER UTILITY -syn match nsisInclude "!include\>" -syn match nsisSystem "!cd\>" -syn match nsisSystem "!system\>" -syn match nsisSystem "!packhdr\>" - -"VARIABLES +syn region nsisComment start="[;#]" end="$" contains=nsisTodo,nsisLineContinuation,@Spell oneline +syn region nsisComment start=".\@1<=/\*" end="\*/" contains=nsisTodo,@Spell +syn region nsisFirstComment start="/\*" end="\*/" contained contains=nsisTodo,@Spell skipwhite + \ nextgroup=@nsisPseudoStatement + +syn match nsisLineContinuation "\\$" + +"STRINGS (4.1) +syn region nsisString start=/"/ end=/"/ contains=@nsisStringItems,@Spell +syn region nsisString start=/'/ end=/'/ contains=@nsisStringItems,@Spell +syn region nsisString start=/`/ end=/`/ contains=@nsisStringItems,@Spell + +syn cluster nsisStringItems contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar,nsisUserVar,nsisSysVar,nsisRegistry,nsisLineContinuation + +"NUMBERS (4.1) +syn match nsisNumber "\<[1-9]\d*\>" +syn match nsisNumber "\<0x\x\+\>" +syn match nsisNumber "\<0\o*\>" + +"STRING REPLACEMENT (5.4, 4.9.15.2, 5.3.1) +syn region nsisPreprocSubst start="\${" end="}" contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar +syn region nsisPreprocLangStr start="\$(" end=")" contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar +syn region nsisPreprocEnvVar start="\$%" end="%" contains=nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar + +"VARIABLES (4.2.2) syn match nsisUserVar "$\d" syn match nsisUserVar "$R\d" syn match nsisSysVar "$INSTDIR" syn match nsisSysVar "$OUTDIR" syn match nsisSysVar "$CMDLINE" +syn match nsisSysVar "$LANGUAGE" +"CONSTANTS (4.2.3) syn match nsisSysVar "$PROGRAMFILES" +syn match nsisSysVar "$PROGRAMFILES32" +syn match nsisSysVar "$PROGRAMFILES64" +syn match nsisSysVar "$COMMONFILES" +syn match nsisSysVar "$COMMONFILES32" +syn match nsisSysVar "$COMMONFILES64" syn match nsisSysVar "$DESKTOP" syn match nsisSysVar "$EXEDIR" +syn match nsisSysVar "$EXEFILE" +syn match nsisSysVar "$EXEPATH" +syn match nsisSysVar "${NSISDIR}" syn match nsisSysVar "$WINDIR" syn match nsisSysVar "$SYSDIR" syn match nsisSysVar "$TEMP" @@ -54,170 +74,515 @@ syn match nsisSysVar "$STARTMENU" syn match nsisSysVar "$SMPROGRAMS" syn match nsisSysVar "$SMSTARTUP" syn match nsisSysVar "$QUICKLAUNCH" +syn match nsisSysVar "$DOCUMENTS" +syn match nsisSysVar "$SENDTO" +syn match nsisSysVar "$RECENT" +syn match nsisSysVar "$FAVORITES" +syn match nsisSysVar "$MUSIC" +syn match nsisSysVar "$PICTURES" +syn match nsisSysVar "$VIDEOS" +syn match nsisSysVar "$NETHOOD" +syn match nsisSysVar "$FONTS" +syn match nsisSysVar "$TEMPLATES" +syn match nsisSysVar "$APPDATA" +syn match nsisSysVar "$LOCALAPPDATA" +syn match nsisSysVar "$PRINTHOOD" +syn match nsisSysVar "$INTERNET_CACHE" +syn match nsisSysVar "$COOKIES" +syn match nsisSysVar "$HISTORY" +syn match nsisSysVar "$PROFILE" +syn match nsisSysVar "$ADMINTOOLS" +syn match nsisSysVar "$RESOURCES" +syn match nsisSysVar "$RESOURCES_LOCALIZED" +syn match nsisSysVar "$CDBURN_AREA" syn match nsisSysVar "$HWNDPARENT" +syn match nsisSysVar "$PLUGINSDIR" syn match nsisSysVar "$\\r" syn match nsisSysVar "$\\n" +syn match nsisSysVar "$\\t" syn match nsisSysVar "$\$" +syn match nsisSysVar "$\\["'`]" -"STRINGS -syn region nsisString start=/"/ skip=/'\|`/ end=/"/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry -syn region nsisString start=/'/ skip=/"\|`/ end=/'/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry -syn region nsisString start=/`/ skip=/"\|'/ end=/`/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry +"LABELS (4.3) +syn match nsisLocalLabel contained "[^-+!$0-9;#. \t/*][^ \t:;#]*:\ze\%($\|[ \t;#]\|\/\*\)" +syn match nsisGlobalLabel contained "\.[^-+!$0-9;# \t/*][^ \t:;#]*:\ze\%($\|[ \t;#]\|\/\*\)" "CONSTANTS -syn keyword nsisBoolean true false on off - -syn keyword nsisAttribOptions hide show nevershow auto force try ifnewer normal silent silentlog -syn keyword nsisAttribOptions smooth colored SET CUR END RO none listonly textonly both current all -syn keyword nsisAttribOptions zlib bzip2 lzma - -syn match nsisAttribOptions '\/NOCUSTOM' -syn match nsisAttribOptions '\/CUSTOMSTRING' -syn match nsisAttribOptions '\/COMPONENTSONLYONCUSTOM' -syn match nsisAttribOptions '\/windows' -syn match nsisAttribOptions '\/r' -syn match nsisAttribOptions '\/oname' -syn match nsisAttribOptions '\/REBOOTOK' -syn match nsisAttribOptions '\/SILENT' -syn match nsisAttribOptions '\/FILESONLY' -syn match nsisAttribOptions '\/SHORT' - -syn keyword nsisExecShell SW_SHOWNORMAL SW_SHOWMAXIMIZED SW_SHOWMINIMIZED - -syn keyword nsisRegistry HKCR HKLM HKCU HKU HKCC HKDD HKPD -syn keyword nsisRegistry HKEY_CLASSES_ROOT HKEY_LOCAL_MACHINE HKEY_CURRENT_USER HKEY_USERS -syn keyword nsisRegistry HKEY_CURRENT_CONFIG HKEY_DYN_DATA HKEY_PERFORMANCE_DATA - -syn keyword nsisFileAttrib NORMAL ARCHIVE HIDDEN OFFLINE READONLY SYSTEM TEMPORARY -syn keyword nsisFileAttrib FILE_ATTRIBUTE_NORMAL FILE_ATTRIBUTE_ARCHIVE FILE_ATTRIBUTE_HIDDEN -syn keyword nsisFileAttrib FILE_ATTRIBUTE_OFFLINE FILE_ATTRIBUTE_READONLY FILE_ATTRIBUTE_SYSTEM -syn keyword nsisFileAttrib FILE_ATTRIBUTE_TEMPORARY - -syn keyword nsisMessageBox MB_OK MB_OKCANCEL MB_ABORTRETRYIGNORE MB_RETRYCANCEL MB_YESNO MB_YESNOCANCEL -syn keyword nsisMessageBox MB_ICONEXCLAMATION MB_ICONINFORMATION MB_ICONQUESTION MB_ICONSTOP -syn keyword nsisMessageBox MB_TOPMOST MB_SETFOREGROUND MB_RIGHT -syn keyword nsisMessageBox MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3 MB_DEFBUTTON4 -syn keyword nsisMessageBox IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES - -syn match nsisNumber "\<[^0]\d*\>" -syn match nsisNumber "\<0x\x\+\>" -syn match nsisNumber "\<0\o*\>" +syn keyword nsisBoolean contained true false +syn keyword nsisOnOff contained on off + +syn keyword nsisRegistry contained HKCR HKLM HKCU HKU HKCC HKDD HKPD SHCTX +syn keyword nsisRegistry contained HKCR32 HKCR64 HKCU32 HKCU64 HKLM32 HKLM64 +syn keyword nsisRegistry contained HKEY_CLASSES_ROOT HKEY_LOCAL_MACHINE HKEY_CURRENT_USER HKEY_USERS +syn keyword nsisRegistry contained HKEY_CLASSES_ROOT32 HKEY_CLASSES_ROOT64 +syn keyword nsisRegistry contained HKEY_CURRENT_USER32 HKEY_CURRENT_USER64 +syn keyword nsisRegistry contained HKEY_LOCAL_MACHINE32 HKEY_LOCAL_MACHINE64 +syn keyword nsisRegistry contained HKEY_CURRENT_CONFIG HKEY_DYN_DATA HKEY_PERFORMANCE_DATA +syn keyword nsisRegistry contained SHELL_CONTEXT + + +" common options +syn cluster nsisAnyOpt contains=nsisComment,nsisLineContinuation,nsisPreprocSubst,nsisPreprocLangStr,nsisPreprocEnvVar,nsisUserVar,nsisSysVar,nsisString,nsisNumber +syn region nsisBooleanOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisBoolean +syn region nsisOnOffOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisOnOff +syn region nsisLangOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisLangKwd +syn match nsisLangKwd contained "/LANG\>" +syn region nsisFontOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFontKwd +syn match nsisFontKwd contained "/\%(ITALIC\|UNDERLINE\|STRIKE\)\>" + +"STATEMENTS - pages (4.5) +syn keyword nsisStatement contained Page UninstPage nextgroup=nsisPageOpt skipwhite +syn region nsisPageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPageKwd +syn keyword nsisPageKwd contained custom license components directory instfiles uninstConfirm +syn match nsisPageKwd contained "/ENABLECANCEL\>" + +syn keyword nsisStatement contained PageEx nextgroup=nsisPageExOpt skipwhite +syn region nsisPageExOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPageExKwd +syn match nsisPageExKwd contained "\<\%(un\.\)\?\%(custom\|license\|components\|directory\|instfiles\|uninstConfirm\)\>" + +syn keyword nsisStatement contained PageExEnd PageCallbacks + +"STATEMENTS - sections (4.6.1) +syn keyword nsisStatement contained AddSize SectionEnd SectionGroupEnd + +syn keyword nsisStatement contained Section nextgroup=nsisSectionOpt skipwhite +syn region nsisSectionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSectionKwd +syn match nsisSectionKwd contained "/o\>" + +syn keyword nsisStatement contained SectionIn nextgroup=nsisSectionInOpt skipwhite +syn region nsisSectionInOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSectionInKwd +syn keyword nsisSectionInKwd contained RO + +syn keyword nsisStatement contained SectionGroup nextgroup=nsisSectionGroupOpt skipwhite +syn region nsisSectionGroupOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSectionGroupKwd +syn match nsisSectionGroupKwd contained "/e\>" + +"STATEMENTS - functions (4.7.1) +syn keyword nsisStatement contained Function FunctionEnd + + +"STATEMENTS - LogicLib.nsh +syn match nsisStatement "${If}" +syn match nsisStatement "${IfNot}" +syn match nsisStatement "${Unless}" +syn match nsisStatement "${ElseIf}" +syn match nsisStatement "${ElseIfNot}" +syn match nsisStatement "${ElseUnless}" +syn match nsisStatement "${Else}" +syn match nsisStatement "${EndIf}" +syn match nsisStatement "${EndUnless}" +syn match nsisStatement "${AndIf}" +syn match nsisStatement "${AndIfNot}" +syn match nsisStatement "${AndUnless}" +syn match nsisStatement "${OrIf}" +syn match nsisStatement "${OrIfNot}" +syn match nsisStatement "${OrUnless}" +syn match nsisStatement "${IfThen}" +syn match nsisStatement "${IfNotThen}" +syn match nsisStatement "${||\?}" nextgroup=@nsisPseudoStatement skipwhite +syn match nsisStatement "${IfCmd}" nextgroup=@nsisPseudoStatement skipwhite +syn match nsisStatement "${Select}" +syn match nsisStatement "${Case}" +syn match nsisStatement "${Case[2-5]}" +syn match nsisStatement "${CaseElse}" +syn match nsisStatement "${Default}" +syn match nsisStatement "${EndSelect}" +syn match nsisStatement "${Switch}" +syn match nsisStatement "${EndSwitch}" +syn match nsisStatement "${Break}" +syn match nsisStatement "${Do}" +syn match nsisStatement "${DoWhile}" +syn match nsisStatement "${DoUntil}" +syn match nsisStatement "${ExitDo}" +syn match nsisStatement "${Continue}" +syn match nsisStatement "${Loop}" +syn match nsisStatement "${LoopWhile}" +syn match nsisStatement "${LoopUntil}" +syn match nsisStatement "${For}" +syn match nsisStatement "${ForEach}" +syn match nsisStatement "${ExitFor}" +syn match nsisStatement "${Next}" +"STATEMENTS - Memento.nsh +syn match nsisStatement "${MementoSection}" +syn match nsisStatement "${MementoSectionEnd}" + + +"USER VARIABLES (4.2.1) +syn keyword nsisInstruction contained Var nextgroup=nsisVarOpt skipwhite +syn region nsisVarOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisVarKwd +syn match nsisVarKwd contained "/GLOBAL\>" + +"INSTALLER ATTRIBUTES (4.8.1) +syn keyword nsisAttribute contained Caption ChangeUI CheckBitmap CompletedText ComponentText +syn keyword nsisAttribute contained DetailsButtonText DirText DirVar +syn keyword nsisAttribute contained FileErrorText Icon InstallButtonText +syn keyword nsisAttribute contained InstallDir InstProgressFlags +syn keyword nsisAttribute contained LicenseData LicenseText +syn keyword nsisAttribute contained MiscButtonText Name OutFile +syn keyword nsisAttribute contained SpaceTexts SubCaption UninstallButtonText UninstallCaption +syn keyword nsisAttribute contained UninstallIcon UninstallSubCaption UninstallText + +syn keyword nsisAttribute contained AddBrandingImage nextgroup=nsisAddBrandingImageOpt skipwhite +syn region nsisAddBrandingImageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisAddBrandingImageKwd +syn keyword nsisAddBrandingImageKwd contained left right top bottom width height + +syn keyword nsisAttribute contained nextgroup=nsisBooleanOpt skipwhite + \ AllowRootDirInstall AutoCloseWindow + +syn keyword nsisAttribute contained BGFont nextgroup=nsisFontOpt skipwhite + +syn keyword nsisAttribute contained BGGradient nextgroup=nsisBGGradientOpt skipwhite +syn region nsisBGGradientOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisBGGradientKwd +syn keyword nsisBGGradientKwd contained off + +syn keyword nsisAttribute contained BrandingText nextgroup=nsisBrandingTextOpt skipwhite +syn region nsisBrandingTextOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisBrandingTextKwd +syn match nsisBrandingTextKwd contained "/TRIM\%(LEFT\|RIGHT\|CENTER\)\>" + +syn keyword nsisAttribute contained CRCCheck nextgroup=nsisCRCCheckOpt skipwhite +syn region nsisCRCCheckOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisCRCCheckKwd +syn keyword nsisCRCCheckKwd contained on off force + +syn keyword nsisAttribute contained DirVerify nextgroup=nsisDirVerifyOpt skipwhite +syn region nsisDirVerifyOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDirVerifyKwd +syn keyword nsisDirVerifyKwd contained auto leave + +syn keyword nsisAttribute contained InstallColors nextgroup=nsisInstallColorsOpt skipwhite +syn region nsisInstallColorsOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisInstallColorsKwd +syn match nsisInstallColorsKwd contained "/windows\>" + +syn keyword nsisAttribute contained InstallDirRegKey nextgroup=nsisRegistryOpt skipwhite + +syn keyword nsisAttribute contained InstType nextgroup=nsisInstTypeOpt skipwhite +syn region nsisInstTypeOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisInstTypeKwd +syn match nsisInstTypeKwd contained "/\%(NOCUSTOM\|CUSTOMSTRING\|COMPONENTSONLYONCUSTOM\)\>" + +syn keyword nsisAttribute contained LicenseBkColor nextgroup=nsisLicenseBkColorOpt skipwhite +syn region nsisLicenseBkColorOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisLicenseBkColorKwd +syn match nsisLicenseBkColorKwd contained "/\%(gray\|windows\)\>" + +syn keyword nsisAttribute contained LicenseForceSelection nextgroup=nsisLicenseForceSelectionOpt skipwhite +syn region nsisLicenseForceSelectionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisLicenseForceSelectionKwd +syn keyword nsisLicenseForceSelectionKwd contained checkbox radiobuttons off + +syn keyword nsisAttribute contained ManifestDPIAware nextgroup=nsisManifestDPIAwareOpt skipwhite +syn region nsisManifestDPIAwareOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisManifestDPIAwareKwd +syn keyword nsisManifestDPIAwareKwd contained notset true false + +syn keyword nsisAttribute contained ManifestSupportedOS nextgroup=nsisManifestSupportedOSOpt skipwhite +syn region nsisManifestSupportedOSOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisManifestSupportedOSKwd +syn match nsisManifestSupportedOSKwd contained "\<\%(none\|all\|WinVista\|Win7\|Win8\|Win8\.1\|Win10\)\>" + +syn keyword nsisAttribute contained RequestExecutionLevel nextgroup=nsisRequestExecutionLevelOpt skipwhite +syn region nsisRequestExecutionLevelOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRequestExecutionLevelKwd +syn keyword nsisRequestExecutionLevelKwd contained none user highest admin + +syn keyword nsisAttribute contained SetFont nextgroup=nsisLangOpt skipwhite + +syn keyword nsisAttribute contained nextgroup=nsisShowInstDetailsOpt skipwhite + \ ShowInstDetails ShowUninstDetails +syn region nsisShowInstDetailsOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisShowInstDetailsKwd +syn keyword nsisShowInstDetailsKwd contained hide show nevershow + +syn keyword nsisAttribute contained SilentInstall nextgroup=nsisSilentInstallOpt skipwhite +syn region nsisSilentInstallOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSilentInstallKwd +syn keyword nsisSilentInstallKwd contained normal silent silentlog + +syn keyword nsisAttribute contained SilentUnInstall nextgroup=nsisSilentUnInstallOpt skipwhite +syn region nsisSilentUnInstallOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSilentUnInstallKwd +syn keyword nsisSilentUnInstallKwd contained normal silent + +syn keyword nsisAttribute contained nextgroup=nsisOnOffOpt skipwhite + \ WindowIcon XPStyle + +"COMPILER FLAGS (4.8.2) +syn keyword nsisCompiler contained nextgroup=nsisOnOffOpt skipwhite + \ AllowSkipFiles SetDatablockOptimize SetDateSave + +syn keyword nsisCompiler contained FileBufSize SetCompressorDictSize + +syn keyword nsisCompiler contained SetCompress nextgroup=nsisSetCompressOpt skipwhite +syn region nsisSetCompressOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetCompressKwd +syn keyword nsisSetCompressKwd contained auto force off + +syn keyword nsisCompiler contained SetCompressor nextgroup=nsisSetCompressorOpt skipwhite +syn region nsisSetCompressorOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetCompressorKwd +syn keyword nsisSetCompressorKwd contained zlib bzip2 lzma +syn match nsisSetCompressorKwd contained "/\%(SOLID\|FINAL\)" + +syn keyword nsisCompiler contained SetOverwrite nextgroup=nsisSetOverwriteOpt skipwhite +syn region nsisSetOverwriteOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetOverwriteKwd +syn keyword nsisSetOverwriteKwd contained on off try ifnewer ifdiff lastused + +syn keyword nsisCompiler contained Unicode nextgroup=nsisBooleanOpt skipwhite + +"VERSION INFORMATION (4.8.3) +syn keyword nsisVersionInfo contained VIAddVersionKey nextgroup=nsisLangOpt skipwhite + +syn keyword nsisVersionInfo contained VIProductVersion VIFileVersion + + +"FUNCTIONS - basic (4.9.1) +syn keyword nsisInstruction contained Delete Rename nextgroup=nsisDeleteOpt skipwhite +syn region nsisDeleteOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDeleteKwd +syn match nsisDeleteKwd contained "/REBOOTOK\>" + +syn keyword nsisInstruction contained Exec ExecWait SetOutPath + +syn keyword nsisInstruction contained ExecShell ExecShellWait nextgroup=nsisExecShellOpt skipwhite +syn region nsisExecShellOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisExecShellKwd +syn keyword nsisExecShellKwd contained SW_SHOWDEFAULT SW_SHOWNORMAL SW_SHOWMAXIMIZED SW_SHOWMINIMIZED SW_HIDE +syn match nsisExecShellKwd contained "/INVOKEIDLIST\>" + +syn keyword nsisInstruction contained File nextgroup=nsisFileOpt skipwhite +syn region nsisFileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFileKwd +syn match nsisFileKwd contained "/\%(nonfatal\|[arx]\|oname\)\>" + +syn keyword nsisInstruction contained ReserveFile nextgroup=nsisReserveFileOpt skipwhite +syn region nsisReserveFileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisReserveFileKwd +syn match nsisReserveFileKwd contained "/\%(nonfatal\|[rx]\|plugin\)\>" +syn keyword nsisInstruction contained RMDir nextgroup=nsisRMDirOpt skipwhite +syn region nsisRMDirOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRMDirKwd +syn match nsisRMDirKwd contained "/\%(REBOOTOK\|r\)\>" -"INSTALLER ATTRIBUTES - General installer configuration -syn keyword nsisAttribute OutFile Name Caption SubCaption BrandingText Icon -syn keyword nsisAttribute WindowIcon BGGradient SilentInstall SilentUnInstall -syn keyword nsisAttribute CRCCheck MiscButtonText InstallButtonText FileErrorText -"INSTALLER ATTRIBUTES - Install directory configuration -syn keyword nsisAttribute InstallDir InstallDirRegKey +"FUNCTIONS - registry & ini (4.9.2) +syn keyword nsisInstruction contained DeleteINISec DeleteINIStr FlushINI ReadINIStr WriteINIStr +syn keyword nsisInstruction contained ExpandEnvStrings ReadEnvStr -"INSTALLER ATTRIBUTES - License page configuration -syn keyword nsisAttribute LicenseText LicenseData +syn keyword nsisInstruction contained DeleteRegKey nextgroup=nsisDeleteRegKeyOpt skipwhite +syn region nsisDeleteRegKeyOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDeleteRegKeyKwd,nsisRegistry +syn match nsisDeleteRegKeyKwd contained "/ifempty\>" -"INSTALLER ATTRIBUTES - Component page configuration -syn keyword nsisAttribute ComponentText InstType EnabledBitmap DisabledBitmap SpaceTexts +syn keyword nsisInstruction contained nextgroup=nsisRegistryOpt skipwhite + \ DeleteRegValue EnumRegKey EnumRegValue ReadRegDWORD ReadRegStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr +syn region nsisRegistryOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRegistry -"INSTALLER ATTRIBUTES - Directory page configuration -syn keyword nsisAttribute DirShow DirText AllowRootDirInstall +syn keyword nsisInstruction contained WriteRegMultiStr nextgroup=nsisWriteRegMultiStrOpt skipwhite +syn region nsisWriteRegMultiStrOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisRegistry,nsisWriteRegMultiStrKwd +syn match nsisWriteRegMultiStrKwd contained "/REGEDIT5\>" -"INSTALLER ATTRIBUTES - Install page configuration -syn keyword nsisAttribute InstallColors InstProgressFlags AutoCloseWindow -syn keyword nsisAttribute ShowInstDetails DetailsButtonText CompletedText +syn keyword nsisInstruction contained SetRegView nextgroup=nsisSetRegViewOpt skipwhite +syn region nsisSetRegViewOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetRegViewKwd +syn keyword nsisSetRegViewKwd contained default lastused -"INSTALLER ATTRIBUTES - Uninstall configuration -syn keyword nsisAttribute UninstallText UninstallIcon UninstallCaption -syn keyword nsisAttribute UninstallSubCaption ShowUninstDetails UninstallButtonText +"FUNCTIONS - general purpose (4.9.3) +syn keyword nsisInstruction contained CallInstDLL CreateDirectory GetDLLVersion +syn keyword nsisInstruction contained GetDLLVersionLocal GetFileTime GetFileTimeLocal +syn keyword nsisInstruction contained GetTempFileName SearchPath RegDLL UnRegDLL -"COMPILER ATTRIBUTES -syn keyword nsisCompiler SetOverwrite SetCompress SetCompressor SetDatablockOptimize SetDateSave +syn keyword nsisInstruction contained CopyFiles nextgroup=nsisCopyFilesOpt skipwhite +syn region nsisCopyFilesOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisCopyFilesKwd +syn match nsisCopyFilesKwd contained "/\%(SILENT\|FILESONLY\)\>" +syn keyword nsisInstruction contained CreateShortcut nextgroup=nsisCreateShortcutOpt skipwhite +syn region nsisCreateShortcutOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisCreateShortcutKwd +syn match nsisCreateShortcutKwd contained "/NoWorkingDir\>" -"FUNCTIONS - general purpose -syn keyword nsisInstruction SetOutPath File Exec ExecWait ExecShell -syn keyword nsisInstruction Rename Delete RMDir +syn keyword nsisInstruction contained GetFullPathName nextgroup=nsisGetFullPathNameOpt skipwhite +syn region nsisGetFullPathNameOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisGetFullPathNameKwd +syn match nsisGetFullPathNameKwd contained "/SHORT\>" -"FUNCTIONS - registry & ini -syn keyword nsisInstruction WriteRegStr WriteRegExpandStr WriteRegDWORD WriteRegBin -syn keyword nsisInstruction WriteINIStr ReadRegStr ReadRegDWORD ReadINIStr ReadEnvStr -syn keyword nsisInstruction ExpandEnvStrings DeleteRegValue DeleteRegKey EnumRegKey -syn keyword nsisInstruction EnumRegValue DeleteINISec DeleteINIStr +syn keyword nsisInstruction contained SetFileAttributes nextgroup=nsisSetFileAttributesOpt skipwhite +syn region nsisSetFileAttributesOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFileAttrib +syn keyword nsisFileAttrib contained NORMAL ARCHIVE HIDDEN OFFLINE READONLY SYSTEM TEMPORARY +syn keyword nsisFileAttrib contained FILE_ATTRIBUTE_NORMAL FILE_ATTRIBUTE_ARCHIVE FILE_ATTRIBUTE_HIDDEN +syn keyword nsisFileAttrib contained FILE_ATTRIBUTE_OFFLINE FILE_ATTRIBUTE_READONLY FILE_ATTRIBUTE_SYSTEM +syn keyword nsisFileAttrib contained FILE_ATTRIBUTE_TEMPORARY -"FUNCTIONS - general purpose, advanced -syn keyword nsisInstruction CreateDirectory CopyFiles SetFileAttributes CreateShortCut -syn keyword nsisInstruction GetFullPathName SearchPath GetTempFileName CallInstDLL -syn keyword nsisInstruction RegDLL UnRegDLL GetDLLVersion GetDLLVersionLocal -syn keyword nsisInstruction GetFileTime GetFileTimeLocal +"FUNCTIONS - Flow Control (4.9.4) +syn keyword nsisInstruction contained Abort Call ClearErrors GetCurrentAddress +syn keyword nsisInstruction contained GetFunctionAddress GetLabelAddress Goto +syn keyword nsisInstruction contained IfAbort IfErrors IfFileExists IfRebootFlag IfSilent +syn keyword nsisInstruction contained IntCmp IntCmpU Int64Cmp Int64CmpU IntPtrCmp IntPtrCmpU +syn keyword nsisInstruction contained Return Quit SetErrors StrCmp StrCmpS -"FUNCTIONS - Branching, flow control, error checking, user interaction, etc instructions -syn keyword nsisInstruction Goto Call Return IfErrors ClearErrors SetErrors FindWindow -syn keyword nsisInstruction SendMessage IsWindow IfFileExists MessageBox StrCmp -syn keyword nsisInstruction IntCmp IntCmpU Abort Quit GetFunctionAddress GetLabelAddress -syn keyword nsisInstruction GetCurrentAddress +syn keyword nsisInstruction contained MessageBox nextgroup=nsisMessageBoxOpt skipwhite +syn region nsisMessageBoxOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisMessageBox +syn keyword nsisMessageBox contained MB_OK MB_OKCANCEL MB_ABORTRETRYIGNORE MB_RETRYCANCEL MB_YESNO MB_YESNOCANCEL +syn keyword nsisMessageBox contained MB_ICONEXCLAMATION MB_ICONINFORMATION MB_ICONQUESTION MB_ICONSTOP MB_USERICON +syn keyword nsisMessageBox contained MB_TOPMOST MB_SETFOREGROUND MB_RIGHT MB_RTLREADING +syn keyword nsisMessageBox contained MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3 MB_DEFBUTTON4 +syn keyword nsisMessageBox contained IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES +syn match nsisMessageBox contained "/SD\>" -"FUNCTIONS - File and directory i/o instructions -syn keyword nsisInstruction FindFirst FindNext FindClose FileOpen FileClose FileRead -syn keyword nsisInstruction FileWrite FileReadByte FileWriteByte FileSeek +"FUNCTIONS - File and directory i/o instructions (4.9.5) +syn keyword nsisInstruction contained FileClose FileOpen FileRead FileReadUTF16LE +syn keyword nsisInstruction contained FileReadByte FileReadWord FileSeek FileWrite +syn keyword nsisInstruction contained FileWriteByte FileWriteWord +syn keyword nsisInstruction contained FindClose FindFirst FindNext -"FUNCTIONS - Misc instructions -syn keyword nsisInstruction SetDetailsView SetDetailsPrint SetAutoClose DetailPrint -syn keyword nsisInstruction Sleep BringToFront HideWindow SetShellVarContext +syn keyword nsisInstruction contained FileWriteUTF16LE nextgroup=nsisFileWriteUTF16LEOpt skipwhite +syn region nsisFileWriteUTF16LEOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisFileWriteUTF16LEKwd +syn match nsisFileWriteUTF16LEKwd contained "/BOM\>" -"FUNCTIONS - String manipulation support -syn keyword nsisInstruction StrCpy StrLen +"FUNCTIONS - Uninstaller instructions (4.9.6) +syn keyword nsisInstruction contained WriteUninstaller -"FUNCTIONS - Stack support -syn keyword nsisInstruction Push Pop Exch +"FUNCTIONS - Misc instructions (4.9.7) +syn keyword nsisInstruction contained GetErrorLevel GetInstDirError InitPluginsDir Nop +syn keyword nsisInstruction contained SetErrorLevel Sleep -"FUNCTIONS - Integer manipulation support -syn keyword nsisInstruction IntOp IntFmt +syn keyword nsisInstruction contained SetShellVarContext nextgroup=nsisSetShellVarContextOpt skipwhite +syn region nsisSetShellVarContextOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetShellVarContextKwd +syn keyword nsisSetShellVarContextKwd contained current all -"FUNCTIONS - Rebooting support -syn keyword nsisInstruction Reboot IfRebootFlag SetRebootFlag +"FUNCTIONS - String manipulation support (4.9.8) +syn keyword nsisInstruction contained StrCpy StrLen -"FUNCTIONS - Uninstaller instructions -syn keyword nsisInstruction WriteUninstaller +"FUNCTIONS - Stack support (4.9.9) +syn keyword nsisInstruction contained Exch Push Pop -"FUNCTIONS - Install logging instructions -syn keyword nsisInstruction LogSet LogText +"FUNCTIONS - Integer manipulation support (4.9.10) +syn keyword nsisInstruction contained IntFmt Int64Fmt IntOp IntPtrOp -"FUNCTIONS - Section management instructions -syn keyword nsisInstruction SectionSetFlags SectionGetFlags SectionSetText -syn keyword nsisInstruction SectionGetText +"FUNCTIONS - Rebooting support (4.9.11) +syn keyword nsisInstruction contained Reboot SetRebootFlag +"FUNCTIONS - Install logging instructions (4.9.12) +syn keyword nsisInstruction contained LogSet nextgroup=nsisOnOffOpt skipwhite +syn keyword nsisInstruction contained LogText -"SPECIAL FUNCTIONS - install +"FUNCTIONS - Section management instructions (4.9.13) +syn keyword nsisInstruction contained SectionSetFlags SectionGetFlags SectionSetText +syn keyword nsisInstruction contained SectionGetText SectionSetInstTypes SectionGetInstTypes +syn keyword nsisInstruction contained SectionSetSize SectionGetSize SetCurInstType GetCurInstType +syn keyword nsisInstruction contained InstTypeSetText InstTypeGetText + +"FUNCTIONS - User Interface Instructions (4.9.14) +syn keyword nsisInstruction contained BringToFront DetailPrint EnableWindow +syn keyword nsisInstruction contained FindWindow GetDlgItem HideWindow IsWindow +syn keyword nsisInstruction contained ShowWindow + +syn keyword nsisInstruction contained CreateFont nextgroup=nsisFontOpt skipwhite + +syn keyword nsisInstruction contained nextgroup=nsisBooleanOpt skipwhite + \ LockWindow SetAutoClose + +syn keyword nsisInstruction contained SendMessage nextgroup=nsisSendMessageOpt skipwhite +syn region nsisSendMessageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSendMessageKwd +syn match nsisSendMessageKwd contained "/TIMEOUT\>" + +syn keyword nsisInstruction contained SetBrandingImage nextgroup=nsisSetBrandingImageOpt skipwhite +syn region nsisSetBrandingImageOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetBrandingImageKwd +syn match nsisSetBrandingImageKwd contained "/\%(IMGID\|RESIZETOFIT\)\>" + +syn keyword nsisInstruction contained SetDetailsView nextgroup=nsisSetDetailsViewOpt skipwhite +syn region nsisSetDetailsViewOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetDetailsViewKwd +syn keyword nsisSetDetailsViewKwd contained show hide + +syn keyword nsisInstruction contained SetDetailsPrint nextgroup=nsisSetDetailsPrintOpt skipwhite +syn region nsisSetDetailsPrintOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetDetailsPrintKwd +syn keyword nsisSetDetailsPrintKwd contained none listonly textonly both lastused + +syn keyword nsisInstruction contained SetCtlColors nextgroup=nsisSetCtlColorsOpt skipwhite +syn region nsisSetCtlColorsOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetCtlColorsKwd +syn match nsisSetCtlColorsKwd contained "/BRANDING\>" + +syn keyword nsisInstruction contained SetSilent nextgroup=nsisSetSilentOpt skipwhite +syn region nsisSetSilentOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSetSilentKwd +syn keyword nsisSetSilentKwd contained silent normal + + +"FUNCTIONS - Multiple Languages Instructions (4.9.15) +syn keyword nsisInstruction contained LoadLanguageFile LangString LicenseLangString + + +"SPECIAL FUNCTIONS - install (4.7.2.1) +syn match nsisCallback "\.onGUIInit" syn match nsisCallback "\.onInit" -syn match nsisCallback "\.onUserAbort" -syn match nsisCallback "\.onInstSuccess" syn match nsisCallback "\.onInstFailed" -syn match nsisCallback "\.onVerifyInstDir" -syn match nsisCallback "\.onNextPage" -syn match nsisCallback "\.onPrevPage" +syn match nsisCallback "\.onInstSuccess" +syn match nsisCallback "\.onGUIEnd" +syn match nsisCallback "\.onMouseOverSection" +syn match nsisCallback "\.onRebootFailed" syn match nsisCallback "\.onSelChange" +syn match nsisCallback "\.onUserAbort" +syn match nsisCallback "\.onVerifyInstDir" -"SPECIAL FUNCTIONS - uninstall +"SPECIAL FUNCTIONS - uninstall (4.7.2.2) +syn match nsisCallback "un\.onGUIInit" syn match nsisCallback "un\.onInit" +syn match nsisCallback "un\.onUninstFailed" +syn match nsisCallback "un\.onUninstSuccess" +syn match nsisCallback "un\.onGUIEnd" +syn match nsisCallback "un\.onRebootFailed" +syn match nsisCallback "un\.onSelChange" syn match nsisCallback "un\.onUserAbort" -syn match nsisCallback "un\.onInstSuccess" -syn match nsisCallback "un\.onInstFailed" -syn match nsisCallback "un\.onVerifyInstDir" -syn match nsisCallback "un\.onNextPage" -"STATEMENTS - sections -syn keyword nsisStatement Section SectionIn SectionEnd SectionDivider -syn keyword nsisStatement AddSize +"COMPILER UTILITY (5.1) +syn match nsisInclude contained "!include\>" nextgroup=nsisIncludeOpt skipwhite +syn region nsisIncludeOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisIncludeKwd +syn match nsisIncludeKwd contained "/\%(NONFATAL\|CHARSET\)\>" + +syn match nsisSystem contained "!addincludedir\>" + +syn match nsisSystem contained "!addplugindir\>" nextgroup=nsisAddplugindirOpt skipwhite +syn region nsisAddplugindirOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisAddplugindirKwd +syn match nsisAddplugindirKwd contained "/\%(x86-ansi\|x86-unicode\)\>" + +syn match nsisSystem contained "!appendfile\>" nextgroup=nsisAppendfileOpt skipwhite +syn region nsisAppendfileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisAppendfileKwd +syn match nsisAppendfileKwd contained "/\%(CHARSET\|RawNL\)\>" + +syn match nsisSystem contained "!cd\>" + +syn match nsisSystem contained "!delfile\>" nextgroup=nsisDelfileOpt skipwhite +syn region nsisDelfileOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDelfileKwd +syn match nsisDelfileKwd contained "/nonfatal\>" + +syn match nsisSystem contained "!echo\>" +syn match nsisSystem contained "!error\>" +syn match nsisSystem contained "!execute\>" +syn match nsisSystem contained "!makensis\>" +syn match nsisSystem contained "!packhdr\>" +syn match nsisSystem contained "!finalize\>" +syn match nsisSystem contained "!system\>" +syn match nsisSystem contained "!tempfile\>" +syn match nsisSystem contained "!getdllversion\>" +syn match nsisSystem contained "!gettlbversion\>" +syn match nsisSystem contained "!warning\>" + +syn match nsisSystem contained "!pragma\>" nextgroup=nsisPragmaOpt skipwhite +syn region nsisPragmaOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPragmaKwd +syn keyword nsisPragmaKwd contained enable disable default push pop + +syn match nsisSystem contained "!verbose\>" nextgroup=nsisVerboseOpt skipwhite +syn region nsisVerboseOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisVerboseKwd +syn keyword nsisVerboseKwd contained push pop + +"PREPROCESSOR (5.4) +syn match nsisDefine contained "!define\>" nextgroup=nsisDefineOpt skipwhite +syn region nsisDefineOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDefineKwd +syn match nsisDefineKwd contained "/\%(ifndef\|redef\|date\|utcdate\|math\|file\)\>" + +syn match nsisDefine contained "!undef\>" +syn match nsisPreCondit contained "!ifdef\>" +syn match nsisPreCondit contained "!ifndef\>" + +syn match nsisPreCondit contained "!if\>" nextgroup=nsisIfOpt skipwhite +syn region nsisIfOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisIfKwd +syn match nsisIfKwd contained "/FileExists\>" -"STATEMENTS - functions -syn keyword nsisStatement Function FunctionEnd +syn match nsisPreCondit contained "!ifmacrodef\>" +syn match nsisPreCondit contained "!ifmacrondef\>" +syn match nsisPreCondit contained "!else\>" +syn match nsisPreCondit contained "!endif\>" +syn match nsisMacro contained "!insertmacro\>" +syn match nsisMacro contained "!macro\>" +syn match nsisMacro contained "!macroend\>" +syn match nsisMacro contained "!macroundef\>" -"STATEMENTS - pages -syn keyword nsisStatement Page UninstPage PageEx PageExEnc PageCallbacks +syn match nsisMacro contained "!searchparse\>" nextgroup=nsisSearchparseOpt skipwhite +syn region nsisSearchparseOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSearchparseKwd +syn match nsisSearchparseKwd contained "/\%(ignorecase\|noerrors\|file\)\>" +syn match nsisMacro contained "!searchreplace\>" nextgroup=nsisSearchreplaceOpt skipwhite +syn region nsisSearchreplaceOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisSearchreplaceKwd +syn match nsisSearchreplaceKwd contained "/ignorecase\>" -"ERROR -syn keyword nsisError UninstallExeName " Define the default highlighting. @@ -225,32 +590,93 @@ syn keyword nsisError UninstallExeName hi def link nsisInstruction Function hi def link nsisComment Comment -hi def link nsisLocalLabel Label +hi def link nsisFirstComment Comment +hi def link nsisLocalLabel Label hi def link nsisGlobalLabel Label -hi def link nsisStatement Statement +hi def link nsisStatement Statement hi def link nsisString String hi def link nsisBoolean Boolean -hi def link nsisAttribOptions Constant -hi def link nsisExecShell Constant -hi def link nsisFileAttrib Constant -hi def link nsisMessageBox Constant -hi def link nsisRegistry Identifier +hi def link nsisOnOff Boolean +hi def link nsisFontKwd Constant +hi def link nsisLangKwd Constant +hi def link nsisPageKwd Constant +hi def link nsisPageExKwd Constant +hi def link nsisSectionKwd Constant +hi def link nsisSectionInKwd Constant +hi def link nsisSectionGroupKwd Constant +hi def link nsisVarKwd Constant +hi def link nsisAddBrandingImageKwd Constant +hi def link nsisBGGradientKwd Constant +hi def link nsisBrandingTextKwd Constant +hi def link nsisCRCCheckKwd Constant +hi def link nsisDirVerifyKwd Constant +hi def link nsisInstallColorsKwd Constant +hi def link nsisInstTypeKwd Constant +hi def link nsisLicenseBkColorKwd Constant +hi def link nsisLicenseForceSelectionKwd Constant +hi def link nsisManifestDPIAwareKwd Constant +hi def link nsisManifestSupportedOSKwd Constant +hi def link nsisRequestExecutionLevelKwd Constant +hi def link nsisShowInstDetailsKwd Constant +hi def link nsisSilentInstallKwd Constant +hi def link nsisSilentUnInstallKwd Constant +hi def link nsisSetCompressKwd Constant +hi def link nsisSetCompressorKwd Constant +hi def link nsisSetOverwriteKwd Constant +hi def link nsisDeleteKwd Constant +hi def link nsisExecShellKwd Constant +hi def link nsisFileKwd Constant +hi def link nsisReserveFileKwd Constant +hi def link nsisRMDirKwd Constant +hi def link nsisDeleteRegKeyKwd Constant +hi def link nsisWriteRegMultiStrKwd Constant +hi def link nsisSetRegViewKwd Constant +hi def link nsisCopyFilesKwd Constant +hi def link nsisCreateShortcutKwd Constant +hi def link nsisGetFullPathNameKwd Constant +hi def link nsisFileAttrib Constant +hi def link nsisMessageBox Constant +hi def link nsisFileWriteUTF16LEKwd Constant +hi def link nsisSetShellVarContextKwd Constant +hi def link nsisSendMessageKwd Constant +hi def link nsisSetBrandingImageKwd Constant +hi def link nsisSetDetailsViewKwd Constant +hi def link nsisSetDetailsPrintKwd Constant +hi def link nsisSetCtlColorsKwd Constant +hi def link nsisSetSilentKwd Constant +hi def link nsisRegistry Identifier hi def link nsisNumber Number hi def link nsisError Error hi def link nsisUserVar Identifier hi def link nsisSysVar Identifier -hi def link nsisAttribute Type -hi def link nsisCompiler Type +hi def link nsisAttribute Type +hi def link nsisCompiler Type +hi def link nsisVersionInfo Type hi def link nsisTodo Todo -hi def link nsisCallback Operator +hi def link nsisCallback Identifier " preprocessor commands hi def link nsisPreprocSubst PreProc +hi def link nsisPreprocLangStr PreProc +hi def link nsisPreprocEnvVar PreProc hi def link nsisDefine Define hi def link nsisMacro Macro -hi def link nsisPreCondit PreCondit +hi def link nsisPreCondit PreCondit hi def link nsisInclude Include hi def link nsisSystem PreProc +hi def link nsisLineContinuation Special +hi def link nsisIncludeKwd Constant +hi def link nsisAddplugindirKwd Constant +hi def link nsisAppendfileKwd Constant +hi def link nsisDelfileKwd Constant +hi def link nsisPragmaKwd Constant +hi def link nsisVerboseKwd Constant +hi def link nsisDefineKwd Constant +hi def link nsisIfKwd Constant +hi def link nsisSearchparseKwd Constant +hi def link nsisSearchreplaceKwd Constant let b:current_syntax = "nsis" +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/pf.vim b/runtime/syntax/pf.vim index 81add10e7e..b928dc4fbb 100644 --- a/runtime/syntax/pf.vim +++ b/runtime/syntax/pf.vim @@ -2,12 +2,13 @@ " Language: OpenBSD packet filter configuration (pf.conf) " Original Author: Camiel Dobbelaar <cd@sentia.nl> " Maintainer: Lauri Tirkkonen <lotheac@iki.fi> -" Last Change: 2016 Jul 06 +" Last Change: 2018 Jul 16 if exists("b:current_syntax") finish endif +let b:current_syntax = "pf" setlocal foldmethod=syntax syn iskeyword @,48-57,_,-,+ syn sync fromstart @@ -17,7 +18,7 @@ syn keyword pfCmd anchor antispoof block include match pass queue syn keyword pfCmd queue set table syn match pfCmd /^\s*load\sanchor\>/ syn keyword pfTodo TODO XXX contained -syn keyword pfWildAddr all any +syn keyword pfWildAddr any no-route urpf-failed self syn match pfComment /#.*$/ contains=pfTodo syn match pfCont /\\$/ syn match pfErrClose /}/ @@ -36,57 +37,6 @@ syn region pfList start=/{/ end=/}/ transparent contains=ALLBUT,pfErrClose,@pfN syn region pfString start=/"/ skip=/\\"/ end=/"/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar syn region pfString start=/'/ skip=/\\'/ end=/'/ contains=pfIPv4,pfIPv6,pfNetmask,pfTable,pfVar -syn keyword pfService 802-11-iapp Microsoft-SQL-Monitor -syn keyword pfService Microsoft-SQL-Server NeXTStep NextStep -syn keyword pfService afpovertcp afs3-bos afs3-callback afs3-errors -syn keyword pfService afs3-fileserver afs3-kaserver afs3-prserver -syn keyword pfService afs3-rmtsys afs3-update afs3-vlserver -syn keyword pfService afs3-volser amt-redir-tcp amt-redir-tls -syn keyword pfService amt-soap-http amt-soap-https asf-rmcp at-echo -syn keyword pfService at-nbp at-rtmp at-zis auth authentication -syn keyword pfService bfd-control bfd-echo bftp bgp bgpd biff bootpc -syn keyword pfService bootps canna cddb cddbp chargen chat cmd -syn keyword pfService cmip-agent cmip-man comsat conference -syn keyword pfService conserver courier csnet-ns cso-ns cvspserver -syn keyword pfService daap datametrics daytime dhcpd-sync -syn keyword pfService dhcpv6-client dhcpv6-server discard domain -syn keyword pfService echo efs eklogin ekshell ekshell2 epmap eppc -syn keyword pfService exec finger ftp ftp-data git gopher hostname -syn keyword pfService hostnames hprop http https hunt hylafax iapp -syn keyword pfService icb ident imap imap2 imap3 imaps ingreslock -syn keyword pfService ipp iprop ipsec-msft ipsec-nat-t ipx irc -syn keyword pfService isakmp iscsi isisd iso-tsap kauth kdc kerberos -syn keyword pfService kerberos-adm kerberos-iv kerberos-sec -syn keyword pfService kerberos_master kf kip klogin kpasswd kpop -syn keyword pfService krb524 krb_prop krbupdate krcmd kreg kshell kx -syn keyword pfService l2tp ldap ldaps ldp link login mail mdns -syn keyword pfService mdnsresponder microsoft-ds ms-sql-m ms-sql-s -syn keyword pfService msa msp mtp mysql name nameserver netbios-dgm -syn keyword pfService netbios-ns netbios-ssn netnews netplan netrjs -syn keyword pfService netstat netwall newdate nextstep nfs nfsd -syn keyword pfService nicname nnsp nntp ntalk ntp null openwebnet -syn keyword pfService ospf6d ospfapi ospfd photuris pop2 pop3 pop3pw -syn keyword pfService pop3s poppassd portmap postgresql postoffice -syn keyword pfService pptp presence printer prospero prospero-np -syn keyword pfService puppet pwdgen qotd quote radacct radius -syn keyword pfService radius-acct rdp readnews remotefs resource rfb -syn keyword pfService rfe rfs rfs_server ripd ripng rje rkinit rlp -syn keyword pfService routed router rpc rpcbind rsync rtelnet rtsp -syn keyword pfService sa-msg-port sane-port sftp shell sieve silc -syn keyword pfService sink sip smtp smtps smux snmp snmp-trap -syn keyword pfService snmptrap snpp socks source spamd spamd-cfg -syn keyword pfService spamd-sync spooler spop3 ssdp ssh submission -syn keyword pfService sunrpc supdup supfiledbg supfilesrv support -syn keyword pfService svn svrloc swat syslog syslog-tls systat -syn keyword pfService tacacs tacas+ talk tap tcpmux telnet tempo -syn keyword pfService tftp time timed timeserver timserver tsap -syn keyword pfService ttylink ttytst ub-dns-control ulistserv untp -syn keyword pfService usenet users uucp uucp-path uucpd vnc vxlan -syn keyword pfService wais webster who whod whois www x400 x400-snd -syn keyword pfService xcept xdmcp xmpp-bosh xmpp-client xmpp-server -syn keyword pfService z3950 zabbix-agent zabbix-trapper zebra -syn keyword pfService zebrasrv - hi def link pfCmd Statement hi def link pfComment Comment hi def link pfCont Statement @@ -103,4 +53,281 @@ hi def link pfVar Identifier hi def link pfVarAssign Identifier hi def link pfWildAddr Type -let b:current_syntax = "pf" +" from OpenBSD src/etc/services r1.95 +syn keyword pfService 802-11-iapp +syn keyword pfService Microsoft-SQL-Monitor +syn keyword pfService Microsoft-SQL-Server +syn keyword pfService NeXTStep +syn keyword pfService NextStep +syn keyword pfService afpovertcp +syn keyword pfService afs3-bos +syn keyword pfService afs3-callback +syn keyword pfService afs3-errors +syn keyword pfService afs3-fileserver +syn keyword pfService afs3-kaserver +syn keyword pfService afs3-prserver +syn keyword pfService afs3-rmtsys +syn keyword pfService afs3-update +syn keyword pfService afs3-vlserver +syn keyword pfService afs3-volser +syn keyword pfService amt-redir-tcp +syn keyword pfService amt-redir-tls +syn keyword pfService amt-soap-http +syn keyword pfService amt-soap-https +syn keyword pfService asf-rmcp +syn keyword pfService at-echo +syn keyword pfService at-nbp +syn keyword pfService at-rtmp +syn keyword pfService at-zis +syn keyword pfService auth +syn keyword pfService authentication +syn keyword pfService bfd-control +syn keyword pfService bfd-echo +syn keyword pfService bftp +syn keyword pfService bgp +syn keyword pfService bgpd +syn keyword pfService biff +syn keyword pfService bootpc +syn keyword pfService bootps +syn keyword pfService canna +syn keyword pfService cddb +syn keyword pfService cddbp +syn keyword pfService chargen +syn keyword pfService chat +syn keyword pfService cmd +syn keyword pfService cmip-agent +syn keyword pfService cmip-man +syn keyword pfService comsat +syn keyword pfService conference +syn keyword pfService conserver +syn keyword pfService courier +syn keyword pfService csnet-ns +syn keyword pfService cso-ns +syn keyword pfService cvspserver +syn keyword pfService daap +syn keyword pfService datametrics +syn keyword pfService daytime +syn keyword pfService dhcpd-sync +syn keyword pfService dhcpv6-client +syn keyword pfService dhcpv6-server +syn keyword pfService discard +syn keyword pfService domain +syn keyword pfService echo +syn keyword pfService efs +syn keyword pfService eklogin +syn keyword pfService ekshell +syn keyword pfService ekshell2 +syn keyword pfService epmap +syn keyword pfService eppc +syn keyword pfService exec +syn keyword pfService finger +syn keyword pfService ftp +syn keyword pfService ftp-data +syn keyword pfService git +syn keyword pfService gopher +syn keyword pfService gre-in-udp +syn keyword pfService gre-udp-dtls +syn keyword pfService hostname +syn keyword pfService hostnames +syn keyword pfService hprop +syn keyword pfService http +syn keyword pfService https +syn keyword pfService hunt +syn keyword pfService hylafax +syn keyword pfService iapp +syn keyword pfService icb +syn keyword pfService ident +syn keyword pfService imap +syn keyword pfService imap2 +syn keyword pfService imap3 +syn keyword pfService imaps +syn keyword pfService ingreslock +syn keyword pfService ipp +syn keyword pfService iprop +syn keyword pfService ipsec-msft +syn keyword pfService ipsec-nat-t +syn keyword pfService ipx +syn keyword pfService irc +syn keyword pfService isakmp +syn keyword pfService iscsi +syn keyword pfService isisd +syn keyword pfService iso-tsap +syn keyword pfService kauth +syn keyword pfService kdc +syn keyword pfService kerberos +syn keyword pfService kerberos-adm +syn keyword pfService kerberos-iv +syn keyword pfService kerberos-sec +syn keyword pfService kerberos_master +syn keyword pfService kf +syn keyword pfService kip +syn keyword pfService klogin +syn keyword pfService kpasswd +syn keyword pfService kpop +syn keyword pfService krb524 +syn keyword pfService krb_prop +syn keyword pfService krbupdate +syn keyword pfService krcmd +syn keyword pfService kreg +syn keyword pfService kshell +syn keyword pfService kx +syn keyword pfService l2tp +syn keyword pfService ldap +syn keyword pfService ldaps +syn keyword pfService ldp +syn keyword pfService link +syn keyword pfService login +syn keyword pfService mail +syn keyword pfService mdns +syn keyword pfService mdnsresponder +syn keyword pfService microsoft-ds +syn keyword pfService ms-sql-m +syn keyword pfService ms-sql-s +syn keyword pfService msa +syn keyword pfService msp +syn keyword pfService mtp +syn keyword pfService mysql +syn keyword pfService name +syn keyword pfService nameserver +syn keyword pfService netbios-dgm +syn keyword pfService netbios-ns +syn keyword pfService netbios-ssn +syn keyword pfService netnews +syn keyword pfService netplan +syn keyword pfService netrjs +syn keyword pfService netstat +syn keyword pfService netwall +syn keyword pfService newdate +syn keyword pfService nextstep +syn keyword pfService nfs +syn keyword pfService nfsd +syn keyword pfService nicname +syn keyword pfService nnsp +syn keyword pfService nntp +syn keyword pfService ntalk +syn keyword pfService ntp +syn keyword pfService null +syn keyword pfService openwebnet +syn keyword pfService ospf6d +syn keyword pfService ospfapi +syn keyword pfService ospfd +syn keyword pfService photuris +syn keyword pfService pop2 +syn keyword pfService pop3 +syn keyword pfService pop3pw +syn keyword pfService pop3s +syn keyword pfService poppassd +syn keyword pfService portmap +syn keyword pfService postgresql +syn keyword pfService postoffice +syn keyword pfService pptp +syn keyword pfService presence +syn keyword pfService printer +syn keyword pfService prospero +syn keyword pfService prospero-np +syn keyword pfService puppet +syn keyword pfService pwdgen +syn keyword pfService qotd +syn keyword pfService quote +syn keyword pfService radacct +syn keyword pfService radius +syn keyword pfService radius-acct +syn keyword pfService rdp +syn keyword pfService readnews +syn keyword pfService remotefs +syn keyword pfService resource +syn keyword pfService rfb +syn keyword pfService rfe +syn keyword pfService rfs +syn keyword pfService rfs_server +syn keyword pfService ripd +syn keyword pfService ripng +syn keyword pfService rje +syn keyword pfService rkinit +syn keyword pfService rlp +syn keyword pfService routed +syn keyword pfService router +syn keyword pfService rpc +syn keyword pfService rpcbind +syn keyword pfService rsync +syn keyword pfService rtelnet +syn keyword pfService rtsp +syn keyword pfService sa-msg-port +syn keyword pfService sane-port +syn keyword pfService sftp +syn keyword pfService shell +syn keyword pfService sieve +syn keyword pfService silc +syn keyword pfService sink +syn keyword pfService sip +syn keyword pfService smtp +syn keyword pfService smtps +syn keyword pfService smux +syn keyword pfService snmp +syn keyword pfService snmp-trap +syn keyword pfService snmptrap +syn keyword pfService snpp +syn keyword pfService socks +syn keyword pfService source +syn keyword pfService spamd +syn keyword pfService spamd-cfg +syn keyword pfService spamd-sync +syn keyword pfService spooler +syn keyword pfService spop3 +syn keyword pfService ssdp +syn keyword pfService ssh +syn keyword pfService submission +syn keyword pfService sunrpc +syn keyword pfService supdup +syn keyword pfService supfiledbg +syn keyword pfService supfilesrv +syn keyword pfService support +syn keyword pfService svn +syn keyword pfService svrloc +syn keyword pfService swat +syn keyword pfService syslog +syn keyword pfService syslog-tls +syn keyword pfService systat +syn keyword pfService tacacs +syn keyword pfService tacas+ +syn keyword pfService talk +syn keyword pfService tap +syn keyword pfService tcpmux +syn keyword pfService telnet +syn keyword pfService tempo +syn keyword pfService tftp +syn keyword pfService time +syn keyword pfService timed +syn keyword pfService timeserver +syn keyword pfService timserver +syn keyword pfService tsap +syn keyword pfService ttylink +syn keyword pfService ttytst +syn keyword pfService ub-dns-control +syn keyword pfService ulistserv +syn keyword pfService untp +syn keyword pfService usenet +syn keyword pfService users +syn keyword pfService uucp +syn keyword pfService uucp-path +syn keyword pfService uucpd +syn keyword pfService vnc +syn keyword pfService vxlan +syn keyword pfService wais +syn keyword pfService webster +syn keyword pfService who +syn keyword pfService whod +syn keyword pfService whois +syn keyword pfService www +syn keyword pfService x400 +syn keyword pfService x400-snd +syn keyword pfService xcept +syn keyword pfService xdmcp +syn keyword pfService xmpp-bosh +syn keyword pfService xmpp-client +syn keyword pfService xmpp-server +syn keyword pfService z3950 +syn keyword pfService zabbix-agent +syn keyword pfService zabbix-trapper +syn keyword pfService zebra +syn keyword pfService zebrasrv diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim index 6a81b8c631..5a7a2c3794 100644 --- a/runtime/syntax/php.vim +++ b/runtime/syntax/php.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: php PHP 3/4/5/7 " Maintainer: Jason Woofenden <jason@jasonwoof.com> -" Last Change: Jul 14, 2017 +" Last Change: Jun 20, 2018 " URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD " Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com> " Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> @@ -446,7 +446,7 @@ if exists("php_folding") && php_folding==1 syn match phpException "\(\s\|^\)catch\(\s\+.*}\)\@=" contained syn match phpException "\(\s\|^\)finally\(\s\+.*}\)\@=" contained - set foldmethod=syntax + setlocal foldmethod=syntax syn region phpFoldHtmlInside matchgroup=Delimiter start="?>" end="<?\(php\)\=" contained transparent contains=@htmlTop syn region phpFoldFunction matchgroup=Storageclass start="^\z(\s*\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\s\([^};]*$\)\@="rs=e-9 matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldHtmlInside,phpFCKeyword contained transparent fold extend syn region phpFoldFunction matchgroup=Define start="^function\s\([^};]*$\)\@=" matchgroup=Delimiter end="^}" contains=@phpClFunction,phpFoldHtmlInside contained transparent fold extend @@ -460,7 +460,7 @@ else syn keyword phpException catch throw try finally contained syn keyword phpStorageClass final global private protected public static contained if exists("php_folding") && php_folding==2 - set foldmethod=syntax + setlocal foldmethod=syntax syn region phpFoldHtmlInside matchgroup=Delimiter start="?>" end="<?\(php\)\=" contained transparent contains=@htmlTop syn region phpParent matchgroup=Delimiter start="{" end="}" contained contains=@phpClFunction,phpFoldHtmlInside transparent fold endif diff --git a/runtime/syntax/pike.vim b/runtime/syntax/pike.vim index ccd122c46c..2c34cb4f38 100644 --- a/runtime/syntax/pike.vim +++ b/runtime/syntax/pike.vim @@ -1,59 +1,184 @@ " Vim syntax file -" Language: Pike -" Maintainer: Francesco Chemolli <kinkie@kame.usr.dsi.unimi.it> -" Last Change: 2001 May 10 +" Language: Pike +" Maintainer: Stephen R. van den Berg <srb@cuci.nl> +" Maintainer of previous implementation: Francesco Chemolli <kinkie@kame.usr.dsi.unimi.it> +" Last Change: 2018 Jan 28 +" Version: 2.9 +" Remark: Derived from the C-syntax; fixed several bugs in the C-syntax +" Remark: and extended it with the Pike syntax. +" Remark: Includes a highlighter for all Pike types of parenthesis errors. +" Remark: Includes a highlighter for SQL on multiline strings. +" Remark: Includes a highlighter for any embedded Autodoc format. -" quit when a syntax file was already loaded +" Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") finish endif -" A bunch of useful C keywords -syn keyword pikeStatement goto break return continue -syn keyword pikeLabel case default -syn keyword pikeConditional if else switch -syn keyword pikeRepeat while for foreach do -syn keyword pikeStatement gauge destruct lambda inherit import typeof -syn keyword pikeException catch -syn keyword pikeType inline nomask private protected public static +let s:cpo_save = &cpo +set cpo&vim +" For multiline strings, try formatting them as SQL +syn include @pikeSQL <sfile>:p:h/sqloracle.vim +unlet b:current_syntax -syn keyword pikeTodo contained TODO FIXME XXX +" For embedded Autodoc documentation (WIP) +syn include @pikeAutodoc <sfile>:p:h/autodoc.vim +unlet b:current_syntax + +syn case match + +" Supports array, multiset, mapping multi-character delimiter matching +" Supports rotating amongst several same-level preprocessor conditionals +packadd! matchit +let b:match_words = "({:}\\@1<=),(\\[:]\\@1<=),(<:>\\@1<=),^\s*#\s*\%(if\%(n\?def\)\|else\|el\%(se\)\?if\|endif\)\>" + +" A bunch of useful Pike keywords +syn keyword pikeDebug gauge backtrace describe_backtrace werror _Static_assert static_assert +syn keyword pikeException error catch throw +syn keyword pikeLabel case default break return continue +syn keyword pikeConditional if else switch +syn keyword pikeRepeat while for foreach do + +syn keyword pikePredef RegGetKeyNames RegGetValue RegGetValues +syn keyword pikePredef __automap__ __empty_program +syn keyword pikePredef __handle_sprintf_format __parse_pike_type _disable_threads +syn keyword pikePredef _do_call_outs _exit _gdb_breakpoint +syn keyword pikePredef abs access acos acosh add_constant alarm all_constants +syn keyword pikePredef array_sscanf asin asinh atan atan2 atanh atexit +syn keyword pikePredef basetype call_function call_out call_out_info cd ceil +syn keyword pikePredef combine_path combine_path_nt +syn keyword pikePredef combine_path_unix compile copy_value cos cosh cpp crypt +syn keyword pikePredef ctime decode_value delay encode_value encode_value_canonic +syn keyword pikePredef enumerate errno exece exit exp file_stat file_truncate +syn keyword pikePredef filesystem_stat find_call_out floor fork function_name +syn keyword pikePredef function_object function_program gc +syn keyword pikePredef get_active_compilation_handler get_active_error_handler +syn keyword pikePredef get_all_groups get_all_users get_dir get_groups_for_user +syn keyword pikePredef get_iterator get_profiling_info get_weak_flag getcwd +syn keyword pikePredef getgrgid getgrnam gethrdtime gethrtime gethrvtime getpid +syn keyword pikePredef getpwnam getpwuid getxattr glob gmtime has_index has_prefix +syn keyword pikePredef has_suffix has_value hash hash_7_0 hash_7_4 hash_8_0 +syn keyword pikePredef hash_value kill limit listxattr load_module localtime +syn keyword pikePredef log lower_case master max min mkdir mktime mv +syn keyword pikePredef object_program pow query_num_arg random_seed +syn keyword pikePredef remove_call_out removexattr replace_master rm round +syn keyword pikePredef set_priority set_weak_flag setxattr sgn signal signame +syn keyword pikePredef signum sin sinh sleep sort sprintf sqrt sscanf strerror +syn keyword pikePredef string_filter_non_unicode string_to_unicode string_to_utf8 +syn keyword pikePredef tan tanh time trace types ualarm unicode_to_string +syn keyword pikePredef upper_case utf8_to_string version + +syn keyword pikePredef write lock try_lock +syn keyword pikePredef MutexKey Timestamp Date Time TimeTZ Interval Inet Range +syn keyword pikePredef Null null inf nan + +syn keyword pikeTodo contained TODO FIXME XXX + +" Match parengroups: allows for highlighting indices of mappings and +" highlighting semicolons that are out of place due to a paren imbalance +syn cluster pikePreShort contains=pikeDefine,pikePreProc,pikeCppOutWrapper,pikeCppInWrapper,pikePreCondit,pikePreConditMatch +syn cluster pikeExprGroup contains=pikeMappIndex,@pikeStmt,pikeNest,@pikeBadGroup,pikeSoftCast +syn match pikeWord transparent contained /[^()'"[\]{},;:]\+/ contains=ALLBUT,@pikePreProcGroup,@pikeExprGroup +syn match pikeFirstWord transparent display contained /^\s*#[^()'"[\]{},;:]\+/ contains=@pikePreShort +syn cluster pikeMappElm contains=pikeMappIndex,@pikeStmt +syn cluster pikeStmt contains=pikeFirstWord,pikeCharacter,pikeString,pikeMlString,pikeWord,pikeNest +syn cluster pikeBadGroup contains=pikeBadPClose,pikeBadAClose,pikeBadBClose,pikeBadSPClose,pikeBadSAClose,pikeBadSBClose,pikeBadSClose,pikeBadSPAClose,pikeBadSBAClose +syn match pikeBadPClose display contained "[}\]]" +syn match pikeBadAClose display contained "[)\]]" +syn match pikeBadBClose display contained "[)}]" +syn match pikeBadSPClose display contained "[;}\]]" +syn match pikeBadSAClose display contained "[;)\]]" +syn match pikeBadSPAClose display contained "[;\]]" +syn match pikeBadSBAClose display contained "[;}]" +syn match pikeBadSClose display contained "[;)}\]]" +syn region pikeNest transparent start="(\@1<!{" end="}" contains=@pikeStmt,pikeUserLabel,pikeBadAClose +syn region pikeNest transparent start="\%(\<for\%(each\)\?\s\?\)\@8<!([[{<]\@!" end=")" contains=@pikeStmt,pikeBadSPClose +syn region pikeNest transparent start="\%(\<for\%(each\)\?\s\?\)\@8<=(" end=")" contains=@pikeStmt,pikeBadPClose +syn region pikeNest transparent start="(\@1<!\[" end="]" contains=@pikeStmt,pikeBadSBClose +syn region pikeNest transparent start="(\zs\[" end="])" contains=@pikeMappElm,pikeBadSBAClose +" For some reason specifying a matchgroup on the pikeNest below makes it +" override the shorter variant; consider it a kludge, no idea why it works +syn region pikeNest transparent matchgroup=pikeSoftCast start=%(\zs\[[ \t\v\r\n.a-zA-Z0-9_():,|]\+])\@!% end=")" contains=@pikeStmt +syn region pikeNest transparent start="(\zs{" end="})" contains=@pikeStmt,pikeBadSPAClose +syn region pikeNest transparent start="(\zs<" end=">)" contains=@pikeStmt,pikeBadSPClose keepend + +" It's easy to accidentally add a space after a backslash that was intended +" for line continuation. Some compilers allow it, which makes it +" unpredictable and should be avoided. +syn match pikeBadContinuation contained "\\\s\+$" + +" pikeCommentGroup allows adding matches for special things in comments +syn cluster pikeCommentGroup contains=pikeTodo,pikeBadContinuation " String and Character constants " Highlight special characters (those which have a backslash) differently -syn match pikeSpecial contained "\\[0-7][0-7][0-7]\=\|\\." -syn region pikeString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeSpecial -syn match pikeCharacter "'[^\\]'" -syn match pikeSpecialCharacter "'\\.'" -syn match pikeSpecialCharacter "'\\[0-7][0-7]'" -syn match pikeSpecialCharacter "'\\[0-7][0-7][0-7]'" - -" Compound data types -syn region pikeCompoundType start='({' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='})' -syn region pikeCompoundType start='(\[' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='\])' -syn region pikeCompoundType start='(<' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='>)' - -"catch errors caused by wrong parenthesis -syn region pikeParen transparent start='([^{[<(]' end=')' contains=ALLBUT,pikeParenError,pikeIncluded,pikeSpecial,pikeTodo,pikeUserLabel,pikeBitField -syn match pikeParenError ")" -syn match pikeInParen contained "[^(][{}][^)]" +syn match pikeSpecial display contained "\\\%(x\x*\|d\d*\|\o\+\|u\x\{4}\|U\x\{8}\|[abefnrtv]\|$\)" + +" ISO C11 or ISO C++ 11 +if !exists("c_no_cformat") + " Highlight % items in strings. + syn match pikeFormat display "%\%(\d\+\$\)\=[-+' #0*]*\%(\d*\|\*\|\*\d\+\$\)\%(\.\%(\d*\|\*\|\*\d\+\$\)\)\=\%([hlLjzt]\|ll\|hh\)\=\%([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained + syn match pikeFormat display "%%" contained + syn region pikeString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=pikeSpecial,pikeDelimiterDQ,pikeFormat,@Spell keepend + syn region pikeMlString start=+#"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeSpecial,pikeFormat,pikeDelimiterDQ,@Spell,pikeEmbeddedString keepend +else + syn region pikeString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=pikeSpecial,pikeDelimiterDQ,@Spell + syn region pikeMlString transparent start=+#"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeSpecial,pikeDelimiterDQ,@Spell,pikeEmbeddedString keepend +endif + +" Use SQL-syntax highlighting in multiline string if it starts with +" a standard SQL keyword +syn case ignore +" FIXME Use explicit newline match to cover up a bug in the regexp engine +" If the kludge is not used, the match will only start unless at least a space +" follows the initial doublequote on the first line (or the keyword is on +" the first line). +syn region pikeEmbeddedString contained start=+\%(#"\n\?\)\@2<=\_s*\%(SELECT\|INSERT\|UPDATE\|DELETE\|WITH\|CREATE\|DROP\|ALTER\)\>+ skip=+\\\\\|\\"+ end=+[\\#]\@1<!"+ contains=@pikeSQL,pikeBindings keepend +syn case match + +syn match pikeBindings display contained ":\@1<!:\I\i*" + +syn match pikeCharacter "'[^\\']'" contains=pikeDelimiterSQ +syn match pikeCharacter "'[^']*'" contains=pikeSpecial,pikeDelimiterSQ +syn match pikeSpecialError "'\\[^'\"?\\abefnrtv]'" +syn match pikeDelimiterDQ display +"+ contained +syn match pikeDelimiterSQ display +'+ contained + +"when wanted, highlight trailing white space +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match pikeSpaceError display excludenl "\s\+$" + endif + if !exists("c_no_tab_space_error") + syn match pikeSpaceError display " \+\ze\t" + endif +endif "integer number, or floating point number without a dot and with "f". syn case ignore -syn match pikeNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +syn match pikeNumbers display transparent "\<\d\|\.\d" contains=pikeNumber,pikeFloat,pikeOctalError,pikeOctal +" Same, but without octal error (for comments) +syn match pikeNumbersCom display contained transparent "\<\d\|\.\d" contains=pikeNumber,pikeFloat,pikeOctal +syn match pikeNumber display contained "\<\d\+\%(u\=l\{0,2}\|ll\=u\)\>" +"hex number +syn match pikeNumber display contained "\<0x\x\+\%(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match pikeOctal display contained "\<0\o\+\%(u\=l\{0,2}\|ll\=u\)\>" contains=pikeOctalZero +syn match pikeOctalZero display contained "\<0" "floating point number, with dot, optional exponent -syn match pikeFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +syn match pikeFloat display contained "\<\d\+\%(f\|\.[0-9.]\@!\d*\%(e[-+]\=\d\+\)\=[fl]\=\)" "floating point number, starting with a dot, optional exponent -syn match pikeFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +syn match pikeFloat display contained "[0-9.]\@1<!\.\d\+\%(e[-+]\=\d\+\)\=[fl]\=\>" "floating point number, without dot, with exponent -syn match pikeFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" -"hex number -syn match pikeNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>" -"syn match pikeIdentifier "\<[a-z_][a-z0-9_]*\>" -syn case match +syn match pikeFloat display contained "\<\d\+e[-+]\=\d\+[fl]\=\>" + +"hexadecimal floating point number, two variants, with exponent +syn match pikeFloat display contained "\<0x\%(\x\+\.\?\|\x*\.\x\+\)p[-+]\=\d\+[fl]\=\>" + " flag an octal number with wrong digits -syn match pikeOctalError "\<0[0-7]*[89]" +syn match pikeOctalError display contained "\<0\o*[89]\d*" +syn case match if exists("c_comment_strings") " A comment can contain pikeString, pikeCharacter and pikeNumber. @@ -61,82 +186,201 @@ if exists("c_comment_strings") " need to use a special type of pikeString: pikeCommentString, which also ends on " "*/", and sees a "*" at the start of the line as comment again. " Unfortunately this doesn't very well work for // type of comments :-( - syntax match pikeCommentSkip contained "^\s*\*\($\|\s\+\)" - syntax region pikeCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=pikeSpecial,pikeCommentSkip - syntax region pikeComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=pikeSpecial - syntax region pikeComment start="/\*" end="\*/" contains=pikeTodo,pikeCommentString,pikeCharacter,pikeNumber,pikeFloat - syntax match pikeComment "//.*" contains=pikeTodo,pikeComment2String,pikeCharacter,pikeNumber - syntax match pikeComment "#\!.*" contains=pikeTodo,pikeComment2String,pikeCharacter,pikeNumber + syn match pikeCommentSkip contained "^\s*\*\%($\|\s\+\)" + syn region pikeCommentString contained start=+\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\ze\*/+ contains=pikeSpecial,pikeCommentSkip + syn region pikeComment2String contained start=+\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=pikeSpecial + syn region pikeCommentL start="//" skip="\\$" end="$" keepend contains=@pikeCommentGroup,pikeComment2String,pikeCharacter,pikeNumbersCom,pikeSpaceError,@Spell containedin=pikeWord,pikeFirstWord + if exists("c_no_comment_fold") + " Use "extend" here to have preprocessor lines not terminate halfway a + " comment. + syn region pikeComment matchgroup=pikeCommentStart start="/\*" end="\*/" contains=@pikeCommentGroup,pikeCommentStartError,pikeCommentString,pikeCharacter,pikeNumbersCom,pikeSpaceError,@Spell extend containedin=pikeWord,pikeFirstWord + else + syn region pikeComment matchgroup=pikeCommentStart start="/\*" end="\*/" contains=@pikeCommentGroup,pikeCommentStartError,pikeCommentString,pikeCharacter,pikeNumbersCom,pikeSpaceError,@Spell fold extend containedin=pikeWord,pikeFirstWord + endif else - syn region pikeComment start="/\*" end="\*/" contains=pikeTodo - syn match pikeComment "//.*" contains=pikeTodo - syn match pikeComment "#!.*" contains=pikeTodo + syn region pikeCommentL start="//" skip="\\$" end="$" keepend contains=@pikeCommentGroup,pikeSpaceError,@Spell containedin=pikeWord,pikeFirstWord + if exists("c_no_comment_fold") + syn region pikeComment matchgroup=pikeCommentStart start="/\*" end="\*/" contains=@pikeCommentGroup,pikeCommentStartError,pikeSpaceError,@Spell extend containedin=pikeWord,pikeFirstWord + else + syn region pikeComment matchgroup=pikeCommentStart start="/\*" end="\*/" contains=@pikeCommentGroup,pikeCommentStartError,pikeSpaceError,@Spell fold extend containedin=pikeWord,pikeFirstWord + endif endif -syntax match pikeCommentError "\*/" +" keep a // comment separately, it terminates a preproc. conditional +syn match pikeCommentError display "\*/" +syn match pikeCommentStartError display "/\ze\*" contained + +syn keyword pikeOperator sizeof +syn keyword pikeOperator typeof _typeof _refs +syn keyword pikeOperator zero_type intp stringp arrayp mappingp multisetp +syn keyword pikeOperator objectp functionp programp callablep destructedp +syn keyword pikeOperator object_variablep undefinedp +syn keyword pikeOperator allocate equal +syn keyword pikeOperator aggregate aggregate_mapping aggregate_multiset +syn keyword pikeOperator map filter search replace reverse column rows +syn keyword pikeOperator indices values mkmapping mkmultiset m_delete sort +syn keyword pikeOperator m_delete destruct +syn keyword pikeOperator create _destruct _sprintf cast _encode _decode +syn keyword pikeOperator __hash _sizeof _values _indices __INIT _equal +syn keyword pikeOperator _is_type _m_delete _get_iterator _search +syn keyword pikeOperator _serialize _deserialize _sqrt _types _random +syn keyword pikeOperator _size_object + +syn keyword pikeType int void +syn keyword pikeType float +syn keyword pikeType bool string array mapping multiset mixed +syn keyword pikeType object function program auto + +syn keyword pikeType this this_object this_program +syn keyword pikeType sprintf_args sprintf_format sprintf_result +syn keyword pikeType strict_sprintf_format + +syn keyword pikeStructure class enum typedef inherit import +syn keyword pikeTypedef typedef +syn keyword pikeStorageClass private protected public constant final variant +syn keyword pikeStorageClass optional inline extern static __deprecated__ lambda -syn keyword pikeOperator sizeof -syn keyword pikeType int string void float mapping array multiset mixed -syn keyword pikeType program object function +syn keyword pikeConstant __LINE__ __FILE__ __DIR__ __DATE__ __TIME__ +syn keyword pikeConstant __AUTO_BIGNUM__ __NT__ +syn keyword pikeConstant __BUILD__ __COUNTER__ _MAJOR__ __MINOR__ __VERSION__ +syn keyword pikeConstant __REAL_BUILD__ _REAL_MAJOR__ __REAL_MINOR__ +syn keyword pikeConstant __REAL_VERSION__ __PIKE__ UNDEFINED -syn region pikePreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=pikeComment,pikeString,pikeCharacter,pikeNumber,pikeCommentError -syn region pikeIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ -syn match pikeIncluded contained "<[^>]*>" -syn match pikeInclude "^\s*#\s*include\>\s*["<]" contains=pikeIncluded -"syn match pikeLineSkip "\\$" -syn region pikeDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,pikePreCondit,pikeIncluded,pikeInclude,pikeDefine,pikeInParen -syn region pikePreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,pikePreCondit,pikeIncluded,pikeInclude,pikeDefine,pikeInParen +" These should actually only be parsed in preprocessor conditionals +syn keyword pikeCppOperator contained defined constant efun _Pragma + +syn keyword pikeBoolean true false + +syn match pikeCppPrefix display "^\s*\zs#\s*[a-z]\+" contained +syn region pikePreCondit start="^\s*#\s*\%(if\%(n\?def\)\?\|el\%(se\)\?if\)\>" skip="\\$" end="$" transparent keepend contains=pikeString,pikeCharacter,pikeNumbers,pikeCommentError,pikeSpaceError,pikeCppOperator,pikeCppPrefix +syn match pikePreConditMatch display "^\s*\zs#\s*\%(else\|endif\)\>" +if !exists("c_no_if0") + syn cluster pikeCppOutInGroup contains=pikeCppInIf,pikeCppInElse,pikeCppInElse2,pikeCppOutIf,pikeCppOutIf2,pikeCppOutElse,pikeCppInSkip,pikeCppOutSkip + syn region pikeCppOutWrapper start="^\s*\zs#\s*if\s\+0\+\s*\%($\|//\|/\*\|&\)" end=".\@=\|$" contains=pikeCppOutIf,pikeCppOutElse,@NoSpell fold + syn region pikeCppOutIf contained start="0\+" matchgroup=pikeCppOutWrapper end="^\s*#\s*endif\>" contains=pikeCppOutIf2,pikeCppOutElse + if !exists("c_no_if0_fold") + syn region pikeCppOutIf2 contained matchgroup=pikeCppOutWrapper start="0\+" end="^\ze\s*#\s*\%(else\>\|el\%(se\)\?if\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)" contains=pikeSpaceError,pikeCppOutSkip,@Spell fold + else + syn region pikeCppOutIf2 contained matchgroup=pikeCppOutWrapper start="0\+" end="^\ze\s*#\s*\%(else\>\|el\%(se\)\?if\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)" contains=pikeSpaceError,pikeCppOutSkip,@Spell + endif + syn region pikeCppOutElse contained matchgroup=pikeCppOutWrapper start="^\s*#\s*\%(else\|el\%(se\)\?if\)" end="^\s*#\s*endif\>" contains=TOP,pikePreCondit + syn region pikeCppInWrapper start="^\s*\zs#\s*if\s\+0*[1-9]\d*\s*\%($\|//\|/\*\||\)" end=".\@=\|$" contains=pikeCppInIf,pikeCppInElse fold + syn region pikeCppInIf contained matchgroup=pikeCppInWrapper start="\d\+" end="^\s*#\s*endif\>" contains=TOP,pikePreCondit + if !exists("c_no_if0_fold") + syn region pikeCppInElse contained start="^\s*#\s*\%(else\>\|el\%(se\)\?if\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=pikeCppInIf contains=pikeCppInElse2 fold + else + syn region pikeCppInElse contained start="^\s*#\s*\%(else\>\|el\%(se\)\?if\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=pikeCppInIf contains=pikeCppInElse2 + endif + syn region pikeCppInElse2 contained matchgroup=pikeCppInWrapper start="^\s*#\s*\%(else\|el\%(se\)\?if\)\%([^/]\|/[^/*]\)*" end="^\ze\s*#\s*endif\>" contains=pikeSpaceError,pikeCppOutSkip,@Spell + syn region pikeCppOutSkip contained start="^\s*#\s*if\%(n\?def\)\?\>" skip="\\$" end="^\s*#\s*endif\>" contains=pikeSpaceError,pikeCppOutSkip + syn region pikeCppInSkip contained matchgroup=pikeCppInWrapper start="^\s*#\s*\%(if\s\+\%(\d\+\s*\%($\|//\|/\*\||\|&\)\)\@!\|ifn\?def\>\)" skip="\\$" end="^\s*#\s*endif\>" containedin=pikeCppOutElse,pikeCppInIf,pikeCppInSkip contains=TOP,pikePreProc +endif +syn region pikeIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeDelimiterDQ keepend +syn match pikeIncluded display contained "<[^>]*>" +syn match pikeInclude display "^\s*\zs#\s*include\>\s*["<]" contains=pikeIncluded +syn cluster pikePreProcGroup contains=pikeIncluded,pikeInclude,pikeEmbeddedString,pikeCppOutWrapper,pikeCppInWrapper,@pikeCppOutInGroup,pikeFormat,pikeMlString,pikeCommentStartError,@pikeBadGroup,pikeWord +syn region pikeDefine start="^\s*\zs#\s*\%(define\|undef\)\>" skip="\\$" end="$" keepend contains=@pikeStmt,@pikeBadGroup +syn region pikePreProc start="^\s*\zs#\s*\%(pragma\|charset\|pike\|require\|string\|line\|warning\|error\)\>" skip="\\$" end="$" transparent keepend contains=pikeString,pikeCharacter,pikeNumbers,pikeCommentError,pikeSpaceError,pikeCppOperator,pikeCppPrefix,@Spell,pikeConstant + +syn match pikeAutodocReal display contained "\%(//\|[/ \t\v]\*\|^\*\)\@2<=!.*" contains=@pikeAutodoc containedin=pikeComment,pikeCommentL +syn cluster pikeCommentGroup add=pikeAutodocReal +syn cluster pikePreProcGroup add=pikeAutodocReal " Highlight User Labels -syn region pikeMulti transparent start='?' end=':' contains=ALLBUT,pikeIncluded,pikeSpecial,pikeTodo,pikeUserLabel,pikeBitField " Avoid matching foo::bar() in C++ by requiring that the next char is not ':' -syn match pikeUserLabel "^\s*\I\i*\s*:$" -syn match pikeUserLabel ";\s*\I\i*\s*:$"ms=s+1 -syn match pikeUserLabel "^\s*\I\i*\s*:[^:]"me=e-1 -syn match pikeUserLabel ";\s*\I\i*\s*:[^:]"ms=s+1,me=e-1 +syn match pikeUserLabel display "\%(^\|[{};]\)\zs\I\i*\s*\ze:\%([^:]\|$\)" contained contains=NONE +syn match pikeUserLabel display "\%(\<\%(break\|continue\)\_s\+\)\@10<=\I\i*" contained contains=NONE +syn match pikeUserLabel display "\%(\<case\)\@5<=\s\+[^<()[\]{},;:]\+\ze::\@!" contained contains=pikeDelimiterDQ,pikeDelimiterSQ -" Avoid recognizing most bitfields as labels -syn match pikeBitField "^\s*\I\i*\s*:\s*[1-9]"me=e-1 -syn match pikeBitField ";\s*\I\i*\s*:\s*[1-9]"me=e-1 +syn match pikeMappIndex display contained "[^<()[\]{},;:]\+\ze::\@!" contains=pikeDelimiterDQ,pikeDelimiterSQ +syn match pikeSoftCast display contained "\[[ \t\v\r\n.a-zA-Z0-9_():,|\+]" contains=NONE -syn sync ccomment pikeComment minlines=10 +if exists("c_minlines") + let b:c_minlines = c_minlines +else + if !exists("c_no_if0") + let b:c_minlines = 400 " #if 0 constructs can be long + else + let b:c_minlines = 200 " mostly for multiline strings + endif +endif +exec "syn sync ccomment pikeComment minlines=" . b:c_minlines +syn sync match pikeMlStringSync grouphere pikeMlString +^[^"#]\+#\"+ +syn sync match pikeAutodocSync grouphere pikeCommentL "^\s*//!" " Define the default highlighting. -" Only when an item doesn't have highlighting yet - +" Only used when an item doesn't have highlighting yet +hi def link pikeFormat SpecialChar +hi def link pikeMlString String +hi def link pikeCommentL Comment +hi def link pikeCommentStart Comment hi def link pikeLabel Label -hi def link pikeUserLabel Label +hi def link pikeUserLabel Identifier hi def link pikeConditional Conditional hi def link pikeRepeat Repeat -hi def link pikeCharacter Character -hi def link pikeSpecialCharacter pikeSpecial +hi def link pikeCharacter Character +hi def link pikeDelimiterDQ Delimiter +hi def link pikeDelimiterSQ Delimiter hi def link pikeNumber Number +hi def link pikeOctal Number +hi def link pikeOctalZero PreProc " link this to Error if you want hi def link pikeFloat Float -hi def link pikeOctalError pikeError -hi def link pikeParenError pikeError -hi def link pikeInParen pikeError -hi def link pikeCommentError pikeError -hi def link pikeOperator Operator +hi def link pikeOctalError Error +hi def link pikeCommentError Error +hi def link pikeCommentStartError Error +hi def link pikeSpaceError Error +hi def link pikeSpecialError Error +hi def link pikeOperator Operator +hi def link pikeCppOperator Operator +hi def link pikeStructure Structure +hi def link pikeTypedef Typedef +hi def link pikeStorageClass StorageClass hi def link pikeInclude Include +hi def link pikeCppPrefix PreCondit hi def link pikePreProc PreProc hi def link pikeDefine Macro -hi def link pikeIncluded pikeString +hi def link pikeIncluded String hi def link pikeError Error -hi def link pikeStatement Statement -hi def link pikePreCondit PreCondit +hi def link pikeDebug Debug +hi def link pikeException Exception +hi def link pikeStatement Statement hi def link pikeType Type -hi def link pikeCommentError pikeError -hi def link pikeCommentString pikeString -hi def link pikeComment2String pikeString -hi def link pikeCommentSkip pikeComment +hi def link pikeConstant Constant +hi def link pikeBoolean Boolean +hi def link pikeCommentString String +hi def link pikeComment2String String +hi def link pikeCommentSkip Comment hi def link pikeString String hi def link pikeComment Comment hi def link pikeSpecial SpecialChar hi def link pikeTodo Todo -hi def link pikeException pikeStatement -hi def link pikeCompoundType Constant -"hi def link pikeIdentifier Identifier +hi def link pikeBadContinuation Error + +hi def link pikeCppInWrapper PreCondit +hi def link pikeCppOutWrapper PreCondit +hi def link pikePreConditMatch PreCondit + +hi def link pikeCppOutSkip Comment +hi def link pikeCppInElse2 Comment +hi def link pikeCppOutIf2 Comment +hi def link pikeCppOut Comment +hi def link pikePredef Statement +hi def link pikeBindings Identifier +hi def link pikeMappIndex Identifier +hi def link pikeSoftCast Type +hi def link pikeBadGroup Error +hi def link pikeBadPClose Error +hi def link pikeBadAClose Error +hi def link pikeBadBClose Error +hi def link pikeBadSPClose Error +hi def link pikeBadSAClose Error +hi def link pikeBadSBClose Error +hi def link pikeBadSPAClose Error +hi def link pikeBadSBAClose Error +hi def link pikeBadSClose Error let b:current_syntax = "pike" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 diff --git a/runtime/syntax/readline.vim b/runtime/syntax/readline.vim index b50b9c60e5..3831ae1149 100644 --- a/runtime/syntax/readline.vim +++ b/runtime/syntax/readline.vim @@ -1,9 +1,10 @@ " Vim syntax file " Language: readline(3) configuration file +" Maintainer: Daniel Moch <daniel@danielmoch.com> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2017-06-25 -" readline_has_bash - if defined add support for bash specific -" settings/functions +" Latest Revision: 2018-07-26 +" Add new functions for Readline 7 / Bash 4.4 +" (credit: Github user bewuethr) if exists('b:current_syntax') finish @@ -110,7 +111,7 @@ syn keyword readlineKeyword contained \ nextgroup=readlineVariable \ skipwhite -syn keyword readlineVariable contained +syn keyword readlineVariable contained \ nextgroup=readlineBellStyle \ skipwhite \ bell-style @@ -119,12 +120,15 @@ syn keyword readlineVariable contained \ nextgroup=readlineBoolean \ skipwhite \ bind-tty-special-chars + \ blink-matching-paren + \ colored-completion-prefix \ colored-stats \ completion-ignore-case \ completion-map-case \ convert-meta \ disable-completion \ echo-control-characters + \ enable-bracketed-paste \ enable-keypad \ enable-meta-key \ expand-tilde @@ -152,6 +156,9 @@ syn keyword readlineVariable contained \ skipwhite \ comment-begin \ isearch-terminators + \ vi-cmd-mode-string + \ vi-ins-mode-string + \ emacs-mode-string syn keyword readlineVariable contained \ nextgroup=readlineNumber @@ -265,6 +272,7 @@ syn keyword readlineFunction contained \ start-kbd-macro \ end-kbd-macro \ call-last-kbd-macro + \ print-last-kbd-macro \ \ re-read-init-file \ abort @@ -335,6 +343,8 @@ syn keyword readlineFunction contained if exists("readline_has_bash") syn keyword readlineFunction contained + \ shell-forward-word + \ shell-backward-word \ shell-expand-line \ history-expand-line \ magic-space @@ -343,6 +353,8 @@ if exists("readline_has_bash") \ insert-last-argument \ operate-and-get-next \ forward-backward-delete-char + \ shell-kill-word + \ shell-backward-kill-word \ delete-char-or-list \ complete-filename \ possible-filename-completions @@ -355,6 +367,7 @@ if exists("readline_has_bash") \ complete-command \ possible-command-completions \ dynamic-complete-history + \ dabbrev-expand \ complete-into-braces \ glob-expand-word \ glob-list-expansions diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim index 232d2a7de3..d620d91f4a 100644 --- a/runtime/syntax/rst.vim +++ b/runtime/syntax/rst.vim @@ -3,7 +3,7 @@ " Maintainer: Marshall Ward <marshall.ward@gmail.com> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Website: https://github.com/marshallward/vim-restructuredtext -" Latest Revision: 2016-08-18 +" Latest Revision: 2018-07-23 if exists("b:current_syntax") finish @@ -50,7 +50,10 @@ syn cluster rstDirectives contains=rstFootnote,rstCitation, syn match rstExplicitMarkup '^\s*\.\.\_s' \ nextgroup=@rstDirectives,rstComment,rstSubstitutionDefinition -let s:ReferenceName = '[[:alnum:]]\+\%([_.-][[:alnum:]]\+\)*' +" "Simple reference names are single words consisting of alphanumerics plus +" isolated (no two adjacent) internal hyphens, underscores, periods, colons +" and plus signs." +let s:ReferenceName = '[[:alnum:]]\%([-_.:+]\?[[:alnum:]]\+\)*' syn keyword rstTodo contained FIXME TODO XXX NOTE @@ -83,7 +86,7 @@ execute 'syn region rstExDirective contained matchgroup=rstDirective' . \ ' end=+^\s\@!+ contains=@rstCruft,rstLiteralBlock' execute 'syn match rstSubstitutionDefinition contained' . - \ ' /|' . s:ReferenceName . '|\_s\+/ nextgroup=@rstDirectives' + \ ' /|.*|\_s\+/ nextgroup=@rstDirectives' function! s:DefineOneInlineMarkup(name, start, middle, end, char_left, char_right) execute 'syn region rst' . a:name . @@ -107,10 +110,10 @@ function! s:DefineInlineMarkup(name, start, middle, end) call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '’', '’') " TODO: Additional Unicode Pd, Po, Pi, Pf, Ps characters - call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|[/:]\)', '') + call s:DefineOneInlineMarkup(a:name, a:start, middle, a:end, '\%(^\|\s\|\%ua0\|[/:]\)', '') execute 'syn match rst' . a:name . - \ ' +\%(^\|\s\|[''"([{</:]\)\zs' . a:start . + \ ' +\%(^\|\s\|\%ua0\|[''"([{</:]\)\zs' . a:start . \ '[^[:space:]' . a:start[strlen(a:start) - 1] . ']' \ a:end . '\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+' @@ -124,14 +127,31 @@ call s:DefineInlineMarkup('InlineLiteral', '``', "", '``') call s:DefineInlineMarkup('SubstitutionReference', '|', '|', '|_\{0,2}') call s:DefineInlineMarkup('InlineInternalTargets', '_`', '`', '`') -syn match rstSections "^\%(\([=`:.'"~^_*+#-]\)\1\+\n\)\=.\+\n\([=`:.'"~^_*+#-]\)\2\+$" +" Sections are identified through their titles, which are marked up with +" adornment: "underlines" below the title text, or underlines and matching +" "overlines" above the title. An underline/overline is a single repeated +" punctuation character that begins in column 1 and forms a line extending at +" least as far as the right edge of the title text. +" +" It is difficult to count characters in a regex, but we at least special-case +" the case where the title has at least three characters to require the +" adornment to have at least three characters as well, in order to handle +" properly the case of a literal block: +" +" this is the end of a paragraph +" :: +" this is a literal block +syn match rstSections "\v^%(([=`:.'"~^_*+#-])\1+\n)?.{1,2}\n([=`:.'"~^_*+#-])\2+$" + \ contains=@Spell +syn match rstSections "\v^%(([=`:.'"~^_*+#-])\1{2,}\n)?.{3,}\n([=`:.'"~^_*+#-])\2{2,}$" + \ contains=@Spell " TODO: Can’t remember why these two can’t be defined like the ones above. execute 'syn match rstFootnoteReference contains=@NoSpell' . - \ ' +\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]_+' + \ ' +\%(\s\|^\)\[\%(\d\+\|#\%(' . s:ReferenceName . '\)\=\|\*\)\]_+' execute 'syn match rstCitationReference contains=@NoSpell' . - \ ' +\[' . s:ReferenceName . '\]_\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+' + \ ' +\%(\s\|^\)\[' . s:ReferenceName . '\]_\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)+' execute 'syn match rstHyperlinkReference' . \ ' /\<' . s:ReferenceName . '__\=\ze\%($\|\s\|[''")\]}>/:.,;!?\\-]\)/' @@ -140,28 +160,69 @@ syn match rstStandaloneHyperlink contains=@NoSpell \ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]" syn region rstCodeBlock contained matchgroup=rstDirective - \ start=+\%(sourcecode\|code\%(-block\)\=\)::\s\+\w*\_s*\n\ze\z(\s\+\)+ + \ start=+\%(sourcecode\|code\%(-block\)\=\)::\s\+.*\_s*\n\ze\z(\s\+\)+ \ skip=+^$+ \ end=+^\z1\@!+ \ contains=@NoSpell syn cluster rstDirectives add=rstCodeBlock if !exists('g:rst_syntax_code_list') - let g:rst_syntax_code_list = ['vim', 'java', 'cpp', 'lisp', 'php', - \ 'python', 'perl', 'sh'] + " A mapping from a Vim filetype to a list of alias patterns (pattern + " branches to be specific, see ':help /pattern'). E.g. given: + " + " let g:rst_syntax_code_list = { + " \ 'cpp': ['cpp', 'c++'], + " \ } + " + " then the respective contents of the following two rST directives: + " + " .. code:: cpp + " + " auto i = 42; + " + " .. code:: C++ + " + " auto i = 42; + " + " will both be highlighted as C++ code. As shown by the latter block + " pattern matching will be case-insensitive. + let g:rst_syntax_code_list = { + \ 'vim': ['vim'], + \ 'java': ['java'], + \ 'cpp': ['cpp', 'c++'], + \ 'lisp': ['lisp'], + \ 'php': ['php'], + \ 'python': ['python'], + \ 'perl': ['perl'], + \ 'sh': ['sh'], + \ } +elseif type(g:rst_syntax_code_list) == type([]) + " backward compatibility with former list format + let s:old_spec = g:rst_syntax_code_list + let g:rst_syntax_code_list = {} + for s:elem in s:old_spec + let g:rst_syntax_code_list[s:elem] = [s:elem] + endfor endif -for code in g:rst_syntax_code_list +for s:filetype in keys(g:rst_syntax_code_list) unlet! b:current_syntax " guard against setting 'isk' option which might cause problems (issue #108) let prior_isk = &l:iskeyword - exe 'syn include @rst'.code.' syntax/'.code.'.vim' - exe 'syn region rstDirective'.code.' matchgroup=rstDirective fold' - \.' start=#\%(sourcecode\|code\%(-block\)\=\)::\s\+'.code.'\_s*\n\ze\z(\s\+\)#' + let s:alias_pattern = '' + \.'\%(' + \.join(g:rst_syntax_code_list[s:filetype], '\|') + \.'\)' + + exe 'syn include @rst'.s:filetype.' syntax/'.s:filetype.'.vim' + exe 'syn region rstDirective'.s:filetype + \.' matchgroup=rstDirective fold' + \.' start="\c\%(sourcecode\|code\%(-block\)\=\)::\s\+'.s:alias_pattern.'\_s*\n\ze\z(\s\+\)"' \.' skip=#^$#' \.' end=#^\z1\@!#' - \.' contains=@NoSpell,@rst'.code - exe 'syn cluster rstDirectives add=rstDirective'.code + \.' contains=@NoSpell,@rst'.s:filetype + exe 'syn cluster rstDirectives add=rstDirective'.s:filetype + " reset 'isk' setting, if it has been changed if &l:iskeyword !=# prior_isk let &l:iskeyword = prior_isk @@ -169,6 +230,9 @@ for code in g:rst_syntax_code_list unlet! prior_isk endfor +" Enable top level spell checking +syntax spell toplevel + " TODO: Use better syncing. syn sync minlines=50 linebreaks=2 @@ -189,8 +253,6 @@ hi def link rstHyperlinkTarget String hi def link rstExDirective String hi def link rstSubstitutionDefinition rstDirective hi def link rstDelimiter Delimiter -hi def rstEmphasis ctermfg=13 term=italic cterm=italic gui=italic -hi def rstStrongEmphasis ctermfg=1 term=bold cterm=bold gui=bold hi def link rstInterpretedTextOrHyperlinkReference Identifier hi def link rstInlineLiteral String hi def link rstSubstitutionReference PreProc @@ -200,6 +262,14 @@ hi def link rstCitationReference Identifier hi def link rstHyperLinkReference Identifier hi def link rstStandaloneHyperlink Identifier hi def link rstCodeBlock String +if exists('g:rst_use_emphasis_colors') + " TODO: Less arbitrary color selection + hi def rstEmphasis ctermfg=13 term=italic cterm=italic gui=italic + hi def rstStrongEmphasis ctermfg=1 term=bold cterm=bold gui=bold +else + hi def rstEmphasis term=italic cterm=italic gui=italic + hi def rstStrongEmphasis term=bold cterm=bold gui=bold +endif let b:current_syntax = "rst" diff --git a/runtime/syntax/scheme.vim b/runtime/syntax/scheme.vim index af9a659e07..e209729f57 100644 --- a/runtime/syntax/scheme.vim +++ b/runtime/syntax/scheme.vim @@ -1,328 +1,464 @@ " Vim syntax file -" Language: Scheme (R5RS + some R6RS extras) -" Last Change: 2016 May 23 -" Maintainer: Sergey Khorev <sergey.khorev@gmail.com> -" Original author: Dirk van Deun <dirk@igwe.vub.ac.be> - -" This script incorrectly recognizes some junk input as numerals: -" parsing the complete system of Scheme numerals using the pattern -" language is practically impossible: I did a lax approximation. - -" MzScheme extensions can be activated with setting is_mzscheme variable - -" Suggestions and bug reports are solicited by the author. - -" Initializing: - -" quit when a syntax file was already loaded -if exists("b:current_syntax") +" Language: Scheme (R7RS) +" Last Change: 2018-01-06 +" Author: Evan Hanson <evhan@foldling.org> +" Maintainer: Evan Hanson <evhan@foldling.org> +" Previous Author: Dirk van Deun <dirk@igwe.vub.ac.be> +" Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com> +" URL: https://foldling.org/vim/syntax/scheme.vim + +if exists('b:current_syntax') finish endif -let s:cpo_save = &cpo +let s:cpo = &cpo set cpo&vim -syn case ignore - -" Fascist highlighting: everything that doesn't fit the rules is an error... - -syn match schemeError ![^ \t()\[\]";]*! -syn match schemeError ")" - -" Quoted and backquoted stuff - -syn region schemeQuoted matchgroup=Delimiter start="['`]" end=![ \t()\[\]";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -syn region schemeQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc -syn region schemeQuoted matchgroup=Delimiter start="['`]#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -syn region schemeStrucRestricted matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc -syn region schemeStrucRestricted matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -" Popular Scheme extension: -" using [] as well as () -syn region schemeStrucRestricted matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc -syn region schemeStrucRestricted matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -syn region schemeUnquote matchgroup=Delimiter start="," end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc -syn region schemeUnquote matchgroup=Delimiter start=",@" end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -syn region schemeUnquote matchgroup=Delimiter start=",(" end=")" contains=ALL -syn region schemeUnquote matchgroup=Delimiter start=",@(" end=")" contains=ALL - -syn region schemeUnquote matchgroup=Delimiter start=",#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc -syn region schemeUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -syn region schemeUnquote matchgroup=Delimiter start=",\[" end="\]" contains=ALL -syn region schemeUnquote matchgroup=Delimiter start=",@\[" end="\]" contains=ALL - -syn region schemeUnquote matchgroup=Delimiter start=",#\[" end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc -syn region schemeUnquote matchgroup=Delimiter start=",@#\[" end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc - -" R5RS Scheme Functions and Syntax: - -setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ - -syn keyword schemeSyntax lambda and or if cond case define let let* letrec -syn keyword schemeSyntax begin do delay set! else => -syn keyword schemeSyntax quote quasiquote unquote unquote-splicing -syn keyword schemeSyntax define-syntax let-syntax letrec-syntax syntax-rules -" R6RS -syn keyword schemeSyntax define-record-type fields protocol - -syn keyword schemeFunc not boolean? eq? eqv? equal? pair? cons car cdr set-car! -syn keyword schemeFunc set-cdr! caar cadr cdar cddr caaar caadr cadar caddr -syn keyword schemeFunc cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr -syn keyword schemeFunc cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr -syn keyword schemeFunc cddaar cddadr cdddar cddddr null? list? list length -syn keyword schemeFunc append reverse list-ref memq memv member assq assv assoc -syn keyword schemeFunc symbol? symbol->string string->symbol number? complex? -syn keyword schemeFunc real? rational? integer? exact? inexact? = < > <= >= -syn keyword schemeFunc zero? positive? negative? odd? even? max min + * - / abs -syn keyword schemeFunc quotient remainder modulo gcd lcm numerator denominator -syn keyword schemeFunc floor ceiling truncate round rationalize exp log sin cos -syn keyword schemeFunc tan asin acos atan sqrt expt make-rectangular make-polar -syn keyword schemeFunc real-part imag-part magnitude angle exact->inexact -syn keyword schemeFunc inexact->exact number->string string->number char=? -syn keyword schemeFunc char-ci=? char<? char-ci<? char>? char-ci>? char<=? -syn keyword schemeFunc char-ci<=? char>=? char-ci>=? char-alphabetic? char? -syn keyword schemeFunc char-numeric? char-whitespace? char-upper-case? -syn keyword schemeFunc char-lower-case? -syn keyword schemeFunc char->integer integer->char char-upcase char-downcase -syn keyword schemeFunc string? make-string string string-length string-ref -syn keyword schemeFunc string-set! string=? string-ci=? string<? string-ci<? -syn keyword schemeFunc string>? string-ci>? string<=? string-ci<=? string>=? -syn keyword schemeFunc string-ci>=? substring string-append vector? make-vector -syn keyword schemeFunc vector vector-length vector-ref vector-set! procedure? -syn keyword schemeFunc apply map for-each call-with-current-continuation -syn keyword schemeFunc call-with-input-file call-with-output-file input-port? -syn keyword schemeFunc output-port? current-input-port current-output-port -syn keyword schemeFunc open-input-file open-output-file close-input-port -syn keyword schemeFunc close-output-port eof-object? read read-char peek-char -syn keyword schemeFunc write display newline write-char call/cc -syn keyword schemeFunc list-tail string->list list->string string-copy -syn keyword schemeFunc string-fill! vector->list list->vector vector-fill! -syn keyword schemeFunc force with-input-from-file with-output-to-file -syn keyword schemeFunc char-ready? load transcript-on transcript-off eval -syn keyword schemeFunc dynamic-wind port? values call-with-values -syn keyword schemeFunc scheme-report-environment null-environment -syn keyword schemeFunc interaction-environment -" R6RS -syn keyword schemeFunc make-eq-hashtable make-eqv-hashtable make-hashtable -syn keyword schemeFunc hashtable? hashtable-size hashtable-ref hashtable-set! -syn keyword schemeFunc hashtable-delete! hashtable-contains? hashtable-update! -syn keyword schemeFunc hashtable-copy hashtable-clear! hashtable-keys -syn keyword schemeFunc hashtable-entries hashtable-equivalence-function hashtable-hash-function -syn keyword schemeFunc hashtable-mutable? equal-hash string-hash string-ci-hash symbol-hash -syn keyword schemeFunc find for-all exists filter partition fold-left fold-right -syn keyword schemeFunc remp remove remv remq memp assp cons* - -" ... so that a single + or -, inside a quoted context, would not be -" interpreted as a number (outside such contexts, it's a schemeFunc) - -syn match schemeDelimiter !\.[ \t\[\]()";]!me=e-1 -syn match schemeDelimiter !\.$! -" ... and a single dot is not a number but a delimiter - -" This keeps all other stuff unhighlighted, except *stuff* and <stuff>: - -syn match schemeOther ,[a-z!$%&*/:<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*, -syn match schemeError ,[a-z!$%&*/:<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, - -syn match schemeOther "\.\.\." -syn match schemeError !\.\.\.[^ \t\[\]()";]\+! -" ... a special identifier - -syn match schemeConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]\+\*[ \t\[\]()";],me=e-1 -syn match schemeConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]\+\*$, -syn match schemeError ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, +syn match schemeParentheses "[^ '`\t\n()\[\]";]\+" +syn match schemeParentheses "[)\]]" -syn match schemeConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t\[\]()";],me=e-1 -syn match schemeConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$, -syn match schemeError ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*, +syn match schemeIdentifier /[^ '`\t\n()\[\]"|;][^ '`\t\n()\[\]"|;]*/ -" Non-quoted lists, and strings: +syn region schemeQuote matchgroup=schemeData start=/'[`']*/ end=/[ \t\n()\[\]";]/me=e-1 +syn region schemeQuote matchgroup=schemeData start=/'['`]*"/ skip=/\\[\\"]/ end=/"/ +syn region schemeQuote matchgroup=schemeData start=/'['`]*|/ skip=/\\[\\|]/ end=/|/ +syn region schemeQuote matchgroup=schemeData start=/'['`]*#\?(/ end=/)/ contains=ALLBUT,schemeQuasiquote,schemeQuasiquoteForm,schemeUnquote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster -syn region schemeStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL -syn region schemeStruc matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALL +syn region schemeQuasiquote matchgroup=schemeData start=/`['`]*/ end=/[ \t\n()\[\]";]/me=e-1 +syn region schemeQuasiquote matchgroup=schemeData start=/`['`]*#\?(/ end=/)/ contains=ALLBUT,schemeQuote,schemeQuoteForm,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster -syn region schemeStruc matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALL -syn region schemeStruc matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALL +syn region schemeUnquote matchgroup=schemeParentheses start=/,/ end=/[ `'\t\n\[\]()";]/me=e-1 contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster +syn region schemeUnquote matchgroup=schemeParentheses start=/,@/ end=/[ `'\t\n\[\]()";]/me=e-1 contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster +syn region schemeUnquote matchgroup=schemeParentheses start=/,(/ end=/)/ contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster +syn region schemeUnquote matchgroup=schemeParentheses start=/,@(/ end=/)/ contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster -" Simple literals: -syn region schemeString start=+\%(\\\)\@<!"+ skip=+\\[\\"]+ end=+"+ contains=@Spell +syn region schemeQuoteForm matchgroup=schemeData start=/(/ end=/)/ contained contains=ALLBUT,schemeQuasiquote,schemeQuasiquoteForm,schemeUnquote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster +syn region schemeQuasiquoteForm matchgroup=schemeData start=/(/ end=/)/ contained contains=ALLBUT,schemeQuote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster -" Comments: +syn region schemeString start=/\(\\\)\@<!"/ skip=/\\[\\"]/ end=/"/ +syn region schemeSymbol start=/\(\\\)\@<!|/ skip=/\\[\\|]/ end=/|/ -syn match schemeComment ";.*$" contains=@Spell +syn match schemeNumber /\(#[dbeio]\)*[+\-]*\([0-9]\+\|inf.0\|nan.0\)\(\/\|\.\)\?[0-9+\-@\ilns]*\>/ +syn match schemeNumber /#x[+\-]*[0-9a-fA-F]\+\>/ +syn match schemeBoolean /#t\(rue\)\?/ +syn match schemeBoolean /#f\(alse\)\?/ -" Writing out the complete description of Scheme numerals without -" using variables is a day's work for a trained secretary... +syn match schemeCharacter /#\\.[^ `'\t\n\[\]()]*/ +syn match schemeCharacter /#\\x[0-9a-fA-F]\+/ -syn match schemeOther ![+-][ \t\[\]()";]!me=e-1 -syn match schemeOther ![+-]$! -" -" This is a useful lax approximation: -syn match schemeNumber "[-#+.]\=[0-9][-#+/0-9a-f@i.boxesfdl]*" -syn match schemeError ![-#+0-9.][-#+/0-9a-f@i.boxesfdl]*[^-#+/0-9a-f@i.boxesfdl \t\[\]()";][^ \t\[\]()";]*! +syn match schemeComment /;.*$/ -syn match schemeBoolean "#[tf]" -syn match schemeError !#[tf][^ \t\[\]()";]\+! +syn region schemeMultilineComment start=/#|/ end=/|#/ contains=schemeMultilineComment -syn match schemeCharacter "#\\" -syn match schemeCharacter "#\\." -syn match schemeError !#\\.[^ \t\[\]()";]\+! -syn match schemeCharacter "#\\space" -syn match schemeError !#\\space[^ \t\[\]()";]\+! -syn match schemeCharacter "#\\newline" -syn match schemeError !#\\newline[^ \t\[\]()";]\+! +syn region schemeForm matchgroup=schemeParentheses start="(" end=")" contains=ALLBUT,schemeUnquote,schemeDatumCommentForm,@schemeImportCluster +syn region schemeForm matchgroup=schemeParentheses start="\[" end="\]" contains=ALLBUT,schemeUnquote,schemeDatumCommentForm,@schemeImportCluster -" R6RS -syn match schemeCharacter "#\\x[0-9a-fA-F]\+" +syn region schemeVector matchgroup=schemeData start="#(" end=")" contains=ALLBUT,schemeQuasiquote,schemeQuasiquoteForm,schemeUnquote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster +syn region schemeVector matchgroup=schemeData start="#[fsu]\d\+(" end=")" contains=schemeNumber,schemeComment,schemeDatumComment - -if exists("b:is_mzscheme") || exists("is_mzscheme") - " MzScheme extensions - " multiline comment - syn region schemeComment start="#|" end="|#" contains=@Spell - - " #%xxx are the special MzScheme identifiers - syn match schemeOther "#%[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" - " anything limited by |'s is identifier - syn match schemeOther "|[^|]\+|" - - syn match schemeCharacter "#\\\%(return\|tab\)" - - " Modules require stmt - syn keyword schemeExtSyntax module require dynamic-require lib prefix all-except prefix-all-except rename - " modules provide stmt - syn keyword schemeExtSyntax provide struct all-from all-from-except all-defined all-defined-except - " Other from MzScheme - syn keyword schemeExtSyntax with-handlers when unless instantiate define-struct case-lambda syntax-case - syn keyword schemeExtSyntax free-identifier=? bound-identifier=? module-identifier=? syntax-object->datum - syn keyword schemeExtSyntax datum->syntax-object - syn keyword schemeExtSyntax let-values let*-values letrec-values set!-values fluid-let parameterize begin0 - syn keyword schemeExtSyntax error raise opt-lambda define-values unit unit/sig define-signature - syn keyword schemeExtSyntax invoke-unit/sig define-values/invoke-unit/sig compound-unit/sig import export - syn keyword schemeExtSyntax link syntax quasisyntax unsyntax with-syntax - - syn keyword schemeExtFunc format system-type current-extension-compiler current-extension-linker - syn keyword schemeExtFunc use-standard-linker use-standard-compiler - syn keyword schemeExtFunc find-executable-path append-object-suffix append-extension-suffix - syn keyword schemeExtFunc current-library-collection-paths current-extension-compiler-flags make-parameter - syn keyword schemeExtFunc current-directory build-path normalize-path current-extension-linker-flags - syn keyword schemeExtFunc file-exists? directory-exists? delete-directory/files delete-directory delete-file - syn keyword schemeExtFunc system compile-file system-library-subpath getenv putenv current-standard-link-libraries - syn keyword schemeExtFunc remove* file-size find-files fold-files directory-list shell-execute split-path - syn keyword schemeExtFunc current-error-port process/ports process printf fprintf open-input-string open-output-string - syn keyword schemeExtFunc get-output-string - " exceptions - syn keyword schemeExtFunc exn exn:application:arity exn:application:continuation exn:application:fprintf:mismatch - syn keyword schemeExtFunc exn:application:mismatch exn:application:type exn:application:mismatch exn:break exn:i/o:filesystem exn:i/o:port - syn keyword schemeExtFunc exn:i/o:port:closed exn:i/o:tcp exn:i/o:udp exn:misc exn:misc:application exn:misc:unsupported exn:module exn:read - syn keyword schemeExtFunc exn:read:non-char exn:special-comment exn:syntax exn:thread exn:user exn:variable exn:application:mismatch - syn keyword schemeExtFunc exn? exn:application:arity? exn:application:continuation? exn:application:fprintf:mismatch? exn:application:mismatch? - syn keyword schemeExtFunc exn:application:type? exn:application:mismatch? exn:break? exn:i/o:filesystem? exn:i/o:port? exn:i/o:port:closed? - syn keyword schemeExtFunc exn:i/o:tcp? exn:i/o:udp? exn:misc? exn:misc:application? exn:misc:unsupported? exn:module? exn:read? exn:read:non-char? - syn keyword schemeExtFunc exn:special-comment? exn:syntax? exn:thread? exn:user? exn:variable? exn:application:mismatch? - " Command-line parsing - syn keyword schemeExtFunc command-line current-command-line-arguments once-any help-labels multi once-each - - " syntax quoting, unquoting and quasiquotation - syn region schemeUnquote matchgroup=Delimiter start="#," end=![ \t\[\]()";]!me=e-1 contains=ALL - syn region schemeUnquote matchgroup=Delimiter start="#,@" end=![ \t\[\]()";]!me=e-1 contains=ALL - syn region schemeUnquote matchgroup=Delimiter start="#,(" end=")" contains=ALL - syn region schemeUnquote matchgroup=Delimiter start="#,@(" end=")" contains=ALL - syn region schemeUnquote matchgroup=Delimiter start="#,\[" end="\]" contains=ALL - syn region schemeUnquote matchgroup=Delimiter start="#,@\[" end="\]" contains=ALL - syn region schemeQuoted matchgroup=Delimiter start="#['`]" end=![ \t()\[\]";]!me=e-1 contains=ALL - syn region schemeQuoted matchgroup=Delimiter start="#['`](" matchgroup=Delimiter end=")" contains=ALL - - " Identifiers are very liberal in MzScheme/Racket - syn match schemeOther ![^()[\]{}",'`;#|\\ ]\+! - - " Language setting - syn match schemeLang "#lang [-+_/A-Za-z0-9]\+\>" - - " Various number forms - syn match schemeNumber "[-+]\=[0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\>" - syn match schemeNumber "[-+]\=\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>" - syn match schemeNumber "[-+]\=[0-9]\+/[0-9]\+\>" - syn match schemeNumber "\([-+]\=\([0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\|[0-9]\+/[0-9]\+\)\)\=[-+]\([0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\|[0-9]\+/[0-9]\+\)\=i\>" +if exists('g:is_chicken') || exists('b:is_chicken') + syn region schemeImport matchgroup=schemeImport start="\(([ \t\n]*\)\@<=\(import\|import-syntax\|use\|require-extension\)\(-for-syntax\)\?\>" end=")"me=e-1 contained contains=schemeImportForm,schemeIdentifier,schemeComment,schemeDatumComment +else + syn region schemeImport matchgroup=schemeImport start="\(([ \t\n]*\)\@<=\(import\)\>" end=")"me=e-1 contained contains=schemeImportForm,schemeIdentifier,schemeComment,schemeDatumComment endif - -if exists("b:is_chicken") || exists("is_chicken") - " multiline comment - syntax region schemeMultilineComment start=/#|/ end=/|#/ contains=@Spell,schemeMultilineComment - - syn match schemeOther "##[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" - syn match schemeExtSyntax "#:[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" - - syn keyword schemeExtSyntax unit uses declare hide foreign-declare foreign-parse foreign-parse/spec - syn keyword schemeExtSyntax foreign-lambda foreign-lambda* define-external define-macro load-library - syn keyword schemeExtSyntax let-values let*-values letrec-values ->string require-extension - syn keyword schemeExtSyntax let-optionals let-optionals* define-foreign-variable define-record - syn keyword schemeExtSyntax pointer tag-pointer tagged-pointer? define-foreign-type - syn keyword schemeExtSyntax require require-for-syntax cond-expand and-let* receive argc+argv - syn keyword schemeExtSyntax fixnum? fx= fx> fx< fx>= fx<= fxmin fxmax - syn keyword schemeExtFunc ##core#inline ##sys#error ##sys#update-errno - - " here-string - syn region schemeString start=+#<<\s*\z(.*\)+ end=+^\z1$+ contains=@Spell - - if filereadable(expand("<sfile>:p:h")."/cpp.vim") - unlet! b:current_syntax - syn include @ChickenC <sfile>:p:h/cpp.vim - syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-declare "+ end=+")\@=+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+foreign-declare\s*#<<\z(.*\)$+hs=s+15 end=+^\z1$+ contains=@ChickenC - syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse "+ end=+")\@=+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+foreign-parse\s*#<<\z(.*\)$+hs=s+13 end=+^\z1$+ contains=@ChickenC - syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse/spec "+ end=+")\@=+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+foreign-parse/spec\s*#<<\z(.*\)$+hs=s+18 end=+^\z1$+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+#>+ end=+<#+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+#>?+ end=+<#+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+#>!+ end=+<#+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+#>\$+ end=+<#+ contains=@ChickenC - syn region ChickenC matchgroup=schemeComment start=+#>%+ end=+<#+ contains=@ChickenC - endif - - " suggested by Alex Queiroz - syn match schemeExtSyntax "#![-a-z!$%&*/:<=>?^_~0-9+.@#%]\+" - syn region schemeString start=+#<#\s*\z(.*\)+ end=+^\z1$+ contains=@Spell +syn match schemeImportKeyword "\(([ \t\n]*\)\@<=\(except\|only\|prefix\|rename\|srfi\)\>" +syn region schemeImportForm matchgroup=schemeParentheses start="(" end=")" contained contains=schemeIdentifier,schemeComment,schemeDatumComment,@schemeImportCluster +syn cluster schemeImportCluster contains=schemeImportForm,schemeImportKeyword + +syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*/ end=/[ \t\n()\[\]";]/me=e-1 +syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*"/ skip=/\\[\\"]/ end=/"/ +syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*|/ skip=/\\[\\|]/ end=/|/ +syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*\(#\([usf]\d\+\)\?\)\?(/ end=/)/ contains=schemeDatumCommentForm +syn region schemeDatumCommentForm start="(" end=")" contained contains=schemeDatumCommentForm + +syn cluster schemeSyntaxCluster contains=schemeFunction,schemeKeyword,schemeSyntax,schemeExtraSyntax,schemeLibrarySyntax,schemeSyntaxSyntax + +syn keyword schemeLibrarySyntax define-library +syn keyword schemeLibrarySyntax export +syn keyword schemeLibrarySyntax include +syn keyword schemeLibrarySyntax include-ci +syn keyword schemeLibrarySyntax include-library-declarations +syn keyword schemeLibrarySyntax library +syn keyword schemeLibrarySyntax cond-expand + +syn keyword schemeSyntaxSyntax define-syntax +syn keyword schemeSyntaxSyntax let-syntax +syn keyword schemeSyntaxSyntax letrec-syntax +syn keyword schemeSyntaxSyntax syntax-rules + +syn keyword schemeSyntax => +syn keyword schemeSyntax and +syn keyword schemeSyntax begin +syn keyword schemeSyntax case +syn keyword schemeSyntax case-lambda +syn keyword schemeSyntax cond +syn keyword schemeSyntax define +syn keyword schemeSyntax define-record-type +syn keyword schemeSyntax define-values +syn keyword schemeSyntax delay +syn keyword schemeSyntax delay-force +syn keyword schemeSyntax do +syn keyword schemeSyntax else +syn keyword schemeSyntax guard +syn keyword schemeSyntax if +syn keyword schemeSyntax lambda +syn keyword schemeSyntax let +syn keyword schemeSyntax let* +syn keyword schemeSyntax let*-values +syn keyword schemeSyntax let-values +syn keyword schemeSyntax letrec +syn keyword schemeSyntax letrec* +syn keyword schemeSyntax or +syn keyword schemeSyntax parameterize +syn keyword schemeSyntax quasiquote +syn keyword schemeSyntax quote +syn keyword schemeSyntax set! +syn keyword schemeSyntax unless +syn keyword schemeSyntax unquote +syn keyword schemeSyntax unquote-splicing +syn keyword schemeSyntax when + +syn keyword schemeFunction * +syn keyword schemeFunction + +syn keyword schemeFunction - +syn keyword schemeFunction / +syn keyword schemeFunction < +syn keyword schemeFunction <= +syn keyword schemeFunction = +syn keyword schemeFunction > +syn keyword schemeFunction >= +syn keyword schemeFunction abs +syn keyword schemeFunction acos +syn keyword schemeFunction acos +syn keyword schemeFunction angle +syn keyword schemeFunction append +syn keyword schemeFunction apply +syn keyword schemeFunction asin +syn keyword schemeFunction assoc +syn keyword schemeFunction assq +syn keyword schemeFunction assv +syn keyword schemeFunction atan +syn keyword schemeFunction binary-port? +syn keyword schemeFunction boolean=? +syn keyword schemeFunction boolean? +syn keyword schemeFunction bytevector +syn keyword schemeFunction bytevector-append +syn keyword schemeFunction bytevector-append +syn keyword schemeFunction bytevector-copy +syn keyword schemeFunction bytevector-copy! +syn keyword schemeFunction bytevector-length +syn keyword schemeFunction bytevector-u8-ref +syn keyword schemeFunction bytevector-u8-set! +syn keyword schemeFunction bytevector? +syn keyword schemeFunction caaaar +syn keyword schemeFunction caaadr +syn keyword schemeFunction caaar +syn keyword schemeFunction caadar +syn keyword schemeFunction caaddr +syn keyword schemeFunction caadr +syn keyword schemeFunction caar +syn keyword schemeFunction cadaar +syn keyword schemeFunction cadadr +syn keyword schemeFunction cadar +syn keyword schemeFunction caddar +syn keyword schemeFunction cadddr +syn keyword schemeFunction caddr +syn keyword schemeFunction cadr +syn keyword schemeFunction call-with-current-continuation +syn keyword schemeFunction call-with-input-file +syn keyword schemeFunction call-with-output-file +syn keyword schemeFunction call-with-port +syn keyword schemeFunction call-with-values +syn keyword schemeFunction call/cc +syn keyword schemeFunction car +syn keyword schemeFunction cdaaar +syn keyword schemeFunction cdaadr +syn keyword schemeFunction cdaar +syn keyword schemeFunction cdadar +syn keyword schemeFunction cdaddr +syn keyword schemeFunction cdadr +syn keyword schemeFunction cdar +syn keyword schemeFunction cddaar +syn keyword schemeFunction cddadr +syn keyword schemeFunction cddar +syn keyword schemeFunction cdddar +syn keyword schemeFunction cddddr +syn keyword schemeFunction cdddr +syn keyword schemeFunction cddr +syn keyword schemeFunction cdr +syn keyword schemeFunction ceiling +syn keyword schemeFunction char->integer +syn keyword schemeFunction char-alphabetic? +syn keyword schemeFunction char-ci<=? +syn keyword schemeFunction char-ci<? +syn keyword schemeFunction char-ci=? +syn keyword schemeFunction char-ci>=? +syn keyword schemeFunction char-ci>? +syn keyword schemeFunction char-downcase +syn keyword schemeFunction char-foldcase +syn keyword schemeFunction char-lower-case? +syn keyword schemeFunction char-numeric? +syn keyword schemeFunction char-ready? +syn keyword schemeFunction char-upcase +syn keyword schemeFunction char-upper-case? +syn keyword schemeFunction char-whitespace? +syn keyword schemeFunction char<=? +syn keyword schemeFunction char<? +syn keyword schemeFunction char=? +syn keyword schemeFunction char>=? +syn keyword schemeFunction char>? +syn keyword schemeFunction char? +syn keyword schemeFunction close-input-port +syn keyword schemeFunction close-output-port +syn keyword schemeFunction close-port +syn keyword schemeFunction command-line +syn keyword schemeFunction complex? +syn keyword schemeFunction cons +syn keyword schemeFunction cos +syn keyword schemeFunction current-error-port +syn keyword schemeFunction current-input-port +syn keyword schemeFunction current-jiffy +syn keyword schemeFunction current-output-port +syn keyword schemeFunction current-second +syn keyword schemeFunction delete-file +syn keyword schemeFunction denominator +syn keyword schemeFunction digit-value +syn keyword schemeFunction display +syn keyword schemeFunction dynamic-wind +syn keyword schemeFunction emergency-exit +syn keyword schemeFunction environment +syn keyword schemeFunction eof-object +syn keyword schemeFunction eof-object? +syn keyword schemeFunction eq? +syn keyword schemeFunction equal? +syn keyword schemeFunction eqv? +syn keyword schemeFunction error +syn keyword schemeFunction error-object-irritants +syn keyword schemeFunction error-object-message +syn keyword schemeFunction error-object? +syn keyword schemeFunction eval +syn keyword schemeFunction even? +syn keyword schemeFunction exact +syn keyword schemeFunction exact->inexact +syn keyword schemeFunction exact-integer-sqrt +syn keyword schemeFunction exact-integer? +syn keyword schemeFunction exact? +syn keyword schemeFunction exit +syn keyword schemeFunction exp +syn keyword schemeFunction expt +syn keyword schemeFunction features +syn keyword schemeFunction file-error? +syn keyword schemeFunction file-exists? +syn keyword schemeFunction finite? +syn keyword schemeFunction floor +syn keyword schemeFunction floor-quotient +syn keyword schemeFunction floor-remainder +syn keyword schemeFunction floor/ +syn keyword schemeFunction flush-output-port +syn keyword schemeFunction for-each +syn keyword schemeFunction force +syn keyword schemeFunction gcd +syn keyword schemeFunction get-environment-variable +syn keyword schemeFunction get-environment-variables +syn keyword schemeFunction get-output-bytevector +syn keyword schemeFunction get-output-string +syn keyword schemeFunction imag-part +syn keyword schemeFunction inexact +syn keyword schemeFunction inexact->exact +syn keyword schemeFunction inexact? +syn keyword schemeFunction infinite? +syn keyword schemeFunction input-port-open? +syn keyword schemeFunction input-port? +syn keyword schemeFunction integer->char +syn keyword schemeFunction integer? +syn keyword schemeFunction interaction-environment +syn keyword schemeFunction jiffies-per-second +syn keyword schemeFunction lcm +syn keyword schemeFunction length +syn keyword schemeFunction list +syn keyword schemeFunction list->string +syn keyword schemeFunction list->vector +syn keyword schemeFunction list-copy +syn keyword schemeFunction list-ref +syn keyword schemeFunction list-set! +syn keyword schemeFunction list-tail +syn keyword schemeFunction list? +syn keyword schemeFunction load +syn keyword schemeFunction log +syn keyword schemeFunction magnitude +syn keyword schemeFunction make-bytevector +syn keyword schemeFunction make-list +syn keyword schemeFunction make-parameter +syn keyword schemeFunction make-polar +syn keyword schemeFunction make-promise +syn keyword schemeFunction make-rectangular +syn keyword schemeFunction make-string +syn keyword schemeFunction make-vector +syn keyword schemeFunction map +syn keyword schemeFunction max +syn keyword schemeFunction member +syn keyword schemeFunction memq +syn keyword schemeFunction memv +syn keyword schemeFunction min +syn keyword schemeFunction modulo +syn keyword schemeFunction nan? +syn keyword schemeFunction negative? +syn keyword schemeFunction newline +syn keyword schemeFunction not +syn keyword schemeFunction null-environment +syn keyword schemeFunction null? +syn keyword schemeFunction number->string +syn keyword schemeFunction number? +syn keyword schemeFunction numerator +syn keyword schemeFunction odd? +syn keyword schemeFunction open-binary-input-file +syn keyword schemeFunction open-binary-output-file +syn keyword schemeFunction open-input-bytevector +syn keyword schemeFunction open-input-file +syn keyword schemeFunction open-input-string +syn keyword schemeFunction open-output-bytevector +syn keyword schemeFunction open-output-file +syn keyword schemeFunction open-output-string +syn keyword schemeFunction output-port-open? +syn keyword schemeFunction output-port? +syn keyword schemeFunction pair? +syn keyword schemeFunction peek-char +syn keyword schemeFunction peek-u8 +syn keyword schemeFunction port? +syn keyword schemeFunction positive? +syn keyword schemeFunction procedure? +syn keyword schemeFunction promise? +syn keyword schemeFunction quotient +syn keyword schemeFunction raise +syn keyword schemeFunction raise-continuable +syn keyword schemeFunction rational? +syn keyword schemeFunction rationalize +syn keyword schemeFunction read +syn keyword schemeFunction read-bytevector +syn keyword schemeFunction read-bytevector! +syn keyword schemeFunction read-char +syn keyword schemeFunction read-error? +syn keyword schemeFunction read-line +syn keyword schemeFunction read-string +syn keyword schemeFunction read-u8 +syn keyword schemeFunction real-part +syn keyword schemeFunction real? +syn keyword schemeFunction remainder +syn keyword schemeFunction reverse +syn keyword schemeFunction round +syn keyword schemeFunction scheme-report-environment +syn keyword schemeFunction set-car! +syn keyword schemeFunction set-cdr! +syn keyword schemeFunction sin +syn keyword schemeFunction sqrt +syn keyword schemeFunction square +syn keyword schemeFunction string +syn keyword schemeFunction string->list +syn keyword schemeFunction string->number +syn keyword schemeFunction string->symbol +syn keyword schemeFunction string->utf8 +syn keyword schemeFunction string->vector +syn keyword schemeFunction string-append +syn keyword schemeFunction string-ci<=? +syn keyword schemeFunction string-ci<? +syn keyword schemeFunction string-ci=? +syn keyword schemeFunction string-ci>=? +syn keyword schemeFunction string-ci>? +syn keyword schemeFunction string-copy +syn keyword schemeFunction string-copy! +syn keyword schemeFunction string-downcase +syn keyword schemeFunction string-fill! +syn keyword schemeFunction string-foldcase +syn keyword schemeFunction string-for-each +syn keyword schemeFunction string-length +syn keyword schemeFunction string-map +syn keyword schemeFunction string-ref +syn keyword schemeFunction string-set! +syn keyword schemeFunction string-upcase +syn keyword schemeFunction string<=? +syn keyword schemeFunction string<? +syn keyword schemeFunction string=? +syn keyword schemeFunction string>=? +syn keyword schemeFunction string>? +syn keyword schemeFunction string? +syn keyword schemeFunction substring +syn keyword schemeFunction symbol->string +syn keyword schemeFunction symbol=? +syn keyword schemeFunction symbol? +syn keyword schemeFunction syntax-error +syn keyword schemeFunction tan +syn keyword schemeFunction textual-port? +syn keyword schemeFunction transcript-off +syn keyword schemeFunction transcript-on +syn keyword schemeFunction truncate +syn keyword schemeFunction truncate-quotient +syn keyword schemeFunction truncate-remainder +syn keyword schemeFunction truncate/ +syn keyword schemeFunction u8-ready? +syn keyword schemeFunction utf8->string +syn keyword schemeFunction values +syn keyword schemeFunction vector +syn keyword schemeFunction vector->list +syn keyword schemeFunction vector->string +syn keyword schemeFunction vector-append +syn keyword schemeFunction vector-copy +syn keyword schemeFunction vector-copy! +syn keyword schemeFunction vector-fill! +syn keyword schemeFunction vector-for-each +syn keyword schemeFunction vector-length +syn keyword schemeFunction vector-map +syn keyword schemeFunction vector-ref +syn keyword schemeFunction vector-set! +syn keyword schemeFunction vector? +syn keyword schemeFunction with-exception-handler +syn keyword schemeFunction with-input-from-file +syn keyword schemeFunction with-output-to-file +syn keyword schemeFunction write +syn keyword schemeFunction write-bytevector +syn keyword schemeFunction write-char +syn keyword schemeFunction write-shared +syn keyword schemeFunction write-simple +syn keyword schemeFunction write-string +syn keyword schemeFunction write-u8 +syn keyword schemeFunction zero? + +hi def link schemeBoolean Boolean +hi def link schemeCharacter Character +hi def link schemeComment Comment +hi def link schemeConstant Constant +hi def link schemeData Delimiter +hi def link schemeDatumComment Comment +hi def link schemeDatumCommentForm Comment +hi def link schemeDelimiter Delimiter +hi def link schemeError Error +hi def link schemeExtraSyntax Underlined +hi def link schemeFunction Function +hi def link schemeIdentifier Normal +hi def link schemeImport PreProc +hi def link schemeImportKeyword PreProc +hi def link schemeKeyword Type +hi def link schemeLibrarySyntax PreProc +hi def link schemeMultilineComment Comment +hi def link schemeNumber Number +hi def link schemeParentheses Normal +hi def link schemeQuasiquote Delimiter +hi def link schemeQuote Delimiter +hi def link schemeSpecialSyntax Special +hi def link schemeString String +hi def link schemeSymbol Normal +hi def link schemeSyntax Statement +hi def link schemeSyntaxSyntax PreProc +hi def link schemeTypeSyntax Type + +let b:did_scheme_syntax = 1 + +if exists('b:is_chicken') || exists('g:is_chicken') + exe 'ru! syntax/chicken.vim' endif -" Synchronization and the wrapping up... - -syn sync match matchPlace grouphere NONE "^[^ \t]" -" ... i.e. synchronize on a line that starts at the left margin - -" Define the default highlighting. -" Only when an item doesn't have highlighting yet - -hi def link schemeSyntax Statement -hi def link schemeFunc Function - -hi def link schemeString String -hi def link schemeCharacter Character -hi def link schemeNumber Number -hi def link schemeBoolean Boolean - -hi def link schemeDelimiter Delimiter -hi def link schemeConstant Constant - -hi def link schemeComment Comment -hi def link schemeMultilineComment Comment -hi def link schemeError Error - -hi def link schemeExtSyntax Type -hi def link schemeExtFunc PreProc - -hi def link schemeLang PreProc - - -let b:current_syntax = "scheme" - -let &cpo = s:cpo_save -unlet s:cpo_save +unlet b:did_scheme_syntax +let b:current_syntax = 'scheme' +let &cpo = s:cpo +unlet s:cpo diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 838c5eb4a7..167300c524 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,8 +2,8 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> " Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> -" Last Change: Oct 02, 2017 -" Version: 172 +" Last Change: Jul 31, 2018 +" Version: 179 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) @@ -121,22 +121,22 @@ syn case match " Clusters: contains=@... clusters {{{1 "================================== syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsacError,shCurlyError,shParenError,shTestError,shOK -if exists("b:is_kornshell") +if exists("b:is_kornshell") || exists("b:is_bash") syn cluster ErrorList add=shDTestError endif syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,shDo,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shHereString,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement,shIf,shFor syn cluster shArithList contains=@shArithParenList,shParenError -syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange -syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq -syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable +syn cluster shCaseEsacList contains=shCaseStart,shCaseLabel,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange +syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSubBQ,shComment,shDo,shEcho,shExpr,shFor,shForPP,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq +syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shComment,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial -syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial +syn cluster shDblQuoteList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial,shSpecialDQ syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS syn cluster shDerefVarList contains=shDerefOff,shDerefOp,shDerefVarArray,shDerefOpError -syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shEscape,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote +syn cluster shEchoList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shEscape,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest -syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq +syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq if exists("b:is_kornshell") || exists("b:is_bash") syn cluster shFunctionList add=shRepeat syn cluster shFunctionList add=shDblBrace,shDblParen @@ -144,12 +144,12 @@ endif syn cluster shHereBeginList contains=@shCommandSubList syn cluster shHereList contains=shBeginHere,shHerePayload syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload -syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shHereString,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr +syn cluster shIdList contains=shCommandSub,shCommandSubBQ,shWrapLineOperator,shSetOption,shComment,shDeref,shDerefSimple,shHereString,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shForPP,shIf,shOption,shSet,shTest,shTestOpr,shTouch syn cluster shPPSRightList contains=shComment,shDeref,shDerefSimple,shEscape,shPosnParm -syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator -syn cluster shTestList contains=shCharClass,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr +syn cluster shSubShList contains=@shCommandSubList,shCommandSubBQ,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator +syn cluster shTestList contains=shCharClass,shCommandSub,shCommandSubBQ,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr syn cluster shNoZSList contains=shSpecialNoZS " Echo: {{{1 @@ -164,7 +164,7 @@ syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" ski " Alias: {{{1 " ===== -if exists("b:is_kornshell") || exists("b:is_bash") +if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix") syn match shStatement "\<alias\>" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="=" @@ -186,7 +186,7 @@ if !exists("g:sh_no_error") syn match shCurlyError "}" syn match shParenError ")" syn match shOK '\.\(done\|fi\|in\|esac\)' - if exists("b:is_kornshell") + if exists("b:is_kornshell") || exists("b:is_bash") syn match shDTestError "]]" endif syn match shTestError "]" @@ -245,12 +245,14 @@ ShFoldIfDoFor syn region shIf transparent matchgroup=shConditional start="\<if\_ ShFoldIfDoFor syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn ShFoldIfDoFor syn region shForPP matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=shTestOpr -if exists("b:is_kornshell") || exists("b:is_bash") +if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix") syn cluster shCaseList add=shRepeat syn cluster shFunctionList add=shRepeat - syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace - syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace - syn region shCaseEsac matchgroup=shConditional start="\<select\s" matchgroup=shConditional end="\<in\>" end="\<do\>" contains=@shLoopList + syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace + syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace + if !exists("b:is_posix") + syn region shCaseEsac matchgroup=shConditional start="\<select\s" matchgroup=shConditional end="\<in\>" end="\<do\>" contains=@shLoopList + endif else syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<do\>"me=e-2 contains=@shLoopList syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<do\>"me=e-2 contains=@shLoopList @@ -260,14 +262,15 @@ syn match shComma contained "," " Case: case...esac {{{1 " ==== -syn match shCaseBar contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|" nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote -syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar +syn match shCaseBar contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|" nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote +syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar +syn match shCaseLabel contained skipwhite "\%(\\.\|[-a-zA-Z0-9_*.]\)\+" contains=shCharClass if exists("b:is_bash") - ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end=";&" end=";;&" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment -else - ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment + ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end=";&" end=";;&" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment +else + ShFoldIfDoFor syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment endif -ShFoldIfDoFor syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList +ShFoldIfDoFor syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote if exists("b:is_bash") @@ -287,8 +290,8 @@ endif " Misc: {{{1 "====== syn match shWrapLineOperator "\\$" -syn region shCommandSub start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList -syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' +syn region shCommandSubBQ start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList +syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' nextgroup=shSingleQuote,shDoubleQuote,shComment " $() and $(()): {{{1 " $(..) is not supported by sh (Bourne shell). However, apparently @@ -315,7 +318,7 @@ if exists("b:is_bash") syn keyword bashStatement command compgen endif -if exists("b:is_kornshell") +if exists("b:is_kornshell") || exists("b:is_posix") syn cluster shCommandSubList add=kshSpecialVariables,kshStatement syn cluster shCaseList add=kshStatement syn keyword kshSpecialVariables contained CDPATH COLUMNS EDITOR ENV ERRNO FCEDIT FPATH HISTFILE HISTSIZE HOME IFS LINENO LINES MAIL MAILCHECK MAILPATH OLDPWD OPTARG OPTIND PATH PPID PS1 PS2 PS3 PS4 PWD RANDOM REPLY SECONDS SHELL TMOUT VISUAL @@ -327,7 +330,7 @@ syn match shSource "^\.\s" syn match shSource "\s\.\s" "syn region shColon start="^\s*:" end="$" end="\s#"me=e-2 contains=@shColonList "syn region shColon start="^\s*\zs:" end="$" end="\s#"me=e-2 -if exists("b:is_kornshell") +if exists("b:is_kornshell") || exists("b:is_posix") syn match shColon '^\s*\zs:' endif @@ -339,24 +342,25 @@ syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained if exists("b:is_bash") syn match shSpecial "[^\\]\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained syn match shSpecial "^\(\\\\\)*\zs\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained -endif -if exists("b:is_bash") syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial nextgroup=shSpecialNxt syn region shExDoubleQuote matchgroup=shQuote start=+\$"+ skip=+\\\\\|\\.\|\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,shSpecial nextgroup=shSpecialNxt elseif !exists("g:sh_no_error") syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial endif -syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell -syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell +syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart,shSpecialSQ +syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart +syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contained contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart syn match shStringSpecial "[^[:print:] \t]" contained -syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" -syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shBkslshSnglQuote,shBkslshDblQuote,@shNoZSList +syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment +syn match shSpecialSQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,@shNoZSList +syn match shSpecialDQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshDblQuote,@shNoZSList +syn match shSpecialStart "\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,shBkslshDblQuote,@shNoZSList syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" syn match shSpecialNoZS contained "\%(\\\\\)*\\[\\"'`$()#]" syn match shSpecialNxt contained "\\[\\"'`$()#]" -syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell -syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell +syn region shBkslshSnglQuote contained matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart +syn region shBkslshDblQuote contained matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart " Comments: {{{1 "========== @@ -373,21 +377,22 @@ syn match shQuickComment contained "#.*$" " Here Documents: {{{1 " ========================================= -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\\\=\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\\\=\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<\s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc02 end="^\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\s*\z1\s*$" contains=@shDblQuoteList +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<-\s*\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc03 end="^\s*\z1\s*$" contains=@shDblQuoteList ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc04 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^']\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc06 end="^\s*\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc09 end="^\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\\\_$\_s*\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc07 end="^\z1\s*$" contains=@shDblQuoteList +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<\s*\\\_$\_s*'\z([^ \t0-9|>]\+\)'" matchgroup=shHereDoc08 end="^\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\"\z([^ \t0-9|>]\+\)\"" matchgroup=shHereDoc09 end="^\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<-\s*\\\_$\_s*\\\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc11 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*'\z([^ \t|>]\+\)'" matchgroup=shHereDoc12 end="^\s*\z1\s*$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<-\s*\\\_$\_s*\"\z([^ \t|>]\+\)\"" matchgroup=shHereDoc13 end="^\s*\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\\\z([^ \t|>]\+\)" matchgroup=shHereDoc14 end="^\z1\s*$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<\\\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc14 end="^\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<-\s*\\\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\z([^ \t0-9|>]\+\)" matchgroup=shHereDoc15 end="^\s*\z1\s*$" " Here Strings: {{{1 " ============= @@ -403,9 +408,11 @@ syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shVa syn match shVarAssign "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote syn region shAtExpr contained start="@(" end=")" contains=@shIdList if exists("b:is_bash") + syn match shSet "^\s*set\ze\s*$" syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList - syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="\ze[;|)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList -elseif exists("b:is_kornshell") + syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList nextgroup=shComment +elseif exists("b:is_kornshell") || exists("b:is_posix") + syn match shSet "^\s*set\ze\s*$" syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList else @@ -439,14 +446,14 @@ syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList, syn match shDerefSimple "\$[-#*@!?]" nextgroup=@shNoZSList syn match shDerefSimple "\$\$" nextgroup=@shNoZSList syn match shDerefSimple "\${\d}" nextgroup=@shNoZSList -if exists("b:is_bash") || exists("b:is_kornshell") +if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix") syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList nextgroup=@shSpecialNoZS endif " ksh: ${!var[*]} array index list syntax: {{{1 " ======================================== -if exists("b:is_kornshell") +if exists("b:is_kornshell") || exists("b:is_posix") syn region shDeref matchgroup=PreProc start="\${!" end="}" contains=@shDerefVarArray endif @@ -464,7 +471,7 @@ syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefO syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp syn match shDerefVar contained "{\@<=\h\w*" nextgroup=@shDerefVarList syn match shDerefVar contained '\d' nextgroup=@shDerefVarList -if exists("b:is_kornshell") +if exists("b:is_kornshell") || exists("b:is_posix") syn match shDerefVar contained "{\@<=\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList endif @@ -490,7 +497,7 @@ if !exists("g:sh_no_error") endif syn match shDerefOp contained ":\=[-=?]" nextgroup=@shDerefPatternList syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList -if exists("b:is_bash") || exists("b:is_kornshell") +if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix") syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern @@ -507,9 +514,9 @@ syn match shDerefString contained "\\["']" nextgroup=shDerefPattern if exists("b:is_bash") " bash : ${parameter:offset} " bash : ${parameter:offset:length} - syn region shDerefOff contained start=':' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple + syn region shDerefOff contained start=':[^-=?+]' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple syn region shDerefOff contained start=':\s-' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple - syn match shDerefLen contained ":[^}]\+" contains=shDeref,shDerefSimple + syn match shDerefLen contained ":[^}]\+" contains=shDeref,shDerefSimple,shArithmetic " bash : ${parameter//pattern/string} " bash : ${parameter//pattern} @@ -537,7 +544,7 @@ endif " Useful ksh Keywords: {{{1 " ==================== -if exists("b:is_kornshell") || exists("b:is_bash") +if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix") syn keyword shStatement autoload bg false fc fg functions getopts hash history integer jobs let nohup printf r stop suspend times true type unalias whence if exists("b:is_posix") syn keyword shStatement command @@ -587,6 +594,8 @@ if !exists("skip_sh_syntax_inits") hi def link shArithRegion shShellVariables hi def link shAstQuote shDoubleQuote hi def link shAtExpr shSetList + hi def link shBkslshSnglQuote shSingleQuote + hi def link shBkslshDblQuote shDOubleQuote hi def link shBeginHere shRedir hi def link shCaseBar shConditional hi def link shCaseCommandSub shCommandSub @@ -635,6 +644,7 @@ if !exists("skip_sh_syntax_inits") hi def link shSingleQuote shString hi def link shSource shOperator hi def link shStringSpecial shSpecial + hi def link shSpecialStart shSpecial hi def link shSubShRegion shOperator hi def link shTestOpr shConditional hi def link shTestPattern shString @@ -652,7 +662,7 @@ if !exists("skip_sh_syntax_inits") hi def link shDerefOff shDerefOp hi def link shDerefLen shDerefOff endif - if exists("b:is_kornshell") + if exists("b:is_kornshell") || exists("b:is_posix") hi def link kshSpecialVariables shShellVariables hi def link kshStatement shStatement endif @@ -669,7 +679,7 @@ if !exists("skip_sh_syntax_inits") hi def link shInError Error hi def link shParenError Error hi def link shTestError Error - if exists("b:is_kornshell") + if exists("b:is_kornshell") || exists("b:is_posix") hi def link shDTestError Error endif endif @@ -678,6 +688,7 @@ if !exists("skip_sh_syntax_inits") hi def link shCharClass Identifier hi def link shSnglCase Statement hi def link shCommandSub Special + hi def link shCommandSubBQ shCommandSub hi def link shComment Comment hi def link shConditional Conditional hi def link shCtrlSeq Special @@ -691,6 +702,8 @@ if !exists("skip_sh_syntax_inits") hi def link shSetList Identifier hi def link shShellVariables PreProc hi def link shSpecial Special + hi def link shSpecialDQ Special + hi def link shSpecialSQ Special hi def link shSpecialNoZS shSpecial hi def link shStatement Statement hi def link shString String @@ -725,6 +738,8 @@ if exists("b:is_bash") let b:current_syntax = "bash" elseif exists("b:is_kornshell") let b:current_syntax = "ksh" +elseif exists("b:is_posix") + let b:current_syntax = "posix" else let b:current_syntax = "sh" endif diff --git a/runtime/syntax/snobol4.vim b/runtime/syntax/snobol4.vim index a14f15eef4..11ce2e0059 100644 --- a/runtime/syntax/snobol4.vim +++ b/runtime/syntax/snobol4.vim @@ -2,15 +2,16 @@ " Language: SNOBOL4 " Maintainer: Rafal Sulejman <rms@poczta.onet.pl> " Site: http://rms.republika.pl/vim/syntax/snobol4.vim -" Last change: 2006 may 10 +" Last change: : Thu, 25 Jan 2018 14:21:24 +0100 " Changes: +" - system variables updated for SNOBOL4 2.0+ " - strict snobol4 mode (set snobol4_strict_mode to activate) " - incorrect HL of dots in strings corrected " - incorrect HL of dot-variables in parens corrected " - one character labels weren't displayed correctly. " - nonexistent Snobol4 keywords displayed as errors. -" quit when a syntax file was already loaded +" Quit when a syntax file was already loaded if exists("b:current_syntax") finish endif @@ -59,7 +60,7 @@ syn match snobol4Constant /"[^a-z"']\.[a-z][a-z0-9\-]*"/hs=s+1 syn region snobol4Goto start=":[sf]\{0,1}(" end=")\|$\|;" contains=ALLBUT,snobol4ParenError syn match snobol4Number "\<\d*\(\.\d\d*\)*\>" syn match snobol4BogusSysVar "&\w\{1,}" -syn match snobol4SysVar "&\(abort\|alphabet\|anchor\|arb\|bal\|case\|code\|dump\|errlimit\|errtext\|errtype\|fail\|fence\|fnclevel\|ftrace\|fullscan\|input\|lastno\|lcase\|maxlngth\|output\|parm\|rem\|rtntype\|stcount\|stfcount\|stlimit\|stno\|succeed\|trace\|trim\|ucase\)" +syn match snobol4SysVar "&\<\(abort\|alphabet\|anchor\|arb\|bal\|case\|code\|digits\|dump\|errlimit\|errtext\|errtype\|fail\|fence\|fnclevel\|ftrace\|fullscan\|input\|lastno\|lcase\|maxlngth\|output\|parm\|rem\|rtntype\|stcount\|stfcount\|stlimit\|stno\|succeed\|trace\|trim\|ucase\)\>" syn match snobol4ExtSysVar "&\(gtrace\|line\|file\|lastline\|lastfile\)" syn match snobol4Label "\(^\|;\)[^-\.\+ \t\*\.]\{1,}[^ \t\*\;]*" syn match snobol4Comment "\(^\|;\)\([\*\|!;#].*$\)" @@ -100,11 +101,11 @@ hi def link snobol4ErrInBracket snobol4Error hi def link snobol4SysVar Keyword hi def link snobol4BogusSysVar snobol4Error if exists("snobol4_strict_mode") -hi def link snobol4ExtSysVar WarningMsg -hi def link snobol4ExtKeyword WarningMsg + hi def link snobol4ExtSysVar WarningMsg + hi def link snobol4ExtKeyword WarningMsg else -hi def link snobol4ExtSysVar snobol4SysVar -hi def link snobol4ExtKeyword snobol4Keyword + hi def link snobol4ExtSysVar snobol4SysVar + hi def link snobol4ExtKeyword snobol4Keyword endif diff --git a/runtime/syntax/sqloracle.vim b/runtime/syntax/sqloracle.vim index bf2862f497..0907b48f0e 100644 --- a/runtime/syntax/sqloracle.vim +++ b/runtime/syntax/sqloracle.vim @@ -4,12 +4,15 @@ " Repository: https://github.com/chrisbra/vim-sqloracle-syntax " License: Vim " Previous Maintainer: Paul Moore -" Last Change: 2016 Jul 22 +" Last Change: 2018 June 24 " Changes: " 02.04.2016: Support for when keyword " 03.04.2016: Support for join related keywords " 22.07.2016: Support Oracle Q-Quote-Syntax +" 25.07.2016: Support for Oracle N'-Quote syntax +" 22.06.2018: Remove skip part for sqlString (do not escape strings) +" (https://web.archive.org/web/20150922065035/https://mariadb.com/kb/en/sql-99/character-string-literals/) if exists("b:current_syntax") finish @@ -49,12 +52,14 @@ syn keyword sqlStatement truncate " next ones are contained, so folding works. syn keyword sqlStatement create update alter select insert contained -syn keyword sqlType boolean char character date float integer long -syn keyword sqlType mlslabel number raw rowid varchar varchar2 varray +syn keyword sqlType bfile blob boolean char character clob date datetime +syn keyword sqlType dec decimal float int integer long mlslabel nchar +syn keyword sqlType nclob number numeric nvarchar2 precision raw rowid +syn keyword sqlType smallint real timestamp urowid varchar varchar2 varray " Strings: -syn region sqlString matchgroup=Quote start=+"+ skip=+\\\\\|\\"+ end=+"+ -syn region sqlString matchgroup=Quote start=+'+ skip=+\\\\\|\\'+ end=+'+ +syn region sqlString matchgroup=Quote start=+n\?"+ end=+"+ +syn region sqlString matchgroup=Quote start=+n\?'+ end=+'+ syn region sqlString matchgroup=Quote start=+n\?q'\z([^[(<{]\)+ end=+\z1'+ syn region sqlString matchgroup=Quote start=+n\?q'<+ end=+>'+ syn region sqlString matchgroup=Quote start=+n\?q'{+ end=+}'+ @@ -67,6 +72,7 @@ syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>" " Comments: syn region sqlComment start="/\*" end="\*/" contains=sqlTodo,@Spell fold syn match sqlComment "--.*$" contains=sqlTodo,@Spell +syn match sqlComment "^rem.*$" contains=sqlTodo,@Spell " Setup Folding: " this is a hack, to get certain statements folded. @@ -128,15 +134,15 @@ syn keyword sqlFunction xmlparse xmlpatch xmlpi xmlquery xmlroot xmlsequence xml syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE contained " Define the default highlighting. -hi def link Quote Special -hi def link sqlComment Comment -hi def link sqlFunction Function -hi def link sqlKeyword sqlSpecial -hi def link sqlNumber Number -hi def link sqlOperator sqlStatement -hi def link sqlSpecial Special +hi def link Quote Special +hi def link sqlComment Comment +hi def link sqlFunction Function +hi def link sqlKeyword sqlSpecial +hi def link sqlNumber Number +hi def link sqlOperator sqlStatement +hi def link sqlSpecial Special hi def link sqlStatement Statement -hi def link sqlString String +hi def link sqlString String hi def link sqlType Type hi def link sqlTodo Todo diff --git a/runtime/syntax/sudoers.vim b/runtime/syntax/sudoers.vim index df1eb99b42..31f5f2b7ed 100644 --- a/runtime/syntax/sudoers.vim +++ b/runtime/syntax/sudoers.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: sudoers(5) configuration files " Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2011-02-24 +" Latest Revision: 2018-07-19 +" Recent Changes: Support for #include and #includedir. if exists("b:current_syntax") finish @@ -24,6 +25,7 @@ syn cluster sudoersCmndSpecList contains=sudoersUserRunasBegin,sudoersPASS syn keyword sudoersTodo contained TODO FIXME XXX NOTE syn region sudoersComment display oneline start='#' end='$' contains=sudoersTodo +syn region sudoersInclude display oneline start='#\(include\|includedir\)' end='$' syn keyword sudoersAlias User_Alias Runas_Alias nextgroup=sudoersUserAlias skipwhite skipnl syn keyword sudoersAlias Host_Alias nextgroup=sudoersHostAlias skipwhite skipnl @@ -335,6 +337,7 @@ hi def link sudoersIntegerValue Number hi def link sudoersStringValue String hi def link sudoersListValue String hi def link sudoersPASSWD Special +hi def link sudoersInclude Statement let b:current_syntax = "sudoers" diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim index d5a5de65c8..d5f900ae5c 100644 --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM> -" Last Change: Oct 12, 2017 -" Version: 105 +" Last Change: Mar 30, 2018 +" Version: 109 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX " " Notes: {{{1 @@ -396,8 +396,8 @@ endif " Bad Math (mismatched): {{{1 if !exists("g:tex_no_math") && !s:tex_no_error - syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}" - syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}" + syn match texBadMath "\\end\s*{\s*\(array\|[bBpvV]matrix\|split\|smallmatrix\)\s*}" + syn match texBadMath "\\end\s*{\s*\(displaymath\|equation\|eqnarray\|math\)\*\=\s*}" syn match texBadMath "\\[\])]" endif @@ -436,17 +436,10 @@ if !exists("g:tex_no_math") endfun " Standard Math Zones: {{{2 - call TexNewMathZone("A","align",1) - call TexNewMathZone("B","alignat",1) - call TexNewMathZone("C","displaymath",1) - call TexNewMathZone("D","eqnarray",1) - call TexNewMathZone("E","equation",1) - call TexNewMathZone("F","flalign",1) - call TexNewMathZone("G","gather",1) - call TexNewMathZone("H","math",1) - call TexNewMathZone("I","multline",1) - call TexNewMathZone("J","xalignat",1) - call TexNewMathZone("K","xxalignat",0) + call TexNewMathZone("A","displaymath",1) + call TexNewMathZone("B","eqnarray",1) + call TexNewMathZone("C","equation",1) + call TexNewMathZone("D","math",1) " Inline Math Zones: {{{2 if s:tex_fast =~# 'M' @@ -1019,6 +1012,48 @@ if has("conceal") && &enc == 'utf-8' syn match texMathSymbol '\\hat{y}' contained conceal cchar=ŷ syn match texMathSymbol '\\hat{Y}' contained conceal cchar=Ŷ " syn match texMathSymbol '\\bar{a}' contained conceal cchar=a̅ + + syn match texMathSymbol '\\dot{B}' contained conceal cchar=Ḃ + syn match texMathSymbol '\\dot{b}' contained conceal cchar=ḃ + syn match texMathSymbol '\\dot{D}' contained conceal cchar=Ḋ + syn match texMathSymbol '\\dot{d}' contained conceal cchar=ḋ + syn match texMathSymbol '\\dot{F}' contained conceal cchar=Ḟ + syn match texMathSymbol '\\dot{f}' contained conceal cchar=ḟ + syn match texMathSymbol '\\dot{H}' contained conceal cchar=Ḣ + syn match texMathSymbol '\\dot{h}' contained conceal cchar=ḣ + syn match texMathSymbol '\\dot{M}' contained conceal cchar=Ṁ + syn match texMathSymbol '\\dot{m}' contained conceal cchar=ṁ + syn match texMathSymbol '\\dot{N}' contained conceal cchar=Ṅ + syn match texMathSymbol '\\dot{n}' contained conceal cchar=ṅ + syn match texMathSymbol '\\dot{P}' contained conceal cchar=Ṗ + syn match texMathSymbol '\\dot{p}' contained conceal cchar=ṗ + syn match texMathSymbol '\\dot{R}' contained conceal cchar=Ṙ + syn match texMathSymbol '\\dot{r}' contained conceal cchar=ṙ + syn match texMathSymbol '\\dot{S}' contained conceal cchar=Ṡ + syn match texMathSymbol '\\dot{s}' contained conceal cchar=ṡ + syn match texMathSymbol '\\dot{T}' contained conceal cchar=Ṫ + syn match texMathSymbol '\\dot{t}' contained conceal cchar=ṫ + syn match texMathSymbol '\\dot{W}' contained conceal cchar=Ẇ + syn match texMathSymbol '\\dot{w}' contained conceal cchar=ẇ + syn match texMathSymbol '\\dot{X}' contained conceal cchar=Ẋ + syn match texMathSymbol '\\dot{x}' contained conceal cchar=ẋ + syn match texMathSymbol '\\dot{Y}' contained conceal cchar=Ẏ + syn match texMathSymbol '\\dot{y}' contained conceal cchar=ẏ + syn match texMathSymbol '\\dot{Z}' contained conceal cchar=Ż + syn match texMathSymbol '\\dot{z}' contained conceal cchar=ż + + syn match texMathSymbol '\\dot{C}' contained conceal cchar=Ċ + syn match texMathSymbol '\\dot{c}' contained conceal cchar=ċ + syn match texMathSymbol '\\dot{E}' contained conceal cchar=Ė + syn match texMathSymbol '\\dot{e}' contained conceal cchar=ė + syn match texMathSymbol '\\dot{G}' contained conceal cchar=Ġ + syn match texMathSymbol '\\dot{g}' contained conceal cchar=ġ + syn match texMathSymbol '\\dot{I}' contained conceal cchar=İ + + syn match texMathSymbol '\\dot{A}' contained conceal cchar=Ȧ + syn match texMathSymbol '\\dot{a}' contained conceal cchar=ȧ + syn match texMathSymbol '\\dot{O}' contained conceal cchar=Ȯ + syn match texMathSymbol '\\dot{o}' contained conceal cchar=ȯ endif " Greek {{{2 diff --git a/runtime/syntax/tmux.vim b/runtime/syntax/tmux.vim index 1ba5f67736..62c0ce521a 100644 --- a/runtime/syntax/tmux.vim +++ b/runtime/syntax/tmux.vim @@ -1,5 +1,5 @@ " Language: tmux(1) configuration file -" Version: 2.3 (git-14dc2ac) +" Version: 2.7 (git-e4e060f2) " URL: https://github.com/ericpruitt/tmux.vim/ " Maintainer: Eric Pruitt <eric.pruitt@gmail.com> " License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause) @@ -14,7 +14,7 @@ let s:original_cpo = &cpo set cpo&vim let b:current_syntax = "tmux" -setlocal iskeyword+=- +syntax iskeyword @,48-57,_,192-255,- syntax case match syn keyword tmuxAction none any current other @@ -24,7 +24,7 @@ syn keyword tmuxTodo FIXME NOTE TODO XXX contained syn match tmuxColour /\<colour[0-9]\+/ display syn match tmuxKey /\(C-\|M-\|\^\)\+\S\+/ display -syn match tmuxNumber /\d\+/ display +syn match tmuxNumber /\<\d\+\>/ display syn match tmuxFlags /\s-\a\+/ display syn match tmuxVariable /\w\+=/ display syn match tmuxVariableExpansion /\${\=\w\+}\=/ display @@ -62,30 +62,30 @@ for s:i in range(0, 255) endfor syn keyword tmuxOptions -\ buffer-limit command-alias default-terminal escape-time exit-unattached -\ focus-events history-file message-limit set-clipboard terminal-overrides -\ assume-paste-time base-index bell-action bell-on-alert default-command +\ buffer-limit command-alias default-terminal escape-time exit-empty +\ activity-action assume-paste-time base-index bell-action default-command \ default-shell destroy-unattached detach-on-destroy \ display-panes-active-colour display-panes-colour display-panes-time -\ display-time history-limit key-table lock-after-time lock-command -\ message-attr message-bg message-command-attr message-command-bg -\ message-command-fg message-command-style message-fg message-style mouse -\ prefix prefix2 renumber-windows repeat-time set-titles set-titles-string +\ display-time exit-unattached focus-events history-file history-limit +\ key-table lock-after-time lock-command message-attr message-bg +\ message-command-attr message-command-bg message-command-fg +\ message-command-style message-fg message-limit message-style mouse +\ aggressive-resize allow-rename alternate-screen automatic-rename +\ automatic-rename-format clock-mode-colour clock-mode-style force-height +\ force-width main-pane-height main-pane-width mode-attr mode-bg mode-fg +\ mode-keys mode-style monitor-activity monitor-bell monitor-silence +\ other-pane-height other-pane-width pane-active-border-bg +\ pane-active-border-fg pane-active-border-style pane-base-index +\ pane-border-bg pane-border-fg pane-border-format pane-border-status +\ pane-border-style prefix prefix2 remain-on-exit renumber-windows +\ repeat-time set-clipboard set-titles set-titles-string silence-action \ status status-attr status-bg status-fg status-interval status-justify \ status-keys status-left status-left-attr status-left-bg status-left-fg \ status-left-length status-left-style status-position status-right \ status-right-attr status-right-bg status-right-fg status-right-length -\ status-right-style status-style update-environment visual-activity -\ visual-bell visual-silence word-separators aggressive-resize allow-rename -\ alternate-screen automatic-rename automatic-rename-format -\ clock-mode-colour clock-mode-style force-height force-width -\ main-pane-height main-pane-width mode-attr mode-bg mode-fg mode-keys -\ mode-style monitor-activity monitor-silence other-pane-height -\ other-pane-width pane-active-border-bg pane-active-border-fg -\ pane-active-border-style pane-base-index pane-border-bg pane-border-fg -\ pane-border-format pane-border-status pane-border-style remain-on-exit -\ synchronize-panes window-active-style window-style -\ window-status-activity-attr window-status-activity-bg +\ status-right-style status-style synchronize-panes terminal-overrides +\ update-environment user-keys visual-activity visual-bell visual-silence +\ window-active-style window-status-activity-attr window-status-activity-bg \ window-status-activity-fg window-status-activity-style window-status-attr \ window-status-bell-attr window-status-bell-bg window-status-bell-fg \ window-status-bell-style window-status-bg window-status-current-attr @@ -93,32 +93,31 @@ syn keyword tmuxOptions \ window-status-current-format window-status-current-style window-status-fg \ window-status-format window-status-last-attr window-status-last-bg \ window-status-last-fg window-status-last-style window-status-separator -\ window-status-style wrap-search xterm-keys +\ window-status-style window-style word-separators wrap-search xterm-keys syn keyword tmuxCommands -\ attach-session attach bind-key bind break-pane breakp capture-pane -\ capturep clear-history clearhist choose-buffer choose-client choose-tree -\ choose-session choose-window command-prompt confirm-before confirm -\ copy-mode clock-mode detach-client detach suspend-client suspendc -\ display-message display display-panes displayp find-window findw if-shell -\ if join-pane joinp move-pane movep kill-pane killp kill-server -\ start-server start kill-session kill-window killw unlink-window unlinkw -\ list-buffers lsb list-clients lsc list-keys lsk list-commands lscm -\ list-panes lsp list-sessions ls list-windows lsw load-buffer loadb -\ lock-server lock lock-session locks lock-client lockc move-window movew -\ link-window linkw new-session new has-session has new-window neww -\ paste-buffer pasteb pipe-pane pipep refresh-client refresh rename-session -\ rename rename-window renamew resize-pane resizep respawn-pane respawnp -\ respawn-window respawnw rotate-window rotatew run-shell run save-buffer -\ saveb show-buffer showb select-layout selectl next-layout nextl -\ previous-layout prevl select-pane selectp last-pane lastp select-window -\ selectw next-window next previous-window prev last-window last send-keys -\ send send-prefix set-buffer setb delete-buffer deleteb set-environment -\ setenv set-hook show-hooks set-option set set-window-option setw -\ show-environment showenv show-messages showmsgs show-options show -\ show-window-options showw source-file source split-window splitw swap-pane -\ swapp swap-window swapw switch-client switchc unbind-key unbind wait-for -\ wait +\ attach attach-session bind bind-key break-pane breakp capture-pane +\ capturep choose-buffer choose-client choose-tree clear-history clearhist +\ clock-mode command-prompt confirm confirm-before copy-mode detach +\ detach-client display display-message display-panes displayp find-window +\ findw if if-shell join-pane joinp kill-pane kill-server kill-session +\ kill-window killp has-session has killw link-window linkw list-buffers +\ list-clients list-commands list-keys list-panes list-sessions list-windows +\ load-buffer loadb lock lock-client lock-server lock-session last-pane +\ lastp lockc locks last-window last ls lsb delete-buffer deleteb lsc lscm +\ lsk lsp lsw move-pane move-window movep movew new new-session new-window +\ neww next next-layout next-window nextl paste-buffer pasteb pipe-pane +\ pipep prev previous-layout previous-window prevl refresh refresh-client +\ rename rename-session rename-window renamew resize-pane resizep +\ respawn-pane respawn-window respawnp respawnw rotate-window rotatew run +\ run-shell save-buffer saveb select-layout select-pane select-window +\ selectl selectp selectw send send-keys send-prefix set set-buffer +\ set-environment set-hook set-option set-window-option setb setenv setw +\ show show-buffer show-environment show-hooks show-messages show-options +\ show-window-options showb showenv showmsgs showw source source-file +\ split-window splitw start start-server suspend-client suspendc swap-pane +\ swap-window swapp swapw switch-client switchc unbind unbind-key +\ unlink-window unlinkw wait wait-for let &cpo = s:original_cpo unlet! s:original_cpo s:bg s:i diff --git a/runtime/syntax/vhdl.vim b/runtime/syntax/vhdl.vim index f4b11ff5dd..efcb840284 100644 --- a/runtime/syntax/vhdl.vim +++ b/runtime/syntax/vhdl.vim @@ -3,7 +3,7 @@ " Maintainer: Daniel Kho <daniel.kho@tauhop.com> " Previous Maintainer: Czo <Olivier.Sirol@lip6.fr> " Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn> -" Last Changed: 2016 Mar 05 by Daniel Kho +" Last Changed: 2018 May 06 by Daniel Kho " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -43,6 +43,8 @@ syn keyword vhdlStatement sequence strong syn keyword vhdlStatement then to transport type syn keyword vhdlStatement unaffected units until use syn keyword vhdlStatement variable +" VHDL-2017 interface +syn keyword vhdlStatement view syn keyword vhdlStatement vmode vprop vunit syn keyword vhdlStatement wait when while with syn keyword vhdlStatement note warning error failure @@ -69,9 +71,7 @@ syn match vhdlType "\<time_vector\>\'\=" syn match vhdlType "\<character\>\'\=" syn match vhdlType "\<string\>\'\=" -"syn keyword vhdlType severity_level -syn keyword vhdlType line -syn keyword vhdlType text +syn keyword vhdlType line text side width " Predefined standard IEEE VHDL types syn match vhdlType "\<std_ulogic\>\'\=" @@ -124,6 +124,8 @@ syn match vhdlAttribute "\'succ" syn match vhdlAttribute "\'val" syn match vhdlAttribute "\'image" syn match vhdlAttribute "\'value" +" VHDL-2017 interface attribute +syn match vhdlAttribute "\'converse" syn keyword vhdlBoolean true false @@ -165,6 +167,9 @@ syn match vhdlOperator "=\|\/=\|>\|<\|>=" syn match vhdlOperator "<=\|:=" syn match vhdlOperator "=>" +" VHDL-2017 concurrent signal association (spaceship) operator +syn match vhdlOperator "<=>" + " VHDL-2008 conversion, matching equality/non-equality operators syn match vhdlOperator "??\|?=\|?\/=\|?<\|?<=\|?>\|?>=" @@ -183,8 +188,11 @@ syn match vhdlError "\(<\)[&+\-\/\\]\+" syn match vhdlError "[>=&+\-\/\\]\+\(<\)" " Covers most operators " support negative sign after operators. E.g. q<=-b; -syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|<=\|:=\|=>\)[<>=&+\*\\?:]\+" -syn match vhdlError "[<>=&+\-\*\\:]\+\(&\|+\|\*\*\|\/=\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|>=\|<=\|:=\|=>\)" +" Supports VHDL-2017 spaceship (concurrent simple signal association). +syn match vhdlError "\(<=\)[<=&+\*\\?:]\+" +syn match vhdlError "[>=&+\-\*\\:]\+\(=>\)" +syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|:=\|=>\)[<>=&+\*\\?:]\+" +syn match vhdlError "[<>=&+\-\*\\:]\+\(&\|+\|\*\*\|\/=\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|>=\|<=\|:=\)" syn match vhdlError "\(?<\|?>\)[<>&+\*\/\\?:]\+" syn match vhdlError "\(<<\|>>\)[<>&+\*\/\\?:]\+" diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 1551a314a3..5dc4f333e4 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -63,45 +63,45 @@ syn case match " Set up folding commands if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[aflmpPrt]' - if g:vimsyn_folding =~# 'a' - com! -nargs=* VimFolda <args> fold - else - com! -nargs=* VimFolda <args> + if g:vimsyn_folding =~# 'a' + com! -nargs=* VimFolda <args> fold + else + com! -nargs=* VimFolda <args> endif - if g:vimsyn_folding =~# 'f' - com! -nargs=* VimFoldf <args> fold - else - com! -nargs=* VimFoldf <args> + if g:vimsyn_folding =~# 'f' + com! -nargs=* VimFoldf <args> fold + else + com! -nargs=* VimFoldf <args> endif - if g:vimsyn_folding =~# 'l' - com! -nargs=* VimFoldl <args> fold - else - com! -nargs=* VimFoldl <args> + if g:vimsyn_folding =~# 'l' + com! -nargs=* VimFoldl <args> fold + else + com! -nargs=* VimFoldl <args> endif - if g:vimsyn_folding =~# 'm' - com! -nargs=* VimFoldm <args> fold - else - com! -nargs=* VimFoldm <args> + if g:vimsyn_folding =~# 'm' + com! -nargs=* VimFoldm <args> fold + else + com! -nargs=* VimFoldm <args> endif if g:vimsyn_folding =~# 'p' com! -nargs=* VimFoldp <args> fold else com! -nargs=* VimFoldp <args> endif - if g:vimsyn_folding =~# 'P' - com! -nargs=* VimFoldP <args> fold - else - com! -nargs=* VimFoldP <args> + if g:vimsyn_folding =~# 'P' + com! -nargs=* VimFoldP <args> fold + else + com! -nargs=* VimFoldP <args> endif - if g:vimsyn_folding =~# 'r' - com! -nargs=* VimFoldr <args> fold - else - com! -nargs=* VimFoldr <args> + if g:vimsyn_folding =~# 'r' + com! -nargs=* VimFoldr <args> fold + else + com! -nargs=* VimFoldr <args> endif - if g:vimsyn_folding =~# 't' - com! -nargs=* VimFoldt <args> fold - else - com! -nargs=* VimFoldt <args> + if g:vimsyn_folding =~# 't' + com! -nargs=* VimFoldt <args> fold + else + com! -nargs=* VimFoldt <args> endif else com! -nargs=* VimFolda <args> @@ -137,24 +137,26 @@ endif " Numbers {{{2 " ======= -syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand -syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand -syn match vimNumber "\<0[xX]\x\+" -syn match vimNumber "\%(^\|[^a-zA-Z]\)\zs#\x\{6}" +syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment +syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment +syn match vimNumber "\<0[xX]\x\+" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment +syn match vimNumber "\%(^\|\A\)\zs#\x\{6}" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand,vimComment " All vimCommands are contained by vimIsCommands. {{{2 -syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd +syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimEcho,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd syn match vimIsCommand "\<\h\w*\>" contains=vimCommand -syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" +syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" +syn match vimVar "\s\zs&\a\+\>" syn match vimFBVar contained "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" syn keyword vimCommand contained in " Insertions And Appends: insert append {{{2 " ======================= -syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$"" -syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$"" -syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$"" +syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$"" +syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$"" +syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$"" +syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=starti\%[nsert]$" matchgroup=vimCommand end="^\.$"" " Behave! {{{2 " ======= @@ -175,7 +177,7 @@ syn keyword vimFTOption contained detect indent off on plugin " Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2 " ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking. -syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue +syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue,vimSetEqual,vimOption if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a' syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList else @@ -190,8 +192,9 @@ syn keyword vimAugroupKey contained aug[roup] " Operators: {{{2 " ========= syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue -syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile -syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile +syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile +syn match vimOper "\(\<is\>\|\<isnot\>\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile +syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror") @@ -201,7 +204,7 @@ endif " Functions : Tag is provided for those who wish to highlight tagged functions {{{2 " ========= syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID -syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand +syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand syn match vimFunction "\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' @@ -274,7 +277,7 @@ syn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\ syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline syn match vimNotPatSep contained "\\\\" syn cluster vimStringGroup contains=vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell -syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=@vimStringGroup +syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ contains=@vimStringGroup syn region vimString oneline keepend start=+[^a-zA-Z>!\\@]'+lc=1 end=+'+ syn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup syn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup @@ -292,11 +295,12 @@ syn match vimSubst "\%(^\|[^\\]\)\<s\%[ubstitute]\>[:#[:alpha:]]\@!" nextgroup=v syn match vimSubst "/\zs\<s\%[ubstitute]\>\ze/" nextgroup=vimSubstPat syn match vimSubst "\(:\+\s*\|^\s*\)s\ze#.\{-}#.\{-}#" nextgroup=vimSubstPat syn match vimSubst1 contained "\<s\%[ubstitute]\>" nextgroup=vimSubstPat +syn match vimSubst2 contained "s\%[ubstitute]\>" nextgroup=vimSubstPat syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([^a-zA-Z( \t[\]&]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass syn match vimCollClassErr contained "\[:.\{-\}:\]" -syn match vimCollClass contained transparent "\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|return\|tab\|escape\|backspace\):\]" +syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|return\|tab\|escape\|backspace\):\]" syn match vimSubstSubstr contained "\\z\=\d" syn match vimSubstTwoBS contained "\\\\" syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags @@ -311,7 +315,7 @@ syn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark ",\zs'[<>]\ze" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst -syn match vimMarkNumber "[-+]\d\+" nextgroup=vimSubst contained contains=vimOper +syn match vimMarkNumber "[-+]\d\+" contained contains=vimOper nextgroup=vimSubst2 syn match vimPlainMark contained "'[a-zA-Z0-9]" syn match vimRegister '[^,;[{: \t]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]' @@ -331,9 +335,9 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1 syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)' " Set command and associated set-options (vimOptions) with comment {{{2 -syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod -syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline -syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar +syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod +syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline +syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar syn match vimSetSep contained "[,:]" skipwhite nextgroup=vimCommand syn match vimSetMod contained "&vim\=\|[!&?<]\|all&" @@ -371,7 +375,7 @@ syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ syn keyword nvimUnmap tunm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs -syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs +syn match vimMapMod contained "\%#=1\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs syn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimContinue syn case ignore @@ -393,27 +397,27 @@ syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList " Angle-Bracket Notation (tnx to Michael Geddes) {{{2 " ====================== syn case ignore -syn match vimNotation "\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket -syn match vimNotation "\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket -syn match vimNotation "\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket -syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket -syn match vimNotation '\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket -syn match vimNotation "\(\\\|<lt>\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>" contains=vimBracket +syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|mouse\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket +syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket +syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket +syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket +syn match vimNotation '\%#=1\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket +syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>" contains=vimBracket syn match vimBracket contained "[\\<>]" syn case match " User Function Highlighting {{{2 " (following Gautam Iyer's suggestion) " ========================== -syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute -syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation +syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute +syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>" " Errors And Warnings: {{{2 " ==================== if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") syn match vimFunctionError "\s\zs[a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank -" syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)[0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank +" syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\d\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank syn match vimElseIfErr "\<else\s\+if\>" syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/ endif @@ -470,14 +474,14 @@ syn cluster vimFuncBodyList add=vimSynType syn cluster vimSynKeyGroup contains=vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion syn region vimSynKeyRegion contained oneline keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup -syn match vimSynKeyOpt contained "\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>" +syn match vimSynKeyOpt contained "\%#=1\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>" syn cluster vimFuncBodyList add=vimSynType " Syntax: match {{{2 syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup -syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>" +syn match vimSynMtchOpt contained "\%#=1\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>" if has("conceal") syn match vimSynMtchOpt contained "\<cchar=" nextgroup=vimSynMtchCchar syn match vimSynMtchCchar contained "\S" @@ -492,12 +496,12 @@ syn cluster vimSynRegPatGroup contains=vimPatSep,vimNotPatSep,vimSynPatRange,vim syn cluster vimSynRegGroup contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup -syn match vimSynRegOpt contained "\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>" +syn match vimSynRegOpt contained "\%#=1\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>" syn match vimSynReg contained "\(start\|skip\|end\)="he=e-1 nextgroup=vimSynRegPat syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup,vimOnlyHLGroup,nvimHLGroup syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg -syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=" -syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod +syn match vimSynPatMod contained "\%#=1\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=" +syn match vimSynPatMod contained "\%#=1\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod syn match vimSynPatMod contained "lc=\d\+" syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]" @@ -530,14 +534,14 @@ syn match vimIsCommand "<Bar>\s*\a\+" transparent contains=vimCommand,vimNotatio " ============ syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror") - syn match vimHiCtermError contained "[^0-9]\i*" + syn match vimHiCtermError contained "\D\i*" endif syn match vimHighlight "\<hi\%[ghlight]\>" skipwhite nextgroup=vimHiBang,@vimHighlightCluster syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster syn match vimHiGroup contained "\i\+" syn case ignore -syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl +syn keyword vimHiAttrib contained none bold inverse italic nocombine reverse standout strikethrough underline undercurl syn keyword vimFgBgAttrib contained none bg background fg foreground syn case match syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib @@ -571,7 +575,9 @@ syn match vimHiNmbr contained '\d\+' syn keyword vimHiClear contained clear nextgroup=vimHiGroup " Highlight: link {{{2 -syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation,vimOnlyHLGroup,nvimHLGroup +" see tst24 (hi def vs hi) (Jul 06, 2018) +"syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation +syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=@vimHiCluster syn cluster vimFuncBodyList add=vimHiLink " Control Characters {{{2 @@ -622,6 +628,7 @@ if !filereadable(s:luapath) endif if g:vimsyn_embed =~# 'l' && filereadable(s:luapath) unlet! b:current_syntax + syn cluster vimFuncBodyList add=vimLuaRegion exe "syn include @vimLuaScript ".s:luapath VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript @@ -644,11 +651,12 @@ if !filereadable(s:perlpath) endif if g:vimsyn_embed =~# 'p' && filereadable(s:perlpath) unlet! b:current_syntax + syn cluster vimFuncBodyList add=vimPerlRegion let s:foldmethod = &l:foldmethod exe "syn include @vimPerlScript ".s:perlpath let &l:foldmethod = s:foldmethod - VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPerlScript - VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript + VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(\S*\)\ze\(\s*["#].*\)\=$+ end=+^\z1\ze\(\s*[#"].*\)\=$+ contains=@vimPerlScript + VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript syn cluster vimFuncBodyList add=vimPerlRegion else syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ @@ -667,12 +675,13 @@ if !filereadable(s:rubypath) endfor endif if g:vimsyn_embed =~# 'r' && filereadable(s:rubypath) + syn cluster vimFuncBodyList add=vimRubyRegion unlet! b:current_syntax let s:foldmethod = &l:foldmethod exe "syn include @vimRubyScript ".s:rubypath let &l:foldmethod = s:foldmethod - VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimRubyScript - syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript + VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimRubyScript + syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript syn cluster vimFuncBodyList add=vimRubyRegion else syn region vimEmbedError start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ @@ -692,11 +701,12 @@ if !filereadable(s:pythonpath) endif if g:vimsyn_embed =~# 'P' && filereadable(s:pythonpath) unlet! b:current_syntax + syn cluster vimFuncBodyList add=vimPythonRegion exe "syn include @vimPythonScript ".s:pythonpath - VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript - VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript - VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript - VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript + VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript + VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript + VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript + VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript syn cluster vimFuncBodyList add=vimPythonRegion else syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ @@ -723,6 +733,7 @@ if s:trytcl endif if g:vimsyn_embed =~# 't' && filereadable(s:tclpath) unlet! b:current_syntax + syn cluster vimFuncBodyList add=vimTclRegion exe "syn include @vimTclScript ".s:tclpath VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript @@ -751,6 +762,7 @@ endif if g:vimsyn_embed =~# 'm' && filereadable(s:mzschemepath) unlet! b:current_syntax let s:iskKeep= &isk + syn cluster vimFuncBodyList add=vimMzSchemeRegion exe "syn include @vimMzSchemeScript ".s:mzschemepath let &isk= s:iskKeep unlet s:iskKeep @@ -875,7 +887,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimOper Operator hi def link vimOption PreProc hi def link vimParenSep Delimiter - hi def link vimPatSepErr vimPatSep + hi def link vimPatSepErr vimError hi def link vimPatSepR vimPatSep hi def link vimPatSep SpecialChar hi def link vimPatSepZone vimString @@ -897,6 +909,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimStatement Statement hi def link vimStringCont vimString hi def link vimString String + hi def link vimStringEnd vimString hi def link vimSubst1 vimSubst hi def link vimSubstDelim Delimiter hi def link vimSubstFlags Special diff --git a/runtime/syntax/wast.vim b/runtime/syntax/wast.vim new file mode 100644 index 0000000000..245d5f6f19 --- /dev/null +++ b/runtime/syntax/wast.vim @@ -0,0 +1,84 @@ +" Vim syntax file +" Language: WebAssembly +" Maintainer: rhysd <lin90162@yahoo.co.jp> +" Last Change: Jul 29, 2018 +" For bugs, patches and license go to https://github.com/rhysd/vim-wasm + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn cluster wastCluster contains=wastModule,wastInstWithType,wastInstGeneral,wastParamInst,wastControlInst,wastString,wastNamedVar,wastUnnamedVar,wastFloat,wastNumber,wastComment,wastList,wastType + +" Instructions +" https://webassembly.github.io/spec/core/text/instructions.html +" Note: memarg (align=,offset=) can be added to memory instructions +syn match wastInstWithType "\%((\s*\)\@<=\<\%(i32\|i64\|f32\|f64\|memory\)\.[[:alnum:]_]\+\%(/\%(i32\|i64\|f32\|f64\)\)\=\>\%(\s\+\%(align\|offset\)=\)\=" contained display +syn match wastInstGeneral "\%((\s*\)\@<=\<[[:alnum:]_]\+\>" contained display +" https://webassembly.github.io/spec/core/text/instructions.html#control-instructions +syn match wastControlInst "\%((\s*\)\@<=\<\%(block\|end\|loop\|if\|else\|unreachable\|nop\|br\|br_if\|br_table\|return\|call\|call_indirect\)\>" contained display +" https://webassembly.github.io/spec/core/text/instructions.html#parametric-instructions +syn match wastParamInst "\%((\s*\)\@<=\<\%(drop\|select\)\>" contained display + +" Identifiers +" https://webassembly.github.io/spec/core/text/values.html#text-id +syn match wastNamedVar "$\+[[:alnum:]!#$%&'∗./:=><?@\\^_`~+-]*" contained display +syn match wastUnnamedVar "$\+\d\+[[:alnum:]!#$%&'∗./:=><?@\\^_`~+-]\@!" contained display + +" String literals +" https://webassembly.github.io/spec/core/text/values.html#strings +syn region wastString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=wastStringSpecial +syn match wastStringSpecial "\\\x\x\|\\[tnr'\\\"]\|\\u\x\+" contained containedin=wastString + +" Float literals +" https://webassembly.github.io/spec/core/text/values.html#floating-point +syn match wastFloat "\<-\=\d\%(_\=\d\)*\%(\.\d\%(_\=\d\)*\)\=\%([eE][-+]\=\d\%(_\=\d\)*\)\=" display contained +syn match wastFloat "\<-\=0x\x\%(_\=\d\)*\%(\.\x\%(_\=\x\)*\)\=\%([pP][-+]\=\d\%(_\=\d\)*\)\=" display contained +syn keyword wastFloat inf nan contained + +" Integer literals +" https://webassembly.github.io/spec/core/text/values.html#integers +syn match wastNumber "\<-\=\d\%(_\=\d\)*\>" display contained +syn match wastNumber "\<-\=0x\x\%(_\=\x\)*\>" display contained + +" Comments +" https://webassembly.github.io/spec/core/text/lexical.html#comments +syn region wastComment start=";;" end="$" display +syn region wastComment start="(;;\@!" end=";)" + +syn region wastList matchgroup=wastListDelimiter start="(;\@!" matchgroup=wastListDelimiter end=";\@<!)" contains=@wastCluster + +" Types +" https://webassembly.github.io/spec/core/text/types.html +syn keyword wastType i64 i32 f64 f32 param result anyfunc mut contained +syn match wastType "\%((\_s*\)\@<=func\%(\_s*[()]\)\@=" display contained + +" Modules +" https://webassembly.github.io/spec/core/text/modules.html +syn keyword wastModule module type export import table memory global data elem contained +syn match wastModule "\%((\_s*\)\@<=func\%(\_s\+\$\)\@=" display contained + +syn sync lines=100 + +hi def link wastModule PreProc +hi def link wastListDelimiter Delimiter +hi def link wastInstWithType Operator +hi def link wastInstGeneral Operator +hi def link wastControlInst Statement +hi def link wastParamInst Conditional +hi def link wastString String +hi def link wastStringSpecial Special +hi def link wastNamedVar Identifier +hi def link wastUnnamedVar PreProc +hi def link wastFloat Float +hi def link wastNumber Number +hi def link wastComment Comment +hi def link wastType Type + +let b:current_syntax = "wast" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/zsh.vim b/runtime/syntax/zsh.vim index b4efcdcbdf..3eba438aa7 100644 --- a/runtime/syntax/zsh.vim +++ b/runtime/syntax/zsh.vim @@ -2,7 +2,7 @@ " Language: Zsh shell script " Maintainer: Christian Brabandt <cb@256bit.org> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2017-11-22 +" Latest Revision: 2018-05-12 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-zsh @@ -67,15 +67,15 @@ syn match zshRedir '|&\=' syn region zshHereDoc matchgroup=zshRedir \ start='<\@<!<<\s*\z([^<]\S*\)' \ end='^\z1\>' - \ contains=@zshSubst + \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString syn region zshHereDoc matchgroup=zshRedir \ start='<\@<!<<\s*\\\z(\S\+\)' \ end='^\z1\>' - \ contains=@zshSubst + \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString syn region zshHereDoc matchgroup=zshRedir \ start='<\@<!<<-\s*\\\=\z(\S\+\)' \ end='^\s*\z1\>' - \ contains=@zshSubst + \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString syn region zshHereDoc matchgroup=zshRedir \ start=+<\@<!<<\s*\(["']\)\z(\S\+\)\1+ \ end='^\z1\>' @@ -118,8 +118,8 @@ syn keyword zshCommands alias autoload bg bindkey break bye cap cd \ ttyctl type ulimit umask unalias unfunction \ unhash unlimit unset vared wait \ whence where which zcompile zformat zftp zle - \ zmodload zparseopts zprof zpty zregexparse - \ zsocket zstyle ztcp + \ zmodload zparseopts zprof zpty zrecompile + \ zregexparse zsocket zstyle ztcp " Options, generated by: echo ${(j:\n:)options[(I)*]} | sort " Create a list of option names from zsh source dir: diff --git a/runtime/tools/check_colors.vim b/runtime/tools/check_colors.vim index 0cfe5ec121..b1aefa1126 100644 --- a/runtime/tools/check_colors.vim +++ b/runtime/tools/check_colors.vim @@ -1,5 +1,5 @@ " This script tests a color scheme for some errors. Load the scheme and source -" this script. e.g. :e colors/desert.vim | :so test_colors.vim +" this script. e.g. :e colors/desert.vim | :so check_colors.vim " Will output possible errors. let s:save_cpo= &cpo @@ -90,7 +90,7 @@ func! Test_check_colors() let err['background'] = 'Should not issue :syn on' endif - " 7) Does not define filetype specfic groups like vimCommand, htmlTag, + " 7) Does not define filetype specific groups like vimCommand, htmlTag, let hi_groups = ['vim', 'html', 'python', 'sh', 'ruby'] for group in hi_groups let pat='\Chi\%[ghlight]\s*\zs'.group.'\w\+\>' |