diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/autocmd.txt | 5 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 67 | ||||
-rw-r--r-- | runtime/doc/options.txt | 2 | ||||
-rw-r--r-- | runtime/doc/quickfix.txt | 197 | ||||
-rw-r--r-- | runtime/doc/scroll.txt | 2 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 4 | ||||
-rw-r--r-- | runtime/doc/windows.txt | 28 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 16 |
8 files changed, 268 insertions, 53 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 7fcfa5de14..bb9022fb21 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -338,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 @@ -569,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 diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index eaf0b58e2b..1f3a3a8b67 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4315,6 +4315,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 @@ -4339,51 +4340,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: > @@ -6938,7 +6951,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. @@ -6960,10 +6973,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. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 265b97dd45..95cfb527ea 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1566,7 +1566,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 diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 8150121038..bedea92167 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. @@ -529,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* @@ -573,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* @@ -1334,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* diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt index 99ebd26db3..300c251ef0 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. diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 3a2ed65a1b..57042f06d4 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -4582,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 diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index e83377471c..5ca9986f40 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 diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index c7ee3314ba..0f99c7f23b 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -650,8 +650,8 @@ if g:vimsyn_embed =~# 'p' && filereadable(s:perlpath) 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$+ @@ -675,8 +675,8 @@ if g:vimsyn_embed =~# 'r' && filereadable(s:rubypath) 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$+ @@ -698,10 +698,10 @@ 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$+ |