Compare commits

...

299 Commits

Author SHA1 Message Date
Yegappan Lakshmanan
6ec6666047 patch 9.0.1237: code is indented more than necessary
Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11858)
2023-01-23 20:46:21 +00:00
zeertzjq
9cbf791995 patch 9.0.1236: code in same_leader() can be simplified
Problem:    Code in same_leader() can be simplified.
Solution:   Simplify code that is executed only once. (closes #11867)
2023-01-23 16:57:08 +00:00
Christopher Plewright
dc7179f9a4 patch 9.0.1235: MS-Windows console: not flushing termguicolors
Problem:    MS-Windows console: not flushing termguicolors.
Solution:   Flush termguicolors. (Christopher Plewright, closes #11871)
2023-01-23 12:33:23 +00:00
Bram Moolenaar
ebfec1c531 patch 9.0.1234: the code style has to be checked manually
Problem:    The code style has to be checked manually.
Solution:   Add basic code style checks in a test.  Fix or avoid uncovered
            problems.
2023-01-22 21:14:53 +00:00
Bram Moolenaar
3d79f0a430 patch 9.0.1233: search() loops forever if "skip" is TRUE for all matches
Problem:    search() loops forever if "skip" is TRUE for all matches.
Solution:   Keep the position of the first match.
2023-01-22 20:14:26 +00:00
Christopher Plewright
d343c60df4 patch 9.0.1232: ColorTable saving and restoring does not work properly
Problem:    ColorTable saving and restoring does not work properly.
Solution:   Restore ColorTable[16] usage. (Christopher Plewright,
            closes #11836)
2023-01-22 18:58:30 +00:00
zeertzjq
3770f4c9cd patch 9.0.1231: completion of :runtime does not handle {where} argument
Problem:    Completion of :runtime does not handle {where} argument.
Solution:   Parse the {where} argument. (closes #11863)
2023-01-22 18:38:51 +00:00
Amaan Qureshi
f3da4c8427 patch 9.0.1230: Apache thrift files are not recognized
Problem:    Apache thrift files are not recognized.
Solution:   Add a pattern for thrift files. (Amaan Qureshi, closes #11859)
2023-01-22 18:16:44 +00:00
Amaan Qureshi
040e795e8d patch 9.0.1229: Cap'n Proto files are not recognized
Problem:    Cap'n Proto files are not recognized.
Solution:   Add a pattern and the "capnp" filetype. (Amaan Qureshi,
            closes #11862)
2023-01-22 13:10:39 +00:00
zeertzjq
145a6afe3a patch 9.0.1228: fuzzy menu completion is only tested in the GUI
Problem:    Fuzzy menu completion is only tested in the GUI.
Solution:   Make fuzzy menu completion test work without GUI.
            (closes #11861)
2023-01-22 12:41:55 +00:00
root
a6759381a5 patch 9.0.1227: no cmdline completion for :runtime
Problem:    No cmdline completion for :runtime.
Solution:   Add completion for :runtime. (closes #11853, closes #11447)
            Improve the resulting matches.
2023-01-21 21:56:06 +00:00
Bram Moolenaar
51b2fc2ef5 patch 9.0.1226: spurious empty line when using text properties
Problem:    Spurious empty line when using text propertie and virtual text.
Solution:   Do not set "text_prop_follows" when the other text property is not
            virtual text. (closes #11846)
2023-01-21 15:54:59 +00:00
Bram Moolenaar
11977f9175 patch 9.0.1225: reading past the end of a line when formatting text
Problem:    Reading past the end of a line when formatting text.
Solution:   Check for not going over the end of the line.
2023-01-21 13:09:19 +00:00
Bram Moolenaar
47bba53bdb patch 9.0.1224: cannot call a :def function with a number for float argument
Problem:    Cannot call a :def function with a number for a float argument.
Solution:   Accept a number as well, convert it to a float.
2023-01-20 18:49:46 +00:00
K.Takata
7193323b77 patch 9.0.1223: cannot use setcellwidths() below 0x100
Problem:    Cannot use setcellwidths() below 0x100.
Solution:   Also accept characters between 0x80 and 0x100. (Ken Takata,
            closes #11834)
2023-01-20 16:00:55 +00:00
Yegappan Lakshmanan
e446a017ff patch 9.0.1222: terminal tests are flaky on MacOS
Problem:    Terminal tests are flaky on MacOS.
Solution:   Add TermWait() calls. (Yegappan Lakshmanan, closes #11852)
2023-01-19 17:49:58 +00:00
Yegappan Lakshmanan
f97a295cca patch 9.0.1221: code is indented more than necessary
Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11833)
2023-01-18 18:17:48 +00:00
Bram Moolenaar
4aecaa168e patch 9.0.1220: termcap/terminfo entries do not indicate possible modifiers
Problem:    Termcap/terminfo entries do not indicate where modifiers might
            appear.
Solution:   Add ";*" for function keys where modifiers are likely to be used.
2023-01-18 17:20:25 +00:00
Zdenek Dohnal
4219698603 patch 9.0.1219: handling of FORTIFY_SOURCE flags doesn't match Fedora usage
Problem:    Handling of FORTIFY_SOURCE flags doesn't match Fedora usage.
Solution:   Adjust the "sed" patterns. (Zdenek Dohnal, closes #11847)
2023-01-18 16:09:51 +00:00
Kota Kato
90c2353365 patch 9.0.1218: completion includes functions that don't work
Problem:    Completion includes functions that don't work.
Solution:   Skip functions that are not implemented. (Kota Kato,
            closes #11845)
2023-01-18 15:27:38 +00:00
Bram Moolenaar
486fc25a29 patch 9.0.1217: using an object member in a closure doesn't work
Problem:    Using an object member in a closure doesn't work.
Solution:   Initialize lv_loop_depth. (closes #11840)
2023-01-18 14:51:07 +00:00
Bram Moolenaar
64f1c4152e patch 9.0.1216: Coverity warns for ignoring return value
Problem:    Coverity warns for ignoring return value.
Solution:   Break out of loop if function fails.
2023-01-18 12:45:30 +00:00
zeertzjq
0ef9a5c094 patch 9.0.1215: using isalpha() adds dependency on current locale
Problem:    Using isalpha() adds dependency on current locale.
Solution:   Do not use isalpha() for recognizing a URL or the end of an Ex
            command. (closes #11835)
2023-01-17 21:38:25 +00:00
Dominique Pelle
541c87c808 patch 9.0.1214: file left behind after running tests
Problem:    File left behind after running tests.
Solution:   Delete the file. (Dominique Pellé, closes #11839)
2023-01-17 21:20:44 +00:00
Brandon Simmons
da3dd7d857 patch 9.0.1213: adding a line below the last one does not expand fold
Problem:    Adding a line below the last one does not expand fold.
Solution:   Do not skip mark_adjust() when adding lines below the last one.
            (Brandon Simmons, closes #11832, closes #10698)
2023-01-17 19:48:07 +00:00
Kota Kato
66bb9ae70f patch 9.0.1212: cannot read back what setcellwidths() has done
Problem:    Cannot read back what setcellwidths() has done.
Solution:   Add getcellwidths(). (Kota Kato, closes #11837)
2023-01-17 18:31:56 +00:00
Bram Moolenaar
f7d1c6e188 patch 9.0.1211: storing value in interface member does not always work
Problem:    Storing value in interface member does not always work.
Solution:   Convert the index on the interface to the index on the object.
2023-01-16 20:47:57 +00:00
Bram Moolenaar
b391e1f805 patch 9.0.1210: compiler complains about declaration after label
Problem:    Compiler complains about declaration after label.
Solution:   Move declaration to beginning of block (John Marriott)
2023-01-16 19:51:03 +00:00
Bram Moolenaar
29ac5df37b patch 9.0.1209: getting interface member does not always work
Problem:    Getting interface member does not always work.
Solution:   Convert the index on the interface to the index on the object.
            (closes #11825)
2023-01-16 19:43:47 +00:00
Yegappan Lakshmanan
a41e221935 patch 9.0.1208: code is indented more than necessary
Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11819)
2023-01-16 18:19:05 +00:00
Bram Moolenaar
450c7a97d1 patch 9.0.1207: error when object type is expected but getting "any"
Problem:    Error when object type is expected but getting "any".
Solution:   When actual type is "any" use a runtime type check.
            (closes #11826)
2023-01-16 16:39:37 +00:00
Christopher Plewright
5a57a5e209 patch 9.0.1206: testing with Python on AppVeyor does not work properly
Problem:    Testing with Python on AppVeyor does not work properly.
Solution:   Fix typo.  Move most lines to the .bat file. (Christopher
            Plewright, closes #11828)
2023-01-16 13:01:28 +00:00
Bram Moolenaar
ae3205aa55 patch 9.0.1205: crash when handling class that extends another class
Problem:    Crash when handling class that extends another class with more
            than one object members.
Solution:   Correct pointer computations. (closes #11824)
2023-01-15 20:49:00 +00:00
Bram Moolenaar
912bfee710 patch 9.0.1204: expression compiled the wrong way after using an object
Problem:    Expression compiled the wrong way after using an object.
Solution:   Generate constants before getting the type.
2023-01-15 20:18:55 +00:00
Bram Moolenaar
32517c4c14 patch 9.0.1203: return type of values() is always list<any>
Problem:    Return type of values() is always list<any>.
Solution:   Use the member type if possible. (issue #11822)
2023-01-15 18:17:12 +00:00
Bram Moolenaar
f450804e14 patch 9.0.1202: crash when iterating over list of objects
Problem:    Crash when iterating over list of objects.
Solution:   Do not make a copy of tt_member for object or class.
            (closes #11823)
2023-01-15 16:54:57 +00:00
Bram Moolenaar
4cae845ce3 patch 9.0.1201: assignment with operator doesn't work in object method
Problem:    Assignment with operator doesn't work in object method.
Solution:   Handle loading the object member. (closes #11820)  Add a few more
            tests.
2023-01-15 15:51:48 +00:00
Christopher Plewright
474f226582 patch 9.0.1200: AppVeyor builds with an old Python version
Problem:    AppVeyor builds with an old Python version.
Solution:   Switch from Python 3.8 to 3.11. (Christopher Plewright,
            closes #11814)
2023-01-15 13:23:20 +00:00
Bram Moolenaar
584b853ee0 patch 9.0.1199: crash when using kitty and using a mapping with <Esc>
Problem:    Crash when using kitty and using a mapping with <Esc>.
Solution:   Do not try setting did_simplify when it is NULL. (closes #11817)
2023-01-14 21:07:07 +00:00
Bram Moolenaar
24a8d06d7f patch 9.0.1198: abstract class not supported yet
Problem:    Abstract class not supported yet.
Solution:   Implement abstract class and add tests.
2023-01-14 13:12:06 +00:00
zeertzjq
034c350207 patch 9.0.1197: dump file missing from patch
Problem:    Dump file missing from patch.
Solution:   Add missing dump file.
2023-01-14 12:41:17 +00:00
Yegappan Lakshmanan
e857598896 patch 9.0.1196: code is indented more than necessary
Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11813)
2023-01-14 12:32:28 +00:00
zeertzjq
378e6c03f9 patch 9.0.1195: restoring KeyTyped when building statusline not tested
Problem:    Restoring KeyTyped when building statusline not tested.
Solution:   Add a test.  Clean up and fix other tests. (closes #11815)
2023-01-14 11:46:49 +00:00
Bram Moolenaar
b40a2fb3b3 patch 9.0.1194: compiler warning for comparing pointer with int
Problem:    Compiler warning for comparing pointer with int.
Solution:   Change NULL to zero.
2023-01-13 19:18:38 +00:00
Bram Moolenaar
32030a9f3b patch 9.0.1193: cannot map <Esc> when using the Kitty key protocol
Problem:    Cannot map <Esc> when using the Kitty key protocol.
Solution:   Add a non-simplified mapping for K_ESC. (closes #11811)
2023-01-13 18:46:57 +00:00
Bram Moolenaar
d40f00cb43 patch 9.0.1192: no error when class function argument shadows a member
Problem:    No error when class function argument shadows a member.
Solution:   Check for shadowing.
2023-01-13 17:36:49 +00:00
Keith Smiley
3213952966 patch 9.0.1191: some Bazel files are not recognized
Problem:    Some Bazel files are not recognized.
Solution:   Add an extra Bazel pattern. (Keith Smily, closes #11807)
2023-01-13 15:35:17 +00:00
Christopher Plewright
60908c4922 patch 9.0.1190: AppVeyor runs much slower with MSVC 2022
Problem:    AppVeyor runs much slower with MSVC 2022.
Solution:   Go back to MSVC 2015. (Christopher Plewright, closes #11810)
2023-01-13 15:28:14 +00:00
Bram Moolenaar
232bdaaca9 patch 9.0.1189: invalid memory access with folding and using "L"
Problem:    Invalid memory access with folding and using "L".
Solution:   Prevent the cursor from moving to line zero.
2023-01-13 14:17:58 +00:00
Bram Moolenaar
c0c2c26265 patch 9.0.1188: return value of type() for class and object unclear
Problem:    Return value of type() for class and object unclear.
Solution:   Add v:t_object and v:t_class.
2023-01-12 21:08:53 +00:00
Bram Moolenaar
3ce33b120c patch 9.0.1187: test for using imported class fails
Problem:    Test for using imported class fails.
Solution:   Skip over rest of type.
2023-01-12 20:39:09 +00:00
Bram Moolenaar
4059400993 patch 9.0.1186: imported class does not work when used twice in a line
Problem:    Imported class does not work when used twice in a line.
Solution:   Fix the type parsing.
2023-01-12 20:04:51 +00:00
Bram Moolenaar
a86655af84 patch 9.0.1185: using class from imported script not tested
Problem:    Using class from imported script not tested.
Solution:   Add tests.  Implement what is missing.
2023-01-12 17:06:27 +00:00
Bram Moolenaar
a94bd9d939 patch 9.0.1184: interface of an object is not recognized when checking type
Problem:    Interface of an object is not recognized when checking type.
Solution:   Use the interface implemented by an object.
2023-01-12 15:01:32 +00:00
Yegappan Lakshmanan
0233bdfa2b patch 9.0.1183: code is indented more than necessary
Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11805)
2023-01-12 12:33:30 +00:00
Amaan Q
043d7b2c84 patch 9.0.1182: go checksum files are not recognized
Problem:    go checksum files are not recognized.
Solution:   Add the name of go checksum files. (Amaan Qureshi, closes #11803)
2023-01-11 21:24:26 +00:00
Bram Moolenaar
6481accd40 patch 9.0.1181: class inheritance and typing insufficiently tested
Problem:    Class inheritance and typing insufficiently tested.
Solution:   Add more tests.  Implement missing behavior.
2023-01-11 21:14:17 +00:00
Bram Moolenaar
bcbfaf32e0 patch 9.0.1180: compiler warnings without the +job feature
Problem:    Compiler warnings without the +job feature.
Solution:   Adjust #ifdefs. (John Marriott)
2023-01-11 19:11:15 +00:00
Bram Moolenaar
6aa0937fb8 patch 9.0.1179: not all errors around inheritance are tested
Problem:    Not all errors around inheritance are tested.
Solution:   Add more tests.  Fix uncovered problems.
2023-01-11 17:59:38 +00:00
Bram Moolenaar
58b40092e6 patch 9.0.1178: a child class cannot override functions from a base class
Problem:    A child class cannot override functions from a base class.
Solution:   Allow overriding and implement "super".
2023-01-11 15:59:05 +00:00
Christopher Plewright
ad15a39fdb patch 9.0.1177: AppVeyor uses some older tools
Problem:    AppVeyor uses some older tools.
Solution:   Switch to Visual Studio 2022 and Python 3.11. (Christopher
            Plewright, closes #11793)
2023-01-11 12:49:22 +00:00
Chris Kipp
f68cddabff patch 9.0.1176: smithy files are not recognized
Problem:    smithy files are not recognized.
Solution:   Add a pattern for Smithy files. (Chris Kipp, closes #11804)
2023-01-11 12:20:10 +00:00
Yegappan Lakshmanan
ea125393af patch 9.0.1175: the set_ref_in_item() function is too long
Problem:    The set_ref_in_item() function is too long.
Solution:   Use a separate function for more complicated types. (Yegappan
            Lakshmanan, closes #11802)
2023-01-11 11:46:17 +00:00
Amaan Q
9a9432d3a2 patch 9.0.1174: smali files are not recognized
Problem:    Smali files are not recognized.
Solution:   Add a pattern for Smali files. (Amaan Qureshi, closes #11801)
2023-01-10 19:58:35 +00:00
Bram Moolenaar
a47c0fb4ad patch 9.0.1173: compiler warning for unused variable on non-Unix systems
Problem:    Compiler warning for unused variable on non-Unix systems.
Solution:   Move #ifdef. (John Marriott)
2023-01-10 19:17:11 +00:00
Bram Moolenaar
79c11e399b patch 9.0.1172: when 'selection' is "exclusive" then "1v" is one char short
Problem:    When 'selection' is "exclusive" then "1v" is one char short.
Solution:   Add one character when 'selection' is "exclusive. (closes #11791)
2023-01-10 17:29:29 +00:00
Yasuhiro Matsumoto
2bc849ff81 patch 9.0.1171: screen is not redrawn after using setcellwidths()
Problem:    Screen is not redrawn after using setcellwidths().
Solution:   Redraw the screen when the cell widths have changed. (Yasuhiro
            Matsumoto, closes #11800)
2023-01-10 16:03:08 +00:00
mert
523f22d577 patch 9.0.1170: LGTM badge no longer works
Problem:    LGTM badge no longer works.
Solution:   Remove the LGTM badge. (closes #11799)
2023-01-10 14:06:06 +00:00
Christopher Plewright
566f76e656 patch 9.0.1169: some key+modifier tests fail on some AppVeyor images
Problem:    Some key+modifier tests fail on some AppVeyor images.
Solution:   Adjust the tests for key movements and fix the revealed bugs.
            (Christopher Plewright, closes #11798)
2023-01-10 13:43:04 +00:00
Bram Moolenaar
06cd14d0bf patch 9.0.1168: code to enable/disable mouse is not from terminfo/termcap
Problem:    Code to enable/disable mouse is not from terminfo/termcap.
Solution:   Request the "XM" entry and use it to set 'ttymouse' if possible.
2023-01-10 12:37:38 +00:00
Bram Moolenaar
1b5f03ec9c Update runtime files 2023-01-09 20:12:45 +00:00
Gregory Anders
d41262ed06 patch 9.0.1167: EditorConfig files do not have their own filetype
Problem:    EditorConfig files do not have their own filetype.
Solution:   Add the "editorconfig" filetype. (Gregory Anders, closes #11779)
2023-01-09 20:08:00 +00:00
Yegappan Lakshmanan
1cfb14aa97 patch 9.0.1166: code is indented more than necessary
Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11792)
2023-01-09 19:04:23 +00:00
James McCoy
765d82a657 patch 9.0.1165: tests using IPv6 sometimes fail
Problem:    Tests using IPv6 sometimes fail.
Solution:   Use getaddrinfo() and use try/catch. (James McCoy,
            closes #11783)
2023-01-09 16:25:59 +00:00
h-east
01c5f2addf patch 9.0.1164: evaluating string expression advances function line
Problem:    Evaluating string expression advances function line.
Solution:   Disable function lines while parsing a string expression.
            (Hirohito Higashi, closes #11796)
2023-01-09 15:10:40 +00:00
Mike Williams
dda3053121 patch 9.0.1163: compiler warning for implicit size_t/int conversion
Problem:    Compiler warning for implicit size_t/int conversion.
Solution:   Add a type cast. (Mike Williams, closes #11795)
2023-01-09 14:18:13 +00:00
Zdenek Dohnal
870cd76283 patch 9.0.1162: configure does not handle all FORTIFY_SOURCE variants
Problem:    Configure does not handle all FORTIFY_SOURCE variants.
Solution:   Also handle Fedora's default FORTIFY_SOURCE flags. (Zdenek Dohnal,
            closes #11794)
2023-01-09 13:18:08 +00:00
Bram Moolenaar
c8ab30a349 patch 9.0.1161: Coverity warns for using strcpy()
Problem:    Coverity warns for using strcpy().
Solution:   Call a function to set the function name.
2023-01-09 11:35:47 +00:00
Bram Moolenaar
e01e5215f9 patch 9.0.1160: ASAN error for ufunc_T allocated with wrong size
Problem:    ASAN error for ufunc_T allocated with wrong size.
Solution:   Make sure the size can always fit the struct.
2023-01-08 20:31:18 +00:00
Bram Moolenaar
8367716a6e patch 9.0.1159: extends argument for class not implemented yet
Problem:    Extends argument for class not implemented yet.
Solution:   Basic implementation of "extends".
2023-01-08 19:54:10 +00:00
Yegappan Lakshmanan
7f8b2559a3 patch 9.0.1158: code is indented more than necessary
Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes #11787)
2023-01-08 13:44:24 +00:00
Bram Moolenaar
df8f947359 patch 9.0.1157: "implements" only handles one interface name
Problem:    "implements" only handles one interface name.
Solution:   Handle a comma separated list of names.  Check for duplicate
            names.
2023-01-07 14:51:03 +00:00
Bram Moolenaar
0cb3ca9f7a patch 9.0.1156: tests fail because of a different error message
Problem:    Tests fail because of a different error message.
Solution:   Don't give an error if a type name can't be found.
2023-01-07 13:07:11 +00:00
Bram Moolenaar
eca2c5fff6 patch 9.0.1155: cannot use a class as a type
Problem:    Cannot use a class as a type.
Solution:   Accept a class and interface name as a type.
2023-01-07 12:08:41 +00:00
Bram Moolenaar
2c01131c2a patch 9.0.1154: Coverity warns for dead code
Problem:    Coverity warns for dead code.
Solution:   Remove condition that is always true.
2023-01-07 10:51:30 +00:00
Bram Moolenaar
7d4d87ba89 patch 9.0.1153: build error with some compilers
Problem:    Build error with some compilers.
Solution:   Clear pointer the right way.
2023-01-06 18:59:08 +00:00
Bram Moolenaar
94674f2223 patch 9.0.1152: class "implements" argument not implemented
Problem:    Class "implements" argument not implemented.
Solution:   Implement "implements" argument.  Add basic checks for when a
            class implements an interface.
2023-01-06 18:42:20 +00:00
Bram Moolenaar
5bcd29b84e patch 9.0.1151: build failure
Problem:    Build failure.
Solution:   Add missing part of :interface change.
2023-01-05 20:14:43 +00:00
Bram Moolenaar
554d031302 patch 9.0.1150: :interface is not implemented yet
Problem:    :interface is not implemented yet.
Solution:   Implement the basics of :interface.
2023-01-05 19:59:18 +00:00
Bram Moolenaar
cf760d50dc patch 9.0.1149: class members may be garbage collected
Problem:    Class members may be garbage collected.
Solution:   Mark class members as being in use.
2023-01-05 13:16:04 +00:00
Bram Moolenaar
2468add0b8 patch 9.0.1148: cmdline test fails in the GUI
Problem:    Cmdline test fails in the GUI.
Solution:   Skip the test when running in the GUI.
2023-01-04 18:59:57 +00:00
Bram Moolenaar
3259ff3b3b patch 9.0.1147: cannot access a class member in a compiled function
Problem:    Cannot access a class member in a compiled function.
Solution:   Implement looking up a class member.
2023-01-04 18:54:09 +00:00
Christopher Plewright
c8b204952f patch 9.0.1146: MS-Windows: various special keys/modifiers are not mappable
Problem:    MS-Windows: various special keys and modifiers are not mappable.
Solution:   Adjust the handling of keys with modifiers. (Christian Plewright,
            closes #11768)
2023-01-04 18:06:00 +00:00
Bram Moolenaar
3ac1d97a1d patch 9.0.1145: invalid memory access with recursive substitute expression
Problem:    Invalid memory access with recursive substitute expression.
Solution:   Check the return value of vim_regsub().
2023-01-04 17:17:54 +00:00
Bram Moolenaar
c32949b077 patch 9.0.1144: reading beyond text
Problem:    Reading beyond text.
Solution:   Add strlen_maxlen() and use it.
2023-01-04 15:56:51 +00:00
Bram Moolenaar
7b17eb4b06 patch 9.0.1143: invalid memory access with bad 'statusline' value
Problem:    Invalid memory access with bad 'statusline' value.
Solution:   Avoid going over the NUL at the end.
2023-01-04 14:31:49 +00:00
Bram Moolenaar
f057171d8b patch 9.0.1142: crash and/or memory leak when redefining function
Problem:    Crash and/or memory leak when redefining function after error.
Solution:   Clear pointer after making a copy.  Clear arrays on failure.
            (closes #11774)
2023-01-04 13:16:20 +00:00
Alexey Radkov
aaa16b0918 patch 9.0.1141: 'cursorcolumn' and 'colorcolumn' wrong after concealing
Problem:    'cursorcolumn' and 'colorcolumn' wrong after concealing and
            wrapping line.
Solution:   Reset "wlv.vcol_off" after each screen line. (Alexey Radkov,
            closes #11777)
2023-01-04 11:15:30 +00:00
Bram Moolenaar
574950dfb1 patch 9.0.1140: cannot call an object method in a compiled function
Problem:    Cannot call an object method in a compiled function.
Solution:   Compile the instructins to invoke an object method.
2023-01-03 19:08:50 +00:00
Bram Moolenaar
46ab925937 patch 9.0.1139: cannot create a new object in a compiled function
Problem:    Cannot create a new object in a compiled function.
Solution:   Compile the instructins to create a new object.
2023-01-03 14:01:21 +00:00
Bram Moolenaar
36818a9daa patch 9.0.1138: crash when expecting varargs but it is something else
Problem:    Crash when expecting varargs but it is something else.
Solution:   Only use the member when the type is a list. (closes #11774)
2023-01-03 12:33:26 +00:00
zeertzjq
ea720aea85 patch 9.0.1137: some conditions are always false
Problem:    Some conditions are always false.
Solution:   Remove the useless conditions. (closes #11776)
2023-01-03 10:54:09 +00:00
Bram Moolenaar
e83c133eb9 patch 9.0.1136: memory leak when getting class member type from expr
Problem:    Memory leak when getting class member type from expr.
Solution:   Clear the expression result.
2023-01-02 21:04:04 +00:00
Bram Moolenaar
03ff0c6681 patch 9.0.1135: missing function argument
Problem:    Missing function argument.
Solution:   Add ignore case flag.
2023-01-02 20:38:01 +00:00
Bram Moolenaar
bcf31ec36b patch 9.0.1134: comparing objects uses identity instead of equality
Problem:    Comparing objects uses identity instead of equality.
Solution:   Compare the object values.
2023-01-02 20:32:24 +00:00
Bram Moolenaar
a9fa8c58fb patch 9.0.1133: error message names do not match the items
Problem:    Error message names do not match the items.
Solution:   Add "_str" when the text contains "%s".
2023-01-02 18:10:04 +00:00
Yegappan Lakshmanan
dc4daa3a39 patch 9.0.1132: code is indented more than needed
Problem:    Code is indented more than needed.
Solution:   Use an early return to reduce indentation. (Yegappan Lakshmanan,
            closes #11769)
2023-01-02 16:54:53 +00:00
Bram Moolenaar
a2942c7468 patch 9.0.1131: build failure without the +eval feature
Problem:    Build failure without the +eval feature.
Solution:   Move code inside #ifdef.
2023-01-02 13:41:49 +00:00
Bram Moolenaar
39c82ea656 patch 9.0.1130: unexpected output when autoloading a script
Problem:    Unexpected output when autoloading a script for an interactive
            operation.
Solution:   Reset "KeyTyped" while loading a script and when handling a nested
            function. (closes #11773)
2023-01-02 13:08:01 +00:00
Bram Moolenaar
7bdcba08bb patch 9.0.1129: sporadic Test_range() failure
Problem:    Sporadic Test_range() failure.
Solution:   Clear typeahead.  Move to a separate function. (issue #22771)
2023-01-02 11:59:26 +00:00
Bram Moolenaar
993dbc33a8 patch 9.0.1128: build failure
Problem:    Build failure.
Solution:   Add type cast.  Add missing error messages.
2023-01-01 20:31:30 +00:00
Bram Moolenaar
6acf757c6a patch 9.0.1127: no error if function argument shadows class member
Problem:    No error if function argument shadows class member.
Solution:   Give an error for shadowing a class member.
2023-01-01 19:53:30 +00:00
Bram Moolenaar
fc966c19f8 patch 9.0.1126: bracketed paste can be enabled when it is not recognized
Problem:    Bracketed paste can be enabled when pasted text is not recognized.
Solution:   Output t_BE only when t_PS and t_PE are set.
2023-01-01 18:04:33 +00:00
Bram Moolenaar
ec8b74f7ab patch 9.0.1125: memory leak when using class functions
Problem:    Memory leak when using class functions.
Solution:   Clear and free the array with class functions.
2023-01-01 14:11:27 +00:00
Bram Moolenaar
1aeb3eb092 patch 9.0.1124: virtual text at a column position is truncated
Problem:    Virtual text at a column position is truncated at the window edge.
            (Yegappan Lakshmanan)
Solution:   Do not truncated virtual text that is placed at a column.
2023-01-01 14:04:51 +00:00
Bram Moolenaar
6bafdd41cb patch 9.0.1123: class function not implemented yet
Problem:    Class function not implemented yet.
Solution:   Implement defining and calling a class function.
2023-01-01 12:58:33 +00:00
Bram Moolenaar
9f2d97efe2 patch 9.0.1122: class member access is not fully tested yet
Problem:    Class member access is not fully tested yet.
Solution:   Add more tests.
2022-12-31 19:01:02 +00:00
Bram Moolenaar
f1dcd14fc5 Update runtime files 2022-12-31 15:30:45 +00:00
Bram Moolenaar
db4d88c2ad patch 9.0.1121: cursor positioning and display problems with 'smoothscroll'
Problem:    Cursor positioning and display problems with 'smoothscroll' and
            using "zt", "zb" or "zz".
Solution:   Adjust computations and conditions. (Yee Cheng Chin,
            closes #11764)
2022-12-31 15:13:22 +00:00
smjonas
c55e8f2c6f patch 9.0.1120: tex filetype detection not sufficiently tested
Problem:    Tex filetype detection not sufficiently tested.
Solution:   Add more test cases for "tex" detection. (Jonas Strittmatter,
            closes #11765)
2022-12-31 14:46:53 +00:00
Bram Moolenaar
0d89d8ae89 patch 9.0.1119: type of arguments not checked when calling a partial
Problem:    Type of arguments not checked when calling a partial.
Solution:   Give an error for a wrong argument type. (closes #11753)
2022-12-31 14:01:24 +00:00
James McCoy
dbe6ef1036 patch 9.0.1118: sporadic test failures when using a terminal window
Problem:    Sporadic test failures when using a terminal window.
Solution:   Adjust waiting times. (James McCoy, closes #11763)
2022-12-31 11:44:57 +00:00
Bram Moolenaar
7b8db111e8 patch 9.0.1117: terminfo entries for bracketed paste are not used
Problem:    Terminfo entries for bracketed paste are not used.
Solution:   Use the newly added terminfo entries for bracketed paste.
            Correct mixup of output strings and key codes.
2022-12-30 21:10:25 +00:00
Bram Moolenaar
770713794a patch 9.0.1116: compiler may complain about an unused function
Problem:    Compiler may complain about an unused function.
Solution:   Add #ifdef. (John Marriott)
2022-12-30 19:54:53 +00:00
Yegappan Lakshmanan
ed0c1d5d4b patch 9.0.1115: code is indented more than needed
Problem:    Code is indented more than needed.
Solution:   Use an early return to reduce indenting. (Yegappan Lakshmanan,
            closes #11758)
2022-12-30 18:07:46 +00:00
Philip H
ef91ae4557 patch 9.0.1114: CI does not use the latest Python version
Problem:    CI does not use the latest Python version.
Solution:   Switch from Python 3.10 to 3.11. (closes #11761)
2022-12-30 17:41:17 +00:00
Christian Brabandt
0a657124a5 patch 9.0.1113: users cannot easily try out a PR
Problem:    Users cannot easily try out a PR.
Solution:   Add an "artifacts" section to the AppVeyor CI config. (Christian
            Brabandt, closes #11762)
2022-12-30 17:28:12 +00:00
Christopher Plewright
7b0afc1d76 patch 9.0.1112: test_mswin_event() can hang
Problem:    test_mswin_event() can hang.
Solution:   Add the "execute" argument to process events right away.
            (Christopher Plewright, closes #11760)
2022-12-30 16:54:58 +00:00
Bram Moolenaar
96dd34e534 patch 9.0.1111: termcap entries for RGB colors are not set automatically
Problem:    Termcap entries for RGB colors are not set automatically.
Solution:   Always set the termcap entries when +termguicolors is enabled.
2022-12-30 11:16:00 +00:00
Evan Miller
254480736f patch 9.0.1110: build fails on Mac OS X 10.4/10.5
Problem:    Build fails on Mac OS X 10.4/10.5 .
Solution:   Check if the dispatch/dispatch.h header exists. (Evan Miller,
            closes #11746)
2022-12-30 10:42:23 +00:00
Bram Moolenaar
c4b3f6477c patch 9.0.1109: leaking allocated type
Problem:    Leaking allocated type.
Solution:   Reset the "static" flag in the allocated type copy.
2022-12-30 10:36:34 +00:00
Bram Moolenaar
c6951a76a5 patch 9.0.1108: type error when using "any" type and adding to float
Problem:    Type error when using "any" type and adding a number to a float.
Solution:   Accept both a number and a float. (closes #11753)
2022-12-29 20:56:24 +00:00
Bram Moolenaar
73ade49c4b patch 9.0.1107: float constant not recognized as float
Problem:    Float constant not recognized as float.
Solution:   Check the vartype instead of comparing with t_float.
            (closes #11754)
2022-12-27 20:54:41 +00:00
KodeToad
09ce0b8e11 patch 9.0.1106: not all postfix files are recognized
Problem:    Not all postfix files are recognized.
Solution:   Recognize main.cf.proto files. (closes #11732)
2022-12-27 20:17:19 +00:00
Yegappan Lakshmanan
87c1cbbe98 patch 9.0.1105: code is indented too much
Problem:    Code is indented too much.
Solution:   Use an early return. (Yegappan Lakshmanan, closes #11756)
2022-12-27 19:54:52 +00:00
Bram Moolenaar
56310d38d8 patch 9.0.1104: invalid memory access when checking function argument types
Problem:    Invalid memory access when checking function argument types.
Solution:   Do not check beyond the number of arguments. (closes #11755)
2022-12-27 17:25:05 +00:00
David McDonald
b9a1edfc54 patch 9.0.1103: jq files are not recognized
Problem:    jq files are not recognized.
Solution:   Add detection of Jq files. (David McDonald, closes #11743)
2022-12-26 15:35:18 +00:00
K.Takata
a7fbaa43b7 patch 9.0.1102: complicated use of #ifdef
Problem:    Complicated use of #ifdef.
Solution:   Simplify #ifdef use. (Ken Takata, closes #11745)
2022-12-26 14:46:51 +00:00
Bram Moolenaar
b536540ab3 patch 9.0.1101: unused global variable
Problem:    Unused global variable.
Solution:   Remove the variable. (closes #11752)
2022-12-26 14:37:44 +00:00
Bram Moolenaar
d0883faac6 patch 9.0.1100: a hashtab with many removed items is not cleaned up
Problem:    A hashtab with many removed items is not cleaned up.
Solution:   Re-hash a hashtab even when the size didn't change if too many
            items were removed.
2022-12-26 13:51:26 +00:00
Bram Moolenaar
81b7ecc5cb patch 9.0.1099: trying to resize a hashtab may cause a problem
Problem:    Trying to resize a hashtab may cause a problem.
Solution:   Do not try to resize a hashtab before adding an item.
2022-12-26 13:08:06 +00:00
Yegappan Lakshmanan
465de3a57b patch 9.0.1098: code uses too much indent
Problem:    Code uses too much indent.
Solution:   Use an early return. (Yegappan Lakshmanan, closes #11747)
2022-12-26 12:50:04 +00:00
Bram Moolenaar
b3d614369f patch 9.0.1097: tests are failing
Problem:    Tests are failing.
Solution:   Do clean up a hashtab when at the initial size.
2022-12-25 21:32:09 +00:00
Bram Moolenaar
71d53e7c57 patch 9.0.1096: reallocating hashtab when the size didn't change
Problem:    Reallocating hashtab when the size didn't change.
Solution:   Bail out when the hashtab is already the desired size.
2022-12-25 20:46:13 +00:00
Bram Moolenaar
6ef5471afa patch 9.0.1095: using freed memory when declaration fails
Problem:    Using freed memory when declaration fails. (Yegappan Lakshmanan)
Solution:   After unreferencing an object set the reference to NULL.
2022-12-25 19:31:36 +00:00
Bram Moolenaar
9b99411b93 patch 9.0.1094: compiler warning when HAS_MESSAGE_WINDOW is not defined
Problem:    Compiler warning when HAS_MESSAGE_WINDOW is not defined.
Solution:   Add UNUSED.
2022-12-25 15:59:25 +00:00
Bram Moolenaar
590162cae0 patch 9.0.1093: using freed memory of object member
Problem:    Using freed memory of object member. (Yegappan Lakshmanan)
Solution:   Make a copy of the object member when getting it.
2022-12-24 21:24:06 +00:00
Rob Pilling
e86190e7c1 patch 9.0.1092: search error message doesn't show used pattern
Problem:    Search error message doesn't show used pattern.
Solution:   Pass the actually used pattern to where the error message is
            given. (Rob Pilling, closes #11742)
2022-12-23 19:06:04 +00:00
Bram Moolenaar
f54cedd676 patch 9.0.1091: assignment to non-existing member causes a crash
Problem:    Assignment to non-existing member causes a crash. (Yegappan
            Lakshmanan)
Solution:   Give an error message and bail out when a member cannot be found.
2022-12-23 17:56:27 +00:00
mgramigna
c9207d5d79 patch 9.0.1090: FHIR Shorthand files are not recognized
Problem:    FHIR Shorthand files are not recognized.
Solution:   Add a pattern to detect FSH files. (Matthew Gramigna,
            closes #11738)
2022-12-23 13:18:44 +00:00
Luuk van Baal
c53e7904b9 patch 9.0.1089: unnessary assignment
Problem:    unnessary assignment
Solution:   Remove the assignment. (Luuk van Baal, closes #1136)
2022-12-23 12:17:33 +00:00
Bram Moolenaar
9fca133eb7 patch 9.0.1088: clang warns for unused variable
Problem:    Clang warns for unused variable.
Solution:   Adjust #ifdef. (John Marriott)
2022-12-22 21:06:41 +00:00
James McCoy
ff3d537704 patch 9.0.1087: autocommand test sometimes fails
Problem:    Autocommand test sometimes fails.
Solution:   Add a short delay. (James McCoy, closes #11737)
2022-12-22 18:30:24 +00:00
Christopher Plewright
c8b126d70d patch 9.0.1086: display wrong in Windows terminal after exiting Vim
Problem:    Display wrong in Windows terminal after exiting Vim.
Solution:   Apply screen restore fix for Windows 11 also to Windows 10 builds.
            (Christopher Plewright, closes #11713, closes #11706)
2022-12-22 13:45:23 +00:00
Bram Moolenaar
9b8a365d01 patch 9.0.1085: compiler warns for uninitialized variable
Problem:    Compiler warns for uninitialized variable.
Solution:   Initialize the variable.  Remove unused function. (John Marriott)
2022-12-20 20:47:28 +00:00
Christopher Plewright
20b795e0eb patch 9.0.1084: code handling low level MS-Windows events cannot be tested
Problem:    Code handling low level MS-Windows events cannot be tested.
Solution:   Add test_mswin_event() and tests using it. (Christopher Plewright,
            closes #11622)
2022-12-20 20:01:58 +00:00
Bram Moolenaar
418b547881 patch 9.0.1083: empty and comment lines in a class cause an error
Problem:    Empty and comment lines in a class cause an error.
Solution:   Skip empty and comment lines. (closes #11734)
2022-12-20 13:38:22 +00:00
kylo252
104b2ff4d0 patch 9.0.1082: some jsonc files are not recognized
Problem:    Some jsonc files are not recognized.
Solution:   Add patterns for jsonc and move some from json to jsonc.
            (closes #11711)
2022-12-19 20:42:49 +00:00
Bram Moolenaar
34820944ed patch 9.0.1081: using "->" with split lines does not always work
Problem:    Using "->" with split lines does not always work.
Solution:   Avoid trying to get another line. (closes #11723)
2022-12-19 20:28:38 +00:00
Bram Moolenaar
afa3f1cc72 patch 9.0.1080: the "kitty" terminfo entry is not widespread
Problem:    The "kitty" terminfo entry is not widespread, resulting in the
            kitty terminal not working properly.
Solution:   Go back to using "xterm-kitty" and avoid the problems it causes in
            another way.
2022-12-19 18:56:48 +00:00
zeertzjq
33e543038b patch 9.0.1079: leaking memory when defining a user command fails
Problem:    Leaking memory when defining a user command fails.
Solution:   Free "compl_arg" when needed. (closes #11726)
2022-12-19 16:49:27 +00:00
zeertzjq
07146ad1d3 patch 9.0.1078: with the +vartabs feature indent folding may use wrong 'ts'
Problem:    With the +vartabs feature indent folding may use wrong 'tabstop'.
Solution:   Use the "buf" argument instead of "curbuf".
2022-12-19 15:51:44 +00:00
Bram Moolenaar
4ce1f99a2d patch 9.0.1077: can add text property with negative ID before virtual text
Problem:    Can add text property with negative ID before virtual text
            property.
Solution:   Remember that a text property with a negative ID was used and give
            an appropriate error message. (closes #11725)
            Fix index computation.
2022-12-19 13:31:06 +00:00
Bram Moolenaar
8efdcee02e patch 9.0.1076: ASAN complains about NULL argument
Problem:    ASAN complains about NULL argument.
Solution:   Skip memmove() when there is nothing to move.
2022-12-19 12:18:09 +00:00
Bram Moolenaar
c336ae3ce6 patch 9.0.1075: build fails if compiler doesn't allow declaration after case
Problem:    build fails if the compiler doesn't allow for a declaration right
            after "case".
Solution:   Add a block.
2022-12-18 22:01:42 +00:00
Bram Moolenaar
d505d17885 patch 9.0.1074: class members are not supported yet
Problem:    Class members are not supported yet.
Solution:   Add initial support for class members.
2022-12-18 21:42:55 +00:00
Bram Moolenaar
731d00770d patch 9.0.1073: using "xterm-kitty" for 'term' causes problems
Problem:    Using "xterm-kitty" for 'term' causes problems.
Solution:   Remove the "xterm-" part when 'term' is set from $TERM.  Detect a
            few kitty-specific properties based on the version response
            instead of the terminal name.
2022-12-18 17:47:18 +00:00
zeertzjq
ba2d191932 patch 9.0.1072: screenpos() column result in fold may be too small
Problem:    screenpos() column result in fold may be too small.
Solution:   Add space of 'number', sign column, etc. (closes #11715)
2022-12-18 12:28:59 +00:00
dundargoc
b5328b46a7 patch 9.0.1071: Codecov action version is too specific
Problem:    Codecov action version is too specific.
Solution:   Only use "v3" to automatically use the latest stable version.
            (closes #11720)
2022-12-17 15:47:45 +00:00
Bram Moolenaar
b26461715b patch 9.0.1070: reading beyond array size
Problem:    Reading beyond array size.
Solution:   Only use name[0] and name[1], do not use "name" as a string.
2022-12-17 15:35:43 +00:00
Bram Moolenaar
417e88bb75 patch 9.0.1069: diff mode highlight fails for special characters
Problem:    Diff mode highlight fails for special characters.
Solution:   Adjust condition for setting "diff_hlf".
2022-12-17 15:03:02 +00:00
Bram Moolenaar
8d754fada8 patch 9.0.1068: no information about whether request term codes has an effect
Problem:    No information about whether requesting term codes has an effect.
Solution:   Add ch_log() calls to report the effect of term code responses.
            Avoid deleting an entry and then adding back the same one.
2022-12-17 13:49:16 +00:00
Bram Moolenaar
d097af7779 patch 9.0.1067: in diff mode virtual text is highlighted incorrectly
Problem:    In diff mode virtual text is highlighted incorrectly. (Rick Howe)
Solution:   Do not use diff attributes for virtual text. (closes #11714)
2022-12-17 11:33:00 +00:00
zeertzjq
67f3094397 patch 9.0.1066: test function name is wrong
Problem:    Test function name is wrong.
Solution:   Rename to what is actually being tested. (closes #11712)
2022-12-17 10:40:15 +00:00
Bram Moolenaar
9d1184cd1d patch 9.0.1065: a shell command switching screens may still have a problem
Problem:    A shell command switching screens may still have a problem with
            the kitty keyboard protocol.
Solution:   Disable the kitty keyboard protocol both in the current and the
            alternate screen, if there are indications it might be needed.
            (issue #11705)  Also fix naming.
2022-12-16 18:33:20 +00:00
Christian Brabandt
9aee8ec400 patch 9.0.1064: code for making 'shortmess' temporarily empty is repeated
Problem:    Code for making 'shortmess' temporarily empty is repeated.
Solution:   Add functions for making 'shortmess' empty and restoring it.
            (Christian Brabandt, closes #11709)
2022-12-16 16:41:23 +00:00
Bram Moolenaar
4ab1f4a32f patch 9.0.1063: when using Kitty a shell command may mess up the key state
Problem:    When using Kitty a shell command may mess up the key protocol
            state.
Solution:   Output t_te before t_TE.  If t_te switches between the main and
            the alternate screen then deactivating the key protocol by t_TE
            should happen after switching screen. (issue #11705)
2022-12-16 13:08:36 +00:00
zeertzjq
4cd45f1408 patch 9.0.1062: some test function names do not match what they are doing
Problem:    Some test function names do not match what they are doing.
Solution:   Leave out user data for the test that is called "NoUserData".
            (closes #11703)
2022-12-15 13:48:30 +00:00
Luuk van Baal
ba936f6f4e patch 9.0.1061: cannot display 'showcmd' somewhere else
Problem:    Cannot display 'showcmd' somewhere else.
Solution:   Add the 'showcmdloc' option. (Luuk van Baal, closes #11684)
2022-12-15 13:15:39 +00:00
Bram Moolenaar
3d473ee1a6 patch 9.0.1060: private and public object members are not implemented yet
problem:    Private and public object members are not implemented yet.
Solution:   Implement private and public object members.
2022-12-14 20:59:32 +00:00
Bram Moolenaar
f94178db8d patch 9.0.1059: build failure with some compilers
Problem:    Build failure with some compilers that can't handle a
            declaration directly after a "case" statement.
Solution:   Add a block to put the declarations in.
2022-12-14 17:50:00 +00:00
Bram Moolenaar
91c9d6d772 patch 9.0.1058: string value of class and object do not have information
Problem:    String value of class and object do not have useful information.
Solution:   Add the class name and for the object the member values.
2022-12-14 17:30:37 +00:00
Chris Kipp
70ef3f546b patch 9.0.1057: conflict between supercollider and scala filetype detection
Problem:    Conflict between supercollider and scala filetype detection.
Solution:   Do not check for "Class : Method", it can appear in both
            filetypes. (Chris Kipp, closes #11699)
2022-12-14 16:42:15 +00:00
Bram Moolenaar
eb53350c02 patch 9.0.1056: leaking memory when disassembling an object method
Problem:    Leaking memory when disassembling an object method.
Solution:   Free the typval of the class.
2022-12-14 15:06:11 +00:00
Bram Moolenaar
f593fc891c patch 9.0.1055: Coverity warns for using uninitialized memory
Problem:    Coverity warns for using uninitialized memory.
Solution:   Clear the "lhs" field earlier.
2022-12-14 13:50:02 +00:00
Bram Moolenaar
74e1274edf patch 9.0.1054: object member can't get type from initializer
Problem:    Object member can't get type from initializer.
Solution:   If there is no type specified try to use the type of the
            initializer.  Check for a valid type.
2022-12-13 21:14:28 +00:00
Bram Moolenaar
65b0d16768 patch 9.0.1053: default constructor arguments are not optional
Problem:    Default constructor arguments are not optional.
Solution:   Use "= v:none" to make constructor arguments optional.
2022-12-13 18:43:22 +00:00
Bram Moolenaar
692fe0889c patch 9.0.1052: using freed memory on exit when EXITFREE is defined
Problem:    Using freed memory on exit when EXITFREE is defined.
Solution:   Make a deep copy of the type.  Make sure TTFLAG_STATIC is not set
            in the copy.
2022-12-13 13:42:37 +00:00
Rob Pilling
cb94c91070 patch 9.0.1051: after a failed CTRL-W ] next command splits window
Problem:    After a failed CTRL-W ] next command splits window.
Solution:   Reset postponed_split. (Rob Pilling, closes #11698)
2022-12-13 12:26:09 +00:00
Bram Moolenaar
6342e2c5a6 patch 9.0.1050: using freed memory when assigning to variable twice
Problem:    Using freed memory when assigning to variable twice.
Solution:   Make copy of the list type. (closes #11691)
2022-12-12 18:56:32 +00:00
Bram Moolenaar
67578e5bcf patch 9.0.1049: crash when opening a very small terminal window
Problem:    Crash when opening a very small terminal window.
Solution:   Instead of crashing fix the cursor position. (closes #11697)
2022-12-12 13:47:44 +00:00
zeertzjq
b7acea1806 patch 9.0.1048: with "screenline" in 'culopt' cursorline highlight is wrong
Problem:    With "screenline" in 'culopt' cursorline highlight is wrong.
Solution:   Apply the priority logic also when "screenline is in 'culopt'.
            (closes #11696)
2022-12-12 13:20:43 +00:00
Bram Moolenaar
7db29e4b5c Update runtime files 2022-12-11 15:53:04 +00:00
Bram Moolenaar
79336e19cb patch 9.0.1047: matchparen is slow
Problem:    Matchparen is slow.
Solution:   Actually use the position where the match started, not the
            position where the search started. (closes #11644)
2022-12-11 14:18:31 +00:00
Bram Moolenaar
3ea8a1b129 patch 9.0.1046: class method disassemble test fails on MS-Windows
Problem:    Class method disassemble test fails on MS-Windows.
Solution:   Do not match with a specific size.
2022-12-10 19:03:51 +00:00
Bram Moolenaar
7ce7daf6cd patch 9.0.1045: in a class object members cannot be initialized
Problem:    In a class object members cannot be initialized.
Solution:   Support initializing object members. Make "dissassemble" work on
            an object method.
2022-12-10 18:42:12 +00:00
Bram Moolenaar
6c87bbb4e4 patch 9.0.1044: setting window height using Python may cause errors
Problem:    Setting window height using Python may cause errors.
Solution:   When setting "curwin" also set "curbuf". (closes #11687)
2022-12-10 11:17:11 +00:00
zeertzjq
c51a376265 patch 9.0.1043: macro has confusing name and is duplicated
Problem:    Macro has confusing name and is duplicated.
Solution:   Use one macro with an understandable name. (closes #11686)
2022-12-10 10:22:29 +00:00
Bram Moolenaar
4ae0057308 patch 9.0.1042: ASAN gives false alarm about array access.
Problem:    ASAN gives false alarm about array access.
Solution:   Use an intermediate pointer.
2022-12-09 22:49:23 +00:00
Bram Moolenaar
ffdaca9e6f patch 9.0.1041: cannot define a method in a class
Problem:    Cannot define a method in a class.
Solution:   Implement defining an object method.  Make calling an object
            method work.
2022-12-09 21:41:48 +00:00
Bram Moolenaar
148bcd3610 patch 9.0.1040: test for <Cmd> mapping with CmdlineChanged fails
Problem:    Test for <Cmd> mapping with CmdlineChanged fails.
Solution:   Put back the check for the cmdline length not changing.
2022-12-09 12:41:32 +00:00
Bram Moolenaar
bb393d8259 patch 9.0.1039: using a <Cmd> mapping CmdlineChanged may be triggered twice
Problem:    Using a <Cmd> mapping CmdlineChanged may be triggered twice.
Solution:   Count the number of times CmdlineChanged is triggered and avoid
            doing it twice. (closes #116820
2022-12-09 12:21:50 +00:00
zeertzjq
ffa4e9b43a patch 9.0.1038: function name does not match what it is used for
Problem:    Function name does not match what it is used for.
Solution:   Include the modifier in the name. (closes #11679)
2022-12-09 11:36:36 +00:00
Bram Moolenaar
98aeb2100c patch 9.0.1037: lalloc(0) error for a class without members
Problem:    lalloc(0) error for a class without members.
Solution:   Don't allocate room for members if there aren't any.
            Don't create the class if there was an error.
2022-12-08 22:09:14 +00:00
Bram Moolenaar
3f8f827723 patch 9.0.1036: undo misbehaves when writing from an insert mode mapping
Problem:    Undo misbehaves when writing from an insert mode mapping.
Solution:   Sync undo when writing. (closes #11674)
2022-12-08 21:49:35 +00:00
Bram Moolenaar
d28d7b94f5 patch 9.0.1035: object members are not being marked as used
Problem:    Object members are not being marked as used, garbage collection
            may free them.
Solution:   Mark object members as used.  Fix reference counting.
2022-12-08 20:42:00 +00:00
Bram Moolenaar
e5eae82bb7 patch 9.0.1034: reporting swap file when windows are split
Problem:    Reporting swap file when windows are split.
Solution:   Close extra windows after running a test.
2022-12-08 16:30:16 +00:00
Bram Moolenaar
83c43ab319 patch 9.0.1033: tiny build fails because of conflicting typedef
Problem:    Tiny build fails because of conflicting typedef.
Solution:   Remove one typedef.
2022-12-08 16:10:01 +00:00
Bram Moolenaar
b9603f6498 patch 9.0.1032: test fails when terminal feature is missing
Problem:    Test fails when terminal feature is missing.
Solution:   Use CheckRunVimInTerminal.
2022-12-08 15:44:22 +00:00
Bram Moolenaar
00b28d6c23 patch 9.0.1031: Vim9 class is not implemented yet
Problem:    Vim9 class is not implemented yet.
Solution:   Add very basic class support.
2022-12-08 15:32:33 +00:00
Bram Moolenaar
038e6d20e6 patch 9.0.1030: using freed memory with the cmdline popup menu
Problem:    Using freed memory with the cmdline popup menu.
Solution:   Clear the popup menu when clearing the matches. (closes #11677)
2022-12-08 12:00:50 +00:00
Bram Moolenaar
84dbf855fb patch 9.0.1029: autoload directory missing from distribution
Problem:    Autoload directory missing from distribution.
Solution:   Add the autoload/zig directory to the list of distributed files.
2022-12-08 10:03:48 +00:00
Yee Cheng Chin
1881abfc34 patch 9.0.1028: mouse shape test is flaky, especially on Mac OS
Problem:    Mouse shape test is flaky, especially on Mac OS.
Solution:   Instead of starting all timers at the same time, start the next
            one in the callback of the previous one. (Yee Cheng Chin,
            closes #11673)  Also use "bwipe!" instead of "close!" to avoid
            swap files remaining.
2022-12-08 09:41:24 +00:00
Philip H
647b8dfa7f patch 9.0.1027: LGTM is soon shutting down
Problem:    LGTM is soon shutting down.
Solution:   Remove LGTM from CI. (closes #11671)
2022-12-07 23:00:26 +00:00
Bram Moolenaar
2e613453ee patch 9.0.1026: type of w_last_topfill is wrong
Problem:    type of w_last_topfill is wrong.
Solution:   Use "int" instead of "linenr_T". (closes #11670)
2022-12-07 22:30:18 +00:00
zeertzjq
3fc84dc2c7 patch 9.0.1025: WinScrolled is not triggered when filler lines change
Problem:    WinScrolled is not triggered when filler lines change.
Solution:   Add "topfill" to the values that WinScrolled triggers on.
            (closes #11668)
2022-12-07 09:17:59 +00:00
Bram Moolenaar
86b4816766 Update runtime files 2022-12-06 18:20:10 +00:00
Philip H
5e0c004f0c patch 9.0.1024: CI doesn't use the latest FreeBSD version
Problem:    CI doesn't use the latest FreeBSD version.
Solution:   Go from 12.3 to 12.4. (closes #11423)
2022-12-06 16:56:44 +00:00
K.Takata
a8cdb4eef8 patch 9.0.1023: MS-Windows: dynamic loading of libsodium doesn't work
Problem:    MS-Windows: dynamic loading of libsodium doesn't work.
Solution:   Add "randombytes_random". (Ken Takata, closes #11667)
2022-12-06 16:17:01 +00:00
Bram Moolenaar
af34543b92 patch 9.0.1022: suspend test fails on Mac OS when suspending Vim
Problem:    Suspend test fails on Mac OS when suspending Vim.
Solution:   Make 'keyprotocol' empty.
2022-12-06 16:09:52 +00:00
Bram Moolenaar
d6e74f5479 patch 9.0.1021: test trips over g:name
Problem:    Test trips over g:name.
Solution:   Delete g:name after using it.
2022-12-06 15:07:56 +00:00
Bram Moolenaar
6572a90287 patch 9.0.1020: tests call GetSwapFileList() before it is defined
Problem:    Tests call GetSwapFileList() before it is defined.
Solution:   Move the call to after defining the function. (Christopher
            Plewright)
2022-12-06 14:21:09 +00:00
Bram Moolenaar
56a40fea9c patch 9.0.1019: 'smoothscroll' and virtual text above don't work together
Problem:    'smoothscroll' and virtual text above don't work together.
            (Yee Cheng Chin)
Solution:   Skip virtual text above when w_skipcol is non-zero.
            (closes #11665)
2022-12-06 14:17:57 +00:00
Bram Moolenaar
7155fb6614 patch 9.0.1018: suspend test still fails on Mac OS
Problem:    Suspend test still fails on Mac OS.
Solution:   Make 'keyprotocol' empty.
2022-12-06 09:11:39 +00:00
Bram Moolenaar
9dacdb1d56 patch 9.0.1017: test for srand() fails on MS-Windows
Problem:    Test for srand() fails on MS-Windows.
Solution:   Do not expect the same result a second time.
2022-12-06 09:05:25 +00:00
Bram Moolenaar
1cb16c3a20 patch 9.0.1016: screenpos() does not count filler lines for diff mode
Problem:    screenpos() does not count filler lines for diff mode.
Solution:   Add filler lines. (closes 11658)
2022-12-05 22:26:44 +00:00
Yasuhiro Matsumoto
f0a9c00482 patch 9.0.1015: without /dev/urandom srand() seed is too predictable
Problem:    Without /dev/urandom srand() seed is too predictable.
Solution:   Use micro seconds and XOR with process ID. (Yasuhiro Matsumoto,
            closes #11656)
2022-12-05 21:55:55 +00:00
Bram Moolenaar
25201016d5 patch 9.0.1014: zir files are not recognized
Problem:    Zir files are not recognized.
Solution:   Add a pattern for Zir files. (closes #11664)
2022-12-05 21:40:39 +00:00
Bram Moolenaar
0a2f891adf patch 9.0.1013: suspend test often fails on Mac OS
Problem:    Suspend test often fails on Mac OS.
Solution:   Make t_RP empty.
2022-12-05 21:21:46 +00:00
Bram Moolenaar
fa2533c8bb patch 9.0.1012: tests may get stuck in buffer with swap file
Problem:    Tests may get stuck in buffer with swap file.
Solution:   Bail out when bwipe! doesn't get another buffer.
2022-12-05 20:58:04 +00:00
Bram Moolenaar
99d19438ca patch 9.0.1011: ml_get error when using screenpos()
Problem:    ml_get error when using screenpos().
Solution:   Give an error for the line number. (closes #11661)
2022-12-05 16:23:24 +00:00
Bram Moolenaar
23526d2539 patch 9.0.1010: stray warnings for existing swap files
Problem:    Stray warnings for existing swap files.
Solution:   Wipe out the buffer until it has no name and no swap file.
2022-12-05 15:50:41 +00:00
Bram Moolenaar
72b5b0d51a patch 9.0.1009: test for catch after interrupt is flaky on MS-Windows
Problem:    Test for catch after interrupt is flaky on MS-Windows.
Solution:   Mark the test as flaky.
2022-12-05 15:24:20 +00:00
Bram Moolenaar
6cf3151f0e patch 9.0.1008: test for swapfilelist() fails on MS-Windows
Problem:    Test for swapfilelist() fails on MS-Windows.
Solution:   Only check the tail of the path.  Mark a test as flaky.
2022-12-05 15:01:05 +00:00
Bram Moolenaar
c216a7a21a patch 9.0.1007: there is no way to get a list of swap file names
Problem:    There is no way to get a list of swap file names.
Solution:   Add the swapfilelist() function.  Use it in the test script to
            clean up.  Remove deleting individual swap files.
2022-12-05 13:50:55 +00:00
Bram Moolenaar
65214053f6 patch 9.0.1006: suspend test still sometimes fails on MacOS
Problem:    Suspend test still sometimes fails on MacOS.
Solution:   Wait a little while for terminal responses.
2022-12-04 23:30:19 +00:00
Bram Moolenaar
d0f8d39d20 patch 9.0.1005: a failed test may leave a swap file behind
Problem:    A failed test may leave a swap file behind.
Solution:   Delete the swap file to avoid another test to fail.  Use another
            file name.
2022-12-04 23:00:41 +00:00
Bram Moolenaar
a0a6f3a22a patch 9.0.1004: suspend test sometimes fails on MacOS
Problem:    Suspend test sometimes fails on MacOS.
Solution:   Wait a short while for terminal responses.
2022-12-04 22:26:40 +00:00
Bram Moolenaar
3d3e2aa826 patch 9.0.1003: tiny build fails
Problem:    Tiny build fails.
Solution:   Remove #ifdef from error message.
2022-12-04 21:40:51 +00:00
Bram Moolenaar
9163efb5b8 patch 9.0.1002: command list test fails
Problem:    Command list test fails.
Solution:   Add commands added to the list.
2022-12-04 21:09:48 +00:00
Bram Moolenaar
c1c365c1ca patch 9.0.1001: classes are not documented or implemented yet
Problem:    Classes are not documented or implemented yet.
Solution:   Make the first steps at documenting Vim9 objects, classes and
            interfaces.  Make initial choices for the syntax.  Add a skeleton
            implementation.  Add "public" and "this" in the command table.
2022-12-04 20:13:24 +00:00
Bram Moolenaar
b21b8e9ed0 patch 9.0.1000: with 'smoothscroll' skipcol may be reset unnecessarily
Problem:    With 'smoothscroll' skipcol may be reset unnecessarily.
Solution:   Check the line does actually fit in the window.
2022-12-03 18:35:07 +00:00
Bram Moolenaar
c0370529c0 patch 9.0.0999: memory may leak
Problem:    Memory may leak.
Solution:   Free the sound callback function name if it was allocated.
2022-12-03 13:52:24 +00:00
Bram Moolenaar
1b73edd9ee patch 9.0.0998: "gk" may reset skipcol when not needed
Problem:    "gk" may reset skipcol when not needed.
Solution:   Only reset skipcol if the cursor column is less.
2022-12-03 11:51:54 +00:00
Bram Moolenaar
8ffb7e051d patch 9.0.0997: Coverity warns for dead code
Problem:    Coverity warns for dead code.
Solution:   Don't use ASCII_ISUPPER() for a negative value.
2022-12-03 10:13:30 +00:00
Bram Moolenaar
af19ec0bfa patch 9.0.0996: if 'keyprotocol' is empty "xterm" still uses modifyOtherKeys
Problem:    If 'keyprotocol' is empty "xterm" still uses modifyOtherKeys.
Solution:   Remove t_TI, t_RK and t_TE from the "xterm" builtin termcap and
            let the default value of 'keyprotocol' add those.
2022-12-03 00:00:38 +00:00
Bram Moolenaar
37f088eead patch 9.0.0995: padding before virtual text is highlighted
Problem:    Padding before virtual text below is highlighted when 'number' and
            'nowrap' are set.
Solution:   Save and restore n_attr_skip. (closes #11643)
2022-12-02 21:50:14 +00:00
Bram Moolenaar
267db7c3e3 patch 9.0.0994: tests for empty prop type name fail
Problem:    Tests for empty prop type name fail.
Solution:   Correct the error number.
2022-12-02 21:37:45 +00:00
Bram Moolenaar
89469d157a patch 9.0.0993: display errors when adding or removing text property type
Problem:    Display errors when adding or removing text property type.
Solution:   Perform a full redraw.  Only use text properties for which the
            type is defined. (closes #11655)
2022-12-02 20:46:26 +00:00
mityu
500c444283 patch 9.0.0992: Vim9 script: get E1096 when comment follows return
Problem:    Vim9 script: get E1096 when comment follows return.
Solution:   Adjust condition for return without expression. (closes #11654)
2022-12-02 18:12:05 +00:00
Bram Moolenaar
c67c89c758 patch 9.0.0991: crash when reading help index with various options set
Problem:    Crash when reading help index with various options set. (Marius
            Gedminas)
Solution:   Do not set wlv.c_extra to NUL when wlv.p_extra is NULL.
            (closes #11651)
2022-12-02 16:39:44 +00:00
Bram Moolenaar
c96b7f5d2a patch 9.0.0990: callback name argument is changed by setqflist()
Problem:    Callback name argument is changed by setqflist().
Solution:   Use the expanded function name for the callback, do not store it
            in the argument. (closes #11653)
2022-12-02 15:58:38 +00:00
Bram Moolenaar
9c8d12c811 patch 9.0.0989: popupwin test is more flaky on MacOS
Problem:    Popupwin test is more flaky on MacOS.
Solution:   Use a longer wait time.
2022-12-02 15:06:07 +00:00
Bram Moolenaar
b55ae8ce42 patch 9.0.0988: using feedkeys() does not show up in a channel log
Problem:    Using feedkeys() does not show up in a channel log.
Solution:   Add ch_log() calls and clean up the code.
2022-12-02 13:37:36 +00:00
Bram Moolenaar
cf650b7c9b patch 9.0.0987: file missing from list of distributed files
Problem:    File missing from list of distributed files.
Solution:   Add logfile.pro to list of distributed files.
2022-12-02 13:20:19 +00:00
Bram Moolenaar
5390c05a3c patch 9.0.0986: build failure with tiny version
Problem:    Build failure with tiny version.
Solution:   Add #ifdef.
2022-12-02 13:10:03 +00:00
Bram Moolenaar
1a173409ae patch 9.0.0985: when using kitty keyboard protocol function keys may not work
Problem:    When using kitty keyboard protocol function keys may not work.
            (Kovid Goyal)
Solution:   Recognize CSI ending in [ABCDEFHPQRS] also when the termcap
            entries are not specified. (closes #11648)
2022-12-02 12:28:47 +00:00
Bram Moolenaar
023930d62e patch 9.0.0984: GUI: remote_foreground() does not always work
Problem:    GUI: remote_foreground() does not always work. (Ron Aaron)
Solution:   For GTK use gtk_window_set_keep_above(). (issue #11641)
2022-12-01 19:40:55 +00:00
Bram Moolenaar
184a622ada patch 9.0.0983: stray characters displayed when starting the GUI
Problem:    Stray characters displayed when starting the GUI.
Solution:   Add t_RK to the list of terminal options.
2022-12-01 19:25:04 +00:00
Bram Moolenaar
45e4eead2a patch 9.0.0982: 'cursorline' not drawn before virtual text below
Problem:    'cursorline' not drawn before virtual text below.
Solution:   Add the 'cursorline' attribute to the empty space. (closes #11647)
2022-12-01 18:38:02 +00:00
Bram Moolenaar
c3f1881aed patch 9.0.0981: build error in tiny version
Problem:    Build error in tiny version.
Solution:   Add #ifdef.
2022-12-01 12:29:43 +00:00
Bram Moolenaar
733a69b29f patch 9.0.0980: the keyboard state response may end up in a shell command
Problem:    The keyboard state response may end up in a shell command.
Solution:   Only request the keyboard protocol state when the typeahead is
            empty, no more commands are following and not exiting.  Add the
            t_RK termcap entry for this.
2022-12-01 12:03:47 +00:00
Bram Moolenaar
4f501171f7 patch 9.0.0979: ch_log() text can be hard to find in the log file
Problem:    ch_log() text can be hard to find in the log file.
Solution:   Prepend "ch_log()" to the text.
2022-12-01 11:02:23 +00:00
Bram Moolenaar
3b8c7083b2 patch 9.0.0978: build errors without the +channel feature
Problem:    Build errors without the +channel feature. (John Marriott)
Solution:   Adjust #ifdefs.
2022-11-30 20:20:56 +00:00
Bram Moolenaar
4c5678ff0c patch 9.0.0977: it is not easy to see what client-server commands are doing
Problem:    It is not easy to see what client-server commands are doing.
Solution:   Add channel log messages if ch_log() is available.  Move the
            channel logging and make it available with the +eval feature.
2022-11-30 18:12:19 +00:00
Bram Moolenaar
a87749e3ea patch 9.0.0976: enabling the kitty keyboard protocol uses push/pop
Problem:    Enabling the kitty keyboard protocol uses push/pop.
Solution:   Use the start/stop codes to avoid unpredictable behavior.
2022-11-30 10:23:17 +00:00
Bram Moolenaar
7c02ad9f89 patch 9.0.0975: virtual text below empty line misplaced when 'number' set
Problem:    Virtual text below an empty line is misplaced when 'number' is
            set.
Solution:   Adjust the computations. (closes #11629)
2022-11-29 21:37:13 +00:00
Bram Moolenaar
dffa6ea85c patch 9.0.0974: even when Esc is encoded a timeout is used
Problem:    Even when Esc is encoded a timeout is used.
Solution:   Use K_ESC when an encoded Esc is found.
2022-11-29 20:33:20 +00:00
Bram Moolenaar
064fd67e6a patch 9.0.0973: Kitty keyboard protocol key with NumLock not decoded
Problem:    Kitty keyboard protocol key not decoded when it has an unsupported
            modifier, such as NumLock.
Solution:   Accept a key with any modifier. (closes #11638)
2022-11-29 18:32:32 +00:00
Bram Moolenaar
4e6072b8d3 patch 9.0.0972: build failure on some systems
Problem:    Build failure on some systems.
Solution:   Adjust #ifdefs related to the termresponse feature.
2022-11-29 16:09:18 +00:00
Bram Moolenaar
6f2a227565 patch 9.0.0971: escape sequences not recognized without termresponse feature
Problem:    Escape sequences not recognized without the termresponse feature.
Solution:   Recognize escape sequences to avoid display mess up.
2022-11-29 13:59:13 +00:00
Bram Moolenaar
3719989431 patch 9.0.0970: Coverity warns for uninitialized variable
Problem:    Coverity warns for uninitialized variable.
Solution:   Initialize "ren_ret".
2022-11-29 13:46:48 +00:00
Bram Moolenaar
28a896f54d patch 9.0.0969: matchparen highlight is not updated when switching buffers
Problem:    Matchparen highlight is not updated when switching buffers.
Solution:   Listen to the BufLeave and the BufWinEnter autocmd events.
            (closes #11626)
2022-11-28 22:21:12 +00:00
Bram Moolenaar
c13e998d4a patch 9.0.0968: GUI mouse event test is a bit flaky
Problem:    GUI mouse event test is a bit flaky.
Solution:   Mark the test case as flaky.  Move test function failure checks to
            a separate test function.
2022-11-28 21:20:48 +00:00
Bram Moolenaar
84497cd06f patch 9.0.0967: leaking memory from autocmd windows
Problem:    Leaking memory from autocmd windows.
Solution:   Free window when auc_win is not NULL.
2022-11-28 20:34:52 +00:00
Bram Moolenaar
f86490ed4f patch 9.0.0966: some compilers don't allow a declaration after a label
Problem:    Some compilers don't allow a declaration after a label.
Solution:   Move the declaration to the start of the block. (John Marriott)
2022-11-28 19:11:02 +00:00
Bram Moolenaar
e76062c078 patch 9.0.0965: using one window for executing autocommands is insufficient
Problem:    Using one window for executing autocommands is insufficient.
Solution:   Use up to five windows for executing autocommands.
2022-11-28 18:51:43 +00:00
Luuk van Baal
74a694dbe2 patch 9.0.0964: status line not redrawn when 'splitkeep' is "screen"
Problem:    Status line of other window not redrawn when dragging it when
            'splitkeep' is set to "screen".
Solution:   Set w_redr_status earlier. (Luuk van Baal, closes #11635,
            closes #11632)
2022-11-28 16:49:36 +00:00
zeertzjq
269aa2b29a patch 9.0.0963: function name does not match autocmd event name
Problem:    Function name does not match autocmd event name.
Solution:   Rename "optionsset" to "optionset". (closes #11630)
2022-11-28 11:36:50 +00:00
porygonisaduck
38854b565a patch 9.0.0962: virtual text below cannot be placed below empty lines
Problem:    Virtual text below cannot be placed below empty lines.
Solution:   Add one character. (James Alvarado, closes #11606, closes #11520)
2022-11-27 20:55:05 +00:00
Bram Moolenaar
3da8597fc0 patch 9.0.0961: using deletebufline() may jump to another window
Problem:    Using deletebufline() may jump to another window.
Solution:   Do not use a window where the buffer was only in the past.
            (closes #11594)
2022-11-27 19:45:49 +00:00
Bram Moolenaar
502e91756e patch 9.0.0960: error when using the "Spelling / Find More Languages" menu
Problem:    Error when using the "Tools / Spelling / Find More Languages"
            menu.
Solution:   Remove "<SID>".  Reset "g:menutrans_set_lang_to" when 'encoding'
            changes. (closes #11625)
2022-11-27 16:18:33 +00:00
Bram Moolenaar
8b336a6614 patch 9.0.0959: error when using the "File Settings / Text Width" menu
Problem:    Error when using the "File Settings / Text Width" menu.
Solution:   Use str2nr(). (closes #11624)
2022-11-27 15:51:46 +00:00
Bram Moolenaar
19cf525c20 patch 9.0.0958: messages test is flaky
Problem:    Messages test is flaky.
Solution:   Add a short delay.
2022-11-27 14:39:31 +00:00
Bram Moolenaar
64fabf3802 patch 9.0.0957: tests fail without the terminal feature
Problem:    Tests fail without the terminal feature.
Solution:   Move functions to another utility script.
2022-11-27 13:51:22 +00:00
Bram Moolenaar
9f14557d6a patch 9.0.0956: terminal tests fail when using key with modifier
Problem:    Terminal tests fail when using key with modifier.
Solution:   Use the modifyOtherKeys encoding when using RunVimInTerminal().
2022-11-27 12:45:41 +00:00
Bram Moolenaar
cc0907165d patch 9.0.0955: libvterm does not support the XTQMODKEYS request
Problem:    Libvterm does not support the XTQMODKEYS request.
Solution:   Implement the XTQMODKEYS request and response.  Update the keycode
            check results.
2022-11-27 11:31:23 +00:00
Bram Moolenaar
c255b78965 patch 9.0.0954: cannot detect whether modifyOtherKeys is enabled
Problem:    Cannot detect whether modifyOtherKeys is enabled.
Solution:   Use XTQMODKEYS introduced by xterm version 377 to request the
            modifyOtherKeys level.  Update the keycode check results.
2022-11-26 19:16:48 +00:00
Bram Moolenaar
837ca8f43b patch 9.0.0953: part of making search more efficient is missing
Problem:    Part of making search more efficient is missing.
Solution:   Add the change in searchit().
2022-11-26 18:59:19 +00:00
ObserverOfTime
f3f198b634 patch 9.0.0952: Eclipse preference files are not recognized
Problem:    Eclipse preference files are not recognized.
Solution:   Add a pattern to use "jproperties" for Eclipse preference files.
            (closes #11618)
2022-11-26 13:03:20 +00:00
Bram Moolenaar
01105b37a1 patch 9.0.0951: trying every character position for a match is inefficient
Problem:    Trying every character position for a match is inefficient.
Solution:   Use the start position of the match ignoring "\zs".
2022-11-26 11:47:10 +00:00
Bram Moolenaar
c96311b5be patch 9.0.0950: the pattern "\_s\zs" matches at EOL
Problem:    The pattern "\_s\zs" matches at EOL.
Solution:   Make the pattern "\_s\zs" match at the start of the next line.
            (closes #11617)
2022-11-25 21:13:47 +00:00
Bram Moolenaar
ef2c325f5e patch 9.0.0949: crash when unletting a variable while listing variables
Problem:    Crash when unletting a variable while listing variables.
Solution:   Disallow changing a hashtable while going over the entries.
            (closes #11435)
2022-11-25 16:31:51 +00:00
Bram Moolenaar
c1cf4c9107 patch 9.0.0948: 'ttyfast' is set for arbitrary terminals
Problem:    'ttyfast' is set for arbitrary terminals.
Solution:   Always set 'ttyfast'. (closes #11549)
2022-11-25 15:09:35 +00:00
Bram Moolenaar
cc762a48d4 patch 9.0.0947: invalid memory access in substitute with function
Problem:    Invalid memory access in substitute with function that goes to
            another file.
Solution:   Check for text locked in CTRL-W gf.
2022-11-25 13:03:31 +00:00
K.Takata
ad85af5b38 patch 9.0.0946: CI: Error in Coverity flow is not reported
Problem:    CI: Error in Coverity flow is not reported.
Solution:   Use another way to avoid errors in a forked repository. (Ken
            Takata, closes #11609)
2022-11-25 00:57:05 +00:00
Bram Moolenaar
637862fc3c patch 9.0.0945: failures in the cursorline test
Problem:    Failures in the cursorline test.
Solution:   Reset extra_attr only after a text property.
2022-11-24 23:04:02 +00:00
Bram Moolenaar
6ac16f0c0f patch 9.0.0944: 'cursorline' causes virtual text highlight to continue
Problem:    'cursorline' causes virtual text highlight to continue.
Solution:   Save and restore line_attr. (closes #11588)
2022-11-24 22:42:29 +00:00
Bram Moolenaar
d330e8422d patch 9.0.0943: pretending to go out of Insert mode when Esc is received
Problem:    Pretending to go out of Insert mode when Esc is received has side
            effects.
Solution:   When the kitty keyboard protocol is enabled expect Esc to always
            be the start of an escape sequence.
2022-11-24 20:23:24 +00:00
410 changed files with 26892 additions and 11294 deletions

View File

@@ -1,10 +1,31 @@
version: "{build}"
image: Visual Studio 2015
skip_tags: true
environment:
matrix:
- FEATURE: HUGE
# Alternate environments, not used right now. 2022 is a lot slower.
#
# - job_name: VS-2015
# appveyor_build_worker_image: Visual Studio 2015
# FEATURE: HUGE
# - job_name: VS-2017
# appveyor_build_worker_image: Visual Studio 2017
# FEATURE: HUGE
# - job_name: VS-2019
# appveyor_build_worker_image: Visual Studio 2019
# FEATURE: HUGE
# - job_name: VS-2022
# appveyor_build_worker_image: Visual Studio 2022
# FEATURE: HUGE
# disabled
# - FEATURE: TINY
# - FEATURE: NORMAL
@@ -14,19 +35,19 @@ matrix:
fast_finish: true
before_build:
# Use Visual Studio 2015 compiler tools (default is 2012)
- '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64'
- call ver
- ci\appveyor.bat install
build_script:
- ci/appveyor.bat
- ci\appveyor.bat build
test_script:
- cd src/testdir
# Testing with MSVC gvim
- path C:\Python35-x64;%PATH%
- nmake -f Make_mvc.mak VIMPROG=..\gvim
- nmake -f Make_mvc.mak clean
# Testing with MSVC console version
- nmake -f Make_mvc.mak VIMPROG=..\vim
- ci\appveyor.bat test
artifacts:
- path: src/vim.exe
name: vim
- path: src/gvim.exe
name: gvim
# vim: sw=2 sts=2 et ts=8 sr

View File

@@ -8,9 +8,9 @@ freebsd_task:
- name: FreeBSD 13.1
freebsd_instance:
image_family: freebsd-13-1
- name: FreeBSD 12.3
- name: FreeBSD 12.4
freebsd_instance:
image_family: freebsd-12-3
image_family: freebsd-12-4
timeout_in: 20m
install_script:
- pkg update -f

7
.github/CODEOWNERS vendored
View File

@@ -51,6 +51,7 @@ runtime/compiler/dartanalyser.vim @dkearns
runtime/compiler/dartdevc.vim @dkearns
runtime/compiler/dartdoc.vim @dkearns
runtime/compiler/dartfmt.vim @dkearns
runtime/compiler/dotnet.vim @nickspoons
runtime/compiler/eruby.vim @dkearns
runtime/compiler/fbc.vim @dkearns
runtime/compiler/gawk.vim @dkearns
@@ -181,6 +182,7 @@ runtime/ftplugin/python.vim @tpict
runtime/ftplugin/qb64.vim @dkearns
runtime/ftplugin/r.vim @jalvesaq
runtime/ftplugin/racket.vim @benknoble
runtime/ftplugin/readline.vim @dkearns
runtime/ftplugin/rhelp.vim @jalvesaq
runtime/ftplugin/rmd.vim @jalvesaq
runtime/ftplugin/rnoweb.vim @jalvesaq
@@ -297,6 +299,7 @@ runtime/plugin/tarPlugin.vim @cecamp
runtime/plugin/vimballPlugin.vim @cecamp
runtime/plugin/zipPlugin.vim @cecamp
runtime/plugin/manpager.vim @Konfekt
runtime/syntax/shared/hgcommitDiff.vim @vegerot
runtime/syntax/abaqus.vim @costerwi
runtime/syntax/aidl.vim @dpelle
runtime/syntax/amiga.vim @cecamp
@@ -331,6 +334,7 @@ runtime/syntax/dot.vim @mmottl
runtime/syntax/doxygen.vim @frogonwheels
runtime/syntax/dtd.vim @chrisbra
runtime/syntax/dts.vim @zonque
runtime/syntax/editorconfig.vim @gpanders
runtime/syntax/eiffel.vim @jocelyn
runtime/syntax/elmfilt.vim @cecamp
runtime/syntax/erlang.vim @hcs42
@@ -371,6 +375,7 @@ runtime/syntax/indent.vim @dkearns
runtime/syntax/j.vim @glts
runtime/syntax/jargon.vim @h3xx
runtime/syntax/java.vim @fleiner
runtime/syntax/javascript.vim @fleiner
runtime/syntax/jsonc.vim @izhakjakov
runtime/syntax/julia.vim @carlobaldassi
runtime/syntax/kconfig.vim @chrisbra
@@ -394,6 +399,7 @@ runtime/syntax/n1ql.vim @pr3d4t0r
runtime/syntax/netrw.vim @cecamp
runtime/syntax/nginx.vim @chr4
runtime/syntax/ninja.vim @nico
runtime/syntax/nix.vim @equill
runtime/syntax/nroff.vim @jmarshall
runtime/syntax/nsis.vim @k-takata
runtime/syntax/openvpn.vim @ObserverOfTime
@@ -464,6 +470,7 @@ runtime/syntax/vdf.vim @ObserverOfTime
runtime/syntax/vim.vim @cecamp
runtime/syntax/vroom.vim @dbarnett
runtime/syntax/wast.vim @rhysd
runtime/syntax/wdl.vim @zenmatic
runtime/syntax/wget.vim @dkearns
runtime/syntax/wget2.vim @dkearns
runtime/syntax/xbl.vim @dkearns

View File

@@ -254,7 +254,7 @@ jobs:
- name: Codecov
if: matrix.coverage
uses: codecov/codecov-action@v3.1.1
uses: codecov/codecov-action@v3
with:
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
@@ -373,8 +373,8 @@ jobs:
PYTHON_VER_DOT: '2.7'
PYTHON_DIR: 'C:\Python27'
# Python 3
PYTHON3_VER: 310
PYTHON3_VER_DOT: '3.10'
PYTHON3_VER: 311
PYTHON3_VER_DOT: '3.11'
# Other dependencies
# winpty
WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
@@ -613,7 +613,7 @@ jobs:
- name: Codecov
if: matrix.coverage
uses: codecov/codecov-action@v3.1.1
uses: codecov/codecov-action@v3
with:
directory: src
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}

View File

@@ -15,21 +15,22 @@ jobs:
CC: gcc
CFLAGS: -Wno-deprecated-declarations
DEBIAN_FRONTEND: noninteractive
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
steps:
- name: Checkout repository from github
if: env.TOKEN
uses: actions/checkout@v3
- name: Download Coverity
if: env.TOKEN
run: |
# probably no TOKEN if it was a forked repo
[ -n "${TOKEN}" ] && wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=vim" -O coverity_tool.tgz || exit 0
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=vim" -O coverity_tool.tgz
mkdir cov-scan
tar ax -f coverity_tool.tgz --strip-components=1 -C cov-scan
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
- name: Install packages
if: env.TOKEN
run: |
sudo apt update && sudo apt install -y \
autoconf \
@@ -48,6 +49,7 @@ jobs:
libsodium-dev
- name: Set up environment
if: env.TOKEN
run: |
echo "$(pwd)/cov-scan/bin" >> $GITHUB_PATH
(
@@ -56,6 +58,7 @@ jobs:
) >> $GITHUB_ENV
- name: Configure
if: env.TOKEN
run: |
./configure --with-features=huge ${CONFOPT} --enable-fail-if-missing
# Append various warning flags to CFLAGS.
@@ -63,21 +66,19 @@ jobs:
sed -i -f ci/config.mk.${CC}.sed src/auto/config.mk
- name: Build/scan vim
if: env.TOKEN
run: |
# if no 'cov-build' there, then just cancel the process
[ -x "$(which cov-build)" ] && cov-build --dir cov-int make -j${NPROC} || exit 0
cov-build --dir cov-int make -j${NPROC}
- name: Submit results
if: env.TOKEN
run: |
[ -d 'cov-int' ] && tar zcf cov-scan.tgz cov-int
[ -n "${TOKEN}" ] \
&& curl --form token=$TOKEN \
tar zcf cov-scan.tgz cov-int
curl --form token=$TOKEN \
--form email=$EMAIL \
--form file=@cov-scan.tgz \
--form version="$(git rev-parse HEAD)" \
--form description="Automatic GHA scan" \
'https://scan.coverity.com/builds?project=vim' \
|| exit 0
'https://scan.coverity.com/builds?project=vim'
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}

View File

@@ -1,4 +0,0 @@
# Format of this file: https://lgtm.com/help/lgtm/lgtm.yml-configuration-file
path_classifiers:
documentation:
- runtime/tutor/tutor*

View File

@@ -15,7 +15,6 @@ SRC_ALL = \
.github/dependabot.yml \
.gitignore \
.hgignore \
.lgtm.yml \
.appveyor.yml \
.codecov.yml \
ci/appveyor.bat \
@@ -88,10 +87,11 @@ SRC_ALL = \
src/job.c \
src/json.c \
src/json_test.c \
src/keymap.h \
src/kword_test.c \
src/list.c \
src/locale.c \
src/keymap.h \
src/logfile.c \
src/macros.h \
src/main.c \
src/map.c \
@@ -162,6 +162,7 @@ SRC_ALL = \
src/version.h \
src/vim.h \
src/vim9.h \
src/vim9class.c \
src/vim9cmds.c \
src/vim9compile.c \
src/vim9execute.c \
@@ -274,6 +275,7 @@ SRC_ALL = \
src/proto/json.pro \
src/proto/list.pro \
src/proto/locale.pro \
src/proto/logfile.pro \
src/proto/main.pro \
src/proto/map.pro \
src/proto/mark.pro \
@@ -325,6 +327,7 @@ SRC_ALL = \
src/proto/usercmd.pro \
src/proto/userfunc.pro \
src/proto/version.pro \
src/proto/vim9class.pro \
src/proto/vim9cmds.pro \
src/proto/vim9compile.pro \
src/proto/vim9execute.pro \
@@ -780,6 +783,7 @@ RT_SCRIPTS = \
runtime/autoload/README.txt \
runtime/autoload/dist/*.vim \
runtime/autoload/xml/*.vim \
runtime/autoload/zig/*.vim \
runtime/colors/*.vim \
runtime/colors/README.txt \
runtime/colors/lists/*.vim \

View File

@@ -1,6 +1,6 @@
[![Vim Logo](https://github.com/vim/vim/raw/master/runtime/vimlogo.gif)](https://www.vim.org)
[![Github Build status](https://github.com/vim/vim/workflows/GitHub%20CI/badge.svg)](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim) [![Cirrus Build Status](https://api.cirrus-ci.com/github/vim/vim.svg)](https://cirrus-ci.com/github/vim/vim) [![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master) [![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim) [![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp) [![Debian CI](https://badges.debian.net/badges/debian/testing/vim/version.svg)](https://buildd.debian.org/vim) [![Packages](https://repology.org/badge/tiny-repos/vim.svg)](https://repology.org/metapackage/vim) [![Fossies codespell report](https://fossies.org/linux/test/vim-master.tar.gz/codespell.svg)](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
[![Github Build status](https://github.com/vim/vim/workflows/GitHub%20CI/badge.svg)](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim) [![Cirrus Build Status](https://api.cirrus-ci.com/github/vim/vim.svg)](https://cirrus-ci.com/github/vim/vim) [![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master) [![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim) [![Debian CI](https://badges.debian.net/badges/debian/testing/vim/version.svg)](https://buildd.debian.org/vim) [![Packages](https://repology.org/badge/tiny-repos/vim.svg)](https://repology.org/metapackage/vim) [![Fossies codespell report](https://fossies.org/linux/test/vim-master.tar.gz/codespell.svg)](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
<sub>For translations of this README see the end.</sub>
@@ -101,7 +101,7 @@ for details (do `:help uganda` inside Vim).
Summary of the license: There are no restrictions on using or distributing an
unmodified copy of Vim. Parts of Vim may also be distributed, but the license
text must always be included. For modified versions a few restrictions apply.
text must always be included. For modified versions, a few restrictions apply.
The license is GPL compatible, you may compile Vim with GPL libraries and
distribute it.
@@ -122,7 +122,7 @@ For the most recent information about sponsoring look on the Vim web site:
## Contributing ##
If you would like to help making Vim better, see the
If you would like to help make Vim better, see the
[CONTRIBUTING.md](/CONTRIBUTING.md) file.

View File

@@ -84,7 +84,7 @@ encouraged to make a donation to help orphans in Uganda. Please read the file
Summary of the license: There are no restrictions on using or distributing an
unmodified copy of Vim. Parts of Vim may also be distributed, but the license
text must always be included. For modified versions a few restrictions apply.
text must always be included. For modified versions, a few restrictions apply.
The license is GPL compatible, you may compile Vim with GPL libraries and
distribute it.
@@ -106,7 +106,7 @@ For the most recent information about sponsoring look on the Vim web site:
CONTRIBUTING
If you would like to help making Vim better, see the CONTRIBUTING.md file.
If you would like to help make Vim better, see the CONTRIBUTING.md file.
INFORMATION

View File

@@ -1,9 +1,54 @@
@echo off
:: Batch file for building/testing Vim on AppVeyor
set target=%1
setlocal ENABLEDELAYEDEXPANSION
cd %APPVEYOR_BUILD_FOLDER%
:: Python3
set PYTHON3_VER=311
set PYTHON3_RELEASE=3.11.1
set PYTHON3_URL=https://www.python.org/ftp/python/%PYTHON3_RELEASE%/python-%PYTHON3_RELEASE%-amd64.exe
set PYTHON3_DIR=C:\python%PYTHON3_VER%-x64
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if exist "%VSWHERE%" (
for /f "usebackq delims=" %%i in (
`"%VSWHERE%" -products * -latest -property installationPath`
) do (
set "VCVARSALL=%%i\VC\Auxiliary\Build\vcvarsall.bat"
)
)
if not exist "%VCVARSALL%" (
set "VCVARSALL=%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
)
call "%VCVARSALL%" x64
goto %target%
echo Unknown build target.
exit 1
:: ----------------------------------------------------------------------------
:install
@echo on
if not exist downloads mkdir downloads
:: Python 3
if not exist %PYTHON3_DIR% (
call :downloadfile %PYTHON3_URL% downloads\python3.exe
cmd /c start /wait downloads\python3.exe /quiet TargetDir=%PYTHON3_DIR% ^
Include_pip=0 Include_tcltk=0 Include_test=0 Include_tools=0 ^
AssociateFiles=0 Shortcuts=0 Include_doc=0 Include_launcher=0 ^
InstallLauncherAllUsers=0
)
@echo off
goto :eof
:: ----------------------------------------------------------------------------
:build
cd src
echo "Building MSVC 64bit console Version"
@@ -22,7 +67,7 @@ if "%FEATURE%" == "HUGE" (
nmake -f Make_mvc.mak CPU=AMD64 ^
OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no POSTSCRIPT=yes ^
PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 ^
PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 ^
PYTHON3_VER=%PYTHON3_VER% DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR% ^
FEATURES=%FEATURE%
) ELSE (
nmake -f Make_mvc.mak CPU=AMD64 ^
@@ -39,4 +84,31 @@ echo "version output MSVC console"
.\vim --version || exit 1
echo "version output MSVC GUI"
type ver_msvc.txt || exit 1
cd ..
goto :eof
:: ----------------------------------------------------------------------------
:test
@echo on
cd src/testdir
:: Testing with MSVC gvim
path %PYTHON3_DIR%;%PATH%
nmake -f Make_mvc.mak VIMPROG=..\gvim
nmake -f Make_mvc.mak clean
:: Testing with MSVC console version
nmake -f Make_mvc.mak VIMPROG=..\vim
@echo off
goto :eof
:: ----------------------------------------------------------------------------
:downloadfile
:: call :downloadfile <URL> <localfile>
if not exist %2 (
curl -f -L %1 -o %2
)
if ERRORLEVEL 1 (
rem Retry once.
curl -f -L %1 -o %2 || exit 1
)
@goto :eof

View File

@@ -29,12 +29,12 @@ To build the installable .exe:
4. Get a "diff.exe" program. If you skip this the built-in diff will always
be used (which is fine for most users). If you do have your own
"diff.exe" put it in the "../.." directory (above the "vim82" directory,
"diff.exe" put it in the "../.." directory (above the "vim90" directory,
it's the same for all Vim versions).
You can find one in previous Vim versions or in this archive:
http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
5 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim82"
5 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim90"
directory). This is required for the terminal window.
6. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have

View File

@@ -3,7 +3,7 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last Change: 2022 Apr 13
# Last Change: 2022 Dec 14
# These functions are moved here from runtime/filetype.vim to make startup
# faster.
@@ -810,10 +810,13 @@ export def SQL()
enddef
# This function checks the first 25 lines of file extension "sc" to resolve
# detection between scala and SuperCollider
# detection between scala and SuperCollider.
# NOTE: We don't check for 'Class : Method', as this can easily be confused
# with valid Scala like `val x : Int = 3`. So we instead only rely on
# checks that can't be confused.
export def FTsc()
for lnum in range(1, min([line("$"), 25]))
if getline(lnum) =~# '[A-Za-z0-9]*\s:\s[A-Za-z0-9]\|var\s<\|classvar\s<\|\^this.*\||\w*|\|+\s\w*\s{\|\*ar\s'
if getline(lnum) =~# 'var\s<\|classvar\s<\|\^this.*\||\w\+|\|+\s\w*\s{\|\*ar\s'
setf supercollider
return
endif

View File

@@ -4,7 +4,7 @@ vim9script
# Invoked from "scripts.vim" in 'runtimepath'
#
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last Change: 2022 Feb 13
# Last Change: 2022 Nov 24
export def DetectFiletype()
var line1 = getline(1)

View File

@@ -2,7 +2,7 @@ vim9script
# Language: Vim script
# Maintainer: github user lacygoill
# Last Change: 2022 Oct 15
# Last Change: 2023 Jan 03
# NOTE: Whenever you change the code, make sure the tests are still passing:
#
@@ -201,6 +201,7 @@ const ENDS_BLOCK: string = '^\s*\%('
.. '\|' .. 'endw\%[hile]'
.. '\|' .. 'endt\%[ry]'
.. '\|' .. 'enddef'
.. '\|' .. 'endclass'
.. '\|' .. 'endf\%[unction]'
.. '\|' .. 'aug\%[roup]\s\+[eE][nN][dD]'
.. '\|' .. CLOSING_BRACKET
@@ -212,6 +213,7 @@ patterns =<< trim END
en\%[dif]
el\%[se]
endfor\=
endclass
endw\%[hile]
endt\%[ry]
fina\|finally\=
@@ -251,6 +253,7 @@ patterns =<< trim END
el\%[se]
elseif\=
for
class
wh\%[ile]
try
cat\%[ch]
@@ -278,6 +281,8 @@ const START_MIDDLE_END: dict<list<string>> = {
endif: ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
for: ['for', '', 'endfor\='],
endfor: ['for', '', 'endfor\='],
class: ['class', '', 'endclass'],
endclass: ['class', '', 'endclass'],
while: ['wh\%[ile]', '', 'endw\%[hile]'],
endwhile: ['wh\%[ile]', '', 'endw\%[hile]'],
try: ['try', 'cat\%[ch]\|fina\|finally\=', 'endt\%[ry]'],

View File

@@ -0,0 +1,100 @@
" Adapted from fatih/vim-go: autoload/go/fmt.vim
"
" Copyright 2011 The Go Authors. All rights reserved.
" Use of this source code is governed by a BSD-style
" license that can be found in the LICENSE file.
"
" Upstream: https://github.com/ziglang/zig.vim
function! zig#fmt#Format() abort
" Save cursor position and many other things.
let view = winsaveview()
if !executable('zig')
echohl Error | echomsg "no zig binary found in PATH" | echohl None
return
endif
let cmdline = 'zig fmt --stdin --ast-check'
let current_buf = bufnr('')
" The formatted code is output on stdout, the errors go on stderr.
if exists('*systemlist')
silent let out = systemlist(cmdline, current_buf)
else
silent let out = split(system(cmdline, current_buf))
endif
if len(out) == 1
if out[0] == "error: unrecognized parameter: '--ast-check'"
let cmdline = 'zig fmt --stdin'
if exists('*systemlist')
silent let out = systemlist(cmdline, current_buf)
else
silent let out = split(system(cmdline, current_buf))
endif
endif
endif
let err = v:shell_error
if err == 0
" remove undo point caused via BufWritePre.
try | silent undojoin | catch | endtry
" Replace the file content with the formatted version.
if exists('*deletebufline')
call deletebufline(current_buf, len(out), line('$'))
else
silent execute ':' . len(out) . ',' . line('$') . ' delete _'
endif
call setline(1, out)
" No errors detected, close the loclist.
call setloclist(0, [], 'r')
lclose
elseif get(g:, 'zig_fmt_parse_errors', 1)
let errors = s:parse_errors(expand('%'), out)
call setloclist(0, [], 'r', {
\ 'title': 'Errors',
\ 'items': errors,
\ })
let max_win_height = get(g:, 'zig_fmt_max_window_height', 5)
" Prevent the loclist from becoming too long.
let win_height = min([max_win_height, len(errors)])
" Open the loclist, but only if there's at least one error to show.
execute 'silent! lwindow ' . win_height
endif
call winrestview(view)
if err != 0
echohl Error | echomsg "zig fmt returned error" | echohl None
return
endif
" Run the syntax highlighter on the updated content and recompute the folds if
" needed.
syntax sync fromstart
endfunction
" parse_errors parses the given errors and returns a list of parsed errors
function! s:parse_errors(filename, lines) abort
" list of errors to be put into location list
let errors = []
for line in a:lines
let tokens = matchlist(line, '^\(.\{-}\):\(\d\+\):\(\d\+\)\s*\(.*\)')
if !empty(tokens)
call add(errors,{
\"filename": a:filename,
\"lnum": tokens[2],
\"col": tokens[3],
\"text": tokens[4],
\ })
endif
endfor
return errors
endfunction
" vim: sw=2 ts=2 et

View File

@@ -0,0 +1,39 @@
" Vim compiler file
" Compiler: dotnet build (.NET CLI)
" Maintainer: Nick Jensen <nickspoon@gmail.com>
" Last Change: 2022-12-06
" License: Vim (see :h license)
" Repository: https://github.com/nickspoons/vim-cs
if exists("current_compiler")
finish
endif
let current_compiler = "dotnet"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo&vim
if get(g:, "dotnet_errors_only", v:false)
CompilerSet makeprg=dotnet\ build\ -nologo
\\ -consoleloggerparameters:NoSummary
\\ -consoleloggerparameters:ErrorsOnly
else
CompilerSet makeprg=dotnet\ build\ -nologo\ -consoleloggerparameters:NoSummary
endif
if get(g:, "dotnet_show_project_file", v:true)
CompilerSet errorformat=%E%f(%l\\,%c):\ %trror\ %m,
\%W%f(%l\\,%c):\ %tarning\ %m,
\%-G%.%#
else
CompilerSet errorformat=%E%f(%l\\,%c):\ %trror\ %m\ [%.%#],
\%W%f(%l\\,%c):\ %tarning\ %m\ [%.%#],
\%-G%.%#
endif
let &cpo = s:cpo_save
unlet s:cpo_save

28
runtime/compiler/zig.vim Normal file
View File

@@ -0,0 +1,28 @@
" Vim compiler file
" Compiler: Zig Compiler
" Upstream: https://github.com/ziglang/zig.vim
if exists("current_compiler")
finish
endif
let current_compiler = "zig"
let s:save_cpo = &cpo
set cpo&vim
if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif
" a subcommand must be provided for the this compiler (test, build-exe, etc)
if has('patch-7.4.191')
CompilerSet makeprg=zig\ \$*\ \%:S
else
CompilerSet makeprg=zig\ \$*\ \"%\"
endif
" TODO: improve errorformat as needed.
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab

View File

@@ -0,0 +1,29 @@
" Vim compiler file
" Compiler: Zig Compiler (zig build)
" Upstream: https://github.com/ziglang/zig.vim
if exists('current_compiler')
finish
endif
runtime compiler/zig.vim
let current_compiler = 'zig_build'
let s:save_cpo = &cpo
set cpo&vim
if exists(':CompilerSet') != 2
command -nargs=* CompilerSet setlocal <args>
endif
if exists('g:zig_build_makeprg_params')
execute 'CompilerSet makeprg=zig\ build\ '.escape(g:zig_build_makeprg_params, ' \|"').'\ $*'
else
CompilerSet makeprg=zig\ build\ $*
endif
" TODO: anything to add to errorformat for zig build specifically?
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab

View File

@@ -0,0 +1,27 @@
" Vim compiler file
" Compiler: Zig Compiler (zig build-exe)
" Upstream: https://github.com/ziglang/zig.vim
if exists('current_compiler')
finish
endif
runtime compiler/zig.vim
let current_compiler = 'zig_build_exe'
let s:save_cpo = &cpo
set cpo&vim
if exists(':CompilerSet') != 2
command -nargs=* CompilerSet setlocal <args>
endif
if has('patch-7.4.191')
CompilerSet makeprg=zig\ build-exe\ \%:S\ \$*
else
CompilerSet makeprg=zig\ build-exe\ \"%\"\ \$*
endif
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab

View File

@@ -0,0 +1,27 @@
" Vim compiler file
" Compiler: Zig Compiler (zig test)
" Upstream: https://github.com/ziglang/zig.vim
if exists('current_compiler')
finish
endif
runtime compiler/zig.vim
let current_compiler = 'zig_test'
let s:save_cpo = &cpo
set cpo&vim
if exists(':CompilerSet') != 2
command -nargs=* CompilerSet setlocal <args>
endif
if has('patch-7.4.191')
CompilerSet makeprg=zig\ test\ \%:S\ \$*
else
CompilerSet makeprg=zig\ test\ \"%\"\ \$*
endif
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab

View File

@@ -161,6 +161,7 @@ DOCS = \
version9.txt \
vi_diff.txt \
vim9.txt \
vim9class.txt \
visual.txt \
windows.txt \
workshop.txt
@@ -313,6 +314,7 @@ HTMLS = \
vi_diff.html \
vimindex.html \
vim9.html \
vim9class.html \
visual.html \
windows.html \
workshop.html

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 9.0. Last change: 2022 Nov 22
*autocmd.txt* For Vim version 9.0. Last change: 2022 Dec 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -97,7 +97,7 @@ If the `:autocmd` is in Vim9 script (a script that starts with `:vim9script`
and in a `:def` function) then {cmd} will be executed as in Vim9
script. Thus this depends on where the autocmd is defined, not where it is
triggered.
*:autocmd-block*
{cmd} can be a block, like with `:command`, see |:command-repl|. Example: >
au BufReadPost *.xml {
setlocal matchpairs+=<:>

View File

@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.0. Last change: 2022 Nov 21
*builtin.txt* For Vim version 9.0. Last change: 2022 Dec 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -211,6 +211,7 @@ getbufline({buf}, {lnum} [, {end}])
getbufoneline({buf}, {lnum}) String line {lnum} of buffer {buf}
getbufvar({buf}, {varname} [, {def}])
any variable {varname} in buffer {buf}
getcellwidths() List get character cell width overrides
getchangelist([{buf}]) List list of change list items
getchar([expr]) Number or String
get one character from the user
@@ -608,6 +609,7 @@ submatch({nr} [, {list}]) String or List
specific match in ":s" or substitute()
substitute({expr}, {pat}, {sub}, {flags})
String all {pat} in {expr} replaced with {sub}
swapfilelist() List swap files found in 'directory'
swapinfo({fname}) Dict information about swap file {fname}
swapname({buf}) String swap file of buffer {buf}
synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
@@ -665,6 +667,8 @@ test_garbagecollect_soon() none free memory soon for testing
test_getvalue({string}) any get value of an internal variable
test_gui_event({event}, {args}) bool generate a GUI event for testing
test_ignore_error({expr}) none ignore a specific error
test_mswin_event({event}, {args})
bool generate MS-Windows event for testing
test_null_blob() Blob null value for testing
test_null_channel() Channel null value for testing
test_null_dict() Dict null value for testing
@@ -3259,6 +3263,13 @@ getbufvar({buf}, {varname} [, {def}]) *getbufvar()*
< Can also be used as a |method|: >
GetBufnr()->getbufvar(varname)
<
getcellwidths() *getcellwidths()*
Returns a |List| of cell widths of character ranges overridden
by |setcellwidths()|. The format is equal to the argument of
|setcellwidths()|. If no character ranges have their cell
widths overridden, an empty List is returned.
getchangelist([{buf}]) *getchangelist()*
Returns the |changelist| for the buffer {buf}. For the use
of {buf}, see |bufname()| above. If buffer {buf} doesn't
@@ -3517,6 +3528,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
messages |:messages| suboptions
option options
packadd optional package |pack-add| names
runtime runtime file names |:runtime|
scriptnames sourced script names |:scriptnames|
shellcmd Shell command
sign |:sign| suboptions
@@ -4134,7 +4146,7 @@ getscriptinfo([{opts}) *getscriptinfo()*
this script name links to, if any, otherwise
zero
variables A dictionary with the script-local variables.
Present only when the a particular script is
Present only when a particular script is
specified using the "sid" item in {opts}.
Note that this is a copy, the value of
script-local variables cannot be changed using
@@ -7955,7 +7967,7 @@ setcellwidths({list}) *setcellwidths()*
{low} and {high} can be the same, in which case this refers to
one character. Otherwise it is the range of characters from
{low} to {high} (inclusive). *E1111* *E1114*
Only characters with value 0x100 and higher can be used.
Only characters with value 0x80 and higher can be used.
{width} must be either 1 or 2, indicating the character width
in screen cells. *E1112*
@@ -9110,6 +9122,8 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
Blob 0z00112233.44556677.8899
List [item, item]
Dictionary {key: value, key: value}
Class class SomeName
Object object of SomeName {lnum: 1, col: 3}
When a |List| or |Dictionary| has a recursive reference it is
replaced by "[...]" or "{...}". Using eval() on the result
@@ -9314,6 +9328,17 @@ substitute({string}, {pat}, {sub}, {flags}) *substitute()*
Can also be used as a |method|: >
GetString()->substitute(pat, sub, flags)
swapfilelist() *swapfilelist()*
Returns a list of swap file names, like what "vim -r" shows.
See the |-r| command argument. The 'directory' option is used
for the directories to inspect. If you only want to get a
list of swap files in the current directory then temporarily
set 'directory' to a dot: >
let save_dir = &directory
let &directory = '.'
let swapfiles = swapfilelist()
let &directory = save_dir
swapinfo({fname}) *swapinfo()*
The result is a dictionary, which holds information about the
swapfile {fname}. The available fields are:
@@ -9931,6 +9956,8 @@ type({expr}) The result is a Number representing the type of {expr}.
Job: 8 |v:t_job|
Channel: 9 |v:t_channel|
Blob: 10 |v:t_blob|
Class 12 |v:t_class|
Object 13 |v:t_object|
For backward compatibility, this method can be used: >
:if type(myvar) == type(0)
:if type(myvar) == type("")
@@ -9951,7 +9978,7 @@ typename({expr}) *typename()*
Return a string representation of the type of {expr}.
Example: >
echo typename([1, 2, 3])
list<number>
< list<number> ~
undofile({name}) *undofile()*

View File

@@ -1,4 +1,4 @@
*channel.txt* For Vim version 9.0. Last change: 2022 Jun 23
*channel.txt* For Vim version 9.0. Last change: 2022 Dec 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -618,6 +618,9 @@ ch_info({handle}) *ch_info()*
ch_log({msg} [, {handle}]) *ch_log()*
Write String {msg} in the channel log file, if it was opened
with |ch_logfile()|.
The text "ch_log():" is prepended to the message to make clear
it came from this function call and make it easier to find in
the log file.
When {handle} is passed the channel number is used for the
message.
{handle} can be a Channel or a Job that has a Channel. The

View File

@@ -1,4 +1,4 @@
*diff.txt* For Vim version 9.0. Last change: 2022 Oct 01
*diff.txt* For Vim version 9.0. Last change: 2022 Dec 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -148,6 +148,10 @@ Otherwise they are set to their default value:
'foldmethod' "manual"
'foldcolumn' 0
'foldenable' will most-likely be reset to off. That is when 'foldmethod' is
is restored to "manual". The folds themselves are not cleared but they should
not show up, resetting 'foldenable' is the best way to do that.
==============================================================================
2. Viewing diffs *view-diffs*

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 9.0. Last change: 2022 Nov 22
*eval.txt* For Vim version 9.0. Last change: 2023 Jan 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -163,9 +163,10 @@ Note that " " and "0" are also non-empty strings, thus considered to be TRUE.
A List, Dictionary or Float is not a Number or String, thus evaluate to FALSE.
*E611* *E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910*
*E913* *E974* *E975* *E976*
|List|, |Dictionary|, |Funcref|, |Job|, |Channel| and |Blob| types are not
automatically converted.
*E913* *E974* *E975* *E976* *E1319* *E1320* *E1321* *E1322*
*E1323* *E1324*
|List|, |Dictionary|, |Funcref|, |Job|, |Channel|, |Blob|, |Class| and
|object| types are not automatically converted.
*E805* *E806* *E808*
When mixing Number and Float the Number is converted to Float. Otherwise
@@ -633,6 +634,10 @@ This removes all entries from "dict" with a value not matching 'x'.
This can also be used to remove all entries: >
call filter(dict, 0)
In some situations it is not allowed to remove or add entries to a Dictionary.
Especially when iterating over all the entries. You will get *E1313* or
another error in that case.
Dictionary function ~
*Dictionary-function* *self* *E725* *E862*
@@ -646,7 +651,8 @@ special way with a dictionary. Example: >
This is like a method in object oriented programming. The entry in the
Dictionary is a |Funcref|. The local variable "self" refers to the dictionary
the function was invoked from.
the function was invoked from. When using |Vim9| script you can use classes
and objects, see `:class`.
It is also possible to add a function without the "dict" attribute as a
Funcref to a Dictionary, but the "self" variable is not available then.
@@ -2498,6 +2504,10 @@ v:t_number Value of |Number| type. Read-only. See: |type()|
v:t_string Value of |String| type. Read-only. See: |type()|
*v:t_blob* *t_blob-variable*
v:t_blob Value of |Blob| type. Read-only. See: |type()|
*v:t_class* *t_class-variable*
v:t_class Value of |class| type. Read-only. See: |type()|
*v:t_object* *t_object-variable*
v:t_object Value of |object| type. Read-only. See: |type()|
*v:termresponse* *termresponse-variable*
v:termresponse The escape sequence returned by the terminal for the |t_RV|
@@ -2964,6 +2974,8 @@ text...
deleted when the script ends). Function-local
variables are automatically deleted when the function
ends.
In |Vim9| script variables declared in a function or
script cannot be removed.
:unl[et] ${env-name} ... *:unlet-environment* *:unlet-$*
Remove environment variable {env-name}.

View File

@@ -1,4 +1,4 @@
*fold.txt* For Vim version 9.0. Last change: 2022 Oct 01
*fold.txt* For Vim version 9.0. Last change: 2022 Nov 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -598,6 +598,11 @@ line is folded, it cannot be displayed there.
Many movement commands handle a sequence of folded lines like an empty line.
For example, the "w" command stops once in the first column.
When starting a search in a closed fold it will not find a match in the
current fold. It's like a forward search always starts from the end of the
closed fold, while a backwards search starts from the start of the closed
fold.
When in Insert mode, the cursor line is never folded. That allows you to see
what you type!

View File

@@ -1,4 +1,4 @@
*help.txt* For Vim version 9.0. Last change: 2022 May 13
*help.txt* For Vim version 9.0. Last change: 2022 Dec 03
VIM - main help file
k
@@ -153,6 +153,7 @@ Special issues ~
|terminal.txt| Terminal window support
|popup.txt| popup window support
|vim9.txt| using Vim9 script
|vim9class.txt| using Vim9 script classes
Programming language support ~
|indent.txt| automatic indenting for C and other languages

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 9.0. Last change: 2022 Oct 15
*index.txt* For Vim version 9.0. Last change: 2023 Jan 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1239,6 +1239,7 @@ tag command action ~
|:checkpath| :che[ckpath] list included files
|:checktime| :checkt[ime] check timestamp of loaded buffers
|:chistory| :chi[story] list the error lists
|:class| :class start of a class specification
|:clast| :cla[st] go to the specified error, default last one
|:clearjumps| :cle[arjumps] clear the jump list
|:clist| :cl[ist] list all errors
@@ -1313,6 +1314,7 @@ tag command action ~
|:else| :el[se] part of an :if command
|:elseif| :elsei[f] part of an :if command
|:emenu| :em[enu] execute a menu by name
|:endclass| :endclass end of a class specification
|:enddef| :enddef end of a user function started with :def
|:endif| :en[dif] end previous :if
|:endfor| :endfo[r] end previous :for
@@ -1529,6 +1531,7 @@ tag command action ~
|:ptprevious| :ptp[revious] |:tprevious| in preview window
|:ptrewind| :ptr[ewind] |:trewind| in preview window
|:ptselect| :pts[elect] |:tselect| and show tag in preview window
|:public| :public prefix for a class or object member
|:put| :pu[t] insert contents of register in the text
|:pwd| :pw[d] print current directory
|:py3| :py3 execute Python 3 command
@@ -1639,6 +1642,7 @@ tag command action ~
|:startinsert| :star[tinsert] start Insert mode
|:startgreplace| :startg[replace] start Virtual Replace mode
|:startreplace| :startr[eplace] start Replace mode
|:static| :static prefix for a class member or function
|:stopinsert| :stopi[nsert] stop Insert mode
|:stjump| :stj[ump] do ":tjump" and split window
|:stselect| :sts[elect] do ":tselect" and split window

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 9.0. Last change: 2022 Nov 23
*map.txt* For Vim version 9.0. Last change: 2023 Jan 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -777,8 +777,8 @@ To avoid mapping of the characters you type in insert or Command-line mode,
type a CTRL-V first. The mapping in Insert mode is disabled if the 'paste'
option is on.
*map-error*
Note that when an error is encountered (that causes an error message or beep)
the rest of the mapping is not executed. This is Vi-compatible.
Note that when an error is encountered (that causes an error message or might
cause a beep) the rest of the mapping is not executed. This is Vi-compatible.
Note that the second character (argument) of the commands @zZtTfF[]rm'`"v
and CTRL-X is not mapped. This was done to be able to use all the named
@@ -1001,10 +1001,15 @@ mapping, see |map-bar|.
WARNING: if you map <C-[> you may very well break any key codes that start
with Esc. Make sure it comes AFTER other mappings.
Vim automatically detects if the modifyOtherKeys mode was enabled when it
spots an escape sequence that must have been created by it. To see if Vim
detected such an escape sequence use `:verbose map`, the first line will then
show "Seen modifyOtherKeys: true" (possibly translated).
Starting with xterm version 377 Vim can detect the modifyOtherKeys state by
requesting it. For this the 't_RK' termcap entry is used. When the response
is found then Vim will know whether modifyOtherKeys level 2 is enabled, and
handle mappings accordingly.
Before version 377 Vim automatically detects if the modifyOtherKeys mode was
enabled when it spots an escape sequence that must have been created by it.
To see if Vim detected such an escape sequence use `:verbose map`, the first
line will then show "Seen modifyOtherKeys: true" (possibly translated).
This automatic detection depends on receiving an escape code starting with
"<1b>[27;". This is the normal way xterm sends these key codes. However, if
@@ -1016,6 +1021,9 @@ after the CTRL-V key. This can be used to check whether modifyOtherKeys is
enabled: In Insert mode type CTRL-SHIFT-V CTRL-V, if you get one byte then
modifyOtherKeys is off, if you get <1b>[27;5;118~ then it is on.
Note that xterm up to version 376 has a bug that makes Shift-Esc send a
regular Esc code, the Shift modifier is dropped.
When the 'esckeys' option is off, then modifyOtherKeys will be disabled in
Insert mode to avoid every key with a modifier causing Insert mode to end.
@@ -1687,7 +1695,7 @@ Possible attributes are:
number.
-count=N A count (default N) which is specified either in the line
number position, or as an initial argument (like |:Next|).
-count acts like -count=0
-count Acts like -count=0
Note that -range=N and -count=N are mutually exclusive - only one should be
specified.
@@ -1705,7 +1713,7 @@ Possible values are (second column is the short name used in listing):
-addr=windows win Range for windows
-addr=tabs tab Range for tab pages
-addr=quickfix qf Range for quickfix entries
-addr=other ? other kind of range; can use ".", "$" and "%"
-addr=other ? Other kind of range; can use ".", "$" and "%"
as with "lines" (this is the default for
-count)

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.0. Last change: 2022 Nov 23
*options.txt* For Vim version 9.0. Last change: 2023 Jan 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,6 +34,8 @@ achieve special effects. These options come in three forms:
key codes are not shown, because they are generated
internally and can't be changed. Changing the terminal
codes in the GUI is not useful either...
The options have the form t_AB, see
|terminal-options|.
:se[t]! termcap Idem, but don't use multiple columns.
@@ -1249,7 +1251,7 @@ A jump table for the options with a short description can be found at |Q_op|.
\ ' on word "' .. v:beval_text .. '"'
endfunction
set bexpr=MyBalloonExpr()
set ballooneval
set ballooneval balloonevalterm
<
Also see |balloon_show()|, it can be used if the content of the balloon
is to be fetched asynchronously. In that case evaluating
@@ -4901,7 +4903,7 @@ A jump table for the options with a short description can be found at |Q_op|.
mok2 modifyOtherKeys level 2, as supported by xterm
kitty Kitty keyboard protocol, as supported by Kitty
The option value is a list of command separated items. Each item has
The option value is a list of comma separated items. Each item has
a pattern that is matched against the 'term' option, a colon and the
protocol name to be used. To illustrate this, the default value would
be set with: >
@@ -4926,15 +4928,22 @@ A jump table for the options with a short description can be found at |Q_op|.
CSI >4;m disables modifyOtherKeys
The t_TI value is changed to:
CSI >4;2m enables modifyOtherKeys
CSI ?4m request the modifyOtherKeys state
kitty The t_TE value is changed to:
CSI >4;m disables modifyOtherKeys
CSI <u disables the kitty keyboard protocol
CSI =0;1u disables the kitty keyboard protocol
The t_TI value is changed to:
CSI >1u enables the kitty keyboard protocol
CSI =1;1u enables the kitty keyboard protocol
CSI ?u request kitty keyboard protocol state
CSI >c request the termresponse
If you notice problems, such as characters being displayed that
disappear after `CTRL-L`, you might want to try making this option
empty. Then set the 'term' option to have it take effect: >
set keyprotocol=
let &term = &term
*'keywordprg'* *'kp'*
'keywordprg' 'kp' string (default "man" or "man -s", DOS: ":help",
@@ -7111,50 +7120,54 @@ A jump table for the options with a short description can be found at |Q_op|.
*'shortmess'* *'shm'*
'shortmess' 'shm' string (Vim default "filnxtToOS", Vi default: "S",
POSIX default: "AS")
global
global *E1336*
This option helps to avoid all the |hit-enter| prompts caused by file
messages, for example with CTRL-G, and to avoid some other messages.
It is a list of flags:
flag meaning when present ~
f use "(3 of 5)" instead of "(file 3 of 5)"
i use "[noeol]" instead of "[Incomplete last line]"
l use "999L, 888B" instead of "999 lines, 888 bytes"
m use "[+]" instead of "[Modified]"
n use "[New]" instead of "[New File]"
r use "[RO]" instead of "[readonly]"
w use "[w]" instead of "written" for file write message
f use "(3 of 5)" instead of "(file 3 of 5)" *shm-f*
i use "[noeol]" instead of "[Incomplete last line]" *shm-i*
l use "999L, 888B" instead of "999 lines, 888 bytes" *shm-l*
m use "[+]" instead of "[Modified]" *shm-m*
n use "[New]" instead of "[New File]" *shm-n*
r use "[RO]" instead of "[readonly]" *shm-r*
w use "[w]" instead of "written" for file write message *shm-w*
and "[a]" instead of "appended" for ':w >> file' command
x use "[dos]" instead of "[dos format]", "[unix]" instead of
"[unix format]" and "[mac]" instead of "[mac format]".
a all of the above abbreviations
x use "[dos]" instead of "[dos format]", "[unix]" *shm-x*
instead of "[unix format]" and "[mac]" instead of "[mac
format]"
a all of the above abbreviations *shm-a*
o overwrite message for writing a file with subsequent message
for reading a file (useful for ":wn" or when 'autowrite' on)
O message for reading a file overwrites any previous message.
Also for quickfix message (e.g., ":cn").
s don't give "search hit BOTTOM, continuing at TOP" or "search
hit TOP, continuing at BOTTOM" messages; when using the search
count do not show "W" after the count message (see S below)
t truncate file message at the start if it is too long to fit
on the command-line, "<" will appear in the left most column.
Ignored in Ex mode.
T truncate other messages in the middle if they are too long to
fit on the command line. "..." will appear in the middle.
Ignored in Ex mode.
W don't give "written" or "[w]" when writing a file
A don't give the "ATTENTION" message when an existing swap file
is found.
I don't give the intro message when starting Vim |:intro|.
c don't give |ins-completion-menu| messages. For example,
"-- XXX completion (YYY)", "match 1 of 2", "The only match",
"Pattern not found", "Back at original", etc.
C don't give messages while scanning for ins-completion items,
for instance "scanning tags"
q use "recording" instead of "recording @a"
F don't give the file info when editing a file, like `:silent`
was used for the command; note that this also affects messages
from autocommands
S do not show search count message when searching, e.g.
o overwrite message for writing a file with subsequent *shm-o*
message for reading a file (useful for ":wn" or when
'autowrite' on)
O message for reading a file overwrites any previous *shm-O*
message; also for quickfix message (e.g., ":cn")
s don't give "search hit BOTTOM, continuing at TOP" or *shm-s*
"search hit TOP, continuing at BOTTOM" messages; when using
the search count do not show "W" after the count message (see
S below)
t truncate file message at the start if it is too long *shm-t*
to fit on the command-line, "<" will appear in the left most
column; ignored in Ex mode
T truncate other messages in the middle if they are too *shm-T*
long to fit on the command line; "..." will appear in the
middle; ignored in Ex mode
W don't give "written" or "[w]" when writing a file *shm-W*
A don't give the "ATTENTION" message when an existing *shm-A*
swap file is found
I don't give the intro message when starting Vim, *shm-I*
see |:intro|
c don't give |ins-completion-menu| messages; for *shm-c*
example, "-- XXX completion (YYY)", "match 1 of 2", "The only
match", "Pattern not found", "Back at original", etc.
C don't give messages while scanning for ins-completion *shm-C*
items, for instance "scanning tags"
q use "recording" instead of "recording @a" *shm-q*
F don't give the file info when editing a file, like *shm-F*
`:silent` was used for the command; note that this also
affects messages from autocommands
S do not show search count message when searching, e.g. *shm-S*
"[1/5]"
This gives you the opportunity to avoid that a change between buffers
@@ -7215,9 +7228,26 @@ A jump table for the options with a short description can be found at |Q_op|.
- When selecting more than one line, the number of lines.
- When selecting a block, the size in screen characters:
{lines}x{columns}.
This information can be displayed in an alternative location using the
'showcmdloc' option.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
*'showcmdloc'* *'sloc'*
'showcmdloc' 'sloc' string (default "last")
global
This option can be used to display the (partially) entered command in
another location. Possible values are:
last Last line of the screen (default).
statusline Status line of the current window.
tabline First line of the screen if 'showtabline' is enabled.
Setting this option to "statusline" or "tabline" means that these will
be redrawn whenever the command changes, which can be on every key
pressed.
The %S 'statusline' item can be used in 'statusline' or 'tabline' to
place the text. Without a custom 'statusline' or 'tabline' it will be
displayed in a convenient location.
*'showfulltag'* *'sft'* *'noshowfulltag'* *'nosft'*
'showfulltag' 'sft' boolean (default off)
global
@@ -7656,6 +7686,8 @@ A jump table for the options with a short description can be found at |Q_op|.
When there is error while evaluating the option then it will be made
empty to avoid further errors. Otherwise screen updating would loop.
When the result contains unprintable characters the result is
unpredictable.
Note that the only effect of 'ruler' when this option is set (and
'laststatus' is 2) is controlling the output of |CTRL-G|.
@@ -7715,6 +7747,7 @@ A jump table for the options with a short description can be found at |Q_op|.
P S Percentage through file of displayed window. This is like the
percentage described for 'ruler'. Always 3 in length, unless
translated.
S S 'showcmd' content, see 'showcmdloc'.
a S Argument list status as in default title. ({current} of {max})
Empty if the argument file count is zero or one.
{ NF Evaluate expression between '%{' and '}' and substitute result.
@@ -8569,10 +8602,7 @@ A jump table for the options with a short description can be found at |Q_op|.
xterm entries...).
*'ttyfast'* *'tf'* *'nottyfast'* *'notf'*
'ttyfast' 'tf' boolean (default off, on when 'term' is xterm, hpterm,
sun-cmd, screen, rxvt, dtterm or
iris-ansi; also on when running Vim in
a DOS console)
'ttyfast' 'tf' boolean (default on)
global
Indicates a fast terminal connection. More characters will be sent to
the screen for redrawing, instead of using insert/delete line
@@ -8582,6 +8612,14 @@ A jump table for the options with a short description can be found at |Q_op|.
line for lines that wrap. This helps when using copy/paste with the
mouse in an xterm and other terminals.
The default used to be set only for some terminal names, but these
days nearly all terminals are fast, therefore the default is now "on".
If you have a slow connection you may want to set this option off,
e.g. depending on the host name: >
if hostname() =~ 'faraway'
set nottyfast
endif
<
*'ttymouse'* *'ttym'*
'ttymouse' 'ttym' string (default depends on 'term')
global
@@ -8641,6 +8679,9 @@ A jump table for the options with a short description can be found at |Q_op|.
set to a name that starts with "xterm", "mlterm", "screen", "tmux",
"st" (full match only), "st-" or "stterm", and 'ttymouse' is not set
already.
If the terminfo/termcap entry "XM" exists and the first number is
"1006" then 'ttymouse' will be set to "sgr". This works for many
modern terminals.
Additionally, if vim is compiled with the |+termresponse| feature and
|t_RV| is set to the escape sequence to request the xterm version
number, more intelligent detection is done.

View File

@@ -1,4 +1,4 @@
*os_unix.txt* For Vim version 9.0. Last change: 2005 Mar 29
*os_unix.txt* For Vim version 9.0. Last change: 2022 Nov 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -28,10 +28,11 @@ system() is used, which is a bit slower. The output of ":version" includes
can be changed at compile time.
(For forking of the GUI version see |gui-fork|.)
Because terminal updating under Unix is often slow (e.g. serial line
terminal, shell window in suntools), the 'showcmd' and 'ruler' options
are off by default. If you have a fast terminal, try setting them on. You
might also want to set 'ttyfast'.
For historic reasons terminal updating under Unix is expected to be slow (e.g.
serial line terminal, shell window in suntools), the 'showcmd' and 'ruler'
options are off by default. If you have a fast terminal, try setting them
on: >
set showcmd ruler
When using Vim in an xterm the mouse clicks can be used by Vim by setting
'mouse' to "a". If there is access to an X-server gui style copy/paste will

View File

@@ -1,4 +1,4 @@
*os_vms.txt* For Vim version 9.0. Last change: 2022 Sep 30
*os_vms.txt* For Vim version 9.0. Last change: 2022 Nov 25
VIM REFERENCE MANUAL
@@ -458,18 +458,11 @@ Ins, Del buttons etc., except Backspace in GUI mode. To solve it, add to
Vim will also recognize that they are fast terminals.
If you have some annoying line jumping on the screen between windows add to
your .vimrc file: >
set ttyfast " set fast terminal
Note: if you're using Vim on remote host or through a very slow connection, it's
recommended to avoid the fast terminal option with: >
If you're using Vim on remote host or through a very slow connection, you
might want to reset fast terminal option with: >
set nottyfast " set terminal to slow mode
(Zoltan Arpadffy, Vim 5.6)
8.7 Hex-editing and other external tools

View File

@@ -1273,6 +1273,21 @@ not "b:current_compiler". What the command actually does is the following:
For writing a compiler plugin, see |write-compiler-plugin|.
DOTNET *compiler-dotnet*
The .NET CLI compiler outputs both errors and warnings by default. The output
may be limited to include only errors, by setting the g:dotnet_errors_only
variable to |v:true|.
The associated project name is included in each error and warning. To supress
the project name, set the g:dotnet_show_project_file variable to |v:false|.
Example: limit output to only display errors, and suppress the project name: >
let dotnet_errors_only = v:true
let dotnet_show_project_file = v:false
compiler dotnet
<
GCC *quickfix-gcc* *compiler-gcc*
There's one variable you can set for the GCC compiler:

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 9.0. Last change: 2022 Nov 23
*quickref.txt* For Vim version 9.0. Last change: 2022 Dec 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -902,7 +902,8 @@ Short explanation of each option: *option-list*
'shortmess' 'shm' list of flags, reduce length of messages
'shortname' 'sn' Filenames assumed to be 8.3 chars
'showbreak' 'sbr' string to use at the start of wrapped lines
'showcmd' 'sc' show (partial) command in status line
'showcmd' 'sc' show (partial) command somewhere
'showcmdloc' 'sloc' where to show (partial) command
'showfulltag' 'sft' show full tag pattern when completing tag
'showmatch' 'sm' briefly jump to matching bracket if insert one
'showmode' 'smd' message on status line to show current mode

View File

@@ -1,4 +1,4 @@
*sign.txt* For Vim version 9.0. Last change: 2021 Dec 05
*sign.txt* For Vim version 9.0. Last change: 2022 Dec 20
VIM REFERENCE MANUAL by Gordon Prieur
@@ -625,9 +625,9 @@ sign_placelist({list})
then a new unique identifier is allocated.
Otherwise the specified number is used. See
|sign-identifier| for more information.
lnum line number in the buffer {expr} where the
sign is to be placed. For the accepted values,
see |line()|.
lnum line number in the buffer where the sign is to
be placed. For the accepted values, see
|line()|.
name name of the sign to place. See |sign_define()|
for more information.
priority priority of the sign. When multiple signs are

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 9.0. Last change: 2022 Jun 14
*starting.txt* For Vim version 9.0. Last change: 2022 Nov 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -348,7 +348,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
Start logging and write entries to {filename}.
This works like calling `ch_logfile({filename}, 'ao')` very
early during startup.
{only available with the |+channel| feature}
{only available with the |+eval| feature}
*-D*
-D Debugging. Go to debugging mode when executing the first

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.0. Last change: 2022 Nov 15
*syntax.txt* For Vim version 9.0. Last change: 2022 Dec 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3621,6 +3621,14 @@ highlighting is to put the following line in your |vimrc|: >
<
WDL *wdl.vim* *wdl-syntax*
The Workflow Description Language is a way to specify data processing workflows
with a human-readable and writeable syntax. This is used a lot in
bioinformatics. More info on the spec can be found here:
https://github.com/openwdl/wdl
XF86CONFIG *xf86conf.vim* *ft-xf86conf-syntax*
The syntax of XF86Config file differs in XFree86 v3.x and v4.x. Both
@@ -4995,7 +5003,7 @@ in their own color.
*highlight-clear* *:hi-clear*
:hi[ghlight] clear Reset all highlighting to the defaults. Removes all
highlighting for groups added by the user!
highlighting for groups added by the user.
Uses the current value of 'background' to decide which
default colors to use.
If there was a default link, restore it. |:hi-link|

View File

@@ -438,10 +438,8 @@ $quote eval.txt /*$quote*
'keymap' options.txt /*'keymap'*
'keymodel' options.txt /*'keymodel'*
'keyprotocol' options.txt /*'keyprotocol'*
'keywordprg' options.txt /*'keywordprg'*
'km' options.txt /*'km'*
'kmp' options.txt /*'kmp'*
'kp' options.txt /*'kp'*
'kpc' options.txt /*'kpc'*
'langmap' options.txt /*'langmap'*
'langmenu' options.txt /*'langmenu'*
@@ -926,6 +924,7 @@ $quote eval.txt /*$quote*
'shortname' options.txt /*'shortname'*
'showbreak' options.txt /*'showbreak'*
'showcmd' options.txt /*'showcmd'*
'showcmdloc' options.txt /*'showcmdloc'*
'showfulltag' options.txt /*'showfulltag'*
'showmatch' options.txt /*'showmatch'*
'showmode' options.txt /*'showmode'*
@@ -938,6 +937,7 @@ $quote eval.txt /*$quote*
'siso' options.txt /*'siso'*
'sj' options.txt /*'sj'*
'slm' options.txt /*'slm'*
'sloc' options.txt /*'sloc'*
'slow' vi_diff.txt /*'slow'*
'slowopen' vi_diff.txt /*'slowopen'*
'sm' options.txt /*'sm'*
@@ -1061,6 +1061,7 @@ $quote eval.txt /*$quote*
't_RC' term.txt /*'t_RC'*
't_RF' term.txt /*'t_RF'*
't_RI' term.txt /*'t_RI'*
't_RK' term.txt /*'t_RK'*
't_RS' term.txt /*'t_RS'*
't_RT' term.txt /*'t_RT'*
't_RV' term.txt /*'t_RV'*
@@ -1081,6 +1082,7 @@ $quote eval.txt /*$quote*
't_VS' term.txt /*'t_VS'*
't_WP' term.txt /*'t_WP'*
't_WS' term.txt /*'t_WS'*
't_XM' term.txt /*'t_XM'*
't_ZH' term.txt /*'t_ZH'*
't_ZR' term.txt /*'t_ZR'*
't_al' term.txt /*'t_al'*
@@ -2164,7 +2166,7 @@ $quote eval.txt /*$quote*
:abclear map.txt /*:abclear*
:abo windows.txt /*:abo*
:aboveleft windows.txt /*:aboveleft*
:abstract vim9.txt /*:abstract*
:abstract vim9class.txt /*:abstract*
:addd quickfix.txt /*:addd*
:al windows.txt /*:al*
:all windows.txt /*:all*
@@ -2200,6 +2202,7 @@ $quote eval.txt /*$quote*
:aun gui.txt /*:aun*
:aunmenu gui.txt /*:aunmenu*
:autocmd autocmd.txt /*:autocmd*
:autocmd-block autocmd.txt /*:autocmd-block*
:autocmd-verbose autocmd.txt /*:autocmd-verbose*
:b windows.txt /*:b*
:bN windows.txt /*:bN*
@@ -2324,7 +2327,7 @@ $quote eval.txt /*$quote*
:chistory quickfix.txt /*:chistory*
:cl quickfix.txt /*:cl*
:cla quickfix.txt /*:cla*
:class vim9.txt /*:class*
:class vim9class.txt /*:class*
:clast quickfix.txt /*:clast*
:cle motion.txt /*:cle*
:clearjumps motion.txt /*:clearjumps*
@@ -2501,15 +2504,15 @@ $quote eval.txt /*$quote*
:emenu gui.txt /*:emenu*
:en eval.txt /*:en*
:end eval.txt /*:end*
:endclass vim9.txt /*:endclass*
:endclass vim9class.txt /*:endclass*
:enddef vim9.txt /*:enddef*
:endenum vim9.txt /*:endenum*
:endenum vim9class.txt /*:endenum*
:endf userfunc.txt /*:endf*
:endfo eval.txt /*:endfo*
:endfor eval.txt /*:endfor*
:endfunction userfunc.txt /*:endfunction*
:endif eval.txt /*:endif*
:endinterface vim9.txt /*:endinterface*
:endinterface vim9class.txt /*:endinterface*
:endt eval.txt /*:endt*
:endtry eval.txt /*:endtry*
:endw eval.txt /*:endw*
@@ -2518,7 +2521,7 @@ $quote eval.txt /*$quote*
:ene! editing.txt /*:ene!*
:enew editing.txt /*:enew*
:enew! editing.txt /*:enew!*
:enum vim9.txt /*:enum*
:enum vim9class.txt /*:enum*
:eval eval.txt /*:eval*
:ex editing.txt /*:ex*
:exe eval.txt /*:exe*
@@ -2648,7 +2651,7 @@ $quote eval.txt /*$quote*
:inoreme gui.txt /*:inoreme*
:inoremenu gui.txt /*:inoremenu*
:insert insert.txt /*:insert*
:interface vim9.txt /*:interface*
:interface vim9class.txt /*:interface*
:intro starting.txt /*:intro*
:is tagsrch.txt /*:is*
:isearch tagsrch.txt /*:isearch*
@@ -3016,6 +3019,7 @@ $quote eval.txt /*$quote*
:pts tagsrch.txt /*:pts*
:ptselect tagsrch.txt /*:ptselect*
:pu change.txt /*:pu*
:public vim9class.txt /*:public*
:put change.txt /*:put*
:pw editing.txt /*:pw*
:pwd editing.txt /*:pwd*
@@ -3285,7 +3289,7 @@ $quote eval.txt /*$quote*
:startgreplace insert.txt /*:startgreplace*
:startinsert insert.txt /*:startinsert*
:startreplace insert.txt /*:startreplace*
:static vim9.txt /*:static*
:static vim9class.txt /*:static*
:stj tagsrch.txt /*:stj*
:stjump tagsrch.txt /*:stjump*
:stop starting.txt /*:stop*
@@ -3463,7 +3467,7 @@ $quote eval.txt /*$quote*
:tunma map.txt /*:tunma*
:tunmap map.txt /*:tunmap*
:tunmenu gui.txt /*:tunmenu*
:type vim9.txt /*:type*
:type vim9class.txt /*:type*
:u undo.txt /*:u*
:un undo.txt /*:un*
:una map.txt /*:una*
@@ -3987,6 +3991,7 @@ CTRL-{char} intro.txt /*CTRL-{char}*
Channel eval.txt /*Channel*
Channels eval.txt /*Channels*
Chinese mbyte.txt /*Chinese*
Class vim9class.txt /*Class*
Cmd-event autocmd.txt /*Cmd-event*
CmdUndefined autocmd.txt /*CmdUndefined*
Cmdline cmdline.txt /*Cmdline*
@@ -4365,10 +4370,52 @@ E131 userfunc.txt /*E131*
E1310 gui.txt /*E1310*
E1311 map.txt /*E1311*
E1312 windows.txt /*E1312*
E1313 eval.txt /*E1313*
E1314 vim9class.txt /*E1314*
E1315 vim9class.txt /*E1315*
E1316 vim9class.txt /*E1316*
E1317 vim9class.txt /*E1317*
E1318 vim9class.txt /*E1318*
E1319 eval.txt /*E1319*
E132 userfunc.txt /*E132*
E1320 eval.txt /*E1320*
E1321 eval.txt /*E1321*
E1322 eval.txt /*E1322*
E1323 eval.txt /*E1323*
E1324 eval.txt /*E1324*
E1325 vim9class.txt /*E1325*
E1326 vim9class.txt /*E1326*
E1327 vim9class.txt /*E1327*
E1328 vim9class.txt /*E1328*
E1329 vim9class.txt /*E1329*
E133 userfunc.txt /*E133*
E1330 vim9class.txt /*E1330*
E1331 vim9class.txt /*E1331*
E1332 vim9class.txt /*E1332*
E1333 vim9class.txt /*E1333*
E1334 vim9class.txt /*E1334*
E1335 vim9class.txt /*E1335*
E1336 options.txt /*E1336*
E1337 vim9class.txt /*E1337*
E1338 vim9class.txt /*E1338*
E1339 textprop.txt /*E1339*
E134 change.txt /*E134*
E1340 vim9class.txt /*E1340*
E1341 vim9class.txt /*E1341*
E1342 vim9class.txt /*E1342*
E1343 vim9class.txt /*E1343*
E1344 vim9class.txt /*E1344*
E1345 vim9class.txt /*E1345*
E1346 vim9class.txt /*E1346*
E1347 vim9class.txt /*E1347*
E1348 vim9class.txt /*E1348*
E1349 vim9class.txt /*E1349*
E135 autocmd.txt /*E135*
E1350 vim9class.txt /*E1350*
E1351 vim9class.txt /*E1351*
E1352 vim9class.txt /*E1352*
E1353 vim9class.txt /*E1353*
E1354 vim9class.txt /*E1354*
E136 starting.txt /*E136*
E137 starting.txt /*E137*
E138 starting.txt /*E138*
@@ -5424,6 +5471,7 @@ OS390-bugs os_390.txt /*OS390-bugs*
OS390-has-ebcdic os_390.txt /*OS390-has-ebcdic*
OS390-limitations os_390.txt /*OS390-limitations*
OS390-open-source os_390.txt /*OS390-open-source*
Object vim9class.txt /*Object*
OffTheSpot mbyte.txt /*OffTheSpot*
OnTheSpot mbyte.txt /*OnTheSpot*
Operator-pending intro.txt /*Operator-pending*
@@ -5583,7 +5631,14 @@ VMS os_vms.txt /*VMS*
Vi intro.txt /*Vi*
View starting.txt /*View*
Vim9 vim9.txt /*Vim9*
Vim9-abstract-class vim9class.txt /*Vim9-abstract-class*
Vim9-class vim9class.txt /*Vim9-class*
Vim9-class-overview vim9class.txt /*Vim9-class-overview*
Vim9-enum vim9class.txt /*Vim9-enum*
Vim9-script vim9.txt /*Vim9-script*
Vim9-simple-class vim9class.txt /*Vim9-simple-class*
Vim9-type vim9class.txt /*Vim9-type*
Vim9-using-interface vim9class.txt /*Vim9-using-interface*
VimEnter autocmd.txt /*VimEnter*
VimLeave autocmd.txt /*VimLeave*
VimLeavePre autocmd.txt /*VimLeavePre*
@@ -6254,6 +6309,9 @@ cino-w indent.txt /*cino-w*
cino-{ indent.txt /*cino-{*
cino-} indent.txt /*cino-}*
cinoptions-values indent.txt /*cinoptions-values*
class vim9class.txt /*class*
class-function vim9class.txt /*class-function*
class-member vim9class.txt /*class-member*
clear-undo undo.txt /*clear-undo*
clearmatches() builtin.txt /*clearmatches()*
client-server remote.txt /*client-server*
@@ -6310,6 +6368,7 @@ compile-changes-8 version8.txt /*compile-changes-8*
compile-changes-9 version9.txt /*compile-changes-9*
compiler-compaqada ft_ada.txt /*compiler-compaqada*
compiler-decada ft_ada.txt /*compiler-decada*
compiler-dotnet quickfix.txt /*compiler-dotnet*
compiler-gcc quickfix.txt /*compiler-gcc*
compiler-gnat ft_ada.txt /*compiler-gnat*
compiler-hpada ft_ada.txt /*compiler-hpada*
@@ -6827,6 +6886,7 @@ expression-syntax eval.txt /*expression-syntax*
exrc starting.txt /*exrc*
extend() builtin.txt /*extend()*
extendnew() builtin.txt /*extendnew()*
extends vim9class.txt /*extends*
extension-removal cmdline.txt /*extension-removal*
extensions-improvements todo.txt /*extensions-improvements*
f motion.txt /*f*
@@ -6968,6 +7028,7 @@ form.vim syntax.txt /*form.vim*
format-bullet-list tips.txt /*format-bullet-list*
format-comments change.txt /*format-comments*
format-formatexpr change.txt /*format-formatexpr*
formatOtherKeys map.txt /*formatOtherKeys*
formatting change.txt /*formatting*
forth.vim syntax.txt /*forth.vim*
fortran.vim syntax.txt /*fortran.vim*
@@ -8000,6 +8061,7 @@ if_sniff.txt if_sniff.txt /*if_sniff.txt*
if_tcl.txt if_tcl.txt /*if_tcl.txt*
ignore-errors eval.txt /*ignore-errors*
ignore-timestamp editing.txt /*ignore-timestamp*
implements vim9class.txt /*implements*
import-autoload vim9.txt /*import-autoload*
import-legacy vim9.txt /*import-legacy*
import-map vim9.txt /*import-map*
@@ -8168,6 +8230,7 @@ keypad-point intro.txt /*keypad-point*
keys() builtin.txt /*keys()*
keytrans() builtin.txt /*keytrans()*
kitty-keyboard-protocol map.txt /*kitty-keyboard-protocol*
kitty-terminal term.txt /*kitty-terminal*
known-bugs todo.txt /*known-bugs*
l motion.txt /*l*
l: eval.txt /*l:*
@@ -8445,6 +8508,7 @@ motion-count-multiplied motion.txt /*motion-count-multiplied*
motion.txt motion.txt /*motion.txt*
mouse-mode-table term.txt /*mouse-mode-table*
mouse-overview term.txt /*mouse-overview*
mouse-reporting term.txt /*mouse-reporting*
mouse-scrolling-off scroll.txt /*mouse-scrolling-off*
mouse-swap-buttons term.txt /*mouse-swap-buttons*
mouse-using term.txt /*mouse-using*
@@ -8863,6 +8927,14 @@ nr2char() builtin.txt /*nr2char()*
nroff.vim syntax.txt /*nroff.vim*
null vim9.txt /*null*
null-variable eval.txt /*null-variable*
null_blob vim9.txt /*null_blob*
null_channel vim9.txt /*null_channel*
null_dict vim9.txt /*null_dict*
null_function vim9.txt /*null_function*
null_job vim9.txt /*null_job*
null_list vim9.txt /*null_list*
null_partial vim9.txt /*null_partial*
null_string vim9.txt /*null_string*
number_relativenumber options.txt /*number_relativenumber*
numbered-function eval.txt /*numbered-function*
numbermax-variable eval.txt /*numbermax-variable*
@@ -8872,6 +8944,7 @@ o insert.txt /*o*
o_CTRL-V motion.txt /*o_CTRL-V*
o_V motion.txt /*o_V*
o_v motion.txt /*o_v*
object vim9class.txt /*object*
object-motions motion.txt /*object-motions*
object-select motion.txt /*object-select*
objects index.txt /*objects*
@@ -9530,6 +9603,28 @@ shellescape() builtin.txt /*shellescape()*
shift intro.txt /*shift*
shift-left-right change.txt /*shift-left-right*
shiftwidth() builtin.txt /*shiftwidth()*
shm-A options.txt /*shm-A*
shm-C options.txt /*shm-C*
shm-F options.txt /*shm-F*
shm-I options.txt /*shm-I*
shm-O options.txt /*shm-O*
shm-S options.txt /*shm-S*
shm-T options.txt /*shm-T*
shm-W options.txt /*shm-W*
shm-a options.txt /*shm-a*
shm-c options.txt /*shm-c*
shm-f options.txt /*shm-f*
shm-i options.txt /*shm-i*
shm-l options.txt /*shm-l*
shm-m options.txt /*shm-m*
shm-n options.txt /*shm-n*
shm-o options.txt /*shm-o*
shm-q options.txt /*shm-q*
shm-r options.txt /*shm-r*
shm-s options.txt /*shm-s*
shm-t options.txt /*shm-t*
shm-w options.txt /*shm-w*
shm-x options.txt /*shm-x*
short-name-changed version4.txt /*short-name-changed*
showing-menus gui.txt /*showing-menus*
sign-column sign.txt /*sign-column*
@@ -9586,6 +9681,7 @@ spec_chglog_format pi_spec.txt /*spec_chglog_format*
spec_chglog_prepend pi_spec.txt /*spec_chglog_prepend*
spec_chglog_release_info pi_spec.txt /*spec_chglog_release_info*
special-buffers windows.txt /*special-buffers*
specifies vim9class.txt /*specifies*
speed-up tips.txt /*speed-up*
spell spell.txt /*spell*
spell-ACCENT spell.txt /*spell-ACCENT*
@@ -9800,6 +9896,7 @@ swap-file recover.txt /*swap-file*
swapchoice-variable eval.txt /*swapchoice-variable*
swapcommand-variable eval.txt /*swapcommand-variable*
swapfile-changed version4.txt /*swapfile-changed*
swapfilelist() builtin.txt /*swapfilelist()*
swapinfo() builtin.txt /*swapinfo()*
swapname() builtin.txt /*swapname()*
swapname-variable eval.txt /*swapname-variable*
@@ -9910,6 +10007,7 @@ t_RB term.txt /*t_RB*
t_RC term.txt /*t_RC*
t_RF term.txt /*t_RF*
t_RI term.txt /*t_RI*
t_RK term.txt /*t_RK*
t_RS term.txt /*t_RS*
t_RT term.txt /*t_RT*
t_RV term.txt /*t_RV*
@@ -9930,6 +10028,7 @@ t_Us term.txt /*t_Us*
t_VS term.txt /*t_VS*
t_WP term.txt /*t_WP*
t_WS term.txt /*t_WS*
t_XM term.txt /*t_XM*
t_ZH term.txt /*t_ZH*
t_ZR term.txt /*t_ZR*
t_al term.txt /*t_al*
@@ -10246,6 +10345,7 @@ test_garbagecollect_soon() testing.txt /*test_garbagecollect_soon()*
test_getvalue() testing.txt /*test_getvalue()*
test_gui_event() testing.txt /*test_gui_event()*
test_ignore_error() testing.txt /*test_ignore_error()*
test_mswin_event() testing.txt /*test_mswin_event()*
test_null_blob() testing.txt /*test_null_blob()*
test_null_channel() testing.txt /*test_null_channel()*
test_null_dict() testing.txt /*test_null_dict()*
@@ -10774,6 +10874,7 @@ vim9-unpack-ignore vim9.txt /*vim9-unpack-ignore*
vim9-user-command vim9.txt /*vim9-user-command*
vim9-variable-arguments vim9.txt /*vim9-variable-arguments*
vim9.txt vim9.txt /*vim9.txt*
vim9class.txt vim9class.txt /*vim9class.txt*
vim9script vim9.txt /*vim9script*
vim: options.txt /*vim:*
vim_announce intro.txt /*vim_announce*
@@ -10865,6 +10966,8 @@ w:quickfix_title quickfix.txt /*w:quickfix_title*
w:var eval.txt /*w:var*
waittime channel.txt /*waittime*
warningmsg-variable eval.txt /*warningmsg-variable*
wdl-syntax syntax.txt /*wdl-syntax*
wdl.vim syntax.txt /*wdl.vim*
white-space pattern.txt /*white-space*
whitespace pattern.txt /*whitespace*
wildcard editing.txt /*wildcard*
@@ -10999,6 +11102,7 @@ xterm-cursor-keys term.txt /*xterm-cursor-keys*
xterm-end-home-keys term.txt /*xterm-end-home-keys*
xterm-focus-event term.txt /*xterm-focus-event*
xterm-function-keys term.txt /*xterm-function-keys*
xterm-kitty term.txt /*xterm-kitty*
xterm-modifier-keys term.txt /*xterm-modifier-keys*
xterm-mouse options.txt /*xterm-mouse*
xterm-mouse-wheel scroll.txt /*xterm-mouse-wheel*
@@ -11007,6 +11111,7 @@ xterm-save-screen tips.txt /*xterm-save-screen*
xterm-screens tips.txt /*xterm-screens*
xterm-scroll-region term.txt /*xterm-scroll-region*
xterm-shifted-keys term.txt /*xterm-shifted-keys*
xterm-terminfo-entries term.txt /*xterm-terminfo-entries*
xterm-true-color term.txt /*xterm-true-color*
y change.txt /*y*
yaml.vim syntax.txt /*yaml.vim*

View File

@@ -1,4 +1,4 @@
*term.txt* For Vim version 9.0. Last change: 2022 Oct 21
*term.txt* For Vim version 9.0. Last change: 2023 Jan 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -88,7 +88,13 @@ Output resumes when you hit <BS>.
Note: When 't_ti' is not empty, Vim assumes that it causes switching to the
alternate screen. This may slightly change what happens when executing a
shell command or exiting Vim. To avoid this use 't_TI' and 't_TE'.
shell command or exiting Vim. To avoid this use 't_TI' and 't_TE' (but make
sure to add to them, not overwrite).
Vim will try to detect what keyboard protocol the terminal is using with the
't_RK' termcap entry. This is sent after 't_TI', but only when there is no
work to do (no typeahead and no pending commands). That is to avoid the
response to end up in a shell command or arrive after Vim exits.
*xterm-bracketed-paste*
When the 't_BE' option is set then 't_BE' will be sent to the
@@ -112,6 +118,10 @@ have a problem with this, disable bracketed paste by putting this in your
If this is done while Vim is running the 't_BD' will be sent to the terminal
to disable bracketed paste.
If |t_PS| or |t_PE| is not set, then |t_BE| will not be used. This is to make
sure that bracketed paste is not enabled when the escape codes surrounding
pasted text cannot be recognized.
If your terminal supports bracketed paste, but the options are not set
automatically, you can try using something like this: >
@@ -121,7 +131,11 @@ automatically, you can try using something like this: >
exec "set t_PS=\e[200~"
exec "set t_PE=\e[201~"
endif
<
The terminfo entries "BE", "BD", "PS" and "PE" were added in ncurses version
6.4, early 2023, for some terminals. If you have this version then you may
not have to manually configure your terminal.
*tmux-integration*
If you experience issues when running Vim inside tmux, here are a few hints.
You can comment-out parts if something doesn't work (it may depend on the
@@ -289,6 +303,53 @@ When Vim receives a response to the |t_RV| (request version) sequence and it
starts with CSI, it assumes that the terminal is in 8-bit mode and will
convert all key sequences to their 8-bit variants.
*xterm-terminfo-entries*
For some time the terminfo entries were insufficient to describe all the
features tht Vim can use. The builtin xterm termcap entries did have these,
with the result that several terminals that were similar enough to xterm took
advantage of these by prefixing "xterm-" to the terminal name in $TERM.
This leads to problems, because quite often these terminals are not 100%
compatible with xterm. At the start of 2023 several entries have been added
to the terminfo database to make it possible to use these features without
using the "xterm" workaround. These are the relevant entries (so far):
name xterm value description ~
RV "\033[>c" Request version |t_RV|
BE "\033[?2004h" enable bracketed paste mode |t_BE|
BD "\033[?2004l" disable bracketed paste mode |t_BD|
PS "\033[200~" pasted text start |t_PS|
PE "\033[201~" pasted text end |t_PE|
XM "\033[?1006;1000%?%p1%{1}%=%th%el%;"
mouse enable / disable |t_XM|
*xterm-kitty* *kitty-terminal*
The Kitty terminal is a special case. Mainly because it works differently
from most other terminals, but also because, instead of trying the fit in and
make it behave like other terminals by default, it dictates how applications
need to work when using Kitty. This makes it very difficult for Vim to work
in a Kitty terminal. Some exceptions have been hard coded, but it is not at
all nice to have to make exceptions for one specific terminal.
One of the problems is that the value for $TERM is set to "xterm-kitty". For
Vim this is an indication that the terminal is xterm-compatible and the
builtin xterm termcap entries should be used. Many other terminals depend on
this. However, Kitty is not fully xterm compatible. The author suggested to
ignore the "xterm-" prefix and use the terminfo entry anyway, so that is what
happens now, the builtin xterm termcap entries are not used. However, the
t_RV is set, otherwise other things would not work, such as automatically
setting 'ttymouse' to "sgr" (at least until |t_XM| is being used for this).
It is not clear why kitty sets $TERM to "xterm-kitty", the terminal isn't
really xterm compatible. "kitty" would be more appropriate, but a terminfo
entry with that name is not widespread.
Note that using the kitty keyboard protocol is a separate feature, see
|kitty-keyboard-protocol|.
==============================================================================
2. Terminal options *terminal-options* *termcap-options* *E436*
@@ -388,6 +449,10 @@ Added by Vim (there are no standard codes for these):
xterm and other terminal emulators) The
response is stored in |v:termresponse| |xterm-8bit|
|'ttymouse'| |xterm-codes|
t_XM enable/disable mouse reporting, *t_XM* *'t_XM'*
see |mouse-reporting| below
t_RK request terminal keyboard protocol state; *t_RK* *'t_RK'*
sent after |t_TI|
t_u7 request cursor position (for xterm) *t_u7* *'t_u7'*
see |'ambiwidth'|
The response is stored in |v:termu7resp|
@@ -416,10 +481,10 @@ Added by Vim (there are no standard codes for these):
t_Si save icon text to stack *t_Si* *'t_Si'*
t_Ri restore icon text from stack *t_Ri* *'t_Ri'*
t_TE end of "raw" mode *t_TE* *'t_TE'*
t_TI put terminal into "raw" mode *t_TI* *'t_TI'*
t_fe enable focus-event tracking *t_fe* *'t_fe'*
t_TI put terminal into "raw" mode *t_TI* *'t_TI'*
t_fe enable focus-event tracking *t_fe* *'t_fe'*
|xterm-focus-event|
t_fd disable focus-event tracking *t_fd* *'t_fd'*
t_fd disable focus-event tracking *t_fd* *'t_fd'*
|xterm-focus-event|
Some codes have a start, middle and end part. The start and end are defined
@@ -429,8 +494,8 @@ by the termcap option, the middle part is text.
set cursor color: t_SC {color name} t_EC
t_SH must take one argument:
0, 1 or none blinking block cursor
2 block cursor
0, 1 or none blinking block cursor
2 block cursor
3 blinking underline cursor
4 underline cursor
5 blinking vertical bar cursor
@@ -439,6 +504,21 @@ t_SH must take one argument:
t_RS is sent only if the response to t_RV has been received. It is not used
on Mac OS when Terminal.app could be recognized from the termresponse.
*mouse-reporting*
Many terminals can report mouse clicks and some can report mouse movement and
dragging. Vim needs to know what codes are being used for this.
The "XM" terminfo/termcap entry is used for this. Vim also has the 'ttymouse'
option to specify the mouse protocol being used. See the option for the
possible values.
If Vim can read the "XM" terminfo/termcap entry then it will be used for
enabling and disabling the mouse reporting. If it is missing, then the value
from 'ttymouse' is used to decide how to do this.
If the "XM" entry exists and the first number is "1006" then 'ttymouse' will
be set to "sgr", unless it was already set earlier.
KEY CODES *terminal-key-codes*
Note: Use the <> form if possible
@@ -499,6 +579,7 @@ Note: Use the <> form if possible
t_%1 <Help> help key *t_%1* *'t_%1'*
t_&8 <Undo> undo key *t_&8* *'t_&8'*
t_kI <Insert> insert key *t_kI* *'t_kI'*
<kInsert> keypad insert key
t_kD <Del> delete key *t_kD* *'t_kD'*
t_kb <BS> backspace key *t_kb* *'t_kb'*
t_kB <S-Tab> back-tab (shift-tab) *<S-Tab>* *t_kB* *'t_kB'*
@@ -531,9 +612,13 @@ Note: Use the <> form if possible
t_KK <k8> keypad 8 *<k8>* *t_KK* *'t_KK'*
t_KL <k9> keypad 9 *<k9>* *t_KL* *'t_KL'*
<Mouse> leader of mouse code *<Mouse>*
*t_PS* *'t_PS'*
t_PS start of bracketed paste |xterm-bracketed-paste|
t_PE end of bracketed paste |xterm-bracketed-paste| *t_PE* *'t_PE'*
t_PS <PasteStart> start of bracketed paste *t_PS* *'t_PS'*
|xterm-bracketed-paste|
t_PE <PasteEnd> end of bracketed paste *t_PE* *'t_PE'*
|xterm-bracketed-paste|
<FocusGained> Vim window got focus (internal only)
<FocusLost> Vim window lost focus (internal only)
Note about t_so and t_mr: When the termcap entry "so" is not present the
entry for "mr" is used. And vice versa. The same is done for "se" and "me".
@@ -572,12 +657,15 @@ work the 'termguicolors' option needs to be set.
See https://github.com/termstandard/colors for a list of terminals that
support true colors.
Sometimes setting 'termguicolors' is not enough and one has to set the |t_8f|
and |t_8b| options explicitly. Default values of these options are
"^[[38;2;%lu;%lu;%lum" and "^[[48;2;%lu;%lu;%lum" respectively, but it is only
set when `$TERM` is `xterm`. Some terminals accept the same sequences, but
with all semicolons replaced by colons (this is actually more compatible, but
less widely supported): >
For telling the terminal what RGB color to use the |t_8f| and |t_8b| termcap
entries are used. These are set by default to values that work for most
terminals. If that does not work for your terminal you can set them manually.
The default values are set like this: >
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
Some terminals accept the same sequences, but with all semicolons replaced by
colons (this is actually more compatible, but less widely supported): >
let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
@@ -595,7 +683,7 @@ is actually the case.
To overrule the default, put this line in your ~/.Xdefaults or
~/.Xresources:
>
XTerm*allowWindowOps: true
XTerm*allowWindowOps: true
And run "xrdb -merge .Xresources" to make it effective. You can check the
value with the context menu (right mouse button while CTRL key is pressed),
@@ -768,8 +856,9 @@ See the "Options" chapter |options|.
If your terminal does not support a scrolling region, but it does support
insert/delete line commands, scrolling with multiple windows may make the
lines jump up and down. If you don't want this set the 'ttyfast' option.
This will redraw the window instead of scroll it.
lines jump up and down. This would happen if the 'ttyfast' option has been
reset. Check that with: >
verbose set ttyfast?
If your terminal scrolls very slowly, but redrawing is not slow, set the
'ttyscroll' option to a small number, e.g., 3. This will make Vim redraw the

View File

@@ -1,4 +1,4 @@
*testing.txt* For Vim version 9.0. Last change: 2022 May 16
*testing.txt* For Vim version 9.0. Last change: 2022 Dec 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -94,7 +94,7 @@ test_gui_event({event}, {args})
"findrepl" search and replace text.
"mouse" mouse button click event.
"scrollbar" move or drag the scrollbar.
"sendevent" send a low-level GUI event.
"key" send a low-level keyboard event.
"tabline" select a tab page by mouse click.
"tabmenu" select a tabline menu entry.
@@ -135,9 +135,9 @@ test_gui_event({event}, {args})
Inject either a mouse button click, or a mouse move, event.
The supported items in {args} are:
button: mouse button. The supported values are:
0 right mouse button
0 left mouse button
1 middle mouse button
2 left mouse button
2 right mouse button
3 mouse button release
4 scroll wheel down
5 scroll wheel up
@@ -178,8 +178,8 @@ test_gui_event({event}, {args})
dragging: 1 to drag the scrollbar and 0 to click in the
scrollbar.
"sendevent":
Send a low-level GUI event (e.g. key-up or down).
"key":
Send a low-level keyboard event (e.g. key-up or down).
Currently only supported on MS-Windows.
The supported items in {args} are:
event: The supported string values are:
@@ -223,6 +223,77 @@ test_ignore_error({expr}) *test_ignore_error()*
Can also be used as a |method|: >
GetErrorText()->test_ignore_error()
test_mswin_event({event}, {args}) *test_mswin_event()*
Generate a low-level MS-Windows {event} with arguments {args}
for testing Vim functionality. It works for MS-Windows GUI
and for the console.
{event} is a String and the supported values are:
"mouse" mouse event.
"key" keyboard event.
"mouse":
Inject either a mouse button click, or a mouse move, event.
The supported items in {args} are:
button: mouse button. The supported values are:
0 right mouse button
1 middle mouse button
2 left mouse button
3 mouse button release
4 scroll wheel down
5 scroll wheel up
6 scroll wheel left
7 scroll wheel right
row: mouse click row number. The first row of the
Vim window is 1 and the last row is 'lines'.
col: mouse click column number. The maximum value
of {col} is 'columns'.
Note: row and col are always interpreted as
screen cells for the console application.
But, they may be interpreted as pixels
for the GUI, depending on "cell".
multiclick: set to 1 to inject a double-click mouse event.
modifiers: key modifiers. The supported values are:
4 shift is pressed
8 alt is pressed
16 ctrl is pressed
move: Optional; if used and TRUE then a mouse move
event can be generated.
Only {args} row: and col: are used and
required.
Only results in an event when 'mousemoveevent'
is set or a popup uses mouse move events.
cell: Optional for the GUI: when present and TRUE
then "move" uses screen cells instead of pixel
positions. Not used by the console.
"key":
Send a low-level keyboard event (e.g. keyup or keydown).
The supported items in {args} are:
event: The supported string values are:
keyup generate a keyup event
keydown generate a keydown event
keycode: Keycode to use for a keyup or a keydown event.
modifiers: Optional; key modifiers.
The supported values are:
2 shift is pressed
4 ctrl is pressed
8 alt is pressed
Note: These values are different from the
mouse modifiers.
execute: Optional. Similar to |feedkeys()| mode x.
When this is included and set to true
(non-zero) then Vim will process any buffered
unprocessed key events. All other {args}
items are optional when this is set and true.
Returns TRUE if the event is successfully added or executed,
FALSE if there is a failure.
Can also be used as a |method|: >
GetEvent()->test_mswin_event({args})
<
test_null_blob() *test_null_blob()*
Return a |Blob| that is null. Only useful for testing.

View File

@@ -1,4 +1,4 @@
*textprop.txt* For Vim version 9.0. Last change: 2022 Nov 18
*textprop.txt* For Vim version 9.0. Last change: 2022 Dec 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -220,10 +220,16 @@ prop_add({lnum}, {col}, {props})
Any Tab and other control character in the text will be
changed to a space (Rationale: otherwise the size of the text
is difficult to compute).
A negative "id" will be chosen and is returned. Once a
property with "text" has been added for a buffer then using a
negative "id" for any other property will give an error:
*E1293*
A negative "id" will be chosen and is returned.
Before text properties with text were supported it was
possible to use a negative "id", even though this was very
rare. Now that negative "id"s are reserved for text
properties with text an error is given when using a negative
"id". When a text property with text already exists using a
negative "id" results in *E1293* . If a negative "id" was
used and later a text property with text is added results in
*E1339* .
Can also be used as a |method|: >
GetLnum()->prop_add(col, props)

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 9.0. Last change: 2022 Nov 23
*todo.txt* For Vim version 9.0. Last change: 2023 Jan 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,26 +38,6 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
Keyboard protocol (also see below):
- Use the kitty_protocol_state value, similar to seenModifyOtherKeys
- When kitty_protocol_state is set then reset seenModifyOtherKeys.
Do not set seenModifyOtherKeys for kitty-protocol sequences in
handle_key_with_modifier().
virtual text issues:
- #11520 `below` cannot be placed below empty lines
James Alvarado looks into it
- virtual text `below` highlighted incorrectly when `cursorline` enabled
(Issue #11588)
'smoothscroll':
- CTRL-E and gj in long line with 'scrolloff' 5 not working well yet.
- computing 'scrolloff' position row use w_skipcol
- Check this list: https://github.com/vim/vim/pulls?q=is%3Apr+is%3Aopen+smoothscroll+author%3Aychin
- Long line spanning multiple pages: After a few CTRL-E then gj causes a
scroll. (Ernie Rael, 18 Nov) Also pressing space or "l"
Upcoming larger works:
- Make spell checking work with recent .dic/.aff files, e.g. French. #4916
Make Vim understand the format somehow? Search for "spell" below.
@@ -67,37 +47,84 @@ Upcoming larger works:
- Other mechanism than group and cluster to nest syntax items, to be used
for grammars.
- Possibly keeping the parsed syntax tree and incremental updates.
- tree-sitter doesn't handle incorrect syntax (while typing) properly.
- Make clear how it relates to LSP.
- example plugin: https://github.com/uga-rosa/dps-vsctm.vim
- Better support for detecting terminal emulator behavior (esp. special key
handling) and taking away the need for users to tweak their config.
> In the table of names pointing to the list of entries, with an additional
one. So that "xterm-kitty" can first load "xterm" and then add "kitty"
entries.
> Add an "expectKittyEsc" flag (Esc is always sent as a sequence, not one
character) and always wait after an Esc for more to come, don't leave
Insert mode.
-> Request code for Esc after outputting t_KI, use "k!" value.
Use response to set "expectKittyEsc".
-> Add ESC[>1uESC[?u to t_KI, parse flag response.
-> May also send t_RV and delay starting a shell command until the
response has been seen, to make sure the other responses don't get read
by a shell command.
> Can we use the req_more_codes_from_term() mechanism with more terminals?
Should we repeat it after executing a shell command?
Can also add this to the 'keyprotocol' option: "mok2+tcap"
Further Vim9 improvements, possibly after launch:
- Use Vim9 for more runtime files.
- implement :class and :interface: See |vim9-classes| #11544
inheritance: how about super()?
inheritance: new() method from parent used in child?
import/export of a class
type() should return different type for each class?
give error for shadowing (variable and argument) when defining a class or
interface, not later when compiling it.
object empty(), len() - can class define a method to be used for them?
how about lock/unlock?
When checking "implements" also check types of members and function args.
- implement :type
- implement :enum
- implement :class and :interface: See |vim9-classes| #11544
- Use Vim9 for more runtime files.
- Inline call to map() and filter(), better type checking.
- When evaluating constants for script variables, some functions could work:
has(featureName), len(someString)
- Implement as part of an expression: ++expr, --expr, expr++, expr--.
Information missing in terminfo:
Priority:
- t_RV request terminal version string; xterm: "\033[>c"
change in terminfo for "RV" uses the wrong escape sequence... ?
Mouse support:
on/off: hard coded in mch_setmouse() - use "XM" terminfo/termcap entry;
If it starts with "\E[?1006;1000%" then set 'ttymouse' to "sgr".
Codes used for focus gained and lost (currently using use_xterm_like_mouse())
termcodes are hard-coded in set_termname(), not named.
- t_fe enable focus-event tracking
- t_fd disable focus-event tracking
Underline and similar:
- t_AU - Set underline color: like "AF" and "AB" entries.
- t_Ce undercurl and underline end
- t_Cs undercurl (curly underline) mode
- t_Us double underline mode
- t_ds dotted underline mode
- t_Ds dashed underline mode
- t_Te strikethrough end
- t_Ts strikethrough mode
Cursor codes: |termcap-cursor-shape|
- t_RC request terminal cursor blinking
- t_RS request terminal cursor style
- t_VS cursor normally visible (no blink)
- t_SI start insert mode (bar cursor shape)
- t_SR start replace mode (underline cursor shape)
- t_EI end insert or replace mode (block cursor shape)
- t_SC set cursor color start
- t_EC set cursor color end
- t_SH set cursor shape
State requests:
- t_RF request terminal foreground color
- t_RB request terminal background color
Less important (not needed for regular editing):
- t_IS set icon text start
- t_IE set icon text end
- t_ST save window title to stack
- t_RT restore window title from stack
- t_Si save icon text to stack
- t_Ri restore icon text from stack
- t_WP set window position (Y, X) in pixels
- t_GP get window position (Y, X) in pixels
- t_WS set window size (height, width in cells)
Vim internal, but there should be a terminfo entry for these:
- t_8f set foreground color (R, G, B) in printf() format
- t_8b set background color (R, G, B) in printf() format
- t_8u set underline color (R, G, B) in printf() format
Probably Vim internal, not in terminfo:
- t_TE end of "raw" mode
- t_TI put terminal into "raw" mode
- t_RK request terminal keyboard protocol state; sent after |t_TI|
Already working, not properly documented:
- t_u7 request cursor position
Popup windows:
- Add a function to redraw a specific popup window. Esp. to be used when
editing the command line, when screen updating doesn't happen. (Shougo)
@@ -205,6 +232,8 @@ Terminal emulator window:
- When 'encoding' is not utf-8, or the job is using another encoding, setup
conversions.
Patch adds showcmd() function #11708
Crash when a variable is removed while listing variables (Issue #11435)
Autoconf: must use autoconf 2.69, later version generates lots of warnings
@@ -222,9 +251,6 @@ Add BufDeletePost. #11041
Add winid arg to col() and charcol() #11466 (request #11461)
Make the default for 'ttyfast' on, checking $TERM names doesn't make much
sense right now, most terminals are fast. #11549
Can we make 'noendofline' and 'endoffile' visible? Should show by default,
since it's an unusual situation.
- Show 'noendofline' when it would be used for writing ('fileformat' "dos")
@@ -241,6 +267,17 @@ entered. (#11151)
Add 'keywordprg' to various ftplugin files:
https://github.com/vim/vim/pull/5566
PR #11579 to add visualtext(), return Visually selected text.
Stray characters in the shell #11719, caused by requesting a response for:
- XT key sequences
- Whether modifyOtherKeys is active
- Whether kitty keyboard protocol is active
Can we not request XT key sequences, or reduce them drastically?
Issue #10512: Dynamic loading broken with Perl 5.36
Damien has a patch (2022 Dec 4)
Add some kind of ":whathappend" command and functions to make visible what the
last few typed keys and executed commands are. To be used when the user
wonders what went wrong.
@@ -257,15 +294,27 @@ Is there a way to make 'autowriteall' make a clean exit when the xterm is
closed? (Dennis Nazic says files are preserved, okt 28). Perhaps handle TERM
like HUP?
Improvement in terminal configuration mess: Request the terminfo entry from
the terminal itself. The $TERM value then is only relevant for whether this
feature is supported or not. Replaces the xterm mechanism to request each
entry separately. #6609
Multiplexers (screen, tmux) can request it to the underlying terminal, and
pass it on with modifications.
How to get all the text quickly (also over ssh)? Can we use a side channel?
Horizontal mouse scroll only works when compiled with GUI? #11374
Better terminal emulator support:
> Somehow request the terminfo entry from the terminal itself. The $TERM
value then is only relevant for whether this feature is supported or not.
Replaces the xterm mechanism to request each entry separately. #6609
Multiplexers (screen, tmux) can request it to the underlying terminal, and
pass it on with modifications.
How to get all the text quickly (also over ssh)? Can we use a side channel?
> When xterm supports sending an Escape sequence for the Esc key, should
have a way to request this state. That could be an XTGETTCAP entry, e.g.
"k!". Add "esc_sends_sequence" flag.
If we know this state, then do not pretend going out of Insert mode in
vgetorpeek(), where kitty_protocol_state is checked.
> If a response ends up in a shell command, one way to avoid this is by
sending t_RV last and delay starting a shell command until the response
has been seen.
> Can we use the req_more_codes_from_term() mechanism with more terminals?
Should we repeat it after executing a shell command?
Can also add this to the 'keyprotocol' option: "mok2+tcap"
> In the table of terminal names pointing to the list of termcap entries,
add an optional additional one. So that "xterm-kitty" can first load
"xterm" and then add "kitty" entries.
Using "A" and "o" in manually created fold (in empty buffer) does not behave
consistenly (James McCoy, #10698)
@@ -276,8 +325,6 @@ overwritten. Could use ":echowin" and call redraw_cmd() in get_user_input().
Syntax include problem: #11277. Related to Patch 8.2.2761
Add str2blob() and blob2str() ? #4049
To avoid flicker: add an option that when a screen clear is requested, instead
of clearing it draws everything and uses "clear to end of line" for every line.
Resetting 't_ut' already causes this?
@@ -299,6 +346,15 @@ Idea: when typing ":e /some/dir/" and "dir" does not exist, highlight in red.
initialization to figure out the default value from 'shell'. Add a test for
this.
Support translations for plugins: #11637
- Need a tool like xgettext for Vim script, generates a .pot file.
Need the equivalent of _() and N_(), perhaps TR() and TRN().
- Instructions for how to create .po files and translate.
- Script or Makefile to generate .mo files.
- Instructions and perhaps a script to install the .mo files in the right
place.
- Add variant of gettext() that takes a package name.
With concealed text mouse click doesn't put the cursor in the right position.
(Herb Sitz) Fix by Christian Brabandt, 2011 Jun 16. Doesn't work properly,
need to make the change in where RET_WIN_BUF_CHARTABSIZE() is called.
@@ -433,6 +489,10 @@ work.
Using "au!" after "filetype on" is a bit slow. Can the matching of
autocommands be made faster? (#7056)
Using a search pattern containing "\%V" and 'hlsearch' set keeps old matches
when the Visual area changes. #11694. Do a redraw when starting a Visual
selection?
Append in Visual block mode inserts the wrong character.
Test_visual_block_mode() already has the proper check, which is commented out.
(#8288)
@@ -2668,13 +2728,6 @@ Awaiting updated patches:
- Add possibility to highlight specific columns (for Fortran). Or put a
line in between columns (e.g., for 'textwidth').
Patch to add 'hlcolumn' from Vit Stradal, 2004 May 20.
8 Add functions:
gettext() Translate a message. (Patch from Yasuhiro Matsumoto)
Update 2004 Sep 10
Another patch from Edward L. Fox (2005 Nov 24)
Search in 'runtimepath'?
More docs needed about how to use this.
How to get the messages into the .po files?
confirm() add "flags" argument, with 'v' for vertical
layout and 'c' for console dialog. (Haegg)
Flemming Madsen has a patch for the 'c' flag

View File

@@ -1,4 +1,4 @@
*userfunc.txt* For Vim version 9.0. Last change: 2022 Nov 17
*userfunc.txt* For Vim version 9.0. Last change: 2023 Jan 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -187,12 +187,21 @@ See |:verbose-cmd| for more information.
If "[expr]" is not given, the number 0 is returned.
When a function ends without an explicit ":return",
the number 0 is returned.
In a :def function *E1095* is given if unreachable
code follows after the `:return`.
In legacy script there is no check for unreachable
lines, thus there is no warning if commands follow
`:return`.
`:return`. Also, there is no check if the following
line contains a valid command. Forgetting the line
continuation backslash may go unnoticed: >
return 'some text'
.. ' some more text'
< Will happily return "some text" without an error. It
should have been: >
return 'some text'
\ .. ' some more text'
<
If the ":return" is used after a |:try| but before the
matching |:finally| (if present), the commands
following the ":finally" up to the matching |:endtry|

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 9.0. Last change: 2022 Nov 22
*usr_41.txt* For Vim version 9.0. Last change: 2022 Dec 20
VIM USER MANUAL - by Bram Moolenaar
@@ -757,6 +757,7 @@ String manipulation: *string-functions*
strwidth() size of string when displayed
strdisplaywidth() size of string when displayed, deals with tabs
setcellwidths() set character cell width overrides
getcellwidths() get character cell width overrides
substitute() substitute a pattern match with a string
submatch() get a specific match in ":s" and substitute()
strpart() get part of a string using byte index
@@ -1031,6 +1032,7 @@ Buffers, windows and the argument list:
getwininfo() get a list with window information
getchangelist() get a list of change list entries
getjumplist() get a list of jump list entries
swapfilelist() list of existing swap files in 'directory'
swapinfo() information about a swap file
swapname() get the swap file path of a buffer
@@ -1185,6 +1187,7 @@ Testing: *test-functions*
test_getvalue() get value of an internal variable
test_gui_event() generate a GUI event for testing
test_ignore_error() ignore a specific error message
test_mswin_event() generate an MS-Windows event
test_null_blob() return a null Blob
test_null_channel() return a null Channel
test_null_dict() return a null Dict

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 9.0. Last change: 2022 Nov 04
*various.txt* For Vim version 9.0. Last change: 2022 Dec 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -496,7 +496,7 @@ T *+visualextra* extra Visual mode commands |blockwise-operators|
T *+vreplace* |gR| and |gr|
*+vtp* on MS-Windows console: support for 'termguicolors'
T *+wildignore* |'wildignore'| Always enabled since 9.0.0278
T *+wildmenu* |'wildmenu'|| Always enabled since 9.0.0279
T *+wildmenu* |'wildmenu'| Always enabled since 9.0.0279
T *+windows* more than one window; Always enabled since 8.0.1118.
m *+writebackup* |'writebackup'| is default on
m *+xim* X input method |xim|

View File

@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 9.0. Last change: 2022 Nov 14
*vim9.txt* For Vim version 9.0. Last change: 2022 Dec 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -16,7 +16,7 @@ features in Vim9 script.
3. New style functions |fast-functions|
4. Types |vim9-types|
5. Namespace, Import and Export |vim9script|
6. Future work: classes |vim9-classes|
6. Classes and interfaces |vim9-classes|
9. Rationale |vim9-rationale|
@@ -1023,7 +1023,9 @@ always converted to string: >
Simple types are Number, Float, Special and Bool. For other types |string()|
should be used.
*false* *true* *null* *E1034*
*false* *true* *null* *null_blob* *null_channel*
*null_dict* *null_function* *null_job* *null_list*
*null_partial* *null_string* *E1034*
In Vim9 script one can use the following predefined values: >
true
false
@@ -1940,73 +1942,17 @@ Or: >
==============================================================================
6. Future work: classes *vim9-classes*
6. Classes and interfaces *vim9-classes*
Above "class" was mentioned a few times, but it has not been implemented yet.
Most of Vim9 script can be created without this functionality, and since
implementing classes is going to be a lot of work, it is left for the future.
For now we'll just make sure classes can be added later.
In legacy script a Dictionary could be used as a kind-of object, by adding
members that are functions. However, this is quite inefficient and requires
the writer to do the work of making sure all the objects have the right
members. See |Dictionary-function|.
Thoughts:
- `class` / `endclass`, the whole class must be in one file
- Class names are always CamelCase (to avoid a name clash with builtin types)
- A single constructor called "constructor" (similar to TypeScript)
- Single inheritance: `class ThisClass extends BaseClass`
- `interface` / `endinterface` (looks like a class without any implementation)
- Explicit declaration that the class supports an interface, so that type
checking works properly:
`class SomeClass implements SomeInterface, OtherInterface`
- `abstract class` (class with incomplete implementation) - not really needed?
- Class (static) methods and Object methods: syntax to be defined.
- Class (static) members and Object members: syntax to be defined.
- Access control: private / protected / shared / public ? Keep it simple.
- Access object members with `this.member` ?
- Generics for class: `class <Tkey, Tentry>`
- Generics for function: `def <Tkey> GetLast(key: Tkey)`
- Method overloading (two methods with the same name but different argument
types): Most likely not
- Mixins: not sure if that is useful, leave out for simplicity.
In |Vim9| script you can have classes, objects and interfaces like in most
popular object-oriented programming languages. Since this is a lot of
functionality it is located in a separate help file: |vim9class.txt|.
Again, much of this is from TypeScript with a slightly different syntax.
Some things that look like good additions:
- Use a class as an interface (like Dart)
- Extend a class with methods, using an import (like Dart)
- Mixins
- For testing: Mock mechanism
An important class that will be provided is "Promise". Since Vim is single
threaded, connecting asynchronous operations is a natural way of allowing
plugins to do their work without blocking the user. It's a uniform way to
invoke callbacks and handle timeouts and errors.
Some commands have already been reserved:
*:class*
*:endclass*
*:abstract*
*:enum*
*:endenum*
*:interface*
*:endinterface*
*:static*
*:type*
Some examples: >
abstract class Person
static const prefix = 'xxx'
var name: string
def constructor(name: string)
this.name = name
enddef
def display(): void
echo name
enddef
abstract def find(string): Person
endclass
==============================================================================
@@ -2293,18 +2239,5 @@ tool need to be supported. Since most languages support classes the lack of
support for classes in Vim is then a problem.
Classes ~
Vim supports a kind-of object oriented programming by adding methods to a
dictionary. With some care this can be made to work, but it does not look
like real classes. On top of that, it's quite slow, because of the use of
dictionaries.
It would be good to support real classes, and this is planned for a later
version. The support is a "minimal common functionality" of class support in
most languages. It will work much like Java, which is the most popular
programming language.
vim:tw=78:ts=8:noet:ft=help:norl:

822
runtime/doc/vim9class.txt Normal file
View File

@@ -0,0 +1,822 @@
*vim9class.txt* For Vim version 9.0. Last change: 2023 Jan 09
VIM REFERENCE MANUAL by Bram Moolenaar
NOTE - This is under development, anything can still change! - NOTE
Vim9 classes, objects, interfaces, types and enums.
1. Overview |Vim9-class-overview|
2. A simple class |Vim9-simple-class|
3. Using an abstract class |Vim9-abstract-class|
4. Using an interface |Vim9-using-interface|
5. More class details |Vim9-class|
6. Type definition |Vim9-type|
7. Enum |Vim9-enum|
9. Rationale
10. To be done later
==============================================================================
1. Overview *Vim9-class-overview*
The fancy term is "object-oriented programming". You can find lots of study
material about this subject. Here we document what |Vim9| script provides,
assuming you know the basics already. Added are helpful hints about how
to use this functionality effectively.
The basic item is an object:
- An object stores state. It contains one or more variables that can each
have a value.
- An object usually provides functions that manipulate its state. These
functions are invoked "on the object", which is what sets it apart from the
traditional separation of data and code that manipulates the data.
- An object has a well defined interface, with typed member variables and
member functions.
- Objects are created by a class and all objects have the same interface.
This never changes, it is not dynamic.
An object can only be created by a class. A class provides:
- A new() method, the constructor, which returns an object for the class.
This method is invoked on the class name: MyClass.new().
- State shared by all objects of the class: class variables and constants.
- A hierarchy of classes, with super-classes and sub-classes, inheritance.
An interface is used to specify properties of an object:
- An object can declare several interfaces that it implements.
- Different objects implementing the same interface can be used the same way.
The class hierarchy allows for single inheritance. Otherwise interfaces are
to be used where needed.
Class modeling ~
You can model classes any way you like. Keep in mind what you are building,
don't try to model the real world. This can be confusing, especially because
teachers use real-world objects to explain class relations and you might think
your model should therefore reflect the real world. It doesn't! The model
should match your purpose.
You will soon find that composition is often better than inheritance. Don't
waste time trying to find the optimal class model. Or waste time discussing
whether a square is a rectangle or that a rectangle is a square. It doesn't
matter.
==============================================================================
2. A simple class *Vim9-simple-class*
Let's start with a simple example: a class that stores a text position: >
class TextPosition
this.lnum: number
this.col: number
def new(lnum: number, col: number)
this.lnum = lnum
this.col = col
enddef
def SetLnum(lnum: number)
this.lnum = lnum
enddef
def SetCol(col: number)
this.col = col
enddef
def SetPosition(lnum: number, col: number)
this.lnum = lnum
this.col = col
enddef
endclass
< *object* *Object*
You can create an object from this class with the new() method: >
var pos = TextPosition.new(1, 1)
The object members "lnum" and "col" can be accessed directly: >
echo $'The text position is ({pos.lnum}, {pos.col})'
< *E1317* *E1327*
If you have been using other object-oriented languages you will notice that
in Vim the object members are consistently referred to with the "this."
prefix. This is different from languages like Java and TypeScript. This
naming convention makes the object members easy to spot. Also, when a
variable does not have the "this." prefix you know it is not an object member.
Member write access ~
Now try to change an object member directly: >
pos.lnum = 9
< *E1335*
This will give you an error! That is because by default object members can be
read but not set. That's why the class provides a method for it: >
pos.SetLnum(9)
Allowing to read but not set an object member is the most common and safest
way. Most often there is no problem using a value, while setting a value may
have side effects that need to be taken care of. In this case, the SetLnum()
method could check if the line number is valid and either give an error or use
the closest valid value.
*:public* *E1331*
If you don't care about side effects and want to allow the object member to be
changed at any time, you can make it public: >
public this.lnum: number
public this.col number
Now you don't need the SetLnum(), SetCol() and SetPosition() methods, setting
"pos.lnum" directly above will no longer give an error.
*E1334*
If you try to set an object member that doesn't exist you get an error: >
pos.other = 9
< E1334: Object member not found: other ~
Private members ~
*E1332* *E1333*
On the other hand, if you do not want the object members to be read directly,
you can make them private. This is done by prefixing an underscore to the
name: >
this._lnum: number
this._col number
Now you need to provide methods to get the value of the private members.
These are commonly call getters. We recommend using a name that starts with
"Get": >
def GetLnum(): number
return this._lnum
enddef
def GetCol() number
return this._col
enddef
This example isn't very useful, the members might as well have been public.
It does become useful if you check the value. For example, restrict the line
number to the total number of lines: >
def GetLnum(): number
if this._lnum > this._lineCount
return this._lineCount
endif
return this._lnum
enddef
Simplifying the new() method ~
Many constructors take values for the object members. Thus you very often see
this pattern: >
this.lnum: number
this.col: number
def new(lnum: number, col: number)
this.lnum = lnum
this.col = col
enddef
Not only is this text you need to write, it also has the type of each member
twice. Since this is so common a shorter way to write new() is provided: >
def new(this.lnum, this.col)
enddef
The semantics are easy to understand: Providing the object member name,
including "this.", as the argument to new() means the value provided in the
new() call is assigned to that object member. This mechanism is coming from
the Dart language.
The sequence of constructing a new object is:
1. Memory is allocated and cleared. All values are zero/false/empty.
2. For each declared member that has an initializer, the expression is
evaluated and assigned to the member. This happens in the sequence the
members are declared in the class.
3. Arguments in the new() method in the "this.name" form are assigned.
4. The body of the new() method is executed.
TODO: for a sub-class the constructor of the parent class will be invoked
somewhere.
==============================================================================
3. Using an abstract class *Vim9-abstract-class*
An abstract class forms the base for at least one sub-class. In the class
model one often finds that a few classes have the same properties that can be
shared, but a class with those properties does not have enough state to create
an object from. A sub-class must extend the abstract class and add the
missing state and/or methods before it can be used to create objects for.
An abstract class does not have a new() method.
For example, a Shape class could store a color and thickness. You cannot
create a Shape object, it is missing the information about what kind of shape
it is. The Shape class functions as the base for a Square and a Triangle
class, for which objects can be created. Example: >
abstract class Shape
this.color = Color.Black
this.thickness = 10
endclass
class Square extends Shape
this.size: number
def new(this.size)
enddef
endclass
class Triangle extends Shape
this.base: number
this.height: number
def new(this.base, this.height)
enddef
endclass
<
*class-member* *:static* *E1337* *E1338*
Class members are declared with "static". They are used by the name without a
prefix: >
class OtherThing
this.size: number
static totalSize: number
def new(this.size)
totalSize += this.size
enddef
endclass
< *E1340* *E1341*
Since the name is used as-is, shadowing the name by a function argument name
or variable name is not allowed.
Just like object members the access can be made private by using an underscore
as the first character in the name, and it can be made public by prefixing
"public": >
class OtherThing
static total: number # anybody can read, only class can write
static _sum: number # only class can read and write
public static result: number # anybody can read and write
endclass
<
*class-function*
Class functions are also declared with "static". They have no access to
object members, they cannot use the "this" keyword. >
class OtherThing
this.size: number
static totalSize: number
" Clear the total size and return the value it had before.
static def ClearTotalSize(): number
var prev = totalSize
totalSize = 0
return prev
enddef
endclass
==============================================================================
4. Using an interface *Vim9-using-interface*
The example above with Shape, Square and Triangle can be made more useful if
we add a method to compute the surface of the object. For that we create the
interface called HasSurface, which specifies one method Surface() that returns
a number. This example extends the one above: >
abstract class Shape
this.color = Color.Black
this.thickness = 10
endclass
interface HasSurface
def Surface(): number
endinterface
class Square extends Shape implements HasSurface
this.size: number
def new(this.size)
enddef
def Surface(): number
return this.size * this.size
enddef
endclass
class Triangle extends Shape implements HasSurface
this.base: number
this.height: number
def new(this.base, this.height)
enddef
def Surface(): number
return this.base * this.height / 2
enddef
endclass
If a class declares to implement an interface, all the items specified in the
interface must appear in the class, with the same types. *E1348* *E1349*
The interface name can be used as a type: >
var shapes: list<HasSurface> = [
Square.new(12),
Triangle.new(8, 15),
]
for shape in shapes
echo $'the surface is {shape.Surface()}'
endfor
==============================================================================
5. More class details *Vim9-class* *Class* *class*
Defining a class ~
*:class* *:endclass* *:abstract*
A class is defined between `:class` and `:endclass`. The whole class is
defined in one script file. It is not possible to add to a class later.
A class can only be defined in a |Vim9| script file. *E1316*
A class cannot be defined inside a function.
It is possible to define more than one class in a script file. Although it
usually is better to export only one main class. It can be useful to define
types, enums and helper classes though.
The `:abstract` keyword may be prefixed and `:export` may be used. That gives
these variants: >
class ClassName
endclass
export class ClassName
endclass
abstract class ClassName
endclass
export abstract class ClassName
endclass
<
*E1314*
The class name should be CamelCased. It must start with an uppercase letter.
That avoids clashing with builtin types.
*E1315*
After the class name these optional items can be used. Each can appear only
once. They can appear in any order, although this order is recommended: >
extends ClassName
implements InterfaceName, OtherInterface
specifies SomeInterface
< *extends*
A class can extend one other class. *E1352* *E1353* *E1354*
*implements* *E1346* *E1347*
A class can implement one or more interfaces. The "implements" keyword can
only appear once *E1350* . Multiple interfaces can be specified, separated by
commas. Each interface name can appear only once. *E1351*
*specifies*
A class can declare its interface, the object members and methods, with a
named interface. This avoids the need for separately specifying the
interface, which is often done in many languages, especially Java.
Items in a class ~
*E1318* *E1325* *E1326*
Inside a class, in betweeen `:class` and `:endclass`, these items can appear:
- An object member declaration: >
this._memberName: memberType
this.memberName: memberType
public this.memberName: memberType
- A constructor method: >
def new(arguments)
def newName(arguments)
- An object method: >
def SomeMethod(arguments)
< *E1329*
For the object member the type must be specified. The best way is to do this
explicitly with ": {type}". For simple types you can also use an initializer,
such as "= 123", and Vim will see that the type is a number. Avoid doing this
for more complex types and when the type will be incomplete. For example: >
this.nameList = []
This specifies a list, but the item type is unknown. Better use: >
this.nameList: list<string>
The initialization isn't needed, the list is empty by default.
*E1330*
Some types cannot be used, such as "void", "null" and "v:none".
Defining an interface ~
*:interface* *:endinterface*
An interface is defined between `:interface` and `:endinterface`. It may be
prefixed with `:export`: >
interface InterfaceName
endinterface
export interface InterfaceName
endinterface
< *E1344*
An interface can declare object members, just like in a class but without any
initializer.
*E1345*
An interface can declare methods with `:def`, including the arguments and
return type, but without the body and without `:enddef`. Example: >
interface HasSurface
this.size: number
def Surface(): number
endinterface
An interface name must start with an uppercase letter. *E1343*
The "Has" prefix can be used to make it easier to guess this is an interface
name, with a hint about what it provides.
An interface can only be defined in a |Vim9| script file. *E1342*
Default constructor ~
In case you define a class without a new() method, one will be automatically
defined. This default constructor will have arguments for all the object
members, in the order they were specified. Thus if your class looks like: >
class AutoNew
this.name: string
this.age: number
this.gender: Gender
endclass
Then The default constructor will be: >
def new(this.name = v:none, this.age = v:none, this.gender = v:none)
enddef
The "= v:none" default values make the arguments optional. Thus you can also
call `new()` without any arguments. No assignment will happen and the default
value for the object members will be used. This is a more useful example,
with default values: >
class TextPosition
this.lnum: number = 1
this.col: number = 1
endclass
If you want the constructor to have mandatory arguments, you need to write it
yourself. For example, if for the AutoNew class above you insist on getting
the name, you can define the constructor like this: >
def new(this.name, this.age = v:none, this.gender = v:none)
enddef
< *E1328*
Note that you cannot use another default value than "v:none" here. If you
want to initialize the object members, do it where they are declared. This
way you only need to look in one place for the default values.
All object members will be used in the default constructor, also private
access ones.
If the class extends another one, the object members of that class will come
first.
Multiple constructors ~
Normally a class has just one new() constructor. In case you find that the
constructor is often called with the same arguments you may want to simplify
your code by putting those arguments into a second constructor method. For
example, if you tend to use the color black a lot: >
def new(this.garment, this.color, this.size)
enddef
...
var pants = new(Garment.pants, Color.black, "XL")
var shirt = new(Garment.shirt, Color.black, "XL")
var shoes = new(Garment.shoes, Color.black, "45")
Instead of repeating the color every time you can add a constructor that
includes it: >
def newBlack(this.garment, this.size)
this.color = Color.black
enddef
...
var pants = newBlack(Garment.pants, "XL")
var shirt = newBlack(Garment.shirt, "XL")
var shoes = newBlack(Garment.shoes, "9.5")
Note that the method name must start with "new". If there is no method called
"new()" then the default constructor is added, even though there are other
constructor methods.
==============================================================================
6. Type definition *Vim9-type* *:type*
A type definition is giving a name to a type specification. For Example: >
:type ListOfStrings list<string>
TODO: more explanation
==============================================================================
7. Enum *Vim9-enum* *:enum* *:endenum*
An enum is a type that can have one of a list of values. Example: >
:enum Color
White
Red
Green
Blue
Black
:endenum
TODO: more explanation
==============================================================================
9. Rationale
Most of the choices for |Vim9| classes come from popular and recently
developed languages, such as Java, TypeScript and Dart. The syntax has been
made to fit with the way Vim script works, such as using `endclass` instead of
using curly braces around the whole class.
Some common constructs of object-oriented languages were chosen very long ago
when this kind of programming was still new, and later found to be
sub-optimal. By this time those constructs were widely used and changing them
was not an option. In Vim we do have the freedom to make different choices,
since classes are completely new. We can make the syntax simpler and more
consistent than what "old" languages use. Without diverting too much, it
should still mostly look like what you know from existing languages.
Some recently developed languages add all kinds of fancy features that we
don't need for Vim. But some have nice ideas that we do want to use.
Thus we end up with a base of what is common in popular languages, dropping
what looks like a bad idea, and adding some nice features that are easy to
understand.
The main rules we use to make decisions:
- Keep it simple.
- No surprises, mostly do what other languages are doing.
- Avoid mistakes from the past.
- Avoid the need for the script writer to consult the help to understand how
things work, most things should be obvious.
- Keep it consistent.
- Aim at an average size plugin, not at a huge project.
Using new() for the constructor ~
Many languages use the class name for the constructor method. A disadvantage
is that quite often this is a long name. And when changing the class name all
constructor methods need to be renamed. Not a big deal, but still a
disadvantage.
Other languages, such as TypeScript, use a specific name, such as
"constructor()". That seems better. However, using "new" or "new()" to
create a new object has no obvious relation with "constructor()".
For |Vim9| script using the same method name for all constructors seemed like
the right choice, and by calling it new() the relation between the caller and
the method being called is obvious.
No overloading of the constructor ~
In Vim script, both legacy and |Vim9| script, there is no overloading of
functions. That means it is not possible to use the same function name with
different types of arguments. Therefore there also is only one new()
constructor.
With |Vim9| script it would be possible to support overloading, since
arguments are typed. However, this gets complicated very quickly. Looking at
a new() call one has to inspect the types of the arguments to know which of
several new() methods is actually being called. And that can require
inspecting quite a bit of code. For example, if one of the arguments is the
return value of a method, you need to find that method to see what type it is
returning.
Instead, every constructor has to have a different name, starting with "new".
That way multiple constructors with different arguments are possible, while it
is very easy to see which constructor is being used. And the type of
arguments can be properly checked.
No overloading of methods ~
Same reasoning as for the constructor: It is often not obvious what type
arguments have, which would make it difficult to figure out what method is
actually being called. Better just give the methods a different name, then
type checking will make sure it works as you intended. This rules out
polymorphism, which we don't really need anyway.
Single inheritance and interfaces ~
Some languages support multiple inheritance. Although that can be useful in
some cases, it makes the rules of how a class works quite complicated.
Instead, using interfaces to declare what is supported is much simpler. The
very popular Java language does it this way, and it should be good enough for
Vim. The "keep it simple" rule applies here.
Explicitly declaring that a class supports an interface makes it easy to see
what a class is intended for. It also makes it possible to do proper type
checking. When an interface is changed any class that declares to implement
it will be checked if that change was also changed. The mechanism to assume a
class implements an interface just because the methods happen to match is
brittle and leads to obscure problems, let's not do that.
Using "this.member" everywhere ~
The object members in various programming languages can often be accessed in
different ways, depending on the location. Sometimes "this." has to be
prepended to avoid ambiguity. They are usually declared without "this.".
That is quite inconsistent and sometimes confusing.
A very common issue is that in the constructor the arguments use the same name
as the object member. Then for these members "this." needs to be prefixed in
the body, while for other members this is not needed and often omitted. This
leads to a mix of members with and without "this.", which is inconsistent.
For |Vim9| classes the "this." prefix is always used. Also for declaring the
members. Simple and consistent. When looking at the code inside a class it's
also directly clear which variable references are object members and which
aren't.
Using class members ~
Using "static member" to declare a class member is very common, nothing new
here. In |Vim9| script these can be accessed directly by their name. Very
much like how a script-local variable can be used in a function. Since object
members are always accessed with "this." prepended, it's also quickly clear
what kind of member it is.
TypeScript prepends the class name before the class member, also inside the
class. This has two problems: The class name can be rather long, taking up
quite a bit of space, and when the class is renamed all these places need to
be changed too.
Declaring object and class members ~
The main choice is whether to use "var" as with variable declarations.
TypeScript does not use it: >
class Point {
x: number;
y = 0;
}
Following that Vim object members could be declared like this: >
class Point
this.x: number
this.y = 0
endclass
Some users pointed out that this looks more like an assignment than a
declaration. Adding "var" changes that: >
class Point
var this.x: number
var this.y = 0
endclass
We also need to be able to declare class members using the "static" keyword.
There we can also choose to leave out "var": >
class Point
var this.x: number
static count = 0
endclass
Or do use it, before "static": >
class Point
var this.x: number
var static count = 0
endclass
Or after "static": >
class Point
var this.x: number
static var count = 0
endclass
This is more in line with "static def Func()".
There is no clear preference whether to use "var" or not. The two main
reasons to leave it out are:
1. TypeScript, Java and other popular languages do not use it.
2. Less clutter.
Using "ClassName.new()" to construct an object ~
Many languages use the "new" operator to create an object, which is actually
kind of strange, since the constructor is defined as a method with arguments,
not a command. TypeScript also has the "new" keyword, but the method is
called "constructor()", it is hard to see the relation between the two.
In |Vim9| script the constructor method is called new(), and it is invoked as
new(), simple and straightforward. Other languages use "new ClassName()",
while there is no ClassName() method, it's a method by another name in the
class called ClassName. Quite confusing.
Default read access to object members ~
Some users will remark that the access rules for object members are
asymmetric. Well, that is intentional. Changing a value is a very different
action than reading a value. The read operation has no side effects, it can
be done any number of times without affecting the object. Changing the value
can have many side effects, and even have a ripple effect, affecting other
objects.
When adding object members one usually doesn't think much about this, just get
the type right. And normally the values are set in the new() method.
Therefore defaulting to read access only "just works" in most cases. And when
directly writing you get an error, which makes you wonder if you actually want
to allow that. This helps writing code with fewer mistakes.
Making object members private with an underscore ~
When an object member is private, it can only be read and changed inside the
class (and in sub-classes), then it cannot be used outside of the class.
Prepending an underscore is a simple way to make that visible. Various
programming languages have this as a recommendation.
In case you change your mind and want to make the object member accessible
outside of the class, you will have to remove the underscore everywhere.
Since the name only appears in the class (and sub-classes) they will be easy
to find and change.
The other way around is much harder: you can easily prepend an underscore to
the object member inside the class to make it private, but any usage elsewhere
you will have to track down and change. You may have to make it a "set"
method call. This reflects the real world problem that taking away access
requires work to be done for all places where that access exists.
An alternative would have been using the "private" keyword, just like "public"
changes the access in the other direction. Well, that's just to reduce the
number of keywords.
No protected object members ~
Some languages provide several ways to control access to object members. The
most known is "protected", and the meaning varies from language to language.
Others are "shared", "private" and even "friend".
These rules make life more difficult. That can be justified in projects where
many people work on the same, complex code where it is easy to make mistakes.
Especially when refactoring or other changes to the class model.
The Vim scripts are expected to be used in a plugin, with just one person or a
small team working on it. Complex rules then only make it more complicated,
the extra safety provide by the rules isn't really needed. Let's just keep it
simple and not specify access details.
==============================================================================
10. To be done later
Can a newSomething() constructor invoke another constructor? If yes, what are
the restrictions?
Thoughts:
- Generics for a class: `class <Tkey, Tentry>`
- Generics for a function: `def <Tkey> GetLast(key: Tkey)`
- Mixins: not sure if that is useful, leave out for simplicity.
Some things that look like good additions:
- For testing: Mock mechanism
An important class to be provided is "Promise". Since Vim is single
threaded, connecting asynchronous operations is a natural way of allowing
plugins to do their work without blocking the user. It's a uniform way to
invoke callbacks and handle timeouts and errors.
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*visual.txt* For Vim version 9.0. Last change: 2022 Jun 18
*visual.txt* For Vim version 9.0. Last change: 2022 Dec 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -152,6 +152,11 @@ gN Like |gn| but searches backward, like with `N`.
environment variable or the -display argument). Only
when 'mouse' option contains 'n' or 'a'.
<LeftMouseNM> Internal mouse code, used for clicking on the status
<LeftReleaseNM> line to focus a window. NM stands for non-mappable.
You cannot use these, but they might show up in some
places.
If Visual mode is not active and the "v", "V" or CTRL-V is preceded with a
count, the size of the previously highlighted area is used for a start. You
can then move the end of the highlighted area and give an operator. The type

View File

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 9.0. Last change: 2022 Nov 22
*windows.txt* For Vim version 9.0. Last change: 2022 Nov 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -639,6 +639,8 @@ autocommand event can be used.
If you want to get notified of text in windows scrolling vertically or
horizontally, the |WinScrolled| autocommand event can be used. This will also
trigger in window size changes.
Exception: the events will not be triggered when the text scrolls for
'incsearch'.
*WinResized-event*
The |WinResized| event is triggered after updating the display, several
windows may have changed size then. A list of the IDs of windows that changed
@@ -655,9 +657,9 @@ The information provided by |WinScrolled| is a dictionary for each window that
has changes, using the window ID as the key, and a total count of the changes
with the key "all". Example value for |v:event| (|Vim9| syntax):
{
all: {width: 0, height: 2, leftcol: 0, topline: 1, skipcol: 0},
1003: {width: 0, height: -1, leftcol: 0, topline: 0, skipcol: 0},
1006: {width: 0, height: 1, leftcol: 0, topline: 1, skipcol: 0},
all: {width: 0, height: 2, leftcol: 0, skipcol: 0, topline: 1, topfill: 0},
1003: {width: 0, height: -1, leftcol: 0, skipcol: 0, topline: 0, topfill: 0},
1006: {width: 0, height: 1, leftcol: 0, skipcol: 0, topline: 1, topfill: 0},
}
Note that the "all" entry has the absolute values of the individual windows

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Nov 23
" Last Change: 2022 Dec 19
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -110,9 +110,11 @@ au BufNewFile,BufRead *.a65 setf a65
" Applescript
au BufNewFile,BufRead *.scpt setf applescript
" Automake (must be before the *.am pattern)
au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am setf automake
" Applix ELF
au BufNewFile,BufRead *.am
\ if expand("<afile>") !~? 'Makefile.am\>' | setf elf | endif
au BufNewFile,BufRead *.am setf elf
" ALSA configuration
au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf setf alsaconf
@@ -187,9 +189,6 @@ au BufNewFile,BufRead *.au3 setf autoit
" Autohotkey
au BufNewFile,BufRead *.ahk setf autohotkey
" Automake
au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am setf automake
" Autotest .at files are actually m4
au BufNewFile,BufRead *.at setf m4
@@ -265,7 +264,7 @@ au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
au BufNewFile,BufRead *.bsd,*.bsdl setf bsdl
" Bazel (http://bazel.io)
autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE setf bzl
autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE,WORKSPACE.bzlmod setf bzl
if has("fname_case")
" There is another check for BUILD further below.
autocmd BufRead,BufNewFile *.BUILD,BUILD setf bzl
@@ -278,6 +277,9 @@ au BufNewFile,BufRead *.lpc,*.ulpc setf lpc
" Calendar
au BufNewFile,BufRead calendar setf calendar
" Cap'n Proto
au BufNewFile,BufRead *.capnp setf capnp
" C#
au BufNewFile,BufRead *.cs,*.csx setf cs
@@ -606,8 +608,8 @@ au BufNewFile,BufRead *.edn
\ setf clojure |
\ endif
" EditorConfig (close enough to dosini)
au BufNewFile,BufRead .editorconfig setf dosini
" EditorConfig
au BufNewFile,BufRead .editorconfig setf editorconfig
" Embedix Component Description
au BufNewFile,BufRead *.ecd setf ecd
@@ -701,6 +703,9 @@ au BufRead,BufNewFile *.fusion setf fusion
" F# or Forth
au BufNewFile,BufRead *.fs call dist#ft#FTfs()
" FHIR Shorthand (FSH)
au BufNewFile,BufRead *.fsh setf fsh
" F#
au BufNewFile,BufRead *.fsi,*.fsx setf fsharp
@@ -847,6 +852,9 @@ au BufNewFile,BufRead *.htpp setf hastepreproc
" HCL
au BufRead,BufNewFile *.hcl setf hcl
" Go checksum file (must be before *.sum Hercules)
au BufNewFile,BufRead go.sum setf gosum
" Hercules
au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules
@@ -981,6 +989,8 @@ au BufNewFile,BufRead *.jsp setf jsp
" Java Properties resource file (note: doesn't catch font.properties.pl)
au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf jproperties
" Eclipse preference files use Java Properties syntax
au BufNewFile,BufRead org.eclipse.*.prefs setf jproperties
" Jess
au BufNewFile,BufRead *.clp setf jess
@@ -991,23 +1001,27 @@ au BufNewFile,BufRead *.jgr setf jgraph
" Jovial
au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
" JSON
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
" Jq
au BufNewFile,BufRead *.jq setf jq
" JSON5
au BufNewFile,BufRead *.json5 setf json5
" JSON Patch (RFC 6902)
au BufNewFile,BufRead *.json-patch setf json
au BufNewFile,BufRead *.json-patch setf json
" Jupyter Notebook is also json
au BufNewFile,BufRead *.ipynb setf json
au BufNewFile,BufRead *.ipynb setf json
" Other files that look like json
au BufNewFile,BufRead .babelrc,.eslintrc,.prettierrc,.firebaserc setf json
au BufNewFile,BufRead .prettierrc,.firebaserc setf json
" JSONC
au BufNewFile,BufRead *.jsonc setf jsonc
" JSONC (JSON with comments)
au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc
au BufNewFile,BufRead .jshintc,.hintrc,.swrc,[jt]sconfig*.json setf jsonc
" JSON
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
" Jsonnet
au BufNewFile,BufRead *.jsonnet,*.libsonnet setf jsonnet
@@ -1489,7 +1503,7 @@ au BufNewFile,BufRead *.plp setf plp
au BufNewFile,BufRead *.po,*.pot setf po
" Postfix main config
au BufNewFile,BufRead main.cf setf pfmain
au BufNewFile,BufRead main.cf,main.cf.proto setf pfmain
" PostScript (+ font files, encapsulated PostScript, Adobe Illustrator)
au BufNewFile,BufRead *.ps,*.pfa,*.afm,*.eps,*.epsf,*.epsi,*.ai setf postscr
@@ -1853,8 +1867,9 @@ au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFile
" (patterns ending in a start further below)
au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
" Zig
" Zig and Zir (Zig Intermediate Representation)
au BufNewFile,BufRead *.zig setf zig
au BufNewFile,BufRead *.zir setf zir
" Z-Shell script (patterns ending in a star further below)
au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
@@ -1887,6 +1902,9 @@ au BufNewFile,BufRead *.il,*.ils,*.cdf setf skill
au BufNewFile,BufRead .slrnrc setf slrnrc
au BufNewFile,BufRead *.score setf slrnsc
" Smali
au BufNewFile,BufRead *.smali setf smali
" Smalltalk
au BufNewFile,BufRead *.st setf st
@@ -1915,6 +1933,9 @@ au BufNewFile,BufRead *.smi
" SMITH
au BufNewFile,BufRead *.smt,*.smith setf smith
" Smithy
au BufNewFile,BufRead *.smithy setf smithy
" Snobol4 and spitbol
au BufNewFile,BufRead *.sno,*.spt setf snobol4
@@ -2085,6 +2106,9 @@ au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
" TeX configuration
au BufNewFile,BufRead texmf.cnf setf texmf
" Thrift (Apache)
au BufNewFile,BufRead *.thrift setf thrift
" Tidy config
au BufNewFile,BufRead .tidyrc,tidyrc,tidy.conf setf tidy

View File

@@ -2,7 +2,7 @@
" Language: C#
" Maintainer: Nick Jensen <nickspoon@gmail.com>
" Former Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: 2021-12-07
" Last Change: 2022-11-16
" License: Vim (see :h license)
" Repository: https://github.com/nickspoons/vim-cs
@@ -25,8 +25,9 @@ let b:undo_ftplugin = 'setl com< fo<'
if exists('loaded_matchit') && !exists('b:match_words')
" #if/#endif support included by default
let b:match_ignorecase = 0
let b:match_words = '\%(^\s*\)\@<=#\s*region\>:\%(^\s*\)\@<=#\s*endregion\>,'
let b:undo_ftplugin .= ' | unlet! b:match_words'
let b:undo_ftplugin .= ' | unlet! b:match_ignorecase b:match_words'
endif
if (has('gui_win32') || has('gui_gtk')) && !exists('b:browsefilter')

View File

@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: readline(3) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: readline(3) configuration file
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Last Change: 2022 Dec 09
if exists("b:did_ftplugin")
finish
@@ -11,9 +12,25 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=:#
setlocal commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_ignorecase = 0
let b:match_words = '$if:$else:$endif'
let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Readline Intialization Files (inputrc .inputrc)\tinputrc;*.inputrc\n" ..
\ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet:

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Sep 20
" Last Change: 2022 Nov 27
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -99,7 +99,7 @@ if exists("loaded_matchit")
" func name
" require a parenthesis following, then there can be an "endfunc".
let b:match_words =
\ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+(:\%(\%(^\||\)\s*\)\@<=\<retu\%[rn]\>:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' .
\ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+\s*(:\%(\%(^\||\)\s*\)\@<=\<retu\%[rn]\>:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' .
\ '\<\(wh\%[ile]\|for\)\>:\%(\%(^\||\)\s*\)\@<=\<brea\%[k]\>:\%(\%(^\||\)\s*\)\@<=\<con\%[tinue]\>:\%(\%(^\||\)\s*\)\@<=\<end\(w\%[hile]\|fo\%[r]\)\>,' .
\ '\<if\>:\%(\%(^\||\)\s*\)\@<=\<el\%[seif]\>:\%(\%(^\||\)\s*\)\@<=\<en\%[dif]\>,' .
\ '{:},' .

66
runtime/ftplugin/zig.vim Normal file
View File

@@ -0,0 +1,66 @@
" Vim filetype plugin file
" Language: Zig
" Upstream: https://github.com/ziglang/zig.vim
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_orig = &cpo
set cpo&vim
compiler zig_build
" Match Zig builtin fns
setlocal iskeyword+=@-@
" Recomended code style, no tabs and 4-space indentation
setlocal expandtab
setlocal tabstop=8
setlocal softtabstop=4
setlocal shiftwidth=4
setlocal formatoptions-=t formatoptions+=croql
setlocal suffixesadd=.zig,.zir
if has('comments')
setlocal comments=:///,://!,://,:\\\\
setlocal commentstring=//\ %s
endif
if has('find_in_path')
let &l:includeexpr='substitute(v:fname, "^([^.])$", "\1.zig", "")'
let &l:include='\v(\@import>|\@cInclude>|^\s*\#\s*include)'
endif
let &l:define='\v(<fn>|<const>|<var>|^\s*\#\s*define)'
if !exists('g:zig_std_dir') && exists('*json_decode') && executable('zig')
silent let s:env = system('zig env')
if v:shell_error == 0
let g:zig_std_dir = json_decode(s:env)['std_dir']
endif
unlet! s:env
endif
if exists('g:zig_std_dir')
let &l:path = &l:path . ',' . g:zig_std_dir
endif
let b:undo_ftplugin =
\ 'setl isk< et< ts< sts< sw< fo< sua< mp< com< cms< inex< inc< pa<'
augroup vim-zig
autocmd! * <buffer>
autocmd BufWritePre <buffer> if get(g:, 'zig_fmt_autosave', 1) | call zig#fmt#Format() | endif
augroup END
let b:undo_ftplugin .= '|au! vim-zig * <buffer>'
let &cpo = s:cpo_orig
unlet s:cpo_orig
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab

View File

@@ -1,19 +1,78 @@
" Vim indent file
" Language: nginx.conf
" Maintainer: Chris Aumann <me@chr4.org>
" Last Change: 2022 Apr 06
" Last Change: 2022 Dec 01
if exists("b:did_indent")
finish
" Only load this indent file when no other was loaded.
if exists('b:did_indent')
finish
endif
let b:did_indent = 1
setlocal indentexpr=
setlocal indentexpr=GetNginxIndent()
" cindent actually works for nginx' simple file structure
setlocal cindent
setlocal indentkeys=0{,0},0#,!^F,o,O
" Just make sure that the comments are not reset as defs would be.
setlocal cinkeys-=0#
let b:undo_indent = 'setl inde< indk<'
let b:undo_indent = "setl inde< cin< cink<"
" Only define the function once.
if exists('*GetNginxIndent')
finish
endif
function GetNginxIndent() abort
let plnum = s:PrevNotAsBlank(v:lnum - 1)
" Hit the start of the file, use zero indent.
if plnum == 0
return 0
endif
let ind = indent(plnum)
" Add a 'shiftwidth' after '{'
if s:AsEndWith(getline(plnum), '{')
let ind = ind + shiftwidth()
end
" Subtract a 'shiftwidth' on '}'
" This is the part that requires 'indentkeys'.
if getline(v:lnum) =~ '^\s*}'
let ind = ind - shiftwidth()
endif
let pplnum = s:PrevNotAsBlank(plnum - 1)
if s:IsLineContinuation(plnum)
if !s:IsLineContinuation(pplnum)
let ind = ind + shiftwidth()
end
else
if s:IsLineContinuation(pplnum)
let ind = ind - shiftwidth()
end
endif
return ind
endfunction
" Find the first line at or above {lnum} that is non-blank and not a comment.
function s:PrevNotAsBlank(lnum) abort
let lnum = prevnonblank(a:lnum)
while lnum > 0
if getline(lnum) !~ '^\s*#'
break
endif
let lnum = prevnonblank(lnum - 1)
endwhile
return lnum
endfunction
" Check whether {line} ends with {pat}, ignoring trailing comments.
function s:AsEndWith(line, pat) abort
return a:line =~ a:pat . '\m\s*\%(#.*\)\?$'
endfunction
function s:IsLineContinuation(lnum) abort
return a:lnum > 0 && !s:AsEndWith(getline(a:lnum), '[;{}]')
endfunction

View File

@@ -0,0 +1,134 @@
' vim: filetype=vb shiftwidth=4 expandtab
'
' START_INDENT
Public Type GEmployeeRecord ' Create user-defined type.
ID As Integer ' Define elements of data type.
Name As String * 20
Address As String * 30
Phone As Long
HireDate As Date
End Type
Public Enum InterfaceColors
icMistyRose = &HE1E4FF&
icSlateGray = &H908070&
icDodgerBlue = &HFF901E&
icDeepSkyBlue = &HFFBF00&
icSpringGreen = &H7FFF00&
icForestGreen = &H228B22&
icGoldenrod = &H20A5DA&
icFirebrick = &H2222B2&
End Enum
Enum SecurityLevel
IllegalEntry = -1
SecurityLevel1 = 0
SecurityLevel2 = 1
End Enum
Public Function TestConditional (number As Integer, ext As String) As Boolean
Dim inRange As Boolean
Select Case number
Case <= 0
inRange = False
Case > 10
inRange = False
Case Else
inRange = True
End Select
' This is a special case identified in the indent script.
Select Case number
End Select
If ext = ".xlm" Then
If inRange Then
TestConditional = True
Else
TestConditional = False
End If
ElseIf ext = ".xlsx" Then
If inRange Then
TestConditional = False
Else
TestConditional = True
End If
Else
TestConditional = False
End If
End Function
Private Sub TestIterators (lLimit As Integer, uLimit As Integer)
Dim a() As Variant
Dim elmt As Variant
Dim found As Boolean
Dim indx As Integer
Const specialValue As Integer = 5
If uLimit < lLimit Then
Exit Sub
End If
ReDim a(lLimit To uLimit)
For indx=lLimit To Ulimit
a(indx) = 2 * indx
Next indx
found = False
For Each elmt in a
If elmt = specialValue Then
found = True
End If
Next elmt
If found then
indx = uLimit
Do While indx >= lLimit
indx = indx - 1
Loop
End If
End Sub
Public Sub TestMultiline (cellAddr As String, rowNbr As Long)
Dim rng As Range
Set rng = Range(cellAddr)
With rng
.Cells(1,1).Value = _
"Line 1 of multiline string; " & _
"Line 2 of multiline string; " & _
"Line 3 of multiline string"
End With
' The following lines have whitespace after the underscore character
' and therefore do not form a valid multiline statement. The indent
' script correctly treats them as four single line statements contrary
' to the author's obvious indent.
rng..Cells(1,1).Value = _
"Line 1 of multiline string; " & _
"Line 2 of multiline string; " & _
"Line 3 of multiline string"
End Sub
Private Sub TestStmtLabel()
GoTo stmtLabel
' Statement labels are never indented
stmtLabel:
End Sub
Sub TestTypeKeyword()
Type EmployeeRecord ' Create user-defined type.
ID As Integer ' Define elements of data type.
Name As String * 20
Address As String * 30
Phone As Long
HireDate As Date
End Type
Dim varType As EmployeeRecord
End Sub
' END_INDENT

View File

@@ -0,0 +1,134 @@
' vim: filetype=vb shiftwidth=4 expandtab
'
' START_INDENT
Public Type GEmployeeRecord ' Create user-defined type.
ID As Integer ' Define elements of data type.
Name As String * 20
Address As String * 30
Phone As Long
HireDate As Date
End Type
Public Enum InterfaceColors
icMistyRose = &HE1E4FF&
icSlateGray = &H908070&
icDodgerBlue = &HFF901E&
icDeepSkyBlue = &HFFBF00&
icSpringGreen = &H7FFF00&
icForestGreen = &H228B22&
icGoldenrod = &H20A5DA&
icFirebrick = &H2222B2&
End Enum
Enum SecurityLevel
IllegalEntry = -1
SecurityLevel1 = 0
SecurityLevel2 = 1
End Enum
Public Function TestConditional (number As Integer, ext As String) As Boolean
Dim inRange As Boolean
Select Case number
Case <= 0
inRange = False
Case > 10
inRange = False
Case Else
inRange = True
End Select
' This is a special case identified in the indent script.
Select Case number
End Select
If ext = ".xlm" Then
If inRange Then
TestConditional = True
Else
TestConditional = False
End If
ElseIf ext = ".xlsx" Then
If inRange Then
TestConditional = False
Else
TestConditional = True
End If
Else
TestConditional = False
End If
End Function
Private Sub TestIterators (lLimit As Integer, uLimit As Integer)
Dim a() As Variant
Dim elmt As Variant
Dim found As Boolean
Dim indx As Integer
Const specialValue As Integer = 5
If uLimit < lLimit Then
Exit Sub
End If
ReDim a(lLimit To uLimit)
For indx=lLimit To Ulimit
a(indx) = 2 * indx
Next indx
found = False
For Each elmt in a
If elmt = specialValue Then
found = True
End If
Next elmt
If found then
indx = uLimit
Do While indx >= lLimit
indx = indx - 1
Loop
End If
End Sub
Public Sub TestMultiline (cellAddr As String, rowNbr As Long)
Dim rng As Range
Set rng = Range(cellAddr)
With rng
.Cells(1,1).Value = _
"Line 1 of multiline string; " & _
"Line 2 of multiline string; " & _
"Line 3 of multiline string"
End With
' The following lines have whitespace after the underscore character
' and therefore do not form a valid multiline statement. The indent
' script correctly treats them as four single line statements contrary
' to the author's obvious indent.
rng..Cells(1,1).Value = _
"Line 1 of multiline string; " & _
"Line 2 of multiline string; " & _
"Line 3 of multiline string"
End Sub
Private Sub TestStmtLabel()
GoTo stmtLabel
' Statement labels are never indented
stmtLabel:
End Sub
Sub TestTypeKeyword()
Type EmployeeRecord ' Create user-defined type.
ID As Integer ' Define elements of data type.
Name As String * 20
Address As String * 30
Phone As Long
HireDate As Date
End Type
Dim varType As EmployeeRecord
End Sub
' END_INDENT

View File

@@ -1,8 +1,12 @@
" Vim indent file
" Language: VisualBasic (ft=vb) / Basic (ft=basic) / SaxBasic (ft=vb)
" Author: Johannes Zellner <johannes@zellner.org>
" Maintainer: Michael Soyka (mssr953@gmail.com)
" Last Change: Fri, 18 Jun 2004 07:22:42 CEST
" Small update 2010 Jul 28 by Maxim Kim
" 2022/12/15: add support for multiline statements.
" 2022/12/21: move VbGetIndent from global to script-local scope
" 2022/12/26: recognize "Type" keyword
if exists("b:did_indent")
finish
@@ -10,28 +14,33 @@ endif
let b:did_indent = 1
setlocal autoindent
setlocal indentexpr=VbGetIndent(v:lnum)
setlocal indentexpr=s:VbGetIndent(v:lnum)
setlocal indentkeys&
setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,=~loop,<:>
setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,=~loop
let b:undo_indent = "set ai< indentexpr< indentkeys<"
" Only define the function once.
if exists("*VbGetIndent")
if exists("*s:VbGetIndent")
finish
endif
fun! VbGetIndent(lnum)
function s:VbGetIndent(lnum)
let this_lnum = a:lnum
let this_line = getline(this_lnum)
" labels and preprocessor get zero indent immediately
let this_line = getline(a:lnum)
let LABELS_OR_PREPROC = '^\s*\(\<\k\+\>:\s*$\|#.*\)'
if this_line =~? LABELS_OR_PREPROC
return 0
endif
" Get the current value of "shiftwidth"
let bShiftwidth = shiftwidth()
" Find a non-blank line above the current line.
" Skip over labels and preprocessor directives.
let lnum = a:lnum
let lnum = this_lnum
while lnum > 0
let lnum = prevnonblank(lnum - 1)
let previous_line = getline(lnum)
@@ -45,34 +54,102 @@ fun! VbGetIndent(lnum)
return 0
endif
let ind = indent(lnum)
" Variable "previous_line" now contains the text in buffer line "lnum".
" Multi-line statements have the underscore character at end-of-line:
"
" object.method(arguments, _
" arguments, _
" arguments)
"
" and require extra logic to determine the correct indentation.
"
" Case 1: Line "lnum" is the first line of a multiline statement.
" Line "lnum" will have a trailing underscore character
" but the preceding non-blank line does not.
" Line "this_lnum" will be indented relative to "lnum".
"
" Case 2: Line "lnum" is the last line of a multiline statement.
" Line "lnum" will not have a trailing underscore character
" but the preceding non-blank line will.
" Line "this_lnum" will have the same indentation as the starting
" line of the multiline statement.
"
" Case 3: Line "lnum" is neither the first nor last line.
" Lines "lnum" and "lnum-1" will have a trailing underscore
" character.
" Line "this_lnum" will have the same indentation as the preceding
" line.
"
" No matter which case it is, the starting line of the statement must be
" found. It will be assumed that multiline statements cannot have
" intermingled comments, statement labels, preprocessor directives or
" blank lines.
"
let lnum_is_continued = (previous_line =~ '_$')
if lnum > 1
let before_lnum = prevnonblank(lnum-1)
let before_previous_line = getline(before_lnum)
else
let before_lnum = 0
let before_previous_line = ""
endif
if before_previous_line !~ '_$'
" Variable "previous_line" contains the start of a statement.
"
let ind = indent(lnum)
if lnum_is_continued
let ind += bShiftwidth
endif
elseif ! lnum_is_continued
" Line "lnum" contains the last line of a multiline statement.
" Need to find where this multiline statement begins
"
while before_lnum > 0
let before_lnum -= 1
if getline(before_lnum) !~ '_$'
let before_lnum += 1
break
endif
endwhile
if before_lnum == 0
let before_lnum = 1
endif
let previous_line = getline(before_lnum)
let ind = indent(before_lnum)
else
" Line "lnum" is not the first or last line of a multiline statement.
"
let ind = indent(lnum)
endif
" Add
if previous_line =~? '^\s*\<\(begin\|\%(\%(private\|public\|friend\)\s\+\)\=\%(function\|sub\|property\)\|select\|case\|default\|if\|else\|elseif\|do\|for\|while\|enum\|with\)\>'
let ind = ind + shiftwidth()
if previous_line =~? '^\s*\<\(begin\|\%(\%(private\|public\|friend\)\s\+\)\=\%(function\|sub\|property\|enum\|type\)\|select\|case\|default\|if\|else\|elseif\|do\|for\|while\|with\)\>'
let ind = ind + bShiftwidth
endif
" Subtract
if this_line =~? '^\s*\<end\>\s\+\<select\>'
if previous_line !~? '^\s*\<select\>'
let ind = ind - 2 * shiftwidth()
let ind = ind - 2 * bShiftwidth
else
" this case is for an empty 'select' -- 'end select'
" (w/o any case statements) like:
"
" select case readwrite
" end select
let ind = ind - shiftwidth()
let ind = ind - bShiftwidth
endif
elseif this_line =~? '^\s*\<\(end\|else\|elseif\|until\|loop\|next\|wend\)\>'
let ind = ind - shiftwidth()
let ind = ind - bShiftwidth
elseif this_line =~? '^\s*\<\(case\|default\)\>'
if previous_line !~? '^\s*\<select\>'
let ind = ind - shiftwidth()
let ind = ind - bShiftwidth
endif
endif
return ind
endfun
endfunction
" vim:sw=4

View File

@@ -1,12 +1,14 @@
" Vim indent file placeholder
" Language: Vue
" Maintainer: None, please volunteer if you have a real Vue indent script
" Last Change: 2022 Dec 24
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
" don't set b:did_indent, otherwise html indenting won't be activated
" let b:did_indent = 1
" Html comes closest
runtime! indent/html.vim

80
runtime/indent/zig.vim Normal file
View File

@@ -0,0 +1,80 @@
" Vim filetype indent file
" Language: Zig
" Upstream: https://github.com/ziglang/zig.vim
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
if (!has("cindent") || !has("eval"))
finish
endif
setlocal cindent
" L0 -> 0 indent for jump labels (i.e. case statement in c).
" j1 -> indenting for "javascript object declarations"
" J1 -> see j1
" w1 -> starting a new line with `(` at the same indent as `(`
" m1 -> if `)` starts a line, match its indent with the first char of its
" matching `(` line
" (s -> use one indent, when starting a new line after a trailing `(`
setlocal cinoptions=L0,m1,(s,j1,J1,l1
" cinkeys: controls what keys trigger indent formatting
" 0{ -> {
" 0} -> }
" 0) -> )
" 0] -> ]
" !^F -> make CTRL-F (^F) reindent the current line when typed
" o -> when <CR> or `o` is used
" O -> when the `O` command is used
setlocal cinkeys=0{,0},0),0],!^F,o,O
setlocal indentexpr=GetZigIndent(v:lnum)
let b:undo_indent = "setlocal cindent< cinkeys< cinoptions< indentexpr<"
function! GetZigIndent(lnum)
let curretLineNum = a:lnum
let currentLine = getline(a:lnum)
" cindent doesn't handle multi-line strings properly, so force no indent
if currentLine =~ '^\s*\\\\.*'
return -1
endif
let prevLineNum = prevnonblank(a:lnum-1)
let prevLine = getline(prevLineNum)
" for lines that look like
" },
" };
" try treating them the same as a }
if prevLine =~ '\v^\s*},$'
if currentLine =~ '\v^\s*};$' || currentLine =~ '\v^\s*}$'
return indent(prevLineNum) - 4
endif
return indent(prevLineNum-1) - 4
endif
if currentLine =~ '\v^\s*},$'
return indent(prevLineNum) - 4
endif
if currentLine =~ '\v^\s*};$'
return indent(prevLineNum) - 4
endif
" cindent doesn't handle this case correctly:
" switch (1): {
" 1 => true,
" ~
" ^---- indents to here
if prevLine =~ '.*=>.*,$' && currentLine !~ '.*}$'
return indent(prevLineNum)
endif
return cindent(a:lnum)
endfunction

View File

@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Mar 02
" Last Change: 2022 Nov 27
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@@ -341,7 +341,7 @@ def s:TextWidth()
# Remove leading zeros to avoid it being used as an octal number.
# But keep a zero by itself.
var tw = substitute(n, "^0*", "", "")
&tw = tw == '' ? 0 : tw
&tw = tw == '' ? 0 : str2nr(tw)
endif
enddef
@@ -474,7 +474,7 @@ if has("spell")
an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages :call <SID>SpellLang()<CR>
let s:undo_spelllang = ['aun &Tools.&Spelling.&Find\ More\ Languages']
def s:SpellLang()
def s:SpellLang(encChanged = false)
for cmd in s:undo_spelllang
exe "silent! " .. cmd
endfor
@@ -482,7 +482,8 @@ if has("spell")
var enc = &enc == "iso-8859-15" ? "latin1" : &enc
if !exists("g:menutrans_set_lang_to")
# Reset g:menutrans_set_lang_to when called for the EncodingChanged event.
if !exists("g:menutrans_set_lang_to") || encChanged
g:menutrans_set_lang_to = 'Set Language to'
endif
@@ -510,12 +511,12 @@ if has("spell")
else
echomsg "Found " .. found .. " more spell files"
endif
# Need to redo this when 'encoding' is changed.
augroup spellmenu
au! EncodingChanged * call <SID>SpellLang()
au! EncodingChanged * call SpellLang(true)
augroup END
enddef
endif
" Tools.Fold Menu

View File

@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Nov 23
" Last Change: 2022 Dec 16
" If there already is an option window, jump to that one.
let buf = bufnr('option-window')
@@ -743,10 +743,12 @@ call <SID>AddOption("terse", gettext("add 's' flag in 'shortmess' (don't show se
call <SID>BinOptionG("terse", &terse)
call <SID>AddOption("shortmess", gettext("list of flags to make messages shorter"))
call <SID>OptionG("shm", &shm)
call <SID>AddOption("showcmd", gettext("show (partial) command keys in the status line"))
call <SID>AddOption("showcmd", gettext("show (partial) command keys in location given by 'showcmdloc'"))
let &sc = s:old_sc
call <SID>BinOptionG("sc", &sc)
set nosc
call <SID>AddOption("showcmdloc", gettext("location where to show the (partial) command keys for 'showcmd'"))
call <SID>OptionG("sloc", &sloc)
call <SID>AddOption("showmode", gettext("display the current mode in the status line"))
call <SID>BinOptionG("smd", &smd)
call <SID>AddOption("ruler", gettext("show cursor position below each window"))

View File

@@ -1,6 +1,6 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Apr 08
" Last Change: 2022 Dec 01
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@@ -19,8 +19,8 @@ endif
augroup matchparen
" Replace all matchparen autocommands
autocmd! CursorMoved,CursorMovedI,WinEnter,WinScrolled * call s:Highlight_Matching_Pair()
autocmd! WinLeave * call s:Remove_Matches()
autocmd! CursorMoved,CursorMovedI,WinEnter,BufWinEnter,WinScrolled * call s:Highlight_Matching_Pair()
autocmd! WinLeave,BufLeave * call s:Remove_Matches()
if exists('##TextChanged')
autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair()
endif

View File

@@ -1,6 +1,6 @@
" Vim syntax support file
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2020 Jan 05
" Last Change: 2022 Dec 26
"
" Additional contributors:
"
@@ -1881,7 +1881,7 @@ if s:settings.use_css && !s:settings.no_doc
endif
endif
if !s:settings.use_css && !s:settings_no_doc
if !s:settings.use_css && !s:settings.no_doc
" For Netscape 4, set <body> attributes too, though, strictly speaking, it's
" incorrect.
execute '%s:<body\([^>]*\):<body bgcolor="' . s:bgc . '" text="' . s:fgc . '"\1>\r<font face="'. s:htmlfont .'"'

View File

@@ -3,7 +3,7 @@
" Maintainer: Nick Jensen <nickspoon@gmail.com>
" Former Maintainers: Anduin Withers <awithers@anduin.com>
" Johannes Zellner <johannes@zellner.org>
" Last Change: 2022-03-01
" Last Change: 2022-11-16
" Filenames: *.cs
" License: Vim (see :h license)
" Repository: https://github.com/nickspoons/vim-cs
@@ -25,6 +25,9 @@ syn keyword csType bool byte char decimal double float int long object sbyte sho
syn keyword csType nint nuint " contextual
syn keyword csStorage enum interface namespace struct
syn match csStorage "\<record\ze\_s\+@\=\h\w*\_s*[<(:{;]"
syn match csStorage "\%(\<\%(partial\|new\|public\|protected\|internal\|private\|abstract\|sealed\|static\|unsafe\|readonly\)\)\@9<=\_s\+record\>"
syn match csStorage "\<record\ze\_s\+\%(class\|struct\)"
syn match csStorage "\<delegate\>"
syn keyword csRepeat break continue do for foreach goto return while
syn keyword csConditional else if switch
@@ -44,6 +47,9 @@ syn keyword csManagedModifier managed unmanaged contained
" Modifiers
syn match csUsingModifier "\<global\ze\_s\+using\>"
syn keyword csAccessModifier internal private protected public
syn keyword csModifier operator nextgroup=csCheckedModifier skipwhite skipempty
syn keyword csCheckedModifier checked contained
" TODO: in new out
syn keyword csModifier abstract const event override readonly sealed static virtual volatile
syn match csModifier "\<\%(extern\|fixed\|unsafe\)\>"
@@ -76,7 +82,7 @@ syn match csAccess "\<this\>"
" Extension method parameter modifier
syn match csModifier "\<this\ze\_s\+@\=\h"
syn keyword csUnspecifiedStatement as in is nameof operator out params ref sizeof stackalloc using
syn keyword csUnspecifiedStatement as in is nameof out params ref sizeof stackalloc using
syn keyword csUnsupportedStatement value
syn keyword csUnspecifiedKeyword explicit implicit
@@ -183,7 +189,7 @@ syn match csUnicodeNumber +\\u\x\{4}+ contained contains=csUnicodeSpecifier disp
syn match csUnicodeNumber +\\U00\x\{6}+ contained contains=csUnicodeSpecifier display
syn match csUnicodeSpecifier +\\[uUx]+ contained display
syn region csString matchgroup=csQuote start=+"+ end=+"+ end=+$+ extend contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
syn region csString matchgroup=csQuote start=+"+ end=+"\%(u8\)\=+ end=+$+ extend contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError,csUnicodeNumber display
syn match csCharacter "'\\''" contains=csSpecialChar display
syn match csCharacter "'[^\\]'" display
@@ -200,7 +206,7 @@ syn match csReal "\<\d\+\%(_\+\d\+\)*[fdm]\>" display
syn case match
syn cluster csNumber contains=csInteger,csReal
syn region csInterpolatedString matchgroup=csQuote start=+\$"+ end=+"+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
syn region csInterpolatedString matchgroup=csQuote start=+\$"+ end=+"\%(u8\)\=+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
syn region csInterpolation matchgroup=csInterpolationDelimiter start=+{+ end=+}+ keepend contained contains=@csAll,csBraced,csBracketed,csInterpolationAlign,csInterpolationFormat
syn match csEscapedInterpolation "{{" transparent contains=NONE display
@@ -210,10 +216,10 @@ syn match csInterpolationFormat +:[^}]\+}+ contained contains=csInterpolationFor
syn match csInterpolationAlignDel +,+ contained display
syn match csInterpolationFormatDel +:+ contained display
syn region csVerbatimString matchgroup=csQuote start=+@"+ end=+"+ skip=+""+ extend contains=csVerbatimQuote,@Spell
syn region csVerbatimString matchgroup=csQuote start=+@"+ end=+"\%(u8\)\=+ skip=+""+ extend contains=csVerbatimQuote,@Spell
syn match csVerbatimQuote +""+ contained
syn region csInterVerbString matchgroup=csQuote start=+$@"+ start=+@$"+ end=+"+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell
syn region csInterVerbString matchgroup=csQuote start=+$@"+ start=+@$"+ end=+"\%(u8\)\=+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell
syn cluster csString contains=csString,csInterpolatedString,csVerbatimString,csInterVerbString
@@ -256,6 +262,7 @@ hi def link csException Exception
hi def link csModifier StorageClass
hi def link csAccessModifier csModifier
hi def link csAsyncModifier csModifier
hi def link csCheckedModifier csModifier
hi def link csManagedModifier csModifier
hi def link csUsingModifier csModifier

View File

@@ -0,0 +1,21 @@
" Vim syntax file
" Language: EditorConfig
" Maintainer: Gregory Anders <greg@gpanders.com>
" Last Change: 2023-01-03
if exists('b:current_syntax')
finish
endif
runtime! syntax/dosini.vim
unlet! b:current_syntax
syntax match editorconfigUnknownProperty "^\s*\zs\w\+\ze\s*="
syntax keyword editorconfigProperty root charset end_of_line indent_style
syntax keyword editorconfigProperty indent_size tab_width max_line_length
syntax keyword editorconfigProperty trim_trailing_whitespace insert_final_newline
hi def link editorconfigProperty dosiniLabel
let b:current_syntax = 'editorconfig'

View File

@@ -2,8 +2,8 @@
" Language: fstab file
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
" URL: https://raw.github.com/rid9/vim-fstab/master/syntax/fstab.vim
" Last Change: 2020 Dec 30
" Version: 1.4
" Last Change: 2022 Dec 11
" Version: 1.6.2
"
" Credits:
" David Necas (Yeti) <yeti@physics.muni.cz>
@@ -56,71 +56,124 @@ syn keyword fsMountPointKeyword contained none swap
" Type
syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown
syn match fsTypeUnknown /\s\+\zs\w\+/ contained
syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 cfs cgroup cifs coda configfs cpuset cramfs devfs devpts devtmpfs e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse fuseblk fusectl hfs hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfsd nilfs2 none ntfs null nwfs overlay ovlfs pipefs portal proc procfs pstore ptyfs qnx4 reiserfs ramfs romfs securityfs shm smbfs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xenfs xfs zisofs
syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 ceph cfs cgroup cifs coda coherent configfs cpuset cramfs debugfs devfs devpts devtmpfs dlmfs e2compr ecryptfs efivarfs efs erofs exfat ext2 ext2fs ext3 ext4 f2fs fdesc ffs filecore fuse fuseblk fusectl gfs2 hfs hfsplus hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfs4 nfsd nilfs2 none ntfs ntfs3 null nwfs ocfs2 omfs overlay ovlfs pipefs portal proc procfs pstore ptyfs pvfs2 qnx4 qnx6 reiserfs ramfs romfs rpc_pipefs securityfs shm smbfs spufs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs ubifs udf ufs umap umsdos union usbfs userfs v9fs vfat virtiofs vs3fs vxfs wrapfs wvfs xenfs xenix xfs zisofs zonefs
" Options
" -------
" Options: General
syn cluster fsOptionsCluster contains=fsOperator,fsOptionsGeneral,fsOptionsKeywords,fsTypeUnknown
syn match fsOptionsNumber /\d\+/
syn match fsOptionsNumberSigned /[-+]\?\d\+/
syn match fsOptionsNumberOctal /[0-8]\+/
syn match fsOptionsString /[a-zA-Z0-9_-]\+/
syn keyword fsOptionsTrueFalse true false
syn keyword fsOptionsYesNo yes no
syn keyword fsOptionsYN y n
syn keyword fsOptions01 0 1
syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck
syn keyword fsOptionsSize 512 1024 2048
syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail failok
syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop managed mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner pamconsole rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail failok lazytime
syn match fsOptionsGeneral /_netdev/
syn match fsOptionsKeywords contained /\<x-systemd\.\%(requires\|before\|after\|wanted-by\|required-by\|requires-mounts-for\|idle-timeout\|device-timeout\|mount-timeout\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<x-systemd\.\%(device-bound\|automount\|makefs\|growfs\|rw-only\)/
syn match fsOptionsKeywords contained /\<x-initrd\.mount/
syn match fsOptionsKeywords contained /\<cache=/ nextgroup=fsOptionsCache
syn keyword fsOptionsCache yes no none strict loose fscache mmap
syn match fsOptionsKeywords contained /\<dax=/ nextgroup=fsOptionsDax
syn keyword fsOptionsDax inode never always
syn match fsOptionsKeywords contained /\<errors=/ nextgroup=fsOptionsErrors
syn keyword fsOptionsErrors contained continue panic withdraw remount-ro recover zone-ro zone-offline repair
syn match fsOptionsKeywords contained /\<\%(sec\)=/ nextgroup=fsOptionsSecurityMode
syn keyword fsOptionsSecurityMode contained none krb5 krb5i ntlm ntlmi ntlmv2 ntlmv2i ntlmssp ntlmsspi sys lkey lkeyi lkeyp spkm spkmi spkmp
" Options: adfs
syn match fsOptionsKeywords contained /\<\%([ug]id\|o\%(wn\|th\)mask\)=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<ftsuffix=/ nextgroup=fsOptions01
" Options: affs
syn match fsOptionsKeywords contained /\<\%(set[ug]id\|mode\|reserved\)=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<mode=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<\%(set[ug]id\|reserved\)=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<\%(prefix\|volume\|root\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<bs=/ nextgroup=fsOptionsSize
syn keyword fsOptionsKeywords contained protect usemp verbose
syn keyword fsOptionsKeywords contained protect usemp verbose nofilenametruncate mufs
" Options: btrfs
syn match fsOptionsKeywords contained /\<\%(subvol\|subvolid\|subvolrootid\|device\|compress\|compress-force\|fatal_errors\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<\%(subvol\|subvolid\|subvolrootid\|device\|compress\|compress-force\|check_int_print_mask\|space_cache\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<\%(max_inline\|alloc_start\|thread_pool\|metadata_ratio\|check_int_print_mask\)=/ nextgroup=fsOptionsNumber
syn keyword fsOptionsKeywords contained degraded nodatasum nodatacow nobarrier ssd ssd_spread noacl notreelog flushoncommit space_cache nospace_cache clear_cache user_subvol_rm_allowed autodefrag inode_cache enospc_debug recovery check_int check_int_data skip_balance discard
syn match fsOptionsKeywords contained /\<discard=/ nextgroup=fsOptionsBtrfsDiscard
syn keyword fsOptionsBtrfsDiscard sync async
syn match fsOptionsKeywords contained /\<fatal_errors=/ nextgroup=fsOptionsBtrfsFatalErrors
syn keyword fsOptionsBtrfsFatalErrors bug panic
syn match fsOptionsKeywords contained /\<fragment=/ nextgroup=fsOptionsBtrfsFragment
syn keyword fsOptionsBtrfsFragment data metadata all
syn keyword fsOptionsKeywords contained degraded datasum nodatasum datacow nodatacow barrier nobarrier ssd ssd_spread nossd nossd_spread noacl treelog notreelog flushoncommit noflushoncommit space_cache nospace_cache clear_cache user_subvol_rm_allowed autodefrag noautodefrag inode_cache noinode_cache enospc_debug noenospc_debug recovery check_int check_int_data skip_balance discard nodiscard compress compress-force nologreplay rescan_uuid_tree rescue usebackuproot
" Options: cd9660
syn keyword fsOptionsKeywords contained extatt gens norrip nostrictjoilet
" Options: ceph
syn match fsOptionsKeywords contained /\<\%(mon_addr\|fsid\|rasize\|mount_timeout\|caps_max\)=/ nextgroup=fsOptionsString
syn keyword fsOptionsKeywords contained rbytes norbytes nocrc dcache nodcache noasyncreaddir noquotadf nocopyfrom
syn match fsOptionsKeywords contained /\<recover_session=/ nextgroup=fsOptionsCephRecoverSession
syn keyword fsOptionsCephRecoverSession contained no clean
" Options: cifs
syn match fsOptionsKeywords contained /\<\%(user\|password\|credentials\|servernetbiosname\|servern\|netbiosname\|file_mode\|dir_mode\|ip\|domain\|prefixpath\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<\%(cruid\|backupuid\|backupgid\)=/ nextgroup=fsOptionsNumber
syn keyword fsOptionsKeywords contained forceuid forcegid guest setuids nosetuids perm noperm dynperm strictcache rwpidforward mapchars nomapchars cifsacl nocase ignorecase nobrl sfu serverino noserverino nounix fsc multiuser posixpaths noposixpaths
" Options: devpts
" -- everything already defined
" Options: ecryptfs
syn match fsOptionsKeywords contained /\<\%(ecryptfs_\%(sig\|fnek_sig\|cipher\|key_bytes\)\|key\)=/ nextgroup=fsOptionsString
syn keyword fsOptionsKeywords contained ecryptfs_passthrough no_sig_cache ecryptfs_encrypted_view ecryptfs_xattr
syn match fsOptionsKeywords contained /\<ecryptfs_enable_filename_crypto=/ nextgroup=fsOptionsYN
syn match fsOptionsKeywords contained /\<verbosity=/ nextgroup=fsOptions01
" Options: erofs
syn match fsOptionsKeywords contained /\<cache_strategy=/ nextgroup=fsOptionsEroCacheStrategy
syn keyword fsOptionsEroCacheStrategy contained disabled readahead readaround
" Options: ext2
syn match fsOptionsKeywords contained /\<check=*/ nextgroup=@fsOptionsCheckCluster
syn match fsOptionsKeywords contained /\<errors=/ nextgroup=fsOptionsExt2Errors
syn match fsOptionsKeywords contained /\<\%(res[gu]id\|sb\)=/ nextgroup=fsOptionsNumber
syn keyword fsOptionsExt2Check contained none normal strict
syn keyword fsOptionsExt2Errors contained continue panic
syn match fsOptionsExt2Errors contained /\<remount-ro\>/
syn match fsOptionsErrors contained /\<remount-ro\>/
syn keyword fsOptionsKeywords contained acl bsddf minixdf debug grpid bsdgroups minixdf nocheck nogrpid oldalloc orlov sysvgroups nouid32 nobh user_xattr nouser_xattr
" Options: ext3
syn match fsOptionsKeywords contained /\<journal=/ nextgroup=fsOptionsExt3Journal
syn match fsOptionsKeywords contained /\<data=/ nextgroup=fsOptionsExt3Data
syn match fsOptionsKeywords contained /\<data_err=/ nextgroup=fsOptionsExt3DataErr
syn match fsOptionsKeywords contained /\<commit=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<jqfmt=/ nextgroup=fsOptionsExt3Jqfmt
syn match fsOptionsKeywords contained /\<\%(usrjquota\|grpjquota\)=/ nextgroup=fsOptionsString
syn keyword fsOptionsExt3Journal contained update inum
syn keyword fsOptionsExt3Data contained journal ordered writeback
syn keyword fsOptionsExt3DataErr contained ignore abort
syn keyword fsOptionsExt3Jqfmt contained vfsold vfsv0 vfsv1
syn keyword fsOptionsKeywords contained noload user_xattr nouser_xattr acl
" Options: ext4
syn match fsOptionsKeywords contained /\<journal=/ nextgroup=fsOptionsExt4Journal
syn match fsOptionsKeywords contained /\<data=/ nextgroup=fsOptionsExt4Data
syn match fsOptionsKeywords contained /\<barrier=/ nextgroup=fsOptionsExt4Barrier
syn match fsOptionsKeywords contained /\<barrier=/ nextgroup=fsOptions01
syn match fsOptionsKeywords contained /\<journal_dev=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<resuid=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<resgid=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<sb=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<commit=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<\%(commit\|inode_readahead_blks\|stripe\|max_batch_time\|min_batch_time\|init_itable\|max_dir_size_kb\)=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<journal_ioprio=/ nextgroup=fsOptionsExt4JournalIoprio
syn keyword fsOptionsExt4Journal contained update inum
syn keyword fsOptionsExt4Data contained journal ordered writeback
syn match fsOptionsExt4Barrier /[0-1]/
syn keyword fsOptionsKeywords contained noload extents orlov oldalloc user_xattr nouser_xattr acl noacl reservation noreservation bsddf minixdf check=none nocheck debug grpid nogroupid sysvgroups bsdgroups quota noquota grpquota usrquota bh nobh
syn keyword fsOptionsExt4JournalIoprio contained 0 1 2 3 4 5 6 7
syn keyword fsOptionsKeywords contained noload extents orlov oldalloc user_xattr nouser_xattr acl noacl reservation noreservation bsddf minixdf check=none nocheck debug grpid nogroupid sysvgroups bsdgroups quota noquota grpquota usrquota bh nobh journal_checksum nojournal_checksum journal_async_commit delalloc nodelalloc auto_da_alloc noauto_da_alloc noinit_itable block_validity noblock_validity dioread_lock dioread_nolock i_version nombcache prjquota
" Options: fat
syn match fsOptionsKeywords contained /\<blocksize=/ nextgroup=fsOptionsSize
@@ -135,39 +188,124 @@ syn keyword fsOptionsConv contained b t a binary text auto
syn keyword fsOptionsFatType contained 12 16 32
syn keyword fsOptionsKeywords contained quiet sys_immutable showexec dots nodots
" Options: fuse
syn match fsOptionsKeywords contained /\<\%(fd\|user_id\|group_id\|blksize\)=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<\%(rootmode\)=/ nextgroup=fsOptionsString
" Options: hfs
syn match fsOptionsKeywords contained /\<\%(creator|type\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<\%(creator\|type\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<\%(dir\|file\|\)_umask=/ nextgroup=fsOptionsNumberOctal
syn match fsOptionsKeywords contained /\<\%(session\|part\)=/ nextgroup=fsOptionsNumber
" Options: hfsplus
syn match fsOptionsKeywords contained /\<nls=/ nextgroup=fsOptionsString
syn keyword fsOptionsKeywords contained decompose nodecompose
" Options: f2fs
syn match fsOptionsKeywords contained /\<background_gc=/ nextgroup=fsOptionsF2fsBackgroundGc
syn keyword fsOptionsF2fsBackgroundGc contained on off sync
syn match fsOptionsKeywords contained /\<active_logs=/ nextgroup=fsOptionsF2fsActiveLogs
syn keyword fsOptionsF2fsActiveLogs contained 2 4 6
syn match fsOptionsKeywords contained /\<alloc_mode=/ nextgroup=fsOptionsF2fsAllocMode
syn keyword fsOptionsF2fsAllocMode contained reuse default
syn match fsOptionsKeywords contained /\<fsync_mode=/ nextgroup=fsOptionsF2fsFsyncMode
syn keyword fsOptionsF2fsFsyncMode contained posix strict nobarrier
syn match fsOptionsKeywords contained /\<compress_mode=/ nextgroup=fsOptionsF2fsCompressMode
syn keyword fsOptionsF2fsCompressMode contained fs user
syn match fsOptionsKeywords contained /\<discard_unit=/ nextgroup=fsOptionsF2fsDiscardUnit
syn keyword fsOptionsF2fsDiscardUnit contained block segment section
syn match fsOptionsKeywords contained /\<memory=/ nextgroup=fsOptionsF2fsMemory
syn keyword fsOptionsF2fsMemory contained normal low
syn match fsOptionsKeywords contained /\<\%(inline_xattr_size\|reserve_root\|fault_injection\|fault_type\|io_bits\|compress_log_size\)=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<\%(prjjquota\|test_dummy_encryption\|checkpoint\|compress_algorithm\|compress_extension\|nocompress_extension\)=/ nextgroup=fsOptionsString
syn keyword fsOptionsKeyWords contained gc_merge nogc_merge disable_roll_forward no_heap disable_ext_identify inline_xattr noinline_xattr inline_data noinline_data inline_dentry noinline_dentry flush_merge fastboot extent_cache noextent_cache data_flush offusrjquota offgrpjquota offprjjquota test_dummy_encryption checkpoint_merge nocheckpoint_merge compress_chksum compress_cache inlinecrypt atgc
" Options: ffs
syn keyword fsOptionsKeyWords contained noperm softdep
" Options: gfs2
syn match fsOptionsKeywords contained /\<\%(lockproto\|locktable\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<\%(quota_quantum\|statfs_quantum\|statfs_percent\)=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<quota=/ nextgroup=fsOptionsGfs2Quota
syn keyword fsOptionsGfs2Quota contained off account on
syn keyword fsOptionsKeywords contained localcaching localflocks ignore_local_fs upgrade spectator meta
" Options: hpfs
syn match fsOptionsKeywords contained /\<case=/ nextgroup=fsOptionsHpfsCase
syn keyword fsOptionsHpfsCase contained lower asis
syn match fsOptionsKeywords contained /\<chkdsk=/ nextgroup=fsOptionsHpfsChkdsk
syn keyword fsOptionsHpfsChkdsk contained no errors always
syn match fsOptionsKeywords contained /\<eas=/ nextgroup=fsOptionsHpfsEas
syn keyword fsOptionsHpfsEas contained no ro rw
syn match fsOptionsKeywords contained /\<timeshift=/ nextgroup=fsOptionsNumberSigned
" Options: iso9660
syn match fsOptionsKeywords contained /\<map=/ nextgroup=fsOptionsIsoMap
syn match fsOptionsKeywords contained /\<block=/ nextgroup=fsOptionsSize
syn match fsOptionsKeywords contained /\<\%(session\|sbsector\)=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<\%(session\|sbsector\|dmode\)=/ nextgroup=fsOptionsNumber
syn keyword fsOptionsIsoMap contained n o a normal off acorn
syn keyword fsOptionsKeywords contained norock nojoilet unhide cruft
syn keyword fsOptionsKeywords contained norock nojoliet hide unhide cruft overriderockperm showassoc
syn keyword fsOptionsConv contained m mtext
" Options: jfs
syn keyword fsOptionsKeywords nointegrity integrity
" Options: nfs
syn match fsOptionsKeywords contained /\<\%(rsize\|wsize\|timeo\|retrans\|acregmin\|acregmax\|acdirmin\|acdirmax\|actimeo\|retry\|port\|mountport\|mounthost\|mountprog\|mountvers\|nfsprog\|nfsvers\|namelen\)=/ nextgroup=fsOptionsString
syn keyword fsOptionsKeywords contained bg fg soft hard intr cto ac tcp udp lock nobg nofg nosoft nohard nointr noposix nocto noac notcp noudp nolock
syn match fsOptionsKeywords contained /\<lookupcache=/ nextgroup=fsOptionsNfsLookupCache
syn keyword fsOptionsNfsLookupCache contained all none pos positive
syn match fsOptionsKeywords contained /\<local_lock=/ nextgroup=fsOptionsNfsLocalLock
syn keyword fsOptionsNfsLocalLock contained all flock posix none
syn match fsOptionsKeywords contained /\<\%(mounthost\|mountprog\|nfsprog\|namelen\|proto\|mountproto\|clientaddr\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<\%(timeo\|retrans\|[rw]size\|acregmin\|acregmax\|acdirmin\|acdirmax\|actimeo\|retry\|port\|mountport\|mountvers\|namlen\|nfsvers\|vers\|minorversion\)=/ nextgroup=fsOptionsNumber
syn keyword fsOptionsKeywords contained bg fg soft hard intr cto ac tcp udp lock nobg nofg nosoft nohard nointr noposix nocto noac notcp noudp nolock sharecache nosharecache resvport noresvport rdirplus nordirplus
" Options: nilfs2
syn match fsOptionsKeywords contained /\<order=/ nextgroup=fsOptionsNilfs2Order
syn keyword fsOptionsNilfs2Order contained relaxed strict
syn match fsOptionsKeywords contained /\<\%([cp]p\)=/ nextgroup=fsOptionsNumber
syn keyword fsOptionsKeywords contained nogc
" Options: ntfs
syn match fsOptionsKeywords contained /\<mft_zone_multiplier=/ nextgroup=fsOptionsNtfsMftZoneMultiplier
syn keyword fsOptionsNtfsMftZoneMultiplier contained 1 2 3 4
syn match fsOptionsKeywords contained /\<\%(posix=*\|uni_xlate=\)/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<\%(sloppy\|show_sys_files\|case_sensitive\|disable_sparse\)=/ nextgroup=fsOptionsTrueFalse
syn keyword fsOptionsKeywords contained utf8
" Options: ntfs3
syn keyword fsOptionsKeywords contained noacsrules nohidden sparse showmeta prealloc
" Options: ntfs-3g
syn match fsOptionsKeywords contained /\<\%(usermapping\|locale\|streams_interface\)=/ nextgroup=fsOptionsString
syn keyword fsOptionsKeywords contained permissions inherit recover norecover ignore_case remove_hiberfile hide_hid_files hide_dot_files windows_names silent no_def_opts efs_raw compression nocompression no_detach
" Options: ocfs2
syn match fsOptionsKeywords contained /\<\%(resv_level\|dir_resv_level\)=/ nextgroup=fsOptionsOcfs2ResvLevel
syn keyword fsOptionsOcfs2ResvLevel contained 0 1 2 3 4 5 6 7 8
syn match fsOptionsKeywords contained /\<coherency=/ nextgroup=fsOptionsOcfs2Coherency
syn keyword fsOptionsOcfs2Coherency contained full buffered
syn match fsOptionsKeywords contained /\<\%(atime_quantum\|preferred_slot\|localalloc\)=/ nextgroup=fsOptionsNumber
syn keyword fsOptionsKeywords contained strictatime inode64
" Options: overlay
syn match fsOptionsKeywords contained /\<redirect_dir=/ nextgroup=fsOptionsOverlayRedirectDir
syn keyword fsOptionsOverlayRedirectDir contained on follow off nofollow
" Options: proc
" -- everything already defined
syn match fsOptionsKeywords contained /\<\%(hidepid\|subset\)=/ nextgroup=fsOptionsString
" Options: qnx4
syn match fsOptionsKeywords contained /\<bitmap=/ nextgroup=fsOptionsQnx4Bitmap
syn keyword fsOptionsQnx4Bitmap contained always lazy nonrmv
syn keyword fsOptionsKeywords contained grown noembed overalloc unbusy
" Options: qnx6
syn match fsOptionsKeywords contained /\<hold=/ nextgroup=fsOptionsQnx6Hold
syn keyword fsOptionsQnx6Hold contained allow root deny
syn match fsOptionsKeywords contained /\<sync=/ nextgroup=fsOptionsQnx6Sync
syn keyword fsOptionsQnx6Sync contained mandatory optional none
syn match fsOptionsKeywords contained /\<snapshot=/ nextgroup=fsOptionsNumber
syn keyword fsOptionsKeywords contained alignio
" Options: reiserfs
syn match fsOptionsKeywords contained /\<hash=/ nextgroup=fsOptionsReiserHash
@@ -176,7 +314,7 @@ syn keyword fsOptionsReiserHash contained rupasov tea r5 detect
syn keyword fsOptionsKeywords contained hashed_relocation noborder nolog notail no_unhashed_relocation replayonly
" Options: sshfs
syn match fsOptionsKeywords contained /\<\%(BatchMode\|ChallengeResponseAuthentication\|CheckHostIP\|ClearAllForwardings\|Compression\|EnableSSHKeysign\|ForwardAgent\|ForwardX11\|ForwardX11Trusted\|GatewayPorts\|GSSAPIAuthentication\|GSSAPIDelegateCredentials\|HashKnownHosts\|HostbasedAuthentication\|IdentitiesOnly\|NoHostAuthenticationForLocalhost\|PasswordAuthentication\|PubkeyAuthentication\|RhostsRSAAuthentication\|RSAAuthentication\|TCPKeepAlive\|UsePrivilegedPort\|cache\)=/ nextgroup=fsOptionsYesNo
syn match fsOptionsKeywords contained /\<\%(BatchMode\|ChallengeResponseAuthentication\|CheckHostIP\|ClearAllForwardings\|Compression\|EnableSSHKeysign\|ForwardAgent\|ForwardX11\|ForwardX11Trusted\|GatewayPorts\|GSSAPIAuthentication\|GSSAPIDelegateCredentials\|HashKnownHosts\|HostbasedAuthentication\|IdentitiesOnly\|NoHostAuthenticationForLocalhost\|PasswordAuthentication\|PubkeyAuthentication\|RhostsRSAAuthentication\|RSAAuthentication\|TCPKeepAlive\|UsePrivilegedPort\)=/ nextgroup=fsOptionsYesNo
syn match fsOptionsKeywords contained /\<\%(ControlMaster\|StrictHostKeyChecking\|VerifyHostKeyDNS\)=/ nextgroup=fsOptionsSshYesNoAsk
syn match fsOptionsKeywords contained /\<\%(AddressFamily\|BindAddress\|Cipher\|Ciphers\|ControlPath\|DynamicForward\|EscapeChar\|GlobalKnownHostsFile\|HostKeyAlgorithms\|HostKeyAlias\|HostName\|IdentityFile\|KbdInteractiveDevices\|LocalForward\|LogLevel\|MACs\|PreferredAuthentications\|Protocol\|ProxyCommand\|RemoteForward\|RhostsAuthentication\|SendEnv\|SmartcardDevice\|User\|UserKnownHostsFile\|XAuthLocation\|comment\|workaround\|idmap\|ssh_command\|sftp_server\|fsname\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<\%(CompressionLevel\|ConnectionAttempts\|ConnectTimeout\|NumberOfPasswordPrompts\|Port\|ServerAliveCountMax\|ServerAliveInterval\|cache_timeout\|cache_X_timeout\|ssh_protocol\|directport\|max_read\|umask\|uid\|gid\|entry_timeout\|negative_timeout\|attr_timeout\)=/ nextgroup=fsOptionsNumber
@@ -190,12 +328,19 @@ syn keyword fsOptionsKeywords contained procuid
" Options: swap
syn match fsOptionsKeywords contained /\<pri=/ nextgroup=fsOptionsNumber
" Options: ubifs
syn match fsOptionsKeywords contained /\<\%(compr\|auth_key\|auth_hash_name\)=/ nextgroup=fsOptionsString
syn keyword fsOptionsKeywords contained bulk_read no_bulk_read chk_data_crc no_chk_data_crc
" Options: tmpfs
syn match fsOptionsKeywords contained /\<huge=/ nextgroup=fsOptionsTmpfsHuge
syn keyword fsOptionsTmpfsHuge contained never always within_size advise deny force
syn match fsOptionsKeywords contained /\<\%(size\|mpol\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<nr_\%(blocks\|inodes\)=/ nextgroup=fsOptionsNumber
" Options: udf
syn match fsOptionsKeywords contained /\<\%(anchor\|partition\|lastblock\|fileset\|rootdir\)=/ nextgroup=fsOptionsString
syn keyword fsOptionsKeywords contained unhide undelete strict novrs
syn keyword fsOptionsKeywords contained unhide undelete strict nostrict novrs adinicb noadinicb shortad longad
" Options: ufs
syn match fsOptionsKeywords contained /\<ufstype=/ nextgroup=fsOptionsUfsType
@@ -208,14 +353,32 @@ syn keyword fsOptionsUfsError contained panic lock umount repair
syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)\%(id\|gid\)=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)mode=/ nextgroup=fsOptionsNumberOctal
" Options: v9fs
syn match fsOptionsKeywords contained /\<\%(trans\)=/ nextgroup=fsOptionsV9Trans
syn keyword fsOptionsV9Trans unix tcp fd virtio rdma
syn match fsOptionsKeywords contained /\<debug=/ nextgroup=fsOptionsV9Debug
syn keyword fsOptionsV9Debug 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 0x100 0x200 0x400 0x800
syn match fsOptionsKeywords contained /\<version=/ nextgroup=fsOptionsV9Version
syn keyword fsOptionsV9Version 9p2000 9p2000.u 9p2000.L
syn match fsOptionsKeywords contained /\<\%([ua]name\|[rw]fdno\|access\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<msize=/ nextgroup=fsOptionsNumber
syn keyword fsOptionsKeywords contained noextend dfltuid dfltgid afid nodevmap cachetag
" Options: vfat
syn keyword fsOptionsKeywords contained nonumtail posix utf8
syn match fsOptionsKeywords contained /shortname=/ nextgroup=fsOptionsVfatShortname
syn match fsOptionsKeywords contained /\<shortname=/ nextgroup=fsOptionsVfatShortname
syn keyword fsOptionsVfatShortname contained lower win95 winnt mixed
syn match fsOptionsKeywords contained /\<nfs=/ nextgroup=fsOptionsVfatNfs
syn keyword fsOptionsVfatNfs contained stale_rw nostale_ro
syn match fsOptionsKeywords contained /\<\%(tz\|dos1xfloppy\)=/ nextgroup=fsOptionsString
syn match fsOptionsKeywords contained /\<\%(allow_utime\|codepage\)=/ nextgroup=fsOptionsNumber
syn match fsOptionsKeywords contained /\<time_offset=/ nextgroup=fsOptionsNumberSigned
syn keyword fsOptionsKeywords contained nonumtail posix utf8 usefree flush rodir
" Options: xfs
syn match fsOptionsKeywords contained /\%(biosize\|logbufs\|logbsize\|logdev\|rtdev\|sunit\|swidth\)=/ nextgroup=fsOptionsString
syn keyword fsOptionsKeywords contained dmapi xdsm noalign noatime noquota norecovery osyncisdsync quota usrquota uqnoenforce grpquota gqnoenforce
syn match fsOptionsKeywords contained /\<logbufs=/ nextgroup=fsOptionsXfsLogBufs
syn keyword fsOptionsXfsLogBufs contained 2 3 4 5 6 7 8
syn match fsOptionsKeywords contained /\%(allocsize\|biosize\|logbsize\|logdev\|rtdev\|sunit\|swidth\)=/ nextgroup=fsOptionsString
syn keyword fsOptionsKeywords contained dmapi xdsm noalign noatime noquota norecovery osyncisdsync quota usrquota uqnoenforce grpquota gqnoenforce attr2 noattr2 filestreams ikeep noikeep inode32 inode64 largeio nolargeio nouuid uquota qnoenforce gquota pquota pqnoenforce swalloc wsync
" Frequency / Pass No.
syn cluster fsFreqPassCluster contains=fsFreqPassNumber,fsFreqPassError
@@ -257,31 +420,71 @@ hi def link fsMountPointError Error
hi def link fsMountPointKeyword Keyword
hi def link fsFreqPassError Error
hi def link fsOptionsBtrfsDiscard String
hi def link fsOptionsBtrfsFatalErrors String
hi def link fsOptionsBtrfsFragment String
hi def link fsOptionsCache String
hi def link fsOptionsCephRecoverSession String
hi def link fsOptionsConv String
hi def link fsOptionsDax String
hi def link fsOptionsEroCacheStrategy String
hi def link fsOptionsErrors String
hi def link fsOptionsExt2Check String
hi def link fsOptionsExt3Data String
hi def link fsOptionsExt3DataErr String
hi def link fsOptionsExt3Journal String
hi def link fsOptionsExt3Jqfmt String
hi def link fsOptionsExt4Data String
hi def link fsOptionsExt4Journal String
hi def link fsOptionsExt4JournalIoprio Number
hi def link fsOptionsF2fsActiveLogs Number
hi def link fsOptionsF2fsAllocMode String
hi def link fsOptionsF2fsBackgroundGc String
hi def link fsOptionsF2fsCompressMode String
hi def link fsOptionsF2fsDiscardUnit String
hi def link fsOptionsF2fsFsyncMode String
hi def link fsOptionsF2fsMemory String
hi def link fsOptionsFatCheck String
hi def link fsOptionsFatType Number
hi def link fsOptionsGeneral Type
hi def link fsOptionsGfs2Quota String
hi def link fsOptionsHpfsCase String
hi def link fsOptionsHpfsChkdsk String
hi def link fsOptionsHpfsEas String
hi def link fsOptionsIsoMap String
hi def link fsOptionsKeywords Keyword
hi def link fsOptionsNfsLocalLock String
hi def link fsOptionsNfsLookupCache String
hi def link fsOptionsNilfs2Order String
hi def link fsOptionsNtfsMftZoneMultiplier Number
hi def link fsOptionsNumber Number
hi def link fsOptionsNumberOctal Number
hi def link fsOptionsString String
hi def link fsOptionsSize Number
hi def link fsOptionsExt2Check String
hi def link fsOptionsExt2Errors String
hi def link fsOptionsExt3Journal String
hi def link fsOptionsExt3Data String
hi def link fsOptionsExt4Journal String
hi def link fsOptionsExt4Data String
hi def link fsOptionsExt4Barrier Number
hi def link fsOptionsFatCheck String
hi def link fsOptionsConv String
hi def link fsOptionsFatType Number
hi def link fsOptionsYesNo String
hi def link fsOptionsHpfsCase String
hi def link fsOptionsIsoMap String
hi def link fsOptionsNumberSigned Number
hi def link fsOptionsOcfs2Coherency String
hi def link fsOptionsOcfs2ResvLevel Number
hi def link fsOptionsOverlayRedirectDir String
hi def link fsOptionsQnx4Bitmap String
hi def link fsOptionsQnx6Hold String
hi def link fsOptionsQnx6Sync String
hi def link fsOptionsReiserHash String
hi def link fsOptionsSecurityMode String
hi def link fsOptionsSize Number
hi def link fsOptionsSshYesNoAsk String
hi def link fsOptionsUfsType String
hi def link fsOptionsString String
hi def link fsOptionsTmpfsHuge String
hi def link fsOptionsUfsError String
hi def link fsOptionsUfsType String
hi def link fsOptionsV9Debug String
hi def link fsOptionsV9Trans String
hi def link fsOptionsV9Version String
hi def link fsOptionsVfatNfs String
hi def link fsOptionsVfatShortname String
hi def link fsOptionsXfsLogBufs Number
hi def link fsOptionsTrueFalse Boolean
hi def link fsOptionsYesNo String
hi def link fsOptionsYN String
hi def link fsOptions01 Number
let b:current_syntax = "fstab"

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: hg (Mercurial) commit file
" Language: hg/sl (Mercurial / Sapling) commit file
" Maintainer: Ken Takata <kentkt at csc dot jp>
" Last Change: 2012 Aug 23
" Filenames: hg-editor-*.txt
" Max Coplan <mchcopl@gmail.com>
" Last Change: 2022-12-08
" License: VIM License
" URL: https://github.com/k-takata/hg-vim
@@ -10,12 +10,15 @@ if exists("b:current_syntax")
finish
endif
syn match hgcommitComment "^HG:.*$" contains=@NoSpell
syn match hgcommitUser "^HG: user: \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
syn match hgcommitBranch "^HG: branch \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
syn match hgcommitAdded "^HG: \zsadded .*$" contains=@NoSpell contained containedin=hgcommitComment
syn match hgcommitChanged "^HG: \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment
syn match hgcommitRemoved "^HG: \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment
syn match hgcommitComment "^\%(SL\|HG\): .*$" contains=@NoSpell
syn match hgcommitUser "^\%(SL\|HG\): user: \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
syn match hgcommitBranch "^\%(SL\|HG\): branch \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
syn match hgcommitAdded "^\%(SL\|HG\): \zsadded .*$" contains=@NoSpell contained containedin=hgcommitComment
syn match hgcommitChanged "^\%(SL\|HG\): \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment
syn match hgcommitRemoved "^\%(SL\|HG\): \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment
syn region hgcommitDiff start=/\%(^\(SL\|HG\): diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@hgcommitDiff
syn include @hgcommitDiff syntax/shared/hgcommitDiff.vim
hi def link hgcommitComment Comment
hi def link hgcommitUser String

210
runtime/syntax/nix.vim Normal file
View File

@@ -0,0 +1,210 @@
" Vim syntax file
" Language: Nix
" Maintainer: James Fleming <james@electronic-quill.net>
" Original Author: Daiderd Jordan <daiderd@gmail.com>
" Acknowledgement: Based on vim-nix maintained by Daiderd Jordan <daiderd@gmail.com>
" https://github.com/LnL7/vim-nix
" License: MIT
" Last Change: 2022 Dec 06
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn keyword nixBoolean true false
syn keyword nixNull null
syn keyword nixRecKeyword rec
syn keyword nixOperator or
syn match nixOperator '!=\|!'
syn match nixOperator '<=\?'
syn match nixOperator '>=\?'
syn match nixOperator '&&'
syn match nixOperator '//\='
syn match nixOperator '=='
syn match nixOperator '?'
syn match nixOperator '||'
syn match nixOperator '++\='
syn match nixOperator '-'
syn match nixOperator '\*'
syn match nixOperator '->'
syn match nixParen '[()]'
syn match nixInteger '\d\+'
syn keyword nixTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
syn match nixComment '#.*' contains=nixTodo,@Spell
syn region nixComment start=+/\*+ end=+\*/+ contains=nixTodo,@Spell
syn region nixInterpolation matchgroup=nixInterpolationDelimiter start="\${" end="}" contained contains=@nixExpr,nixInterpolationParam
syn match nixSimpleStringSpecial /\\\%([nrt"\\$]\|$\)/ contained
syn match nixStringSpecial /''['$]/ contained
syn match nixStringSpecial /\$\$/ contained
syn match nixStringSpecial /''\\[nrt]/ contained
syn match nixSimpleStringSpecial /\$\$/ contained
syn match nixInvalidSimpleStringEscape /\\[^nrt"\\$]/ contained
syn match nixInvalidStringEscape /''\\[^nrt]/ contained
syn region nixSimpleString matchgroup=nixStringDelimiter start=+"+ skip=+\\"+ end=+"+ contains=nixInterpolation,nixSimpleStringSpecial,nixInvalidSimpleStringEscape
syn region nixString matchgroup=nixStringDelimiter start=+''+ skip=+''['$\\]+ end=+''+ contains=nixInterpolation,nixStringSpecial,nixInvalidStringEscape
syn match nixFunctionCall "[a-zA-Z_][a-zA-Z0-9_'-]*"
syn match nixPath "[a-zA-Z0-9._+-]*\%(/[a-zA-Z0-9._+-]\+\)\+"
syn match nixHomePath "\~\%(/[a-zA-Z0-9._+-]\+\)\+"
syn match nixSearchPath "[a-zA-Z0-9._+-]\+\%(\/[a-zA-Z0-9._+-]\+\)*" contained
syn match nixPathDelimiter "[<>]" contained
syn match nixSearchPathRef "<[a-zA-Z0-9._+-]\+\%(\/[a-zA-Z0-9._+-]\+\)*>" contains=nixSearchPath,nixPathDelimiter
syn match nixURI "[a-zA-Z][a-zA-Z0-9.+-]*:[a-zA-Z0-9%/?:@&=$,_.!~*'+-]\+"
syn match nixAttributeDot "\." contained
syn match nixAttribute "[a-zA-Z_][a-zA-Z0-9_'-]*\ze\%([^a-zA-Z0-9_'.-]\|$\)" contained
syn region nixAttributeAssignment start="=" end="\ze;" contained contains=@nixExpr
syn region nixAttributeDefinition start=/\ze[a-zA-Z_"$]/ end=";" contained contains=nixComment,nixAttribute,nixInterpolation,nixSimpleString,nixAttributeDot,nixAttributeAssignment
syn region nixInheritAttributeScope start="(" end="\ze)" contained contains=@nixExpr
syn region nixAttributeDefinition matchgroup=nixInherit start="\<inherit\>" end=";" contained contains=nixComment,nixInheritAttributeScope,nixAttribute
syn region nixAttributeSet start="{" end="}" contains=nixComment,nixAttributeDefinition
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
syn region nixArgumentDefinitionWithDefault matchgroup=nixArgumentDefinition start="[a-zA-Z_][a-zA-Z0-9_'-]*\ze\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*?\@=" matchgroup=NONE end="[,}]\@=" transparent contained contains=@nixExpr
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
syn match nixArgumentDefinition "[a-zA-Z_][a-zA-Z0-9_'-]*\ze\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*[,}]\@=" contained
syn match nixArgumentEllipsis "\.\.\." contained
syn match nixArgumentSeparator "," contained
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
syn match nixArgOperator '@\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*[a-zA-Z_][a-zA-Z0-9_'-]*\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*:'he=s+1 contained contains=nixAttribute
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
syn match nixArgOperator '[a-zA-Z_][a-zA-Z0-9_'-]*\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*@'hs=e-1 contains=nixAttribute nextgroup=nixFunctionArgument
" This is a bit more complicated, because function arguments can be passed in a
" very similar form on how attribute sets are defined and two regions with the
" same start patterns will shadow each other. Instead of a region we could use a
" match on {\_.\{-\}}, which unfortunately doesn't take nesting into account.
"
" So what we do instead is that we look forward until we are sure that it's a
" function argument. Unfortunately, we need to catch comments and both vertical
" and horizontal white space, which the following regex should hopefully do:
"
" "\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*"
"
" It is also used throught the whole file and is marked with 'v's as well.
"
" Fortunately the matching rules for function arguments are much simpler than
" for real attribute sets, because we can stop when we hit the first ellipsis or
" default value operator, but we also need to paste the "whitespace & comments
" eating" regex all over the place (marked with 'v's):
"
" Region match 1: { foo ? ... } or { foo, ... } or { ... } (ellipsis)
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv {----- identifier -----}vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
syn region nixFunctionArgument start="{\ze\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*\%([a-zA-Z_][a-zA-Z0-9_'-]*\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*[,?}]\|\.\.\.\)" end="}" contains=nixComment,nixArgumentDefinitionWithDefault,nixArgumentDefinition,nixArgumentEllipsis,nixArgumentSeparator nextgroup=nixArgOperator
" Now it gets more tricky, because we need to look forward for the colon, but
" there could be something like "{}@foo:", even though it's highly unlikely.
"
" Region match 2: {}
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv@vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv{----- identifier -----} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
syn region nixFunctionArgument start="{\ze\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*}\%(\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*@\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*[a-zA-Z_][a-zA-Z0-9_'-]*\)\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*:" end="}" contains=nixComment nextgroup=nixArgOperator
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
syn match nixSimpleFunctionArgument "[a-zA-Z_][a-zA-Z0-9_'-]*\ze\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*:\([\n ]\)\@="
syn region nixList matchgroup=nixListBracket start="\[" end="\]" contains=@nixExpr
syn region nixLetExpr matchgroup=nixLetExprKeyword start="\<let\>" end="\<in\>" contains=nixComment,nixAttributeDefinition
syn keyword nixIfExprKeyword then contained
syn region nixIfExpr matchgroup=nixIfExprKeyword start="\<if\>" end="\<else\>" contains=@nixExpr,nixIfExprKeyword
syn region nixWithExpr matchgroup=nixWithExprKeyword start="\<with\>" matchgroup=NONE end=";" contains=@nixExpr
syn region nixAssertExpr matchgroup=nixAssertKeyword start="\<assert\>" matchgroup=NONE end=";" contains=@nixExpr
syn cluster nixExpr contains=nixBoolean,nixNull,nixOperator,nixParen,nixInteger,nixRecKeyword,nixConditional,nixBuiltin,nixSimpleBuiltin,nixComment,nixFunctionCall,nixFunctionArgument,nixArgOperator,nixSimpleFunctionArgument,nixPath,nixHomePath,nixSearchPathRef,nixURI,nixAttributeSet,nixList,nixSimpleString,nixString,nixLetExpr,nixIfExpr,nixWithExpr,nixAssertExpr,nixInterpolation
" These definitions override @nixExpr and have to come afterwards:
syn match nixInterpolationParam "[a-zA-Z_][a-zA-Z0-9_'-]*\%(\.[a-zA-Z_][a-zA-Z0-9_'-]*\)*" contained
" Non-namespaced Nix builtins as of version 2.0:
syn keyword nixSimpleBuiltin
\ abort baseNameOf derivation derivationStrict dirOf fetchGit
\ fetchMercurial fetchTarball import isNull map mapAttrs placeholder removeAttrs
\ scopedImport throw toString
" Namespaced and non-namespaced Nix builtins as of version 2.0:
syn keyword nixNamespacedBuiltin contained
\ abort add addErrorContext all any attrNames attrValues baseNameOf
\ catAttrs compareVersions concatLists concatStringsSep currentSystem
\ currentTime deepSeq derivation derivationStrict dirOf div elem elemAt
\ fetchGit fetchMercurial fetchTarball fetchurl filter \ filterSource
\ findFile foldl' fromJSON functionArgs genList \ genericClosure getAttr
\ getEnv hasAttr hasContext hashString head import intersectAttrs isAttrs
\ isBool isFloat isFunction isInt isList isNull isString langVersion
\ length lessThan listToAttrs map mapAttrs match mul nixPath nixVersion
\ parseDrvName partition path pathExists placeholder readDir readFile
\ removeAttrs replaceStrings scopedImport seq sort split splitVersion
\ storeDir storePath stringLength sub substring tail throw toFile toJSON
\ toPath toString toXML trace tryEval typeOf unsafeDiscardOutputDependency
\ unsafeDiscardStringContext unsafeGetAttrPos valueSize fromTOML bitAnd
\ bitOr bitXor floor ceil
syn match nixBuiltin "builtins\.[a-zA-Z']\+"he=s+9 contains=nixComment,nixNamespacedBuiltin
hi def link nixArgOperator Operator
hi def link nixArgumentDefinition Identifier
hi def link nixArgumentEllipsis Operator
hi def link nixAssertKeyword Keyword
hi def link nixAttribute Identifier
hi def link nixAttributeDot Operator
hi def link nixBoolean Boolean
hi def link nixBuiltin Special
hi def link nixComment Comment
hi def link nixConditional Conditional
hi def link nixHomePath Include
hi def link nixIfExprKeyword Keyword
hi def link nixInherit Keyword
hi def link nixInteger Integer
hi def link nixInterpolation Macro
hi def link nixInterpolationDelimiter Delimiter
hi def link nixInterpolationParam Macro
hi def link nixInvalidSimpleStringEscape Error
hi def link nixInvalidStringEscape Error
hi def link nixLetExprKeyword Keyword
hi def link nixNamespacedBuiltin Special
hi def link nixNull Constant
hi def link nixOperator Operator
hi def link nixPath Include
hi def link nixPathDelimiter Delimiter
hi def link nixRecKeyword Keyword
hi def link nixSearchPath Include
hi def link nixSimpleBuiltin Keyword
hi def link nixSimpleFunctionArgument Identifier
hi def link nixSimpleString String
hi def link nixSimpleStringSpecial SpecialChar
hi def link nixString String
hi def link nixStringDelimiter Delimiter
hi def link nixStringSpecial Special
hi def link nixTodo Todo
hi def link nixURI Include
hi def link nixWithExprKeyword Keyword
" This could lead up to slow syntax highlighting for large files, but usually
" large files such as all-packages.nix are one large attribute set, so if we'd
" use sync patterns we'd have to go back to the start of the file anyway
syn sync fromstart
let b:current_syntax = "nix"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -2,7 +2,7 @@
" Language: rego policy language
" Maintainer: Matt Dunford (zenmatic@gmail.com)
" URL: https://github.com/zenmatic/vim-syntax-rego
" Last Change: 2019 Dec 12
" Last Change: 2022 Dec 4
" https://www.openpolicyagent.org/docs/latest/policy-language/
@@ -14,36 +14,56 @@ endif
syn case match
syn keyword regoDirective package import allow deny
syn keyword regoKeywords as default else false not null true with some
syn keyword regoKeywords as default else every false if import package not null true with some in print
syn keyword regoFuncAggregates count sum product max min sort all any
syn match regoFuncArrays "\<array\.\(concat\|slice\)\>"
syn match regoFuncArrays "\<array\.\(concat\|slice\|reverse\)\>"
syn keyword regoFuncSets intersection union
syn keyword regoFuncStrings concat /\<contains\>/ endswith format_int indexof lower replace split sprintf startswith substring trim trim_left trim_prefix trim_right trim_suffix trim_space upper
syn match regoFuncStrings2 "\<strings\.replace_n\>"
syn keyword regoFuncStrings concat /\<contains\>/ endswith format_int indexof indexof_n lower replace split sprintf startswith substring trim trim_left trim_prefix trim_right trim_suffix trim_space upper
syn match regoFuncStrings2 "\<strings\.\(replace_n\|reverse\|any_prefix_match\|any_suffix_match\)\>"
syn match regoFuncStrings3 "\<contains\>"
syn keyword regoFuncRegex re_match
syn match regoFuncRegex2 "\<regex\.\(split\|globs_match\|template_match\|find_n\|find_all_string_submatch_n\)\>"
syn match regoFuncRegex2 "\<regex\.\(is_valid\|split\|globs_match\|template_match\|find_n\|find_all_string_submatch_n\|replace\)\>"
syn match regoFuncUuid "\<uuid.rfc4122\>"
syn match regoFuncBits "\<bits\.\(or\|and\|negate\|xor\|lsh\|rsh\)\>"
syn match regoFuncObject "\<object\.\(get\|remove\|subset\|union\|union_n\|filter\)\>"
syn match regoFuncGlob "\<glob\.\(match\|quote_meta\)\>"
syn match regoFuncUnits "\<units\.parse_bytes\>"
syn match regoFuncUnits "\<units\.parse\(_bytes\)\=\>"
syn keyword regoFuncTypes is_number is_string is_boolean is_array is_set is_object is_null type_name
syn match regoFuncEncoding1 "\<\(base64\|base64url\)\.\(encode\|decode\)\>"
syn match regoFuncEncoding2 "\<urlquery\.\(encode\|decode\|encode_object\)\>"
syn match regoFuncEncoding3 "\<\(json\|yaml\)\.\(marshal\|unmarshal\)\>"
syn match regoFuncEncoding1 "\<base64\.\(encode\|decode\|is_valid\)\>"
syn match regoFuncEncoding2 "\<base64url\.\(encode\(_no_pad\)\=\|decode\)\>"
syn match regoFuncEncoding3 "\<urlquery\.\(encode\|decode\|\(en\|de\)code_object\)\>"
syn match regoFuncEncoding4 "\<\(json\|yaml\)\.\(is_valid\|marshal\|unmarshal\)\>"
syn match regoFuncEncoding5 "\<json\.\(filter\|patch\|remove\)\>"
syn match regoFuncTokenSigning "\<io\.jwt\.\(encode_sign_raw\|encode_sign\)\>"
syn match regoFuncTokenVerification "\<io\.jwt\.\(verify_rs256\|verify_ps256\|verify_es256\|verify_hs256\|decode\|decode_verify\)\>"
syn match regoFuncTime "\<time\.\(now_ns\|parse_ns\|parse_rfc3339_ns\|parse_duration_ns\|date\|clock\|weekday\)\>"
syn match regoFuncCryptography "\<crypto\.x509\.parse_certificates\>"
syn match regoFuncTokenVerification1 "\<io\.jwt\.\(decode\|decode_verify\)\>"
syn match regoFuncTokenVerification2 "\<io\.jwt\.verify_\(rs\|ps\|es\|hs\)\(256\|384\|512\)\>"
syn match regoFuncTime "\<time\.\(now_ns\|parse_ns\|parse_rfc3339_ns\|parse_duration_ns\|date\|clock\|weekday\|diff\|add_date\)\>"
syn match regoFuncCryptography "\<crypto\.x509\.\(parse_certificates\|parse_certificate_request\|parse_and_verify_certificates\|parse_rsa_private_key\)\>"
syn match regoFuncCryptography "\<crypto\.\(md5\|sha1\|sha256\)"
syn match regoFuncCryptography "\<crypto\.hmac\.\(md5\|sha1\|sha256\|sha512\)"
syn keyword regoFuncGraphs walk
syn match regoFuncGraphs2 "\<graph\.reachable\(_paths\)\=\>"
syn match regoFuncGraphQl "\<graphql\.\(\(schema_\)\=is_valid\|parse\(_\(and_verify\|query\|schema\)\)\=\)\>"
syn match regoFuncHttp "\<http\.send\>"
syn match regoFuncNet "\<net\.\(cidr_contains\|cidr_intersects\)\>"
syn match regoFuncRego "\<rego\.parse_module\>"
syn match regoFuncNet "\<net\.\(cidr_merge\|cidr_contains\|cidr_contains_matches\|cidr_intersects\|cidr_expand\|lookup_ip_addr\|cidr_is_valid\)\>"
syn match regoFuncRego "\<rego\.\(parse_module\|metadata\.\(rule\|chain\)\)\>"
syn match regoFuncOpa "\<opa\.runtime\>"
syn keyword regoFuncDebugging trace
syn match regoFuncRand "\<rand\.intn\>"
syn match regoFuncNumbers "\<numbers\.\(range\|intn\)\>"
syn keyword regoFuncNumbers round ceil floor abs
syn match regoFuncSemver "\<semver\.\(is_valid\|compare\)\>"
syn keyword regoFuncConversions to_number
syn match regoFuncHex "\<hex\.\(encode\|decode\)\>"
hi def link regoFuncUuid Statement
hi def link regoFuncBits Statement
hi def link regoDirective Statement
hi def link regoKeywords Statement
hi def link regoFuncAggregates Statement
@@ -60,16 +80,27 @@ hi def link regoFuncTypes Statement
hi def link regoFuncEncoding1 Statement
hi def link regoFuncEncoding2 Statement
hi def link regoFuncEncoding3 Statement
hi def link regoFuncEncoding4 Statement
hi def link regoFuncEncoding5 Statement
hi def link regoFuncTokenSigning Statement
hi def link regoFuncTokenVerification Statement
hi def link regoFuncTokenVerification1 Statement
hi def link regoFuncTokenVerification2 Statement
hi def link regoFuncTime Statement
hi def link regoFuncCryptography Statement
hi def link regoFuncGraphs Statement
hi def link regoFuncGraphQl Statement
hi def link regoFuncGraphs2 Statement
hi def link regoFuncHttp Statement
hi def link regoFuncNet Statement
hi def link regoFuncRego Statement
hi def link regoFuncOpa Statement
hi def link regoFuncDebugging Statement
hi def link regoFuncObject Statement
hi def link regoFuncNumbers Statement
hi def link regoFuncSemver Statement
hi def link regoFuncConversions Statement
hi def link regoFuncHex Statement
hi def link regoFuncRand Statement
" https://www.openpolicyagent.org/docs/latest/policy-language/#strings
syn region regoString start=+"+ skip=+\\\\\|\\"+ end=+"+

View File

@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
" Last Change: Jul 08, 2022
" Version: 203
" Last Change: Nov 25, 2022
" Version: 204
" 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) and heredoc fixes from Felipe Contreras
@@ -84,15 +84,9 @@ elseif g:sh_fold_enabled != 0 && !has("folding")
let g:sh_fold_enabled= 0
echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; need to re-compile vim for +fold support"
endif
if !exists("s:sh_fold_functions")
let s:sh_fold_functions= and(g:sh_fold_enabled,1)
endif
if !exists("s:sh_fold_heredoc")
let s:sh_fold_heredoc = and(g:sh_fold_enabled,2)
endif
if !exists("s:sh_fold_ifdofor")
let s:sh_fold_ifdofor = and(g:sh_fold_enabled,4)
endif
let s:sh_fold_functions= and(g:sh_fold_enabled,1)
let s:sh_fold_heredoc = and(g:sh_fold_enabled,2)
let s:sh_fold_ifdofor = and(g:sh_fold_enabled,4)
if g:sh_fold_enabled && &fdm == "manual"
" Given that the user provided g:sh_fold_enabled
" AND g:sh_fold_enabled is manual (usual default)
@@ -113,6 +107,9 @@ endif
" Set up folding commands for shell {{{1
" =================================
sil! delc ShFoldFunctions
sil! delc ShFoldHereDoc
sil! delc ShFoldIfDoFor
if s:sh_fold_functions
com! -nargs=* ShFoldFunctions <args> fold
else
@@ -415,22 +412,22 @@ syn match shBQComment contained "#.\{-}\ze`" contains=@shCommentGroup
" Here Documents: {{{1
" (modified by Felipe Contreras)
" =========================================
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc02 end="^\s*\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*\\\z([^ \t|>]\+\)" 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([^']\+\)'" matchgroup=shHereDoc06 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc07 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<-\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc08 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc09 end="^\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\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([^']\+\)'" matchgroup=shHereDoc13 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<-\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc14 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc15 end="^\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc16 end="^\s*\z1\s*$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc02 end="^\s*\z1$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc04 end="^\s*\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^']\+\)'" matchgroup=shHereDoc05 end="^\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc06 end="^\s*\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc07 end="^\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<-\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc08 end="^\s*\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc09 end="^\z1$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1$" contains=@shDblQuoteList
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc12 end="^\s*\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc13 end="^\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<-\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc14 end="^\s*\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc15 end="^\z1$"
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc16 end="^\s*\z1$"
" Here Strings: {{{1

View File

@@ -0,0 +1,390 @@
" Vim syntax file
" Language: Sapling / Mecurial Diff (context or unified)
" Maintainer: Max Coplan <mchcopl@gmail.com>
" Translations by Jakson Alves de Aquino.
" Last Change: 2022-12-08
" Copied from: runtime/syntax/diff.vim
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
finish
endif
scriptencoding utf-8
syn match hgDiffOnly "^\%(SL\|HG\): Only in .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Files .* and .* are identical$"
syn match hgDiffDiffer "^\%(SL\|HG\): Files .* and .* differ$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Binary files .* and .* differ$"
syn match hgDiffIsA "^\%(SL\|HG\): File .* is a .* while file .* is a .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ No newline at end of file .*"
syn match hgDiffCommon "^\%(SL\|HG\): Common subdirectories: .*"
" Disable the translations by setting diff_translations to zero.
if !exists("diff_translations") || diff_translations
" ca
syn match hgDiffOnly "^\%(SL\|HG\): Només a .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Els fitxers .* i .* són idèntics$"
syn match hgDiffDiffer "^\%(SL\|HG\): Els fitxers .* i .* difereixen$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Els fitxers .* i .* difereixen$"
syn match hgDiffIsA "^\%(SL\|HG\): El fitxer .* és un .* mentre que el fitxer .* és un .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ No hi ha cap caràcter de salt de línia al final del fitxer"
syn match hgDiffCommon "^\%(SL\|HG\): Subdirectoris comuns: .* i .*"
" cs
syn match hgDiffOnly "^\%(SL\|HG\): Pouze v .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Soubory .* a .* jsou identické$"
syn match hgDiffDiffer "^\%(SL\|HG\): Soubory .* a .* jsou různé$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Binární soubory .* a .* jsou rozdílné$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Soubory .* a .* jsou různé$"
syn match hgDiffIsA "^\%(SL\|HG\): Soubor .* je .* pokud soubor .* je .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Chybí znak konce řádku na konci souboru"
syn match hgDiffCommon "^\%(SL\|HG\): Společné podadresáře: .* a .*"
" da
syn match hgDiffOnly "^\%(SL\|HG\): Kun i .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Filerne .* og .* er identiske$"
syn match hgDiffDiffer "^\%(SL\|HG\): Filerne .* og .* er forskellige$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Binære filer .* og .* er forskellige$"
syn match hgDiffIsA "^\%(SL\|HG\): Filen .* er en .* mens filen .* er en .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Intet linjeskift ved filafslutning"
syn match hgDiffCommon "^\%(SL\|HG\): Identiske underkataloger: .* og .*"
" de
syn match hgDiffOnly "^\%(SL\|HG\): Nur in .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Dateien .* und .* sind identisch.$"
syn match hgDiffDiffer "^\%(SL\|HG\): Dateien .* und .* sind verschieden.$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Binärdateien .* and .* sind verschieden.$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Binärdateien .* und .* sind verschieden.$"
syn match hgDiffIsA "^\%(SL\|HG\): Datei .* ist ein .* während Datei .* ein .* ist.$"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Kein Zeilenumbruch am Dateiende."
syn match hgDiffCommon "^\%(SL\|HG\): Gemeinsame Unterverzeichnisse: .* und .*.$"
" el
syn match hgDiffOnly "^\%(SL\|HG\): Μόνο στο .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Τα αρχεία .* καί .* είναι πανομοιότυπα$"
syn match hgDiffDiffer "^\%(SL\|HG\): Τα αρχεία .* και .* διαφέρουν$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Τα αρχεία .* και .* διαφέρουν$"
syn match hgDiffIsA "^\%(SL\|HG\): Το αρχείο .* είναι .* ενώ το αρχείο .* είναι .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Δεν υπάρχει χαρακτήρας νέας γραμμής στο τέλος του αρχείου"
syn match hgDiffCommon "^\%(SL\|HG\): Οι υποκατάλογοι .* και .* είναι ταυτόσημοι$"
" eo
syn match hgDiffOnly "^\%(SL\|HG\): Nur en .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Dosieroj .* kaj .* estas samaj$"
syn match hgDiffDiffer "^\%(SL\|HG\): Dosieroj .* kaj .* estas malsamaj$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Dosieroj .* kaj .* estas malsamaj$"
syn match hgDiffIsA "^\%(SL\|HG\): Dosiero .* estas .*, dum dosiero .* estas .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Mankas linifino ĉe fino de dosiero"
syn match hgDiffCommon "^\%(SL\|HG\): Komunaj subdosierujoj: .* kaj .*"
" es
syn match hgDiffOnly "^\%(SL\|HG\): Sólo en .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Los ficheros .* y .* son idénticos$"
syn match hgDiffDiffer "^\%(SL\|HG\): Los ficheros .* y .* son distintos$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Los ficheros binarios .* y .* son distintos$"
syn match hgDiffIsA "^\%(SL\|HG\): El fichero .* es un .* mientras que el .* es un .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ No hay ningún carácter de nueva línea al final del fichero"
syn match hgDiffCommon "^\%(SL\|HG\): Subdirectorios comunes: .* y .*"
" fi
syn match hgDiffOnly "^\%(SL\|HG\): Vain hakemistossa .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Tiedostot .* ja .* ovat identtiset$"
syn match hgDiffDiffer "^\%(SL\|HG\): Tiedostot .* ja .* eroavat$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Binääritiedostot .* ja .* eroavat$"
syn match hgDiffIsA "^\%(SL\|HG\): Tiedosto .* on .*, kun taas tiedosto .* on .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Ei rivinvaihtoa tiedoston lopussa"
syn match hgDiffCommon "^\%(SL\|HG\): Yhteiset alihakemistot: .* ja .*"
" fr
syn match hgDiffOnly "^\%(SL\|HG\): Seulement dans .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Les fichiers .* et .* sont identiques.*"
syn match hgDiffDiffer "^\%(SL\|HG\): Les fichiers .* et .* sont différents.*"
syn match hgDiffBDiffer "^\%(SL\|HG\): Les fichiers binaires .* et .* sont différents.*"
syn match hgDiffIsA "^\%(SL\|HG\): Le fichier .* est un .* alors que le fichier .* est un .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Pas de fin de ligne à la fin du fichier.*"
syn match hgDiffCommon "^\%(SL\|HG\): Les sous-répertoires .* et .* sont identiques.*"
" ga
syn match hgDiffOnly "^\%(SL\|HG\): I .* amháin: .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Is comhionann iad na comhaid .* agus .*"
syn match hgDiffDiffer "^\%(SL\|HG\): Tá difríocht idir na comhaid .* agus .*"
syn match hgDiffBDiffer "^\%(SL\|HG\): Tá difríocht idir na comhaid .* agus .*"
syn match hgDiffIsA "^\%(SL\|HG\): Tá comhad .* ina .* ach tá comhad .* ina .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Gan líne nua ag an chomhadchríoch"
syn match hgDiffCommon "^\%(SL\|HG\): Fochomhadlanna i gcoitianta: .* agus .*"
" gl
syn match hgDiffOnly "^\%(SL\|HG\): Só en .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Os ficheiros .* e .* son idénticos$"
syn match hgDiffDiffer "^\%(SL\|HG\): Os ficheiros .* e .* son diferentes$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Os ficheiros binarios .* e .* son diferentes$"
syn match hgDiffIsA "^\%(SL\|HG\): O ficheiro .* é un .* mentres que o ficheiro .* é un .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Non hai un salto de liña na fin da liña"
syn match hgDiffCommon "^\%(SL\|HG\): Subdirectorios comúns: .* e .*"
" he
" ^\%(SL\|HG\): .* are expansive patterns for long lines, so disabled unless we can match
" some specific hebrew chars
if search('\%u05d5\|\%u05d1', 'nw', '', 100)
syn match hgDiffOnly "^\%(SL\|HG\): .*-ב קר אצמנ .*"
syn match hgDiffIdentical "^\%(SL\|HG\): םיהז םניה .*-ו .* םיצבקה$"
syn match hgDiffDiffer "^\%(SL\|HG\): הזמ הז םינוש `.*'-ו `.*' םיצבקה$"
syn match hgDiffBDiffer "^\%(SL\|HG\): הזמ הז םינוש `.*'-ו `.*' םיירניב םיצבק$"
syn match hgDiffIsA "^\%(SL\|HG\): .* .*-ל .* .* תוושהל ןתינ אל$"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ ץבוקה ףוסב השד.-הרוש ות רס."
syn match hgDiffCommon "^\%(SL\|HG\): .*-ו .* :תוהז תויקית-תת$"
endif
" hr
syn match hgDiffOnly "^\%(SL\|HG\): Samo u .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Datoteke .* i .* su identične$"
syn match hgDiffDiffer "^\%(SL\|HG\): Datoteke .* i .* se razlikuju$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Binarne datoteke .* i .* se razlikuju$"
syn match hgDiffIsA "^\%(SL\|HG\): Datoteka .* je .*, a datoteka .* je .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nema novog retka na kraju datoteke"
syn match hgDiffCommon "^\%(SL\|HG\): Uobičajeni poddirektoriji: .* i .*"
" hu
syn match hgDiffOnly "^\%(SL\|HG\): Csak .* -ben: .*"
syn match hgDiffIdentical "^\%(SL\|HG\): .* és .* fájlok azonosak$"
syn match hgDiffDiffer "^\%(SL\|HG\): A(z) .* és a(z) .* fájlok különböznek$"
syn match hgDiffBDiffer "^\%(SL\|HG\): A(z) .* és a(z) .* fájlok különböznek$"
syn match hgDiffIsA "^\%(SL\|HG\): A(z) .* fájl egy .*, viszont a(z) .* fájl egy .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nincs újsor a fájl végén"
syn match hgDiffCommon "^\%(SL\|HG\): Közös alkönyvtárak: .* és .*"
" id
syn match hgDiffOnly "^\%(SL\|HG\): Hanya dalam .*"
syn match hgDiffIdentical "^\%(SL\|HG\): File .* dan .* identik$"
syn match hgDiffDiffer "^\%(SL\|HG\): Berkas .* dan .* berbeda$"
syn match hgDiffBDiffer "^\%(SL\|HG\): File biner .* dan .* berbeda$"
syn match hgDiffIsA "^\%(SL\|HG\): File .* adalah .* sementara file .* adalah .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Tidak ada baris-baru di akhir dari berkas"
syn match hgDiffCommon "^\%(SL\|HG\): Subdirektori sama: .* dan .*"
" it
syn match hgDiffOnly "^\%(SL\|HG\): Solo in .*"
syn match hgDiffIdentical "^\%(SL\|HG\): I file .* e .* sono identici$"
syn match hgDiffDiffer "^\%(SL\|HG\): I file .* e .* sono diversi$"
syn match hgDiffBDiffer "^\%(SL\|HG\): I file .* e .* sono diversi$"
syn match hgDiffBDiffer "^\%(SL\|HG\): I file binari .* e .* sono diversi$"
syn match hgDiffIsA "^\%(SL\|HG\): File .* è un .* mentre file .* è un .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Manca newline alla fine del file"
syn match hgDiffCommon "^\%(SL\|HG\): Sottodirectory in comune: .* e .*"
" ja
syn match hgDiffOnly "^\%(SL\|HG\): .*だけに発見: .*"
syn match hgDiffIdentical "^\%(SL\|HG\): ファイル.*と.*は同一$"
syn match hgDiffDiffer "^\%(SL\|HG\): ファイル.*と.*は違います$"
syn match hgDiffBDiffer "^\%(SL\|HG\): バイナリー・ファイル.*と.*は違います$"
syn match hgDiffIsA "^\%(SL\|HG\): ファイル.*は.*、ファイル.*は.*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ ファイル末尾に改行がありません"
syn match hgDiffCommon "^\%(SL\|HG\): 共通の下位ディレクトリー: .*と.*"
" ja DiffUtils 3.3
syn match hgDiffOnly "^\%(SL\|HG\): .* のみに存在: .*"
syn match hgDiffIdentical "^\%(SL\|HG\): ファイル .* と .* は同一です$"
syn match hgDiffDiffer "^\%(SL\|HG\): ファイル .* と .* は異なります$"
syn match hgDiffBDiffer "^\%(SL\|HG\): バイナリーファイル .* と.* は異なります$"
syn match hgDiffIsA "^\%(SL\|HG\): ファイル .* は .* です。一方、ファイル .* は .* です$"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ ファイル末尾に改行がありません"
syn match hgDiffCommon "^\%(SL\|HG\): 共通のサブディレクトリー: .* と .*"
" lv
syn match hgDiffOnly "^\%(SL\|HG\): Tikai iekš .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Fails .* un .* ir identiski$"
syn match hgDiffDiffer "^\%(SL\|HG\): Faili .* un .* atšķiras$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Faili .* un .* atšķiras$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Binārie faili .* un .* atšķiras$"
syn match hgDiffIsA "^\%(SL\|HG\): Fails .* ir .* kamēr fails .* ir .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nav jaunu rindu faila beigās"
syn match hgDiffCommon "^\%(SL\|HG\): Kopējās apakšdirektorijas: .* un .*"
" ms
syn match hgDiffOnly "^\%(SL\|HG\): Hanya dalam .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Fail .* dan .* adalah serupa$"
syn match hgDiffDiffer "^\%(SL\|HG\): Fail .* dan .* berbeza$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Fail .* dan .* berbeza$"
syn match hgDiffIsA "^\%(SL\|HG\): Fail .* adalah .* manakala fail .* adalah .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Tiada baris baru pada penghujung fail"
syn match hgDiffCommon "^\%(SL\|HG\): Subdirektori umum: .* dan .*"
" nl
syn match hgDiffOnly "^\%(SL\|HG\): Alleen in .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Bestanden .* en .* zijn identiek$"
syn match hgDiffDiffer "^\%(SL\|HG\): Bestanden .* en .* zijn verschillend$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Bestanden .* en .* zijn verschillend$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Binaire bestanden .* en .* zijn verschillend$"
syn match hgDiffIsA "^\%(SL\|HG\): Bestand .* is een .* terwijl bestand .* een .* is$"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Geen regeleindeteken (LF) aan einde van bestand"
syn match hgDiffCommon "^\%(SL\|HG\): Gemeenschappelijke submappen: .* en .*"
" pl
syn match hgDiffOnly "^\%(SL\|HG\): Tylko w .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Pliki .* i .* są identyczne$"
syn match hgDiffDiffer "^\%(SL\|HG\): Pliki .* i .* różnią się$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Pliki .* i .* różnią się$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Binarne pliki .* i .* różnią się$"
syn match hgDiffIsA "^\%(SL\|HG\): Plik .* jest .*, podczas gdy plik .* jest .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Brak znaku nowej linii na końcu pliku"
syn match hgDiffCommon "^\%(SL\|HG\): Wspólne podkatalogi: .* i .*"
" pt_BR
syn match hgDiffOnly "^\%(SL\|HG\): Somente em .*"
syn match hgDiffOnly "^\%(SL\|HG\): Apenas em .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Os aquivos .* e .* são idênticos$"
syn match hgDiffDiffer "^\%(SL\|HG\): Os arquivos .* e .* são diferentes$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Os arquivos binários .* e .* são diferentes$"
syn match hgDiffIsA "^\%(SL\|HG\): O arquivo .* é .* enquanto o arquivo .* é .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Falta o caracter nova linha no final do arquivo"
syn match hgDiffCommon "^\%(SL\|HG\): Subdiretórios idênticos: .* e .*"
" ro
syn match hgDiffOnly "^\%(SL\|HG\): Doar în .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Fişierele .* şi .* sunt identice$"
syn match hgDiffDiffer "^\%(SL\|HG\): Fişierele .* şi .* diferă$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Fişierele binare .* şi .* diferă$"
syn match hgDiffIsA "^\%(SL\|HG\): Fişierul .* este un .* pe când fişierul .* este un .*.$"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nici un element de linie nouă la sfârşitul fişierului"
syn match hgDiffCommon "^\%(SL\|HG\): Subdirectoare comune: .* şi .*.$"
" ru
syn match hgDiffOnly "^\%(SL\|HG\): Только в .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Файлы .* и .* идентичны$"
syn match hgDiffDiffer "^\%(SL\|HG\): Файлы .* и .* различаются$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Файлы .* и .* различаются$"
syn match hgDiffIsA "^\%(SL\|HG\): Файл .* это .*, тогда как файл .* -- .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ В конце файла нет новой строки"
syn match hgDiffCommon "^\%(SL\|HG\): Общие подкаталоги: .* и .*"
" sr
syn match hgDiffOnly "^\%(SL\|HG\): Само у .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Датотеке „.*“ и „.*“ се подударају$"
syn match hgDiffDiffer "^\%(SL\|HG\): Датотеке .* и .* различите$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Бинарне датотеке .* и .* различите$"
syn match hgDiffIsA "^\%(SL\|HG\): Датотека „.*“ је „.*“ док је датотека „.*“ „.*“$"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Без новог реда на крају датотеке"
syn match hgDiffCommon "^\%(SL\|HG\): Заједнички поддиректоријуми: .* и .*"
" sv
syn match hgDiffOnly "^\%(SL\|HG\): Endast i .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Filerna .* och .* är lika$"
syn match hgDiffDiffer "^\%(SL\|HG\): Filerna .* och .* skiljer$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Filerna .* och .* skiljer$"
syn match hgDiffIsA "^\%(SL\|HG\): Fil .* är en .* medan fil .* är en .*"
syn match hgDiffBDiffer "^\%(SL\|HG\): De binära filerna .* och .* skiljer$"
syn match hgDiffIsA "^\%(SL\|HG\): Filen .* är .* medan filen .* är .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Ingen nyrad vid filslut"
syn match hgDiffCommon "^\%(SL\|HG\): Lika underkataloger: .* och .*"
" tr
syn match hgDiffOnly "^\%(SL\|HG\): Yalnızca .*'da: .*"
syn match hgDiffIdentical "^\%(SL\|HG\): .* ve .* dosyaları birbirinin aynı$"
syn match hgDiffDiffer "^\%(SL\|HG\): .* ve .* dosyaları birbirinden farklı$"
syn match hgDiffBDiffer "^\%(SL\|HG\): .* ve .* dosyaları birbirinden farklı$"
syn match hgDiffBDiffer "^\%(SL\|HG\): İkili .* ve .* birbirinden farklı$"
syn match hgDiffIsA "^\%(SL\|HG\): .* dosyası, bir .*, halbuki .* dosyası bir .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Dosya sonunda yenisatır yok."
syn match hgDiffCommon "^\%(SL\|HG\): Ortak alt dizinler: .* ve .*"
" uk
syn match hgDiffOnly "^\%(SL\|HG\): Лише у .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Файли .* та .* ідентичні$"
syn match hgDiffDiffer "^\%(SL\|HG\): Файли .* та .* відрізняються$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Файли .* та .* відрізняються$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Двійкові файли .* та .* відрізняються$"
syn match hgDiffIsA "^\%(SL\|HG\): Файл .* це .*, тоді як файл .* -- .*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Наприкінці файлу немає нового рядка"
syn match hgDiffCommon "^\%(SL\|HG\): Спільні підкаталоги: .* та .*"
" vi
syn match hgDiffOnly "^\%(SL\|HG\): Chỉ trong .*"
syn match hgDiffIdentical "^\%(SL\|HG\): Hai tập tin .* và .* là bằng nhau.$"
syn match hgDiffIdentical "^\%(SL\|HG\): Cả .* và .* là cùng một tập tin$"
syn match hgDiffDiffer "^\%(SL\|HG\): Hai tập tin .* và .* là khác nhau.$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Hai tập tin nhị phân .* và .* khác nhau$"
syn match hgDiffIsA "^\%(SL\|HG\): Tập tin .* là một .* trong khi tập tin .* là một .*.$"
syn match hgDiffBDiffer "^\%(SL\|HG\): Hai tập tin .* và .* là khác nhau.$"
syn match hgDiffIsA "^\%(SL\|HG\): Tập tin .* là một .* còn tập tin .* là một .*.$"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Không có ký tự dòng mới tại kêt thức tập tin."
syn match hgDiffCommon "^\%(SL\|HG\): Thư mục con chung: .* và .*"
" zh_CN
syn match hgDiffOnly "^\%(SL\|HG\): 只在 .* 存在:.*"
syn match hgDiffIdentical "^\%(SL\|HG\): 檔案 .* 和 .* 相同$"
syn match hgDiffDiffer "^\%(SL\|HG\): 文件 .* 和 .* 不同$"
syn match hgDiffBDiffer "^\%(SL\|HG\): 文件 .* 和 .* 不同$"
syn match hgDiffIsA "^\%(SL\|HG\): 文件 .* 是.*而文件 .* 是.*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ 文件尾没有 newline 字符"
syn match hgDiffCommon "^\%(SL\|HG\): .* 和 .* 有共同的子目录$"
" zh_TW
syn match hgDiffOnly "^\%(SL\|HG\): 只在 .* 存在:.*"
syn match hgDiffIdentical "^\%(SL\|HG\): 檔案 .* 和 .* 相同$"
syn match hgDiffDiffer "^\%(SL\|HG\): 檔案 .* 與 .* 不同$"
syn match hgDiffBDiffer "^\%(SL\|HG\): 二元碼檔 .* 與 .* 不同$"
syn match hgDiffIsA "^\%(SL\|HG\): 檔案 .* 是.*而檔案 .* 是.*"
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ 檔案末沒有 newline 字元"
syn match hgDiffCommon "^\%(SL\|HG\): .* 和 .* 有共同的副目錄$"
endif
syn match hgDiffRemoved "^\%(SL\|HG\): -.*"
syn match hgDiffRemoved "^\%(SL\|HG\): <.*"
syn match hgDiffAdded "^\%(SL\|HG\): +.*"
syn match hgDiffAdded "^\%(SL\|HG\): >.*"
syn match hgDiffChanged "^\%(SL\|HG\): ! .*"
syn match hgDiffSubname " @@..*"ms=s+3 contained
syn match hgDiffLine "^\%(SL\|HG\): @.*" contains=hgDiffSubname
syn match hgDiffLine "^\%(SL\|HG\): \<\d\+\>.*"
syn match hgDiffLine "^\%(SL\|HG\): \*\*\*\*.*"
syn match hgDiffLine "^\%(SL\|HG\): ---$"
" Some versions of diff have lines like "#c#" and "#d#" (where # is a number)
syn match hgDiffLine "^\%(SL\|HG\): \d\+\(,\d\+\)\=[cda]\d\+\>.*"
syn match hgDiffFile "^\%(SL\|HG\): diff\>.*"
syn match hgDiffFile "^\%(SL\|HG\): Index: .*"
syn match hgDiffFile "^\%(SL\|HG\): ==== .*"
if search('^\%(SL\|HG\): @@ -\S\+ +\S\+ @@', 'nw', '', 100)
" unified
syn match hgDiffOldFile "^\%(SL\|HG\): --- .*"
syn match hgDiffNewFile "^\%(SL\|HG\): +++ .*"
else
" context / old style
syn match hgDiffOldFile "^\%(SL\|HG\): \*\*\* .*"
syn match hgDiffNewFile "^\%(SL\|HG\): --- .*"
endif
" Used by git
syn match hgDiffIndexLine "^\%(SL\|HG\): index \x\x\x\x.*"
syn match hgDiffComment "^\%(SL\|HG\): #.*"
" Define the default highlighting.
" Only used when an item doesn't have highlighting yet
hi def link hgDiffOldFile hgDiffFile
hi def link hgDiffNewFile hgDiffFile
hi def link hgDiffIndexLine PreProc
hi def link hgDiffFile Type
hi def link hgDiffOnly Constant
hi def link hgDiffIdentical Constant
hi def link hgDiffDiffer Constant
hi def link hgDiffBDiffer Constant
hi def link hgDiffIsA Constant
hi def link hgDiffNoEOL Constant
hi def link hgDiffCommon Constant
hi def link hgDiffRemoved Special
hi def link hgDiffChanged PreProc
hi def link hgDiffAdded Identifier
hi def link hgDiffLine Statement
hi def link hgDiffSubname PreProc
hi def link hgDiffComment Comment
let b:current_syntax = "hgcommitDiff"
" vim: ts=8 sw=2

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 9.0 script
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" Last Change: October 20, 2022
" Version: 9.0-08
" Last Change: Jan 08, 2023
" Version: 9.0-18
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
" Automatically generated keyword lists: {{{1
@@ -19,39 +19,38 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
syn keyword vimCommand contained a ar[gs] argl[ocal] bad[d] bn[ext] breakl[ist] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletl dep diffpu[t] dj[ump] dp earlier echow[indow] enddef endinterface ex files fini[sh] folddoc[losed] go[to] ha[rdcopy] hid[e] if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes[sages] mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] sts[elect] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] v vie[w] vne[w] win[size] wq xmapc[lear] xr[estore]
syn keyword vimCommand contained ab arga[dd] argu[ment] balt bo[tright] bro[wse] c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec el[se] endenum endt[ry] exi[t] filet fir[st] foldo[pen] gr[ep] helpc[lose] his[tory] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] substitutepattern sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] var vim9[cmd] vs[plit] winc[md] wqa[ll] xme xunme
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] bd[elete] bp[revious] bufdo ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delel delfunction dif[fupdate] difft[his] dli[st] ds[earch] echoc[onsole] elsei[f] endfo[r] endw[hile] exp filetype fix[del] for grepa[dd] helpf[ind] hor[izontal] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] substituterepeat sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type unl ve[rsion] vim9s[cript] wN[ext] windo wundo xmenu xunmenu
syn keyword vimCommand contained abo[veleft] argded[upe] au bel[owright] br[ewind] buffers cabc[lear] call cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delep dell diffg[et] dig[raphs] do dsp[lit] echoe[rr] em[enu] endfun ene[w] export filt[er] fo[ld] fun gui helpg[rep] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] leg[acy] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp static sun[hide] sy tN[ext] tabe[dit] tabnew tc[d] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unlo[ckvar] verb[ose] vim[grep] w[rite] winp[os] wv[iminfo] xnoreme xwininfo
syn keyword vimCommand contained abstract argdo bN[ext] bf[irst] brea[k] bun[load] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] deletel delm[arks] diffo[ff] dir doau e[dit] echom[sg] en[dif] endfunc enum exu[sage] fin[d] foldc[lose] func gvim helpt[ags] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do python3 qa[ll] redr[aw] return rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stj[ump] sunme syn ta[g] tabf[ind] tabo[nly] tch[dir] tf[irst] tln tmapc[lear] try una[bbreviate] uns[ilent] vert[ical] vimgrepa[dd] wa[ll] wn[ext] x[it] xnoremenu y[ank]
syn keyword vimCommand contained addd arge[dit] b[uffer] bl[ast] breaka[dd] bw[ipeout] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletep delp diffp[atch] disa[ssemble] doaut ea echon endclass endfunction eval f[ile] fina[lly] foldd[oopen] function h[elp] hi iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] stopi[nsert] sunmenu sync tab tabfir[st] tabp[revious] tcl th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] up[date] vi[sual] viu[sage] wh[ile] wp[revious] xa[ll] xprop z[^.=]
syn keyword vimCommand contained al[l] argg[lobal] ba[ll] bm[odified] breakd[el] cN[ext]
syn keyword vimCommand contained a ar[gs] argg[lobal] b[uffer] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] defer deletl dep diffpu[t] dj[ump] dp earlier echow[indow] endf[unction] ex files fini[sh] folddoc[losed] grepa[dd] helpf[ind] hor[izontal] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] sun[hide] sy tN[ext] tabe[dit] tabnew tc[d] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unlo[ckvar] verb[ose] vim[grep] w[rite] winp[os] wv[iminfo] xmenu xunme
syn keyword vimCommand contained ab arga[dd] argl[ocal] ba[ll] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec el[se] endfo[r] exi[t] filet fir[st] foldo[pen] gui helpg[rep] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] leg[acy] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp stj[ump] sunme syn ta[g] tabf[ind] tabo[nly] tch[dir] tf[irst] tln tmapc[lear] try una[bbreviate] uns[ilent] vert[ical] vimgrepa[dd] wa[ll] wn[ext] x[it] xnoreme xunmenu
syn keyword vimCommand contained abc[lear] argd[elete] argu[ment] bad[d] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoc[onsole] elsei[f] endt[ry] exp filetype fix[del] for gvim helpt[ags] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stopi[nsert] sunmenu sync tab tabfir[st] tabp[revious] tcl th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] up[date] vi[sual] viu[sage] wh[ile] wp[revious] xa[ll] xnoremenu xwininfo
syn keyword vimCommand contained abo[veleft] argded[upe] as[cii] balt bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] delep dell diffg[et] dig[raphs] do dsp[lit] echoe[rr] em[enu] endw[hile] export filt[er] fo[ld] fu[nction] h[elp] hi iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] sts[elect] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] v vie[w] vne[w] win[size] wq xmapc[lear] xprop y[ank]
syn keyword vimCommand contained addd argdo au bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletel delm[arks] diffo[ff] dir doau e[dit] echom[sg] en[dif] ene[w] exu[sage] fin[d] foldc[lose] go[to] ha[rdcopy] hid[e] if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes[sages] mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] substitutepattern sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] var vim9[cmd] vs[plit] winc[md] wqa[ll] xme xr[estore] z[^.=]
syn keyword vimCommand contained al[l] arge[dit] bN[ext] bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletep delp diffp[atch] disa[ssemble] doaut ea echon enddef eval f[ile] fina[lly] foldd[oopen] gr[ep] helpc[lose] his[tory] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] substituterepeat sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type unl ve[rsion] vim9s[cript] wN[ext] windo wundo
syn match vimCommand contained "\<z[-+^.=]\=\>"
syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Until Winbar XMLent XMLns
" vimOptions are caught only when contained in a vimSet {{{2
syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdh ci cinsd cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispoptions lop ma matchtime mef mle modelineexpr mousehide mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showfulltag signcolumn smc sp spf sps stal suffixes sws tabpagemax tags tc termwinscroll tfu title toolbariconsize ttimeout ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write
syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cdhome cin cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepformat guiheadroom helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw lispwords lpl macatsui maxcombine menc mls modelines mousem mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showmatch siso smd spc spk sr startofline suffixesadd sxe tabstop tagstack tcldll termwinsize tgc titlelen top ttimeoutlen ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany
syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cdpath cindent cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn grepprg guiligatures hf hkmap icon imc imsf inde is isprint kmp lbr list lrm magic maxfuncdepth menuitems mm modifiable mousemev mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmode sj smoothscroll spell spl srr statusline sw sxq tag tal tenc termwintype tgst titleold tpm ttm tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup
syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cedit cink clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtl guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs listchars ls makeef maxmapdepth mfd mmd modified mousemodel msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showtabline slm sms spellcapcheck splitbelow ss stl swapfile syn tagbsearch tb term terse thesaurus titlestring tr tty twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay
syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb cf cinkeys cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lm lsp makeencoding maxmem mh mmp more mousemoveevent mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess shq sm sn spellfile splitkeep ssl stmp swapsync synmaxcol tagcase tbi termbidi textauto thesaurusfunc tl ts ttybuiltin tws ul ur ve vif vts wcr wi wildmenu winfixheight wiv wrap ws
syn keyword vimOption contained allowrevins arabic autoshelldir backupcopy bdir bh breakat bsdir cc cfu cino cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lmap luadll makeprg maxmempattern mis mmt mouse mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shelltemp shortname si smartcase so spelllang splitright ssop sts swb syntax tagfunc tbidi termencoding textmode tildeop tm tsl ttyfast twsl undodir ut verbose viminfo wa wd wic wildmode winfixwidth wiw wrapmargin ww
syn keyword vimOption contained altkeymap arabicshape autowrite backupdir bdlay bin breakindent bsk ccv ch cinoptions cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace lnr lw mat maxmemtot mkspellmem mod mousef mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltype showbreak sidescroll smartindent softtabstop spelloptions spo st su swf ta taglength tbis termguicolors textwidth timeout to tsr ttym twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan xtermcodes
syn keyword vimOption contained ambiwidth ari autowriteall backupext belloff binary breakindentopt bt cd charconvert cinscopedecls cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp loadplugins lz matchpairs mco ml modeline mousefocus mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shellxescape showcmd sidescrolloff smarttab sol spellsuggest spr sta sua switchbuf tabline tagrelative tbs termwinkey tf timeoutlen toolbar tsrfu ttymouse
syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdh ci cinsd cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langmap linebreak lm lsp makeencoding maxmem mh mmp more mousemoveevent mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess showtabline slm smoothscroll spell spl srr statusline sw sxq tag tal tenc termwintype tgst titleold tpm ttm tw udir ur verbose viminfofile warn wfh wildchar wim winminheight wmh write
syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cdhome cin cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langmenu lines lmap luadll makeprg maxmempattern mis mmt mouse mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shelltemp shortname shq sloc sms spellcapcheck splitbelow ss stl swapfile syn tagbsearch tb term terse thesaurus titlestring tr tty twk ul ut verbosefile virtualedit wb wfw wildcharm winaltkeys winminwidth wmnu writeany
syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cdpath cindent cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endoffile errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keyprotocol langnoremap linespace lnr lw mat maxmemtot mkspellmem mod mousef mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltype showbreak si sm sn spellfile splitkeep ssl stmp swapsync synmaxcol tagcase tbi termbidi textauto thesaurusfunc tl ts ttybuiltin tws undodir varsofttabstop vfile visualbell wc wh wildignore wincolor winptydll wmw writebackup
syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cedit cink clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm endofline errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepformat guiheadroom helplang hk ic imak imsearch incsearch insertmode isp keywordprg langremap lisp loadplugins lz matchpairs mco ml modeline mousefocus mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shellxescape showcmd sidescroll smartcase so spelllang splitright ssop sts swb syntax tagfunc tbidi termencoding textmode tildeop tm tsl ttyfast twsl undofile vartabstop vi vop wcm whichwrap wildignorecase window winwidth wop writedelay
syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb cf cinkeys cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei eof esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn grepprg guiligatures hf hkmap icon imc imsf inde is isprint km laststatus lispoptions lop ma matchtime mef mle modelineexpr mousehide mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showcmdloc sidescrolloff smartindent softtabstop spelloptions spo st su swf ta taglength tbis termguicolors textwidth timeout to tsr ttym twt undolevels vb viewdir vsts wcr wi wildmenu winfixheight wiv wrap ws
syn keyword vimOption contained allowrevins arabic autoshelldir backupcopy bdir bh breakat bsdir cc cfu cino cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtl guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kmp lazyredraw lispwords lpl macatsui maxcombine menc mls modelines mousem mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showfulltag signcolumn smarttab sol spellsuggest spr sta sua switchbuf tabline tagrelative tbs termwinkey tf timeoutlen toolbar tsrfu ttymouse tx undoreload vbs viewoptions vts wd wic wildmode winfixwidth wiw wrapmargin ww
syn keyword vimOption contained altkeymap arabicshape autowrite backupdir bdlay bin breakindent bsk ccv ch cinoptions cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js kp lbr list lrm magic maxfuncdepth menuitems mm modifiable mousemev mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmatch siso smc sp spf sps stal suffixes sws tabpagemax tags tc termwinscroll tfu title toolbariconsize ttimeout ttyscroll uc updatecount vdir vif wa weirdinvert wig wildoptions winheight wm wrapscan xtermcodes
syn keyword vimOption contained ambiwidth ari autowriteall backupext belloff binary breakindentopt bt cd charconvert cinscopedecls cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key kpc lcs listchars ls makeef maxmapdepth mfd mmd modified mousemodel msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showmode sj smd spc spk sr startofline suffixesadd sxe tabstop tagstack tcldll termwinsize tgc titlelen top ttimeoutlen ttytype udf updatetime ve viminfo wak
" vimOptions: These are the turn-off setting variants {{{2
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoindent noautowrite noawa noballoonevalterm nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noemoji noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolisp noloadplugins nolz nomagic nomle nomodelineexpr nomore nomousehide noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscf noscrollfocus nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosmoothscroll nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
syn keyword vimOption contained noai noaltkeymap noar noarabicshape noasd noautoread noautowriteall nobackup nobeval nobinary nobomb nobuflisted nocin noconfirm nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois nolangnoremap nolbr nolist nolpl noma nomh nomod nomodifiable nomousef nonu noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscrollbind noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosms nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup noxtermcodes
syn keyword vimOption contained noakm noanti noarab noari noautochdir noautoshelldir noaw noballooneval nobevalterm nobk nobreakindent nocf nocindent nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noemo noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangremap nolinebreak nolnr nolrm nomacatsui noml nomodeline nomodified nomousefocus nonumber
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoindent noautowrite noawa noballoonevalterm nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noemoji noeof noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois nolangnoremap nolbr nolist nolpl noma nomh nomod nomodifiable nomousef nonu noopendevice nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscf noscrollfocus nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosmoothscroll nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
syn keyword vimOption contained noai noaltkeymap noar noarabicshape noasd noautoread noautowriteall nobackup nobeval nobinary nobomb nobuflisted nocin noconfirm nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noendoffile noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangremap nolinebreak nolnr nolrm nomacatsui noml nomodeline nomodified nomousefocus nonumber nopaste nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscrollbind noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosms nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup noxtermcodes
syn keyword vimOption contained noakm noanti noarab noari noautochdir noautoshelldir noaw noballooneval nobevalterm nobk nobreakindent nocf nocindent nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noemo noendofline noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolisp noloadplugins nolz nomagic nomle nomodelineexpr nomore nomousehide noodev nopi
" vimOptions: These are the invertible variants {{{2
syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoindent invautowrite invawa invballoonevalterm invbin invbl invbri invci invcompatible invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible invemoji invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlisp invloadplugins invlz invmagic invmle invmodelineexpr invmore invmousehide invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscf invscrollfocus invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsmoothscroll invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
syn keyword vimOption contained invai invaltkeymap invar invarabicshape invasd invautoread invautowriteall invbackup invbeval invbinary invbomb invbuflisted invcin invconfirm invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis invlangnoremap invlbr invlist invlpl invma invmh invmod invmodifiable invmousef invnu invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscrollbind invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsms invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup invxtermcodes
syn keyword vimOption contained invakm invanti invarab invari invautochdir invautoshelldir invaw invballooneval invbevalterm invbk invbreakindent invcf invcindent invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invemo inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangremap invlinebreak invlnr invlrm invmacatsui invml invmodeline invmodified invmousefocus invnumber
syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoindent invautowrite invawa invballoonevalterm invbin invbl invbri invci invcompatible invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible invemoji inveof inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis invlangnoremap invlbr invlist invlpl invma invmh invmod invmodifiable invmousef invnu invopendevice invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscf invscrollfocus invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsmoothscroll invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
syn keyword vimOption contained invai invaltkeymap invar invarabicshape invasd invautoread invautowriteall invbackup invbeval invbinary invbomb invbuflisted invcin invconfirm invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invendoffile inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangremap invlinebreak invlnr invlrm invmacatsui invml invmodeline invmodified invmousefocus invnumber invpaste invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscrollbind invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsms invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup invxtermcodes
syn keyword vimOption contained invakm invanti invarab invari invautochdir invautoshelldir invaw invballooneval invbevalterm invbk invbreakindent invcf invcindent invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invemo invendofline invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlisp invloadplugins invlz invmagic invmle invmodelineexpr invmore invmousehide invodev invpi
" termcap codes (which can also be set) {{{2
syn keyword vimOption contained t_8b t_8u t_AF t_AL t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_Ds t_EI t_F2 t_F4 t_F6 t_F8 t_fd t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_kb t_KB t_kd t_KD t_KE t_KG t_KH t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_Ri t_RI t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_Si t_SI t_so t_sr t_SR t_ST t_te t_Te t_TE t_ti t_TI t_ts t_Ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_xn t_xs t_ZH t_ZR
syn keyword vimOption contained t_8f t_AB t_al t_AU t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_ds t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_fe t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_KA t_kB t_KC t_kD t_ke t_KF t_kh t_kI
syn keyword vimOption contained t_8b t_8u t_AF t_AL t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_Ds t_EI t_F2 t_F4 t_F6 t_F8 t_fd t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_kb t_KB t_kd t_KD t_KE t_KG t_KH t_KI t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_Ri t_RI t_RK t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_Si t_SI t_so t_sr t_SR t_ST t_te t_Te t_TE t_ti t_TI t_ts t_Ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_xn t_xs t_ZH t_ZR
syn keyword vimOption contained t_8f t_AB t_al t_AU t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_ds t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_fe t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_KA t_kB t_KC t_kD t_ke t_KF t_kh t_kI t_KJ
syn match vimOption contained "t_%1"
syn match vimOption contained "t_#2"
syn match vimOption contained "t_#4"
@@ -67,8 +66,8 @@ syn keyword vimErrSetting contained bioskey biosk conskey consk autoprint beauti
" AutoCmd Events {{{2
syn case ignore
syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufNew BufRead BufReadPost BufUnload BufWinLeave BufWrite BufWritePost CmdlineChanged CmdlineLeave CmdwinEnter ColorScheme CompleteChanged CompleteDonePre CursorHoldI CursorMoved CursorMovedI DiffUpdated DirChanged DirChangedPre EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileExplorer FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave InsertLeavePre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TextChanged TextChangedI TextChangedP TextChangedT TextYankPost User VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew WinScrolled
syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNewFile BufReadCmd BufReadPre BufWinEnter BufWipeout BufWriteCmd BufWritePre CmdlineEnter CmdUndefined CmdwinLeave ColorSchemePre CompleteDone CursorHold
syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufNew BufRead BufReadPost BufUnload BufWinLeave BufWrite BufWritePost CmdlineChanged CmdlineLeave CmdwinEnter ColorScheme CompleteChanged CompleteDonePre CursorHoldI CursorMovedI DiffUpdated DirChanged DirChangedPre EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileExplorer FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave InsertLeavePre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TextChanged TextChangedI TextChangedP TextChangedT TextYankPost User VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew WinResized WinScrolled
syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNewFile BufReadCmd BufReadPre BufWinEnter BufWipeout BufWriteCmd BufWritePre CmdlineEnter CmdUndefined CmdwinLeave ColorSchemePre CompleteDone CursorHold CursorMoved
" Highlight commonly used Groupnames {{{2
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
@@ -79,12 +78,12 @@ syn match vimHLGroup contained "Conceal"
syn case match
" Function Names {{{2
syn keyword vimFuncName contained abs argc assert_equal assert_match atan balloon_show bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline digraph_set eval exists_compiled extendnew findfile fnameescape foldtextresult get getcharmod getcmdpos getcursorcharpos getftime getmarklist getreg gettabwinvar getwinposy has_key histnr iconv inputlist invert items job_stop keys line2byte listener_remove maparg match matchend matchstrpos mode pathshorten popup_close popup_findecho popup_hide popup_notification prevnonblank prompt_setprompt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_channel test_null_partial test_setmouse timer_info tolower type values winbufnr win_getid win_id2win winnr win_splitmove
syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 balloon_split buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype digraph_setlist eventhandler exp feedkeys flatten fnamemodify foreground getbufinfo getcharpos getcmdscreenpos getcwd getftype getmatches getreginfo gettagstack getwinvar haslocaldir hlexists indent inputrestore isabsolutepath job_getchannel join keytrans lispindent localtime mapcheck matchadd matchfuzzy max mzeval perleval popup_create popup_findinfo popup_list popup_setoptions printf prop_add prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_dict test_null_string test_settime timer_pause toupper typename virtcol wincol win_gettype winlayout winrestcmd winwidth
syn keyword vimFuncName contained add arglistid assert_exception assert_notequal autocmd_add blob2list bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler echoraw executable expand filereadable flattennew foldclosed fullcommand getbufline getcharsearch getcmdtype getenv getimstatus getmousepos getregtype gettext glob hasmapto hlget index inputsave isdirectory job_info js_decode len list2blob log maplist matchaddpos matchfuzzypos menu_info nextnonblank popup_atcursor popup_dialog popup_findpreview popup_locate popup_settext prompt_getprompt prop_add_list prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdline setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_gui_event test_null_function test_option_not_set test_srand_seed timer_start tr undofile virtcol2col windowsversion win_gotoid winline winrestview wordcount
syn keyword vimFuncName contained and argv assert_fails assert_notmatch autocmd_delete browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID empty execute expandcmd filewritable float2nr foldclosedend funcref getbufvar getcharstr getcmdwintype getfontname getjumplist getpid getscriptinfo getwininfo glob2regpat histadd hlID indexof inputsecret isinf job_setoptions js_encode libcall list2str log10 mapnew matcharg matchlist min nr2char popup_beval popup_filter_menu popup_getoptions popup_menu popup_show prompt_setcallback prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_ignore_error test_null_job test_override test_unknown timer_stop trim undotree visualmode win_execute winheight win_move_separator winsaveview writefile
syn keyword vimFuncName contained append asin assert_false assert_report autocmd_get browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy digraph_get environ exepath expr10 filter floor foldlevel function getchangelist getcmdcompltype getcompletion getfperm getline getpos gettabinfo getwinpos globpath histdel hlset input insert islocked job_start json_decode libcallnr listener_add luaeval mapset matchdelete matchstr mkdir or popup_clear popup_filter_yesno popup_getpos popup_move pow prompt_setinterrupt prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_null_blob test_null_list test_refcount test_void timer_stopall trunc uniq wildmenumode win_findbuf win_id2tabwin win_move_statusline win_screenpos xor
syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true balloon_gettext bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete digraph_getlist escape exists extend finddir fmod foldtext garbagecollect getchar getcmdline getcurpos getfsize getloclist getqflist gettabvar getwinposx has histget hostname inputdialog interrupt isnan job_status json_encode line listener_flush map
syn keyword vimFuncName contained abs argc assert_equal assert_match atan balloon_show bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline digraph_set eval exists_compiled extendnew findfile fnameescape foldtextresult get getchar getcmdline getcurpos getfsize getloclist getpos gettabinfo getwinpos globpath histdel hlset input insert islocked job_start json_decode libcallnr listener_add luaeval mapset matchend max nextnonblank popup_atcursor popup_dialog popup_findpreview popup_locate popup_settext prompt_getprompt prop_add_list prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdline setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_channel test_null_partial test_setmouse timer_info tolower type values winbufnr win_getid win_id2win winnr win_splitmove
syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 balloon_split buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype digraph_setlist eventhandler exp feedkeys flatten fnamemodify foreground getbufinfo getcharmod getcmdpos getcursorcharpos getftime getmarklist getqflist gettabvar getwinposx has histget hostname inputdialog interrupt isnan job_status json_encode line listener_flush map match matchfuzzy menu_info nr2char popup_beval popup_filter_menu popup_getoptions popup_menu popup_show prompt_setcallback prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_gui_event test_null_dict test_null_string test_settime timer_pause toupper typename virtcol wincol win_gettype winlayout winrestcmd winwidth
syn keyword vimFuncName contained add arglistid assert_exception assert_notequal autocmd_add blob2list bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler echoraw executable expand filereadable flattennew foldclosed fullcommand getbufline getcharpos getcmdscreenpos getcwd getftype getmatches getreg gettabwinvar getwinposy has_key histnr iconv inputlist invert items job_stop keys line2byte listener_remove maparg matchadd matchfuzzypos min or popup_clear popup_filter_yesno popup_getpos popup_move pow prompt_setinterrupt prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapfilelist synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_ignore_error test_null_function test_option_not_set test_srand_seed timer_start tr undofile virtcol2col windowsversion win_gotoid winline winrestview wordcount
syn keyword vimFuncName contained and argv assert_fails assert_notmatch autocmd_delete browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID empty execute expandcmd filewritable float2nr foldclosedend funcref getbufoneline getcharsearch getcmdtype getenv getimstatus getmousepos getreginfo gettagstack getwinvar haslocaldir hlexists indent inputrestore isabsolutepath job_getchannel join keytrans lispindent localtime mapcheck matchaddpos matchlist mkdir pathshorten popup_close popup_findecho popup_hide popup_notification prevnonblank prompt_setprompt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_mswin_event test_null_job test_override test_unknown timer_stop trim undotree visualmode win_execute winheight win_move_separator winsaveview writefile
syn keyword vimFuncName contained append asin assert_false assert_report autocmd_get browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy digraph_get environ exepath expr10 filter floor foldlevel function getbufvar getcharstr getcmdwintype getfontname getjumplist getmouseshape getregtype gettext glob hasmapto hlget index inputsave isdirectory job_info js_decode len list2blob log maplist matcharg matchstr mode perleval popup_create popup_findinfo popup_list popup_setoptions printf prop_add prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_blob test_null_list test_refcount test_void timer_stopall trunc uniq wildmenumode win_findbuf win_id2tabwin win_move_statusline win_screenpos xor
syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true balloon_gettext bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete digraph_getlist escape exists extend finddir fmod foldtext garbagecollect getchangelist getcmdcompltype getcompletion getfperm getline getpid getscriptinfo getwininfo glob2regpat histadd hlID indexof inputsecret isinf job_setoptions js_encode libcall list2str log10 mapnew matchdelete matchstrpos mzeval
"--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
@@ -245,7 +244,8 @@ endif
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimEnvvar,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,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
syn match vimFunction "\<def!\=\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
syn match vimFunction "\<def!\=\s\+\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
"syn match vimFunction "\<def!\=\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
@@ -354,7 +354,7 @@ syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([^a-zA-Z
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 "\%#=1\[:\(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\|retu\%[rn]\|tab\|escape\|backspace\):\]"
syn match vimSubstSubstr contained "\\z\=\d"
syn match vimSubstTwoBS contained "\\\\"
syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags
@@ -454,7 +454,7 @@ syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList
" Angle-Bracket Notation: (tnx to Michael Geddes) {{{2
" ======================
syn case ignore
syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cmd\|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>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cmd\|cr\|lf\|linefeed\|retu\%[rn]\|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
@@ -482,7 +482,7 @@ if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/
endif
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>" skipwhite nextgroup=vimOper,vimOperParen,vimVar,vimFunc,vimNotation
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<retu\%[rn]\>\|\<while\>" skipwhite nextgroup=vimOper,vimOperParen,vimVar,vimFunc,vimNotation
" Norm: {{{2
" ====
@@ -649,9 +649,8 @@ syn match vimCtrlChar "[- -]"
" Beginners - Patterns that involve ^ {{{2
" =========
" Adjusted comment pattern - avoid matching string (appears in Vim9 code)
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle,vimComment
syn match vimLineComment +^[ \t:]*"\("[^"]*"\|[^"]\)*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
"syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
syn match vim9LineComment +^[ \t:]\+#.*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
syn match vimContinue "^\s*\\"

41
runtime/syntax/wdl.vim Normal file
View File

@@ -0,0 +1,41 @@
" Vim syntax file
" Language: wdl
" Maintainer: Matt Dunford (zenmatic@gmail.com)
" URL: https://github.com/zenmatic/vim-syntax-wdl
" Last Change: 2022 Nov 24
" https://github.com/openwdl/wdl
" quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
finish
endif
syn case match
syn keyword wdlStatement alias task input command runtime input output workflow call scatter import as meta parameter_meta in version
syn keyword wdlConditional if then else
syn keyword wdlType struct Array String File Int Float Boolean Map Pair Object
syn keyword wdlFunctions stdout stderr read_lines read_tsv read_map read_object read_objects read_json read_int read_string read_float read_boolean write_lines write_tsv write_map write_object write_objects write_json size sub range transpose zip cross length flatten prefix select_first defined basename floor ceil round
syn region wdlCommandSection start="<<<" end=">>>"
syn region wdlString start=+"+ skip=+\\\\\|\\"+ end=+"+
syn region wdlString start=+'+ skip=+\\\\\|\\'+ end=+'+
" Comments; their contents
syn keyword wdlTodo contained TODO FIXME XXX BUG
syn cluster wdlCommentGroup contains=wdlTodo
syn region wdlComment start="#" end="$" contains=@wdlCommentGroup
hi def link wdlStatement Statement
hi def link wdlConditional Conditional
hi def link wdlType Type
hi def link wdlFunctions Function
hi def link wdlString String
hi def link wdlCommandSection String
hi def link wdlComment Comment
hi def link wdlTodo Todo
let b:current_syntax = 'wdl'

292
runtime/syntax/zig.vim Normal file
View File

@@ -0,0 +1,292 @@
" Vim syntax file
" Language: Zig
" Upstream: https://github.com/ziglang/zig.vim
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
let s:zig_syntax_keywords = {
\ 'zigBoolean': ["true"
\ , "false"]
\ , 'zigNull': ["null"]
\ , 'zigType': ["bool"
\ , "f16"
\ , "f32"
\ , "f64"
\ , "f80"
\ , "f128"
\ , "void"
\ , "type"
\ , "anytype"
\ , "anyerror"
\ , "anyframe"
\ , "volatile"
\ , "linksection"
\ , "noreturn"
\ , "allowzero"
\ , "i0"
\ , "u0"
\ , "isize"
\ , "usize"
\ , "comptime_int"
\ , "comptime_float"
\ , "c_short"
\ , "c_ushort"
\ , "c_int"
\ , "c_uint"
\ , "c_long"
\ , "c_ulong"
\ , "c_longlong"
\ , "c_ulonglong"
\ , "c_longdouble"
\ , "anyopaque"]
\ , 'zigConstant': ["undefined"
\ , "unreachable"]
\ , 'zigConditional': ["if"
\ , "else"
\ , "switch"]
\ , 'zigRepeat': ["while"
\ , "for"]
\ , 'zigComparatorWord': ["and"
\ , "or"
\ , "orelse"]
\ , 'zigStructure': ["struct"
\ , "enum"
\ , "union"
\ , "error"
\ , "packed"
\ , "opaque"]
\ , 'zigException': ["error"]
\ , 'zigVarDecl': ["var"
\ , "const"
\ , "comptime"
\ , "threadlocal"]
\ , 'zigDummyVariable': ["_"]
\ , 'zigKeyword': ["fn"
\ , "try"
\ , "test"
\ , "pub"
\ , "usingnamespace"]
\ , 'zigExecution': ["return"
\ , "break"
\ , "continue"]
\ , 'zigMacro': ["defer"
\ , "errdefer"
\ , "async"
\ , "nosuspend"
\ , "await"
\ , "suspend"
\ , "resume"
\ , "export"
\ , "extern"]
\ , 'zigPreProc': ["catch"
\ , "inline"
\ , "noinline"
\ , "asm"
\ , "callconv"
\ , "noalias"]
\ , 'zigBuiltinFn': ["align"
\ , "@addWithOverflow"
\ , "@as"
\ , "@atomicLoad"
\ , "@atomicStore"
\ , "@bitCast"
\ , "@breakpoint"
\ , "@alignCast"
\ , "@alignOf"
\ , "@cDefine"
\ , "@cImport"
\ , "@cInclude"
\ , "@cUndef"
\ , "@clz"
\ , "@cmpxchgWeak"
\ , "@cmpxchgStrong"
\ , "@compileError"
\ , "@compileLog"
\ , "@ctz"
\ , "@popCount"
\ , "@divExact"
\ , "@divFloor"
\ , "@divTrunc"
\ , "@embedFile"
\ , "@export"
\ , "@extern"
\ , "@tagName"
\ , "@TagType"
\ , "@errorName"
\ , "@call"
\ , "@errorReturnTrace"
\ , "@fence"
\ , "@fieldParentPtr"
\ , "@field"
\ , "@unionInit"
\ , "@frameAddress"
\ , "@import"
\ , "@newStackCall"
\ , "@asyncCall"
\ , "@intToPtr"
\ , "@max"
\ , "@min"
\ , "@memcpy"
\ , "@memset"
\ , "@mod"
\ , "@mulAdd"
\ , "@mulWithOverflow"
\ , "@splat"
\ , "@src"
\ , "@bitOffsetOf"
\ , "@byteOffsetOf"
\ , "@offsetOf"
\ , "@OpaqueType"
\ , "@panic"
\ , "@prefetch"
\ , "@ptrCast"
\ , "@ptrToInt"
\ , "@rem"
\ , "@returnAddress"
\ , "@setCold"
\ , "@Type"
\ , "@shuffle"
\ , "@reduce"
\ , "@select"
\ , "@setRuntimeSafety"
\ , "@setEvalBranchQuota"
\ , "@setFloatMode"
\ , "@shlExact"
\ , "@This"
\ , "@hasDecl"
\ , "@hasField"
\ , "@shlWithOverflow"
\ , "@shrExact"
\ , "@sizeOf"
\ , "@bitSizeOf"
\ , "@sqrt"
\ , "@byteSwap"
\ , "@subWithOverflow"
\ , "@intCast"
\ , "@floatCast"
\ , "@intToFloat"
\ , "@floatToInt"
\ , "@boolToInt"
\ , "@errSetCast"
\ , "@truncate"
\ , "@typeInfo"
\ , "@typeName"
\ , "@TypeOf"
\ , "@atomicRmw"
\ , "@intToError"
\ , "@errorToInt"
\ , "@intToEnum"
\ , "@enumToInt"
\ , "@setAlignStack"
\ , "@frame"
\ , "@Frame"
\ , "@frameSize"
\ , "@bitReverse"
\ , "@Vector"
\ , "@sin"
\ , "@cos"
\ , "@tan"
\ , "@exp"
\ , "@exp2"
\ , "@log"
\ , "@log2"
\ , "@log10"
\ , "@fabs"
\ , "@floor"
\ , "@ceil"
\ , "@trunc"
\ , "@wasmMemorySize"
\ , "@wasmMemoryGrow"
\ , "@round"]
\ }
function! s:syntax_keyword(dict)
for key in keys(a:dict)
execute 'syntax keyword' key join(a:dict[key], ' ')
endfor
endfunction
call s:syntax_keyword(s:zig_syntax_keywords)
syntax match zigType "\v<[iu][1-9]\d*>"
syntax match zigOperator display "\V\[-+/*=^&?|!><%~]"
syntax match zigArrowCharacter display "\V->"
" 12_34 (. but not ..)? (12_34)? (exponent 12_34)?
syntax match zigDecNumber display "\v<\d%(_?\d)*%(\.\.@!)?%(\d%(_?\d)*)?%([eE][+-]?\d%(_?\d)*)?"
syntax match zigHexNumber display "\v<0x\x%(_?\x)*%(\.\.@!)?%(\x%(_?\x)*)?%([pP][+-]?\d%(_?\d)*)?"
syntax match zigOctNumber display "\v<0o\o%(_?\o)*"
syntax match zigBinNumber display "\v<0b[01]%(_?[01])*"
syntax match zigCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
syntax match zigCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
syntax match zigCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=zigEscape,zigEscapeError,zigCharacterInvalid,zigCharacterInvalidUnicode
syntax match zigCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{6}\)\)'/ contains=zigEscape,zigEscapeUnicode,zigEscapeError,zigCharacterInvalid
syntax region zigBlock start="{" end="}" transparent fold
syntax region zigCommentLine start="//" end="$" contains=zigTodo,@Spell
syntax region zigCommentLineDoc start="//[/!]/\@!" end="$" contains=zigTodo,@Spell
syntax match zigMultilineStringPrefix /c\?\\\\/ contained containedin=zigMultilineString
syntax region zigMultilineString matchgroup=zigMultilineStringDelimiter start="c\?\\\\" end="$" contains=zigMultilineStringPrefix display
syntax keyword zigTodo contained TODO
syntax region zigString matchgroup=zigStringDelimiter start=+c\?"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=zigEscape,zigEscapeUnicode,zigEscapeError,@Spell
syntax match zigEscapeError display contained /\\./
syntax match zigEscape display contained /\\\([nrt\\'"]\|x\x\{2}\)/
syntax match zigEscapeUnicode display contained /\\\(u\x\{4}\|U\x\{6}\)/
highlight default link zigDecNumber zigNumber
highlight default link zigHexNumber zigNumber
highlight default link zigOctNumber zigNumber
highlight default link zigBinNumber zigNumber
highlight default link zigBuiltinFn Statement
highlight default link zigKeyword Keyword
highlight default link zigType Type
highlight default link zigCommentLine Comment
highlight default link zigCommentLineDoc Comment
highlight default link zigDummyVariable Comment
highlight default link zigTodo Todo
highlight default link zigString String
highlight default link zigStringDelimiter String
highlight default link zigMultilineString String
highlight default link zigMultilineStringContent String
highlight default link zigMultilineStringPrefix String
highlight default link zigMultilineStringDelimiter Delimiter
highlight default link zigCharacterInvalid Error
highlight default link zigCharacterInvalidUnicode zigCharacterInvalid
highlight default link zigCharacter Character
highlight default link zigEscape Special
highlight default link zigEscapeUnicode zigEscape
highlight default link zigEscapeError Error
highlight default link zigBoolean Boolean
highlight default link zigNull Boolean
highlight default link zigConstant Constant
highlight default link zigNumber Number
highlight default link zigArrowCharacter zigOperator
highlight default link zigOperator Operator
highlight default link zigStructure Structure
highlight default link zigExecution Special
highlight default link zigMacro Macro
highlight default link zigConditional Conditional
highlight default link zigComparatorWord Keyword
highlight default link zigRepeat Repeat
highlight default link zigSpecial Special
highlight default link zigVarDecl Function
highlight default link zigPreProc PreProc
highlight default link zigException Exception
delfunction s:syntax_keyword
let b:current_syntax = "zig"
let &cpo = s:cpo_save
unlet! s:cpo_save

49
runtime/syntax/zir.vim Normal file
View File

@@ -0,0 +1,49 @@
" Vim syntax file
" Language: Zir
" Upstream: https://github.com/ziglang/zig.vim
if exists("b:current_syntax")
finish
endif
let b:current_syntax = "zir"
syn region zirCommentLine start=";" end="$" contains=zirTodo,@Spell
syn region zirBlock start="{" end="}" transparent fold
syn keyword zirKeyword primitive fntype int str as ptrtoint fieldptr deref asm unreachable export ref fn
syn keyword zirTodo contained TODO
syn region zirString start=+c\?"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=zirEscape,zirEscapeUnicode,zirEscapeError,@Spell
syn match zirEscapeError display contained /\\./
syn match zirEscape display contained /\\\([nrt\\'"]\|x\x\{2}\)/
syn match zirEscapeUnicode display contained /\\\(u\x\{4}\|U\x\{6}\)/
syn match zirDecNumber display "\<[0-9]\+\%(.[0-9]\+\)\=\%([eE][+-]\?[0-9]\+\)\="
syn match zirHexNumber display "\<0x[a-fA-F0-9]\+\%([a-fA-F0-9]\+\%([pP][+-]\?[0-9]\+\)\?\)\="
syn match zirOctNumber display "\<0o[0-7]\+"
syn match zirBinNumber display "\<0b[01]\+\%(.[01]\+\%([eE][+-]\?[0-9]\+\)\?\)\="
syn match zirGlobal display "[^a-zA-Z0-9_]\?\zs@[a-zA-Z0-9_]\+"
syn match zirLocal display "[^a-zA-Z0-9_]\?\zs%[a-zA-Z0-9_]\+"
hi def link zirCommentLine Comment
hi def link zirTodo Todo
hi def link zirKeyword Keyword
hi def link zirString Constant
hi def link zirEscape Special
hi def link zirEscapeUnicode zirEscape
hi def link zirEscapeError Error
hi def link zirDecNumber Constant
hi def link zirHexNumber Constant
hi def link zirOctNumber Constant
hi def link zirBinNumber Constant
hi def link zirGlobal Identifier
hi def link zirLocal Identifier

View File

@@ -42,26 +42,30 @@ Contents:
The currently recommended way (that means it has been verified to work) is
using the "Visual Studio Community 2015" installation. This doesn't include
the SDK for older Windows versions (95, 98), see "OLDER VERSIONS" below for
that.
using the "Visual Studio 2022 Community Edition" installation. This doesn't
include the SDK for older Windows versions (95 - XP), see "OLDER VERSIONS"
below for that.
1. Microsoft Visual C++
=======================
We do not provide download links, since Microsoft keeps changing them. You
can search for "Visual Studio Community 2015", for example. You will need to
create a Microsoft account (it's free). You need to download the "DVD", and
execute the installer from it.
can search for "Visual Studio 2022 Community Edition", for example. You will
need to create a Microsoft account (it's free). You need to download the
"DVD", and execute the installer from it.
When installing "Visual Studio Community 2015 with Update 3" or "Visual C++
Build Tools for Visual Studio 2015 with Update 3" make sure to
select "custom" and check all checkboxes under "Universal Windows App
Development Tools". Or whatever they are called now.
(If you still want to target Windows XP, check also "Windows XP Support for
C++". Note that with the current source code this is no longer supported, you
will have to check out an older version).
When installing "Visual Studio 2022 Community Edition" or "Build Tools for
Visual Studio 2022" make sure to select "custom" and check all checkboxes
under "Universal Windows App Development Tools". Or whatever they are called
now.
Note: Vim source code no longer supports Windows XP since Patch 9.0.0496.
Also, Visual Studio 2017 was the last version to support a Windows XP target.
If you still want to target Windows XP, you can check out an older version of
vim source code and install Visual Studio 2017 or 2015 - making sure to check
the checkbox for "Windows XP Support for C++". Additional build instructions
for Windows XP are provided below. |new-msvc-windows-xp|
Visual Studio
@@ -70,6 +74,18 @@ Visual Studio
Building with Visual Studio (VS2015, VS2017, VS2019 and VS2022) is
straightforward. Older versions probably don't work.
Vim versions built with VS2015 and VS2017 are systematically tested and known
to work well on Windows versions 7, 8 and 8.1.
Vim versions built with VS2015 and VS2017 are also known to work well on all
early versions of Windows 10. However, Vim versions built with VS2015 and
VS2017 may run into a known issue on the latest versions of Windows 10 and 11.
Building Vim with VS2019 or VS2022 resolves the issue.
Vim versions built with VS2019 and VS2022 are systematically tested and
known to work on Windows versions 7, 8, 8.1, 10, 11 and all respective server
variants.
Visual Studio installed a batch file called vcvarsall.bat, which you must
run to set up paths for nmake and MSVC. We provide a batch file
"msvc2015.bat" for this. You may need to edit it if you didn't install Visual
@@ -100,8 +116,8 @@ These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and
Ron Aaron; they have been tested. But several things changed after that...
Targeting Windows XP with MSVC 2015 and later *new-msvc-windows-xp*
---------------------------------------------
Targeting Windows XP with MSVC 2015 or 2017 *new-msvc-windows-xp*
-------------------------------------------
(The support for pre-Vista was removed in patch 9.0.0496. If you want to
target Windows XP, use the source code before that.)
@@ -155,9 +171,9 @@ The ARM64 support was provided by Leendert van Doorn.
OLDER VERSIONS
The minimal supported version is Windows 7. Building with compilers
older than 2015 most likely doesn't work. Since MSVC 2015 can be obtained for
free there is no point in supporting older versions.
The minimal supported version is Windows 7. Building with compilers older than
2015 most likely doesn't work. Since MSVC 2022 can be obtained for free there
is no point in supporting older versions.
If you need the executable to run on Windows 98 or ME, use the 2005 one
|msvc-2005-express|, and use the source code before 8.0.0029. See the

View File

@@ -124,6 +124,7 @@ SRC += \
json.c \
list.c \
locale.c \
logfile.c \
main.c \
mark.c \
map.c \
@@ -173,6 +174,7 @@ SRC += \
userfunc.c \
version.c \
viminfo.c \
vim9class.c \
vim9cmds.c \
vim9compile.c \
vim9execute.c \

View File

@@ -800,6 +800,7 @@ OBJ = \
$(OUTDIR)/json.o \
$(OUTDIR)/list.o \
$(OUTDIR)/locale.o \
$(OUTDIR)/logfile.o \
$(OUTDIR)/main.o \
$(OUTDIR)/map.o \
$(OUTDIR)/mark.o \
@@ -850,6 +851,7 @@ OBJ = \
$(OUTDIR)/usercmd.o \
$(OUTDIR)/userfunc.o \
$(OUTDIR)/version.o \
$(OUTDIR)/vim9class.o \
$(OUTDIR)/vim9cmds.o \
$(OUTDIR)/vim9compile.o \
$(OUTDIR)/vim9execute.o \
@@ -1250,6 +1252,8 @@ $(OUTDIR)/netbeans.o: netbeans.c $(INCL) version.h
$(OUTDIR)/version.o: version.c $(INCL) version.h
$(OUTDIR)/vim9class.o: vim9class.c $(INCL) vim9.h
$(OUTDIR)/vim9cmds.o: vim9cmds.c $(INCL) vim9.h
$(OUTDIR)/vim9compile.o: vim9compile.c $(INCL) vim9.h

View File

@@ -685,6 +685,7 @@ OBJ = \
$(OUTDIR)\json.obj \
$(OUTDIR)\list.obj \
$(OUTDIR)\locale.obj \
$(OUTDIR)\logfile.obj \
$(OUTDIR)\main.obj \
$(OUTDIR)\map.obj \
$(OUTDIR)\mark.obj \
@@ -734,6 +735,7 @@ OBJ = \
$(OUTDIR)\undo.obj \
$(OUTDIR)\usercmd.obj \
$(OUTDIR)\userfunc.obj \
$(OUTDIR)\vim9class.obj \
$(OUTDIR)\vim9cmds.obj \
$(OUTDIR)\vim9compile.obj \
$(OUTDIR)\vim9execute.obj \
@@ -1586,6 +1588,8 @@ $(OUTDIR)/list.obj: $(OUTDIR) list.c $(INCL)
$(OUTDIR)/locale.obj: $(OUTDIR) locale.c $(INCL)
$(OUTDIR)/logfile.obj: $(OUTDIR) logfile.c $(INCL)
$(OUTDIR)/main.obj: $(OUTDIR) main.c $(INCL) $(CUI_INCL)
$(OUTDIR)/map.obj: $(OUTDIR) map.c $(INCL)
@@ -1705,6 +1709,8 @@ $(OUTDIR)/userfunc.obj: $(OUTDIR) userfunc.c $(INCL)
$(OUTDIR)/version.obj: $(OUTDIR) version.c $(INCL) version.h
$(OUTDIR)/vim9class.obj: $(OUTDIR) vim9class.c $(INCL) vim9.h
$(OUTDIR)/vim9cmds.obj: $(OUTDIR) vim9cmds.c $(INCL) vim9.h
$(OUTDIR)/vim9compile.obj: $(OUTDIR) vim9compile.c $(INCL) vim9.h
@@ -1862,6 +1868,7 @@ proto.h: \
proto/json.pro \
proto/list.pro \
proto/locale.pro \
proto/logfile.pro \
proto/main.pro \
proto/map.pro \
proto/mark.pro \
@@ -1911,6 +1918,7 @@ proto.h: \
proto/undo.pro \
proto/usercmd.pro \
proto/userfunc.pro \
proto/vim9class.pro \
proto/vim9cmds.pro \
proto/vim9compile.pro \
proto/vim9execute.pro \

View File

@@ -357,6 +357,7 @@ SRC = \
json.c \
list.c \
locale.c \
logfile.c \
main.c \
map.c \
mark.c \
@@ -408,6 +409,7 @@ SRC = \
usercmd.c \
userfunc.c \
version.c \
vim9class.c \
vim9cmds.c \
vim9compile.c \
vim9execute.c \
@@ -481,6 +483,7 @@ OBJ = \
json.obj \
list.obj \
locale.obj \
logfile.obj \
main.obj \
map.obj \
mark.obj \
@@ -532,6 +535,7 @@ OBJ = \
usercmd.obj \
userfunc.obj \
version.obj \
vim9class.obj \
vim9cmds.obj \
vim9compile.obj \
vim9execute.obj \
@@ -928,6 +932,10 @@ locale.obj : locale.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h option.h structs.h regexp.h gui.h \
beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
errors.h globals.h
logfile.obj : logfile.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h option.h structs.h regexp.h gui.h \
beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
errors.h globals.h
main.obj : main.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h gui.h beval.h \
[.proto]gui_beval.pro option.h ex_cmds.h proto.h errors.h globals.h \
@@ -1116,6 +1124,10 @@ viminfo.obj : viminfo.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
errors.h globals.h version.h
vim9class.obj : vim9class.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
errors.h globals.h version.h
vim9cmds.obj : vim9cmds.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \

View File

@@ -1531,6 +1531,7 @@ BASIC_SRC = \
json.c \
list.c \
locale.c \
logfile.c \
main.c \
map.c \
mark.c \
@@ -1583,6 +1584,7 @@ BASIC_SRC = \
usercmd.c \
userfunc.c \
version.c \
vim9class.c \
vim9cmds.c \
vim9compile.c \
vim9execute.c \
@@ -1690,6 +1692,7 @@ OBJ_COMMON = \
objects/insexpand.o \
objects/list.o \
objects/locale.o \
objects/logfile.o \
objects/map.o \
objects/mark.o \
objects/match.o \
@@ -1739,6 +1742,7 @@ OBJ_COMMON = \
objects/usercmd.o \
objects/userfunc.o \
objects/version.o \
objects/vim9class.o \
objects/vim9cmds.o \
objects/vim9compile.o \
objects/vim9execute.o \
@@ -1874,6 +1878,7 @@ PRO_AUTO = \
json.pro \
list.pro \
locale.pro \
logfile.pro \
main.pro \
map.pro \
mark.pro \
@@ -1928,6 +1933,7 @@ PRO_AUTO = \
usercmd.pro \
userfunc.pro \
version.pro \
vim9class.pro \
vim9cmds.pro \
vim9compile.pro \
vim9execute.pro \
@@ -3306,6 +3312,9 @@ objects/list.o: list.c
objects/locale.o: locale.c
$(CCC) -o $@ locale.c
objects/logfile.o: logfile.c
$(CCC) -o $@ logfile.c
objects/main.o: main.c
$(CCC) -o $@ main.c
@@ -3483,6 +3492,9 @@ objects/usercmd.o: usercmd.c
objects/userfunc.o: userfunc.c
$(CCC) -o $@ userfunc.c
objects/vim9class.o: vim9class.c
$(CCC) -o $@ vim9class.c
objects/vim9cmds.o: vim9cmds.c
$(CCC) -o $@ vim9cmds.c
@@ -3897,6 +3909,11 @@ objects/locale.o: locale.c vim.h protodef.h auto/config.h feature.h os_unix.h \
proto/gui_beval.pro structs.h regexp.h gui.h libvterm/include/vterm.h \
libvterm/include/vterm_keycodes.h alloc.h ex_cmds.h spell.h proto.h \
globals.h errors.h
objects/logfile.o: logfile.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h libvterm/include/vterm.h \
libvterm/include/vterm_keycodes.h alloc.h ex_cmds.h spell.h proto.h \
globals.h errors.h
objects/main.o: main.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h libvterm/include/vterm.h \
@@ -4157,6 +4174,11 @@ objects/version.o: version.c vim.h protodef.h auto/config.h feature.h os_unix.h
proto/gui_beval.pro structs.h regexp.h gui.h libvterm/include/vterm.h \
libvterm/include/vterm_keycodes.h alloc.h ex_cmds.h spell.h proto.h \
globals.h errors.h version.h
objects/vim9class.o: vim9class.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h libvterm/include/vterm.h \
libvterm/include/vterm_keycodes.h alloc.h ex_cmds.h spell.h proto.h \
globals.h errors.h vim9.h
objects/vim9cmds.o: vim9cmds.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h libvterm/include/vterm.h \

View File

@@ -813,7 +813,7 @@ ga_copy_string(garray_T *gap, char_u *p)
/*
* Add string "p" to "gap".
* When out of memory "p" is freed and FAIL is returned.
* When out of memory FAIL is returned (caller may want to free "p").
*/
int
ga_add_string(garray_T *gap, char_u *p)

View File

@@ -693,56 +693,56 @@ do_argfile(exarg_T *eap, int argn)
emsg(_(e_cannot_go_before_first_file));
else
emsg(_(e_cannot_go_beyond_last_file));
return;
}
setpcmark();
#ifdef FEAT_GUI
need_mouse_correct = TRUE;
#endif
// split window or create new tab page first
if (*eap->cmd == 's' || cmdmod.cmod_tab != 0)
{
if (win_split(0, 0) == FAIL)
return;
RESET_BINDING(curwin);
}
else
{
setpcmark();
#ifdef FEAT_GUI
need_mouse_correct = TRUE;
#endif
// split window or create new tab page first
if (*eap->cmd == 's' || cmdmod.cmod_tab != 0)
// if 'hidden' set, only check for changed file when re-editing
// the same buffer
other = TRUE;
if (buf_hide(curbuf))
{
if (win_split(0, 0) == FAIL)
return;
RESET_BINDING(curwin);
p = fix_fname(alist_name(&ARGLIST[argn]));
other = otherfile(p);
vim_free(p);
}
else
{
// if 'hidden' set, only check for changed file when re-editing
// the same buffer
other = TRUE;
if (buf_hide(curbuf))
{
p = fix_fname(alist_name(&ARGLIST[argn]));
other = otherfile(p);
vim_free(p);
}
if ((!buf_hide(curbuf) || !other)
&& check_changed(curbuf, CCGD_AW
| (other ? 0 : CCGD_MULTWIN)
| (eap->forceit ? CCGD_FORCEIT : 0)
| CCGD_EXCMD))
return;
}
curwin->w_arg_idx = argn;
if (argn == ARGCOUNT - 1 && curwin->w_alist == &global_alist)
arg_had_last = TRUE;
// Edit the file; always use the last known line number.
// When it fails (e.g. Abort for already edited file) restore the
// argument index.
if (do_ecmd(0, alist_name(&ARGLIST[curwin->w_arg_idx]), NULL,
eap, ECMD_LAST,
(buf_hide(curwin->w_buffer) ? ECMD_HIDE : 0)
+ (eap->forceit ? ECMD_FORCEIT : 0), curwin) == FAIL)
curwin->w_arg_idx = old_arg_idx;
// like Vi: set the mark where the cursor is in the file.
else if (eap->cmdidx != CMD_argdo)
setmark('\'');
if ((!buf_hide(curbuf) || !other)
&& check_changed(curbuf, CCGD_AW
| (other ? 0 : CCGD_MULTWIN)
| (eap->forceit ? CCGD_FORCEIT : 0)
| CCGD_EXCMD))
return;
}
curwin->w_arg_idx = argn;
if (argn == ARGCOUNT - 1 && curwin->w_alist == &global_alist)
arg_had_last = TRUE;
// Edit the file; always use the last known line number.
// When it fails (e.g. Abort for already edited file) restore the
// argument index.
if (do_ecmd(0, alist_name(&ARGLIST[curwin->w_arg_idx]), NULL,
eap, ECMD_LAST,
(buf_hide(curwin->w_buffer) ? ECMD_HIDE : 0)
+ (eap->forceit ? ECMD_FORCEIT : 0), curwin) == FAIL)
curwin->w_arg_idx = old_arg_idx;
// like Vi: set the mark where the cursor is in the file.
else if (eap->cmdidx != CMD_argdo)
setmark('\'');
}
/*

17
src/auto/configure vendored
View File

@@ -4816,6 +4816,19 @@ fi
done
# 10.5 and earlier lack dispatch
for ac_header in dispatch/dispatch.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default"
if test "x$ac_cv_header_dispatch_dispatch_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_DISPATCH_DISPATCH_H 1
_ACEOF
fi
done
@@ -15041,8 +15054,8 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
if test "$gccmajor" -gt "3"; then
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'`
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else

View File

@@ -629,27 +629,46 @@ do_augroup(char_u *arg, int del_group)
}
}
void
autocmd_init(void)
{
CLEAR_FIELD(aucmd_win);
}
#if defined(EXITFREE) || defined(PROTO)
void
free_all_autocmds(void)
{
int i;
char_u *s;
for (current_augroup = -1; current_augroup < augroups.ga_len;
++current_augroup)
do_autocmd(NULL, (char_u *)"", TRUE);
for (i = 0; i < augroups.ga_len; ++i)
for (int i = 0; i < augroups.ga_len; ++i)
{
s = ((char_u **)(augroups.ga_data))[i];
if (s != get_deleted_augroup())
vim_free(s);
}
ga_clear(&augroups);
// aucmd_win[] is freed in win_free_all()
}
#endif
/*
* Return TRUE if "win" is an active entry in aucmd_win[].
*/
int
is_aucmd_win(win_T *win)
{
for (int i = 0; i < AUCMD_WIN_COUNT; ++i)
if (aucmd_win[i].auc_win_used && aucmd_win[i].auc_win == win)
return TRUE;
return FALSE;
}
/*
* Return the event number for event name "start".
* Return NUM_EVENTS if the event name was not found.
@@ -1044,18 +1063,18 @@ au_get_grouparg(char_u **argp)
for (p = arg; *p && !VIM_ISWHITE(*p) && *p != '|'; ++p)
;
if (p > arg)
{
group_name = vim_strnsave(arg, p - arg);
if (group_name == NULL) // out of memory
return AUGROUP_ERROR;
group = au_find_group(group_name);
if (group == AUGROUP_ERROR)
group = AUGROUP_ALL; // no match, use all groups
else
*argp = skipwhite(p); // match, skip over group name
vim_free(group_name);
}
if (p <= arg)
return AUGROUP_ALL;
group_name = vim_strnsave(arg, p - arg);
if (group_name == NULL) // out of memory
return AUGROUP_ERROR;
group = au_find_group(group_name);
if (group == AUGROUP_ERROR)
group = AUGROUP_ALL; // no match, use all groups
else
*argp = skipwhite(p); // match, skip over group name
vim_free(group_name);
return group;
}
@@ -1438,8 +1457,16 @@ ex_doautoall(exarg_T *eap)
if (buf->b_ml.ml_mfp == NULL || buf == curbuf)
continue;
// find a window for this buffer and save some values
// Find a window for this buffer and save some values.
aucmd_prepbuf(&aco, buf);
if (curbuf != buf)
{
// Failed to find a window for this buffer. Better not execute
// autocommands then.
retval = FAIL;
break;
}
set_bufref(&bufref, buf);
// execute the autocommands for this buffer
@@ -1449,7 +1476,7 @@ ex_doautoall(exarg_T *eap)
// Execute the modeline settings, but don't set window-local
// options if we are using the current window for another
// buffer.
do_modelines(curwin == aucmd_win ? OPT_NOWIN : 0);
do_modelines(is_aucmd_win(curwin) ? OPT_NOWIN : 0);
// restore the current window
aucmd_restbuf(&aco);
@@ -1490,8 +1517,9 @@ check_nomodeline(char_u **argp)
/*
* Prepare for executing autocommands for (hidden) buffer "buf".
* Search for a visible window containing the current buffer. If there isn't
* one then use "aucmd_win".
* one then use an entry in "aucmd_win[]".
* Set "curbuf" and "curwin" to match "buf".
* When this fails "curbuf" is not equal "buf".
*/
void
aucmd_prepbuf(
@@ -1512,18 +1540,28 @@ aucmd_prepbuf(
if (win->w_buffer == buf)
break;
// Allocate "aucmd_win" when needed. If this fails (out of memory) fall
// back to using the current window.
if (win == NULL && aucmd_win == NULL)
// Allocate a window when needed.
win_T *auc_win = NULL;
int auc_idx = AUCMD_WIN_COUNT;
if (win == NULL)
{
aucmd_win = win_alloc_popup_win();
if (aucmd_win == NULL)
win = curwin;
for (auc_idx = 0; auc_idx < AUCMD_WIN_COUNT; ++auc_idx)
if (!aucmd_win[auc_idx].auc_win_used)
{
if (aucmd_win[auc_idx].auc_win == NULL)
aucmd_win[auc_idx].auc_win = win_alloc_popup_win();
auc_win = aucmd_win[auc_idx].auc_win;
if (auc_win != NULL)
aucmd_win[auc_idx].auc_win_used = TRUE;
break;
}
// If this fails (out of memory or using all AUCMD_WIN_COUNT
// entries) then we can't reliable execute the autocmd, return with
// "curbuf" unequal "buf".
if (auc_win == NULL)
return;
}
if (win == NULL && aucmd_win_used)
// Strange recursive autocommand, fall back to using the current
// window. Expect a few side effects...
win = curwin;
aco->save_curwin_id = curwin->w_id;
aco->save_curbuf = curbuf;
@@ -1533,24 +1571,23 @@ aucmd_prepbuf(
// There is a window for "buf" in the current tab page, make it the
// curwin. This is preferred, it has the least side effects (esp. if
// "buf" is curbuf).
aco->use_aucmd_win = FALSE;
aco->use_aucmd_win_idx = -1;
curwin = win;
}
else
{
// There is no window for "buf", use "aucmd_win". To minimize the side
// There is no window for "buf", use "auc_win". To minimize the side
// effects, insert it in the current tab page.
// Anything related to a window (e.g., setting folds) may have
// unexpected results.
aco->use_aucmd_win = TRUE;
aucmd_win_used = TRUE;
aco->use_aucmd_win_idx = auc_idx;
win_init_popup_win(aucmd_win, buf);
win_init_popup_win(auc_win, buf);
aco->globaldir = globaldir;
globaldir = NULL;
// Split the current window, put the aucmd_win in the upper half.
// Split the current window, put the auc_win in the upper half.
// We don't want the BufEnter or WinEnter autocommands.
block_autocmds();
make_snapshot(SNAP_AUCMD_IDX);
@@ -1565,7 +1602,7 @@ aucmd_prepbuf(
// no redrawing and don't set the window title
++RedrawingDisabled;
(void)win_split_ins(0, WSP_TOP, aucmd_win, 0);
(void)win_split_ins(0, WSP_TOP, auc_win, 0);
--RedrawingDisabled;
(void)win_comp_pos(); // recompute window positions
p_ea = save_ea;
@@ -1573,7 +1610,7 @@ aucmd_prepbuf(
p_acd = save_acd;
#endif
unblock_autocmds();
curwin = aucmd_win;
curwin = auc_win;
}
curbuf = buf;
aco->new_curwin_id = curwin->w_id;
@@ -1595,24 +1632,26 @@ aucmd_restbuf(
int dummy;
win_T *save_curwin;
if (aco->use_aucmd_win)
if (aco->use_aucmd_win_idx >= 0)
{
win_T *awp = aucmd_win[aco->use_aucmd_win_idx].auc_win;
--curbuf->b_nwindows;
// Find "aucmd_win", it can't be closed, but it may be in another tab
// Find "awp", it can't be closed, but it may be in another tab
// page. Do not trigger autocommands here.
block_autocmds();
if (curwin != aucmd_win)
if (curwin != awp)
{
tabpage_T *tp;
win_T *wp;
FOR_ALL_TAB_WINDOWS(tp, wp)
{
if (wp == aucmd_win)
if (wp == awp)
{
if (tp != curtab)
goto_tabpage_tp(tp, TRUE, TRUE);
win_goto(aucmd_win);
win_goto(awp);
goto win_found;
}
}
@@ -1622,7 +1661,10 @@ win_found:
// Remove the window and frame from the tree of frames.
(void)winframe_remove(curwin, &dummy, NULL);
win_remove(curwin, NULL);
aucmd_win_used = FALSE;
// The window is marked as not used, but it is not freed, it can be
// used again.
aucmd_win[aco->use_aucmd_win_idx].auc_win_used = FALSE;
last_status(FALSE); // may need to remove last status line
if (!valid_tabpage_win(curtab))
@@ -1646,8 +1688,8 @@ win_found:
#endif
prevwin = win_find_by_id(aco->save_prevwin_id);
#ifdef FEAT_EVAL
vars_clear(&aucmd_win->w_vars->dv_hashtab); // free all w: variables
hash_init(&aucmd_win->w_vars->dv_hashtab); // re-use the hashtab
vars_clear(&awp->w_vars->dv_hashtab); // free all w: variables
hash_init(&awp->w_vars->dv_hashtab); // re-use the hashtab
#endif
vim_free(globaldir);
globaldir = aco->globaldir;
@@ -1664,11 +1706,9 @@ win_found:
#if defined(FEAT_GUI)
if (gui.in_use)
{
// Hide the scrollbars from the aucmd_win and update.
gui_mch_enable_scrollbar(
&aucmd_win->w_scrollbars[SBAR_LEFT], FALSE);
gui_mch_enable_scrollbar(
&aucmd_win->w_scrollbars[SBAR_RIGHT], FALSE);
// Hide the scrollbars from the "awp" and update.
gui_mch_enable_scrollbar(&awp->w_scrollbars[SBAR_LEFT], FALSE);
gui_mch_enable_scrollbar(&awp->w_scrollbars[SBAR_RIGHT], FALSE);
gui_may_update_scrollbars();
}
#endif
@@ -2028,6 +2068,9 @@ apply_autocmds_group(
&& (event == EVENT_WINLEAVE || event == EVENT_BUFLEAVE)))
goto BYPASS_AU;
if (event == EVENT_CMDLINECHANGED)
++aucmd_cmdline_changed_count;
/*
* Save the autocmd_* variables and info about the current buffer.
*/
@@ -2048,8 +2091,8 @@ apply_autocmds_group(
if (fname_io == NULL)
{
if (event == EVENT_COLORSCHEME || event == EVENT_COLORSCHEMEPRE
|| event == EVENT_OPTIONSET
|| event == EVENT_MODECHANGED)
|| event == EVENT_OPTIONSET
|| event == EVENT_MODECHANGED)
autocmd_fname = NULL;
else if (fname != NULL && !ends_excmd(*fname))
autocmd_fname = fname;

View File

@@ -517,7 +517,8 @@ bf_self_test(void)
// We can't simply use sizeof(UINT32_T), it would generate a compiler
// warning.
if (ui != 0xffffffffUL || ui + 1 != 0) {
if (ui != 0xffffffffUL || ui + 1 != 0)
{
err++;
emsg(_(e_sizeof_uint32_isnot_four));
}
@@ -573,13 +574,15 @@ bf_cfb_init(
}
}
#define BF_CFB_UPDATE(bfs, c) { \
#define BF_CFB_UPDATE(bfs, c) \
{ \
bfs->cfb_buffer[bfs->update_offset] ^= (char_u)c; \
if (++bfs->update_offset == bfs->cfb_len) \
bfs->update_offset = 0; \
}
#define BF_RANBYTE(bfs, t) { \
#define BF_RANBYTE(bfs, t) \
{ \
if ((bfs->randbyte_offset & BF_BLOCK_MASK) == 0) \
bf_e_cblock(bfs, &(bfs->cfb_buffer[bfs->randbyte_offset])); \
t = bfs->cfb_buffer[bfs->randbyte_offset]; \

View File

@@ -146,11 +146,15 @@ read_buffer(
void
buffer_ensure_loaded(buf_T *buf)
{
if (buf->b_ml.ml_mfp == NULL)
{
aco_save_T aco;
if (buf->b_ml.ml_mfp != NULL)
return;
aucmd_prepbuf(&aco, buf);
aco_save_T aco;
// Make sure the buffer is in a window. If not then skip it.
aucmd_prepbuf(&aco, buf);
if (curbuf == buf)
{
if (swap_exists_action != SEA_READONLY)
swap_exists_action = SEA_NONE;
open_buffer(FALSE, NULL, 0);
@@ -353,25 +357,30 @@ open_buffer(
apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf);
#endif
if (retval == OK)
{
// The autocommands may have changed the current buffer. Apply the
// modelines to the correct buffer, if it still exists and is loaded.
if (bufref_valid(&old_curbuf) && old_curbuf.br_buf->b_ml.ml_mfp != NULL)
{
aco_save_T aco;
if (retval != OK)
return retval;
// Go to the buffer that was opened.
aucmd_prepbuf(&aco, old_curbuf.br_buf);
// The autocommands may have changed the current buffer. Apply the
// modelines to the correct buffer, if it still exists and is loaded.
if (bufref_valid(&old_curbuf) && old_curbuf.br_buf->b_ml.ml_mfp != NULL)
{
aco_save_T aco;
// Go to the buffer that was opened, make sure it is in a window.
// If not then skip it.
aucmd_prepbuf(&aco, old_curbuf.br_buf);
if (curbuf == old_curbuf.br_buf)
{
do_modelines(0);
curbuf->b_flags &= ~(BF_CHECK_RO | BF_NEVERLOADED);
if ((flags & READ_NOWINENTER) == 0)
#ifdef FEAT_EVAL
apply_autocmds_retval(EVENT_BUFWINENTER, NULL, NULL, FALSE,
curbuf, &retval);
apply_autocmds_retval(EVENT_BUFWINENTER, NULL, NULL,
FALSE, curbuf, &retval);
#else
apply_autocmds(EVENT_BUFWINENTER, NULL, NULL, FALSE, curbuf);
apply_autocmds(EVENT_BUFWINENTER, NULL, NULL,
FALSE, curbuf);
#endif
// restore curwin/curbuf and a few other things
@@ -434,7 +443,7 @@ static hashtab_T buf_hashtab;
buf_hashtab_add(buf_T *buf)
{
sprintf((char *)buf->b_key, "%x", buf->b_fnum);
if (hash_add(&buf_hashtab, buf->b_key) == FAIL)
if (hash_add(&buf_hashtab, buf->b_key, "create buffer") == FAIL)
emsg(_(e_buffer_cannot_be_registered));
}
@@ -444,7 +453,7 @@ buf_hashtab_remove(buf_T *buf)
hashitem_T *hi = hash_find(&buf_hashtab, buf->b_key);
if (!HASHITEM_EMPTY(hi))
hash_remove(&buf_hashtab, hi);
hash_remove(&buf_hashtab, hi, "close buffer");
}
/*
@@ -925,7 +934,7 @@ free_buffer(buf_T *buf)
free_buffer_stuff(buf, TRUE);
#ifdef FEAT_EVAL
// b:changedtick uses an item in buf_T, remove it now
dictitem_remove(buf->b_vars, (dictitem_T *)&buf->b_ct_di);
dictitem_remove(buf->b_vars, (dictitem_T *)&buf->b_ct_di, "free buffer");
unref_var_dict(buf->b_vars);
remove_listeners(buf);
#endif
@@ -1752,7 +1761,6 @@ do_bufdel(
}
}
return errormsg;
}
@@ -3010,20 +3018,20 @@ fname_match(
char_u *p;
// extra check for valid arguments
if (name != NULL && rmp->regprog != NULL)
if (name == NULL || rmp->regprog == NULL)
return NULL;
// Ignore case when 'fileignorecase' or the argument is set.
rmp->rm_ic = p_fic || ignore_case;
if (vim_regexec(rmp, name, (colnr_T)0))
match = name;
else if (rmp->regprog != NULL)
{
// Ignore case when 'fileignorecase' or the argument is set.
rmp->rm_ic = p_fic || ignore_case;
if (vim_regexec(rmp, name, (colnr_T)0))
// Replace $(HOME) with '~' and try matching again.
p = home_replace_save(NULL, name);
if (p != NULL && vim_regexec(rmp, p, (colnr_T)0))
match = name;
else if (rmp->regprog != NULL)
{
// Replace $(HOME) with '~' and try matching again.
p = home_replace_save(NULL, name);
if (p != NULL && vim_regexec(rmp, p, (colnr_T)0))
match = name;
vim_free(p);
}
vim_free(p);
}
return match;
@@ -3151,16 +3159,15 @@ wininfo_other_tab_diff(wininfo_T *wip)
{
win_T *wp;
if (wip->wi_opt.wo_diff)
{
FOR_ALL_WINDOWS(wp)
// return FALSE when it's a window in the current tab page, thus
// the buffer was in diff mode here
if (wip->wi_win == wp)
return FALSE;
return TRUE;
}
return FALSE;
if (!wip->wi_opt.wo_diff)
return FALSE;
FOR_ALL_WINDOWS(wp)
// return FALSE when it's a window in the current tab page, thus
// the buffer was in diff mode here
if (wip->wi_win == wp)
return FALSE;
return TRUE;
}
#endif
@@ -3189,27 +3196,27 @@ find_wininfo(
&& (!need_options || wip->wi_optset))
break;
if (wip != NULL)
return wip;
// If no wininfo for curwin, use the first in the list (that doesn't have
// 'diff' set and is in another tab page).
// If "need_options" is TRUE skip entries that don't have options set,
// unless the window is editing "buf", so we can copy from the window
// itself.
if (wip == NULL)
{
#ifdef FEAT_DIFF
if (skip_diff_buffer)
{
FOR_ALL_BUF_WININFO(buf, wip)
if (!wininfo_other_tab_diff(wip)
&& (!need_options || wip->wi_optset
|| (wip->wi_win != NULL
&& wip->wi_win->w_buffer == buf)))
break;
}
else
#endif
wip = buf->b_wininfo;
if (skip_diff_buffer)
{
FOR_ALL_BUF_WININFO(buf, wip)
if (!wininfo_other_tab_diff(wip)
&& (!need_options || wip->wi_optset
|| (wip->wi_win != NULL
&& wip->wi_win->w_buffer == buf)))
break;
}
else
#endif
wip = buf->b_wininfo;
return wip;
}
@@ -3573,18 +3580,18 @@ buf_set_name(int fnum, char_u *name)
buf_T *buf;
buf = buflist_findnr(fnum);
if (buf != NULL)
{
if (buf->b_sfname != buf->b_ffname)
vim_free(buf->b_sfname);
vim_free(buf->b_ffname);
buf->b_ffname = vim_strsave(name);
buf->b_sfname = NULL;
// Allocate ffname and expand into full path. Also resolves .lnk
// files on Win32.
fname_expand(buf, &buf->b_ffname, &buf->b_sfname);
buf->b_fname = buf->b_sfname;
}
if (buf == NULL)
return;
if (buf->b_sfname != buf->b_ffname)
vim_free(buf->b_sfname);
vim_free(buf->b_ffname);
buf->b_ffname = vim_strsave(name);
buf->b_sfname = NULL;
// Allocate ffname and expand into full path. Also resolves .lnk
// files on Win32.
fname_expand(buf, &buf->b_ffname, &buf->b_sfname);
buf->b_fname = buf->b_sfname;
}
/*
@@ -4608,6 +4615,8 @@ build_stl_str_hl(
#endif
if (vim_strchr(STL_ALL, *s) == NULL)
{
if (*s == NUL) // can happen with "%0"
break;
s++;
continue;
}
@@ -4766,6 +4775,11 @@ build_stl_str_hl(
get_rel_pos(wp, str, TMPLEN);
break;
case STL_SHOWCMD:
if (p_sc && STRCMP(opt_name, p_sloc) == 0)
str = showcmd_buf;
break;
case STL_ARGLISTSTAT:
fillable = FALSE;
buf_tmp[0] = 0;
@@ -5907,14 +5921,14 @@ buf_get_fname(buf_T *buf)
void
set_buflisted(int on)
{
if (on != curbuf->b_p_bl)
{
curbuf->b_p_bl = on;
if (on)
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, curbuf);
else
apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf);
}
if (on == curbuf->b_p_bl)
return;
curbuf->b_p_bl = on;
if (on)
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, curbuf);
else
apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf);
}
/*
@@ -5942,8 +5956,14 @@ buf_contents_changed(buf_T *buf)
return TRUE;
}
// set curwin/curbuf to buf and save a few things
// Set curwin/curbuf to buf and save a few things.
aucmd_prepbuf(&aco, newbuf);
if (curbuf != newbuf)
{
// Failed to find a window for "newbuf".
wipe_buffer(newbuf, FALSE);
return TRUE;
}
if (ml_open(curbuf) == OK
&& readfile(buf->b_ffname, buf->b_fname,

View File

@@ -802,8 +802,15 @@ buf_write(
if (fname == buf->b_sfname)
buf_fname_s = TRUE;
// set curwin/curbuf to buf and save a few things
// Set curwin/curbuf to buf and save a few things.
aucmd_prepbuf(&aco, buf);
if (curbuf != buf)
{
// Could not find a window for "buf". Doing more might cause
// problems, better bail out.
return FAIL;
}
set_bufref(&bufref, buf);
if (append)
@@ -2592,23 +2599,26 @@ nofail:
// Apply POST autocommands.
// Careful: The autocommands may call buf_write() recursively!
// Only do this when a window was found for "buf".
aucmd_prepbuf(&aco, buf);
if (curbuf == buf)
{
if (append)
apply_autocmds_exarg(EVENT_FILEAPPENDPOST, fname, fname,
FALSE, curbuf, eap);
else if (filtering)
apply_autocmds_exarg(EVENT_FILTERWRITEPOST, NULL, fname,
FALSE, curbuf, eap);
else if (reset_changed && whole)
apply_autocmds_exarg(EVENT_BUFWRITEPOST, fname, fname,
FALSE, curbuf, eap);
else
apply_autocmds_exarg(EVENT_FILEWRITEPOST, fname, fname,
FALSE, curbuf, eap);
if (append)
apply_autocmds_exarg(EVENT_FILEAPPENDPOST, fname, fname,
FALSE, curbuf, eap);
else if (filtering)
apply_autocmds_exarg(EVENT_FILTERWRITEPOST, NULL, fname,
FALSE, curbuf, eap);
else if (reset_changed && whole)
apply_autocmds_exarg(EVENT_BUFWRITEPOST, fname, fname,
FALSE, curbuf, eap);
else
apply_autocmds_exarg(EVENT_FILEWRITEPOST, fname, fname,
FALSE, curbuf, eap);
// restore curwin/curbuf and a few other things
aucmd_restbuf(&aco);
// restore curwin/curbuf and a few other things
aucmd_restbuf(&aco);
}
#ifdef FEAT_EVAL
if (aborting()) // autocmds may abort script processing

View File

@@ -259,6 +259,8 @@ f_listener_add(typval_T *argvars, typval_T *rettv)
buf->b_listener = lnr;
set_callback(&lnr->lr_callback, &callback);
if (callback.cb_free_name)
vim_free(callback.cb_name);
lnr->lr_id = ++next_listener_id;
rettv->vval.v_number = lnr->lr_id;
@@ -770,14 +772,7 @@ appended_lines(linenr_T lnum, long count)
void
appended_lines_mark(linenr_T lnum, long count)
{
// Skip mark_adjust when adding a line after the last one, there can't
// be marks there. But it's still needed in diff mode.
if (lnum + count < curbuf->b_ml.ml_line_count
#ifdef FEAT_DIFF
|| curwin->w_p_diff
#endif
)
mark_adjust(lnum + 1, (linenr_T)MAXLNUM, count, 0L);
mark_adjust(lnum + 1, (linenr_T)MAXLNUM, count, 0L);
changed_lines(lnum + 1, 0, lnum + 1, count);
}
@@ -2140,14 +2135,7 @@ open_line(
goto theend;
// Postpone calling changed_lines(), because it would mess up folding
// with markers.
// Skip mark_adjust when adding a line after the last one, there can't
// be marks there. But still needed in diff mode.
if (curwin->w_cursor.lnum + 1 < curbuf->b_ml.ml_line_count
#ifdef FEAT_DIFF
|| curwin->w_p_diff
#endif
)
mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
did_append = TRUE;
#ifdef FEAT_PROP_POPUP
if ((State & MODE_INSERT) && (State & VREPLACE_FLAG) == 0)

View File

@@ -81,8 +81,6 @@ static ch_part_T channel_part_read(channel_T *channel);
// is safe to invoke callbacks.
static int safe_to_invoke_callback = 0;
static char *part_names[] = {"sock", "out", "err", "in"};
#ifdef MSWIN
static int
fd_read(sock_T fd, char *buf, size_t len)
@@ -142,128 +140,6 @@ fd_close(sock_T fd)
}
#endif
// Log file opened with ch_logfile().
static FILE *log_fd = NULL;
static char_u *log_name = NULL;
#ifdef FEAT_RELTIME
static proftime_T log_start;
#endif
void
ch_logfile(char_u *fname, char_u *opt)
{
FILE *file = NULL;
char *mode = "a";
if (log_fd != NULL)
{
if (*fname != NUL)
ch_log(NULL, "closing this logfile, opening %s", fname);
else
ch_log(NULL, "closing logfile %s", log_name);
fclose(log_fd);
}
// The "a" flag overrules the "w" flag.
if (vim_strchr(opt, 'a') == NULL && vim_strchr(opt, 'w') != NULL)
mode = "w";
ch_log_output = vim_strchr(opt, 'o') != NULL ? LOG_ALWAYS : FALSE;
if (*fname != NUL)
{
file = fopen((char *)fname, mode);
if (file == NULL)
{
semsg(_(e_cant_open_file_str), fname);
return;
}
vim_free(log_name);
log_name = vim_strsave(fname);
}
log_fd = file;
if (log_fd != NULL)
{
fprintf(log_fd, "==== start log session %s ====\n",
get_ctime(time(NULL), FALSE));
// flush now, if fork/exec follows it could be written twice
fflush(log_fd);
#ifdef FEAT_RELTIME
profile_start(&log_start);
#endif
}
}
int
ch_log_active(void)
{
return log_fd != NULL;
}
static void
ch_log_lead(const char *what, channel_T *ch, ch_part_T part)
{
if (log_fd == NULL)
return;
#ifdef FEAT_RELTIME
proftime_T log_now;
profile_start(&log_now);
profile_sub(&log_now, &log_start);
fprintf(log_fd, "%s ", profile_msg(&log_now));
#endif
if (ch != NULL)
{
if (part < PART_COUNT)
fprintf(log_fd, "%son %d(%s): ",
what, ch->ch_id, part_names[part]);
else
fprintf(log_fd, "%son %d: ", what, ch->ch_id);
}
else
fprintf(log_fd, "%s: ", what);
}
#ifndef PROTO // prototype is in proto.h
void
ch_log(channel_T *ch, const char *fmt, ...)
{
if (log_fd == NULL)
return;
va_list ap;
ch_log_lead("", ch, PART_COUNT);
va_start(ap, fmt);
vfprintf(log_fd, fmt, ap);
va_end(ap);
fputc('\n', log_fd);
fflush(log_fd);
did_repeated_msg = 0;
}
#endif
static void
ch_error(channel_T *ch, const char *fmt, ...) ATTRIBUTE_FORMAT_PRINTF(2, 3);
static void
ch_error(channel_T *ch, const char *fmt, ...)
{
if (log_fd == NULL)
return;
va_list ap;
ch_log_lead("ERR ", ch, PART_COUNT);
va_start(ap, fmt);
vfprintf(log_fd, fmt, ap);
va_end(ap);
fputc('\n', log_fd);
fflush(log_fd);
did_repeated_msg = 0;
}
#ifdef MSWIN
# undef PERROR
# define PERROR(msg) (void)semsg("%s: %s", msg, strerror_win32(errno))
@@ -620,7 +496,7 @@ channel_gui_register_one(channel_T *channel, ch_part_T part UNUSED)
if (channel->ch_part[part].ch_inputHandler == (XtInputId)NULL)
{
ch_log(channel, "Registering part %s with fd %d",
part_names[part], channel->ch_part[part].ch_fd);
ch_part_names[part], channel->ch_part[part].ch_fd);
channel->ch_part[part].ch_inputHandler = XtAppAddInput(
(XtAppContext)app_context,
@@ -636,7 +512,7 @@ channel_gui_register_one(channel_T *channel, ch_part_T part UNUSED)
if (channel->ch_part[part].ch_inputHandler == 0)
{
ch_log(channel, "Registering part %s with fd %d",
part_names[part], channel->ch_part[part].ch_fd);
ch_part_names[part], channel->ch_part[part].ch_fd);
# if GTK_CHECK_VERSION(3,0,0)
GIOChannel *chnnl = g_io_channel_unix_new(
(gint)channel->ch_part[part].ch_fd);
@@ -694,7 +570,7 @@ channel_gui_unregister_one(channel_T *channel UNUSED, ch_part_T part UNUSED)
# ifdef FEAT_GUI_X11
if (channel->ch_part[part].ch_inputHandler != (XtInputId)NULL)
{
ch_log(channel, "Unregistering part %s", part_names[part]);
ch_log(channel, "Unregistering part %s", ch_part_names[part]);
XtRemoveInput(channel->ch_part[part].ch_inputHandler);
channel->ch_part[part].ch_inputHandler = (XtInputId)NULL;
}
@@ -702,7 +578,7 @@ channel_gui_unregister_one(channel_T *channel UNUSED, ch_part_T part UNUSED)
# ifdef FEAT_GUI_GTK
if (channel->ch_part[part].ch_inputHandler != 0)
{
ch_log(channel, "Unregistering part %s", part_names[part]);
ch_log(channel, "Unregistering part %s", ch_part_names[part]);
# if GTK_CHECK_VERSION(3,0,0)
g_source_remove(channel->ch_part[part].ch_inputHandler);
# else
@@ -1786,7 +1662,7 @@ channel_buffer_free(buf_T *buf)
if (ch_part->ch_bufref.br_buf == buf)
{
ch_log(channel, "%s buffer has been wiped out",
part_names[part]);
ch_part_names[part]);
ch_part->ch_bufref.br_buf = NULL;
}
}
@@ -2165,12 +2041,8 @@ channel_save(channel_T *channel, ch_part_T part, char_u *buf, int len,
}
if (ch_log_active() && lead != NULL)
{
ch_log_lead(lead, channel, part);
fprintf(log_fd, "'");
vim_ignored = (int)fwrite(buf, len, 1, log_fd);
fprintf(log_fd, "'\n");
}
ch_log_literal(lead, channel, part, buf, len);
return OK;
}
@@ -2872,8 +2744,14 @@ append_to_buffer(buf_T *buffer, char_u *msg, channel_T *channel, ch_part_T part)
buffer->b_p_ma = TRUE;
// set curbuf to be our buf, temporarily
// Set curbuf to "buffer", temporarily.
aucmd_prepbuf(&aco, buffer);
if (curbuf != buffer)
{
// Could not find a window for this buffer, the following might cause
// trouble, better bail out.
return;
}
u_sync(TRUE);
// ignore undo failure, undo is not very useful here
@@ -3012,7 +2890,7 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
|| buffer->b_ml.ml_mfp == NULL))
{
// buffer was wiped out or unloaded
ch_log(channel, "%s buffer has been wiped out", part_names[part]);
ch_log(channel, "%s buffer has been wiped out", ch_part_names[part]);
ch_part->ch_bufref.br_buf = NULL;
buffer = NULL;
}
@@ -3452,7 +3330,7 @@ channel_close(channel_T *channel, int invoke_close_cb)
++channel->ch_refcount;
if (channel->ch_close_cb.cb_name == NULL)
ch_log(channel, "flushing %s buffers before closing",
part_names[part]);
ch_part_names[part]);
while (may_invoke_callback(channel, part))
;
--channel->ch_refcount;
@@ -3854,7 +3732,7 @@ channel_read(channel_T *channel, ch_part_T part, char *func)
if (fd == INVALID_FD)
{
ch_error(channel, "channel_read() called while %s part is closed",
part_names[part]);
ch_part_names[part]);
return;
}
use_socket = fd == channel->CH_SOCK_FD;
@@ -4123,7 +4001,7 @@ channel_read_json_block(
* When "reading" is TRUE "check_open" considers typeahead useful.
* "part" is used to check typeahead, when PART_COUNT use the default part.
*/
static channel_T *
channel_T *
get_channel_arg(typval_T *tv, int check_open, int reading, ch_part_T part)
{
channel_T *channel = NULL;
@@ -4369,11 +4247,7 @@ channel_send(
if (ch_log_active())
{
ch_log_lead("SEND ", channel, part);
fprintf(log_fd, "'");
vim_ignored = (int)fwrite(buf_arg, len_arg, 1, log_fd);
fprintf(log_fd, "'\n");
fflush(log_fd);
ch_log_literal("SEND ", channel, part, buf_arg, len_arg);
did_repeated_msg = 0;
}
@@ -5286,52 +5160,6 @@ f_ch_info(typval_T *argvars, typval_T *rettv UNUSED)
channel_info(channel, rettv->vval.v_dict);
}
/*
* "ch_log()" function
*/
void
f_ch_log(typval_T *argvars, typval_T *rettv UNUSED)
{
char_u *msg;
channel_T *channel = NULL;
if (in_vim9script()
&& (check_for_string_arg(argvars, 0) == FAIL
|| check_for_opt_chan_or_job_arg(argvars, 1) == FAIL))
return;
msg = tv_get_string(&argvars[0]);
if (argvars[1].v_type != VAR_UNKNOWN)
channel = get_channel_arg(&argvars[1], FALSE, FALSE, 0);
ch_log(channel, "%s", msg);
}
/*
* "ch_logfile()" function
*/
void
f_ch_logfile(typval_T *argvars, typval_T *rettv UNUSED)
{
char_u *fname;
char_u *opt = (char_u *)"";
char_u buf[NUMBUFLEN];
// Don't open a file in restricted mode.
if (check_restricted() || check_secure())
return;
if (in_vim9script()
&& (check_for_string_arg(argvars, 0) == FAIL
|| check_for_opt_string_arg(argvars, 1) == FAIL))
return;
fname = tv_get_string(&argvars[0]);
if (argvars[1].v_type == VAR_STRING)
opt = tv_get_string_buf(&argvars[1], buf);
ch_logfile(fname, opt);
}
/*
* "ch_open()" function
*/

View File

@@ -345,24 +345,25 @@ transstr(char_u *s)
}
else
res = alloc(vim_strsize(s) + 1);
if (res != NULL)
if (res == NULL)
return NULL;
*res = NUL;
p = s;
while (*p != NUL)
{
*res = NUL;
p = s;
while (*p != NUL)
if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
{
if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
{
c = (*mb_ptr2char)(p);
if (vim_isprintc(c))
STRNCAT(res, p, l); // append printable multi-byte char
else
transchar_hex(res + STRLEN(res), c);
p += l;
}
c = (*mb_ptr2char)(p);
if (vim_isprintc(c))
STRNCAT(res, p, l); // append printable multi-byte char
else
STRCAT(res, transchar_byte(*p++));
transchar_hex(res + STRLEN(res), c);
p += l;
}
else
STRCAT(res, transchar_byte(*p++));
}
return res;
}
@@ -986,11 +987,15 @@ init_chartabsize_arg(
mch_memmove(cts->cts_text_props + count, prop_start,
count * sizeof(textprop_T));
for (i = 0; i < count; ++i)
if (cts->cts_text_props[i + count].tp_id < 0)
{
textprop_T *tp = cts->cts_text_props + i + count;
if (tp->tp_id < 0
&& text_prop_type_valid(wp->w_buffer, tp))
{
cts->cts_has_prop_with_text = TRUE;
break;
}
}
if (!cts->cts_has_prop_with_text)
{
// won't use the text properties, free them
@@ -1177,7 +1182,7 @@ win_lbr_chartabsize(
? col == 0
: (s[0] == NUL || s[1] == NUL)
&& cts->cts_with_trailing)))
&& tp->tp_id - 1 < gap->ga_len)
&& -tp->tp_id - 1 < gap->ga_len)
{
char_u *p = ((char_u **)gap->ga_data)[-tp->tp_id - 1];
@@ -1191,7 +1196,7 @@ win_lbr_chartabsize(
cells = text_prop_position(wp, tp, vcol,
(vcol + size) % (wp->w_width - col_off) + col_off,
&n_extra, &p, NULL, NULL);
&n_extra, &p, NULL, NULL, FALSE);
#ifdef FEAT_LINEBREAK
no_sbr = TRUE; // don't use 'showbreak' now
#endif

View File

@@ -46,21 +46,21 @@ cin_is_cinword(char_u *line)
cinw_len = (int)STRLEN(curbuf->b_p_cinw) + 1;
cinw_buf = alloc(cinw_len);
if (cinw_buf != NULL)
if (cinw_buf == NULL)
return FALSE;
line = skipwhite(line);
for (cinw = curbuf->b_p_cinw; *cinw; )
{
line = skipwhite(line);
for (cinw = curbuf->b_p_cinw; *cinw; )
len = copy_option_part(&cinw, cinw_buf, cinw_len, ",");
if (STRNCMP(line, cinw_buf, len) == 0
&& (!vim_iswordc(line[len]) || !vim_iswordc(line[len - 1])))
{
len = copy_option_part(&cinw, cinw_buf, cinw_len, ",");
if (STRNCMP(line, cinw_buf, len) == 0
&& (!vim_iswordc(line[len]) || !vim_iswordc(line[len - 1])))
{
retval = TRUE;
break;
}
retval = TRUE;
break;
}
vim_free(cinw_buf);
}
vim_free(cinw_buf);
return retval;
}
@@ -644,43 +644,42 @@ cin_islabel(void) // XXX
if (cin_isscopedecl(s))
return FALSE;
if (cin_islabel_skip(&s))
if (!cin_islabel_skip(&s))
return FALSE;
// Only accept a label if the previous line is terminated or is a case
// label.
pos_T cursor_save;
pos_T *trypos;
char_u *line;
cursor_save = curwin->w_cursor;
while (curwin->w_cursor.lnum > 1)
{
// Only accept a label if the previous line is terminated or is a case
// label.
pos_T cursor_save;
pos_T *trypos;
char_u *line;
--curwin->w_cursor.lnum;
cursor_save = curwin->w_cursor;
while (curwin->w_cursor.lnum > 1)
{
--curwin->w_cursor.lnum;
// If we're in a comment or raw string now, skip to the start of
// it.
curwin->w_cursor.col = 0;
if ((trypos = ind_find_start_CORS(NULL)) != NULL) // XXX
curwin->w_cursor = *trypos;
// If we're in a comment or raw string now, skip to the start of
// it.
curwin->w_cursor.col = 0;
if ((trypos = ind_find_start_CORS(NULL)) != NULL) // XXX
curwin->w_cursor = *trypos;
line = ml_get_curline();
if (cin_ispreproc(line)) // ignore #defines, #if, etc.
continue;
if (*(line = cin_skipcomment(line)) == NUL)
continue;
line = ml_get_curline();
if (cin_ispreproc(line)) // ignore #defines, #if, etc.
continue;
if (*(line = cin_skipcomment(line)) == NUL)
continue;
curwin->w_cursor = cursor_save;
if (cin_isterminated(line, TRUE, FALSE)
|| cin_isscopedecl(line)
|| cin_iscase(line, TRUE)
|| (cin_islabel_skip(&line) && cin_nocode(line)))
return TRUE;
return FALSE;
}
curwin->w_cursor = cursor_save;
return TRUE; // label at start of file???
if (cin_isterminated(line, TRUE, FALSE)
|| cin_isscopedecl(line)
|| cin_iscase(line, TRUE)
|| (cin_islabel_skip(&line) && cin_nocode(line)))
return TRUE;
return FALSE;
}
return FALSE;
curwin->w_cursor = cursor_save;
return TRUE; // label at start of file???
}
/*
@@ -1688,18 +1687,18 @@ find_match_paren_after_brace (int ind_maxparen) // XXX
{
pos_T *trypos = find_match_paren(ind_maxparen);
if (trypos != NULL)
{
pos_T *tryposBrace = find_start_brace();
if (trypos == NULL)
return NULL;
// If both an unmatched '(' and '{' is found. Ignore the '('
// position if the '{' is further down.
if (tryposBrace != NULL
&& (trypos->lnum != tryposBrace->lnum
? trypos->lnum < tryposBrace->lnum
: trypos->col < tryposBrace->col))
trypos = NULL;
}
pos_T *tryposBrace = find_start_brace();
// If both an unmatched '(' and '{' is found. Ignore the '('
// position if the '{' is further down.
if (tryposBrace != NULL
&& (trypos->lnum != tryposBrace->lnum
? trypos->lnum < tryposBrace->lnum
: trypos->col < tryposBrace->col))
trypos = NULL;
return trypos;
}
@@ -2642,7 +2641,7 @@ get_c_indent(void)
// It could have been something like
// case 1: if (asdf &&
// ldfd) {
// condition) {
// }
if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label)
&& cin_iscase(skipwhite(ml_get_curline()), FALSE))
@@ -3276,7 +3275,7 @@ get_c_indent(void)
}
// Check if we are after an "if", "while", etc.
// Also allow " } else".
// Also allow "} else".
if (cin_is_cinword(l) || cin_iselse(skipwhite(l)))
{
// Found an unterminated line after an if (), line up
@@ -3336,7 +3335,7 @@ get_c_indent(void)
{
// If we're looking at "} else", let's make sure we
// find the opening brace of the enclosing scope,
// not the one from "if () {".
// not the one from "if (condition) {".
if (*l == '}')
curwin->w_cursor.col =
(colnr_T)(l - ml_get_curline()) + 1;
@@ -3681,7 +3680,7 @@ term_again:
// line needs to be indented as a function type spec.
// Don't do this if the current line looks like a comment or if the
// current line is terminated, ie. ends in ';', or if the current line
// contains { or }: "void f() {\n if (1)"
// contains { or }: "void f(condition) {\n if (1)"
if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
&& !cin_nocode(theline)
&& vim_strchr(theline, '{') == NULL

View File

@@ -70,6 +70,10 @@ eval_client_expr_to_string(char_u *expr)
funccal_entry_T funccal_entry;
int did_save_funccal = FALSE;
#if defined(FEAT_EVAL)
ch_log(NULL, "eval_client_expr_to_string(\"%s\")", expr);
#endif
// Evaluate the expression at the toplevel, don't use variables local to
// the calling function. Except when in debug mode.
if (!debug_mode)
@@ -153,22 +157,22 @@ serverConvert(
char_u *res = data;
*tofree = NULL;
if (client_enc != NULL && p_enc != NULL)
{
vimconv_T vimconv;
if (client_enc == NULL || p_enc == NULL)
return res;
vimconv.vc_type = CONV_NONE;
if (convert_setup(&vimconv, client_enc, p_enc) != FAIL
&& vimconv.vc_type != CONV_NONE)
{
res = string_convert(&vimconv, data, NULL);
if (res == NULL)
res = data;
else
*tofree = res;
}
convert_setup(&vimconv, NULL, NULL);
vimconv_T vimconv;
vimconv.vc_type = CONV_NONE;
if (convert_setup(&vimconv, client_enc, p_enc) != FAIL
&& vimconv.vc_type != CONV_NONE)
{
res = string_convert(&vimconv, data, NULL);
if (res == NULL)
res = data;
else
*tofree = res;
}
convert_setup(&vimconv, NULL, NULL);
return res;
}
#endif
@@ -187,38 +191,38 @@ static char_u *build_drop_cmd(int filec, char **filev, int tabs, int sendReply);
void
exec_on_server(mparm_T *parmp)
{
if (parmp->serverName_arg == NULL || *parmp->serverName_arg != NUL)
if (parmp->serverName_arg != NULL && *parmp->serverName_arg == NUL)
return;
# ifdef MSWIN
// Initialise the client/server messaging infrastructure.
serverInitMessaging();
# endif
/*
* When a command server argument was found, execute it. This may
* exit Vim when it was successful. Otherwise it's executed further
* on. Remember the encoding used here in "serverStrEnc".
*/
if (parmp->serverArg)
{
# ifdef MSWIN
// Initialise the client/server messaging infrastructure.
serverInitMessaging();
# endif
/*
* When a command server argument was found, execute it. This may
* exit Vim when it was successful. Otherwise it's executed further
* on. Remember the encoding used here in "serverStrEnc".
*/
if (parmp->serverArg)
{
cmdsrv_main(&parmp->argc, parmp->argv,
parmp->serverName_arg, &parmp->serverStr);
parmp->serverStrEnc = vim_strsave(p_enc);
}
// If we're still running, get the name to register ourselves.
// On Win32 can register right now, for X11 need to setup the
// clipboard first, it's further down.
parmp->servername = serverMakeName(parmp->serverName_arg,
parmp->argv[0]);
# ifdef MSWIN
if (parmp->servername != NULL)
{
serverSetName(parmp->servername);
vim_free(parmp->servername);
}
# endif
cmdsrv_main(&parmp->argc, parmp->argv,
parmp->serverName_arg, &parmp->serverStr);
parmp->serverStrEnc = vim_strsave(p_enc);
}
// If we're still running, get the name to register ourselves.
// On Win32 can register right now, for X11 need to setup the
// clipboard first, it's further down.
parmp->servername = serverMakeName(parmp->serverName_arg,
parmp->argv[0]);
# ifdef MSWIN
if (parmp->servername != NULL)
{
serverSetName(parmp->servername);
vim_free(parmp->servername);
}
# endif
}
/*

View File

@@ -35,7 +35,7 @@ static int compl_match_arraysize;
static int compl_startcol;
static int compl_selected;
#define SHOW_FILE_TEXT(m) (showtail ? showmatches_gettail(matches[m]) : matches[m])
#define SHOW_MATCH(m) (showtail ? showmatches_gettail(matches[m]) : matches[m])
/*
* Returns TRUE if fuzzy completion is supported for a given cmdline completion
@@ -56,6 +56,7 @@ cmdline_fuzzy_completion_supported(expand_T *xp)
&& xp->xp_context != EXPAND_OLD_SETTING
&& xp->xp_context != EXPAND_OWNSYNTAX
&& xp->xp_context != EXPAND_PACKADD
&& xp->xp_context != EXPAND_RUNTIME
&& xp->xp_context != EXPAND_SHELLCMD
&& xp->xp_context != EXPAND_TAGS
&& xp->xp_context != EXPAND_TAGS_LISTFILES
@@ -339,7 +340,7 @@ cmdline_pum_create(
compl_match_array = ALLOC_MULT(pumitem_T, compl_match_arraysize);
for (i = 0; i < numMatches; i++)
{
compl_match_array[i].pum_text = SHOW_FILE_TEXT(i);
compl_match_array[i].pum_text = SHOW_MATCH(i);
compl_match_array[i].pum_info = NULL;
compl_match_array[i].pum_extra = NULL;
compl_match_array[i].pum_kind = NULL;
@@ -369,7 +370,8 @@ cmdline_pum_create(
/*
* Display the cmdline completion matches in a popup menu
*/
void cmdline_pum_display(void)
void
cmdline_pum_display(void)
{
pum_display(compl_match_array, compl_match_arraysize, compl_selected);
}
@@ -377,7 +379,8 @@ void cmdline_pum_display(void)
/*
* Returns TRUE if the cmdline completion popup menu is being displayed.
*/
int cmdline_pum_active(void)
int
cmdline_pum_active(void)
{
return pum_visible() && compl_match_array != NULL;
}
@@ -386,7 +389,8 @@ int cmdline_pum_active(void)
* Remove the cmdline completion popup menu (if present), free the list of
* items and refresh the screen.
*/
void cmdline_pum_remove(void)
void
cmdline_pum_remove(void)
{
int save_p_lz = p_lz;
int save_KeyTyped = KeyTyped;
@@ -403,7 +407,8 @@ void cmdline_pum_remove(void)
KeyTyped = save_KeyTyped;
}
void cmdline_pum_cleanup(cmdline_info_T *cclp)
void
cmdline_pum_cleanup(cmdline_info_T *cclp)
{
cmdline_pum_remove();
wildmenu_cleanup(cclp);
@@ -413,7 +418,8 @@ void cmdline_pum_cleanup(cmdline_info_T *cclp)
* Returns the starting column number to use for the cmdline completion popup
* menu.
*/
int cmdline_compl_startcol(void)
int
cmdline_compl_startcol(void)
{
return compl_startcol;
}
@@ -484,7 +490,6 @@ win_redr_status_matches(
int match,
int showtail)
{
#define L_MATCH(m) (showtail ? showmatches_gettail(matches[m]) : matches[m])
int row;
char_u *buf;
int len;
@@ -520,7 +525,7 @@ win_redr_status_matches(
highlight = FALSE;
}
// count 1 for the ending ">"
clen = status_match_len(xp, L_MATCH(match)) + 3;
clen = status_match_len(xp, SHOW_MATCH(match)) + 3;
if (match == 0)
first_match = 0;
else if (match < first_match)
@@ -533,7 +538,7 @@ win_redr_status_matches(
{
// check if match fits on the screen
for (i = first_match; i < match; ++i)
clen += status_match_len(xp, L_MATCH(i)) + 2;
clen += status_match_len(xp, SHOW_MATCH(i)) + 2;
if (first_match > 0)
clen += 2;
// jumping right, put match at the left
@@ -544,7 +549,7 @@ win_redr_status_matches(
clen = 2;
for (i = match; i < num_matches; ++i)
{
clen += status_match_len(xp, L_MATCH(i)) + 2;
clen += status_match_len(xp, SHOW_MATCH(i)) + 2;
if ((long)clen >= Columns)
break;
}
@@ -555,7 +560,7 @@ win_redr_status_matches(
if (add_left)
while (first_match > 0)
{
clen += status_match_len(xp, L_MATCH(first_match - 1)) + 2;
clen += status_match_len(xp, SHOW_MATCH(first_match - 1)) + 2;
if ((long)clen >= Columns)
break;
--first_match;
@@ -576,7 +581,7 @@ win_redr_status_matches(
clen = len;
i = first_match;
while ((long)(clen + status_match_len(xp, L_MATCH(i)) + 2) < Columns)
while ((long)(clen + status_match_len(xp, SHOW_MATCH(i)) + 2) < Columns)
{
if (i == match)
{
@@ -584,7 +589,7 @@ win_redr_status_matches(
selstart_col = clen;
}
s = L_MATCH(i);
s = SHOW_MATCH(i);
// Check for menu separators - replace with '|'
#ifdef FEAT_MENU
emenu = (xp->xp_context == EXPAND_MENUS
@@ -975,6 +980,10 @@ ExpandOne(
FreeWild(xp->xp_numfiles, xp->xp_files);
xp->xp_numfiles = -1;
VIM_CLEAR(orig_save);
// The entries from xp_files may be used in the PUM, remove it.
if (compl_match_array != NULL)
cmdline_pum_remove();
}
findex = 0;
@@ -1120,7 +1129,7 @@ showmatches_oneline(
// Expansion was done here, file names are literal.
isdir = mch_isdir(matches[j]);
if (showtail)
p = SHOW_FILE_TEXT(j);
p = SHOW_MATCH(j);
else
{
home_replace(NULL, matches[j], NameBuff, MAXPATHL,
@@ -1131,7 +1140,7 @@ showmatches_oneline(
else
{
isdir = FALSE;
p = SHOW_FILE_TEXT(j);
p = SHOW_MATCH(j);
}
lastlen = msg_outtrans_attr(p, isdir ? dir_attr : 0);
}
@@ -1210,7 +1219,7 @@ showmatches(expand_T *xp, int wildmenu UNUSED)
j = vim_strsize(NameBuff);
}
else
j = vim_strsize(SHOW_FILE_TEXT(i));
j = vim_strsize(SHOW_MATCH(i));
if (j > maxlen)
maxlen = j;
}
@@ -1354,6 +1363,7 @@ addstar(
// For a tag pattern starting with "/" no translation is needed.
if (context == EXPAND_HELP
|| context == EXPAND_COLORS
|| context == EXPAND_RUNTIME
|| context == EXPAND_COMPILER
|| context == EXPAND_OWNSYNTAX
|| context == EXPAND_FILETYPE
@@ -1842,21 +1852,22 @@ find_cmd_after_substitute_cmd(char_u *arg)
find_cmd_after_isearch_cmd(expand_T *xp, char_u *arg)
{
arg = skipwhite(skipdigits(arg)); // skip count
if (*arg == '/') // Match regexp, not just whole words
{
for (++arg; *arg && *arg != '/'; arg++)
if (*arg == '\\' && arg[1] != NUL)
arg++;
if (*arg)
{
arg = skipwhite(arg + 1);
if (*arg != '/')
return NULL;
// Check for trailing illegal characters
if (*arg == NUL || vim_strchr((char_u *)"|\"\n", *arg) == NULL)
xp->xp_context = EXPAND_NOTHING;
else
return arg;
}
// Match regexp, not just whole words
for (++arg; *arg && *arg != '/'; arg++)
if (*arg == '\\' && arg[1] != NUL)
arg++;
if (*arg)
{
arg = skipwhite(arg + 1);
// Check for trailing illegal characters
if (*arg == NUL || vim_strchr((char_u *)"|\"\n", *arg) == NULL)
xp->xp_context = EXPAND_NOTHING;
else
return arg;
}
return NULL;
@@ -2303,6 +2314,10 @@ set_context_by_cmdname(
xp->xp_pattern = arg;
break;
case CMD_runtime:
set_context_in_runtime_cmd(xp, arg);
break;
case CMD_compiler:
xp->xp_context = EXPAND_COMPILER;
xp->xp_pattern = arg;
@@ -2772,7 +2787,7 @@ get_breakadd_arg(expand_T *xp UNUSED, int idx)
{
char *opts[] = {"expr", "file", "func", "here"};
if (idx >=0 && idx <= 3)
if (idx >= 0 && idx <= 3)
{
// breakadd {expr, file, func, here}
if (breakpt_expand_what == EXP_BREAKPT_ADD)
@@ -3010,6 +3025,10 @@ ExpandFromContext(
return ExpandRTDir(pat, DIP_START + DIP_OPT, numMatches, matches,
directories);
}
if (xp->xp_context == EXPAND_RUNTIME)
{
return expand_runtime_cmd(pat, numMatches, matches);
}
if (xp->xp_context == EXPAND_COMPILER)
{
char *directories[] = {"compiler", NULL};
@@ -3590,13 +3609,15 @@ ExpandUserList(
/*
* Expand "file" for all comma-separated directories in "path".
* Adds the matches to "ga". Caller must init "ga".
* If "dirs" is TRUE only expand directory names.
*/
void
globpath(
char_u *path,
char_u *file,
garray_T *ga,
int expand_options)
int expand_options,
int dirs)
{
expand_T xpc;
char_u *buf;
@@ -3609,7 +3630,7 @@ globpath(
return;
ExpandInit(&xpc);
xpc.xp_context = EXPAND_FILES;
xpc.xp_context = dirs ? EXPAND_DIRECTORIES : EXPAND_FILES;
// Loop over all entries in {path}.
while (*path != NUL)
@@ -4016,6 +4037,11 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
}
# endif
if (xpc.xp_context == EXPAND_RUNTIME)
{
set_context_in_runtime_cmd(&xpc, xpc.xp_pattern);
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
}
}
if (cmdline_fuzzy_completion_supported(&xpc))

View File

@@ -460,44 +460,46 @@ del_history_entry(int histype, char_u *str)
int last;
int found = FALSE;
regmatch.regprog = NULL;
if (hislen == 0 || histype < 0 || histype >= HIST_COUNT || *str == NUL
|| hisidx[histype] < 0)
return FALSE;
idx = hisidx[histype];
regmatch.regprog = vim_regcomp(str, RE_MAGIC + RE_STRING);
if (regmatch.regprog == NULL)
return FALSE;
regmatch.rm_ic = FALSE; // always match case
if (hislen != 0
&& histype >= 0
&& histype < HIST_COUNT
&& *str != NUL
&& (idx = hisidx[histype]) >= 0
&& (regmatch.regprog = vim_regcomp(str, RE_MAGIC + RE_STRING))
!= NULL)
i = last = idx;
do
{
i = last = idx;
do
hisptr = &history[histype][i];
if (hisptr->hisstr == NULL)
break;
if (vim_regexec(&regmatch, hisptr->hisstr, (colnr_T)0))
{
hisptr = &history[histype][i];
if (hisptr->hisstr == NULL)
break;
if (vim_regexec(&regmatch, hisptr->hisstr, (colnr_T)0))
found = TRUE;
vim_free(hisptr->hisstr);
clear_hist_entry(hisptr);
}
else
{
if (i != last)
{
found = TRUE;
vim_free(hisptr->hisstr);
history[histype][last] = *hisptr;
clear_hist_entry(hisptr);
}
else
{
if (i != last)
{
history[histype][last] = *hisptr;
clear_hist_entry(hisptr);
}
if (--last < 0)
last += hislen;
}
if (--i < 0)
i += hislen;
} while (i != idx);
if (history[histype][idx].hisstr == NULL)
hisidx[histype] = -1;
}
if (--last < 0)
last += hislen;
}
if (--i < 0)
i += hislen;
} while (i != idx);
if (history[histype][idx].hisstr == NULL)
hisidx[histype] = -1;
vim_regfree(regmatch.regprog);
return found;
}

View File

@@ -236,6 +236,7 @@
/* Define if you have the header file: */
#undef HAVE_DIRENT_H
#undef HAVE_DISPATCH_DISPATCH_H
#undef HAVE_ERRNO_H
#undef HAVE_FCNTL_H
#undef HAVE_FRAME_H

View File

@@ -314,6 +314,8 @@ fi
dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon
dnl so we need to include it to have access to version macros.
AC_CHECK_HEADERS(AvailabilityMacros.h)
# 10.5 and earlier lack dispatch
AC_CHECK_HEADERS(dispatch/dispatch.h)
AC_SUBST(OS_EXTRA_SRC)
AC_SUBST(OS_EXTRA_OBJ)
@@ -4586,8 +4588,8 @@ if test "$GCC" = yes; then
dnl And undefine it first to avoid a warning.
AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1)
if test "$gccmajor" -gt "3"; then
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'`
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g'`
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)

View File

@@ -73,7 +73,7 @@ typedef struct {
char_u *p2, int last);
} cryptmethod_T;
static int crypt_sodium_init(cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len);
static int crypt_sodium_init_(cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len);
static long crypt_sodium_buffer_decode(cryptstate_T *state, char_u *from, size_t len, char_u **buf_out, int last);
static long crypt_sodium_buffer_encode(cryptstate_T *state, char_u *from, size_t len, char_u **buf_out, int last);
@@ -145,7 +145,7 @@ static cryptmethod_T cryptmethods[CRYPT_M_COUNT] = {
#endif
FALSE,
NULL,
crypt_sodium_init,
crypt_sodium_init_,
NULL, NULL,
crypt_sodium_buffer_encode, crypt_sodium_buffer_decode,
NULL, NULL,
@@ -198,6 +198,7 @@ typedef struct {
dll_crypto_secretstream_xchacha20poly1305_pull
# define crypto_pwhash dll_crypto_pwhash
# define randombytes_buf dll_randombytes_buf
# define randombytes_random dll_randombytes_random
static int (*dll_sodium_init)(void) = NULL;
static void (*dll_sodium_free)(void *) = NULL;
@@ -231,6 +232,7 @@ static int (*dll_crypto_pwhash)(unsigned char * const out,
unsigned long long opslimit, size_t memlimit, int alg)
= NULL;
static void (*dll_randombytes_buf)(void * const buf, const size_t size);
static uint32_t (*dll_randombytes_random)(void);
static struct {
const char *name;
@@ -248,6 +250,7 @@ static struct {
{"crypto_secretstream_xchacha20poly1305_pull", (SODIUM_PROC*)&dll_crypto_secretstream_xchacha20poly1305_pull},
{"crypto_pwhash", (SODIUM_PROC*)&dll_crypto_pwhash},
{"randombytes_buf", (SODIUM_PROC*)&dll_randombytes_buf},
{"randombytes_random", (SODIUM_PROC*)&dll_randombytes_random},
{NULL, NULL}
};
@@ -855,7 +858,7 @@ crypt_append_msg(
}
static int
crypt_sodium_init(
crypt_sodium_init_(
cryptstate_T *state UNUSED,
char_u *key UNUSED,
char_u *salt UNUSED,
@@ -1143,6 +1146,18 @@ crypt_sodium_randombytes_buf(void *const buf, const size_t size)
{
randombytes_buf(buf, size);
}
int
crypt_sodium_init(void)
{
return sodium_init();
}
uint32_t
crypt_sodium_randombytes_random(void)
{
return randombytes_random();
}
# endif
#endif // FEAT_CRYPT

Some files were not shown because too many files have changed in this diff Show More