Compare commits

...

260 Commits

Author SHA1 Message Date
232f4612e2 patch 8.2.1973: finding a patch number can be a bit slow
Problem:    Finding a patch number can be a bit slow.
Solution:   Use binary search. (closes #7279)
2020-11-10 20:54:29 +01:00
5e1f22ff61 patch 8.2.1972: crash when recreating nested fold
Problem:    Crash when recreating nested fold.
Solution:   Check for empty growarray. (closes #7278)
2020-11-10 18:23:52 +01:00
c56936e2ba patch 8.2.1971: memory leak when map() fails
Problem:    Memory leak when map() fails.
Solution:   Clear the typval.
2020-11-10 11:43:56 +01:00
f883508e36 patch 8.2.1970: it is easy to make mistakes when cleaning up swap files
Problem:    It is easy to make mistakes when cleaning up swap files after the
            system crashed.
Solution:   Warn for the process still running after recovery.  Do not
            automatically delete a swap file created on another system.
            (David Fries, closes #7273)
2020-11-09 21:04:17 +01:00
ea696852e7 patch 8.2.1969: Vim9: map() may change the list or dict item type
Problem:    Vim9: map() may change the list or dict item type.
Solution:   Add mapnew().
2020-11-09 18:31:39 +01:00
8cebd43e97 patch 8.2.1968: Vim9: has() assumes a feature does not change dynamically
Problem:    Vim9: has() assumes a feature does not change dynamically.
Solution:   Check whether a feature may change dynamically. (closes #7265)
2020-11-08 12:49:47 +01:00
59d8e56e04 patch 8.2.1967: the session file does not restore the alternate file
Problem:    The session file does not restore the alternate file.
Solution:   Add ":balt".  Works like ":badd" and also sets the buffer as the
            alternate file.  Use it in the session file. (closes #7269,
            closes #6714)
2020-11-07 18:41:10 +01:00
cbcd9cbd77 patch 8.2.1966: popup becomes current window after closing a terminal window
Problem:    Popup becomes current window after closing a terminal window.
Solution:   When restoring the window after executing autocommands, check that
            the window ID is still the same.  (Naruhiko Nishino,
            closes #7272)
2020-11-07 16:58:59 +01:00
46f479c756 patch 8.2.1965: Vim9: tests fail without the channel feature
Problem:    Vim9: tests fail without the channel feature.
Solution:   Check if the channel feature is present. (Dominique Pellé,
            closes 7270)
2020-11-07 13:09:18 +01:00
faebda8cc1 patch 8.2.1964: not all ConTeXt files are recognized
Problem:    Not all ConTeXt files are recognized.
Solution:   Add two patterns. (closes #7263)
2020-11-06 18:52:55 +01:00
927495b1fe patch 8.2.1963: crash when using a popup window with "latin1" encoding
Problem:    Crash when using a popup window with "latin1" encoding.
Solution:   Don't use ScreenLinesUC when enc_utf8 is false. (closes #7241)
2020-11-06 17:58:35 +01:00
32e5ec0b01 patch 8.2.1962: netbeans may access freed memory
Problem:    Netbeans may access freed memory.
Solution:   Check the buffer pointer is still valid.  Add a test. (Yegappan
            Lakshmanan, closes #7248)
2020-11-06 13:44:21 +01:00
85d9b03f84 Correct list of patches. 2020-11-06 12:03:08 +01:00
22286895fc patch 8.2.1961: various comments can be improved
Problem:    Various comments can be improved.
Solution:   Various comment adjustments.
2020-11-05 20:50:51 +01:00
0fd797eacd patch 8.2.1960: warning for uninitialized variable
Problem:    Warning for uninitialized variable.
Solution:   Initialize the variable.
2020-11-05 20:46:32 +01:00
3132cddd20 Update runtime files 2020-11-05 20:41:49 +01:00
00806bceb6 patch 8.2.1959: crash when terminal buffer name is made empty
Problem:    Crash when terminal buffer name is made empty. (Dhiraj Mishra)
Solution:   Fall back to "[No Name]". (closes #7262)
2020-11-05 19:36:38 +01:00
b885b435d1 patch 8.2.1958: build failure with timers
Problem:    Build failure with timers.
Solution:   Add missing change.
2020-11-05 19:34:41 +01:00
fabc3ca896 patch 8.2.1957: diff and cursorcolumn highlighting don't mix
Problem:    Diff and cursorcolumn highlighting don't mix.
Solution:   Fix condition for what attribute to use. (Christian Brabandt,
            closes #7258, closes #7260)
2020-11-05 19:07:21 +01:00
b4d16cb11d patch 8.2.1956: Vim9: cannot specify argument types for lambda
Problem:    Vim9: cannot specify argument types for lambda.
Solution:   Allow adding argument types.  Check arguments when calling a
            function reference.
2020-11-05 18:45:46 +01:00
66669fc664 patch 8.2.1955: Vim9: not all command modifiers are tested
Problem:    Vim9: not all command modifiers are tested.
Solution:   Add tests for remaining modifiers.
2020-11-04 18:53:35 +01:00
f65b35b446 patch 8.2.1954: Vim9: not all command modifiers are tested
Problem:    Vim9: not all command modifiers are tested.
Solution:   Add tests for "keep" modifiers.  Fix that marks are lost even
            though ":lockmarks" is used.
2020-11-04 18:02:44 +01:00
631e8f9345 patch 8.2.1953: Vim9: extra "unknown" error after other error
Problem:    Vim9: extra "unknown" error after other error.
Solution:   Restore did_emsg count after EXEC instruction. (closes #7254)
            Improve error message from assert_fails()
2020-11-04 15:07:16 +01:00
c7f7f6db3e patch 8.2.1952: Vim9: crash when using a NULL dict key
Problem:    Vim9: crash when using a NULL dict key.
Solution:   Use a NULL dict key like an empty string. (closes #7249)
2020-11-04 13:38:28 +01:00
64ffa9b5fb patch 8.2.1951: test for list and dict fails
Problem:    Test for list and dict fails.
Solution:   Adjust for using an empty list/dict for a null one.
2020-11-04 12:23:06 +01:00
9c13f76275 patch 8.2.1950: Vim9: crash when compiling function fails when getting type
Problem:    Vim9: crash when compiling function fails when getting type.
Solution:   Handle NULL type. (closes #7253)
2020-11-04 12:00:53 +01:00
348be7ed07 patch 8.2.1949: Vim9: using extend() on null dict is silently ignored
Problem:    Vim9: using extend() on null dict is silently ignored.
Solution:   Give an error message.  Initialize a dict variable with an empty
            dictionary. (closes #7251)
2020-11-04 11:36:35 +01:00
4778b4d0e1 patch 8.2.1948: GUI: crash when handling message while closing a window
Problem:    GUI: crash when handling message while closing a window. (Srinath
            Avadhanula)
Solution:   Don't handle message while closing a window. (closes #7250)
2020-11-04 11:03:12 +01:00
c136a3528b patch 8.2.1947: crash when using "zj" without folds
Problem:    Crash when using "zj" without folds. (Sean Dewar)
Solution:   Check for at least one fold. (closes #7245)
2020-11-03 20:05:40 +01:00
35efa22ff2 patch 8.2.1946: sort() with NULL string not tested
Problem:    sort() with NULL string not tested.
Solution:   Add a test.  use v:collate. (Dominique Pellé, closes #7247)
2020-11-03 18:51:54 +01:00
0d90e728fe patch 8.2.1945: crash when passing NULL function to reduce()
Problem:    Crash when passing NULL function to reduce().
Solution:   Check for NULL pointer and give an error. (Dominique Pellé,
            closes #7243)
2020-11-03 18:20:19 +01:00
6fd3a4ba23 patch 8.2.1944: Netbeans test is flaky
Problem:    Netbeans test is flaky.
Solution:   Add a short delay. (Yegappan Lakshmanan, closes #7246)
2020-11-03 11:53:29 +01:00
36113e46b4 patch 8.2.1943: Vim9: wrong error message when colon is missing
Problem:    Vim9: wrong error message when colon is missing.
Solution:   Check for a missing colon. (issue #7239)
2020-11-02 21:08:47 +01:00
dbfa795d8b patch 8.2.1942: insufficient test coverage for the Netbeans interface
Problem:    Insufficient test coverage for the Netbeans interface.
Solution:   Add more tests. Fix an uncovered bug. (Yegappan Lakshmanan,
            closes #7240)
2020-11-02 20:04:22 +01:00
399db046ed patch 8.2.1941: Ex mode test fails on MS-Windows with GUI
Problem:    Ex mode test fails on MS-Windows with GUI.
Solution:   Skip the test when using gvim.
2020-11-01 22:31:08 +01:00
97a19005e1 patch 8.2.1940: Vim9: browse modifier test fails on Mac
Problem:    Vim9: browse modifier test fails on Mac.
Solution:   Only test when the +browse feature is available.
2020-11-01 22:15:44 +01:00
3b6d57f2ce patch 8.2.1939: invalid memory access in Ex mode with global command
Problem:    Invalid memory access in Ex mode with global command.
Solution:   Make sure the cursor is on a valid line. (closes #7238)
2020-11-01 21:56:40 +01:00
a46765a797 patch 8.2.1938: wiping out a terminal buffer makes some tests fail
Problem:    Wiping out a terminal buffer makes some tests fail.
Solution:   Do not wipe out the terminal buffer unless wanted.
2020-11-01 20:58:26 +01:00
645cd3eb1f patch 8.2.1937: Vim9: test for confirm modifier fails in some situations
Problem:    Vim9: test for confirm modifier fails in some situations.
Solution:   Add a short wait.  Handle failure better.
2020-11-01 20:04:57 +01:00
388908352f patch 8.2.1936: session sets the local 'scrolloff' value to the global value
Problem:    Session sets the local 'scrolloff' value to the global value.
Solution:   Do not let restoring the global option value change the local
            value.
2020-11-01 17:40:54 +01:00
578f4cc7d0 patch 8.2.1935: sort test fails on Mac
Problem:    Sort test fails on Mac.
Solution:   Disable the sort test with locale on Mac.
2020-11-01 17:19:07 +01:00
e88c8e802c patch 8.2.1934: Vim9: command modifiers in :def function not tested
Problem:    Vim9: command modifiers in :def function not tested.
Solution:   Add tests.  Fix using modifier before filter command.
2020-11-01 17:03:37 +01:00
55e29611d2 patch 8.2.1933: cannot sort using locale ordering
Problem:    Cannot sort using locale ordering.
Solution:   Add a flag for :sort and sort() to use the locale. (Dominique
            Pellé, closes #7237)
2020-11-01 13:57:44 +01:00
963734e316 patch 8.2.1932: compiler warnings when building with Athena GUI
Problem:    Compiler warnings when building with Athena GUI.
Solution:   Fix function signatures.
2020-11-01 13:33:49 +01:00
fbcbffe1ad patch 8.2.1931: Vim9: arguments of extend() not checked at compile time
Problem:    Vim9: arguments of extend() not checked at compile time.
Solution:   Add argument type checking for extend().
2020-10-31 19:33:38 +01:00
749bc9521d patch 8.2.1930: wrong input if removing shift results in special key code
Problem:    Wrong input if removing shift results in special key code.
Solution:   Handle special key codes. (closes #7189)
2020-10-31 16:33:47 +01:00
0289065e41 patch 8.2.1929: MS-Windows: problem loading Perl 5.32
Problem:    MS-Windows: problem loading Perl 5.32.
Solution:   Define NO_THREAD_SAFE_LOCALE. (Ken Takata, closes #7234)
2020-10-31 13:05:11 +01:00
cd030c4b60 patch 8.2.1928: Vim9: "silent!" not effective when list index is wrong
Problem:    Vim9: "silent!" not effective when list index is wrong.
Solution:   Ignore list indes failure when emsg_silent is set. (closes #7232)
2020-10-30 21:49:40 +01:00
d66960bf57 patch 8.2.1927: Vim9: get unknown error with an error in a timer function
Problem:    Vim9: get unknown error with an error in a timer function.
Solution:   Use did_emsg instead of called_emsg. (closes #7231)
2020-10-30 20:46:26 +01:00
b2620202c7 patch 8.2.1926: cannot use a space in 'spellfile'
Problem:    Cannot use a space in 'spellfile'. (Filipe Brandenburger)
Solution:   Permit using a space. (closes #7230)
2020-10-30 19:25:09 +01:00
6d967125ad patch 8.2.1925: list/dict test fails
Problem:    List/dict test fails.
Solution:   Correct expected exception.
2020-10-30 19:06:18 +01:00
086fc9a585 patch 8.2.1924: Vim9: crash when indexing dict with NULL key
Problem:    Vim9: crash when indexing dict with NULL key.
Solution:   Use empty string instead of NULL. (closes #7229)  Make error
            message more useful for empty string.
2020-10-30 18:33:02 +01:00
4f6b6ed208 patch 8.2.1923: Vim9: "filter" command modifier doesn't work
Problem:    Vim9: "filter" command modifier doesn't work.
Solution:   Check for space on char before argument. (closes #7216,
            closes #7222)
2020-10-29 20:24:34 +01:00
185577e47e patch 8.2.1922: Win32: scrolling problems when part of window is off-screen
Problem:    Win32: scrolling doesn't work properly when part of window is
            off-screen.
Solution:   Fall back to GDI scrolling if part of the window is off-screen.
            Handle multi-monitor setup better. (Ken Takata, closes #7219)
2020-10-29 20:08:21 +01:00
dcdd42a8cc patch 8.2.1921: fuzzy matching does not recognize path separators
Problem:    Fuzzy matching does not recognize path separators.
Solution:   Add a bonus for slash and backslash. (Yegappan Lakshmanan,
            closes #7225)
2020-10-29 18:58:01 +01:00
cf4d454df0 patch 8.2.1920: listlbr test fails when run after another test
Problem:    Listlbr test fails when run after another test.
Solution:   Add test separately to list of test targets.
2020-10-28 22:46:42 +01:00
28ee892ac4 patch 8.2.1919: assert_fails() setting emsg_silent changes normal execution
Problem:    Assert_fails() setting emsg_silent changes normal execution.
Solution:   Use a separate flag in_assert_fails.
2020-10-28 20:20:00 +01:00
3e2534ed1a patch 8.2.1918: Vim9: E1100 mentions :let
Problem:    Vim9: E1100 mentions :let.
Solution:   Mention "var". (closes #7207)
2020-10-28 17:55:31 +01:00
159563b439 patch 8.2.1917: no test for improved Man command
Problem:    No test for improved Man command.
Solution:   Test that shell arguments are properly escaped.
2020-10-28 17:21:26 +01:00
171fb923b8 patch 8.2.1916: Vim9: function call is aborted even when "silent!" is used
Problem:    Vim9: function call is aborted even when "silent!" is used.
Solution:   Use did_emsg instead of called_emsg. (closes #7213)
2020-10-28 16:54:47 +01:00
6cf7e3b026 patch 8.2.1915: Vim9: error for wrong number of arguments is not useful
Problem:    Vim9: error for wrong number of arguments is not useful.
Solution:   Mention whatever we have for the name. (closes #7208)
2020-10-28 14:31:16 +01:00
b4bcea474d patch 8.2.1914: Vim9: cannot put line break in expression for '=' register
Problem:    Vim9: cannot put line break in expression for '=' register.
Solution:   Pass fgetline to set_expr_line(). (closes #7209)
2020-10-28 13:53:50 +01:00
70cf45810c patch 8.2.1913: GTK GUI: rounding for the cell height is too strict
Problem:    GTK GUI: rounding for the cell height is too strict.
Solution:   Round up above 15/16 of a pixel. (closes #7203)
2020-10-27 20:43:26 +01:00
68a48ee55e patch 8.2.1912: with Python 3.9 some tests fail
Problem:    With Python 3.9 some tests fail.
Solution:   Take into account the different error message. (James McCoy,
            closes #7210)
2020-10-27 19:59:10 +01:00
977fd0b327 patch 8.2.1911: tiny build fails
Problem:    Tiny build fails.
Solution:   Add #ifdef.
2020-10-27 09:12:45 +01:00
caf73dcfad patch 8.2.1910: reading past the end of the command line
Problem:    Reading past the end of the command line.
Solution:   Check for NUL. (closes #7204)
2020-10-26 21:39:13 +01:00
cb80aa2d53 Update runtime files. 2020-10-26 21:12:46 +01:00
8133cc6bf4 patch 8.2.1909: number of status line items is limited to 80
Problem:    Number of status line items is limited to 80.
Solution:   Dynamically allocate the arrays. (Rom Grk, closes #7181)
2020-10-26 21:05:27 +01:00
c8970b9464 patch 8.2.1908: Lua is initialized even when not used
Problem:    Lua is initialized even when not used.
Solution:   Put lua_init() after check for "eap->skip". (Christian Brabandt,
            closes #7191).  Avoid compiler warnings.
2020-10-26 20:18:08 +01:00
f9d51354de patch 8.2.1907: complete_info().selected may be wrong
Problem:    Complete_info().selected may be wrong.
Solution:   Update cp_number if it was never set. (issue #6945)
2020-10-26 19:22:42 +01:00
a360dbe3b6 patch 8.2.1906: warning for signed/unsigned
Problem:    Warning for signed/unsigned.
Solution:   Use size_t instead of int. (Mike Williams)
2020-10-26 18:46:53 +01:00
4882d98339 patch 8.2.1905: the wininfo list may contain stale entries
Problem:    The wininfo list may contain stale entries.
Solution:   When closing a window remove any other entry where the window
            pointer is NULL.
2020-10-25 17:55:09 +01:00
89b693e562 patch 8.2.1904: still using default option values after using ":badd +1"
Problem:    Still using default option values after using ":badd +1".
Solution:   Find a window where options were set.  Don't set the window when
            using ":badd".
2020-10-25 17:09:50 +01:00
37e4e03c67 patch 8.2.1903: buffer test fails with normal features
Problem:    Buffer test fails with normal features.
Solution:   Use 'numberwidth' instead of 'conceallevel' in the test.
2020-10-25 16:18:26 +01:00
e974fa7b2b patch 8.2.1902: default option values changed with :badd for existing buffer
Problem:    Default option values are changed when using :badd for an existing
            buffer.
Solution:   When calling buflist_new() pass a zero line number. (closes #7195)
2020-10-25 15:02:51 +01:00
4ff2f2fb6b patch 8.2.1901: variable completion does not work in command line window
Problem:    Variable completion does not work in command line window.
Solution:   Use the "prevwin". (closes #7198)
2020-10-25 13:22:42 +01:00
02194d2bd5 patch 8.2.1900: Vim9: command modifiers do not work
Problem:    Vim9: command modifiers do not work.
Solution:   Make most command modifiers work.
2020-10-24 23:08:38 +02:00
67def64a4e patch 8.2.1899: crash in out-of-memory situation
Problem:    Crash in out-of-memory situation.
Solution:   Bail out if shell_name is NULL. (Dominique Pellé, closes #7196)
2020-10-24 20:58:06 +02:00
e100440158 patch 8.2.1898: command modifier parsing always uses global cmdmod
Problem:    Command modifier parsing always uses global cmdmod.
Solution:   Pass in cmdmod_T to use.  Rename struct fields consistently.
2020-10-24 20:49:43 +02:00
5661ed6c83 patch 8.2.1897: command modifiers are saved and set inconsistently
Problem:    Command modifiers are saved and set inconsistently.
Solution:   Separate parsing and applying command modifiers.  Save values in
            cmdmod_T.
2020-10-24 17:19:16 +02:00
e1be11864d patch 8.2.1896: valgrind warns for using uninitialized memory
Problem:    Valgrind warns for using uninitialized memory.
Solution:   NUL terminate the SmcOpenConnection() error message. (Dominique
            Pellé, closes #7194)
2020-10-24 13:30:51 +02:00
210681c509 patch 8.2.1895: Vim9: silent command modifier test fails
Problem:    Vim9: silent command modifier test fails.
Solution:   Add missing changes.
2020-10-23 18:51:06 +02:00
f4c6e1e75c patch 8.2.1894: Vim9: command modifiers are not supported
Problem:    Vim9: command modifiers are not supported.
Solution:   Support "silent" and "silent!".
2020-10-23 18:02:32 +02:00
8ded5b647a patch 8.2.1893: fuzzy matching does not support multiple words
Problem:    Fuzzy matching does not support multiple words.
Solution:   Add support for matching white space separated words. (Yegappan
            Lakshmanan, closes #7163)
2020-10-23 16:50:30 +02:00
9c24cd11e2 patch 8.2.1892: valgrind warns for using uninitialized access in tests
Problem:    Valgrind warns for using uninitialized access in tests.
Solution:   Fix condition for breaking out of loop. (Dominique Pellé,
            closes #7187)
2020-10-23 15:40:39 +02:00
683581eb49 patch 8.2.1891: Vim9: skipping over expression doesn't handle line breaks
Problem:    Vim9: skipping over expression doesn't handle line breaks.
Solution:   Pass evalarg to skip_expr(). (closes #7157)
2020-10-22 21:22:58 +02:00
081db1a66d patch 8.2.1890: Vim9: strange error for subtracting from a list
Problem:    Vim9: strange error for subtracting from a list.
Solution:   Check getting a number, not a string. (closes #7167)
2020-10-22 20:09:43 +02:00
b07a39de48 patch 8.2.1889: Vim9: errornous error for missing white space after {}
Problem:    Vim9: errornous error for missing white space after {}.
Solution:   Don't skip over white space after {}. (issue #7167)
2020-10-22 19:00:01 +02:00
e6e70a10f1 patch 8.2.1888: Vim9: getbufline(-1, 1, '$') gives an error
Problem:    Vim9: Getbufline(-1, 1, '$') gives an error.
Solution:   Return an empty list. (closes #7180)
2020-10-22 18:23:38 +02:00
15ab48f088 patch 8.2.1887: Github actions not optimally configured
Problem:    Github actions not optimally configured.
Solution:   Run CI on any pushed branches. Set fail-fast. (Ozaki Kiichi,
            closes #7184)
2020-10-22 17:33:17 +02:00
371806e164 patch 8.2.1886: using ":silent!" in a popup filter has unexpected effect
Problem:    Using ":silent!" in a popup filter has unexpected effect.
Solution:   Use did_emsg instead of called_emsg. (closes #7178)
2020-10-22 13:44:54 +02:00
2733779a1a patch 8.2.1885: filetype tests unnessarily creates swap files
Problem:    Filetype tests unnessarily creates swap files.
Solution:   Disable 'swapfile'. (Ken Takata, closes #7183)
2020-10-22 12:33:32 +02:00
a1224cb706 patch 8.2.1884: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable. (John Marriott)
Solution:   Initialize with NULL.
2020-10-22 12:31:49 +02:00
4ce5fe4c87 patch 8.2.1883: compiler warnings when using Python
Problem:    Compiler warnings when using Python.
Solution:   Adjust PyCFunction to also have the second argument.  Use "int"
            return type for some functions.  Insert "(void *)" to get rid of
            the remaining warnings.
2020-10-21 21:01:59 +02:00
c58f5456e5 patch 8.2.1882: Vim9: v:disallow_let is no longer needed
Problem:    Vim9: v:disallow_let is no longer needed.
Solution:   Remove v:disallow_let.
2020-10-21 20:58:52 +02:00
692d1a51e7 patch 8.2.1881: cannot build with GTK3
Problem:    Cannot build with GTK3.
Solution:   Adjust form functions.
2020-10-21 17:28:27 +02:00
af7a9066a9 patch 8.2.1880: Vim9: asan complains about adding zero to NULL
Problem:    Vim9: Asan complains about adding zero to NULL.
Solution:   Check for argument count first.
2020-10-21 16:49:17 +02:00
ca17453e73 patch 8.2.1879: Vim9: argument types of insert() not checked when compiling
Problem:    Vim9: argument types of insert() not checked when compiling.
Solution:   Add argument type checks for insert().
2020-10-21 16:42:22 +02:00
8a99e66b4f patch 8.2.1878: GTK: error for redefining function
Problem:    GTK: error for redefining function. (Tony Mechelynck)
Solution:   Remove "gtk_" prefix from local functions and prepend "gui_" to
            global functions.
2020-10-21 16:10:21 +02:00
b8f519e538 patch 8.2.1877: test for function list fails
Problem:    Test for function list fails.
Solution:   Move "obsolete" comments one line up.
2020-10-21 14:49:08 +02:00
94738d8fab patch 8.2.1876: Vim9: argument types are not checked at compile time
Problem:    Vim9: argument types for builtin functions are not checked at
            compile time.
Solution:   Add an argument type checking mechanism. Implement type checks for
            one function.
2020-10-21 14:25:07 +02:00
3da855c8e2 patch 8.2.1875: warning when building GTK gui
Problem:    Warning when building GTK gui.
Solution:   Add missing function parameter.
2020-10-21 12:38:00 +02:00
b53e13a91a patch 8.2.1874: can't do something just before leaving Insert mode
Problem:    Can't do something just before leaving Insert mode.
Solution:   Add the InsertLeavePre autocommand event. (closes #7177)
2020-10-21 12:19:53 +02:00
20d89e0ac6 patch 8.2.1873: Vim9: missing white space when using <f-args>
Problem:    Vim9: missing white space when using <f-args>.
Solution:   Add spaces. (Christian J. Robinson)
2020-10-20 23:11:33 +02:00
e9f9f16387 patch 8.2.1872: matchfuzzy() does not prefer sequential matches
Problem:    Matchfuzzy() does not prefer sequential matches.
Solution:   Give sequential matches a higher bonus. (Christian Brabandt,
            closes #7140)
2020-10-20 19:01:30 +02:00
c95940c06a patch 8.2.1871: using %v in 'errorformat' may fail before %Z
Problem:    Using %v in 'errorformat' may fail before %Z.
Solution:   Set qf_viscol only when qf_col is set. (closes #7169)
2020-10-20 14:59:12 +02:00
39ca4127a0 patch 8.2.1870: Vim9: no need to keep all script variables
Problem:    Vim9: no need to keep all script variables.
Solution:   Only keep script variables when a function was defined that could
            use them.  Fix freeing static string on exit.
2020-10-20 14:25:07 +02:00
955347cc7e patch 8.2.1869: Vim9: memory leak when using add()
Problem:    Vim9: memory leak when using add().
Solution:   Free the added item.
2020-10-19 23:01:46 +02:00
9a13e185e5 patch 8.2.1868: Vim9: no error for missing space after comma in dict
Problem:    Vim9: no error for missing space after comma in dict.
Solution:   Check for white space. (closes #6672)
2020-10-19 21:45:07 +02:00
80b0e5ea11 patch 8.2.1867: Vim9: argument to add() not checked for blob
Problem:    Vim9: argument to add() not checked for blob.
Solution:   Add the BLOBAPPEND instruction.
2020-10-19 20:45:36 +02:00
66fa5fd54f patch 8.2.1866: Vim9: appending to pushed blob gives wrong result
Problem:    Vim9: appending to pushed blob gives wrong result.
Solution:   Set ga_maxlen when copying a blob.
2020-10-19 20:21:03 +02:00
1dcae59957 patch 8.2.1865: Vim9: add() does not check type of argument
Problem:    Vim9: add() does not check type of argument.
Solution:   Inline the add() call. (closes #7160)
2020-10-19 19:02:42 +02:00
334a8b4bde patch 8.2.1864: Vim9: no error for wrong list type
Problem:    Vim9: no error for wrong list type.
Solution:   Add flag to indicate a constant. (closes #7160)
2020-10-19 16:07:42 +02:00
e3c65ce4e5 patch 8.2.1863: json code not sufficiently tested
Problem:    Json code not sufficiently tested.
Solution:   Add more test cases. (Dominique Pellé, closes #7166)
2020-10-19 13:12:33 +02:00
2ea79ad835 patch 8.2.1862: vim9: memory leak when compiling lambda fails
Problem:    vim9: memory leak when compiling lambda fails.
Solution:   Call clear_evalarg().
2020-10-18 23:32:13 +02:00
a2c026d0fd patch 8.2.1861: Vim9: no specific error when parsing lambda fails
Problem:    Vim9: no specific error when parsing lambda fails.
Solution:   Also give syntax errors when not evaluating. (closes #7154)
2020-10-18 18:03:17 +02:00
335e671322 patch 8.2.1860: Vim9: memory leak when throwing empty string
Problem:    Vim9: memory leak when throwing empty string.
Solution:   Free the empty string.
2020-10-17 22:58:21 +02:00
352134bbfb patch 8.2.1859: Vim9: crash in unpack assignment
Problem:    Vim9: crash in unpack assignment.
Solution:   Make sure an error message is turned into an exception.
            (closes #7159)
2020-10-17 22:04:08 +02:00
403dc31f5a patch 8.2.1858: Vim9: filter functions return number instead of bool
Problem:    Vim9: filter functions return number instead of bool.
Solution:   Return v:true instead of one. (closes #7144)
2020-10-17 19:29:51 +02:00
218450ad5e patch 8.2.1857: Vim9: using job_status() on an unused var gives an error
Problem:    Vim9: using job_status() on an unused var gives an error.
Solution:   Return "fail". (closes #7158)
2020-10-17 18:51:52 +02:00
9668cc57a1 patch 8.2.1856: "2resize" uses size of current window
Problem:    "2resize" uses size of current window.
Solution:   Use size of resized window. (Yasuhiro Matsumoto, closes #7152)
2020-10-17 17:39:55 +02:00
e13bdec6b9 patch 8.2.1855: Vim9: get error message when nothing is wrong
Problem:    Vim9: get error message when nothing is wrong.
Solution:   Check called_emsg instead of did_emsg. (closes #7143)
2020-10-16 23:16:47 +02:00
1e021e63c5 patch 8.2.1854: Vim9: crash when throwing exception for NULL string
Problem:    Vim9: crash when throwing exception for NULL string. (Dhiraj
            Mishra)
Solution:   Handle NULL string like empty string. (closes #7139)
2020-10-16 20:25:23 +02:00
7a66a17190 patch 8.2.1853: "to_f" is recognized at "topleft" modifier
Problem:    "to_f" is recognized at "topleft" modifier.
Solution:   Do not recognize modifer when "_" follows. (closes #7019)
2020-10-16 19:56:12 +02:00
ffdf8adfa8 patch 8.2.1852: map() returing zero for NULL list is unexpected
Problem:    map() returing zero for NULL list is unexpected.
Solution:   Return the empty list. (closes #7133)
2020-10-15 22:29:17 +02:00
27491cd3ef patch 8.2.1851: Vim9: "!" followed by space incorrectly used
Problem:    Vim9: "!" followed by space incorrectly used.
Solution:   Skip over trailing spaces. (closes #7131)
2020-10-15 21:54:56 +02:00
a604ccc959 patch 8.2.1850: "vat" does not select tags correctly over line break
Problem:    "vat" does not select tags correctly over line break.
Solution:   Adjust the search pattern. (Aufar Gilbran, closes #7136)
2020-10-15 21:23:28 +02:00
ed234f24f3 patch 8.2.1849: Vim9: garbage collection frees block-local variables
Problem:    Vim9: garbage collection frees block-local variables.
Solution:   Mark all script variables as used.
2020-10-15 20:42:20 +02:00
74f8eece5e patch 8.2.1848: crash when passing a NULL string or list to popup_settext()
Problem:    Crashyyyyy passing a NULL string or list to popup_settext().
Solution:   Check for NULL pointers. (closes #7132)
2020-10-15 19:10:56 +02:00
209f0208f7 patch 8.2.1847: Vim9: using negative value for unsigned type
Problem:    Vim9: using negative value for unsigned type.
Solution:   Use zero instead of -1.
2020-10-15 13:57:56 +02:00
fbbcd00367 patch 8.2.1846: Vim9: block variables are not found in compiled function
Problem:    Vim9: variables declared in a local block are not found in
            when a function is compiled.
Solution:   Look for script variables in sn_all_vars.
2020-10-15 12:46:44 +02:00
8d739de43b patch 8.2.1845: Vim9: function defined in a block can't use block variables
Problem:    Vim9: function defined in a block can't use variables defined in
            that block.
Solution:   First step: Make a second hashtab that holds all script variables,
            also block-local ones, with more information.
2020-10-14 19:39:19 +02:00
3d30af8783 patch 8.2.1844: using "q" at the more prompt doesn't stop a long message
Problem:    Using "q" at the more prompt doesn't stop a long message.
Solution:   Check for "got_int". (closes #7122)
2020-10-13 22:15:56 +02:00
b9616af23f patch 8.2.1843: Netbeans: with huge buffer number memory allocation may fail
Problem:    Netbeans: with huge buffer number memory allocation may fail.
Solution:   Check for size overflow.
2020-10-13 21:11:13 +02:00
21cbe175ee patch 8.2.1842: crash when USE_FNAME_CASE is defined and using :browse
Problem:    Crash when USE_FNAME_CASE is defined and using :browse.
Solution:   Don't use read-only memory for ".". (Yegappan Lakshmanan,
            closes #7123)
2020-10-13 19:08:24 +02:00
2b9b17ea5d patch 8.2.1841: Vim9: test for compilation error fails in normal build
Problem:    Vim9: test for compilation error fails in normal build.
Solution:   Invoke CheckRunVimInTerminal in a separate function.
2020-10-13 18:38:11 +02:00
f4e8cdd3d2 patch 8.2.1840: Vim9: error message is not clear about compilation error
Problem:    Vim9: error message is not clear about compilation error.
Solution:   Say "compiling" instead of "processing".
2020-10-12 22:07:13 +02:00
fc8aa6d02d patch 8.2.1839: Vim9: memory leaks reported in assign test
Problem:    Vim9: memory leaks reported in assign test.
Solution:   Move the failing job_start() call to separate test files, it
            causes false leak reports.
2020-10-12 20:31:26 +02:00
93be1644db patch 8.2.1838: Vim9: cannot insert a comment line in an expression
Problem:    Vim9: cannot insert a comment line in an expression.
Solution:   Skip comment lines at the script level. (closes #7111)
2020-10-11 21:34:41 +02:00
c07b7f701f patch 8.2.1837: using "gn" after "gN" does not work
Problem:    Using "gn" after "gN" does not work.
Solution:   Extend the other end of the Visual area. (closes #7109)
2020-10-11 20:44:15 +02:00
62cd26a229 patch 8.2.1836: autocmd test fails on pacifist systems
Problem:    Autocmd test fails on pacifist systems.
Solution:   Check that /bin/kill exists. (James McCoy, closes #7117)
            Tune the timing, make the autocmd test run faster.
2020-10-11 20:08:44 +02:00
6eb36ade98 patch 8.2.1835: ":help ??" finds the "!!" tag
Problem:    ":help ??" finds the "!!" tag.
Solution:   Do not translate "?" into ".".  (Naruhiko Nishino, closes #7114,
            closes #7115)
2020-10-11 19:08:33 +02:00
efc0d94afc patch 8.2.1834: PyEval_InitThreads() is deprecated in Python 3.9
Problem:    PyEval_InitThreads() is deprecated in Python 3.9.
Solution:   Do not call PyEval_InitThreads in Python 3.9 and later. (Ken
            Takata, closes #7113)  Avoid warnings for functions.
2020-10-11 18:05:02 +02:00
204ade6bcb patch 8.2.1833: when reading from stdin dup() is called twice
Problem:    When reading from stdin dup() is called twice.
Solution:   Remove the dup() in main.c. (Ken Takata, closes #7110)
2020-10-11 14:58:46 +02:00
aab9fada4a patch 8.2.1832: readdirex() error is displayed as a message
Problem:    readdirex() error is displayed as a message. (Yegappan Lakshmanan)
Solution:   Use semsg() instead of smsg().
2020-10-11 14:28:11 +02:00
ef16c90423 patch 8.2.1831: file missing from distribution
Problem:    File missing from distribution.
Solution:   Add the github code analyses file.
2020-10-11 14:22:22 +02:00
4f4d51a942 Update runtime files. 2020-10-11 13:57:40 +02:00
c6ed254d9f patch 8.2.1830: MS-Windows: Python3 issue with stdin
Problem:    MS-Windows: Python3 issue with stdin.
Solution:   Check if stdin is readable. (Ken Takata, closes #7106)
2020-10-10 23:26:28 +02:00
bd6428b9e7 patch 8.2.1829: warnings when executing Github actions
Problem:    Warnings when executing Github actions.
Solution:   Use another method to set environment variables. (Ken Takata,
            closes #7107)
2020-10-10 22:34:36 +02:00
1b1e9df78b patch 8.2.1828: build failure without the +eval feature
Problem:    Build failure without the +eval feature.
Solution:   Add dummys for ex_block and ex_endblock.
2020-10-10 22:26:52 +02:00
10a1a534d1 patch 8.2.1827: filetype detection does not test enough file names
Problem:    Filetype detection does not test enough file names.
Solution:   Test more file names. (Adam Stankiewicz, closes #7099)
2020-10-10 21:50:25 +02:00
9becdf2b98 patch 8.2.1826: Vim9: cannot use a {} block at script level
Problem:    Vim9: cannot use a {} block at script level.
Solution:   Recognize a {} block.
2020-10-10 21:33:48 +02:00
d747548c66 patch 8.2.1825: Vim9: accessing freed memory
Problem:    Vim9: accessing freed memory.
Solution:   Clear sv_name when the variable is deleted.
2020-10-10 20:31:37 +02:00
fcdc5d83fb patch 8.2.1824: Vim9: variables at the script level escape their scope
Problem:    Vim9: variables at the script level escape their scope.
Solution:   When leaving a scope remove variables declared in it.
2020-10-10 19:07:09 +02:00
28f224b2c1 patch 8.2.1823: "gN" does not select the matched string
Problem:    "gN" does not select the matched string.
Solution:   Move the cursor to the start of the match.
2020-10-10 16:45:25 +02:00
f57497276b patch 8.2.1822: list test doesn't fail
Problem:    List test doesn't fail.
Solution:   Adjust the test for NULL list handling.
2020-10-10 16:42:39 +02:00
1a73923705 patch 8.2.1821: Vim9: concatenating to a NULL list doesn't work
Problem:    Vim9: concatenating to a NULL list doesn't work.
Solution:   Handle a NULL list like an empty list. (closes #7064)
2020-10-10 15:37:58 +02:00
820d55a50b patch 8.2.1820: Vim9: crash when error happens in timer callback
Problem:    Vim9: crash when error happens in timer callback.
Solution:   Check that current_exception is not NULL. (closes #7100)
2020-10-10 15:05:23 +02:00
85d5e2b723 patch 8.2.1819: Vim9: Memory leak when using a closure
Problem:    Vim9: Memory leak when using a closure.
Solution:   Compute the mininal refcount in the funcstack.  Reenable disabled
            tests.
2020-10-10 14:13:01 +02:00
8956023920 patch 8.2.1818: SE Linux: deprecation warning for security_context_t
Problem:    SE Linux: deprecation warning for security_context_t.
Solution:   Use "char *" instead. (James McCoy, closes #7093)
2020-10-09 23:04:47 +02:00
e8211a33dc patch 8.2.1817: Vim9: wrong instruction when reusing a local variable spot
Problem:    Vim9: wrong instruction when reusing a local variable spot.
Solution:   Clear a newly allocated local variable. (closes #7080)
2020-10-09 22:04:29 +02:00
11416321ff patch 8.2.1816: Vim9: another memory leak when using function reference
Problem:    Vim9: another memory leak when using function reference.
Solution:   Temporarily disable the tests.
2020-10-09 10:20:53 +02:00
6a61421f64 patch 8.2.1815: Vim9: memory leak when using function reference
Problem:    Vim9: memory leak when using function reference.
Solution:   Temporarily disable the test.
2020-10-08 23:21:21 +02:00
922acbda3d patch 8.2.1814: missing change to remove "static"
Problem:    Missing change to remove "static".
Solution:   Add the change.
2020-10-08 21:30:40 +02:00
10c65860f8 patch 8.2.1813: Vim9: can assign wrong type to script dict
Problem:    Vim9: can assign wrong type to script dict. (Christian J.  Robinson)
Solution:   Check the type if known.
2020-10-08 21:16:42 +02:00
0876c78527 patch 8.2.1812: Vim9: nested closure throws an internal error
Problem:    Vim9: nested closure throws an internal error.
Solution:   Do not skip a local variable with a partial. (closes #7065)
2020-10-07 19:08:04 +02:00
9a033d7b18 patch 8.2.1811: mapping Ctrl-key does not work for '{', '}' and '|'
Problem:    Mapping Ctrl-key does not work for '{', '}' and '|'.
Solution:   Remove the shift modifier. (closes #6457)
2020-10-07 17:29:48 +02:00
d7e5e9430a patch 8.2.1810: some code in normal.c not covered by tests
Problem:    Some code in normal.c not covered by tests.
Solution:   Add normal mode tests. (Yegappan Lakshmanan, closes #7086)
2020-10-07 16:54:52 +02:00
4e2114e988 patch 8.2.1809: mapping some keys with Ctrl does not work properly
Problem:    Mapping some keys with Ctrl does not work properly.
Solution:   For terminal, GTK and Motif handle "@", "^" and "_" codes.
2020-10-07 16:12:37 +02:00
f12f0022e6 patch 8.2.1808: no test coverage for ":spelldump!"
Problem:    No test coverage for ":spelldump!".
Solution:   Add a test. (Dominique Pellé, closes #7089)
2020-10-07 12:58:44 +02:00
349f609f89 patch 8.2.1807: can use :help in a terminal popup window
Problem:    Can use :help in a terminal popup window.
Solution:   Give an error. (closes #7088)
2020-10-06 20:46:49 +02:00
253b16a4ab patch 8.2.1806: MS-Windows with Python: Vim freezes after import command
Problem:    MS-Windows with Python: Vim freezes after import command.
Solution:   Use either "NUL" or "CONIN$" when reopening stdin. (Yasuhiro
            Matsumoto, closes #7083)
2020-10-06 19:59:06 +02:00
80361a5f2b patch 8.2.1805: Unix: terminal mode changed when using ":shell"
Problem:    Unix: terminal mode changed when using ":shell".
Solution:   Avoid calling settmode() when not needed. (issue #7079)
2020-10-05 21:39:25 +02:00
50c4e9e08f patch 8.2.1804: resolve('/') returns an empty string
Problem:    resolve('/') returns an empty string.
Solution:   Don't remove single slash. (closes #7074)
2020-10-05 20:38:06 +02:00
afe8cf6170 patch 8.2.1803: a few failures are not tested
Problem:    A few failures are not tested.
Solution:   Test a few failures. (Dominique Pellé, closes #7075)
2020-10-05 20:07:18 +02:00
44aefffaad patch 8.2.1802: Vim9: crash with unterminated dict
Problem:    Vim9: crash with unterminated dict. (Dhiraj Mishra)
Solution:   Return empty string instead of NULL. (closes #7084)
2020-10-05 19:23:59 +02:00
55b419b871 patch 8.2.1801: undo file not found when using ":args" or ":next"
Problem:    Undo file not found when using ":args" or ":next".
Solution:   Handle like editing another file. (closes #7072)
2020-10-04 19:56:39 +02:00
dda749ce85 patch 8.2.1800: Vim9: memory leak if "if" condition is invalid
Problem:    Vim9: memory leak if "if" condition is invalid.
Solution:   Free ppconst earlier.
2020-10-04 17:24:29 +02:00
d1ad99b654 patch 8.2.1799: some Normal mode commands not fully tested
Problem:    Some Normal mode commands not fully tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #7073)
2020-10-04 16:16:54 +02:00
1310660557 patch 8.2.1798: Vim9: trinary operator condition is too permissive
Problem:    Vim9: trinary operator condition is too permissive.
Solution:   Use tv_get_bool_chk().
2020-10-04 16:06:05 +02:00
6abd3dc257 patch 8.2.1797: Vim9: some parts of the code not tested
Problem:    Vim9: some parts of the code not tested.
Solution:   Add a few tests.
2020-10-04 14:17:32 +02:00
7b5d544269 patch 8.2.1796: Vim9: invalid memory access with weird function name
Problem:    Vim9: invalid memory access with weird function name. (Dhiraj
            Mishra)
Solution:   Check the name is valid.  Add a test.
2020-10-04 13:42:34 +02:00
2bb2658bef patch 8.2.1795: Vim9: operators && and || have a confusing result
Problem:    Vim9: operators && and || have a confusing result.
Solution:   Make the result a boolean.
2020-10-03 22:52:39 +02:00
92f26c256e patch 8.2.1794: no falsy Coalescing operator
Problem:    No falsy Coalescing operator.
Solution:   Add the "??" operator.  Fix mistake with function argument count.
2020-10-03 20:17:30 +02:00
c8fe645c19 patch 8.2.1793: not consistently giving the "is a directory" warning
Problem:    Not consistently giving the "is a directory" warning.
Solution:   Adjust check for illegal file name and directory. (Yasuhiro
            Matsumoto, closes #7067)
2020-10-03 17:04:37 +02:00
588d241d44 patch 8.2.1792: Configure does not recognize Racket 6.1+
Problem:    Configure does not recognize Racket 6.1+.
Solution:   Add a check for "rktio". (closes #7062)
2020-10-03 14:24:19 +02:00
1bdae40323 patch 8.2.1791: Vim9: debugger test fails
Problem:    Vim9: debugger test fails.
Solution:   Use "var" instead of "let".
2020-10-03 14:14:56 +02:00
794771cfd8 patch 8.2.1790: MS-Windows with Python: crash when executed from Vifm
Problem:    MS-Windows with Python: crash when executed from Vifm.
Solution:   Use NUL instead of CONIN. (Ken Takata, closes #7061, closes #7053)
2020-10-03 13:57:13 +02:00
c1f0066b64 patch 8.2.1789: Vim9: crash with invalid list constant
Problem:    Vim9: crash with invalid list constant. (Dhiraj Mishra)
Solution:   Return FAIL when compiling the list fails. (closes #7066)
2020-10-03 13:41:53 +02:00
016faaa1b2 patch 8.2.1788: Vim9: still allows :let for declarations
Problem:    Vim9: still allows :let for declarations.
Solution:   Make the default for v:disallow_let one.  It can still be set to
            zero to allow for using :let.
2020-10-03 12:57:27 +02:00
795aaa1e84 patch 8.2.1787: crash with 'incsearch' and very long line
Problem:    Crash with 'incsearch' and very long line.
Solution:   Check whether regprog becomes NULL. (closes #7063)
2020-10-02 20:36:01 +02:00
8a9bc95eae patch 8.2.1786: various Normal mode commands not fully tested
Problem:    Various Normal mode commands not fully tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes #7059)
2020-10-02 18:48:07 +02:00
3f974ff45e patch 8.2.1785: compiler warning for strcp() out of bounds
Problem:    Compiler warning for strcp() out of bounds. (Christian Brabandt)
Solution:   use memmove() instead.
2020-10-02 18:11:56 +02:00
fa79be6b10 patch 8.2.1784: commits are not scanned for security problems
Problem:    commits are not scanned for security problems
Solution:   Enable Github code scanning. (Christian Brabandt, closes #7057)
2020-10-02 10:29:45 +02:00
bdf931c25b patch 8.2.1783: try-catch test fails
Problem:    Try-catch test fails.
Solution:   Don't call win_enter(), only call enterering_window().
2020-10-01 22:37:40 +02:00
74273e6691 patch 8.2.1782: Vim9: cannot pass boolean to mapset()
Problem:    Vim9: cannot pass boolean to mapset().
Solution:   Use get_tv_bool(). (closes #7041)
2020-10-01 21:37:21 +02:00
4537bcc889 patch 8.2.1781: writing to prompt buffer interferes with insert mode
Problem:    Writing to prompt buffer interferes with insert mode.
Solution:   Use win_enter() instead of just setting "curwin". (Ben Jackson,
            closes #7035)
2020-10-01 20:03:04 +02:00
668008be66 patch 8.2.1780: statusline not updated when splitting windows
Problem:    Statusline not updated when splitting windows.
Solution:   Call status_redraw_all(). (Jason Franklin, closes #5496)
2020-10-01 19:06:35 +02:00
0022675aa3 patch 8.2.1779: some debian changelog files are not recognized
Problem:    Some debian changelog files are not recognized.
Solution:   Add */debian/changelog. (Jason Franklin)
2020-10-01 16:54:07 +02:00
5366e1aecf patch 8.2.1778: Vim9: returning from a partial call clears outer context
Problem:    Vim9: returning from a partial call clears outer context, causing
            a crash.
Solution:   Put the outer context in the stack frame. (closes #7044)
2020-10-01 13:01:34 +02:00
55759b5228 patch 8.2.1777: Vim9: some assignment tests in the wrong file
Problem:    Vim9: some assignment tests in the wrong file.
Solution:   Move assignment tests to test_vim9_assign.
2020-09-30 22:59:42 +02:00
17bb4d4607 patch 8.2.1776: filetype.vim may be loaded twice
Problem:    Filetype.vim may be loaded twice.
Solution:   Do "syntax on" after "filetype on". (Adam Stankiewicz,
            closes #7049)
2020-09-30 22:45:39 +02:00
8ec92c9779 patch 8.2.1775: MS-Windows: adding a long quickfix list is slow
Problem:    MS-Windows: adding a long quickfix list is slow.
Solution:   Shorten the buffer name only for the first entry. (Yegappan
            Lakshmanan, closes #7039, closes #7033)
2020-09-29 22:47:03 +02:00
32fbc4f247 patch 8.2.1774: GTK: hang when forced to exit
Problem:    GTK: hang when forced to exit.
Solution:   Do not clean up "mainwin" when really_exiting is set.
            (Zdenek Dohnal, closes #7042)
2020-09-29 22:16:09 +02:00
1b9129809d patch 8.2.1773: crash when calling mapset() with a list as first argument
Problem:    Crash when calling mapset() with a list as first argument.
Solution:   Check for NULL. (closes #7040)
2020-09-29 21:45:41 +02:00
f43e7ac4ee patch 8.2.1772: cannot use CTRL-W <Down> to move out of a terminal window
Problem:    Cannot use CTRL-W <Down> to move out of a terminal window.
Solution:   Use special_to_buf() instead of mb_char2bytes(). (closes #7045)
2020-09-29 21:23:25 +02:00
391c362794 patch 8.2.1771: synIDattr() cannot get the value of ctermul
Problem:    synIDattr() cannot get the value of ctermul.
Solution:   Add the "ul" value for "what". (closes #7037)
2020-09-29 20:59:17 +02:00
d569a9e746 patch 8.2.1770: invalid memory use when using SpellFileMissing autocmd
Problem:    Invalid memory use when using SpellFileMissing autocmd.
Solution:   Add test case. (Dominique Pellé, closes #7036)  Fix using a window
            that was closed.
2020-09-28 23:13:15 +02:00
4934ad0e44 patch 8.2.1769: popup filter interferes with using :normal to move the cursor
Problem:    A popup filter interferes with using :normal to move the cursor in
            a popup.
Solution:   Do not invoke the filter when ex_normal_busy is set.
2020-09-28 22:29:58 +02:00
d58a3bf7da Update runtime files. 2020-09-28 21:48:16 +02:00
b45cd36bd9 patch 8.2.1768: cannot use the help menu from a terminal window
Problem:    Cannot use the help menu from a terminal window.
Solution:   Add ":tlnoremenu" commands. (Yee Cheng Chin, closes #7023)
2020-09-28 21:41:49 +02:00
727345ebea patch 8.2.1767: Vim9: test fails with python support
Problem:    Vim9: test fails with python support.
Solution:   Use "let" in legacy function.
2020-09-27 23:33:59 +02:00
7a9cbca00a patch 8.2.1766: Vim9: Some tests are still using :let
Problem:    Vim9: Some tests are still using :let.
Solution:   Change the last few declarations to use :var.
2020-09-27 22:47:05 +02:00
9830938e77 patch 8.2.1765: Vim9: some tests use "var var"
Problem:    Vim9: some tests use "var var".
Solution:   Use "var name". (closes #7032)
2020-09-27 21:58:45 +02:00
06f9c6940a patch 8.2.1764: Vim9: no error when assigning to script var with wrong type
Problem:    Vim9: no error when assigning to script var with wrong type.
Solution:   Fix off-by-one error. (closes #7028)
2020-09-27 21:27:40 +02:00
6c542f77eb patch 8.2.1763: Vim9: cannot use "true" for popup window scrollbar option
Problem:    Vim9: cannot use "true" for popup window scrollbar option.
Solution:   use dict_get_bool(). (closes #7029)
2020-09-27 21:16:45 +02:00
d0e1b7103c patch 8.2.1762: when a timer uses :stopinsert completion isn't stopped
Problem:    When a timer uses :stopinsert Insert mode completion isn't
            stopped. (Stanley Chan)
Solution:   Call ins_compl_prep(ESC).
2020-09-27 20:13:03 +02:00
ac564082f1 patch 8.2.1761: Vim9: Some tests are still using :let
Problem:    Vim9: Some tests are still using :let.
Solution:   Change more declarations to use :var.
2020-09-27 19:05:33 +02:00
2914a20abc patch 8.2.1760: Vim9: crash when end marker is missing
Problem:    Vim9: crash when end marker is missing. (Dhiraj Mishra)
Solution:   Check for end of function lines. (closes #7031)
2020-09-27 18:24:03 +02:00
37ce6d3a6a patch 8.2.1759: Vim9: Some tests are still using :let
Problem:    Vim9: Some tests are still using :let.
Solution:   Change more declarations to use :var.
2020-09-27 17:57:43 +02:00
5597ba0467 patch 8.2.1758: Vim9: type of unmaterialized list is wrong
Problem:    Vim9: type of unmaterialized list is wrong.
Solution:   Use list<number>.
2020-09-27 17:45:03 +02:00
a5fe91e6dc patch 8.2.1757: Mac: default locale is lacking the encoding
Problem:    Mac: default locale is lacking the encoding.
Solution:   Add ".UTF-8 to the locale. (Yee Cheng Chin, closes #7022)
2020-09-27 16:03:15 +02:00
cfcd011fcd patch 8.2.1756: Vim9: :let will soon be disallowed
Problem:    Vim9: :let will soon be disallowed.
Solution:   Add v:disallow_let temporarily.  Fix tests.
2020-09-27 15:19:27 +02:00
c0e29010f6 patch 8.2.1755: Vim9: crash when using invalid heredoc marker
Problem:    Vim9: crash when using invalid heredoc marker. (Dhiraj Mishra)
Solution:   Check for NULL list. (closes #7027)  Fix comment character.
2020-09-27 14:22:48 +02:00
8c7ad3631a patch 8.2.1754: completion with spell checking not tested
Problem:    Completion with spell checking not tested.
Solution:   Add a test case. (Dominique Pellé, closes #7024)
2020-09-27 13:58:38 +02:00
f6a44f714a patch 8.2.1753: Vim9: crash when using import at script level
Problem:    Vim9: crash when using import at script level.
Solution:   Give a "not implemented yet" error. (closes #7026)
2020-09-27 13:51:14 +02:00
daff0fb738 patch 8.2.1752: GTK GUI: cannot map alt-? with <A-?>
Problem:    GTK GUI: cannot map alt-? with <A-?>. (Ingo Karkat)
Solution:   Adjust the characters for which the shift modifier is removed.
            (closes #7016)  Make Motif and Win32 use the same function as GTK.
2020-09-27 13:16:46 +02:00
bade44e5ca patch 8.2.1751: using 2 where bool is expected may throw an error
Problem:    Using 2 where bool is expected may throw an error.
Solution:   Make this backwards compatible.
2020-09-26 22:39:24 +02:00
3697c9bbae patch 8.2.1750: popup_setoptions() setting firstline fails if cursorline set
Problem:    Setting firstline with popup_setoptions() fails if cursorline is
            set.
Solution:   Use apply_options(). Update the popup before applying "zz".
            (closes #7010)
2020-09-26 22:03:00 +02:00
c70bdab0b8 patch 8.2.1749: Vim9: crash when closure fails in nested function
Problem:    Vim9: crash when closure fails in nested function.
Solution:   Handle function returns before dereferencing remaining closures.
            (closes #7008)
2020-09-26 19:59:38 +02:00
f3c51bbff1 patch 8.2.1748: closing split window in other tab may cause a crash
Problem:    Closing split window in other tab may cause a crash.
Solution:   Set tp_curwin properly. (Rob Pilling, closes #7018)
2020-09-26 19:11:39 +02:00
8f187fc630 patch 8.2.1747: result of expand() unexpectedly depends on 'completeslash'
Problem:    Result of expand() unexpectedly depends on 'completeslash'.
Solution:   Temporarily reset 'completeslash'. (Yasuhiro Matsumoto,
            closes #7021)
2020-09-26 18:47:11 +02:00
373863ed48 patch 8.2.1746: Vim9: cannot use "fina" for "finally"
Problem:    Vim9: Cannot use "fina" for "finally". (Naruhiko Nishino)
Solution:   Specifically check for "fina". (closes #7020)
2020-09-26 17:20:53 +02:00
d47f50b331 patch 8.2.1745: tiny version doesn't build
Problem:    Tiny version doesn't build.
Solution:   Add dummy ex_var() function.
2020-09-26 15:20:42 +02:00
30fd8204ce patch 8.2.1744: Vim9: using ":const!" is weird
Problem:    Vim9: using ":const!" is weird.
Solution:   Use "var" - "final" - "const" like Dart.  "let" still works for
            now.
2020-09-26 15:09:30 +02:00
273af497ca patch 8.2.1743: cannot build without the eval feature
Problem:    Cannot build without the eval feature.
Solution:   Move shorten_dir outside of #ifdef.
2020-09-25 23:49:01 +02:00
7e9210ea53 patch 8.2.1742: test still fails without the terminal feature
Problem:    Test still fails without the terminal feature.
Solution:   Put check for terminal feature in separate function.
2020-09-25 23:12:51 +02:00
6a33ef0deb patch 8.2.1741: pathshorten() only supports using one character
Problem:    pathshorten() only supports using one character.
Solution:   Add an argument to control the length. (closes #7006)
2020-09-25 22:42:48 +02:00
58dbef330c patch 8.2.1740: test fails without the terminal feature
Problem:    Test fails without the terminal feature.
Solution:   Skip test if the terminal feature is not available.
2020-09-25 22:13:05 +02:00
9c4f55204f patch 8.2.1739: Vim9: crash when compiling a manually defined function
Problem:    Vim9: crash when compiling a manually defined function. (Antony
            Scriven)
Solution:   Check that the script ID is positive. (closes #7012)
2020-09-25 21:47:28 +02:00
509f8031b2 patch 8.2.1738: Mac: str2float() recognizes comma instead of decimal point
Problem:    Mac: str2float() recognizes comma instead of decimal point.
Solution:   Set LC_NUMERIC to "C". (closes #7003)
2020-09-24 23:08:19 +02:00
10476521f5 patch 8.2.1737: cursor line highlight in popup window is not always updated
Problem:    Cursor line highlight in popup window is not always updated.
Solution:   Check if the cursor has moved. (closes #7010)
2020-09-24 22:57:31 +02:00
531be47ac5 patch 8.2.1736: failure to compile a pattern not tested much
Problem:    Failure to compile a pattern not tested much.
Solution:   Add tests where a pattern fails to compile. (Yegappan Lakshmanan,
            closes #7004)
2020-09-23 22:38:05 +02:00
851d108313 patch 8.2.1735: Github actions appear to timeout too soon
Problem:    Github actions appear to timeout too soon.
Solution:   use "timeout" instead of "ping".
2020-09-23 22:27:22 +02:00
148ce7ae62 patch 8.2.1734: Vim9: cannot use a funcref for a closure twice
Problem:    Vim9: cannot use a funcref for a closure twice.
Solution:   Instead of putting the funcref on the stack use a growarray on the
            execution context.
2020-09-23 21:57:23 +02:00
4ee711f213 patch 8.2.1733: Vim9: memory leaks when using nested function
Problem:    Vim9: memory leaks when using nested function.
Solution:   Free function when compilation fails.
2020-09-23 18:51:11 +02:00
6bf1b52ba2 patch 8.2.1732: stuck when win_execute() for a popup causes an error
Problem:    Stuck when win_execute() for a popup causes an error.
Solution:   Disable the filter callback on error. (issue #6999)
2020-09-23 17:41:26 +02:00
81ed496048 patch 8.2.1731: Vim9: cannot use += to append to empty NULL list
Problem:    Vim9: cannot use += to append to empty NULL list.
Solution:   Copy the list instead of extending it. (closes #6998)
2020-09-23 15:56:50 +02:00
04bdd573d0 patch 8.2.1730: Vim9: cannot use member of unknown type
Problem:    Vim9: cannot use member of unknown type.
Solution:   When type is unknown us "any". (closes #6997)
2020-09-23 13:25:32 +02:00
189832bf66 patch 8.2.1729: endless loop when ":normal" feeds popup window filter
Problem:    Endless loop when ":normal" feeds popup window filter.
Solution:   Add the ex_normal_busy_done flag.
2020-09-23 12:29:11 +02:00
c53e9c57a9 patch 8.2.1728: compiler warning for using uninitialized variable
Problem:    Compiler warning for using uninitialized variable. (John Marriott)
Solution:   Initialize "neighbor".
2020-09-22 22:08:32 +02:00
99ca9c4868 patch 8.2.1727: a popup created with "cursorline" will ignore "firstline"
Problem:    A popup created with "cursorline" will ignore "firstline".
Solution:   When both "cursorline" and "firstline" are present put the cursor
            on "firstline". (closes #7000)  Add the "winid" argument to
            getcurpos().
2020-09-22 21:55:41 +02:00
4f73b8e9cc patch 8.2.1726: fuzzy matching only works on strings
Problem:    Fuzzy matching only works on strings.
Solution:   Support passing a dict.  Add matchfuzzypos() to also get the match
            positions. (Yegappan Lakshmanan, closes #6947)
2020-09-22 20:33:50 +02:00
44aaf5416e patch 8.2.1725: not all Pascal files are recognized
Problem:    Not all Pascal files are recognized.
Solution:   Add filetype patterns. (Doug Kearns)
2020-09-22 19:15:31 +02:00
971caf53b8 patch 8.2.1724: Vim9: assignment tests spread out
Problem:    Vim9: assignment tests spread out.
Solution:   Create new test file for assignment tests.
2020-09-21 22:21:42 +02:00
280227270c patch 8.2.1723: Vim9: Variable argument name cannot start with underscore
Problem:    Vim9: Variable argument name cannot start with underscore.
Solution:   Use eval_isnamec1(). (closes #6988)
2020-09-21 22:02:49 +02:00
dbd759309b patch 8.2.1722: Vim9: cannot assign a lambda to a variable of type function
Problem:    Vim9: cannot assign a lambda to a variable of type function.
Solution:   Allow for assigning a partial to a variable of type function.
            (Naruhiko Nishino, closes #6996)
2020-09-21 21:48:21 +02:00
7f9c9c51a3 patch 8.2.1721: MS-Windows installer doesn't work
Problem:    MS-Windows installer doesn't work.
Solution:   Write "Russian" in ASCII. (closes #6995, see #).
2020-09-21 21:29:57 +02:00
078269bdce patch 8.2.1720: Vim9: memory leak with heredoc that isn't executed
Problem:    Vim9: memory leak with heredoc that isn't executed. (Dominique
            Pellé)
Solution:   Don't clear the list items. (closes #6991)
2020-09-21 20:35:55 +02:00
10e4f12bf4 patch 8.2.1719: Vim9: no error if comma is missing in between arguments
Problem:    Vim9: no error if comma is missing in between arguments.
Solution:   Give an error message.
2020-09-20 22:43:52 +02:00
344 changed files with 14169 additions and 6114 deletions

6
.github/CODEOWNERS vendored
View File

@ -38,6 +38,7 @@ runtime/compiler/jest.vim @dkearns
runtime/compiler/jjs.vim @dkearns
runtime/compiler/jshint.vim @dkearns
runtime/compiler/jsonlint.vim @dkearns
runtime/compiler/lazbuild.vim @dkearns
runtime/compiler/php.vim @dkearns
runtime/compiler/rake.vim @tpope @dkearns
runtime/compiler/rhino.vim @dkearns
@ -47,6 +48,7 @@ runtime/compiler/ruby.vim @tpope @dkearns
runtime/compiler/rubyunit.vim @dkearns
runtime/compiler/sass.vim @tpope
runtime/compiler/se.vim @dkearns
runtime/compiler/shellcheck.vim @dkearns
runtime/compiler/stylelint.vim @dkearns
runtime/compiler/tcl.vim @dkearns
runtime/compiler/tidy.vim @dkearns
@ -61,6 +63,7 @@ runtime/doc/pi_netrw.txt @cecamp
runtime/doc/pi_tar.txt @cecamp
runtime/doc/pi_vimball.txt @cecamp
runtime/doc/pi_zip.txt @cecamp
runtime/ftplugin/awk.vim @dkearns
runtime/ftplugin/bst.vim @tpope
runtime/ftplugin/css.vim @dkearns
runtime/ftplugin/cucumber.vim @tpope
@ -105,6 +108,9 @@ runtime/plugin/tarPlugin.vim @cecamp
runtime/plugin/vimballPlugin.vim @cecamp
runtime/plugin/zipPlugin.vim @cecamp
runtime/syntax/amiga.vim @cecamp
runtime/syntax/asm.vim @dkearns
runtime/syntax/asmh8300.vim @dkearns
runtime/syntax/awk.vim @dkearns
runtime/syntax/bst.vim @tpope
runtime/syntax/csh.vim @cecamp
runtime/syntax/cucumber.vim @tpope

View File

@ -3,7 +3,7 @@ name: GitHub CI
on:
push:
branches:
- '*'
- '**'
pull_request:
env:
@ -39,6 +39,7 @@ jobs:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
toolchain: [msvc, mingw]
arch: [x64, x86]
@ -74,8 +75,8 @@ jobs:
git config --global core.autocrlf input
python_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON_VER_DOT}/InstallPath/@")
python3_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}${{ matrix.pyreg }}/InstallPath/@")
echo "::set-env name=PYTHON_DIR::$python_dir"
echo "::set-env name=PYTHON3_DIR::$python3_dir"
echo "PYTHON_DIR=$python_dir" >> $GITHUB_ENV
echo "PYTHON3_DIR=$python3_dir" >> $GITHUB_ENV
- uses: msys2/setup-msys2@v2
if: matrix.toolchain == 'mingw'
@ -212,9 +213,9 @@ jobs:
echo %COL_GREEN%Wait for vim tests to finish.%COL_RESET%
cd ..\src2\testdir
:: Wait about 10 minutes.
for /L %%i in (1,1,600) do (
for /L %%i in (1,1,60) do (
if exist done.txt goto exitloop
ping -n 2 localhost > nul
timeout 10
)
set timeout=1
:exitloop

71
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 18 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['cpp', 'python']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@ -10,6 +10,7 @@ SRC_ALL = \
.travis.yml \
.cirrus.yml \
.github/workflows/ci-windows.yaml \
.github/workflows/codeql-analysis.yml \
.github/CODEOWNERS \
appveyor.yml \
ci/appveyor.bat \

View File

@ -80,7 +80,7 @@ e.g. each stack item is a typeval_T. And one of the instructions is
"execute Ex command", for commands that are not compiled.
## 2. PHASING OUT INTERFACES
## 2. DEPRIORITIZE INTERFACES
Attempts have been made to implement functionality with built-in script
languages such as Python, Perl, Lua, Tcl and Ruby. This never gained much

View File

@ -7,7 +7,7 @@
# fileencoding : UTF-8
# Author : Restorer
!insertmacro MUI_LANGUAGE "Русский"
!insertmacro MUI_LANGUAGE "Russian"
# Overwrite the default translation.

View File

@ -1,7 +1,8 @@
"python3complete.vim - Omni Completion for python
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
" Maintainer: <vacancy>
" Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
" Version: 0.9
" Last Updated: 18 Jun 2009 (small fix 2015 Sep 14 from Debian)
" Last Updated: 2020 Oct 9
"
" Roland Puntaier: this file contains adaptations for python3 and is parallel to pythoncomplete.vim
"
@ -83,7 +84,7 @@ function! python3complete#Complete(findstart, base)
break
endif
endwhile
execute "py3 vimpy3complete('" . cword . "', '" . a:base . "')"
execute "py3 vimpy3complete('" . escape(cword, "'") . "', '" . escape(a:base, "'") . "')"
return g:python3complete_completions
endif
endfunction

View File

@ -1,7 +1,8 @@
"pythoncomplete.vim - Omni Completion for python
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
" Maintainer: <vacancy>
" Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
" Version: 0.9
" Last Updated: 18 Jun 2009
" Last Updated: 2020 Oct 9
"
" Changes
" TODO:
@ -81,7 +82,7 @@ function! pythoncomplete#Complete(findstart, base)
break
endif
endwhile
execute "python vimcomplete('" . cword . "', '" . a:base . "')"
execute "python vimcomplete('" . escape(cword, "'") . "', '" . escape(a:base, "'") . "')"
return g:pythoncomplete_completions
endif
endfunction

View File

@ -1,7 +1,7 @@
" zip.vim: Handles browsing zipfiles
" AUTOLOAD PORTION
" Date: Jan 07, 2020
" Version: 30
" Version: 31
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1
@ -20,7 +20,7 @@
if &cp || exists("g:loaded_zip")
finish
endif
let g:loaded_zip= "v30"
let g:loaded_zip= "v31"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of zip needs vim 7.2 or later"
@ -65,7 +65,7 @@ endif
" zip#Browse: {{{2
fun! zip#Browse(zipfile)
" call Dfunc("zip#Browse(zipfile<".a:zipfile.">)")
" sanity check: ensure that the zipfile has "PK" as its first two letters
" sanity check: insure that the zipfile has "PK" as its first two letters
" (zipped files have a leading PK as a "magic cookie")
if !filereadable(a:zipfile) || readfile(a:zipfile, "", 1)[0] !~ '^PK'
exe "noswapfile noautocmd noswapfile e ".fnameescape(a:zipfile)

View File

@ -67,7 +67,7 @@ You can use ":highlight" to find out the current colors. Exception: the
ctermfg and ctermbg values are numbers, which are only valid for the current
terminal. Use the color names instead. See ":help cterm-colors".
The default color settings can be found in the source file src/syntax.c.
The default color settings can be found in the source file src/highlight.c.
Search for "highlight_init".
If you think you have a color scheme that is good enough to be used by others,

View File

@ -0,0 +1,25 @@
" Vim compiler file
" Compiler: ShellCheck
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2020 Sep 4
if exists("current_compiler")
finish
endif
let current_compiler = "shellcheck"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo&vim
CompilerSet makeprg=shellcheck\ -f\ gcc
CompilerSet errorformat=%f:%l:%c:\ %trror:\ %m\ [SC%n],
\%f:%l:%c:\ %tarning:\ %m\ [SC%n],
\%f:%l:%c:\ %tote:\ %m\ [SC%n],
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -1,7 +1,7 @@
" The default vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2019 Oct 27
" Last change: 2020 Sep 30
"
" This is loaded if no vimrc file was found.
" Except when Vim is run with "-u NONE" or "-C".
@ -85,17 +85,6 @@ if has('mouse')
endif
endif
" Switch syntax highlighting on when the terminal has colors or when using the
" GUI (which always has colors).
if &t_Co > 2 || has("gui_running")
" Revert with ":syntax off".
syntax on
" I like highlighting strings inside C comments.
" Revert with ":unlet c_comment_strings".
let c_comment_strings=1
endif
" Only do this part when Vim was compiled with the +eval feature.
if 1
@ -124,6 +113,17 @@ if 1
endif
" Switch syntax highlighting on when the terminal has colors or when using the
" GUI (which always has colors).
if &t_Co > 2 || has("gui_running")
" Revert with ":syntax off".
syntax on
" I like highlighting strings inside C comments.
" Revert with ":unlet c_comment_strings".
let c_comment_strings=1
endif
" Convenient command to see the difference between the current buffer and the
" file it was loaded from, thus the changes you made.
" Only define it when not defined already.

View File

@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.2. Last change: 2020 Aug 02
*autocmd.txt* For Vim version 8.2. Last change: 2020 Oct 26
VIM REFERENCE MANUAL by Bram Moolenaar
@ -278,7 +278,7 @@ Name triggered by ~
|BufWinLeave| before a buffer is removed from a window
|BufUnload| before unloading a buffer
|BufHidden| just after a buffer has become hidden
|BufHidden| just before a buffer becomes hidden
|BufNew| just after creating a new buffer
|SwapExists| detected an existing swap file
@ -631,7 +631,7 @@ CompleteDone After Insert mode completion is done. Either
*CursorHold*
CursorHold When the user doesn't press a key for the time
specified with 'updatetime'. Not re-triggered
specified with 'updatetime'. Not triggered
until the user has pressed a key (i.e. doesn't
fire every 'updatetime' ms if you leave Vim to
make some coffee. :) See |CursorHold-example|
@ -881,9 +881,14 @@ InsertEnter Just before starting Insert mode. Also for
The cursor is restored afterwards. If you do
not want that set |v:char| to a non-empty
string.
*InsertLeavePre*
InsertLeavePre Just before leaving Insert mode. Also when
using CTRL-O |i_CTRL-O|. Be careful not to
change mode or use `:normal`, it will likely
cause trouble.
*InsertLeave*
InsertLeave When leaving Insert mode. Also when using
CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.
InsertLeave Just after leaving Insert mode. Also when
using CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.
*MenuPopup*
MenuPopup Just before showing the popup menu (under the
right mouse button). Useful for adjusting the

View File

@ -1,4 +1,4 @@
*change.txt* For Vim version 8.2. Last change: 2020 Aug 15
*change.txt* For Vim version 8.2. Last change: 2020 Nov 03
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1801,7 +1801,7 @@ Vim has a sorting function and a sorting command. The sorting function can be
found here: |sort()|, |uniq()|.
*:sor* *:sort*
:[range]sor[t][!] [b][f][i][n][o][r][u][x] [/{pattern}/]
:[range]sor[t][!] [b][f][i][l][n][o][r][u][x] [/{pattern}/]
Sort lines in [range]. When no range is given all
lines are sorted.
@ -1809,6 +1809,16 @@ found here: |sort()|, |uniq()|.
With [i] case is ignored.
With [l] sort uses the current collation locale.
Implementation details: strcoll() is used to compare
strings. See |:language| to check or set the collation
locale. Example: >
:language collate en_US.UTF-8
:%sort l
< |v:collate| can also used to check the current locale.
Sorting using the locale typically ignores case.
This does not work properly on Mac.
Options [n][f][x][o][b] are mutually exclusive.
With [n] sorting is done on the first decimal number
@ -1875,8 +1885,7 @@ found here: |sort()|, |uniq()|.
Note that using `:sort` with `:global` doesn't sort the matching lines, it's
quite useless.
The details about sorting depend on the library function used. There is no
guarantee that sorting obeys the current locale. You will have to try it out.
`:sort` does not use the current locale unless the l flag is used.
Vim does do a "stable" sort.
The sorting can be interrupted, but if you interrupt it too late in the

View File

@ -1,4 +1,4 @@
*channel.txt* For Vim version 8.2. Last change: 2020 Sep 03
*channel.txt* For Vim version 8.2. Last change: 2020 Oct 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -965,6 +965,10 @@ job_status({job}) *job_status()* *E916*
"fail", because a fork happens before the failure can be
detected.
If in Vim9 script a variable is declared with type "job" but
never assigned to, passing that variable to job_status()
returns "fail".
If an exit callback was set with the "exit_cb" option and the
job is now detected to be "dead" the callback will be invoked.
@ -1288,7 +1292,7 @@ prompt. >
" Send the text to a shell with Enter appended.
call ch_sendraw(g:shell_job, a:text .. "\n")
endfunc
" Function handling output from the shell: Added above the prompt.
func GotOutput(channel, msg)
call append(line("$") - 1, "- " . a:msg)

View File

@ -1,4 +1,4 @@
*editing.txt* For Vim version 8.2. Last change: 2020 Aug 17
*editing.txt* For Vim version 8.2. Last change: 2020 Oct 23
VIM REFERENCE MANUAL by Bram Moolenaar
@ -73,10 +73,14 @@ g CTRL-G Prints the current position of the cursor in five
ways: Column, Line, Word, Character and Byte. If the
number of Characters and Bytes is the same then the
Character position is omitted.
If there are characters in the line that take more
than one position on the screen (<Tab> or special
character), both the "real" column and the screen
column are shown, separated with a dash.
character), or characters using more than one byte per
column (characters above 0x7F when 'encoding' is
utf-8), both the byte column and the screen column are
shown, separated by a dash.
Also see the 'ruler' option and the |wordcount()|
function.

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.2. Last change: 2020 Sep 16
*eval.txt* For Vim version 8.2. Last change: 2020 Nov 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -120,7 +120,7 @@ base, use |str2nr()|.
*TRUE* *FALSE* *Boolean*
For boolean operators Numbers are used. Zero is FALSE, non-zero is TRUE.
You can also use |v:false| and |v:true|. In Vim9 script |false| and |true|.
You can also use |v:false| and |v:true|. In Vim9 script |false| and |true|.
When TRUE is returned from a function it is the Number one, FALSE is the
number zero.
@ -133,7 +133,27 @@ non-zero number it means TRUE: >
:" executed
To test for a non-empty string, use empty(): >
:if !empty("foo")
<
< *falsy* *truthy*
An expression can be used as a condition, ignoring the type and only using
whether the value is "sort of true" or "sort of false". Falsy is:
the number zero
empty string, blob, list or dictionary
Other values are truthy. Examples:
0 falsy
1 truthy
-1 truthy
0.0 falsy
0.1 truthy
'' falsy
'x' truthy
[] falsy
[0] truthy
{} falsy
#{x: 1} truthy
0z falsy
0z00 truthy
*non-zero-arg*
Function arguments often behave slightly different from |TRUE|: If the
argument is present and it evaluates to a non-zero Number, |v:true| or a
@ -877,10 +897,13 @@ Example: >
All expressions within one level are parsed from left to right.
expr1 *expr1* *E109*
expr1 *expr1* *trinary* *falsy-operator* *??* *E109*
-----
expr2 ? expr1 : expr1
The trinary operator: expr2 ? expr1 : expr1
The falsy operator: expr2 ?? expr1
Trinary operator ~
The expression before the '?' is evaluated to a number. If it evaluates to
|TRUE|, the result is the value of the expression between the '?' and ':',
@ -903,6 +926,23 @@ To keep this readable, using |line-continuation| is suggested: >
You should always put a space before the ':', otherwise it can be mistaken for
use in a variable such as "a:1".
Falsy operator ~
This is also known as the "null coalescing operator", but that's too
complicated, thus we just call it the falsy operator.
The expression before the '??' is evaluated. If it evaluates to
|truthy|, this is used as the result. Otherwise the expression after the '??'
is evaluated and used as the result. This is most useful to have a default
value for an expression that may result in zero or empty: >
echo theList ?? 'list is empty'
echo GetName() ?? 'unknown'
These are similar, but not equal: >
expr2 ?? expr1
expr2 ? expr2 : expr1
In the second line "expr2" is evaluated twice.
expr2 and expr3 *expr2* *expr3*
---------------
@ -2516,7 +2556,7 @@ getcmdtype() String return current command-line type
getcmdwintype() String return current command-line window type
getcompletion({pat}, {type} [, {filtered}])
List list of cmdline completion matches
getcurpos() List position of the cursor
getcurpos([{winnr}]) List position of the cursor
getcwd([{winnr} [, {tabnr}]]) String get the current working directory
getenv({name}) String return environment variable
getfontname([{name}]) String name of font being used
@ -2629,8 +2669,9 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]])
rhs of mapping {name} in mode {mode}
mapcheck({name} [, {mode} [, {abbr}]])
String check for mappings matching {name}
mapset({mode}, {abbr}, {dict})
none restore mapping from |maparg()| result
mapnew({expr1}, {expr2}) List/Dict like |map()| but creates a new List
or Dictionary
mapset({mode}, {abbr}, {dict}) none restore mapping from |maparg()| result
match({expr}, {pat} [, {start} [, {count}]])
Number position where {pat} matches in {expr}
matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
@ -2641,7 +2682,10 @@ matcharg({nr}) List arguments of |:match|
matchdelete({id} [, {win}]) Number delete match identified by {id}
matchend({expr}, {pat} [, {start} [, {count}]])
Number position where {pat} ends in {expr}
matchfuzzy({list}, {str}) List fuzzy match {str} in {list}
matchfuzzy({list}, {str} [, {dict}])
List fuzzy match {str} in {list}
matchfuzzypos({list}, {str} [, {dict}])
List fuzzy match {str} in {list}
matchlist({expr}, {pat} [, {start} [, {count}]])
List match and submatches of {pat} in {expr}
matchstr({expr}, {pat} [, {start} [, {count}]])
@ -2658,7 +2702,7 @@ mzeval({expr}) any evaluate |MzScheme| expression
nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
nr2char({expr} [, {utf8}]) String single char with ASCII/UTF8 value {expr}
or({expr}, {expr}) Number bitwise OR
pathshorten({expr}) String shorten directory names in a path
pathshorten({expr} [, {len}]) String shorten directory names in a path
perleval({expr}) any evaluate |Perl| expression
popup_atcursor({what}, {options}) Number create popup window near the cursor
popup_beval({what}, {options}) Number create popup window for 'ballooneval'
@ -2703,7 +2747,7 @@ prop_type_change({name}, {props})
none change an existing property type
prop_type_delete({name} [, {props}])
none delete a property type
prop_type_get([{name} [, {props}]])
prop_type_get({name} [, {props}])
Dict get property type values
prop_type_list([{props}]) List get list of property types
pum_getpos() Dict position and size of pum if visible
@ -3083,7 +3127,7 @@ appendbufline({expr}, {lnum}, {text}) *appendbufline()*
error message is given. Example: >
:let failed = appendbufline(13, 0, "# THE START")
<
< Can also be used as a |method| after a List, the base is
Can also be used as a |method| after a List, the base is
passed as the second argument: >
mylist->appendbufline(buf, lnum)
@ -3460,7 +3504,7 @@ byteidxcomp({expr}, {nr}) *byteidxcomp()*
< The first and third echo result in 3 ('e' plus composing
character is 3 bytes), the second echo results in 1 ('e' is
one byte).
Only works different from byteidx() when 'encoding' is set to
Only works differently from byteidx() when 'encoding' is set to
a Unicode encoding.
Can also be used as a |method|: >
@ -3755,7 +3799,7 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
not need to be the first letter: >
confirm("file has been modified", "&Save\nSave &All")
< For the console, the first letter of each choice is used as
the default shortcut key.
the default shortcut key. Case is ignored.
The optional {default} argument is the number of the choice
that is made if the user hits <CR>. Use 1 to make the first
@ -4384,10 +4428,10 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
|Dictionaries|.
If they are |Lists|: Append {expr2} to {expr1}.
If {expr3} is given insert the items of {expr2} before item
{expr3} in {expr1}. When {expr3} is zero insert before the
first item. When {expr3} is equal to len({expr1}) then
{expr2} is appended.
If {expr3} is given insert the items of {expr2} before the
item with index {expr3} in {expr1}. When {expr3} is zero
insert before the first item. When {expr3} is equal to
len({expr1}) then {expr2} is appended.
Examples: >
:echo sort(extend(mylist, [7, 5]))
:call extend(mylist, [2, 3], 1)
@ -5258,13 +5302,20 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
GetPattern()->getcompletion('color')
<
*getcurpos()*
getcurpos() Get the position of the cursor. This is like getpos('.'), but
getcurpos([{winid}])
Get the position of the cursor. This is like getpos('.'), but
includes an extra "curswant" item in the list:
[0, lnum, col, off, curswant] ~
The "curswant" number is the preferred column when moving the
cursor vertically. Also see |getpos()|.
The first "bufnum" item is always zero.
The optional {winid} argument can specify the window. It can
be the window number or the |window-ID|. The last known
cursor position is returned, this may be invalid for the
current value of the buffer if it is not the current window.
If {winid} is invalid a list with zeroes is returned.
This can be used to save and restore the cursor position: >
let save_cursor = getcurpos()
MoveTheCursorAround
@ -5475,8 +5526,9 @@ getloclist({nr} [, {what}]) *getloclist()*
|location-list-file-window| for more
details.
Returns an empty Dictionary if there is no location list for
the window {nr} or the window is not present.
Returns a Dictionary with default values if there is no location
list for the window {nr}.
Returns an empty Dictionary if window {nr} does not exist.
Examples (See also |getqflist-examples|): >
:echo getloclist(3, {'all': 0})
@ -6936,9 +6988,14 @@ luaeval({expr} [, {expr}]) *luaeval()*
< {only available when compiled with the |+lua| feature}
map({expr1}, {expr2}) *map()*
{expr1} must be a |List| or a |Dictionary|.
{expr1} must be a |List|, |Blob| or |Dictionary|.
Replace each item in {expr1} with the result of evaluating
{expr2}. {expr2} must be a |string| or |Funcref|.
{expr2}. For a |Blob| each byte is replaced.
If the item type changes you may want to use |mapnew()| to
create a new List or Dictionary. This is required when using
Vim9 script.
{expr2} must be a |string| or |Funcref|.
If {expr2} is a |string|, inside {expr2} |v:val| has the value
of the current item. For a |Dictionary| |v:key| has the key
@ -6973,11 +7030,11 @@ map({expr1}, {expr2}) *map()*
|Dictionary| to remain unmodified make a copy first: >
:let tlist = map(copy(mylist), ' v:val . "\t"')
< Returns {expr1}, the |List| or |Dictionary| that was filtered.
When an error is encountered while evaluating {expr2} no
further items in {expr1} are processed. When {expr2} is a
Funcref errors inside a function are ignored, unless it was
defined with the "abort" flag.
< Returns {expr1}, the |List|, |Blob| or |Dictionary| that was
filtered. When an error is encountered while evaluating
{expr2} no further items in {expr1} are processed. When
{expr2} is a Funcref errors inside a function are ignored,
unless it was defined with the "abort" flag.
Can also be used as a |method|: >
mylist->map(expr2)
@ -7086,7 +7143,13 @@ mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()*
GetKey()->mapcheck('n')
mapset({mode}, {abbr}, {dict}) *mapset()*
mapnew({expr1}, {expr2}) *mapnew()*
Like |map()| but instead of replacing items in {expr1} a new
List or Dictionary is created and returned. {expr1} remains
unchanged.
mapset({mode}, {abbr}, {dict}) *mapset()*
Restore a mapping from a dictionary returned by |maparg()|.
{mode} and {abbr} should be the same as for the call to
|maparg()|. *E460*
@ -7311,12 +7374,35 @@ matchend({expr}, {pat} [, {start} [, {count}]]) *matchend()*
GetText()->matchend('word')
matchfuzzy({list}, {str}) *matchfuzzy()*
Returns a list with all the strings in {list} that fuzzy
match {str}. The strings in the returned list are sorted
based on the matching score. {str} is treated as a literal
string and regular expression matching is NOT supported.
The maximum supported {str} length is 256.
matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
If {list} is a list of strings, then returns a list with all
the strings in {list} that fuzzy match {str}. The strings in
the returned list are sorted based on the matching score.
The optional {dict} argument always supports the following
items:
matchseq When this item is present and {str} contains
multiple words separated by white space, then
returns only matches that contain the words in
the given sequence.
If {list} is a list of dictionaries, then the optional {dict}
argument supports the following additional items:
key key of the item which is fuzzy matched against
{str}. The value of this item should be a
string.
text_cb |Funcref| that will be called for every item
in {list} to get the text for fuzzy matching.
This should accept a dictionary item as the
argument and return the text for that item to
use for fuzzy matching.
{str} is treated as a literal string and regular expression
matching is NOT supported. The maximum supported {str} length
is 256.
When {str} has multiple words each separated by white space,
then the list of strings that have all the words is returned.
If there are no matching strings or there is an error, then an
empty list is returned. If length of {str} is greater than
@ -7327,11 +7413,41 @@ matchfuzzy({list}, {str}) *matchfuzzy()*
< results in ["clay"]. >
:echo getbufinfo()->map({_, v -> v.name})->matchfuzzy("ndl")
< results in a list of buffer names fuzzy matching "ndl". >
:echo getbufinfo()->matchfuzzy("ndl", {'key' : 'name'})
< results in a list of buffer information dicts with buffer
names fuzzy matching "ndl". >
:echo getbufinfo()->matchfuzzy("spl",
\ {'text_cb' : {v -> v.name}})
< results in a list of buffer information dicts with buffer
names fuzzy matching "spl". >
:echo v:oldfiles->matchfuzzy("test")
< results in a list of file names fuzzy matching "test". >
:let l = readfile("buffer.c")->matchfuzzy("str")
< results in a list of lines in "buffer.c" fuzzy matching "str".
< results in a list of lines in "buffer.c" fuzzy matching "str". >
:echo ['one two', 'two one']->matchfuzzy('two one')
< results in ['two one', 'one two']. >
:echo ['one two', 'two one']->matchfuzzy('two one',
\ {'matchseq': 1})
< results in ['two one'].
matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()*
Same as |matchfuzzy()|, but returns the list of matched
strings and the list of character positions where characters
in {str} matches.
If {str} matches multiple times in a string, then only the
positions for the best match is returned.
If there are no matching strings or there is an error, then a
list with two empty list items is returned.
Example: >
:echo matchfuzzypos(['testing'], 'tsg')
< results in [['testing'], [[0, 2, 6]]] >
:echo matchfuzzypos(['clay', 'lacy'], 'la')
< results in [['lacy', 'clay'], [[0, 1], [1, 2]]] >
:echo [{'text': 'hello', 'id' : 10}]->matchfuzzypos('ll', {'key' : 'text'})
< results in [{'id': 10, 'text': 'hello'}] [[2, 3]]
matchlist({expr}, {pat} [, {start} [, {count}]]) *matchlist()*
Same as |match()|, but return a |List|. The first item in the
@ -7607,13 +7723,17 @@ or({expr}, {expr}) *or()*
:let bits = bits->or(0x80)
pathshorten({expr}) *pathshorten()*
pathshorten({expr} [, {len}]) *pathshorten()*
Shorten directory names in the path {expr} and return the
result. The tail, the file name, is kept as-is. The other
components in the path are reduced to single letters. Leading
'~' and '.' characters are kept. Example: >
components in the path are reduced to {len} letters in length.
If {len} is omitted or smaller than 1 then 1 is used (single
letters). Leading '~' and '.' characters are kept. Examples: >
:echo pathshorten('~/.vim/autoload/myfile.vim')
< ~/.v/a/myfile.vim ~
>
:echo pathshorten('~/.vim/autoload/myfile.vim', 2)
< ~/.vi/au/myfile.vim ~
It doesn't matter if the path exists or not.
Can also be used as a |method|: >
@ -7864,8 +7984,8 @@ printf({fmt}, {expr1} ...) *printf()*
prompt_getprompt({buf}) *prompt_getprompt()*
Returns the effective prompt text for buffer {buf}. {buf} can
be a buffer name or number. |prompt-buffer|.
Returns the effective prompt text for buffer {buf}. {buf} can
be a buffer name or number. See |prompt-buffer|.
If the buffer doesn't exist or isn't a prompt buffer, an empty
string is returned.
@ -8211,15 +8331,18 @@ reg_recording() *reg_recording()*
Returns an empty string when not recording. See |q|.
reltime([{start} [, {end}]]) *reltime()*
Return an item that represents a time value. The format of
the item depends on the system. It can be passed to
|reltimestr()| to convert it to a string or |reltimefloat()|
to convert to a Float.
Without an argument it returns the current time.
Return an item that represents a time value. The item is a
list with items that depend on the system. In Vim 9 script
list<any> can be used.
The item can be passed to |reltimestr()| to convert it to a
string or |reltimefloat()| to convert to a Float.
Without an argument reltime() returns the current time.
With one argument is returns the time passed since the time
specified in the argument.
With two arguments it returns the time passed between {start}
and {end}.
The {start} and {end} arguments must be values returned by
reltime().
@ -9592,8 +9715,25 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
When {func} is given and it is '1' or 'i' then case is
ignored.
When {func} is given and it is 'l' then the current collation
locale is used for ordering. Implementation details: strcoll()
is used to compare strings. See |:language| check or set the
collation locale. |v:collate| can also be used to check the
current locale. Sorting using the locale typically ignores
case. Example: >
" ö is sorted similarly to o with English locale.
:language collate en_US.UTF8
:echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
< ['n', 'o', 'O', 'ö', 'p', 'z'] ~
>
" ö is sorted after z with Swedish locale.
:language collate sv_SE.UTF8
:echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
< ['n', 'o', 'O', 'p', 'z', 'ö'] ~
This does not work properly on Mac.
When {func} is given and it is 'n' then all items will be
sorted numerical (Implementation detail: This uses the
sorted numerical (Implementation detail: this uses the
strtod() function to parse numbers, Strings, Lists, Dicts and
Funcrefs will be considered as being 0).
@ -10295,7 +10435,9 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
"bg" background color (as with "fg")
"font" font name (only available in the GUI)
|highlight-font|
"sp" special color (as with "fg") |highlight-guisp|
"sp" special color for the GUI (as with "fg")
|highlight-guisp|
"ul" underline color for cterm: number as a string
"fg#" like "fg", but for the GUI and the GUI is
running the name in "#RRGGBB" form
"bg#" like "fg#" for "bg"
@ -10599,8 +10741,8 @@ terminalprops() *terminalprops()*
detected from the response to |t_RV| request. See
|v:termresponse| for the response itself. If |v:termresponse|
is empty most values here will be 'u' for unknown.
cursor_style wether sending |t_RS| works **
cursor_blink_mode wether sending |t_RC| works **
cursor_style whether sending |t_RS| works **
cursor_blink_mode whether sending |t_RC| works **
underline_rgb whether |t_8u| works **
mouse mouse type supported
@ -11256,7 +11398,8 @@ winsaveview() Returns a |Dictionary| that contains information to restore
curswant column for vertical movement
topline first line in the window
topfill filler lines, only in diff mode
leftcol first column displayed
leftcol first column displayed; only used when
'wrap' is off
skipcol columns skipped
Note that no option values are saved.
@ -11475,7 +11618,7 @@ menu Compiled with support for |:menu|.
mksession Compiled with support for |:mksession|.
modify_fname Compiled with file name modifiers. |filename-modifiers|
(always true)
mouse Compiled with support mouse.
mouse Compiled with support for mouse.
mouse_dec Compiled with support for Dec terminal mouse.
mouse_gpm Compiled with support for gpm (Linux console mouse)
mouse_gpm_enabled GPM mouse is working
@ -12030,8 +12173,9 @@ be used to pass settings to the autoload script before it's loaded: >
Note that when you make a mistake and call a function that is supposed to be
defined in an autoload script, but the script doesn't actually define the
function, the script will be sourced every time you try to call the function.
And you will get an error message every time.
function, you will get an error message for the missing function. If you fix
the autoload script it won't be automatically loaded again. Either restart
Vim or manually source the script.
Also note that if you have two script files, and one calls a function in the
other and vice versa, before the used function is defined, it won't work.

View File

@ -1,4 +1,4 @@
*filetype.txt* For Vim version 8.2. Last change: 2019 Jul 16
*filetype.txt* For Vim version 8.2. Last change: 2020 Sep 28
VIM REFERENCE MANUAL by Bram Moolenaar
@ -397,6 +397,13 @@ ways to change this:
3. Docs for the default filetype plugins. *ftplugin-docs*
AWK *ft-awk-plugin*
Support for features specific to GNU Awk, like @include, can be enabled by
setting: >
let g:awk_is_gawk = 1
CHANGELOG *ft-changelog-plugin*
Allows for easy entrance of Changelog entries in Changelog files. There are

View File

@ -1,4 +1,4 @@
*gui.txt* For Vim version 8.2. Last change: 2020 Mar 16
*gui.txt* For Vim version 8.2. Last change: 2020 Sep 28
VIM REFERENCE MANUAL by Bram Moolenaar
@ -547,15 +547,6 @@ floating menus that do not appear on the main menu bar.
5.2 Creating New Menus *creating-menus*
*:me* *:menu* *:noreme* *:noremenu*
*:am* *:amenu* *:an* *:anoremenu*
*:nme* *:nmenu* *:nnoreme* *:nnoremenu*
*:ome* *:omenu* *:onoreme* *:onoremenu*
*:vme* *:vmenu* *:vnoreme* *:vnoremenu*
*:xme* *:xmenu* *:xnoreme* *:xnoremenu*
*:sme* *:smenu* *:snoreme* *:snoremenu*
*:ime* *:imenu* *:inoreme* *:inoremenu*
*:cme* *:cmenu* *:cnoreme* *:cnoremenu*
*:tlm* *:tlmenu* *:tln* *:tlnoremenu*
*E330* *E327* *E331* *E336* *E333*
*E328* *E329* *E337* *E792*
To create a new menu item, use the ":menu" commands. They are mostly like
@ -596,6 +587,7 @@ With the shortcut "F" (while keeping the <Alt> key pressed), and then "O",
this menu can be used. The second part is shown as "Open :e". The ":e"
is right aligned, and the "O" is underlined, to indicate it is the shortcut.
*:am* *:amenu* *:an* *:anoremenu*
The ":amenu" command can be used to define menu entries for all modes at once,
except for Terminal mode. To make the command work correctly, a character is
automatically inserted for some modes:
@ -634,6 +626,30 @@ included they make the <> form and raw key codes not being recognized).
Note that <Esc> in Cmdline mode executes the command, like in a mapping. This
is Vi compatible. Use CTRL-C to quit Cmdline mode.
*:nme* *:nmenu* *:nnoreme* *:nnoremenu* *:nunme* *:nunmenu*
Menu commands starting with "n" work in Normal mode. |mapmode-n|
*:ome* *:omenu* *:onoreme* *:onoremenu* *:ounme* *:ounmenu*
Menu commands starting with "o" work in Operator-pending mode. |mapmode-o|
*:vme* *:vmenu* *:vnoreme* *:vnoremenu* *:vunme* *:vunmenu*
Menu commands starting with "v" work in Visual mode. |mapmode-v|
*:xme* *:xmenu* *:xnoreme* *:xnoremenu* *:xunme* *:xunmenu*
Menu commands starting with "x" work in Visual and Select mode. |mapmode-x|
*:sme* *:smenu* *:snoreme* *:snoremenu* *:sunme* *:sunmenu*
Menu commands starting with "s" work in Select mode. |mapmode-s|
*:ime* *:imenu* *:inoreme* *:inoremenu* *:iunme* *:iunmenu*
Menu commands starting with "i" work in Insert mode. |mapmode-i|
*:cme* *:cmenu* *:cnoreme* *:cnoremenu* *:cunme* *:cunmenu*
Menu commands starting with "c" work in Cmdline mode. |mapmode-c|
*:tlm* *:tlmenu* *:tln* *:tlnoremenu* *:tlu* *:tlunmenu*
Menu commands starting with "tl" work in Terminal mode. |mapmode-t|
*:menu-<silent>* *:menu-silent*
To define a menu which will not be echoed on the command line, add
"<silent>" as the first argument. Example: >
@ -897,14 +913,6 @@ using the last visual selection.
*:unme* *:unmenu*
*:aun* *:aunmenu*
*:nunme* *:nunmenu*
*:ounme* *:ounmenu*
*:vunme* *:vunmenu*
*:xunme* *:xunmenu*
*:sunme* *:sunmenu*
*:iunme* *:iunmenu*
*:cunme* *:cunmenu*
*:tlu* *:tlunmenu*
To delete a menu item or a whole submenu, use the unmenu commands, which are
analogous to the unmap commands. Eg: >
:unmenu! Edit.Paste

View File

@ -1,4 +1,4 @@
*if_mzsch.txt* For Vim version 8.2. Last change: 2019 Dec 07
*if_mzsch.txt* For Vim version 8.2. Last change: 2020 Oct 14
VIM REFERENCE MANUAL by Sergey Khorev
@ -43,7 +43,7 @@ To speed up the process, you might also want to use --disable-gracket and
{script}
{endmarker}
Execute inlined MzScheme script {script}.
Note: This command doesn't work if the MzScheme
Note: This command doesn't work when the MzScheme
feature wasn't compiled in. To avoid errors, see
|script-here|.

View File

@ -1,4 +1,4 @@
*index.txt* For Vim version 8.2. Last change: 2020 May 31
*index.txt* For Vim version 8.2. Last change: 2020 Oct 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -784,10 +784,10 @@ tag char note action in Normal mode ~
lines down
|gk| gk 1 like "k", but when 'wrap' on go N screen
lines up
|gn| gn 1,2 find the next match with the last used
search pattern and Visually select it
|gm| gm 1 go to character at middle of the screenline
|gM| gM 1 go to character at middle of the text line
|gn| gn 1,2 find the next match with the last used
search pattern and Visually select it
|go| go 1 cursor to byte N in the buffer
|gp| ["x]gp 2 put the text [from register x] after the
cursor N times, leave the cursor after it
@ -1317,6 +1317,7 @@ tag command action ~
|:filetype| :filet[ype] switch file type detection on/off
|:filter| :filt[er] filter output of following command
|:find| :fin[d] find file in 'path' and edit it
|:final| :final declare an immutable variable in Vim9
|:finally| :fina[lly] part of a :try command
|:finish| :fini[sh] quit sourcing a Vim script
|:first| :fir[st] go to the first file in the argument list
@ -1691,6 +1692,7 @@ tag command action ~
|:unsilent| :uns[ilent] run a command not silently
|:update| :up[date] write buffer if modified
|:vglobal| :v[global] execute commands for not matching lines
|:var| :var variable declaration in Vim9
|:version| :ve[rsion] print version number and other info
|:verbose| :verb[ose] execute command with 'verbose' set
|:vertical| :vert[ical] make following command split vertically

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 8.2. Last change: 2020 Sep 19
*insert.txt* For Vim version 8.2. Last change: 2020 Oct 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -312,6 +312,7 @@ If you enter a value of 10, it will end up in the file as a 0. The 10 is a
the buffer to a file, the <NL> character is translated into <Nul>. The <NL>
character is written at the end of each line. Thus if you want to insert a
<NL> character in a file you will have to make a line break.
Also see 'fileformat'.
*i_CTRL-X* *insert_expand*
CTRL-X enters a sub-mode where several commands can be used. Most of these

View File

@ -1,4 +1,4 @@
*map.txt* For Vim version 8.2. Last change: 2020 Sep 09
*map.txt* For Vim version 8.2. Last change: 2020 Oct 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -252,6 +252,17 @@ For abbreviations |v:char| is set to the character that was typed to trigger
the abbreviation. You can use this to decide how to expand the {lhs}. You
should not either insert or change the v:char.
In case you want the mapping to not do anything, you can have the expression
evaluate to an empty string. If something changed that requires Vim to
go through the main loop (e.g. to update the display), return "\<Ignore>".
This is similar to "nothing" but makes Vim return from the loop that waits for
input. Example: >
func s:OpenPopup()
call popup_create(... arguments ...)
return "\<Ignore>"
endfunc
nnoremap <expr> <F3> <Sid>OpenPopup()
Be very careful about side effects! The expression is evaluated while
obtaining characters, you may very well make the command dysfunctional.
For this reason the following is blocked:
@ -839,8 +850,15 @@ execute a shell command, e.g.: `!ls` Or put the lines in your |vimrc|.
When modifyOtherKeys is enabled you can map <C-[> and <C-S-{>: >
imap <C-[> [[[
imap <C-S-{> {{{
Without modifyOtherKeys <C-[> and <C-S-{> are indistinguishable from Esc.
imap <C-{> {{{
Without modifyOtherKeys <C-[> and <C-{> are indistinguishable from Esc.
Note that <C-{> is used and not <C-S-[> or <C-S-{>. This works on most
keyboards. Similarly, <C-}> is used instead of <C-S-]> or <C-S-}> and
<C-|> instead of <C-S-\> or <C-S-|>. Note that '|' has a special meaning in a
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.
A known side effect is that in Insert mode the raw escape sequence is inserted
after the CTRL-V key. This can be used to check whether modifyOtherKeys is

View File

@ -1,4 +1,4 @@
*motion.txt* For Vim version 8.2. Last change: 2020 Aug 24
*motion.txt* For Vim version 8.2. Last change: 2020 Oct 18
VIM REFERENCE MANUAL by Bram Moolenaar
@ -190,11 +190,14 @@ l or *l*
*^*
^ To the first non-blank character of the line.
|exclusive| motion.
|exclusive| motion. Any count is ignored.
*$* *<End>* *<kEnd>*
$ or <End> To the end of the line. When a count is given also go
[count - 1] lines downward. |inclusive| motion.
[count - 1] lines downward, or as far is possible.
|inclusive| motion. If a count of 2 of larger is
given and the cursor is on the last line, that is an
error an the cursor doesn't move.
In Visual mode the cursor goes to just after the last
character in the line.
When 'virtualedit' is active, "$" may move the cursor

View File

@ -1,4 +1,4 @@
*netbeans.txt* For Vim version 8.2. Last change: 2020 Aug 15
*netbeans.txt* For Vim version 8.2. Last change: 2020 Nov 02
VIM REFERENCE MANUAL by Gordon Prieur et al.
@ -562,9 +562,10 @@ setModtime time
saved directly by the Vim Controller.
New in version 2.3.
setReadOnly
Set a file as readonly
Implemented in version 2.3.
setReadOnly readonly
When the boolean argument "readonly" is "T" for True, mark the
buffer as readonly, when it is "F" for False, mark it as not
readonly. Implemented in version 2.3.
setStyle Not implemented.

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2020 Sep 15
*options.txt* For Vim version 8.2. Last change: 2020 Oct 10
VIM REFERENCE MANUAL by Bram Moolenaar
@ -2554,7 +2554,7 @@ A jump table for the options with a short description can be found at |Q_op|.
"x" delete each combining character on its own. When it is off (the
default) the character along with its combining characters are
deleted.
Note: When 'delcombine' is set "xx" may work different from "2x"!
Note: When 'delcombine' is set "xx" may work differently from "2x"!
This is useful for Arabic, Hebrew and many other languages where one
may have combining characters overtop of base characters, and want
@ -4682,7 +4682,7 @@ A jump table for the options with a short description can be found at |Q_op|.
characters. Example: "abc;ABC"
Example: "aA,fgh;FGH,cCdDeE"
Special characters need to be preceded with a backslash. These are
";", ',' and backslash itself.
";", ',', '"', '|' and backslash itself.
This will allow you to activate vim actions without having to switch
back and forth between the languages. Your language characters will
@ -7225,7 +7225,7 @@ A jump table for the options with a short description can be found at |Q_op|.
normal text. Each status line item is of the form:
%-0{minwid}.{maxwid}{item}
All fields except the {item} are optional. A single percent sign can
be given as "%%". Up to 80 items can be specified. *E541*
be given as "%%".
When the option starts with "%!" then it is used as an expression,
evaluated and the result is used as the option value. Example: >

View File

@ -154,4 +154,4 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing
==============================================================================
vim:tw=78:ts=8:noet:ft=help:fdm=marker
vim:tw=78:ts=8:ft=help:noet:norl:fdm=marker

View File

@ -1,4 +1,4 @@
*popup.txt* For Vim version 8.2. Last change: 2020 Sep 08
*popup.txt* For Vim version 8.2. Last change: 2020 Oct 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -314,6 +314,7 @@ popup_filter_menu({id}, {key}) *popup_filter_menu()*
<Space> <Enter> accept current selection
x Esc CTRL-C cancel the menu
Other keys are ignored.
Always returns |v:true|.
A match is set on that line to highlight it, see
|popup_menu()|.
@ -711,7 +712,7 @@ The second argument of |popup_create()| is a dictionary with options:
By default a double line is used all around when
'encoding' is "utf-8" and 'ambiwidth' is "single",
otherwise ASCII characters are used.
scrollbar non-zero: show a scrollbar when the text doesn't fit.
scrollbar 1 or true: show a scrollbar when the text doesn't fit.
zero: do not show a scrollbar. Default is non-zero.
Also see |popup-scrollbar|.
scrollbarhighlight Highlight group name for the scrollbar. The
@ -910,6 +911,11 @@ A mouse click arrives as <LeftMouse>. The coordinates can be obtained with
Vim provides standard filters |popup_filter_menu()| and
|popup_filter_yesno()|.
Keys coming from a `:normal` command do not pass through the filter. This can
be used to move the cursor in a popup where the "cursorline" option is set: >
call win_execute(winid, 'normal! 10Gzz')
Keys coming from `feedkeys()` are passed through the filter.
Note that "x" is the normal way to close a popup. You may want to use Esc,
but since many keys start with an Esc character, there may be a delay before
Vim recognizes the Esc key. If you do use Esc, it is recommended to set the

View File

@ -1,4 +1,4 @@
*repeat.txt* For Vim version 8.2. Last change: 2020 Aug 15
*repeat.txt* For Vim version 8.2. Last change: 2020 Oct 09
VIM REFERENCE MANUAL by Bram Moolenaar
@ -271,6 +271,9 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
directories are added to 'runtimepath'. This is
useful in your .vimrc. The plugins will then be
loaded during initialization, see |load-plugins|.
Note that for ftdetect scripts to be loaded
you will need to write `filetype plugin indent on`
AFTER all `packadd!` commands.
Also see |pack-add|.
{only available when compiled with |+eval|}

View File

@ -1,4 +1,4 @@
*sign.txt* For Vim version 8.2. Last change: 2020 Aug 31
*sign.txt* For Vim version 8.2. Last change: 2020 Oct 28
VIM REFERENCE MANUAL by Gordon Prieur
@ -81,6 +81,10 @@ on the same line, the attributes of the sign with the highest priority is used
independently of the sign group. The default priority for a sign is 10. The
priority is assigned at the time of placing a sign.
When two signs with the same priority are present, and one has an icon or text
in the signcolumn while the other has line highlighting, then both are
displayed.
When the line on which the sign is placed is deleted, the sign is moved to the
next line (or the last line of the buffer, if there is no next line). When
the delete is undone the sign does not move back.
@ -458,11 +462,11 @@ sign_getplaced([{expr} [, {dict}]]) *sign_getplaced()*
entries
The dictionary for each sign contains the following entries:
group sign group. Set to '' for the global group.
id identifier of the sign
lnum line number where the sign is placed
name name of the defined sign
priority sign priority
group sign group. Set to '' for the global group.
id identifier of the sign
lnum line number where the sign is placed
name name of the defined sign
priority sign priority
The returned signs in a buffer are ordered by their line
number and priority.

View File

@ -1,4 +1,4 @@
*starting.txt* For Vim version 8.2. Last change: 2020 Feb 04
*starting.txt* For Vim version 8.2. Last change: 2020 Sep 23
VIM REFERENCE MANUAL by Bram Moolenaar
@ -513,6 +513,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
'nocompatible': use Vim defaults
- no |gvimrc| script is loaded
- no viminfo file is read or written
Note that a following "-u" argument overrules the effect of
"-u DEFAULTS".
*-x*
-x Use encryption to read/write files. Will prompt for a key,

View File

@ -1,4 +1,4 @@
*tabpage.txt* For Vim version 8.2. Last change: 2020 Aug 10
*tabpage.txt* For Vim version 8.2. Last change: 2020 Oct 14
VIM REFERENCE MANUAL by Bram Moolenaar
@ -195,8 +195,8 @@ gt *i_CTRL-<PageDown>* *i_<C-PageDown>*
:+2tabnext " go to the two next tab page
:1tabnext " go to the first tab page
:$tabnext " go to the last tab page
:tabnext # " go to the last accessed tab page
:tabnext $ " as above
:tabnext # " go to the last accessed tab page
:tabnext - " go to the previous tab page
:tabnext -1 " as above
:tabnext + " go to the next tab page
@ -225,7 +225,7 @@ gT Go to the previous tab page. Wraps around from the first one
*:tabl* *:tablast*
:tabl[ast] Go to the last tab page.
*g<Tab>* *CTRL-W_g<Tab>* *<C-Tab>*
*g<Tab>* *CTRL-W_g<Tab>* *<C-Tab>*
g<Tab> Go to the last accessed tab page.
Other commands:
@ -259,7 +259,7 @@ REORDERING TAB PAGES:
:tabmove " move the tab page to the last
:$tabmove " as above
:tabmove $ " as above
:tabmove # " move the tab page after the last accessed
:tabmove # " move the tab page after the last accessed
" tab page
:tabm[ove] +[N]

View File

@ -2447,6 +2447,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:filter various.txt /*:filter*
:fin editing.txt /*:fin*
:fina eval.txt /*:fina*
:final vim9.txt /*:final*
:finally eval.txt /*:finally*
:find editing.txt /*:find*
:fini repeat.txt /*:fini*
@ -3371,6 +3372,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:up editing.txt /*:up*
:update editing.txt /*:update*
:v repeat.txt /*:v*
:var vim9.txt /*:var*
:ve various.txt /*:ve*
:ver various.txt /*:ver*
:verb various.txt /*:verb*
@ -3689,6 +3691,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
>where repeat.txt /*>where*
? pattern.txt /*?*
?<CR> pattern.txt /*?<CR>*
?? eval.txt /*??*
@ repeat.txt /*@*
@/ change.txt /*@\/*
@: repeat.txt /*@:*
@ -4375,7 +4378,6 @@ E538 options.txt /*E538*
E539 options.txt /*E539*
E54 pattern.txt /*E54*
E540 options.txt /*E540*
E541 options.txt /*E541*
E542 options.txt /*E542*
E543 options.txt /*E543*
E544 options.txt /*E544*
@ -4929,6 +4931,7 @@ InsertChange autocmd.txt /*InsertChange*
InsertCharPre autocmd.txt /*InsertCharPre*
InsertEnter autocmd.txt /*InsertEnter*
InsertLeave autocmd.txt /*InsertLeave*
InsertLeavePre autocmd.txt /*InsertLeavePre*
Integer eval.txt /*Integer*
J change.txt /*J*
Japanese mbyte.txt /*Japanese*
@ -6328,6 +6331,8 @@ extensions-improvements todo.txt /*extensions-improvements*
f motion.txt /*f*
false vim9.txt /*false*
false-variable eval.txt /*false-variable*
falsy eval.txt /*falsy*
falsy-operator eval.txt /*falsy-operator*
faq intro.txt /*faq*
farsi farsi.txt /*farsi*
farsi.txt farsi.txt /*farsi.txt*
@ -6461,6 +6466,7 @@ ft-asm68k-syntax syntax.txt /*ft-asm68k-syntax*
ft-asmh8300-syntax syntax.txt /*ft-asmh8300-syntax*
ft-aspperl-syntax syntax.txt /*ft-aspperl-syntax*
ft-aspvbs-syntax syntax.txt /*ft-aspvbs-syntax*
ft-awk-plugin filetype.txt /*ft-awk-plugin*
ft-bash-syntax syntax.txt /*ft-bash-syntax*
ft-basic-syntax syntax.txt /*ft-basic-syntax*
ft-c-omni insert.txt /*ft-c-omni*
@ -7756,6 +7762,7 @@ matcharg() eval.txt /*matcharg()*
matchdelete() eval.txt /*matchdelete()*
matchend() eval.txt /*matchend()*
matchfuzzy() eval.txt /*matchfuzzy()*
matchfuzzypos() eval.txt /*matchfuzzypos()*
matchit-install usr_05.txt /*matchit-install*
matchlist() eval.txt /*matchlist()*
matchparen pi_paren.txt /*matchparen*
@ -9649,10 +9656,12 @@ tooltips gui.txt /*tooltips*
toupper() eval.txt /*toupper()*
tr() eval.txt /*tr()*
trim() eval.txt /*trim()*
trinary eval.txt /*trinary*
trojan-horse starting.txt /*trojan-horse*
true vim9.txt /*true*
true-variable eval.txt /*true-variable*
trunc() eval.txt /*trunc()*
truthy eval.txt /*truthy*
try-conditionals eval.txt /*try-conditionals*
try-echoerr eval.txt /*try-echoerr*
try-finally eval.txt /*try-finally*
@ -10040,6 +10049,7 @@ vim9-declaration vim9.txt /*vim9-declaration*
vim9-declarations usr_46.txt /*vim9-declarations*
vim9-differences vim9.txt /*vim9-differences*
vim9-export vim9.txt /*vim9-export*
vim9-final vim9.txt /*vim9-final*
vim9-gotchas vim9.txt /*vim9-gotchas*
vim9-import vim9.txt /*vim9-import*
vim9-rationale vim9.txt /*vim9-rationale*

View File

@ -1,4 +1,4 @@
*textprop.txt* For Vim version 8.2. Last change: 2020 Mar 05
*textprop.txt* For Vim version 8.2. Last change: 2020 Oct 14
VIM REFERENCE MANUAL by Bram Moolenaar
@ -101,7 +101,7 @@ Manipulating text property types:
prop_type_add({name}, {props}) define a new property type
prop_type_change({name}, {props}) change an existing property type
prop_type_delete({name} [, {props}]) delete a property type
prop_type_get([{name} [, {props}]]) get property type values
prop_type_get({name} [, {props}]) get property type values
prop_type_list([{props}]) get list of property types
@ -291,7 +291,7 @@ prop_type_delete({name} [, {props}]) *prop_type_delete()*
Can also be used as a |method|: >
GetPropName()->prop_type_delete()
prop_type_get([{name} [, {props}]]) *prop_type_get()*
prop_type_get({name} [, {props}]) *prop_type_get()*
Returns the properties of property type {name}. This is a
dictionary with the same fields as was given to
prop_type_add().

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2020 Sep 19
*todo.txt* For Vim version 8.2. Last change: 2020 Nov 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -38,51 +38,32 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
Why does Test_invalid_sid() not work in the GUI?
test_vim9_func fails: type from default value not used.
Add matchfuzzy() and matchfuzzypos() Yegappan, #6947
should be ready now
Without extra sleeps netbeans test has valgrind errors.
PR #7248 from Yegappan - test doesn't fail without code changes
Making everything work:
- Fix memory leak in test_vim9_func (through compile_nested_function and
get_lambda_tv())
- Fix memory leaks in test_vim9_script
- At the Vim9 script level, keep script variables local to the block they are
declared in, like in Javascript (using :let).
-> Need to remember what variables were declared and delete them when
leaving the block.
-> if a function is defined it may need to keep the block-locals
Then Implement { } block at the script level.
- Recognize call to assert_fails() and execute it in the function context?
Won't work if the command itself fails, not an expression failure:
assert_fails("unknown", "E99:")
Use try/catch is complicated:
let did_catch = false
try
unknown
catch
assert_caught('E99:')
did_catch = true
endtry
assert_true('did_catch')
Add a new command,
assertfail
unknown
endassertfail E99:.*unknown
- Closure argument call should not always set varargs, like any function call?
- Invoke user command in a :def function
- Make map() give an error if the resulting type is wrong.
Add mapnew() or mapcopy() to create a new List/Dict for the result, which
can have a different value type.
- Error message for "'yes && 0" is "using String as a Number", should be "using
String as a Bool".
- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
- In autocmd: use legacy syntax, not whatever the current script uses?
- need to check type when a declaration specifies a type: #6507
let nr: number = 'asdf'
- Check many more builtin function arguments at compile time.
- Make sure that in vim9script a function call without namespace only finds
the script-local function, not a global one.
- Make sure that where a callback is expected a function can be used (without
quotes). E.g. sort() and map(). Also at the script level.
- assignment to more complex lval: list[1][2][3] = 8
Also "list[0] += value". test in Test_assign_dict_unknown_type().
- ":put" with ISN_PUT does not handle range correctly, e.g. ":$-2put".
Add command to parse range at runtime?
- Make map() give an error if the resulting type is wrong.
Add mapnew() to create a new List/Dict for the result, which can have a
different value type.
- When defining an :autocmd or :command, how to specify using Vim9 syntax?
- always do this when defined in a Vim9 script
- add some command modifier.
@ -92,9 +73,10 @@ Making everything work:
- ISN_CHECKTYPE could use check_argtype()
- give error for variable name:
let p = function('NoSuchFunc')
- Give runtime error if function argument is wrong.
def Increment(nr: number)
range(3)->Increment()
- If a :def function is called with a function reference, compile it to get
the function type.
def Filter(x: string, Cond: func(string): bool)
Filter(x, { v -> v =~ '^b' })
- Expand `=expr` in :next, :argedit, :argadd, :argdelete, :drop
- Expand `=expr` in :vimgrep, :vimgrepadd, :lvimgrep, :lvimgrepadd
- Expand `=expr` in :mkspell
@ -122,16 +104,18 @@ Making everything work:
- When evaluating constants for script variables, some functions could work:
has('asdf'), len('string')
- Implement "as Name" in "import Item as Name from ..."
- Implement using imported items at script level from "import * as X" in
eval_variable(). Should pass the ".xxx" that follows and return that.
- Disallow unlet for local/script/imported vars
- Make "++nr" work.
- Make closures work:
- Create closure in a loop. Need to make a list of them.
- nested closure only uses one context, not all (#7150)
- expandcmd() with `=expr` in filename uses legacy expression.
- eval_expr() in ex_cexpr()
- eval_expr() call in dbg_parsearg() and debuggy_find()
- has() is compiled as a constant, but some checks are dynamic.
Check for dynamic values, such as "gui_running".
- Implement command modifiers, such as "silent". (#6530)
New syntax and functionality:
Improve error checking:
- "echo Func()" is an error if Func() does not return anything.
@ -174,6 +158,11 @@ Further improvements:
- compile "expr" and "call" expression of a channel in channel_exe_cmd()?
Popup windows:
- Add a flag to make a popup window focusable?
CTRL-W P cycle over any preview window or focusable popup, end up back in
current window.
? - switch between current window and all popup windows
Esc in popup window goes back to previous current window
- Cursor not updated before a redraw, making it jump. (#5943)
- Add a termcap entry for changing the cursor when it goes under the popup and
back. like t_SI and t_EI (t_SU and t_EU, where "U" means under?)
@ -282,18 +271,33 @@ Terminal emulator window:
Error numbers available: E653
Mapping with partial match not executed properly in GTK. (Ingo Karkat, #7082)
Patch for Template string: #4634
Have another look at the implementation.
Patch to implement the vimtutor with a plugin: #6414
Was originally written by Felipe Morales.
Remove SPACE_IN_FILENAME ? It is only used for completion.
Patch to use collation based sorting. (Christian Brabandt, #6229)
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
with 'termguicolors'. #1740
Patch for blockwise paste reporting changes: #6660.
Missing filetype test for bashrc, PKGBUILD, etc.
Add an option to not fetch terminal codes in xterm, to avoid flicker when t_Co
changes.
Add an option to start_timer() to return from the input loop with K_IGNORE.
This is useful e.g. when a popup was created that disables mappings, we need
to return from vgetc() to make this happen. #7011
Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598)
Scroll doesn't work correctly, why?
Expanding <mods> should put the tab number from cmdmod.tab before "tab".
Any way to convert "$" back by using a special value? (#6901)
@ -322,15 +326,16 @@ autocommands for the buffer lifecycle:
BufIsRenamed (after buffer ID gets another name)
The buffer list and windows are locked, no changes possible
Make it possible to map (console and GUI): #6457
<C-[> 0x27 or is this <Esc> ?
<C-\> 0x28
<C-]> 0x29
<C-^> 0x30
<C-_> 0x31
Matchparen doesn't remove highlight after undo. (#7054)
Is OK when syntax HL is active.
Patch for Template string: #4634
Have another look at the implementation.
Currently Del can be used to delete the last character of a typed count.
Can it also be used to delete an incomplete Normal mode command? (#7096)
After an operator: should work. After "a" or "i" for text objects: should
work.
Using "au!" after "filetype on" is a bit slow. Can the matching of
autocommands be made faster? (#7056)
Add the <=> (spaceship) operator and "cond ?< expr ?= expr ?> expr"
replace this:
@ -341,6 +346,8 @@ Add the <=> (spaceship) operator and "cond ?< expr ?= expr ?> expr"
let res = GetLeftFunc() <=> GetRightFunc() ?< lower ?= equal ?> upper
Patch to make :q work with local arglist. (Christian Brabandt, #6286)
Why does Test_invalid_sid() not work in the GUI?
Lua: updating wrong buffer when using newly created, unloaded buffer.
(#6539)
@ -432,7 +439,6 @@ Patch to fix session file when using multiple tab pages. (Jason Franklin, 2019
May 20)
Also put :argadd commands at the start for all buffers, so that their order
remains equal? Then %argdel to clean it up. Do try this with 'hidden' set.
Also #4994: window-local options not always restored, related to using :badd.
Also #5326: netrw buffers are not restored.
Alternate file is not set in the session file. Use setwintabvar("@#") ?
@ -525,6 +531,7 @@ Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
13, #2910) Can't reproduce?
Display messed up with matchparen, wrapping and scrolling. (#5638)
Screen update bug related to matchparen. (Chris Heath, 2017 Mar 4, #1532)
When getting a focus event halfway a mapping this aborts the mapping. E.g.
when "qq" is mapped and after the first "q" the mouse is moved outside of the
@ -571,10 +578,6 @@ Patch to have text objects defined by arbitrary single characters. (Daniel
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
Added tests (James McCoy, 2016 Aug 3, #958). Still needs more work.
":2resize +10" uses size of the current window, adds 10 and applies it to
window 2. User expects 10 to be added to size of window 2. (Daniel Steinberg,
#5443)
Would be nice to set tab-local values for 'diffexpr' and 'diffopt'. Use
t:diffexpr_option t:diffopt_option? (#4782)
@ -1250,8 +1253,6 @@ GTK: When adding a timer from 'balloonexpr' it won't fire, because
g_main_context_iteration() doesn't return. Need to trigger an event when the
timer expires.
Screen update bug related to matchparen. (Chris Heath, 2017 Mar 4, #1532)
Rule to use "^" for statusline does not work if a space is defined with
highlighting for both stl and stlnc. Patch by Ken Hamada (itchyny, 2016 Dec 11)
@ -1484,8 +1485,6 @@ Have a way to get the call stack, in a function and from an exception.
Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
Filetype plugin for awk. (Doug Kearns, 2016 Sep 5)
Patch to improve map documentation. Issue #799.
We can use '. to go to the last change in the current buffer, but how about
@ -1705,8 +1704,6 @@ Extended file attributes lost on write (backupcopy=no). Issue 306.
Patch to add :lockjumps. (Carlo Baldassi, 2015 May 25)
OK to not block marks?
Mixup of highlighting when there is a match and SpellBad. (ZyX, 2015 Jan 1)
Patch on Issue 72: 'autochdir' causes problems for :vimgrep.
When two SIGWINCH arrive very quickly, the second one may be lost.
@ -1773,14 +1770,6 @@ arguments.
Problem with transparent and matchgroup. Issue #475
Spell files use a latin single quote. Unicode also has another single quote:
0x2019. (Ron Aaron, 2014 Apr 4)
New OpenOffice spell files support this with ICONV. But they are not
compatible with Vim spell files. The old files can no longer be downloaded.
Spell checking: Add a feature to only consider two spaces after a dot to start
a new sentence. Don't give the capitalization error when there is one space.
Idea: For a window in the middle (has window above and below it), use
right-mouse-drag on the status line to move a window up/down without changing
its height? It's like dragging the status bar above it at the same time.
@ -2455,9 +2444,6 @@ Don't load macmap.vim on startup, turn it into a plugin. (Ron Aaron,
Add "no_hlsearch" to winsaveview().
Cursorline highlighting combines with Search ('hlsearch') but not with
SpellBad. (Jim Karsten, 2009 Mar 18)
When 'foldmethod' is "indent", adding an empty line below a fold and then
indented text, creates a new fold instead of joining it with the previous one.
(Evan Laforge, 2009 Oct 17)
@ -2964,12 +2950,6 @@ the Visual area. Can this be fixed? (James Vega, 2006 Sept 15)
GUI: When combining fg en bg make sure they are not equal.
Spell checking: Add a way to specify punctuation characters. Add the
superscript numbers by default: 0x2070, 0xb9, 0xb2, 0xb3, 0x2074 - 0x2079.
Spell checking in popup menu: If the only problem is the case of the first
character, don't offer "ignore" and "add to word list".
Use different pt_br dictionary for spell checking. (Jackson A. Aquino, 2006
Jun 5)
@ -2983,10 +2963,6 @@ Jul 22)
There should be something about spell checking in the user manual.
Spell menu: When using the Popup menu to select a replacement word,
":spellrepeat" doesn't work. SpellReplace() uses setline(). Can it use "z="
somehow? Or use a new function.
Mac: Using gvim: netrw window disappears. (Nick Lo, 2006 Jun 21)
Add an option to specify the character to use when a double-width character is
@ -3270,6 +3246,29 @@ Better 'rightleft' or BIDI support:
- Minimal Vi with bidi support: https://github.com/aligrudi/neatvi
By Ali Gholami Rudi, also worked on arabic.c
Spell checking:
- When 'cursorline' is set and the first word should have SpellCap
highlighting, redrawing the line removes it when moving the cursor away
from the line. (#7085) Would need to inspect the end of the previous line
and update "capcol_lnum" and "cap_col".
- Mixup of highlighting when there is a match and SpellBad. (ZyX, 2015 Jan 1)
- Spell files use a latin single quote. Unicode also has another single
quote: 0x2019. (Ron Aaron, 2014 Apr 4)
New OpenOffice spell files support this with ICONV. But they are not
compatible with Vim spell files. The old files can no longer be
downloaded.
- Add a feature to only consider two spaces after a dot to start a new
sentence. Don't give the capitalization error when there is one space.
- Add a way to specify punctuation characters. Add the superscript numbers
by default: 0x2070, 0xb9, 0xb2, 0xb3, 0x2074 - 0x2079.
- In popup menu: If the only problem is the case of the first character,
don't offer "ignore" and "add to word list".
- Spell menu: When using the Popup menu to select a replacement word,
":spellrepeat" doesn't work. SpellReplace() uses setline(). Can it use
"z=" somehow? Or use a new function.
Quickfix/Location List:
- Window size is wrong when using quickfix window. (Lifepillar, 2018 Aug 24,
#2999)
@ -3838,10 +3837,6 @@ Macintosh:
on the status line (caused by 'winheight'). Select window on button up,
instead of on button down.
8 Dragging the status line doesn't scroll but redraw.
9 Evaluating 'statusline' in build_stl_str_hl() does not properly check for
reaching the end of the available buffer.
Patch to dynamically allocate the buffer for % items. (Eric Arnold, 2006
May 14)
8 When performing incremental search, should abort searching as soon as a
character is typed.
8 When the value of $MAKE contains a path, configure can't handle this.

View File

@ -1,4 +1,4 @@
*undo.txt* For Vim version 8.2. Last change: 2019 Dec 07
*undo.txt* For Vim version 8.2. Last change: 2020 Oct 18
VIM REFERENCE MANUAL by Bram Moolenaar
@ -392,7 +392,7 @@ back the text of three deletes ago with '"3P'.
*redo-register*
If you want to get back more than one part of deleted text, you can use a
special feature of the repeat command ".". It will increase the number of the
register used. So if you first do ""1P", the following "." will result in a
register used. So if you first do '"1P', the following "." will result in a
'"2P'. Repeating this will result in all numbered registers being inserted.
Example: If you deleted text with 'dd....' it can be restored with

View File

@ -1,4 +1,4 @@
*usr_11.txt* For Vim version 8.2. Last change: 2020 Jul 08
*usr_11.txt* For Vim version 8.2. Last change: 2020 Oct 25
VIM USER MANUAL - by Bram Moolenaar
@ -294,7 +294,7 @@ If you really don't want to see this message, you can add the 'A' flag to the
'shortmess' option. But it's very unusual that you need this.
For remarks about encryption and the swap file, see |:recover-crypt|.
For programatic access to the swap file, see |swapinfo()|.
For programmatic access to the swap file, see |swapinfo()|.
==============================================================================
*11.4* Further reading

View File

@ -604,6 +604,7 @@ String manipulation: *string-functions*
match() position where a pattern matches in a string
matchend() position where a pattern match ends in a string
matchfuzzy() fuzzy matches a string in a list of strings
matchfuzzypos() fuzzy matches a string in a list of strings
matchstr() match of a pattern in a string
matchstrpos() match and positions of a pattern in a string
matchlist() like matchstr() and also return submatches
@ -643,6 +644,7 @@ List manipulation: *list-functions*
deepcopy() make a full copy of a List
filter() remove selected items from a List
map() change each List item
mapnew() make a new List with changed items
reduce() reduce a List to a value
sort() sort a List
reverse() reverse the order of a List
@ -668,6 +670,7 @@ Dictionary manipulation: *dict-functions*
extend() add entries from one Dictionary to another
filter() remove selected entries from a Dictionary
map() change each Dictionary entry
mapnew() make a new Dictionary with changed items
keys() get List of Dictionary keys
values() get List of Dictionary values
items() get List of Dictionary key-value pairs

View File

@ -1,4 +1,4 @@
*version7.txt* For Vim version 8.2. Last change: 2020 Aug 15
*version7.txt* For Vim version 8.2. Last change: 2020 Oct 25
VIM REFERENCE MANUAL by Bram Moolenaar
@ -10260,7 +10260,7 @@ Commands:
Brabandt)
Other:
Lua interface now also uses userdata binded to Vim structures. (Taro
Lua interface now also uses userdata bound to Vim structures. (Taro
Muraoka, Luis Carvalho)
glob() and autocommand patterns used to work with the undocumented

View File

@ -1,4 +1,4 @@
*version8.txt* For Vim version 8.2. Last change: 2020 Aug 15
*version8.txt* For Vim version 8.2. Last change: 2020 Oct 25
VIM REFERENCE MANUAL by Bram Moolenaar
@ -47698,7 +47698,7 @@ Files: src/eval.c, src/testdir/test_vim9_expr.vim
Patch 8.2.1064
Problem: Vim9: no line break allowed before comparators.
Solution: Check for comperator after line break.
Solution: Check for comparator after line break.
Files: src/eval.c, src/testdir/test_vim9_expr.vim
Patch 8.2.1065
@ -48515,7 +48515,7 @@ Solution: Recognize true and false.
Files: src/eval.c, src/testdir/test_vim9_expr.vim
Patch 8.2.1205
Problem: Vim9: && and || work different when not compiled.
Problem: Vim9: && and || work differently when not compiled.
Solution: Keep the value.
Files: src/eval.c, src/testdir/test_vim9_expr.vim

View File

@ -459,6 +459,9 @@ Use {name} as the server name. Used for the current Vim, unless used with a
\-\-socketid {id}
GTK GUI only: Use the GtkPlug mechanism to run gvim in another window.
.TP
\-\-startuptime {file}
During startup write timing messages to the file {fname}.
.TP
\-\-version
Print version information and exit.
.SH ON-LINE HELP

View File

@ -345,6 +345,9 @@ OPTIONS
GTK GUI only: Use the GtkPlug mechanism to run gvim in an
other window.
--startuptime {file}
During startup write timing messages to the file {fname}.
--version Print version information and exit.
ON-LINE HELP

View File

@ -1,4 +1,4 @@
*vim9.txt* For Vim version 8.2. Last change: 2020 Sep 17
*vim9.txt* For Vim version 8.2. Last change: 2020 Oct 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -65,12 +65,41 @@ rewrite old scripts, they keep working as before. You may want to use a few
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
Overview ~
Brief summary of the differences you will most often encounter when using Vim9
script and `:def` functions; details are below:
- Comments start with #, not ": >
echo "hello" # comment
- Using a backslash for line continuation is hardly ever needed: >
echo "hello "
.. yourName
.. ", how are you?"
- White space is required in many places.
- Assign values without `:let`, declare variables with `:var`: >
var count = 0
count += 3
- Constants can be declared with `:final` and `:const`: >
final matches = [] # add matches
const names = ['Betty', 'Peter'] # cannot be changed
- `:final` cannot be used as an abbreviation of `:finally`.
- Variables and functions are script-local by default.
- Functions are declared with argument types and return type: >
def CallMe(count: number, message: string): bool
- Call functions without `:call`: >
writefile(['done'], 'file.txt')
- You cannot use `:xit`, `:t`, `:append`, `:change`, `:insert` or curly-braces
names.
- A range before a command must be prefixed with a colon: >
:%s/this/that
Comments starting with # ~
In legacy Vim script comments start with double quote. In Vim9 script
comments start with #. >
# declarations
let count = 0 # number of occurrences
var count = 0 # number of occurrences
The reason is that a double quote can also be the start of a string. In many
places, especially halfway through an expression with a line break, it's hard
@ -125,25 +154,30 @@ Functions and variables are script-local by default ~
*vim9-scopes*
When using `:function` or `:def` to specify a new function at the script level
in a Vim9 script, the function is local to the script, as if "s:" was
prefixed. Using the "s:" prefix is optional. To define or use a global
function or variable the "g:" prefix should be used. For functions in an
autoload script the "name#" prefix is sufficient. >
prefixed. Using the "s:" prefix is optional. To define a global function or
variable the "g:" prefix must be used. For functions in an autoload script
the "name#" prefix is sufficient. >
def ThisFunction() # script-local
def s:ThisFunction() # script-local
def g:ThatFunction() # global
def ThatFunction() # global if no local ThatFunction()
def scriptname#function() # autoload
When using `:function` or `:def` to specify a new function inside a function,
the function is local to the function. It is not possible to define a
script-local function inside a function. It is possible to define a global
function, using the "g:" prefix.
When using `:function` or `:def` to specify a nested function inside a `:def`
function, this nested function is local to the code block it is defined in.
In a `:def` function it is not possible to define a script-local function. It
is possible to define a global function by using the "g:" prefix.
When referring to a function and no "s:" or "g:" prefix is used, Vim will
prefer using a local function (in the function scope, script scope or
imported) before looking for a global function.
search for the function:
- in the function scope, in block scopes
- in the script scope, possibly imported
- in the list of global functions
However, it is recommended to always use "g:" to refer to a global function
for clarity.
In all cases the function must be defined before used. That is when it is
first called or when `:defcompile` causes the call to be compiled.
called, when `:defcompile` causes it to be compiled, or when code that calls
it is being compiled (to figure out the return type).
The result is that functions and variables without a namespace can usually be
found in the script, either defined there or imported. Global functions and
@ -154,31 +188,32 @@ Vim9 script script-local functions are defined once when the script is sourced
and cannot be deleted or replaced.
Variable declarations with :let and :const ~
*vim9-declaration*
Local variables need to be declared with `:let`. Local constants need to be
declared with `:const`. We refer to both as "variables".
Variable declarations with :var, :final and :const ~
*vim9-declaration* *:var*
Local variables need to be declared with `:var`. Local constants need to be
declared with `:final` or `:const`. We refer to both as "variables" in this
section.
Variables can be local to a script, function or code block: >
vim9script
let script_var = 123
var script_var = 123
def SomeFunc()
let func_var = script_var
var func_var = script_var
if cond
let block_var = func_var
var block_var = func_var
...
The variables are only visible in the block where they are defined and nested
blocks. Once the block ends the variable is no longer accessible: >
if cond
let inner = 5
var inner = 5
else
let inner = 0
var inner = 0
endif
echo inner # Error!
The declaration must be done earlier: >
let inner: number
var inner: number
if cond
inner = 5
else
@ -186,10 +221,10 @@ The declaration must be done earlier: >
endif
echo inner
To intentionally avoid a variable being available later, a block can be used:
>
To intentionally hide a variable from code that follows, a block can be
used: >
{
let temp = 'temp'
var temp = 'temp'
...
}
echo temp # Error!
@ -197,9 +232,9 @@ To intentionally avoid a variable being available later, a block can be used:
Declaring a variable with a type but without an initializer will initialize to
zero, false or empty.
An existing variable cannot be assigned to with `:let`, since that implies a
declaration. Global, window, tab, buffer and Vim variables can only be used
without `:let`, because they are not really declared, they can also be deleted
In Vim9 script `:let` cannot be used. An existing variable is assigned to
without any command. The same for global, window, tab, buffer and Vim
variables, because they are not really declared. They can also be deleted
with `:unlet`.
Variables and functions cannot shadow previously defined or imported variables
@ -209,51 +244,50 @@ Variables may shadow Ex commands, rename the variable if needed.
Global variables and user defined functions must be prefixed with "g:", also
at the script level. >
vim9script
let script_local = 'text'
var script_local = 'text'
g:global = 'value'
let Funcref = g:ThatFunction
var Funcref = g:ThatFunction
Since "&opt = value" is now assigning a value to option "opt", ":&" cannot be
Since `&opt = value` is now assigning a value to option "opt", ":&" cannot be
used to repeat a `:substitute` command.
*vim9-const*
In legacy Vim script "const list = []" would make the variable "list"
immutable and also the value. Thus you cannot add items to the list. This
differs from what many languages do. Vim9 script does it like TypeScript: only
"list" is immutable, the value can be changed.
One can use `:const!` to make both the variable and the value immutable. Use
Constants ~
*vim9-const* *vim9-final*
How constants work varies between languages. Some consider a variable that
can't be assigned another value a constant. JavaScript is an example. Others
also make the value immutable, thus when a constant uses a list, the list
cannot be changed. In Vim9 we can use both.
`:const` is used for making both the variable and the value a constant. Use
this for composite structures that you want to make sure will not be modified.
Example: >
const myList = [1, 2]
myList = [3, 4] # Error!
myList[0] = 9 # Error!
muList->add(3) # Error!
< *:final*
`:final` is used for making only the variable a constant, the value can be
changed. This is well known from Java. Example: >
final myList = [1, 2]
myList = [3, 4] # Error!
myList[0] = 9 # OK
muList->add(3) # OK
How this works: >
vim9script
const list = [1, 2]
list = [3, 4] # Error!
list[0] = 2 # OK
const! LIST = [1, 2]
LIST = [3, 4] # Error!
LIST[0] = 2 # Error!
It is common to write constants as ALL_CAPS, but you don't have to.
The constant only applies to the value itself, not what it refers to. >
cont females = ["Mary"]
const! NAMES = [["John", "Peter"], females]
final females = ["Mary"]
const NAMES = [["John", "Peter"], females]
NAMES[0] = ["Jack"] # Error!
NAMES[0][0] = ["Jack"] # Error!
NAMES[0][0] = "Jack" # Error!
NAMES[1] = ["Emma"] # Error!
Names[1][0] = "Emma" # OK, now females[0] == "Emma"
Rationale: TypeScript has no way to make the value immutable. One can use
immutable types, but that quickly gets complicated for nested values. And
with a type cast the value can be made mutable again, which means there is no
guarantee the value won't change. Vim supports immutable values, in legacy
script this was done with `:lockvar`. But that is an extra statement and also
applies to nested values. Therefore the solution to use `:const!`.
*E1092*
< *E1092*
Declaring more than one variable at a time, using the unpack notation, is
currently not supported: >
let [v1, v2] = GetValues() # Error!
var [v1, v2] = GetValues() # Error!
That is because the type needs to be inferred from the list item type, which
isn't that easy.
@ -296,7 +330,7 @@ A user defined function can be used as a function reference in an expression
without `function()`. The argument types and return type will then be checked.
The function must already have been defined. >
let Funcref = MyFunction
var Funcref = MyFunction
When using `function()` the resulting type is "func", a function with any
number of arguments and any return type. The function can be defined later.
@ -307,53 +341,53 @@ Automatic line continuation ~
In many cases it is obvious that an expression continues on the next line. In
those cases there is no need to prefix the line with a backslash
|line-continuation|. For example, when a list spans multiple lines: >
let mylist = [
var mylist = [
'one',
'two',
]
And when a dict spans multiple lines: >
let mydict = #{
var mydict = #{
one: 1,
two: 2,
}
Function call: >
let result = Func(
var result = Func(
arg1,
arg2
)
For binary operators in expressions not in [], {} or () a line break is
possible just before or after the operator. For example: >
let text = lead
var text = lead
.. middle
.. end
let total = start +
var total = start +
end -
correction
let result = positive
var result = positive
? PosFunc(arg)
: NegFunc(arg)
For a method call using "->" and a member using a dot, a line break is allowed
before it: >
let result = GetBuilder()
var result = GetBuilder()
->BuilderSetWidth(333)
->BuilderSetHeight(777)
->BuilderBuild()
let result = MyDict
var result = MyDict
.member
< *E1050*
To make it possible for the operator at the start of the line to be
recognized, it is required to put a colon before a range. This will add
"start" and print: >
let result = start
var result = start
+ print
Like this: >
let result = start + print
var result = start + print
This will assign "start" and print a line: >
let result = start
var result = start
:+ print
It is also possible to split a function header over multiple lines, in between
@ -411,15 +445,15 @@ The 'ignorecase' option is not used for comparators that use strings.
White space ~
Vim9 script enforces proper use of white space. This is no longer allowed: >
let var=234 # Error!
let var= 234 # Error!
let var =234 # Error!
var name=234 # Error!
var name= 234 # Error!
var name =234 # Error!
There must be white space before and after the "=": >
let var = 234 # OK
var name = 234 # OK
White space must also be put before the # that starts a comment after a
command: >
let var = 234# Error!
let var = 234 # OK
var name = 234# Error!
var name = 234 # OK
White space is required around most operators.
@ -438,15 +472,21 @@ White space is not allowed:
Conditions and expressions ~
Conditions and expressions are mostly working like they do in JavaScript. A
difference is made where JavaScript does not work like most people expect.
Specifically, an empty list is falsey.
Conditions and expressions are mostly working like they do in other languages.
Some values are different from legacy Vim script:
value legacy Vim script Vim9 script ~
0 falsy falsy
1 truthy truthy
99 truthy Error!
"0" falsy Error!
"99" truthy Error!
"text" falsy Error!
Any type of variable can be used as a condition, there is no error, not even
for using a list or job. This is very much like JavaScript, but there are a
few exceptions.
For the "??" operator and when using "!" then there is no error, every value
is either falsy or truthy. This is mostly like JavaScript, except that an
empty list and dict is falsy:
type TRUE when ~
type truthy when ~
bool v:true or 1
number non-zero
float non-zero
@ -461,17 +501,25 @@ few exceptions.
class when not NULL
object when not NULL (TODO: when isTrue() returns v:true)
The boolean operators "||" and "&&" do not change the value: >
8 || 2 == 8
0 || 2 == 2
0 || '' == ''
8 && 2 == 2
0 && 2 == 0
2 && 0 == 0
[] && 2 == []
The boolean operators "||" and "&&" expect the values to be boolean, zero or
one: >
1 || false == true
0 || 1 == true
0 || false == false
1 && true == true
0 && 1 == false
8 || 0 Error!
'yes' && 0 Error!
[] || 99 Error!
When using `..` for string concatenation arguments of simple types are always
converted to string. >
When using "!" for inverting, there is no error for using any type and the
result is a boolean. "!!" can be used to turn any value into boolean: >
!'yes' == false
!![] == false
!![1, 2, 3] == true
When using "`.."` for string concatenation arguments of simple types are
always converted to string: >
'hello ' .. 123 == 'hello 123'
'hello ' .. v:true == 'hello v:true'
@ -582,9 +630,10 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
It is possible to nest `:def` inside another `:def` or
`:function` up to about 50 levels deep.
[!] is used as with `:function`. Note that in Vim9
script script-local functions cannot be deleted or
redefined later in the same script.
[!] is used as with `:function`. Note that
script-local functions cannot be deleted or redefined
later in Vim9 script. They can only be removed by
reloading the same script.
*:enddef*
:enddef End of a function defined with `:def`. It should be on
@ -612,14 +661,14 @@ Limitations ~
Local variables will not be visible to string evaluation. For example: >
def EvalString(): list<string>
let list = ['aa', 'bb', 'cc', 'dd']
var list = ['aa', 'bb', 'cc', 'dd']
return range(1, 2)->map('list[v:val]')
enddef
The map argument is a string expression, which is evaluated without the
function scope. Instead, use a lambda: >
def EvalString(): list<string>
let list = ['aa', 'bb', 'cc', 'dd']
var list = ['aa', 'bb', 'cc', 'dd']
return range(1, 2)->map({ _, v -> list[v] })
enddef
@ -690,23 +739,23 @@ builtin types added later, similarly to user functions.
And classes and interfaces can be used as types: >
:class MyClass
:let mine: MyClass
:var mine: MyClass
:interface MyInterface
:let mine: MyInterface
:var mine: MyInterface
:class MyTemplate<Targ>
:let mine: MyTemplate<number>
:let mine: MyTemplate<string>
:var mine: MyTemplate<number>
:var mine: MyTemplate<string>
:class MyInterface<Targ>
:let mine: MyInterface<number>
:let mine: MyInterface<string>
:var mine: MyInterface<number>
:var mine: MyInterface<string>
{not implemented yet}
Variable types and type casting *variable-types*
Variable types and type casting ~
*variable-types*
Variables declared in Vim9 script or in a `:def` function have a type, either
specified explicitly or inferred from the initialization.
@ -716,10 +765,10 @@ compiled code the "any" type is assumed.
This can be a problem when the "any" type is undesired and the actual type is
expected to always be the same. For example, when declaring a list: >
let l: list<number> = [1, g:two]
var l: list<number> = [1, g:two]
This will give an error, because "g:two" has type "any". To avoid this, use a
type cast: >
let l: list<number> = [1, <number>g:two]
var l: list<number> = [1, <number>g:two]
< *type-casting*
The compiled code will then check that "g:two" is a number at runtime and give
an error if it isn't. This is called type casting.
@ -734,12 +783,12 @@ it to a string, use the |string()| function. Or use |str2nr()| to convert a
string to a number.
Type inference *type-inference*
Type inference ~
*type-inference*
In general: Whenever the type is clear it can be omitted. For example, when
declaring a variable and giving it a value: >
let var = 0 # infers number type
let var = 'hello' # infers string type
var name = 0 # infers number type
var name = 'hello' # infers string type
The type of a list and dictionary comes from the common type of the values.
If the values all have the same type, that type is used for the list or
@ -749,8 +798,8 @@ dictionary. If there is a mix of types, the "any" type is used. >
[1, 'x', 3] list<any>
Stricter type checking *type-checking*
Stricter type checking ~
*type-checking*
In legacy Vim script, where a number was expected, a string would be
automatically converted to a number. This was convenient for an actual number
such as "123", but leads to unexpected problems (but no error message) if the
@ -766,7 +815,7 @@ an error, thus breaking backwards compatibility. For example:
==============================================================================
5. Namespace, Import and Export
5. Namespace, Import and Export
*vim9script* *vim9-export* *vim9-import*
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
@ -786,7 +835,7 @@ appear as the first statement in the file. It tells Vim to interpret the
script in its own namespace, instead of the global namespace. If a file
starts with: >
vim9script
let myvar = 'yes'
var myvar = 'yes'
Then "myvar" will only exist in this file. While without `vim9script` it would
be available as `g:myvar` from any other script and function.
@ -809,7 +858,9 @@ Export ~
*:export* *:exp*
Exporting an item can be written as: >
export const EXPORTED_CONST = 1234
export let someValue = ...
export var someValue = ...
export final someValue = ...
export const someValue = ...
export def MyFunc() ...
export class MyClass ...
@ -850,7 +901,7 @@ The script name after `import` can be:
location of the script file itself. This is useful to split up a large
plugin into several files.
- An absolute path, starting with "/" on Unix or "D:/" on MS-Windows. This
will be rarely used.
will rarely be used.
- A path not being relative or absolute. This will be found in the
"import" subdirectories of 'runtimepath' entries. The name will usually be
longer and unique, to avoid loading the wrong file.
@ -880,7 +931,7 @@ actually needed. A recommended mechanism:
vim9script
import FilterFunc from "../import/someother.vim"
def searchfor#Stuff(arg: string)
let filtered = FilterFunc(arg)
var filtered = FilterFunc(arg)
...
< This goes in .../autoload/searchfor.vim. "searchfor" in the file name
must be exactly the same as the prefix for the function name, that is how
@ -889,7 +940,7 @@ actually needed. A recommended mechanism:
3. Other functionality, possibly shared between plugins, contains the exported
items and any private items. >
vim9script
let localVar = 'local'
var localVar = 'local'
export def FilterFunc(arg: string): string
...
< This goes in .../import/someother.vim.
@ -909,7 +960,7 @@ namespace will be used for the imported item, even when "s:" is not specified.
6. Future work: classes *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 funcionality, and since
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.
@ -941,7 +992,7 @@ invoke callbacks and handle timeouts and errors.
The :def command ~
Plugin writers have asked for a much faster Vim script. Investigations have
Plugin writers have asked for much faster Vim script. Investigations have
shown that keeping the existing semantics of function calls make this close to
impossible, because of the overhead involved with calling a function, setting
up the local function scope and executing lines. There are many details that
@ -952,7 +1003,7 @@ much overhead that cannot be avoided.
Therefore the `:def` method to define a new-style function had to be added,
which allows for a function with different semantics. Most things still work
as before, but some parts do not. A new way to define a function was
considered the best way to separate the old-style code from Vim9 script code.
considered the best way to separate the legacy style code from Vim9 style code.
Using "def" to define a function comes from Python. Other languages use
"function" which clashes with legacy Vim script.
@ -968,12 +1019,12 @@ instruction, at execution time the instruction would have to inspect the type
of the arguments and decide what kind of addition to do. And when the
type is dictionary throw an error. If the types are known to be numbers then
an "add number" instruction can be used, which is faster. The error can be
given at compile time, no error handling is needed at runtime, adding two
numbers cannot fail.
given at compile time, no error handling is needed at runtime, since adding
two numbers cannot fail.
The syntax for types is similar to Java, since it is easy to understand and
widely used. The type names are what were used in Vim before, with some
additions such as "void" and "bool".
The syntax for types, using <type> for compound types, is similar to Java. It
is easy to understand and widely used. The type names are what were used in
Vim before, with some additions such as "void" and "bool".
Removing clutter and weirdness ~
@ -981,10 +1032,10 @@ Removing clutter and weirdness ~
Once decided that `:def` functions have different syntax than legacy functions,
we are free to add improvements to make the code more familiar for users who
know popular programming languages. In other words: remove weird things that
only Vim uses.
only Vim does.
We can also remove clutter, mainly things that were done to make Vim script
backwards compatible with good old Vi commands.
backwards compatible with the good old Vi commands.
Examples:
- Drop `:call` for calling a function and `:eval` for manipulating data.
@ -993,44 +1044,26 @@ Examples:
However, this does require that some things need to change:
- Comments start with # instead of ", to avoid confusing them with strings.
This is good anyway, it is known from several popular languages.
- Ex command ranges need to be prefixed with a colon, to avoid confusion with
expressions (single quote can be a string or a mark, "/" can be divide or a
search command, etc.).
Goal is to limit the differences. A good criteria is that when the old syntax
is used you are very likely to get an error message.
is accidentally used you are very likely to get an error message.
TypeScript syntax and semantics ~
Syntax and semantics from popular languages ~
Script writers have complained that the Vim script syntax is unexpectedly
different from what they are used to. To reduce this complaint popular
languages are used as an example. At the same time, we do not want to abandon
the well-known parts of legacy Vim script.
Since Vim already uses `:let` and `:const` and optional type checking is
desirable, the JavaScript/TypeScript syntax fits best for variable
declarations: >
const greeting = 'hello' # string type is inferred
let name: string
...
name = 'John'
Expression evaluation was already close to what JavaScript and other languages
are doing. Some details are unexpected and can be fixed. For example how the
|| and && operators work. Legacy Vim script: >
let value = 44
...
let result = value || 0 # result == 1
Vim9 script works like JavaScript/TypeScript, keep the value: >
let value = 44
...
let result = value || 0 # result == 44
Another reason why TypeScript can be used as an example for Vim9 script is the
For many things TypeScript is followed. It's a recent language that is
gaining popularity and has similarities with Vim script. It also has a
mix of static typing (a variable always has a known value type) and dynamic
typing (a variable can have different types, this hanges at runtime). Since
typing (a variable can have different types, this changes at runtime). Since
legacy Vim script is dynamically typed and a lot of existing functionality
(esp. builtin functions) depends on that, while static typing allows for much
faster execution, we need to have this mix in Vim9 script.
@ -1054,7 +1087,7 @@ Specific items from TypeScript we avoid:
- TypeScript can use an expression like "99 || 'yes'" in a condition, but
cannot assign the value to a boolean. That is inconsistent and can be
annoying. Vim recognizes an expression with && or || and allows using the
result as a bool.
result as a bool. TODO: to be reconsidered
- TypeScript considers an empty string as Falsy, but an empty list or dict as
Truthy. That is inconsistent. In Vim an empty list and dict are also
Falsy.
@ -1063,6 +1096,96 @@ Specific items from TypeScript we avoid:
which is more flexible, but is only checked at runtime.
Declarations ~
Legacy Vim script uses `:let` for every assignment, while in Vim9 declarations
are used. That is different, thus it's good to use a different command:
`:var`. This is used in many languages. The semantics might be slightly
different, but it's easily recognized as a declaration.
Using `:const` for constants is common, but the semantics vary. Some
languages only make the variable immutable, others also make the value
immutable. Since "final" is well known from Java for only making the variable
immutable we decided to use that. And then `:const` can be used for making
both immutable. This was also used in legacy Vim script and the meaning is
almost the same.
What we end up with is very similar to Dart: >
:var name # mutable variable and value
:final name # immutable variable, mutable value
:const name # immutable variable and value
Since legacy and Vim9 script will be mixed and global variables will be
shared, optional type checking is desirable. Also, type inference will avoid
the need for specifying the type in many cases. The TypeScript syntax fits
best for adding types to declarations: >
var name: string # string type is specified
...
name = 'John'
const greeting = 'hello' # string type is inferred
This is how we put types in a declaration: >
var mylist: list<string>
final mylist: list<string> = ['foo']
def Func(arg1: number, arg2: string): bool
Two alternatives were considered:
1. Put the type before the name, like Dart: >
var list<string> mylist
final list<string> mylist = ['foo']
def Func(number arg1, string arg2) bool
2. Put the type after the variable name, but do not use a colon, like Go: >
var mylist list<string>
final mylist list<string> = ['foo']
def Func(arg1 number, arg2 string) bool
The first is more familiar for anyone used to C or Java. The second one
doesn't really have an advantage over the first, so let's discard the second.
Since we use type inference the type can be left out when it can be inferred
from the value. This means that after `var` we don't know if a type or a name
follows. That makes parsing harder, not only for Vim but also for humans.
Also, it will not be allowed to use a variable name that could be a type name,
using `var string string` is too confusing.
The chosen syntax, using a colon to separate the name from the type, adds
punctuation, but it actually makes it easier to recognize the parts of a
declaration.
Expressions ~
Expression evaluation was already close to what other languages are doing.
Some details are unexpected and can be improved. For example a boolean
condition would accept a string, convert it to a number and check if the
number is non-zero. This is unexpected and often leads to mistakes, since
text not starting with a number would be converted to zero, which is
considered false. Thus using a string for a condition would often not give an
error and be considered false. That is confusing.
In Vim9 type checking is more strict to avoid mistakes. Where a condition is
used, e.g. with the `:if` command and the `||` operator, only boolean-like
values are accepted:
true: `true`, `v:true`, `1`, `0 < 9`
false: `false`, `v:false`, `0`, `0 > 9`
Note that the number zero is false and the number one is true. This is more
permissive than most other languages. It was done because many builtin
functions return these values.
If you have any type of value and want to use it as a boolean, use the `!!`
operator:
true: !`!'text'`, `!![99]`, `!!{'x': 1}`, `!!99`
false: `!!''`, `!![]`, `!!{}`
From a language like JavaScript we have this handy construct: >
GetName() || 'unknown'
However, this conflicts with only allowing a boolean for a condition.
Therefore the "??" operator was added: >
GetName() ?? 'unknown'
Here you can explicitly express your intention to use the value as-is and not
result in a boolean. This is called the |falsy-operator|.
Import and Export ~
A problem of legacy Vim script is that by default all functions and variables
@ -1122,7 +1245,7 @@ only reported then. In case these errors should be found early, e.g. when
testing, the `:defcompile` command will help out.
Why not use an embeded language? ~
Why not use an embedded language? ~
Vim supports interfaces to Perl, Python, Lua, Tcl and a few others. But
these interfaces have never become widely used, for various reasons. When

View File

@ -1,4 +1,4 @@
*windows.txt* For Vim version 8.2. Last change: 2020 Sep 02
*windows.txt* For Vim version 8.2. Last change: 2020 Nov 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1119,6 +1119,11 @@ list of buffers. |unlisted-buffer|
line when the buffer is first entered. Note that other
commands after the + will be ignored.
*:balt*
:balt [+lnum] {fname}
Like `:badd` and also set the alternate file for the current
window to {fname}.
:[N]bd[elete][!] *:bd* *:bdel* *:bdelete* *E516*
:bd[elete][!] [N]
Unload buffer [N] (default: current buffer) and delete it from

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 Aug 04
" Last Change: 2020 Oct 24
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@ -317,7 +317,7 @@ au BufNewFile,BufRead *.css setf css
au BufNewFile,BufRead *.con setf cterm
" Changelog
au BufNewFile,BufRead changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch
au BufNewFile,BufRead changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch,*/debian/changelog
\ setf debchangelog
au BufNewFile,BufRead [cC]hange[lL]og
@ -1162,10 +1162,10 @@ au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp
au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd
" Pascal (also *.p)
au BufNewFile,BufRead *.pas setf pascal
au BufNewFile,BufRead *.pas,*.pp setf pascal
" Delphi project file
au BufNewFile,BufRead *.dpr setf pascal
" Delphi or Lazarus program file
au BufNewFile,BufRead *.dpr,*.lpr setf pascal
" PDF
au BufNewFile,BufRead *.pdf setf pdf
@ -1203,7 +1203,7 @@ au BufNewFile,BufRead *.pod6 setf pod6
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php
" PHP config
au BufNewFile,BufRead php.ini,php.ini-* setf dosini
au BufNewFile,BufRead php.ini-* setf dosini
" Pike and Cmod
au BufNewFile,BufRead *.pike,*.pmod setf pike
@ -1342,13 +1342,6 @@ au BufNewFile,BufRead *.rego setf rego
" Rexx
au BufNewFile,BufRead *.rex,*.orx,*.rxo,*.rxj,*.jrexx,*.rexxj,*.rexx,*.testGroup,*.testUnit setf rexx
" R (Splus)
if has("fname_case")
au BufNewFile,BufRead *.s,*.S setf r
else
au BufNewFile,BufRead *.s setf r
endif
" R Help file
if has("fname_case")
au BufNewFile,BufRead *.rd,*.Rd setf rhelp
@ -1513,9 +1506,10 @@ au BufNewFile,BufRead *.decl,*.dcl,*.dec
au BufNewFile,BufRead catalog setf catalog
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
" Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
" Gentoo ebuilds, Arch Linux PKGBUILDs and Alpine Linux APKBUILDs are actually
" bash scripts.
" NOTE: Patterns ending in a star are further down, these have lower priority.
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD,APKBUILD call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1))
@ -1727,7 +1721,7 @@ au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
au BufNewFile,BufRead *.tex call dist#ft#FTtex()
" ConTeXt
au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context
au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi,*.mkxl,*.mklx setf context
" Texinfo
au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
@ -1736,7 +1730,7 @@ au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
au BufNewFile,BufRead texmf.cnf setf texmf
" Tidy config
au BufNewFile,BufRead .tidyrc,tidyrc setf tidy
au BufNewFile,BufRead .tidyrc,tidyrc,tidy.conf setf tidy
" TF mud client
au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf
@ -2170,7 +2164,7 @@ au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
" Shell scripts ending in a star
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD* call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))

View File

@ -1,9 +1,11 @@
" Vim filetype plugin
" Language: awk, nawk, gawk, mawk
" Maintainer: Antonio Colombo <azc100@gmail.com>
" Last Change: 2017 Feb 17
" Language: awk, nawk, gawk, mawk
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Antonio Colombo <azc100@gmail.com>
" Last Change: 2020 Sep 28
" This plugin was prepared by Mark Sikora
" This plugin was updated as proposed by Doug Kearns
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@ -13,6 +15,42 @@ endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
let b:undo_ftplugin = "setl commentstring<"
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=:#
setlocal commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
setlocal define=function
setlocal suffixesadd+=.awk
let b:undo_ftplugin = "setl fo< com< cms< def< sua<" .
\ " | unlet! b:browsefilter"
" TODO: set this in scripts.vim?
if exists("g:awk_is_gawk")
setlocal include=@include
setlocal suffixesadd+=.gawk
if has("unix") || has("win32unix")
setlocal formatprg=gawk\ -f-\ -o/dev/stdout
let b:undo_ftplugin .= " | setl fp<"
endif
let path = system("gawk 'BEGIN { printf ENVIRON[\"AWKPATH\"] }'")
let path = substitute(path, '^\.\=:\|:\.\=$\|:\.\=:', ',,', 'g') " POSIX cwd
let path = substitute(path, ':', ',', 'g')
let &l:path = path
let b:undo_ftplugin .= " | setl inc< path<"
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Awk Source Files (*.awk,*.gawk)\t*.awk;*.gawk\n" .
\ "All Files (*.*)\t*.*\n"
endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8

View File

@ -1,7 +1,7 @@
" Vim ftplugin file
" Language: Erlang
" Author: Oscar Hellstr<EFBFBD>m <oscar@oscarh.net>
" Contributors: Ricardo Catalinas Jim<EFBFBD>nez <jimenezrick@gmail.com>
" Author: Oscar Hellström <oscar@oscarh.net>
" Contributors: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
" Eduardo Lopez (http://github.com/tapichu)
" License: Vim license
" Version: 2012/01/25

View File

@ -3,6 +3,7 @@
" Author: Steven Oliver <oliver.steven@gmail.com>
" Copyright: Copyright (c) 2009-2013 Steven Oliver
" License: You may redistribute this under the same terms as Vim itself
" Last Update: 2020 Oct 10
" --------------------------------------------------------------------------
" Only do this when not done yet for this buffer
@ -14,7 +15,7 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal softtabstop=4 shiftwidth=4 fileencoding=utf-8
setlocal softtabstop=4 shiftwidth=4
setlocal suffixesadd=.fal,.ftd
" Matchit support

View File

@ -1,13 +1,13 @@
" Vim settings file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66)
" Version: 0.50
" Last Change: 2020 Apr 20
" Patched By: Eisuke Kawashima
" Version: (v52) 2020 October 07
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-plugin from Vim
" Credits:
" Useful suggestions were made by Stefano Zacchiroli, Hendrik Merx, Ben
" Fritz, and David Barnett.
" Version 0.1 was created in September 2000 by Ajit Thakkar.
" Since then, useful suggestions and contributions have been made, in order, by:
" Stefano Zacchiroli, Hendrik Merx, Ben Fritz, David Barnett, Eisuke Kawashima,
" and Doug Kearns.
" Only do these settings when not done yet for this buffer
if exists("b:did_ftplugin")
@ -119,7 +119,7 @@ if !exists("b:match_words")
endif
" File filters for :browse e
if has("gui_win32") && !exists("b:browsefilter")
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Fortran Files (*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn)\t*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn\n" .
\ "All Files (*.*)\t*.*\n"
endif

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Make
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2019 Apr 02
" Last Change: 2020 Oct 16
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@ -9,10 +9,10 @@ if exists("b:did_ftplugin")
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = "setl et< sts< fo< com< cms< inc<"
let b:undo_ftplugin = "setl et< sts< sw< fo< com< cms< inc<"
" Make sure a hard tab is used, required for most make programs
setlocal noexpandtab softtabstop=0
setlocal noexpandtab softtabstop=0 shiftwidth=0
" Set 'formatoptions' to break comment lines but not other lines,
" and insert the comment leader when hitting <CR> or using "o".

View File

@ -2,7 +2,7 @@
" Language: man
" Maintainer: Jason Franklin <vim@justemail.net>
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Last Change: 2020 Jun 01
" Last Change: 2020 Oct 09
" To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file.
@ -76,7 +76,7 @@ catch /E145:/
" Ignore the error in restricted mode
endtry
func <SID>PreGetPage(cnt)
func s:PreGetPage(cnt)
if a:cnt == 0
let old_isk = &iskeyword
if &ft == 'man'
@ -99,24 +99,27 @@ func <SID>PreGetPage(cnt)
call s:GetPage('', sect, page)
endfunc
func <SID>GetCmdArg(sect, page)
if a:sect == ''
return a:page
func s:GetCmdArg(sect, page)
if empty(a:sect)
return shellescape(a:page)
endif
return s:man_sect_arg.' '.a:sect.' '.a:page
return s:man_sect_arg . ' ' . shellescape(a:sect) . ' ' . shellescape(a:page)
endfunc
func <SID>FindPage(sect, page)
let where = system("man ".s:man_find_arg.' '.s:GetCmdArg(a:sect, a:page))
if where !~ "^/"
if matchstr(where, " [^ ]*$") !~ "^ /"
return 0
endif
func s:FindPage(sect, page)
let l:cmd = printf('man %s %s', s:man_find_arg, s:GetCmdArg(a:sect, a:page))
call system(l:cmd)
if v:shell_error
return 0
endif
return 1
endfunc
func <SID>GetPage(cmdmods, ...)
func s:GetPage(cmdmods, ...)
if a:0 >= 2
let sect = a:1
let page = a:2
@ -226,7 +229,7 @@ func <SID>GetPage(cmdmods, ...)
setl noma
endfunc
func <SID>PopPage()
func s:PopPage()
if s:man_tag_depth > 0
let s:man_tag_depth = s:man_tag_depth - 1
exec "let s:man_tag_buf=s:man_tag_buf_".s:man_tag_depth

View File

@ -3,7 +3,7 @@
" Maintainer: Tom Picton <tom@tompicton.co.uk>
" Previous Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: Sun 17 Mar 2019
" Last Change: Mon, 5 October 2020
" https://github.com/tpict/vim-ftplugin-python
if exists("b:did_ftplugin") | finish | endif
@ -14,6 +14,7 @@ set cpo&vim
setlocal cinkeys-=0#
setlocal indentkeys-=0#
setlocal include=^\\s*\\(from\\\|import\\)
setlocal define=^\\s*\\(def\\\|class\\)
" For imports with leading .., append / and replace additional .s with ../
let b:grandparent_match = '^\(.\.\)\(\.*\)'
@ -38,7 +39,7 @@ setlocal comments=b:#,fb:-
setlocal commentstring=#\ %s
if has('python3')
setlocal omnifunc=python3complete#Complete
setlocal omnifunc=python3complete#Complete
elseif has('python')
setlocal omnifunc=pythoncomplete#Complete
endif
@ -115,35 +116,18 @@ endif
if !exists("g:python_recommended_style") || g:python_recommended_style != 0
" As suggested by PEP8.
setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
setlocal expandtab tabstop=4 softtabstop=4 shiftwidth=4
endif
" First time: try finding "pydoc".
if !exists('g:pydoc_executable')
if executable('pydoc')
let g:pydoc_executable = 1
else
let g:pydoc_executable = 0
endif
endif
" Windows-specific pydoc setup
if has('win32') || has('win64')
if executable('python')
" available as Tools\scripts\pydoc.py
let g:pydoc_executable = 1
else
let g:pydoc_executable = 0
endif
endif
" If "pydoc" was found use it for keywordprg.
if g:pydoc_executable
if has('win32') || has('win64')
setlocal keywordprg=python\ -m\ pydoc\
else
setlocal keywordprg=pydoc
endif
" Use pydoc for keywordprg.
" Unix users preferentially get pydoc3, then pydoc2.
" Windows doesn't have a standalone pydoc executable in $PATH by default, nor
" does it have separate python2/3 executables, so Windows users just get
" whichever version corresponds to their installed Python version.
if executable('python3')
setlocal keywordprg=python3\ -m\ pydoc
elseif executable('python')
setlocal keywordprg=python\ -m\ pydoc
endif
" Script for filetype switching to undo the local stuff we may have changed

View File

@ -1,6 +1,6 @@
" Vim filetype plugin file
" Language: RPL/2
" Maintainer: Jo<EFBFBD>l BERTRAND <rpl2@free.fr>
" Maintainer: Joël BERTRAND <rpl2@free.fr>
" Last Change: 2012 Mar 07
" Version: 0.1

View File

@ -1,13 +1,13 @@
" Vim indent file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
" Version: 47
" Last Change: 2020 Apr 20
" Patched By: Eisuke Kawashima
" Version: (v48) 2020 October 07
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-indent from Vim
" Credits:
" Useful suggestions were made, in chronological order, by:
" Albert Oliver Serra, Takuya Fujiwara and Philipp Edelmann.
" Version 0.1 was created in September 2000 by Ajit Thakkar.
" Since then, useful suggestions and contributions have been made, in order, by:
" Albert Oliver Serra, Takuya Fujiwara, Philipp Edelmann, Eisuke Kawashima,
" and Louis Cochen.
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@ -146,7 +146,7 @@ function FortranGetIndent(lnum)
\. 'type\|forall\|associate\|enum\|block\)\)\>'
let ind = ind - shiftwidth()
" Fix indent for case statement immediately after select
if prevstat =~? '\<select\s\+\(case\|type\)\>'
if prevstat =~? '\<select\s*\(case\|type\)\>'
let ind = ind + shiftwidth()
endif
endif

View File

@ -2,7 +2,7 @@
" Language: RPL/2
" Version: 0.2
" Last Change: 2017 Jun 13
" Maintainer: BERTRAND Jo<EFBFBD>l <rpl2@free.fr>
" Maintainer: BERTRAND Joël <rpl2@free.fr>
" Only load this indent file when no other was loaded.
if exists("b:did_indent")

View File

@ -1,5 +1,5 @@
"Description: Indent scheme for the tilde weblanguage
"Author: Tobias Rundstr<EFBFBD>m <tobi@tobi.nu>
"Author: Tobias Rundström <tobi@tobi.nu>
"URL: http://tilde.tildesoftware.net
"Last Change: May 8 09:15:09 CEST 2002

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: Vim script
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 Jul 19
" Last Change: 2020 Sep 27
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@ -10,7 +10,7 @@ endif
let b:did_indent = 1
setlocal indentexpr=GetVimIndent()
setlocal indentkeys+==end,=},=else,=cat,=fina,=END,0\\,0=\"\\\
setlocal indentkeys+==end,=},=else,=cat,=finall,=END,0\\,0=\"\\\
setlocal indentkeys-=0#
let b:undo_indent = "setl indentkeys< indentexpr<"
@ -93,7 +93,7 @@ function GetVimIndentIntern()
else
" A line starting with :au does not increment/decrement indent.
if prev_text !~ '^\s*au\%[tocmd]'
let i = match(prev_text, '\(^\||\)\s*\({\|\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|def\|el\%[seif]\)\>\)')
let i = match(prev_text, '\(^\||\)\s*\(export\s\+\)\?\({\|\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\|finall\%[y]\|fu\%[nction]\|def\|el\%[seif]\)\>\)')
if i >= 0
let ind += shiftwidth()
if strpart(prev_text, i, 1) == '|' && has('syntax_items')
@ -117,7 +117,7 @@ function GetVimIndentIntern()
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
" :endfun, :enddef, :else and :augroup END.
if cur_text =~ '^\s*\(ene\@!\|}\|cat\|fina\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
if cur_text =~ '^\s*\(ene\@!\|}\|cat\|finall\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
let ind = ind - shiftwidth()
endif

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: 2020 Mar 29
" Last Change: 2020 Sep 28
" 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.
@ -89,6 +89,21 @@ an 9999.75 &Help.-sep2- <Nop>
an 9999.80 &Help.&Version :version<CR>
an 9999.90 &Help.&About :intro<CR>
if exists(':tlmenu')
tlnoremenu 9999.10 &Help.&Overview<Tab><F1> <C-W>:help<CR>
tlnoremenu 9999.20 &Help.&User\ Manual <C-W>:help usr_toc<CR>
tlnoremenu 9999.30 &Help.&How-To\ Links <C-W>:help how-to<CR>
tlnoremenu <silent> 9999.40 &Help.&Find\.\.\. <C-W>:call <SID>Helpfind()<CR>
tlnoremenu 9999.45 &Help.-sep1- <Nop>
tlnoremenu 9999.50 &Help.&Credits <C-W>:help credits<CR>
tlnoremenu 9999.60 &Help.Co&pying <C-W>:help copying<CR>
tlnoremenu 9999.70 &Help.&Sponsor/Register <C-W>:help sponsor<CR>
tlnoremenu 9999.70 &Help.O&rphans <C-W>:help kcc<CR>
tlnoremenu 9999.75 &Help.-sep2- <Nop>
tlnoremenu 9999.80 &Help.&Version <C-W>:version<CR>
tlnoremenu 9999.90 &Help.&About <C-W>:intro<CR>
endif
fun! s:Helpfind()
if !exists("g:menutrans_help_dialog")
let g:menutrans_help_dialog = "Enter a command or word to find help on:\n\nPrepend i_ for Input mode commands (e.g.: i_CTRL-X)\nPrepend c_ for command-line editing commands (e.g.: c_<Del>)\nPrepend ' for an option name (e.g.: 'shiftwidth')"

View File

@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 Sep 10
" Last Change: 2020 Oct 27
" If there already is an option window, jump to that one.
let buf = bufnr('option-window')
@ -617,7 +617,7 @@ call <SID>AddOption("mousemodel", gettext("\"extend\", \"popup\" or \"popup_setp
call <SID>OptionG("mousem", &mousem)
call <SID>AddOption("mousetime", gettext("maximum time in msec to recognize a double-click"))
call append("$", " \tset mouset=" . &mouset)
call <SID>AddOption("ttymouse", gettext("\"xterm\", \"xterm2\", \"dec\" or \"netterm\"; type of mouse"))
call <SID>AddOption("ttymouse", gettext("\"xterm\", \"xterm2\", \"sgr\", etc.; type of mouse"))
call <SID>OptionG("ttym", &ttym)
if has("mouseshape")
call <SID>AddOption("mouseshape", gettext("what the mouse pointer looks like in different modes"))
@ -689,10 +689,6 @@ if has("gui")
call append("$", " \tset bexpr=" . &bexpr)
endif
endif
if exists("+macatsui")
call <SID>AddOption("macatsui", gettext("use ATSUI text drawing; disable to avoid display problems"))
call <SID>OptionG("macatsui", &macatsui)
endif
endif
if has("printer")
@ -791,7 +787,7 @@ call <SID>BinOptionL("mod")
call <SID>AddOption("readonly", gettext("buffer is not to be written"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>BinOptionL("ro")
call <SID>AddOption("modifiable", gettext("changes to the text are not possible"))
call <SID>AddOption("modifiable", gettext("changes to the text are possible"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>BinOptionL("ma")
call <SID>AddOption("textwidth", gettext("line length above which to break a line"))
@ -852,7 +848,7 @@ if has("digraphs")
endif
call <SID>AddOption("tildeop", gettext("the \"~\" command behaves like an operator"))
call <SID>BinOptionG("top", &top)
call <SID>AddOption("operatorfunc", gettext("function called for the\"g@\" operator"))
call <SID>AddOption("operatorfunc", gettext("function called for the \"g@\" operator"))
call <SID>OptionG("opfunc", &opfunc)
call <SID>AddOption("showmatch", gettext("when inserting a bracket, briefly jump to its match"))
call <SID>BinOptionG("sm", &sm)
@ -863,7 +859,7 @@ call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("mps")
call <SID>AddOption("joinspaces", gettext("use two spaces after '.' when joining a line"))
call <SID>BinOptionG("js", &js)
call <SID>AddOption("nrformats", gettext("\"alpha\", \"octal\" and/or \"hex\"; number formats recognized for\nCTRL-A and CTRL-X commands"))
call <SID>AddOption("nrformats", gettext("\"alpha\", \"octal\", \"hex\", \"bin\" and/or \"unsigned\"; number formats\nrecognized for CTRL-A and CTRL-X commands"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("nf")
@ -938,7 +934,7 @@ endif
if has("folding")
call <SID>Header(gettext("folding"))
call <SID>AddOption("foldenable", gettext("set to display all folds open"))
call <SID>AddOption("foldenable", gettext("unset to display all folds open"))
call append("$", "\t" .. s:local_to_window)
call <SID>BinOptionL("fen")
call <SID>AddOption("foldlevel", gettext("folds with a level higher than this number will be closed"))
@ -961,7 +957,7 @@ if has("folding")
call <SID>OptionL("fml")
call <SID>AddOption("commentstring", gettext("template for comments; used to put the marker in"))
call <SID>OptionL("cms")
call <SID>AddOption("foldmethod", gettext("folding type: \"manual\", \"indent\", \"expr\", \"marker\" or \"syntax\""))
call <SID>AddOption("foldmethod", gettext("folding type: \"manual\", \"indent\", \"expr\", \"marker\",\n\"syntax\" or \"diff\""))
call append("$", "\t" .. s:local_to_window)
call <SID>OptionL("fdm")
call <SID>AddOption("foldexpr", gettext("expression used when 'foldmethod' is \"expr\""))
@ -1069,7 +1065,7 @@ call <SID>BinOptionG("fs", &fs)
call <SID>AddOption("shortname", gettext("use 8.3 file names"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>BinOptionL("sn")
call <SID>AddOption("cryptmethod", gettext("encryption method for file writing: zip or blowfish"))
call <SID>AddOption("cryptmethod", gettext("encryption method for file writing: zip, blowfish or blowfish2"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("cm")
@ -1093,7 +1089,7 @@ call append("$", " \tset mmt=" . &mmt)
call <SID>Header(gettext("command line editing"))
call <SID>AddOption("history", gettext("how many command lines are remembered "))
call <SID>AddOption("history", gettext("how many command lines are remembered"))
call append("$", " \tset hi=" . &hi)
call <SID>AddOption("wildchar", gettext("key that triggers command-line expansion"))
call append("$", " \tset wc=" . &wc)
@ -1187,19 +1183,12 @@ if has("quickfix")
endif
if has("win32") || has("osfiletype")
if has("win32")
call <SID>Header(gettext("system specific"))
if has("osfiletype")
call <SID>AddOption("osfiletype", gettext("OS-specific information about the type of file"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("oft")
endif
if has("win32")
call <SID>AddOption("shellslash", gettext("use forward slashes in file names; for Unix-like shells"))
call <SID>BinOptionG("ssl", &ssl)
call <SID>AddOption("completeslash", gettext("specifies slash/backslash used for completion"))
call <SID>OptionG("csl", &csl)
endif
call <SID>AddOption("shellslash", gettext("use forward slashes in file names; for Unix-like shells"))
call <SID>BinOptionG("ssl", &ssl)
call <SID>AddOption("completeslash", gettext("specifies slash/backslash used for completion"))
call <SID>OptionG("csl", &csl)
endif
@ -1236,12 +1225,6 @@ if has("rightleft")
call <SID>AddOption("hkmapp", gettext("use phonetic Hebrew keyboard mapping"))
call <SID>BinOptionG("hkp", &hkp)
endif
if has("farsi")
call <SID>AddOption("altkeymap", gettext("use Farsi as the second language when 'revins' is set"))
call <SID>BinOptionG("akm", &akm)
call <SID>AddOption("fkmap", gettext("use Farsi keyboard mapping"))
call <SID>BinOptionG("fk", &fk)
endif
if has("arabic")
call <SID>AddOption("arabic", gettext("prepare for editing Arabic text"))
call append("$", "\t" .. s:local_to_window)
@ -1284,7 +1267,7 @@ endif
call <SID>Header(gettext("multi-byte characters"))
call <SID>AddOption("encoding", gettext("character encoding used in Vim: \"latin1\", \"utf-8\"\n\"euc-jp\", \"big5\", etc."))
call <SID>AddOption("encoding", gettext("character encoding used in Vim: \"latin1\", \"utf-8\",\n\"euc-jp\", \"big5\", etc."))
call <SID>OptionG("enc", &enc)
call <SID>AddOption("fileencoding", gettext("character encoding for the current file"))
call append("$", "\t" .. s:local_to_buffer)
@ -1310,7 +1293,7 @@ call <SID>BinOptionG("emo", &emo)
call <SID>Header(gettext("various"))
call <SID>AddOption("virtualedit", gettext("when to use virtual editing: \"block\", \"insert\" and/or \"all\""))
call <SID>AddOption("virtualedit", gettext("when to use virtual editing: \"block\", \"insert\", \"all\"\nand/or \"onemore\""))
call <SID>OptionG("ve", &ve)
call <SID>AddOption("eventignore", gettext("list of autocommand events which are to be ignored"))
call <SID>OptionG("ei", &ei)
@ -1350,7 +1333,7 @@ if has("quickfix")
call <SID>AddOption("bufhidden", gettext("what happens with a buffer when it's no longer in a window"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("bh")
call <SID>AddOption("buftype", gettext("\"\", \"nofile\", \"nowrite\" or \"quickfix\": type of buffer"))
call <SID>AddOption("buftype", gettext("empty, \"nofile\", \"nowrite\", \"quickfix\", etc.: type of buffer"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("bt")
endif

View File

@ -2,7 +2,7 @@
"
" Author: Bram Moolenaar
" Copyright: Vim license applies, see ":help license"
" Last Change: 2020 Aug 31
" Last Change: 2020 Oct 28
"
" WORK IN PROGRESS - Only the basics work
" Note: On MS-Windows you need a recent version of gdb. The one included with
@ -119,7 +119,11 @@ func s:StartDebug_internal(dict)
" call ch_logfile('debuglog', 'w')
let s:sourcewin = win_getid(winnr())
let s:startsigncolumn = &signcolumn
" Remember the old value of 'signcolumn' for each buffer that it's set in, so
" that we can restore the value for all buffers.
let b:save_signcolumn = &signcolumn
let s:signcolumn_buflist = [bufnr()]
let s:save_columns = 0
let s:allleft = 0
@ -556,8 +560,20 @@ func s:EndDebugCommon()
exe 'bwipe! ' . s:ptybuf
endif
" Restore 'signcolumn' in all buffers for which it was set.
call win_gotoid(s:sourcewin)
let &signcolumn = s:startsigncolumn
let was_buf = bufnr()
for bufnr in s:signcolumn_buflist
if bufexists(bufnr)
exe bufnr .. "buf"
if exists('b:save_signcolumn')
let &signcolumn = b:save_signcolumn
unlet b:save_signcolumn
endif
endif
endfor
exe was_buf .. "buf"
call s:DeleteCommands()
call win_gotoid(curwinid)
@ -938,6 +954,10 @@ func s:HandleCursor(msg)
exe lnum
exe 'sign unplace ' . s:pc_id
exe 'sign place ' . s:pc_id . ' line=' . lnum . ' name=debugPC priority=110 file=' . fname
if !exists('b:save_signcolumn')
let b:save_signcolumn = &signcolumn
call add(s:signcolumn_buflist, bufnr())
endif
setlocal signcolumn=yes
endif
elseif !s:stopped || fname != ''
@ -1014,7 +1034,7 @@ endfunc
func s:PlaceSign(id, subid, entry)
let nr = printf('%d.%d', a:id, a:subid)
exe 'sign place ' . s:Breakpoint2SignNumber(a:id, a:subid) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . nr . ' file=' . a:entry['fname']
exe 'sign place ' . s:Breakpoint2SignNumber(a:id, a:subid) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . nr . ' priority=110 file=' . a:entry['fname']
let a:entry['placed'] = 1
endfunc

View File

@ -20,14 +20,14 @@
if &cp || exists("g:loaded_zipPlugin")
finish
endif
let g:loaded_zipPlugin = "v30"
let g:loaded_zipPlugin = "v31"
let s:keepcpo = &cpo
set cpo&vim
" ---------------------------------------------------------------------
" Options: {{{1
if !exists("g:zipPlugin_ext")
let g:zipPlugin_ext='*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.odb,*.odc,*.odf,*.odg,*.odi,*.odm,*.odp,*.ods,*.odt,*.otc,*.otf,*.otg,*.oth,*.oti,*.otp,*.ots,*.ott,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'
let g:zipPlugin_ext='*.aar,*.apk,*.celzip,*.crtx,*.docm,*.docx,*.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,*.odb,*.odc,*.odf,*.odg,*.odi,*.odm,*.odp,*.ods,*.odt,*.otc,*.otf,*.otg,*.oth,*.oti,*.otp,*.ots,*.ott,*.oxt,*.potm,*.potx,*.ppam,*.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.wsz,*.xap,*.xlam,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'
endif
" ---------------------------------------------------------------------

View File

@ -3,7 +3,7 @@
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
" License: This file can be redistribued and/or modified under the same terms
" as Vim itself.
" Last Change: 2018-12-06
" Last Change: 2020 Oct 07
" Notes: Last synced with apache-2.2.3, version 1.x is no longer supported
" TODO: see particular FIXME's scattered through the file
" make it really linewise?
@ -42,6 +42,8 @@ syn keyword apacheOption user group
syn match apacheOption "\<valid-user\>"
syn case match
syn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK contained
" Added as suggested by Mikko Koivunalho
syn keyword apacheMethodOption BASELINE-CONTROL CHECKIN CHECKOUT LABEL MERGE MKACTIVITY MKWORKSPACE REPORT UNCHECKOUT UPDATE VERSION-CONTROL contained
syn case ignore
syn match apacheSection "<\/\=\(Directory\|DirectoryMatch\|Files\|FilesMatch\|IfModule\|IfDefine\|Location\|LocationMatch\|VirtualHost\)[^>]*>" contains=apacheAnything
syn match apacheLimitSection "<\/\=\(Limit\|LimitExcept\)[^>]*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheError

View File

@ -1,11 +1,10 @@
" Vim syntax file
" Language: GNU Assembler
" Maintainer: Erik Wognsen <erik.wognsen@gmail.com>
" Previous maintainer:
" Kevin Dahlhausen <kdahlhaus@yahoo.com>
" Last Change: 2014 Feb 04
" Thanks to Ori Avtalion for feedback on the comment markers!
" Language: GNU Assembler
" Maintainer: Doug Kearns dougkearns@gmail.com
" Previous Maintainers: Erik Wognsen <erik.wognsen@gmail.com>
" Kevin Dahlhausen <kdahlhaus@yahoo.com>
" Contributors: Ori Avtalion, Lakshay Garg
" Last Change: 2020 Oct 31
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@ -34,29 +33,49 @@ syn match asmType "\.space"
syn match asmType "\.string"
syn match asmType "\.word"
syn match asmLabel "[a-z_][a-z0-9_]*:"he=e-1
syn match asmIdentifier "[a-z_][a-z0-9_]*"
syn match asmLabel "[a-z_][a-z0-9_]*:"he=e-1
" Various #'s as defined by GAS ref manual sec 3.6.2.1
" Technically, the first decNumber def is actually octal,
" Technically, the first asmDecimal def is actually octal,
" since the value of 0-7 octal is the same as 0-7 decimal,
" I (Kevin) prefer to map it as decimal:
syn match decNumber "0\+[1-7]\=[\t\n$,; ]"
syn match decNumber "[1-9]\d*"
syn match octNumber "0[0-7][0-7]\+"
syn match hexNumber "0[xX][0-9a-fA-F]\+"
syn match binNumber "0[bB][0-1]*"
syn match asmDecimal "\<0\+[1-7]\=\>" display
syn match asmDecimal "\<[1-9]\d*\>" display
syn match asmOctal "\<0[0-7][0-7]\+\>" display
syn match asmHexadecimal "\<0[xX][0-9a-fA-F]\+\>" display
syn match asmBinary "\<0[bB][0-1]\+\>" display
syn keyword asmTodo contained TODO
syn match asmFloat "\<\d\+\.\d*\%(e[+-]\=\d\+\)\=\>" display
syn match asmFloat "\.\d\+\%(e[+-]\=\d\+\)\=\>" display
syn match asmFloat "\<\d\%(e[+-]\=\d\+\)\>" display
syn match asmFloat "[+-]\=Inf\>\|\<NaN\>" display
syn match asmFloat "\%(0[edfghprs]\)[+-]\=\d*\%(\.\d\+\)\%(e[+-]\=\d\+\)\=" display
syn match asmFloat "\%(0[edfghprs]\)[+-]\=\d\+\%(\.\d\+\)\=\%(e[+-]\=\d\+\)\=" display
" Avoid fighting the hexadecimal match for unicorn-like '0x' prefixed floats
syn match asmFloat "\%(0x\)[+-]\=\d*\%(\.\d\+\)\%(e[+-]\=\d\+\)\=" display
" Allow all characters to be escaped (and in strings) as these vary across
" architectures [See sec 3.6.1.1 Strings]
syn match asmCharacterEscape "\\." contained
syn match asmCharacter "'\\\=." contains=asmCharacterEscape
syn match asmStringEscape "\\\_." contained
syn match asmStringEscape "\\\%(\o\{3}\|00[89]\)" contained display
syn match asmStringEscape "\\x\x\+" contained display
syn region asmString start="\"" end="\"" skip="\\\\\|\\\"" contains=asmStringEscape
syn keyword asmTodo contained TODO FIXME XXX NOTE
" GAS supports one type of multi line comments:
syn region asmComment start="/\*" end="\*/" contains=asmTodo
syn region asmComment start="/\*" end="\*/" contains=asmTodo,@Spell
" GAS (undocumentedly?) supports C++ style comments. Unlike in C/C++ however,
" a backslash ending a C++ style comment does not extend the comment to the
" next line (hence the syntax region does not define 'skip="\\$"')
syn region asmComment start="//" end="$" keepend contains=asmTodo
syn region asmComment start="//" end="$" keepend contains=asmTodo,@Spell
" Line comment characters depend on the target architecture and command line
" options and some comments may double as logical line number directives or
@ -69,7 +88,7 @@ syn region asmComment start="//" end="$" keepend contains=asmTodo
" frequently used features of the most popular architectures (and also the
" non-GNU assembly languages that use this syntax file because their asm files
" are also named *.asm), the following are used as line comment characters:
syn match asmComment "[#;!|].*" contains=asmTodo
syn match asmComment "[#;!|].*" contains=asmTodo,@Spell
" Side effects of this include:
" - When `;' is used to separate statements on the same line (many targets
@ -96,35 +115,50 @@ syn match asmMacro "\.endm"
" with '.', including the GCC auto-generated '.L' labels.
syn match asmDirective "\.[A-Za-z][0-9A-Za-z-_]*"
syn case match
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
" The default methods for highlighting. Can be overridden later
hi def link asmSection Special
hi def link asmLabel Label
hi def link asmComment Comment
hi def link asmTodo Todo
hi def link asmSection Special
hi def link asmLabel Label
hi def link asmComment Comment
hi def link asmTodo Todo
hi def link asmDirective Statement
hi def link asmInclude Include
hi def link asmCond PreCondit
hi def link asmMacro Macro
hi def link asmInclude Include
hi def link asmCond PreCondit
hi def link asmMacro Macro
hi def link hexNumber Number
hi def link decNumber Number
hi def link octNumber Number
hi def link binNumber Number
if exists('g:asm_legacy_syntax_groups')
hi def link hexNumber Number
hi def link decNumber Number
hi def link octNumber Number
hi def link binNumber Number
hi def link asmHexadecimal hexNumber
hi def link asmDecimal decNumber
hi def link asmOctal octNumber
hi def link asmBinary binNumber
else
hi def link asmHexadecimal Number
hi def link asmDecimal Number
hi def link asmOctal Number
hi def link asmBinary Number
endif
hi def link asmFloat Float
hi def link asmString String
hi def link asmStringEscape Special
hi def link asmCharacter Character
hi def link asmCharacterEscape Special
hi def link asmIdentifier Identifier
hi def link asmType Type
hi def link asmType Type
let b:current_syntax = "asm"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8
" vim: nowrap sw=2 sts=2 ts=8 noet

View File

@ -1,19 +1,21 @@
" Vim syntax file
" Language: Hitachi H-8300h specific syntax for GNU Assembler
" Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com>
" Last Change: 2002 Sep 19
" Language: Hitachi H-8300h specific syntax for GNU Assembler
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com>
" Last Change: 2020 Oct 31
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
runtime! syntax/asm.vim
syn case ignore
syn match asmDirective "\.h8300[h]*"
syn match asmDirective "\.h8300[hs]n\="
"h8300[h] registers
syn match asmReg "e\=r[0-7][lh]\="
syn match asmRegister "e\=r\o[lh]\="
"h8300[h] opcodes - order is important!
syn match asmOpcode "add\.[lbw]"
@ -37,32 +39,20 @@ syn match asmOpcode "sha[lr]\.[lbw]"
syn match asmOpcode "shl[lr]\.[lbw]"
syn match asmOpcode "sub\.[lbw]"
syn match asmOpcode "xor\.[lbw]"
syn keyword asmOpcode "andc" "band" "bcc" "bclr" "bcs" "beq" "bf" "bge" "bgt"
syn keyword asmOpcode "bhi" "bhs" "biand" "bild" "bior" "bist" "bixor" "bmi"
syn keyword asmOpcode "bne" "bnot" "bnp" "bor" "bpl" "bpt" "bra" "brn" "bset"
syn keyword asmOpcode "bsr" "btst" "bst" "bt" "bvc" "bvs" "bxor" "cmp" "daa"
syn keyword asmOpcode "das" "eepmov" "eepmovw" "inc" "jmp" "jsr" "ldc" "movfpe"
syn keyword asmOpcode "movtpe" "mov" "nop" "orc" "rte" "rts" "sleep" "stc"
syn keyword asmOpcode "sub" "trapa" "xorc"
syn keyword asmOpcode andc band bcc bclr bcs beq bf bge bgt
syn keyword asmOpcode bhi bhs biand bild bior bist bixor bmi
syn keyword asmOpcode bne bnot bnp bor bpl bpt bra brn bset
syn keyword asmOpcode bsr btst bst bt bvc bvs bxor cmp daa
syn keyword asmOpcode das eepmov eepmovw inc jmp jsr ldc movfpe
syn keyword asmOpcode movtpe mov nop orc rte rts sleep stc
syn keyword asmOpcode sub trapa xorc
syn case match
" Read the general asm syntax
runtime! syntax/asm.vim
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
hi def link asmOpcode Statement
hi def link asmRegister Identifier
" My default-color overrides:
"hi asmOpcode ctermfg=yellow
"hi asmReg ctermfg=lightmagenta
hi def link asmOpcode Statement
hi def link asmRegister Identifier
let b:current_syntax = "asmh8300"
" vim: ts=8
" vim: nowrap sw=2 sts=2 ts=8 noet

View File

@ -19,7 +19,7 @@ syn match asteriskComment ";.*" contains=asteriskTodo
syn match asteriskContext "\[.\{-}\]"
syn match asteriskExten "^\s*\zsexten\s*=>\?\s*[^,]\+\ze," contains=asteriskPattern nextgroup=asteriskPriority
syn match asteriskExten "^\s*\zssame\s*=>\?\s*\ze" nextgroup=asteriskPriority
syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|\(no\)\?load\)\s*=>\?"
syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|l\?e\?switch\|\(no\)\?load\)\s*=>\?"
syn match asteriskPattern "_\(\[[[:alnum:]#*\-]\+\]\|[[:alnum:]#*]\)*\.\?" contained
syn match asteriskPattern "[^A-Za-z0-9,]\zs[[:alnum:]#*]\+\ze" contained
syn match asteriskApp ",\zs[a-zA-Z]\+\ze$"
@ -39,7 +39,7 @@ syn match asteriskVarLen "\${_\{0,2}[[:alpha:]][[:alnum:]_]*(.*)}
syn match asteriskVarLen "(\zs[[:alpha:]][[:alnum:]_]*(.\{-})\ze=" contains=asteriskVar,asteriskVarLen,asteriskExp
syn match asteriskExp "\$\[.\{-}\]" contains=asteriskVar,asteriskVarLen,asteriskExp
syn match asteriskCodecsPermit "^\s*\(allow\|disallow\)\s*=\s*.*$" contains=asteriskCodecs
syn match asteriskCodecs "\(g723\|gsm\|ulaw\|alaw\|g726\|adpcm\|slin\|lpc10\|g729\|speex\|ilbc\|all\s*$\)"
syn match asteriskCodecs "\(vp9\|vp8\|h264\|h263p\|h263\|h261\|jpeg\|opus\|g722\|g723\|gsm\|ulaw\|alaw\|g719\|g726\|g726aal2\|siren7\|siren14\|adpcm\|slin\|lpc10\|g729\|speex\|ilbc\|wav\|all\s*$\)"
syn match asteriskError "^\(type\|auth\|permit\|deny\|bindaddr\|host\)\s*=.*$"
syn match asteriskType "^\zstype=\ze\<\(peer\|user\|friend\)\>$" contains=asteriskTypeType
syn match asteriskTypeType "\<\(peer\|user\|friend\)\>" contained

View File

@ -1,7 +1,8 @@
" Vim syntax file
" Language: awk, nawk, gawk, mawk
" Maintainer: Antonio Colombo <azc100@gmail.com>
" Last Change: 2020 Aug 18
" Language: awk, nawk, gawk, mawk
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Antonio Colombo <azc100@gmail.com>
" Last Change: 2020 Aug 18
" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
" The AWK Programming Language, Addison-Wesley, 1988

View File

@ -4,7 +4,7 @@
" Maintainer: Marcin Szamotulski <profunctor@pm.me>
" Previous Maintainer: Vincent Berthoux <twinside@gmail.com>
" File Types: .cabal
" Last Change: 15 May 2018
" Last Change: 3 Oct 2020
" v1.5: Incorporated changes from
" https://github.com/sdiehl/haskell-vim-proto/blob/master/vim/syntax/cabal.vim
" Use `syn keyword` instead of `syn match`.
@ -62,11 +62,12 @@ syn keyword cabalCategory contained
\ source-repository
\ flag
\ custom-setup
\ common
syn match cabalCategoryTitle contained /[^{]*\ze{\?/
syn match cabalCategoryRegion
\ contains=cabalCategory,cabalCategoryTitle
\ nextgroup=cabalCategory skipwhite
\ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|custom-setup\)\+\s*\%(.*$\|$\)/
\ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|custom-setup\|common\)\+\s*\%(.*$\|$\)/
syn keyword cabalTruth true false
" cabalStatementRegion which limits the scope of cabalStatement keywords, this
@ -76,6 +77,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
\ default-language
\ default-extensions
\ author
\ autogen-modules
\ branch
\ bug-reports
\ build-depends
@ -110,6 +112,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
\ homepage
\ hs-source-dirs
\ hugs-options
\ import
\ include-dirs
\ includes
\ install-includes

View File

@ -61,7 +61,7 @@ syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot
syn match cssClassNameDot contained '\.'
try
syn match cssIdentifier "#[A-Za-z<EFBFBD>-<2D>_@][A-Za-z<EFBFBD>-<2D>0-9_@-]*"
syn match cssIdentifier "#[A-Za-zÀ-ÿ_@][A-Za-zÀ-ÿ0-9_@-]*"
catch /^.*/
syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
endtry
@ -649,5 +649,5 @@ endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8
" vim: ts=8

View File

@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2020 Apr 27
" Last Change: 2020 Oct 28
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization
@ -21,20 +21,20 @@ let s:cpo = &cpo
set cpo-=C
let s:supported = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
\ 'wheezy', 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'sid', 'rc-buggy',
\
\ 'trusty', 'xenial', 'bionic', 'eoan', 'focal', 'groovy', 'devel'
\ 'trusty', 'xenial', 'bionic', 'focal', 'groovy', 'hippo', 'devel'
\ ]
let s:unsupported = [
\ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze',
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
\
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
\ 'disco'
\ 'disco', 'eoan'
\ ]
let &cpo=s:cpo

View File

@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2018 Aug 11
" Last Change: 2020 Oct 26
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim
" Standard syntax initialization
@ -47,22 +47,24 @@ exe 'syn keyword debcontrolArchitecture contained '. join(s:pairs)
unlet s:kernels s:archs s:pairs
" Keep in sync with https://metadata.ftp-master.org/sections.822
" curl -q https://metadata.ftp-master.debian.org/sections.822 2>/dev/null| grep-dctrl -n --not -FSection -sSection / -
let s:sections = [
\ 'admin', 'cli-mono', 'comm', 'database', 'debian-installer', 'debug'
\, 'devel', 'doc', 'editors', 'education', 'electronics', 'embedded'
\, 'fonts', 'games', 'gnome', 'gnustep', 'gnu-r', 'golang', 'graphics'
\, 'fonts', 'games', 'gnome', 'gnu-r', 'gnustep', 'golang', 'graphics'
\, 'hamradio', 'haskell', 'httpd', 'interpreters', 'introspection'
\, 'java\%(script\)\=', 'kde', 'kernel', 'libs', 'libdevel', 'lisp'
\, 'localization', 'mail', 'math', 'metapackages', 'misc', 'net'
\, 'news', 'ocaml', 'oldlibs', 'otherosfs', 'perl', 'php', 'python'
\, 'ruby', 'rust', 'science', 'shells', 'sound', 'text', 'tex'
\, 'java', 'javascript', 'kde', 'kernel', 'libdevel', 'libs', 'lisp'
\, 'localization', 'mail', 'math', 'metapackages', 'misc', 'net', 'news'
\, 'ocaml', 'oldlibs', 'otherosfs', 'perl', 'php', 'python', 'raku'
\, 'ruby', 'rust', 'science', 'shells', 'sound', 'tasks', 'tex', 'text'
\, 'utils', 'vcs', 'video', 'web', 'x11', 'xfce', 'zope'
\ ]
syn keyword debcontrolMultiArch contained no foreign allowed same
syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+"
syn keyword debcontrolPriority contained extra important optional required standard
exe 'syn match debcontrolSection contained "\%(\%(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\|restricted\|universe\|multiverse\)/\)\=\%('.join(s:sections, '\|').'\)"'
exe 'syn match debcontrolSection contained "\%(\%(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\|restricted\|universe\|multiverse\)/\)\=\<\%('.join(s:sections, '\|').'\)\>"'
syn keyword debcontrolPackageType contained udeb deb
syn match debcontrolVariable contained "\${.\{-}}"
syn keyword debcontrolDmUpload contained yes

View File

@ -2,7 +2,7 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
" Last Change: 2020 Apr 27
" Last Change: 2020 Oct 26
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
" Standard syntax initialization
@ -23,20 +23,20 @@ let s:cpo = &cpo
set cpo-=C
let s:supported = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
\ 'wheezy', 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'sid', 'rc-buggy',
\
\ 'trusty', 'xenial', 'bionic', 'eoan', 'focal', 'groovy', 'devel'
\ 'trusty', 'xenial', 'bionic', 'focal', 'groovy', 'hippo', 'devel'
\ ]
let s:unsupported = [
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze',
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
\
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
\ 'disco'
\ 'disco', 'eoan'
\ ]
let &cpo=s:cpo

View File

@ -1,6 +1,6 @@
" Vim syntax file
" Language: ELF
" Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de>
" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
" Last Change: Son 22 Jun 2003 20:43:14 CEST
" Filenames: *.ab,*.am
" URL: http://www.cvjb.de/comp/vim/elf.vim

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: FORTH
" Current Maintainer: Johan Kotlinski <kotlinski@gmail.com>
" Previous Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de>
" Previous Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
" Last Change: 2018-03-29
" Filenames: *.fs,*.ft
" URL: https://github.com/jkotlinski/forth.vim

View File

@ -1,18 +1,17 @@
" Vim syntax file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
" Version: 102
" Last Change: 2020 Apr 20
" Patched By: Eisuke Kawashima
" Version: (v103) 2020 October 07
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-syntax from Vim
" Credits:
" Version 0.1 for Fortran 95 was created (April 2000) by Ajit Thakkar from the
" Fortran 77 syntax file by Mario Eusebio and Preben Guldberg.
" Version 0.1 for Fortran 95 was created in April 2000 by Ajit Thakkar from an
" older Fortran 77 syntax file by Mario Eusebio and Preben Guldberg.
" Since then, useful suggestions and contributions have been made, in order, by:
" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
" Walter Dieudonn<EFBFBD>, Alexander Wagner, Roman Bertle, Charles Rendleman,
" Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman,
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
" Stefano Zaghi, Vishnu V. Krishnan, Judica<EFBFBD>l Grasset, and Takuma Yoshida
" Stefano Zaghi, Vishnu V. Krishnan, Judicaël Grasset, Takuma Yoshida,
" Eisuke Kawashima, and André Chalella.`
if exists("b:current_syntax")
finish
@ -102,6 +101,8 @@ syn match fortranUnitHeader "\<end\>"
syn match fortranType "\<character\>"
syn match fortranType "\<complex\>"
syn match fortranType "\<integer\>"
syn match fortranType "\<real\>"
syn match fortranType "\<logical\>"
syn keyword fortranType intrinsic
syn match fortranType "\<implicit\>"
syn keyword fortranStructure dimension
@ -149,11 +150,9 @@ syn keyword fortranExtraIntrinsic algama cdabs cdcos cdexp cdlog cdsin cdsqrt cq
syn keyword fortranIntrinsic abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh
syn match fortranIntrinsic "\<len\s*[(,]"me=s+3
syn match fortranIntrinsic "\<real\s*("me=s+4
syn match fortranType "\<implicit\s\+real"
syn match fortranType "^\s*real\>"
syn match fortranIntrinsic "\<logical\s*("me=s+7
syn match fortranType "\<implicit\s\+logical"
syn match fortranType "^\s*logical\>"
syn match fortranType "\<implicit\s\+real\>"
syn match fortranType "\<implicit\s\+logical\>"
"Numbers of various sorts
" Integers
@ -168,6 +167,12 @@ syn match fortranFloatIll display "\<\d\+\.\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>"
syn match fortranFloatIll display "\<\d\+\.\d\+\([dq][-+]\=\d\+\)\=\(_\a\w*\)\=\>"
" floating point number
syn match fortranFloat display "\<\d\+\.\d\+\(e[-+]\=\d\+\)\=\(_\a\w*\)\=\>"
" binary number
syn match fortranBinary display "b["'][01]\+["']"
" octal number
syn match fortranOctal display "o["'][0-7]\+["']"
" hexadecimal number
syn match fortranHex display "z["'][0-9A-F]\+["']"
" Numbers in formats
syn match fortranFormatSpec display "\d*f\d\+\.\d\+"
syn match fortranFormatSpec display "\d*e[sn]\=\d\+\.\d\+\(e\d+\>\)\="
@ -215,7 +220,6 @@ syn match fortranUnitHeader "\<submodule\>"
syn keyword fortranUnitHeader use only contains
syn keyword fortranUnitHeader result operator assignment
syn match fortranUnitHeader "\<interface\>"
syn match fortranUnitHeader "\<recursive\>"
syn keyword fortranKeyword allocate deallocate nullify cycle exit
syn match fortranConditional "\<select\>"
syn keyword fortranConditional case default where elsewhere
@ -274,6 +278,7 @@ syn keyword fortranIntrinsic null cpu_time
syn match fortranType "\<elemental\>"
syn match fortranType "\<pure\>"
syn match fortranType "\<impure\>"
syn match fortranType "\<recursive\>"
if exists("fortran_more_precise")
syn match fortranConstructName "\(\<end\s*forall\s\+\)\@15<=\a\w*\>"
endif
@ -453,6 +458,9 @@ hi def link fortranTodo Todo
hi def link fortranContinueMark Special
hi def link fortranString String
hi def link fortranNumber Number
hi def link fortranBinary Number
hi def link fortranOctal Number
hi def link fortranHex Number
hi def link fortranOperator Operator
hi def link fortranBoolean Boolean
hi def link fortranLabelError Error

View File

@ -1,6 +1,6 @@
" VIM syntax file
" Language: groff
" Maintainer: Alejandro L<EFBFBD>pez-Valencia <dradul@yahoo.com>
" Maintainer: Alejandro López-Valencia <dradul@yahoo.com>
" URL: http://dradul.tripod.com/vim
" Last Change: 2003-05-08-12:41:13 GMT-5.

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: Haskell
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
" Last Change: 2018 Mar 29 by Marcin Szamotulski
" Last Change: 2020 Oct 4 by Marcin Szamotulski <profunctor@pm.me>
" Original Author: John Williams <jrw@pobox.com>
"
" Thanks to Ryan Crumley for suggestions and John Meacham for
@ -38,8 +38,8 @@ if exists("b:current_syntax")
endif
" (Qualified) identifiers (no default highlighting)
syn match ConId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[A-Z][a-zA-Z0-9_']*\>" contains=@NoSpell
syn match VarId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[a-z][a-zA-Z0-9_']*\>" contains=@NoSpell
syn match ConId "\(\<[A-Z][a-zA-Z0-9_']*\.\)*\<[A-Z][a-zA-Z0-9_']*\>" contains=@NoSpell
syn match VarId "\(\<[A-Z][a-zA-Z0-9_']*\.\)*\<[a-z][a-zA-Z0-9_']*\>" contains=@NoSpell
" Infix operators--most punctuation characters and any (qualified) identifier
" enclosed in `backquotes`. An operator starting with : is a constructor,
@ -49,8 +49,11 @@ syn match hsConSym "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=:[-!#$%&\*\+./<=>\?@\\^|~:]*"
syn match hsVarSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[a-z][a-zA-Z0-9_']*`"
syn match hsConSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[A-Z][a-zA-Z0-9_']*`"
" (Non-qualified) identifiers which start with # are labels
syn match hsLabel "#[a-z][a-zA-Z0-9_']*\>"
" Reserved symbols--cannot be overloaded.
syn match hsDelimiter "(\|)\|\[\|\]\|,\|;\|_\|{\|}"
syn match hsDelimiter "(\|)\|\[\|\]\|,\|;\|{\|}"
" Strings and constants
syn match hsSpecialChar contained "\\\([0-9]\+\|o[0-7]\+\|x[0-9a-fA-F]\+\|[\"\\'&\\abfnrtv]\|^[A-Z^_\[\\\]]\)"
@ -62,37 +65,41 @@ syn match hsCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=hsSpecialChar,hs
syn match hsNumber "\v<[0-9]%(_*[0-9])*>|<0[xX]_*[0-9a-fA-F]%(_*[0-9a-fA-F])*>|<0[oO]_*%(_*[0-7])*>|<0[bB]_*[01]%(_*[01])*>"
syn match hsFloat "\v<[0-9]%(_*[0-9])*\.[0-9]%(_*[0-9])*%(_*[eE][-+]?[0-9]%(_*[0-9])*)?>|<[0-9]%(_*[0-9])*_*[eE][-+]?[0-9]%(_*[0-9])*>|<0[xX]_*[0-9a-fA-F]%(_*[0-9a-fA-F])*\.[0-9a-fA-F]%(_*[0-9a-fA-F])*%(_*[pP][-+]?[0-9]%(_*[0-9])*)?>|<0[xX]_*[0-9a-fA-F]%(_*[0-9a-fA-F])*_*[pP][-+]?[0-9]%(_*[0-9])*>"
" Keyword definitions. These must be patterns instead of keywords
" because otherwise they would match as keywords at the start of a
" "literate" comment (see lhs.vim).
syn match hsModule "\<module\>"
syn match hsImport "\<import\>.*"he=s+6 contains=hsImportMod,hsLineComment,hsBlockComment,@NoSpell
syn match hsImportMod contained "\<\(as\|qualified\|hiding\)\>" contains=@NoSpell
syn match hsInfix "\<\(infix\|infixl\|infixr\)\>"
syn match hsStructure "\<\(class\|data\|deriving\|instance\|default\|where\)\>"
syn match hsTypedef "\<\(type\|newtype\)\>"
syn match hsStatement "\<\(do\|case\|of\|let\|in\)\>"
syn match hsConditional "\<\(if\|then\|else\)\>"
" Keyword definitions.
syn keyword hsModule module
syn match hsImportGroup "\<import\>.*" contains=hsImport,hsImportModuleName,hsImportMod,hsLineComment,hsBlockComment,hsImportList,@NoSpell nextgroup=hsImport
syn keyword hsImport import contained nextgroup=hsImportModuleName
syn match hsImportModuleName '\<[A-Z][A-Za-z.]*' contained
syn region hsImportList start='(' skip='([^)]\{-})' end=')' keepend contained contains=ConId,VarId,hsDelimiter,hsBlockComment,hsTypedef,@NoSpell
syn keyword hsImportMod contained as qualified hiding
syn keyword hsInfix infix infixl infixr
syn keyword hsStructure class data deriving instance default where
syn keyword hsTypedef type
syn keyword hsNewtypedef newtype
syn keyword hsTypeFam family
syn keyword hsStatement mdo do case of let in
syn keyword hsConditional if then else
" Not real keywords, but close.
if exists("hs_highlight_boolean")
" Boolean constants from the standard prelude.
syn match hsBoolean "\<\(True\|False\)\>"
syn keyword hsBoolean True False
endif
if exists("hs_highlight_types")
" Primitive types from the standard prelude and libraries.
syn match hsType "\<\(Int\|Integer\|Char\|Bool\|Float\|Double\|IO\|Void\|Addr\|Array\|String\)\>"
syn keyword hsType Int Integer Char Bool Float Double IO Void Addr Array String
endif
if exists("hs_highlight_more_types")
" Types from the standard prelude libraries.
syn match hsType "\<\(Maybe\|Either\|Ratio\|Complex\|Ordering\|IOError\|IOResult\|ExitCode\)\>"
syn match hsMaybe "\<Nothing\>"
syn match hsExitCode "\<\(ExitSuccess\)\>"
syn match hsOrdering "\<\(GT\|LT\|EQ\)\>"
syn keyword hsType Maybe Either Ratio Complex Ordering IOError IOResult ExitCode
syn keyword hsMaybe Nothing
syn keyword hsExitCode ExitSuccess
syn keyword hsOrdering GT LT EQ
endif
if exists("hs_highlight_debug")
" Debugging functions from the standard prelude.
syn match hsDebug "\<\(undefined\|error\|trace\)\>"
syn keyword hsDebug undefined error trace
endif
@ -133,12 +140,14 @@ hi def link hsImportMod hsImport
hi def link hsInfix PreProc
hi def link hsStructure Structure
hi def link hsStatement Statement
hi def link hsConditional Conditional
hi def link hsSpecialChar SpecialChar
hi def link hsConditional Conditional
hi def link hsSpecialChar SpecialChar
hi def link hsTypedef Typedef
hi def link hsNewtypedef Typedef
hi def link hsVarSym hsOperator
hi def link hsConSym hsOperator
hi def link hsOperator Operator
hi def link hsTypeFam Structure
if exists("hs_highlight_delimiters")
" Some people find this highlighting distracting.
hi def link hsDelimiter Delimiter
@ -160,22 +169,22 @@ hi def link hsMaybe hsEnumConst
hi def link hsOrdering hsEnumConst
hi def link hsEnumConst Constant
hi def link hsDebug Debug
hi def link hsLabel Special
hi def link cCppString hsString
hi def link cCommentStart hsComment
hi def link cCommentError hsError
hi def link cCommentStartError hsError
hi def link cInclude Include
hi def link cPreProc PreProc
hi def link cDefine Macro
hi def link cIncluded hsString
hi def link cError Error
hi def link cPreCondit PreCondit
hi def link cComment Comment
hi def link cCppSkip cCppOut
hi def link cCppOut2 cCppOut
hi def link cCppOut Comment
hi def link cCppString hsString
hi def link cCommentStart hsComment
hi def link cCommentError hsError
hi def link cCommentStartError hsError
hi def link cInclude Include
hi def link cPreProc PreProc
hi def link cDefine Macro
hi def link cIncluded hsString
hi def link cError Error
hi def link cPreCondit PreCondit
hi def link cComment Comment
hi def link cCppSkip cCppOut
hi def link cCppOut2 cCppOut
hi def link cCppOut Comment
let b:current_syntax = "haskell"

View File

@ -1,10 +1,9 @@
" Vim syntax file
" Language: IA-64 (Itanium) assembly language
" Maintainer: Parth Malwankar <pmalwankar@yahoo.com>
" URL: http://www.geocities.com/pmalwankar (Home Page with link to my Vim page)
" http://www.geocities.com/pmalwankar/vim.htm (for VIM)
" File Version: 0.7
" Last Change: 2006 Sep 08
" Language: IA-64 (Itanium) assembly language
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Parth Malwankar <pmalwankar@yahoo.com>
" File Version: 0.8
" Last Change: 2020 Sep 25
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@ -15,16 +14,16 @@ endif
"ignore case for assembly
syn case ignore
" Identifier Keyword characters (defines \k)
setlocal iskeyword=@,48-57,#,$,.,:,?,@-@,_,~
syn sync minlines=5
" Read the MASM syntax to start with
" This is needed as both IA-64 as well as IA-32 instructions are supported
source <sfile>:p:h/masm.vim
syn region ia64Comment start="//" end="$" contains=ia64Todo
" Identifier Keyword characters (defines \k)
syn iskeyword @,48-57,#,$,.,:,?,@-@,_,~
syn region ia64Comment start="//" end="$" contains=ia64Todo
syn region ia64Comment start="/\*" end="\*/" contains=ia64Todo
syn match ia64Identifier "[a-zA-Z_$][a-zA-Z0-9_$]*"
@ -266,22 +265,22 @@ syn match ia64data "stringz\=\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.ls
"put masm groups with our groups
hi def link masmOperator ia64operator
hi def link masmDirective ia64Directive
hi def link masmOpcode ia64Opcode
hi def link masmOpcode ia64Opcode
hi def link masmIdentifier ia64Identifier
hi def link masmFloat ia64Float
hi def link masmFloat ia64Float
"ia64 specific stuff
hi def link ia64Label Define
hi def link ia64Comment Comment
hi def link ia64Label Define
hi def link ia64Comment Comment
hi def link ia64Directive Type
hi def link ia64opcode Statement
hi def link ia64opcode Statement
hi def link ia64registers Operator
hi def link ia64string String
hi def link ia64string String
hi def link ia64Hex Number
hi def link ia64Binary Number
hi def link ia64Octal Number
hi def link ia64Float Float
hi def link ia64Decimal Number
hi def link ia64Binary Number
hi def link ia64Octal Number
hi def link ia64Float Float
hi def link ia64Decimal Number
hi def link ia64Identifier Identifier
hi def link ia64data Type
hi def link ia64delimiter Delimiter

View File

@ -1,6 +1,6 @@
" Vim syntax file
" Language: initng .i files
" Maintainer: Elan Ruusam<EFBFBD>e <glen@pld-linux.org>
" Maintainer: Elan Ruusamäe <glen@pld-linux.org>
" URL: http://glen.alkohol.ee/pld/initng/
" License: GPL v2
" Version: 0.13

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: Inno Setup File (iss file) and My InnoSetup extension
" Maintainer: Jason Mills (jmills@cs.mun.ca)
" Previous Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com)
" Previous Maintainer: Dominique Stéphan (dominique@mggen.com)
" Last Change: 2019 Sep 27
"
" Todo:

View File

@ -2,14 +2,13 @@
" Language: less
" Maintainer: Alessandro Vioni <jenoma@gmail.com>
" URL: https://github.com/genoma/vim-less
" Last Change: 2014 November 24
" Last Change: 2020 Sep 29
if exists("b:current_syntax")
finish
endif
runtime! syntax/css.vim
runtime! after/syntax/css.vim
syn case ignore

View File

@ -1,6 +1,6 @@
" Vim syntax file
" Language: Lout
" Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de>
" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
" Last Change: So 12 Feb 2012 15:15:03 CET
" Filenames: *.lout,*.lt
" URL: http://www.cvjb.de/comp/vim/lout.vim

View File

@ -4,7 +4,7 @@
" Previous Maintainer: SungHyun Nam <goweol@gmail.com>
" Previous Maintainer: Gautam H. Mudunuri <gmudunur@informatica.com>
" Version Info:
" Last Change: 2020 Apr 30
" Last Change: 2020 Sep 19
" Additional highlighting by Johannes Tanzler <johannes.tanzler@aon.at>:
" * manSubHeading
@ -21,8 +21,8 @@ runtime! syntax/ctrlh.vim
syn case ignore
syn match manReference "\f\+([1-9][a-z]\=)"
syn match manSectionHeading "^[a-z][a-z -]*[a-z]$"
syn match manSubHeading "^\s\{3\}[a-z][a-z -]*[a-z]$"
syn match manSectionHeading "^\a.*$"
syn match manSubHeading "^\s\{3\}\a.*$"
syn match manOptionDesc "^\s*[+-][a-z0-9]\S*"
syn match manLongOptionDesc "^\s*--[a-z0-9-]\S*"
" syn match manHistory "^[a-z].*last change.*$"

View File

@ -1,6 +1,6 @@
" Vim syntax file
" Language: MMIX
" Maintainer: Dirk H<EFBFBD>sken, <huesken@informatik.uni-tuebingen.de>
" Maintainer: Dirk Hüsken, <huesken@informatik.uni-tuebingen.de>
" Last Change: 2012 Jun 01
" (Dominique Pelle added @Spell)
" Filenames: *.mms

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: MOO
" Maintainer: Timo Frenay <timo@frenay.net>
" Last Change: 2001 Oct 06
" Last Change: 2020 Oct 19
" Note: Requires Vim 6.0 or above
" quit when a syntax file was already loaded
@ -95,7 +95,7 @@ if exists("moo_unknown_builtin_functions")
syn keyword mooKnownBuiltinFunction abs acos add_property add_verb asin atan binary_hash boot_player buffered_output_length callers caller_perms call_function ceil children chparent clear_property connected_players connected_seconds connection_name connection_option connection_options cos cosh create crypt ctime db_disk_size decode_binary delete_property delete_verb disassemble dump_database encode_binary equal eval exp floatstr floor flush_input force_input function_info idle_seconds index is_clear_property is_member is_player kill_task length listappend listdelete listen listeners listinsert listset log log10 match max max_object memory_usage min move notify object_bytes open_network_connection output_delimiters parent pass players properties property_info queued_tasks queue_info raise random read recycle renumber reset_max_object resume rindex rmatch seconds_left server_log server_version setadd setremove set_connection_option set_player_flag set_property_info set_task_perms set_verb_args set_verb_code set_verb_info shutdown sin sinh sqrt strcmp string_hash strsub substitute suspend tan tanh task_id task_stack ticks_left time tofloat toint toliteral tonum toobj tostr trunc typeof unlisten valid value_bytes value_hash verbs verb_args verb_code verb_info contained
endif
"<EFBFBD>Enclosed expressions
" Enclosed expressions
syn match mooUnenclosedError display ~[')\]|}]~
syn match mooParenthesesError display ~[';\]|}]~ contained
syn region mooParentheses start=~(~ end=~)~ transparent contains=@mooEnclosedContents,mooParenthesesError

View File

@ -1,6 +1,6 @@
" VIM syntax file
" Language: nroff/groff
" Maintainer: Pedro Alejandro L<EFBFBD>pez-Valencia <palopezv@gmail.com>
" Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
" URL: http://vorbote.wordpress.com/
" Last Change: 2012 Feb 2
"
@ -8,7 +8,7 @@
"
" ACKNOWLEDGEMENTS:
"
" My thanks to J<EFBFBD>r<EFBFBD>me Pl<EFBFBD>t <Jerome.Plut@ens.fr>, who was the
" My thanks to Jérôme Plût <Jerome.Plut@ens.fr>, who was the
" creator and maintainer of this syntax file for several years.
" May I be as good at it as he has been.
"

View File

@ -2,7 +2,7 @@
" Language: Pascal
" Version: 2.8
" Last Change: 2004/10/17 17:47:30
" Maintainer: Xavier Cr<EFBFBD>gut <xavier.cregut@enseeiht.fr>
" Maintainer: Xavier Crégut <xavier.cregut@enseeiht.fr>
" Previous Maintainer: Mario Eusebio <bio@dq.fct.unl.pt>
" Contributors: Tim Chase <tchase@csc.com>,

View File

@ -1,26 +1,36 @@
" syntax file for Protocol Buffers - Google's data interchange format
"
" Protocol Buffers - Google's data interchange format
" Copyright 2008 Google Inc. All rights reserved.
" https://developers.google.com/protocol-buffers/
"
" Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to deal
" in the Software without restriction, including without limitation the rights
" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
" copies of the Software, and to permit persons to whom the Software is
" furnished to do so, subject to the following conditions:
" Redistribution and use in source and binary forms, with or without
" modification, are permitted provided that the following conditions are
" met:
"
" The above copyright notice and this permission notice shall be included in
" all copies or substantial portions of the Software.
" * Redistributions of source code must retain the above copyright
" notice, this list of conditions and the following disclaimer.
" * Redistributions in binary form must reproduce the above
" copyright notice, this list of conditions and the following disclaimer
" in the documentation and/or other materials provided with the
" distribution.
" * Neither the name of Google Inc. nor the names of its
" contributors may be used to endorse or promote products derived from
" this software without specific prior written permission.
"
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
" THE SOFTWARE.
"
" http://code.google.com/p/protobuf/
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
" This is the Vim syntax file for Google Protocol Buffers as found at
" https://github.com/protocolbuffers/protobuf
" Last update: 2020 Oct 29
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@ -33,10 +43,10 @@ syn keyword protoTodo contained TODO FIXME XXX
syn cluster protoCommentGrp contains=protoTodo
syn keyword protoSyntax syntax import option
syn keyword protoStructure package message group
syn keyword protoStructure package message group oneof
syn keyword protoRepeat optional required repeated
syn keyword protoDefault default
syn keyword protoExtend extend extensions to max
syn keyword protoExtend extend extensions to max reserved
syn keyword protoRPC service rpc returns
syn keyword protoType int32 int64 uint32 uint64 sint32 sint64
@ -48,10 +58,10 @@ syn keyword protoBool true false
syn match protoInt /-\?\<\d\+\>/
syn match protoInt /\<0[xX]\x+\>/
syn match protoFloat /\<-\?\d*\(\.\d*\)\?/
syn region protoComment start="\/\*" end="\*\/" contains=@protoCommentGrp
syn region protoComment start="//" skip="\\$" end="$" keepend contains=@protoCommentGrp
syn region protoString start=/"/ skip=/\\./ end=/"/
syn region protoString start=/'/ skip=/\\./ end=/'/
syn region protoComment start="\/\*" end="\*\/" contains=@pbCommentGrp,@Spell
syn region protoComment start="//" skip="\\$" end="$" keepend contains=@pbCommentGrp,@Spell
syn region protoString start=/"/ skip=/\\./ end=/"/ contains=@Spell
syn region protoString start=/'/ skip=/\\./ end=/'/ contains=@Spell
hi def link protoTodo Todo

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: "Robots.txt" files
" Robots.txt files indicate to WWW robots which parts of a web site should not be accessed.
" Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com)
" Maintainer: Dominique Stéphan (dominique@mggen.com)
" URL: http://www.mggen.com/vim/syntax/robots.zip
" Last change: 2001 May 09

View File

@ -2,7 +2,7 @@
" Language: RPL/2
" Version: 0.15.15 against RPL/2 version 4.00pre7i
" Last Change: 2012 Feb 03 by Thilo Six
" Maintainer: Jo<EFBFBD>l BERTRAND <rpl2@free.fr>
" Maintainer: Joël BERTRAND <rpl2@free.fr>
" URL: http://www.makalis.fr/~bertrand/rpl2/download/vim/indent/rpl.vim
" Credits: Nothing

View File

@ -7,7 +7,7 @@
" .hlp (windows help files) use compiled rtf files
" rtf documentation at http://night.primate.wisc.edu/software/RTF/
"
" Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com)
" Maintainer: Dominique Stéphan (dominique@mggen.com)
" URL: http://www.mggen.com/vim/syntax/rtf.zip
" Last change: 2001 Mai 02

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: Apr 14, 2020
" Version: 190
" Last Change: Aug 10, 2020
" Version: 193
" 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)
@ -20,8 +20,8 @@ if getline(1) =~ '\<ksh$'
elseif getline(1) =~ '\<bash$'
let b:is_bash = 1
elseif getline(1) =~ '\<dash$'
let b:is_posix = 1
elseif !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh")
let b:is_dash = 1
elseif !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh") && !exists("g:is_dash")
let s:shell = ""
if executable("/bin/sh")
let s:shell = resolve("/bin/sh")
@ -33,7 +33,7 @@ elseif !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix"
elseif s:shell =~ 'bash$'
let b:is_bash = 1
elseif s:shell =~ 'dash$'
let b:is_posix = 1
let b:is_dash = 1
endif
unlet s:shell
endif
@ -45,7 +45,7 @@ endif
" So, when the user sets "g:is_bash", "g:is_kornshell",
" or "g:is_posix", a b:is_sh is converted into b:is_bash/b:is_kornshell,
" respectively.
if !exists("b:is_kornshell") && !exists("b:is_bash")
if !exists("b:is_kornshell") && !exists("b:is_bash") && !exists("b:is_dash")
if exists("g:is_posix") && !exists("g:is_kornshell")
let g:is_kornshell= g:is_posix
endif
@ -59,11 +59,21 @@ if !exists("b:is_kornshell") && !exists("b:is_bash")
if exists("b:is_sh")
unlet b:is_sh
endif
elseif exists("g:is_dash")
let b:is_dash= 1
if exists("b:is_sh")
unlet b:is_sh
endif
else
let b:is_sh= 1
endif
endif
" if b:is_dash, set b:is_posix too
if exists("b:is_dash")
let b:is_posix= 1
endif
" set up default g:sh_fold_enabled {{{1
" ================================
if !exists("g:sh_fold_enabled")
@ -133,7 +143,7 @@ syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefS
" COMBAK: removing shEscape fromshDblQuoteList fails ksh04:43
syn cluster shDblQuoteList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shPosnParm,shCtrlSeq,shSpecial,shSpecialDQ
syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPSR,shDerefPPS
syn cluster shDerefVarList contains=shDerefOff,shDerefOp,shDerefVarArray,shDerefOpError
syn cluster shDerefVarList contains=shDerefOffset,shDerefOp,shDerefVarArray,shDerefOpError
syn cluster shEchoList contains=shArithmetic,shCommandSub,shCommandSubBQ,shDeref,shDerefSimple,shEscape,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote
syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq
syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest
@ -358,7 +368,7 @@ elseif !exists("g:sh_no_error")
endif
syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell nextgroup=shSpecialStart,shSpecialSQ
syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
syn region shDoubleQuote matchgroup=shQuote start=+"+ matchgroup=shSpecial skip=+\\"+ end=+"+ contained contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
syn region shDoubleQuote matchgroup=shQuote start=+"+ matchgroup=shSpecial skip=+\\"+ matchgroup=shQuote end=+"+ contained contains=@shDblQuoteList,shStringSpecial,@Spell nextgroup=shSpecialStart
syn match shStringSpecial "[^[:print:] \t]" contained
syn match shStringSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment
syn match shSpecialSQ "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shBkslshSnglQuote,@shNoZSList
@ -424,6 +434,9 @@ if exists("b:is_bash")
syn region shSetList oneline matchgroup=shSet start="\<\%(set\|unset\)\>[/a-zA-Z_]\@!" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList nextgroup=shComment
elseif exists("b:is_kornshell") || exists("b:is_posix")
syn match shSet "^\s*set\ze\s\+$"
if exists("b:is_dash")
syn region shSetList oneline matchgroup=shSet start="\<\%(local\)\>\ze[/]\@!" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
endif
syn region shSetList oneline matchgroup=shSet start="\<\(export\)\>\ze[/]\@!" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList
syn region shSetList oneline matchgroup=shSet start="\<\%(set\|unset\>\)\ze[/a-zA-Z_]\@!" end="\ze[;|#)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList nextgroup=shComment
else
@ -471,14 +484,14 @@ endif
" bash: ${!prefix*} and ${#parameter}: {{{1
" ====================================
if exists("b:is_bash")
syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOff
syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOffset
syn match shDerefVar contained "{\@<=!\h\w*" nextgroup=@shDerefVarList
endif
if exists("b:is_kornshell")
syn match shDerefVar contained "{\@<=!\h\w*[[:alnum:]_.]*" nextgroup=@shDerefVarList
endif
syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError
syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOffset,shDerefOpError
syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp
syn match shDerefVar contained "{\@<=\h\w*" nextgroup=@shDerefVarList
syn match shDerefVar contained '\d' nextgroup=@shDerefVarList
@ -502,6 +515,7 @@ syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" co
" bash : ${parameter^^pattern} Case modification
" bash : ${parameter,pattern} Case modification
" bash : ${parameter,,pattern} Case modification
" bash : ${@:start:qty} display command line arguments from start to start+qty-1 (inferred)
syn cluster shDerefPatternList contains=shDerefPattern,shDerefString
if !exists("g:sh_no_error")
syn match shDerefOpError contained ":[[:punct:]]"
@ -522,17 +536,19 @@ syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+
syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial
syn match shDerefString contained "\\["']" nextgroup=shDerefPattern
if exists("b:is_bash")
" bash : ${parameter:offset}
" bash : ${parameter:offset:length}
syn region shDerefOff contained start=':[^-=?+]' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple
syn region shDerefOff contained start=':\s-' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple
if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")
" bash ksh posix : ${parameter:offset}
" bash ksh posix : ${parameter:offset:length}
syn region shDerefOffset contained start=':[^-=?+]' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple
syn region shDerefOffset contained start=':\s-' end='\ze:' end='\ze}' contains=shDeref,shDerefSimple,shDerefEscape nextgroup=shDerefLen,shDeref,shDerefSimple
syn match shDerefLen contained ":[^}]\+" contains=shDeref,shDerefSimple,shArithmetic
endif
if exists("b:is_bash")
" bash : ${parameter//pattern/string}
" bash : ${parameter//pattern}
syn match shDerefPPS contained '/\{1,2}' nextgroup=shDerefPPSleft
syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPPSright contains=@shPPSLeftList
syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' end='"' nextgroup=shDerefPPSright contains=@shPPSLeftList
syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shPPSRightList
" bash : ${parameter/#substring/replacement}
@ -675,8 +691,8 @@ if !exists("skip_sh_syntax_inits")
hi def link bashSpecialVariables shShellVariables
hi def link bashStatement shStatement
hi def link shCharClass shSpecial
hi def link shDerefOff shDerefOp
hi def link shDerefLen shDerefOff
hi def link shDerefOffset shDerefOp
hi def link shDerefLen shDerefOffset
endif
if exists("b:is_kornshell") || exists("b:is_posix")
hi def link kshSpecialVariables shShellVariables

View File

@ -1,7 +1,7 @@
" Vim syntax file
" This file works only for Vim6.x
" Language: Tilde
" Maintainer: Tobias Rundstr<EFBFBD>m <tobi@tildesoftware.net>
" Maintainer: Tobias Rundström <tobi@tildesoftware.net>
" URL: http://www.tildesoftware.net
" CVS: $Id: tilde.vim,v 1.1 2004/06/13 19:31:51 vimboss Exp $

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: TypeScript and TypeScriptReact
" Maintainer: Bram Moolenaar, Herrington Darkholme
" Last Change: 2019 Nov 30
" Last Change: 2020 Oct 27
" Based On: Herrington Darkholme's yats.vim
" Changes: See https:github.com/HerringtonDarkholme/yats.vim
" Credits: See yats.vim on github
@ -21,15 +21,14 @@ if main_syntax == 'typescript' || main_syntax == 'typescriptreact'
setlocal iskeyword+=$
" syntax cluster htmlJavaScript contains=TOP
endif
" For private field added from TypeScript 3.8
setlocal iskeyword+=#
" lowest priority on least used feature
syntax match typescriptLabel /[a-zA-Z_$]\k*:/he=e-1 contains=typescriptReserved nextgroup=@typescriptStatement skipwhite skipempty
" other keywords like return,case,yield uses containedin
syntax region typescriptBlock matchgroup=typescriptBraces start=/{/ end=/}/ contains=@typescriptStatement,@typescriptComments fold
"runtime syntax/basic/identifiers.vim
syntax cluster afterIdentifier contains=
\ typescriptDotNotation,
\ typescriptFuncCallArg,
@ -60,7 +59,56 @@ syntax region typescriptFuncCallArg contained matchgroup=typescriptPa
syntax region typescriptEventFuncCallArg contained matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptEventExpression
syntax region typescriptEventString contained start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/ contains=typescriptASCII,@events
"runtime syntax/basic/literal.vim
syntax region typescriptDestructureString
\ start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/
\ contains=typescriptASCII
\ nextgroup=typescriptDestructureAs
\ contained skipwhite skipempty
syntax cluster typescriptVariableDeclarations
\ contains=typescriptVariableDeclaration,@typescriptDestructures
syntax match typescriptVariableDeclaration /[A-Za-z_$]\k*/
\ nextgroup=typescriptTypeAnnotation,typescriptAssign
\ contained skipwhite skipempty
syntax cluster typescriptDestructureVariables contains=
\ typescriptRestOrSpread,
\ typescriptDestructureComma,
\ typescriptDestructureLabel,
\ typescriptDestructureVariable,
\ @typescriptDestructures
syntax match typescriptDestructureVariable /[A-Za-z_$]\k*/ contained
\ nextgroup=typescriptDefaultParam
\ contained skipwhite skipempty
syntax match typescriptDestructureLabel /[A-Za-z_$]\k*\ze\_s*:/
\ nextgroup=typescriptDestructureAs
\ contained skipwhite skipempty
syntax match typescriptDestructureAs /:/
\ nextgroup=typescriptDestructureVariable,@typescriptDestructures
\ contained skipwhite skipempty
syntax match typescriptDestructureComma /,/ contained
syntax cluster typescriptDestructures contains=
\ typescriptArrayDestructure,
\ typescriptObjectDestructure
syntax region typescriptArrayDestructure matchgroup=typescriptBraces
\ start=/\[/ end=/]/
\ contains=@typescriptDestructureVariables,@typescriptComments
\ nextgroup=typescriptTypeAnnotation,typescriptAssign
\ transparent contained skipwhite skipempty fold
syntax region typescriptObjectDestructure matchgroup=typescriptBraces
\ start=/{/ end=/}/
\ contains=typescriptDestructureString,@typescriptDestructureVariables,@typescriptComments
\ nextgroup=typescriptTypeAnnotation,typescriptAssign
\ transparent contained skipwhite skipempty fold
"Syntax in the JavaScript code
" String
@ -77,15 +125,15 @@ syntax region typescriptString
\ contains=typescriptSpecial,@Spell
\ extend
syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{4,5}})|c\u|.)"
syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{1,6}})|c\u|.)"
" From vim runtime
" <https://github.com/vim/vim/blob/master/runtime/syntax/javascript.vim#L48>
syntax region typescriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gimuy]\{0,5\}\s*$+ end=+/[gimuy]\{0,5\}\s*[;.,)\]}]+me=e-1 nextgroup=typescriptDotNotation oneline
syntax region typescriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gimuy]\{0,5\}\s*$+ end=+/[gimuy]\{0,5\}\s*[;.,)\]}:]+me=e-1 nextgroup=typescriptDotNotation oneline
syntax region typescriptTemplate
\ start=/`/ skip=/\\\\\|\\`\|\n/ end=/`\|$/
\ contains=typescriptTemplateSubstitution
\ contains=typescriptTemplateSubstitution,typescriptSpecial,@Spell
\ nextgroup=@typescriptSymbols
\ skipwhite skipempty
@ -100,18 +148,16 @@ syntax region typescriptArray matchgroup=typescriptBraces
syntax match typescriptNumber /\<0[bB][01][01_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
syntax match typescriptNumber /\<0[oO][0-7][0-7_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
syntax match typescriptNumber /\<0[xX][0-9a-fA-F][0-9a-fA-F_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty
syntax match typescriptNumber /\d[0-9_]*\.\d[0-9_]*\|\d[0-9_]*\|\.\d[0-9]*/
\ nextgroup=typescriptExponent,@typescriptSymbols skipwhite skipempty
syntax match typescriptExponent /[eE][+-]\=\d[0-9]*\>/
\ nextgroup=@typescriptSymbols skipwhite skipempty contained
syntax match typescriptNumber /\<\%(\d[0-9_]*\%(\.\d[0-9_]*\)\=\|\.\d[0-9_]*\)\%([eE][+-]\=\d[0-9_]*\)\=\>/
\ nextgroup=typescriptSymbols skipwhite skipempty
" runtime syntax/basic/object.vim
syntax region typescriptObjectLiteral matchgroup=typescriptBraces
\ start=/{/ end=/}/
\ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName
\ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName,typescriptObjectAsyncKeyword
\ fold contained
syntax keyword typescriptObjectAsyncKeyword async contained
syntax match typescriptObjectLabel contained /\k\+\_s*/
\ nextgroup=typescriptObjectColon,@typescriptCallImpl
\ skipwhite skipempty
@ -136,7 +182,6 @@ syntax match typescriptObjectSpread /\.\.\./ contained containedin=typescriptObj
syntax match typescriptObjectColon contained /:/ nextgroup=@typescriptValue skipwhite skipempty
"runtime syntax/basic/symbols.vim
" + - ^ ~
syntax match typescriptUnaryOp /[+\-~!]/
\ nextgroup=@typescriptValue
@ -153,10 +198,12 @@ syntax match typescriptBinaryOp contained /===\?/ nextgroup=@typescriptValue s
syntax match typescriptBinaryOp contained />\(>>=\|>>\|>=\|>\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
" 4: <<=, <<, <=, <
syntax match typescriptBinaryOp contained /<\(<=\|<\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
" 3: ||, |=, |
syntax match typescriptBinaryOp contained /|\(|\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
" 3: &&, &=, &
syntax match typescriptBinaryOp contained /&\(&\|=\)\?/ nextgroup=@typescriptValue skipwhite skipempty
" 3: ||, |=, |, ||=
syntax match typescriptBinaryOp contained /||\?=\?/ nextgroup=@typescriptValue skipwhite skipempty
" 4: &&, &=, &, &&=
syntax match typescriptBinaryOp contained /&&\?=\?/ nextgroup=@typescriptValue skipwhite skipempty
" 2: ??, ??=
syntax match typescriptBinaryOp contained /??=\?/ nextgroup=@typescriptValue skipwhite skipempty
" 2: *=, *
syntax match typescriptBinaryOp contained /\*=\?/ nextgroup=@typescriptValue skipwhite skipempty
" 2: %=, %
@ -177,11 +224,18 @@ syntax match typescriptBinaryOp contained /\*\*=\?/ nextgroup=@typescriptValue
syntax cluster typescriptSymbols contains=typescriptBinaryOp,typescriptKeywordOp,typescriptTernary,typescriptAssign,typescriptCastKeyword
" runtime syntax/basic/reserved.vim
"runtime syntax/basic/keyword.vim
"Import
syntax keyword typescriptImport from as import
syntax keyword typescriptImport from as
syntax keyword typescriptImport import
\ nextgroup=typescriptImportType
\ skipwhite
syntax keyword typescriptImportType type
\ contained
syntax keyword typescriptExport export
\ nextgroup=typescriptExportType
\ skipwhite
syntax match typescriptExportType /\<type\s*{\@=/
\ contained skipwhite skipempty skipnl
syntax keyword typescriptModule namespace module
"this
@ -199,16 +253,12 @@ syntax keyword typescriptIdentifier arguments this super
\ nextgroup=@afterIdentifier
syntax keyword typescriptVariable let var
\ nextgroup=typescriptVariableDeclaration
\ skipwhite skipempty skipnl
\ nextgroup=@typescriptVariableDeclarations
\ skipwhite skipempty
syntax keyword typescriptVariable const
\ nextgroup=typescriptEnum,typescriptVariableDeclaration
\ skipwhite
syntax match typescriptVariableDeclaration /[A-Za-z_$]\k*/
\ nextgroup=typescriptTypeAnnotation,typescriptAssign
\ contained skipwhite skipempty skipnl
\ nextgroup=typescriptEnum,@typescriptVariableDeclarations
\ skipwhite skipempty
syntax region typescriptEnum matchgroup=typescriptEnumKeyword start=/enum / end=/\ze{/
\ nextgroup=typescriptBlock
@ -271,7 +321,6 @@ syntax cluster typescriptAmbients contains=
\ typescriptEnumKeyword,typescriptEnum,
\ typescriptModule
"runtime syntax/basic/doc.vim
"Syntax coloring for Node.js shebang line
syntax match shellbang "^#!.*node\>"
syntax match shellbang "^#!.*iojs\>"
@ -279,8 +328,9 @@ syntax match shellbang "^#!.*iojs\>"
"JavaScript comments
syntax keyword typescriptCommentTodo TODO FIXME XXX TBD
syntax match typescriptMagicComment "@ts-\%(ignore\|expect-error\)\>"
syntax match typescriptLineComment "//.*"
\ contains=@Spell,typescriptCommentTodo,typescriptRef
\ contains=@Spell,typescriptCommentTodo,typescriptRef,typescriptMagicComment
syntax region typescriptComment
\ start="/\*" end="\*/"
\ contains=@Spell,typescriptCommentTodo extend
@ -349,24 +399,27 @@ syntax region typescriptDocLinkTag contained matchgroup=typescriptDo
syntax cluster typescriptDocs contains=typescriptDocParamType,typescriptDocNamedParamType,typescriptDocParam
if main_syntax == "typescript"
if exists("main_syntax") && main_syntax == "typescript"
syntax sync clear
syntax sync ccomment typescriptComment minlines=200
endif
syntax case match
"runtime syntax/basic/type.vim
" Types
syntax match typescriptOptionalMark /?/ contained
syntax cluster typescriptTypeParameterCluster contains=
\ typescriptTypeParameter,
\ typescriptGenericDefault
syntax region typescriptTypeParameters matchgroup=typescriptTypeBrackets
\ start=/</ end=/>/
\ contains=typescriptTypeParameter
\ contains=@typescriptTypeParameterCluster
\ contained
syntax match typescriptTypeParameter /\K\k*/
\ nextgroup=typescriptConstraint,typescriptGenericDefault
\ nextgroup=typescriptConstraint
\ contained skipwhite skipnl
syntax keyword typescriptConstraint extends
@ -409,6 +462,7 @@ syntax cluster typescriptPrimaryType contains=
\ typescriptTupleType,
\ typescriptTypeQuery,
\ typescriptStringLiteralType,
\ typescriptTemplateLiteralType,
\ typescriptReadonlyArrayKeyword,
\ typescriptAssertType
@ -417,6 +471,17 @@ syntax region typescriptStringLiteralType contained
\ nextgroup=typescriptUnion
\ skipwhite skipempty
syntax region typescriptTemplateLiteralType contained
\ start=/`/ skip=/\\\\\|\\`\|\n/ end=/`\|$/
\ contains=typescriptTemplateSubstitutionType
\ nextgroup=typescriptTypeOperator
\ skipwhite skipempty
syntax region typescriptTemplateSubstitutionType matchgroup=typescriptTemplateSB
\ start=/\${/ end=/}/
\ contains=@typescriptType
\ contained
syntax region typescriptParenthesizedType matchgroup=typescriptParens
\ start=/(/ end=/)/
\ contains=@typescriptType
@ -439,7 +504,7 @@ syntax region typescriptObjectType matchgroup=typescriptBraces
\ start=/{/ end=/}/
\ contains=@typescriptTypeMember,typescriptEndColons,@typescriptComments,typescriptAccessibilityModifier,typescriptReadonlyModifier
\ nextgroup=@typescriptTypeOperator
\ contained skipwhite fold
\ contained skipwhite skipnl fold
syntax cluster typescriptTypeMember contains=
\ @typescriptCallSignature,
@ -447,16 +512,21 @@ syntax cluster typescriptTypeMember contains=
\ typescriptIndexSignature,
\ @typescriptMembers
syntax match typescriptTupleLable /\K\k*?\?:/
\ contained
syntax region typescriptTupleType matchgroup=typescriptBraces
\ start=/\[/ end=/\]/
\ contains=@typescriptType,@typescriptComments
\ contains=@typescriptType,@typescriptComments,typescriptRestOrSpread,typescriptTupleLable
\ contained skipwhite
syntax cluster typescriptTypeOperator
\ contains=typescriptUnion,typescriptTypeBracket
\ contains=typescriptUnion,typescriptTypeBracket,typescriptConstraint,typescriptConditionalType
syntax match typescriptUnion /|\|&/ contained nextgroup=@typescriptPrimaryType skipwhite skipempty
syntax match typescriptConditionalType /?\|:/ contained nextgroup=@typescriptPrimaryType skipwhite skipempty
syntax cluster typescriptFunctionType contains=typescriptGenericFunc,typescriptFuncType
syntax region typescriptGenericFunc matchgroup=typescriptTypeBrackets
\ start=/</ end=/>/
@ -511,6 +581,7 @@ syntax match typescriptTypeAnnotation /:/
syntax cluster typescriptParameterList contains=
\ typescriptTypeAnnotation,
\ typescriptAccessibilityModifier,
\ typescriptReadonlyModifier,
\ typescriptOptionalMark,
\ typescriptRestOrSpread,
\ typescriptFuncComma,
@ -550,10 +621,9 @@ syntax keyword typescriptReadonlyArrayKeyword readonly
\ nextgroup=@typescriptPrimaryType
\ skipwhite
" extension
if get(g:, 'yats_host_keyword', 1)
"runtime syntax/yats.vim
"runtime syntax/yats/typescript.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function Boolean
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Error EvalError
syntax keyword typescriptGlobal containedin=typescriptIdentifierName InternalError
@ -584,7 +654,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptGlobalMethod
hi def link typescriptGlobalMethod Structure
"runtime syntax/yats/es6-number.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Number nextgroup=typescriptGlobalNumberDot,typescriptFuncCallArg
syntax match typescriptGlobalNumberDot /\./ contained nextgroup=typescriptNumberStaticProp,typescriptNumberStaticMethod,typescriptProp
syntax keyword typescriptNumberStaticProp contained EPSILON MAX_SAFE_INTEGER MAX_VALUE
@ -599,7 +668,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptNumberMethod
hi def link typescriptNumberMethod Keyword
"runtime syntax/yats/es6-string.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName String nextgroup=typescriptGlobalStringDot,typescriptFuncCallArg
syntax match typescriptGlobalStringDot /\./ contained nextgroup=typescriptStringStaticMethod,typescriptProp
syntax keyword typescriptStringStaticMethod contained fromCharCode fromCodePoint raw nextgroup=typescriptFuncCallArg
@ -615,7 +683,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptStringMethod
hi def link typescriptStringMethod Keyword
"runtime syntax/yats/es6-array.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Array nextgroup=typescriptGlobalArrayDot,typescriptFuncCallArg
syntax match typescriptGlobalArrayDot /\./ contained nextgroup=typescriptArrayStaticMethod,typescriptProp
syntax keyword typescriptArrayStaticMethod contained from isArray of nextgroup=typescriptFuncCallArg
@ -629,7 +696,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptArrayMethod
hi def link typescriptArrayMethod Keyword
"runtime syntax/yats/es6-object.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Object nextgroup=typescriptGlobalObjectDot,typescriptFuncCallArg
syntax match typescriptGlobalObjectDot /\./ contained nextgroup=typescriptObjectStaticMethod,typescriptProp
syntax keyword typescriptObjectStaticMethod contained create defineProperties defineProperty nextgroup=typescriptFuncCallArg
@ -646,7 +712,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptObjectMethod
hi def link typescriptObjectMethod Keyword
"runtime syntax/yats/es6-symbol.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Symbol nextgroup=typescriptGlobalSymbolDot,typescriptFuncCallArg
syntax match typescriptGlobalSymbolDot /\./ contained nextgroup=typescriptSymbolStaticProp,typescriptSymbolStaticMethod,typescriptProp
syntax keyword typescriptSymbolStaticProp contained length iterator match replace
@ -657,13 +722,11 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptSymbolStaticMethod contained for keyFor nextgroup=typescriptFuncCallArg
hi def link typescriptSymbolStaticMethod Keyword
"runtime syntax/yats/es6-function.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function
syntax keyword typescriptFunctionMethod contained apply bind call nextgroup=typescriptFuncCallArg
syntax cluster props add=typescriptFunctionMethod
hi def link typescriptFunctionMethod Keyword
"runtime syntax/yats/es6-math.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Math nextgroup=typescriptGlobalMathDot,typescriptFuncCallArg
syntax match typescriptGlobalMathDot /\./ contained nextgroup=typescriptMathStaticProp,typescriptMathStaticMethod,typescriptProp
syntax keyword typescriptMathStaticProp contained E LN10 LN2 LOG10E LOG2E PI SQRT1_2
@ -677,7 +740,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptMathStaticMethod contained sinh sqrt tan tanh trunc nextgroup=typescriptFuncCallArg
hi def link typescriptMathStaticMethod Keyword
"runtime syntax/yats/es6-date.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Date nextgroup=typescriptGlobalDateDot,typescriptFuncCallArg
syntax match typescriptGlobalDateDot /\./ contained nextgroup=typescriptDateStaticMethod,typescriptProp
syntax keyword typescriptDateStaticMethod contained UTC now parse nextgroup=typescriptFuncCallArg
@ -699,13 +761,11 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptDateMethod
hi def link typescriptDateMethod Keyword
"runtime syntax/yats/es6-json.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName JSON nextgroup=typescriptGlobalJSONDot,typescriptFuncCallArg
syntax match typescriptGlobalJSONDot /\./ contained nextgroup=typescriptJSONStaticMethod,typescriptProp
syntax keyword typescriptJSONStaticMethod contained parse stringify nextgroup=typescriptFuncCallArg
hi def link typescriptJSONStaticMethod Keyword
"runtime syntax/yats/es6-regexp.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName RegExp nextgroup=typescriptGlobalRegExpDot,typescriptFuncCallArg
syntax match typescriptGlobalRegExpDot /\./ contained nextgroup=typescriptRegExpStaticProp,typescriptProp
syntax keyword typescriptRegExpStaticProp contained lastIndex
@ -717,7 +777,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptRegExpMethod
hi def link typescriptRegExpMethod Keyword
"runtime syntax/yats/es6-map.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Map WeakMap
syntax keyword typescriptES6MapProp contained size
syntax cluster props add=typescriptES6MapProp
@ -727,7 +786,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptES6MapMethod
hi def link typescriptES6MapMethod Keyword
"runtime syntax/yats/es6-set.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Set WeakSet
syntax keyword typescriptES6SetProp contained size
syntax cluster props add=typescriptES6SetProp
@ -737,7 +795,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptES6SetMethod
hi def link typescriptES6SetMethod Keyword
"runtime syntax/yats/es6-proxy.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Proxy
syntax keyword typescriptProxyAPI contained getOwnPropertyDescriptor getOwnPropertyNames
syntax keyword typescriptProxyAPI contained defineProperty deleteProperty freeze seal
@ -745,7 +802,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptProxyAPI contained iterate ownKeys apply construct
hi def link typescriptProxyAPI Keyword
"runtime syntax/yats/es6-promise.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Promise nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg
syntax match typescriptGlobalPromiseDot /\./ contained nextgroup=typescriptPromiseStaticMethod,typescriptProp
syntax keyword typescriptPromiseStaticMethod contained resolve reject all race nextgroup=typescriptFuncCallArg
@ -754,7 +810,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptPromiseMethod
hi def link typescriptPromiseMethod Keyword
"runtime syntax/yats/es6-reflect.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Reflect
syntax keyword typescriptReflectMethod contained apply construct defineProperty deleteProperty nextgroup=typescriptFuncCallArg
syntax keyword typescriptReflectMethod contained enumerate get getOwnPropertyDescriptor nextgroup=typescriptFuncCallArg
@ -763,14 +818,12 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptReflectMethod
hi def link typescriptReflectMethod Keyword
"runtime syntax/yats/ecma-402.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Intl
syntax keyword typescriptIntlMethod contained Collator DateTimeFormat NumberFormat nextgroup=typescriptFuncCallArg
syntax keyword typescriptIntlMethod contained PluralRules nextgroup=typescriptFuncCallArg
syntax cluster props add=typescriptIntlMethod
hi def link typescriptIntlMethod Keyword
"runtime syntax/yats/node.vim
syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName global process
syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName console Buffer
syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName module exports
@ -788,7 +841,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName afterAll
syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName expect assert
"runtime syntax/yats/web.vim
syntax keyword typescriptBOM containedin=typescriptIdentifierName AbortController
syntax keyword typescriptBOM containedin=typescriptIdentifierName AbstractWorker AnalyserNode
syntax keyword typescriptBOM containedin=typescriptIdentifierName App Apps ArrayBuffer
@ -1038,7 +1090,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptBOM containedin=typescriptIdentifierName XMLHttpRequestEventTarget
hi def link typescriptBOM Structure
"runtime syntax/yats/web-window.vim
syntax keyword typescriptBOMWindowProp containedin=typescriptIdentifierName applicationCache
syntax keyword typescriptBOMWindowProp containedin=typescriptIdentifierName closed
syntax keyword typescriptBOMWindowProp containedin=typescriptIdentifierName Components
@ -1145,7 +1196,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptBOMWindowCons containedin=typescriptIdentifierName XMLSerializer
hi def link typescriptBOMWindowCons Structure
"runtime syntax/yats/web-navigator.vim
syntax keyword typescriptBOMNavigatorProp contained battery buildID connection cookieEnabled
syntax keyword typescriptBOMNavigatorProp contained doNotTrack maxTouchPoints oscpu
syntax keyword typescriptBOMNavigatorProp contained productSub push serviceWorker
@ -1164,7 +1214,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptServiceWorkerMethod
hi def link typescriptServiceWorkerMethod Keyword
"runtime syntax/yats/web-location.vim
syntax keyword typescriptBOMLocationProp contained href protocol host hostname port
syntax keyword typescriptBOMLocationProp contained pathname search hash username password
syntax keyword typescriptBOMLocationProp contained origin
@ -1174,7 +1223,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptBOMLocationMethod
hi def link typescriptBOMLocationMethod Keyword
"runtime syntax/yats/web-history.vim
syntax keyword typescriptBOMHistoryProp contained length current next previous state
syntax keyword typescriptBOMHistoryProp contained scrollRestoration
syntax cluster props add=typescriptBOMHistoryProp
@ -1183,7 +1231,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptBOMHistoryMethod
hi def link typescriptBOMHistoryMethod Keyword
"runtime syntax/yats/web-console.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName console
syntax keyword typescriptConsoleMethod contained count dir error group groupCollapsed nextgroup=typescriptFuncCallArg
syntax keyword typescriptConsoleMethod contained groupEnd info log time timeEnd trace nextgroup=typescriptFuncCallArg
@ -1191,7 +1238,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptConsoleMethod
hi def link typescriptConsoleMethod Keyword
"runtime syntax/yats/web-xhr.vim
syntax keyword typescriptXHRGlobal containedin=typescriptIdentifierName XMLHttpRequest
hi def link typescriptXHRGlobal Structure
syntax keyword typescriptXHRProp contained onreadystatechange readyState response
@ -1204,7 +1250,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptXHRMethod
hi def link typescriptXHRMethod Keyword
"runtime syntax/yats/web-blob.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Blob BlobBuilder
syntax keyword typescriptGlobal containedin=typescriptIdentifierName File FileReader
syntax keyword typescriptGlobal containedin=typescriptIdentifierName FileReaderSync
@ -1236,7 +1281,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptURLStaticMethod contained createObjectURL revokeObjectURL nextgroup=typescriptFuncCallArg
hi def link typescriptURLStaticMethod Keyword
"runtime syntax/yats/web-crypto.vim
syntax keyword typescriptCryptoGlobal containedin=typescriptIdentifierName crypto
hi def link typescriptCryptoGlobal Structure
syntax keyword typescriptSubtleCryptoMethod contained encrypt decrypt sign verify nextgroup=typescriptFuncCallArg
@ -1250,7 +1294,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptCryptoMethod
hi def link typescriptCryptoMethod Keyword
"runtime syntax/yats/web-fetch.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Headers Request
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Response
syntax keyword typescriptGlobalMethod containedin=typescriptIdentifierName fetch nextgroup=typescriptFuncCallArg
@ -1274,7 +1317,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptResponseMethod
hi def link typescriptResponseMethod Keyword
"runtime syntax/yats/web-service-worker.vim
syntax keyword typescriptServiceWorkerProp contained controller ready
syntax cluster props add=typescriptServiceWorkerProp
hi def link typescriptServiceWorkerProp Keyword
@ -1287,7 +1329,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptCacheMethod
hi def link typescriptCacheMethod Keyword
"runtime syntax/yats/web-encoding.vim
syntax keyword typescriptEncodingGlobal containedin=typescriptIdentifierName TextEncoder
syntax keyword typescriptEncodingGlobal containedin=typescriptIdentifierName TextDecoder
hi def link typescriptEncodingGlobal Structure
@ -1298,21 +1339,18 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptEncodingMethod
hi def link typescriptEncodingMethod Keyword
"runtime syntax/yats/web-geo.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName Geolocation
syntax keyword typescriptGeolocationMethod contained getCurrentPosition watchPosition nextgroup=typescriptFuncCallArg
syntax keyword typescriptGeolocationMethod contained clearWatch nextgroup=typescriptFuncCallArg
syntax cluster props add=typescriptGeolocationMethod
hi def link typescriptGeolocationMethod Keyword
"runtime syntax/yats/web-network.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName NetworkInformation
syntax keyword typescriptBOMNetworkProp contained downlink downlinkMax effectiveType
syntax keyword typescriptBOMNetworkProp contained rtt type
syntax cluster props add=typescriptBOMNetworkProp
hi def link typescriptBOMNetworkProp Keyword
"runtime syntax/yats/web-payment.vim
syntax keyword typescriptGlobal containedin=typescriptIdentifierName PaymentRequest
syntax keyword typescriptPaymentMethod contained show abort canMakePayment nextgroup=typescriptFuncCallArg
syntax cluster props add=typescriptPaymentMethod
@ -1340,7 +1378,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptPaymentShippingOptionProp
hi def link typescriptPaymentShippingOptionProp Keyword
"runtime syntax/yats/dom-node.vim
syntax keyword typescriptDOMNodeProp contained attributes baseURI baseURIObject childNodes
syntax keyword typescriptDOMNodeProp contained firstChild lastChild localName namespaceURI
syntax keyword typescriptDOMNodeProp contained nextSibling nodeName nodePrincipal
@ -1364,7 +1401,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptDOMNodeType contained DOCUMENT_FRAGMENT_NODE NOTATION_NODE
hi def link typescriptDOMNodeType Keyword
"runtime syntax/yats/dom-elem.vim
syntax keyword typescriptDOMElemAttrs contained accessKey clientHeight clientLeft
syntax keyword typescriptDOMElemAttrs contained clientTop clientWidth id innerHTML
syntax keyword typescriptDOMElemAttrs contained length onafterscriptexecute onbeforescriptexecute
@ -1387,7 +1423,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax keyword typescriptDOMElemFuncs contained getAttribute
hi def link typescriptDOMElemFuncs Keyword
"runtime syntax/yats/dom-document.vim
syntax keyword typescriptDOMDocProp contained activeElement body cookie defaultView
syntax keyword typescriptDOMDocProp contained designMode dir domain embeds forms head
syntax keyword typescriptDOMDocProp contained images lastModified links location plugins
@ -1419,7 +1454,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptDOMDocMethod
hi def link typescriptDOMDocMethod Keyword
"runtime syntax/yats/dom-event.vim
syntax keyword typescriptDOMEventTargetMethod contained addEventListener removeEventListener nextgroup=typescriptEventFuncCallArg
syntax keyword typescriptDOMEventTargetMethod contained dispatchEvent waitUntil nextgroup=typescriptEventFuncCallArg
syntax cluster props add=typescriptDOMEventTargetMethod
@ -1480,7 +1514,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptDOMEventMethod
hi def link typescriptDOMEventMethod Keyword
"runtime syntax/yats/dom-storage.vim
syntax keyword typescriptDOMStorage contained sessionStorage localStorage
hi def link typescriptDOMStorage Keyword
syntax keyword typescriptDOMStorageProp contained length
@ -1491,7 +1524,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptDOMStorageMethod
hi def link typescriptDOMStorageMethod Keyword
"runtime syntax/yats/dom-form.vim
syntax keyword typescriptDOMFormProp contained acceptCharset action elements encoding
syntax keyword typescriptDOMFormProp contained enctype length method name target
syntax cluster props add=typescriptDOMFormProp
@ -1500,7 +1532,6 @@ if get(g:, 'yats_host_keyword', 1)
syntax cluster props add=typescriptDOMFormMethod
hi def link typescriptDOMFormMethod Keyword
"runtime syntax/yats/css.vim
syntax keyword typescriptDOMStyle contained alignContent alignItems alignSelf animation
syntax keyword typescriptDOMStyle contained animationDelay animationDirection animationDuration
syntax keyword typescriptDOMStyle contained animationFillMode animationIterationCount
@ -1575,8 +1606,6 @@ if get(g:, 'yats_host_keyword', 1)
let typescript_props = 1
"runtime syntax/yats/event.vim
syntax keyword typescriptAnimationEvent contained animationend animationiteration
syntax keyword typescriptAnimationEvent contained animationstart beginEvent endEvent
syntax keyword typescriptAnimationEvent contained repeatEvent
@ -1710,14 +1739,12 @@ if get(g:, 'yats_host_keyword', 1)
endif
" patch
"runtime syntax/basic/patch.vim
" patch for generated code
syntax keyword typescriptGlobal Promise
\ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline
syntax keyword typescriptGlobal Map WeakMap
\ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline
"runtime syntax/basic/members.vim
syntax keyword typescriptConstructor contained constructor
\ nextgroup=@typescriptCallSignature
\ skipwhite skipempty
@ -1725,7 +1752,7 @@ syntax keyword typescriptConstructor contained constructor
syntax cluster memberNextGroup contains=typescriptMemberOptionality,typescriptTypeAnnotation,@typescriptCallSignature
syntax match typescriptMember /\K\k*/
syntax match typescriptMember /#\?\K\k*/
\ nextgroup=@memberNextGroup
\ contained skipwhite
@ -1765,7 +1792,6 @@ syntax region typescriptComputedMember contained matchgroup=typescriptPropert
\ nextgroup=@memberNextGroup
\ skipwhite skipempty
"runtime syntax/basic/class.vim
"don't add typescriptMembers to nextgroup, let outer scope match it
" so we won't match abstract method outside abstract class
syntax keyword typescriptAbstract abstract
@ -1781,7 +1807,7 @@ syntax match typescriptClassName contained /\K\k*/
syntax region typescriptClassTypeParameter
\ start=/</ end=/>/
\ contains=typescriptTypeParameter
\ contains=@typescriptTypeParameterCluster
\ nextgroup=typescriptClassBlock,typescriptClassExtends
\ contained skipwhite skipnl
@ -1813,7 +1839,7 @@ syntax match typescriptInterfaceName contained /\k\+/
\ skipwhite skipnl
syntax region typescriptInterfaceTypeParameter
\ start=/</ end=/>/
\ contains=typescriptTypeParameter
\ contains=@typescriptTypeParameterCluster
\ nextgroup=typescriptObjectType,typescriptInterfaceExtends
\ contained
\ skipwhite skipnl
@ -1832,7 +1858,6 @@ syntax region typescriptInterfaceTypeArguments matchgroup=typescriptTypeBrackets
syntax match typescriptInterfaceComma /,/ contained nextgroup=typescriptInterfaceHeritage skipwhite skipnl
"runtime syntax/basic/cluster.vim
"Block VariableStatement EmptyStatement ExpressionStatement IfStatement IterationStatement ContinueStatement BreakStatement ReturnStatement WithStatement LabelledStatement SwitchStatement ThrowStatement TryStatement DebuggerStatement
syntax cluster typescriptStatement
\ contains=typescriptBlock,typescriptVariable,
@ -1872,7 +1897,6 @@ syntax cluster typescriptValue
syntax cluster typescriptEventExpression contains=typescriptArrowFuncDef,typescriptParenExp,@typescriptValue,typescriptRegexpString,@typescriptEventTypes,typescriptOperator,typescriptGlobal,jsxRegion
"runtime syntax/basic/function.vim
syntax keyword typescriptAsyncFuncKeyword async
\ nextgroup=typescriptFuncKeyword,typescriptArrowFuncDef
\ skipwhite
@ -1894,7 +1918,7 @@ syntax match typescriptFuncName contained /\K\k*/
\ skipwhite
" destructuring ({ a: ee }) =>
syntax match typescriptArrowFuncDef contained /({\_[^}]*}\(:\_[^)]\)\?)\s*=>/
syntax match typescriptArrowFuncDef contained /(\(\s*\({\_[^}]*}\|\k\+\)\(:\_[^)]\)\?,\?\)\+)\s*=>/
\ contains=typescriptArrowFuncArg,typescriptArrowFunc
\ nextgroup=@typescriptExpression,typescriptBlock
\ skipwhite skipempty
@ -1913,7 +1937,7 @@ syntax match typescriptArrowFuncDef contained /\K\k*\s*=>/
\ skipwhite skipempty
" TODO: optimize this pattern
syntax region typescriptArrowFuncDef contained start=/(\_[^)]*):/ end=/=>/
syntax region typescriptArrowFuncDef contained start=/(\_[^(^)]*):/ end=/=>/
\ contains=typescriptArrowFuncArg,typescriptArrowFunc,typescriptTypeAnnotation
\ nextgroup=@typescriptExpression,typescriptBlock
\ skipwhite skipempty keepend
@ -1925,7 +1949,7 @@ syntax region typescriptArrowFuncArg contained start=/<\|(/ end=/\ze=>
syntax region typescriptReturnAnnotation contained start=/:/ end=/{/me=e-1 contains=@typescriptType nextgroup=typescriptBlock
syntax region typescriptFuncImpl contained start=/function/ end=/{/me=e-1
syntax region typescriptFuncImpl contained start=/function\>/ end=/{/me=e-1
\ contains=typescriptFuncKeyword
\ nextgroup=typescriptBlock
@ -1941,9 +1965,8 @@ syntax region typescriptParamImpl matchgroup=typescriptParens
\ nextgroup=typescriptReturnAnnotation,typescriptBlock
\ contained skipwhite skipnl
"runtime syntax/basic/decorator.vim
syntax match typescriptDecorator /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/
\ nextgroup=typescriptArgumentList,typescriptTypeArguments
\ nextgroup=typescriptFuncCallArg,typescriptTypeArguments
\ contains=@_semantic,typescriptDotNotation
" Define the default highlighting.
@ -1957,6 +1980,7 @@ hi def link typescriptComment Comment
hi def link typescriptLineComment Comment
hi def link typescriptDocComment Comment
hi def link typescriptCommentTodo Todo
hi def link typescriptMagicComment SpecialComment
hi def link typescriptRef Include
hi def link typescriptDocNotation SpecialComment
hi def link typescriptDocTags SpecialComment
@ -1970,9 +1994,11 @@ hi def link typescriptDocParamType Type
hi def link typescriptString String
hi def link typescriptSpecial Special
hi def link typescriptStringLiteralType String
hi def link typescriptTemplateLiteralType String
hi def link typescriptStringMember String
hi def link typescriptTemplate String
hi def link typescriptEventString String
hi def link typescriptDestructureString String
hi def link typescriptASCII Special
hi def link typescriptTemplateSB Label
hi def link typescriptRegexpString String
@ -1986,6 +2012,7 @@ hi def link typescriptDefault typescriptCase
hi def link typescriptBranch Conditional
hi def link typescriptIdentifier Structure
hi def link typescriptVariable Identifier
hi def link typescriptDestructureVariable PreProc
hi def link typescriptEnumKeyword Identifier
hi def link typescriptRepeat Repeat
hi def link typescriptForOperator Repeat
@ -1997,14 +2024,17 @@ hi def link typescriptCastKeyword Special
hi def link typescriptType Type
hi def link typescriptNull Boolean
hi def link typescriptNumber Number
hi def link typescriptExponent Number
hi def link typescriptBoolean Boolean
hi def link typescriptObjectLabel typescriptLabel
hi def link typescriptDestructureLabel Function
hi def link typescriptLabel Label
hi def link typescriptTupleLable Label
hi def link typescriptStringProperty String
hi def link typescriptImport Special
hi def link typescriptImportType Special
hi def link typescriptAmbientDeclaration Special
hi def link typescriptExport Special
hi def link typescriptExportType Special
hi def link typescriptModule Special
hi def link typescriptTry Special
hi def link typescriptExceptions Special
@ -2013,6 +2043,7 @@ hi def link typescriptMember Function
hi def link typescriptMethodAccessor Operator
hi def link typescriptAsyncFuncKeyword Keyword
hi def link typescriptObjectAsyncKeyword Keyword
hi def link typescriptAsyncFor Keyword
hi def link typescriptFuncKeyword Keyword
hi def link typescriptAsyncFunc Keyword

View File

@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 8.0 script
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: July 15, 2020
" Version: 8.0-41
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" Last Change: October 06, 2020
" Version: 8.0-45
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
" Automatically generated keyword lists: {{{1
@ -19,12 +19,12 @@ 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] ba[ll] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delep dell diffg[et] dig[raphs] do dsp[lit] echom[sg] enddef eval f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] 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] sun[hide] sy tN[ext] tabe[dit] tabnew tc[l] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unl ve[rsion] vim9 vmapc[lear] wa[ll] winp[os] wundo xme xr[estore]
syn keyword vimCommand contained ab arga[dd] argu[ment] bad[d] 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] deletel delm[arks] diffo[ff] dir doau e[dit] echon endf[unction] ex files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks 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] sunme syn ta[g] tabf[ind] tabo[nly] tcd tf[irst] tln tmapc[lear] try una[bbreviate] unlo[ckvar] verb[ose] vim9script vne[w] wh[ile] wn[ext] wv[iminfo] xmenu xunme
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] 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 deletep delp diffp[atch] disa[ssemble] doaut ea el[se] endfo[r] exi[t] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] 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] sunmenu sync tab tabfir[st] tabp[revious] tch[dir] th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] uns[ilent] vert[ical] vim[grep] vs[plit] win[size] wp[revious] x[it] xnoreme xunmenu
syn keyword vimCommand contained abo[veleft] argdo au 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] deletl dep diffpu[t] dj[ump] dp earlier elsei[f] endt[ry] exp filetype fix[del] for gui helpg[rep] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] 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] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] up[date] vi[sual] vimgrepa[dd] wN[ext] winc[md] wq xa[ll] xnoremenu xwininfo
syn keyword vimCommand contained addd arge[dit] bN[ext] 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] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec em[enu] endw[hile] export filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes 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] sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] v vie[w] viu[sage] w[rite] windo wqa[ll] xmapc[lear] xprop y[ank]
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] 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] delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoe[rr] en[dif] ene[w] exu[sage] fin[d] foldc[lose] g h[elp] hi if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] messages 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 sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type
syn keyword vimCommand contained a ar[gs] argl[ocal] ba[ll] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delep dell diffg[et] dig[raphs] do dsp[lit] echom[sg] enddef eval f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] 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] sunme syn ta[g] tabf[ind] tabo[nly] tcd tf[irst] tln tmapc[lear] try una[bbreviate] unlo[ckvar] ve[rsion] vim9 vmapc[lear] wa[ll] winp[os] wundo xme xr[estore]
syn keyword vimCommand contained ab arga[dd] argu[ment] bad[d] 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] deletel delm[arks] diffo[ff] dir doau e[dit] echon endf[unction] ex files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] 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] sunmenu sync tab tabfir[st] tabp[revious] tch[dir] th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] uns[ilent] verb[ose] vim9script vne[w] wh[ile] wn[ext] wv[iminfo] xmenu xunme
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] 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 deletep delp diffp[atch] disa[ssemble] doaut ea el[se] endfo[r] exi[t] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] 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] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] up[date] vert[ical] vim[grep] vs[plit] win[size] wp[revious] x[it] xnoreme xunmenu
syn keyword vimCommand contained abo[veleft] argdo au 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] deletl dep diffpu[t] dj[ump] dp earlier elsei[f] endt[ry] exp filetype fix[del] for gui helpg[rep] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs 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] sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] v vi[sual] vimgrepa[dd] wN[ext] winc[md] wq xa[ll] xnoremenu xwininfo
syn keyword vimCommand contained addd arge[dit] bN[ext] 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] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec em[enu] endw[hile] export filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope 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 sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type unl var vie[w] viu[sage] w[rite] windo wqa[ll] xmapc[lear] xprop y[ank]
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] 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] delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoe[rr] en[dif] ene[w] exu[sage] fin[d] foldc[lose] g h[elp] hi if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] 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] sun[hide] sy tN[ext] tabe[dit] tabnew tc[l] ter[minal] tlmenu tma[p] tr[ewind] u[ndo]
syn match vimCommand contained "\<z[-+^.=]\=\>"
syn keyword vimStdPlugin contained Arguments Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Winbar XMLent XMLns
@ -78,11 +78,11 @@ syn match vimHLGroup contained "Conceal"
syn case match
" Function Names {{{2
syn keyword vimFuncName contained abs appendbufline asin assert_fails assert_notmatch balloon_gettext bufadd bufname byteidx char2nr ch_evalexpr ch_log ch_readraw cindent complete_check cosh deepcopy diff_hlID eval exists feedkeys findfile fnameescape foldtext garbagecollect getchangelist getcmdpos getcwd getftime getloclist getpos gettabinfo getwinpos glob2regpat hasmapto hlexists index inputsave isdirectory job_getchannel job_stop json_encode line listener_flush luaeval match matchend menu_info nextnonblank popup_atcursor popup_dialog popup_getoptions popup_menu popup_show prompt_setinterrupt prop_list prop_type_get pyeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setenv setpos settagstack sign_define sign_placelist sin sound_playevent split str2list strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_ignore_error test_null_job test_override test_srand_seed timer_start tr undotree wildmenumode win_execute win_gotoid winlayout winrestview winwidth
syn keyword vimFuncName contained acos argc assert_beeps assert_false assert_report balloon_show bufexists bufnr byteidxcomp ch_canread ch_evalraw ch_logfile ch_sendexpr clearmatches complete_info count delete echoraw eventhandler exp filereadable flatten fnamemodify foldtextresult get getchar getcmdtype getenv getftype getmarklist getqflist gettabvar getwinposx globpath histadd hlID input inputsecret isinf job_info join keys line2byte listener_remove map matchadd matchlist min nr2char popup_beval popup_filter_menu popup_getpos popup_move pow prompt_setprompt prop_remove prop_type_list pyxeval readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playfile sqrt str2nr strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_null_blob test_null_list test_refcount test_unknown timer_stop trim uniq winbufnr win_findbuf winheight winline winsaveview wordcount
syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true balloon_split buflisted bufwinid call ch_close ch_getbufnr ch_open ch_sendraw col confirm cscope_connection deletebufline empty executable expand filewritable float2nr foldclosed foreground getbufinfo getcharmod getcmdwintype getfontname getimstatus getmatches getreg gettabwinvar getwinposy has histdel hostname inputdialog insert islocked job_setoptions js_decode len lispindent localtime maparg matchaddpos matchstr mkdir or popup_clear popup_filter_yesno popup_hide popup_notification prevnonblank prop_add prop_type_add pum_getpos rand reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setline setreg sha256 sign_getplaced sign_unplace sort sound_stop srand strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_null_channel test_null_partial test_scrollbar test_void timer_stopall trunc values wincol win_getid win_id2tabwin winnr win_screenpos writefile
syn keyword vimFuncName contained and arglistid assert_equalfile assert_match atan browse bufload bufwinnr ceil ch_close_in ch_getjob ch_read ch_setoptions complete copy cursor did_filetype environ execute expandcmd filter floor foldclosedend funcref getbufline getcharsearch getcompletion getfperm getjumplist getmousepos getreginfo gettagstack getwinvar has_key histget iconv inputlist interrupt isnan job_start js_encode libcall list2str log mapcheck matcharg matchstrpos mode pathshorten popup_close popup_findinfo popup_list popup_setoptions printf prop_clear prop_type_change pumvisible range reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcharsearch setloclist settabvar shellescape sign_jump sign_unplacelist sound_clear spellbadword state strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_dict test_null_string test_setmouse timer_info tolower type virtcol windowsversion win_gettype win_id2win winrestcmd win_splitmove xor
syn keyword vimFuncName contained append argv assert_exception assert_notequal atan2 browsedir bufloaded byte2line changenr chdir ch_info ch_readblob ch_status complete_add cos debugbreak diff_filler escape exepath extend finddir fmod foldlevel function getbufvar getcmdline getcurpos getfsize getline getpid getregtype getwininfo glob haslocaldir histnr indent inputrestore invert items job_status json_decode libcallnr listener_add log10 mapset matchdelete max mzeval perleval popup_create popup_findpreview popup_locate popup_settext prompt_setcallback prop_find prop_type_delete py3eval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcmdpos setmatches settabwinvar shiftwidth sign_place simplify soundfold spellsuggest str2float strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_function test_option_not_set test_settime timer_pause toupper undofile visualmode
syn keyword vimFuncName contained abs appendbufline asin assert_fails assert_notmatch balloon_gettext bufadd bufname byteidx char2nr chdir ch_info ch_readblob ch_status complete_add cos debugbreak diff_filler escape exepath extend finddir fmod foldlevel function getbufvar getcmdline getcurpos getfsize getline getpid getregtype gettext getwinvar has_key histget iconv inputlist interrupt isnan job_start js_encode libcall list2str log mapcheck matcharg matchlist min nr2char popup_beval popup_filter_menu popup_getpos popup_move pow prompt_setinterrupt prop_list prop_type_get pyeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcmdpos setmatches settabwinvar shiftwidth sign_place simplify soundfold spellsuggest str2float strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_function test_option_not_set test_settime timer_pause toupper undofile visualmode win_execute winheight winnr win_splitmove
syn keyword vimFuncName contained acos argc assert_beeps assert_false assert_report balloon_show bufexists bufnr byteidxcomp charclass ch_evalexpr ch_log ch_readraw cindent complete_check cosh deepcopy diff_hlID eval exists feedkeys findfile fnameescape foldtext garbagecollect getchangelist getcmdpos getcwd getftime getloclist getpos gettabinfo getwininfo glob haslocaldir histnr indent inputrestore invert items job_status json_decode libcallnr listener_add log10 mapset matchdelete matchstr mkdir or popup_clear popup_filter_yesno popup_hide popup_notification prevnonblank prompt_setprompt prop_remove prop_type_list pyxeval readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setenv setpos settagstack sign_define sign_placelist sin sound_playevent split str2list strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_ignore_error test_null_job test_override test_srand_seed timer_start tr undotree wildmenumode win_findbuf win_id2tabwin winrestcmd winwidth
syn keyword vimFuncName contained add argidx assert_equal assert_inrange assert_true balloon_split buflisted bufwinid call ch_canread ch_evalraw ch_logfile ch_sendexpr clearmatches complete_info count delete echoraw eventhandler exp filereadable flatten fnamemodify foldtextresult get getchar getcmdtype getenv getftype getmarklist getqflist gettabvar getwinpos glob2regpat hasmapto hlexists index inputsave isdirectory job_getchannel job_stop json_encode line listener_flush luaeval match matchend matchstrpos mode pathshorten popup_close popup_findinfo popup_list popup_setoptions printf prop_add prop_type_add pum_getpos rand reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playfile sqrt str2nr strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_null_blob test_null_list test_refcount test_unknown timer_stop trim uniq winbufnr win_getid win_id2win winrestview wordcount
syn keyword vimFuncName contained and arglistid assert_equalfile assert_match atan browse bufload bufwinnr ceil ch_close ch_getbufnr ch_open ch_sendraw col confirm cscope_connection deletebufline empty executable expand filewritable float2nr foldclosed foreground getbufinfo getcharmod getcmdwintype getfontname getimstatus getmatches getreg gettabwinvar getwinposx globpath histadd hlID input inputsecret isinf job_info join keys line2byte listener_remove map matchadd matchfuzzy max mzeval perleval popup_create popup_findpreview popup_locate popup_settext prompt_getprompt prop_clear prop_type_change pumvisible range reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setline setreg sha256 sign_getplaced sign_unplace sort sound_stop srand strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_null_channel test_null_partial test_scrollbar test_void timer_stopall trunc values wincol win_gettype winlayout winsaveview writefile
syn keyword vimFuncName contained append argv assert_exception assert_notequal atan2 browsedir bufloaded byte2line changenr ch_close_in ch_getjob ch_read ch_setoptions complete copy cursor did_filetype environ execute expandcmd filter floor foldclosedend funcref getbufline getcharsearch getcompletion getfperm getjumplist getmousepos getreginfo gettagstack getwinposy has histdel hostname inputdialog insert islocked job_setoptions js_decode len lispindent localtime maparg matchaddpos matchfuzzypos menu_info nextnonblank popup_atcursor popup_dialog popup_getoptions popup_menu popup_show prompt_setcallback prop_find prop_type_delete py3eval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharsearch setloclist settabvar shellescape sign_jump sign_unplacelist sound_clear spellbadword state strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_dict test_null_string test_setmouse timer_info tolower type virtcol windowsversion win_gotoid winline win_screenpos xor
"--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
@ -236,7 +236,7 @@ endif
" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
" =========
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,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 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]\|def\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
@ -266,7 +266,7 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained
" =======================
syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
syn keyword vimUserCommand contained com[mand]
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter
syn match vimUserAttrbError contained "-\a\+\ze\s"
syn match vimUserAttrb contained "-nargs=[01*?+]" contains=vimUserAttrbKey,vimOper
syn match vimUserAttrb contained "-complete=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
@ -295,12 +295,13 @@ syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentS
syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
" Vim9 comments - TODO: might be highlighted while they don't work
syn match vim9Comment excludenl +^#[^{].*$+ contains=@vimCommentGroup,vimCommentString
syn match vim9Comment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString
syn match vim9Comment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString
syn match vim9Comment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString
" Vim9 comment inside expression
syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString
syn match vim9Comment +^\s*#[^{].*$+ contains=@vimCommentGroup,vimCommentString
syn match vim9Comment +^\s*#$+ contains=@vimCommentGroup,vimCommentString
" Environment Variables: {{{2
" =====================
@ -370,7 +371,8 @@ syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1
syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1
syn match vimFilter "^!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
syn match vimFilter contained "!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
syn match vimFilter contained "!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
syn match vimComFilter contained "|!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
" Complex Repeats: (:h complex-repeat) {{{2
" ===============
@ -386,7 +388,7 @@ syn match vimSetMod contained "&vim\=\|[!&?<]\|all&"
" Let: {{{2
" ===
syn keyword vimLet let unl[et] skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc
syn keyword vimLet let var unl[et] skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc
VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s\+\%(trim\>\)\=\s*\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$' contains=vimComment,vim9Comment
" Abbreviations: {{{2
@ -397,8 +399,9 @@ syn keyword vimAbb ab[breviate] ca[bbrev] inorea[bbrev] cnorea[bbrev] norea[bbre
" =======
syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace
syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList
syn match vimAutoCmdSfxList contained "\S*"
syn match vimAutoCmdSfxList contained "\S*" skipwhite nextgroup=vimAutoCmdMod
syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList
syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)"
" Echo And Execute: -- prefer strings! {{{2
" ================
@ -634,7 +637,7 @@ syn match vimCtrlChar "[- -]"
" Beginners - Patterns that involve ^ {{{2
" =========
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
syn match vim9LineComment +^[ \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*\\"
syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue
@ -861,6 +864,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimAutoCmdOpt vimOption
hi def link vimAutoCmd vimCommand
hi def link vimAutoEvent Type
hi def link vimAutoCmdMod Special
hi def link vimAutoSet vimCommand
hi def link vimBehaveModel vimBehave
hi def link vimBehave vimCommand

View File

@ -2,7 +2,7 @@
" This is a GENERATED FILE. Please always refer to source file at the URI below.
" Language: XKB (X Keyboard Extension) components
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
" Last Change: 2003-04-13
" Last Change: 2020 Oct 18
" URL: http://trific.ath.cx/Ftp/vim/syntax/xkb.vim
" Setup
@ -41,7 +41,7 @@ syn match xkbPhysicalKey "<\w\+>"
syn keyword xkbPreproc augment include replace
syn keyword xkbConstant False True
syn keyword xkbModif override replace
syn keyword xkbIdentifier action affect alias allowExplicit approx baseColor button clearLocks color controls cornerRadius count ctrls description driveskbd font fontSize gap group groups height indicator indicatorDrivesKeyboard interpret key keys labelColor latchToLock latchMods left level_name map maximum minimum modifier_map modifiers name offColor onColor outline preserve priority repeat row section section setMods shape slant solid symbols text top type useModMapMods virtualModifier virtualMods virtual_modifiers weight whichModState width
syn keyword xkbIdentifier action affect alias allowExplicit approx baseColor button clearLocks color controls cornerRadius count ctrls description driveskbd font fontSize gap group groups height indicator indicatorDrivesKeyboard interpret key keys labelColor latchToLock latchMods left level_name map maximum minimum modifier_map modifiers name offColor onColor outline preserve priority repeat row section setMods shape slant solid symbols text top type useModMapMods virtualModifier virtualMods virtual_modifiers weight whichModState width
syn keyword xkbFunction AnyOf ISOLock LatchGroup LatchMods LockControls LockGroup LockMods LockPointerButton MovePtr NoAction PointerButton SetControls SetGroup SetMods SetPtrDflt Terminate
syn keyword xkbTModif default hidden partial virtual
syn keyword xkbSect alphanumeric_keys alternate_group function_keys keypad_keys modifier_keys xkb_compatibility xkb_geometry xkb_keycodes xkb_keymap xkb_semantics xkb_symbols xkb_types

View File

@ -657,7 +657,7 @@ do_argfile(exarg_T *eap, int argn)
#endif
// split window or create new tab page first
if (*eap->cmd == 's' || cmdmod.tab != 0)
if (*eap->cmd == 's' || cmdmod.cmod_tab != 0)
{
if (win_split(0, 0) == FAIL)
return;
@ -878,7 +878,7 @@ do_arg_all(
alist_T *alist; // argument list to be used
buf_T *buf;
tabpage_T *tpnext;
int had_tab = cmdmod.tab;
int had_tab = cmdmod.cmod_tab;
win_T *old_curwin, *last_curwin;
tabpage_T *old_curtab, *last_curtab;
win_T *new_curwin = NULL;
@ -1116,7 +1116,7 @@ do_arg_all(
// When ":tab" was used open a new tab for a new window repeatedly.
if (had_tab > 0 && tabpage_index(NULL) <= p_tpm)
cmdmod.tab = 9999;
cmdmod.cmod_tab = 9999;
}
// Remove the "lock" on the argument list.

3
src/auto/configure vendored
View File

@ -5823,6 +5823,9 @@ $as_echo "not found" >&6; }
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${path}/libracket3m.a"; then
MZSCHEME_LIBS="${path}/libracket3m.a"
if test -f "${path}/librktio.a"; then
MZSCHEME_LIBS="${MZSCHEME_LIBS} ${path}/librktio.a"
fi
MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
elif test -f "${path}/libracket.a"; then
MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"

View File

@ -149,6 +149,7 @@ static struct event_name
{"InsertChange", EVENT_INSERTCHANGE},
{"InsertEnter", EVENT_INSERTENTER},
{"InsertLeave", EVENT_INSERTLEAVE},
{"InsertLeavePre", EVENT_INSERTLEAVEPRE},
{"InsertCharPre", EVENT_INSERTCHARPRE},
{"MenuPopup", EVENT_MENUPOPUP},
{"OptionSet", EVENT_OPTIONSET},
@ -1432,9 +1433,9 @@ aucmd_prepbuf(
// window. Expect a few side effects...
win = curwin;
aco->save_curwin = curwin;
aco->save_curwin_id = curwin->w_id;
aco->save_curbuf = curbuf;
aco->save_prevwin = prevwin;
aco->save_prevwin_id = prevwin == NULL ? 0 : prevwin->w_id;
if (win != NULL)
{
// There is a window for "buf" in the current tab page, make it the
@ -1480,7 +1481,7 @@ aucmd_prepbuf(
curwin = aucmd_win;
}
curbuf = buf;
aco->new_curwin = curwin;
aco->new_curwin_id = curwin->w_id;
set_bufref(&aco->new_curbuf, curbuf);
}
@ -1492,7 +1493,8 @@ aucmd_prepbuf(
aucmd_restbuf(
aco_save_T *aco) // structure holding saved values
{
int dummy;
int dummy;
win_T *save_curwin;
if (aco->use_aucmd_win)
{
@ -1532,19 +1534,22 @@ win_found:
(void)win_comp_pos(); // recompute window positions
unblock_autocmds();
if (win_valid(aco->save_curwin))
curwin = aco->save_curwin;
save_curwin = win_find_by_id(aco->save_curwin_id);
if (save_curwin != NULL)
curwin = save_curwin;
else
// Hmm, original window disappeared. Just use the first one.
curwin = firstwin;
if (win_valid(aco->save_prevwin))
prevwin = aco->save_prevwin;
curbuf = curwin->w_buffer;
#ifdef FEAT_JOB_CHANNEL
// May need to restore insert mode for a prompt buffer.
entering_window(curwin);
#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
#endif
curbuf = curwin->w_buffer;
vim_free(globaldir);
globaldir = aco->globaldir;
@ -1566,13 +1571,15 @@ win_found:
}
else
{
// restore curwin
if (win_valid(aco->save_curwin))
// Restore curwin. Use the window ID, a window may have been closed
// and the memory re-used for another one.
save_curwin = win_find_by_id(aco->save_curwin_id);
if (save_curwin != NULL)
{
// Restore the buffer which was previously edited by curwin, if
// it was changed, we are still the same window and the buffer is
// valid.
if (curwin == aco->new_curwin
if (curwin->w_id == aco->new_curwin_id
&& curbuf != aco->new_curbuf.br_buf
&& bufref_valid(&aco->new_curbuf)
&& aco->new_curbuf.br_buf->b_ml.ml_mfp != NULL)
@ -1587,10 +1594,9 @@ win_found:
++curbuf->b_nwindows;
}
curwin = aco->save_curwin;
curwin = save_curwin;
curbuf = curwin->w_buffer;
if (win_valid(aco->save_prevwin))
prevwin = aco->save_prevwin;
prevwin = win_find_by_id(aco->save_prevwin_id);
// In case the autocommand moves the cursor to a position that
// does not exist in curbuf.
check_cursor();

View File

@ -80,6 +80,7 @@ blob_copy(blob_T *from, typval_T *to)
len = 0;
}
to->vval.v_blob->bv_ga.ga_len = len;
to->vval.v_blob->bv_ga.ga_maxlen = len;
}
return ret;
}

View File

@ -673,7 +673,7 @@ aucmd_abort:
buf->b_nwindows = nwindows;
buf_freeall(buf, (del_buf ? BFA_DEL : 0)
+ (wipe_buf ? BFA_WIPE : 0)
+ (wipe_buf ? BFA_WIPE : 0)
+ (ignore_abort ? BFA_IGNORE_ABORT : 0));
// Autocommands may have deleted the buffer.
@ -1005,6 +1005,22 @@ free_buffer_stuff(
VIM_CLEAR(buf->b_start_fenc);
}
/*
* Free one wininfo_T.
*/
void
free_wininfo(wininfo_T *wip)
{
if (wip->wi_optset)
{
clear_winopt(&wip->wi_opt);
#ifdef FEAT_FOLDING
deleteFoldRecurse(&wip->wi_folds);
#endif
}
vim_free(wip);
}
/*
* Free the b_wininfo list for buffer "buf".
*/
@ -1017,14 +1033,7 @@ clear_wininfo(buf_T *buf)
{
wip = buf->b_wininfo;
buf->b_wininfo = wip->wi_next;
if (wip->wi_optset)
{
clear_winopt(&wip->wi_opt);
#ifdef FEAT_FOLDING
deleteFoldRecurse(&wip->wi_folds);
#endif
}
vim_free(wip);
free_wininfo(wip);
}
}
@ -1444,7 +1453,7 @@ do_buffer(
if (!forceit && bufIsChanged(buf))
{
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
if ((p_confirm || cmdmod.confirm) && p_write)
if ((p_confirm || (cmdmod.cmod_flags & CMOD_CONFIRM)) && p_write)
{
dialog_changed(buf, FALSE);
if (!bufref_valid(&bufref))
@ -1634,7 +1643,7 @@ do_buffer(
if (action == DOBUF_GOTO && !can_abandon(curbuf, forceit))
{
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
if ((p_confirm || cmdmod.confirm) && p_write)
if ((p_confirm || (cmdmod.cmod_flags & CMOD_CONFIRM)) && p_write)
{
bufref_T bufref;
@ -1689,7 +1698,7 @@ set_curbuf(buf_T *buf, int action)
bufref_T prevbufref;
setpcmark();
if (!cmdmod.keepalt)
if ((cmdmod.cmod_flags & CMOD_KEEPALT) == 0)
curwin->w_alt_fnum = curbuf->b_fnum; // remember alternate file
buflist_altfpos(curwin); // remember curpos
@ -1974,7 +1983,8 @@ buflist_new(
{
vim_free(ffname);
if (lnum != 0)
buflist_setfpos(buf, curwin, lnum, (colnr_T)0, FALSE);
buflist_setfpos(buf, (flags & BLN_NOCURWIN) ? NULL : curwin,
lnum, (colnr_T)0, FALSE);
if ((flags & BLN_NOOPT) == 0)
// copy the options now, if 'cpo' doesn't have 's' and not done
@ -2144,7 +2154,7 @@ buflist_new(
if (top_file_num < 0) // wrap around (may cause duplicates)
{
emsg(_("W14: Warning: List of file names overflow"));
if (emsg_silent == 0)
if (emsg_silent == 0 && !in_assert_fails)
{
out_flush();
ui_delay(3001L, TRUE); // make sure it is noticed
@ -2908,7 +2918,7 @@ buflist_nr2name(
void
buflist_setfpos(
buf_T *buf,
win_T *win,
win_T *win, // may be NULL when using :badd
linenr_T lnum,
colnr_T col,
int copy_options)
@ -2950,7 +2960,7 @@ buflist_setfpos(
wip->wi_fpos.lnum = lnum;
wip->wi_fpos.col = col;
}
if (copy_options)
if (copy_options && win != NULL)
{
// Save the window-specific option values.
copy_winopt(&win->w_onebuf_opt, &wip->wi_opt);
@ -2997,6 +3007,7 @@ wininfo_other_tab_diff(wininfo_T *wip)
/*
* Find info for the current window in buffer "buf".
* If not found, return the info for the most recently used window.
* When "need_options" is TRUE skip entries where wi_optset is FALSE.
* When "skip_diff_buffer" is TRUE avoid windows with 'diff' set that is in
* another tab page.
* Returns NULL when there isn't any info.
@ -3004,6 +3015,7 @@ wininfo_other_tab_diff(wininfo_T *wip)
static wininfo_T *
find_wininfo(
buf_T *buf,
int need_options,
int skip_diff_buffer UNUSED)
{
wininfo_T *wip;
@ -3013,18 +3025,25 @@ find_wininfo(
#ifdef FEAT_DIFF
&& (!skip_diff_buffer || !wininfo_other_tab_diff(wip))
#endif
)
&& (!need_options || wip->wi_optset))
break;
// 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))
if (!wininfo_other_tab_diff(wip)
&& (!need_options || wip->wi_optset
|| (wip->wi_win != NULL
&& wip->wi_win->w_buffer == buf)))
break;
}
else
@ -3050,7 +3069,7 @@ get_winopts(buf_T *buf)
clearFolding(curwin);
#endif
wip = find_wininfo(buf, TRUE);
wip = find_wininfo(buf, TRUE, TRUE);
if (wip != NULL && wip->wi_win != NULL
&& wip->wi_win != curwin && wip->wi_win->w_buffer == buf)
{
@ -3097,7 +3116,7 @@ buflist_findfpos(buf_T *buf)
wininfo_T *wip;
static pos_T no_position = {1, 0, 0};
wip = find_wininfo(buf, FALSE);
wip = find_wininfo(buf, FALSE, FALSE);
if (wip != NULL)
return &(wip->wi_fpos);
else
@ -3435,7 +3454,7 @@ setaltfname(
// Create a buffer. 'buflisted' is not set if it's a new buffer
buf = buflist_new(ffname, sfname, lnum, 0);
if (buf != NULL && !cmdmod.keepalt)
if (buf != NULL && (cmdmod.cmod_flags & CMOD_KEEPALT) == 0)
curwin->w_alt_fnum = buf->b_fnum;
return buf;
}
@ -3998,6 +4017,32 @@ free_titles(void)
#endif // FEAT_TITLE
#if defined(FEAT_STL_OPT) || defined(FEAT_GUI_TABLINE) || defined(PROTO)
/*
* Used for building in the status line.
*/
typedef struct
{
char_u *stl_start;
int stl_minwid;
int stl_maxwid;
enum {
Normal,
Empty,
Group,
Middle,
Highlight,
TabPage,
Trunc
} stl_type;
} stl_item_T;
static size_t stl_items_len = 20; // Initial value, grows as needed.
static stl_item_T *stl_items = NULL;
static int *stl_groupitem = NULL;
static stl_hlrec_T *stl_hltab = NULL;
static stl_hlrec_T *stl_tabtab = NULL;
/*
* Build a string from the status line items in "fmt".
* Return length of string in screen cells.
@ -4021,8 +4066,8 @@ build_stl_str_hl(
int use_sandbox UNUSED, // "fmt" was set insecurely, use sandbox
int fillchar,
int maxwidth,
struct stl_hlrec *hltab, // return: HL attributes (can be NULL)
struct stl_hlrec *tabtab) // return: tab page nrs (can be NULL)
stl_hlrec_T **hltab, // return: HL attributes (can be NULL)
stl_hlrec_T **tabtab) // return: tab page nrs (can be NULL)
{
linenr_T lnum;
size_t len;
@ -4050,24 +4095,7 @@ build_stl_str_hl(
int curitem;
int group_end_userhl;
int group_start_userhl;
int groupitem[STL_MAX_ITEM];
int groupdepth;
struct stl_item
{
char_u *start;
int minwid;
int maxwid;
enum
{
Normal,
Empty,
Group,
Middle,
Highlight,
TabPage,
Trunc
} type;
} item[STL_MAX_ITEM];
int minwid;
int maxwid;
int zeropad;
@ -4077,10 +4105,18 @@ build_stl_str_hl(
char_u buf_tmp[TMPLEN];
char_u win_tmp[TMPLEN];
char_u *usefmt = fmt;
struct stl_hlrec *sp;
stl_hlrec_T *sp;
int save_must_redraw = must_redraw;
int save_redr_type = curwin->w_redr_type;
if (stl_items == NULL)
{
stl_items = ALLOC_MULT(stl_item_T, stl_items_len);
stl_groupitem = ALLOC_MULT(int, stl_items_len);
stl_hltab = ALLOC_MULT(stl_hlrec_T, stl_items_len);
stl_tabtab = ALLOC_MULT(stl_hlrec_T, stl_items_len);
}
#ifdef FEAT_EVAL
/*
* When the format starts with "%!" then evaluate it as an expression and
@ -4143,16 +4179,30 @@ build_stl_str_hl(
prevchar_isitem = FALSE;
for (s = usefmt; *s; )
{
if (curitem == STL_MAX_ITEM)
if (curitem == (int)stl_items_len)
{
// There are too many items. Add the error code to the statusline
// to give the user a hint about what went wrong.
if (p + 6 < out + outlen)
{
mch_memmove(p, " E541", (size_t)5);
p += 5;
}
break;
size_t new_len = stl_items_len * 3 / 2;
stl_item_T *new_items;
int *new_groupitem;
stl_hlrec_T *new_hlrec;
new_items = vim_realloc(stl_items, sizeof(stl_item_T) * new_len);
if (new_items == NULL)
break;
stl_items = new_items;
new_groupitem = vim_realloc(stl_groupitem, sizeof(int) * new_len);
if (new_groupitem == NULL)
break;
stl_groupitem = new_groupitem;
new_hlrec = vim_realloc(stl_hltab, sizeof(stl_hlrec_T) * new_len);
if (new_hlrec == NULL)
break;
stl_hltab = new_hlrec;
new_hlrec = vim_realloc(stl_tabtab, sizeof(stl_hlrec_T) * new_len);
if (new_hlrec == NULL)
break;
stl_tabtab = new_hlrec;
stl_items_len = new_len;
}
if (*s != NUL && *s != '%')
@ -4185,15 +4235,15 @@ build_stl_str_hl(
s++;
if (groupdepth > 0)
continue;
item[curitem].type = Middle;
item[curitem++].start = p;
stl_items[curitem].stl_type = Middle;
stl_items[curitem++].stl_start = p;
continue;
}
if (*s == STL_TRUNCMARK)
{
s++;
item[curitem].type = Trunc;
item[curitem++].start = p;
stl_items[curitem].stl_type = Trunc;
stl_items[curitem++].stl_start = p;
continue;
}
if (*s == ')')
@ -4203,83 +4253,85 @@ build_stl_str_hl(
continue;
groupdepth--;
t = item[groupitem[groupdepth]].start;
t = stl_items[stl_groupitem[groupdepth]].stl_start;
*p = NUL;
l = vim_strsize(t);
if (curitem > groupitem[groupdepth] + 1
&& item[groupitem[groupdepth]].minwid == 0)
if (curitem > stl_groupitem[groupdepth] + 1
&& stl_items[stl_groupitem[groupdepth]].stl_minwid == 0)
{
// remove group if all items are empty and highlight group
// doesn't change
group_start_userhl = group_end_userhl = 0;
for (n = groupitem[groupdepth] - 1; n >= 0; n--)
for (n = stl_groupitem[groupdepth] - 1; n >= 0; n--)
{
if (item[n].type == Highlight)
if (stl_items[n].stl_type == Highlight)
{
group_start_userhl = group_end_userhl = item[n].minwid;
group_start_userhl = group_end_userhl =
stl_items[n].stl_minwid;
break;
}
}
for (n = groupitem[groupdepth] + 1; n < curitem; n++)
for (n = stl_groupitem[groupdepth] + 1; n < curitem; n++)
{
if (item[n].type == Normal)
if (stl_items[n].stl_type == Normal)
break;
if (item[n].type == Highlight)
group_end_userhl = item[n].minwid;
if (stl_items[n].stl_type == Highlight)
group_end_userhl = stl_items[n].stl_minwid;
}
if (n == curitem && group_start_userhl == group_end_userhl)
{
// empty group
p = t;
l = 0;
for (n = groupitem[groupdepth] + 1; n < curitem; n++)
for (n = stl_groupitem[groupdepth] + 1; n < curitem; n++)
{
// do not use the highlighting from the removed group
if (item[n].type == Highlight)
item[n].type = Empty;
if (stl_items[n].stl_type == Highlight)
stl_items[n].stl_type = Empty;
// adjust the start position of TabPage to the next
// item position
if (item[n].type == TabPage)
item[n].start = p;
if (stl_items[n].stl_type == TabPage)
stl_items[n].stl_start = p;
}
}
}
if (l > item[groupitem[groupdepth]].maxwid)
if (l > stl_items[stl_groupitem[groupdepth]].stl_maxwid)
{
// truncate, remove n bytes of text at the start
if (has_mbyte)
{
// Find the first character that should be included.
n = 0;
while (l >= item[groupitem[groupdepth]].maxwid)
while (l >= stl_items[stl_groupitem[groupdepth]].stl_maxwid)
{
l -= ptr2cells(t + n);
n += (*mb_ptr2len)(t + n);
}
}
else
n = (long)(p - t) - item[groupitem[groupdepth]].maxwid + 1;
n = (long)(p - t) - stl_items[stl_groupitem[groupdepth]]
.stl_maxwid + 1;
*t = '<';
mch_memmove(t + 1, t + n, (size_t)(p - (t + n)));
p = p - n + 1;
// Fill up space left over by half a double-wide char.
while (++l < item[groupitem[groupdepth]].minwid)
while (++l < stl_items[stl_groupitem[groupdepth]].stl_minwid)
*p++ = fillchar;
// correct the start of the items for the truncation
for (l = groupitem[groupdepth] + 1; l < curitem; l++)
for (l = stl_groupitem[groupdepth] + 1; l < curitem; l++)
{
item[l].start -= n;
if (item[l].start < t)
item[l].start = t;
stl_items[l].stl_start -= n;
if (stl_items[l].stl_start < t)
stl_items[l].stl_start = t;
}
}
else if (abs(item[groupitem[groupdepth]].minwid) > l)
else if (abs(stl_items[stl_groupitem[groupdepth]].stl_minwid) > l)
{
// fill
n = item[groupitem[groupdepth]].minwid;
n = stl_items[stl_groupitem[groupdepth]].stl_minwid;
if (n < 0)
{
// fill by appending characters
@ -4295,8 +4347,8 @@ build_stl_str_hl(
if (p + l >= out + outlen)
l = (long)((out + outlen) - p - 1);
p += l;
for (n = groupitem[groupdepth] + 1; n < curitem; n++)
item[n].start += l;
for (n = stl_groupitem[groupdepth] + 1; n < curitem; n++)
stl_items[n].stl_start += l;
for ( ; l > 0; l--)
*t++ = fillchar;
}
@ -4325,9 +4377,9 @@ build_stl_str_hl(
}
if (*s == STL_USER_HL)
{
item[curitem].type = Highlight;
item[curitem].start = p;
item[curitem].minwid = minwid > 9 ? 1 : minwid;
stl_items[curitem].stl_type = Highlight;
stl_items[curitem].stl_start = p;
stl_items[curitem].stl_minwid = minwid > 9 ? 1 : minwid;
s++;
curitem++;
continue;
@ -4341,9 +4393,10 @@ build_stl_str_hl(
// %X ends the close label, go back to the previously
// define tab label nr.
for (n = curitem - 1; n >= 0; --n)
if (item[n].type == TabPage && item[n].minwid >= 0)
if (stl_items[n].stl_type == TabPage
&& stl_items[n].stl_minwid >= 0)
{
minwid = item[n].minwid;
minwid = stl_items[n].stl_minwid;
break;
}
}
@ -4351,9 +4404,9 @@ build_stl_str_hl(
// close nrs are stored as negative values
minwid = - minwid;
}
item[curitem].type = TabPage;
item[curitem].start = p;
item[curitem].minwid = minwid;
stl_items[curitem].stl_type = TabPage;
stl_items[curitem].stl_start = p;
stl_items[curitem].stl_minwid = minwid;
s++;
curitem++;
continue;
@ -4371,11 +4424,11 @@ build_stl_str_hl(
minwid = (minwid > 50 ? 50 : minwid) * l;
if (*s == '(')
{
groupitem[groupdepth++] = curitem;
item[curitem].type = Group;
item[curitem].start = p;
item[curitem].minwid = minwid;
item[curitem].maxwid = maxwid;
stl_groupitem[groupdepth++] = curitem;
stl_items[curitem].stl_type = Group;
stl_items[curitem].stl_start = p;
stl_items[curitem].stl_minwid = minwid;
stl_items[curitem].stl_maxwid = maxwid;
s++;
curitem++;
continue;
@ -4628,9 +4681,9 @@ build_stl_str_hl(
++s;
if (*s == '#')
{
item[curitem].type = Highlight;
item[curitem].start = p;
item[curitem].minwid = -syn_namen2id(t, (int)(s - t));
stl_items[curitem].stl_type = Highlight;
stl_items[curitem].stl_start = p;
stl_items[curitem].stl_minwid = -syn_namen2id(t, (int)(s - t));
curitem++;
}
if (*s != NUL)
@ -4638,8 +4691,8 @@ build_stl_str_hl(
continue;
}
item[curitem].start = p;
item[curitem].type = Normal;
stl_items[curitem].stl_start = p;
stl_items[curitem].stl_type = Normal;
if (str != NULL && *str)
{
t = str;
@ -4738,7 +4791,7 @@ build_stl_str_hl(
p += STRLEN(p);
}
else
item[curitem].type = Empty;
stl_items[curitem].stl_type = Empty;
if (opt == STL_VIM_EXPR)
vim_free(str);
@ -4765,16 +4818,16 @@ build_stl_str_hl(
else
{
for ( ; l < itemcnt; l++)
if (item[l].type == Trunc)
if (stl_items[l].stl_type == Trunc)
{
// Truncate at %< item.
s = item[l].start;
s = stl_items[l].stl_start;
break;
}
if (l == itemcnt)
{
// No %< item, truncate first item.
s = item[0].start;
s = stl_items[0].stl_start;
l = 0;
}
}
@ -4800,7 +4853,7 @@ build_stl_str_hl(
else
s = out + maxwidth - 1;
for (l = 0; l < itemcnt; l++)
if (item[l].start > s)
if (stl_items[l].stl_start > s)
break;
itemcnt = l;
*s++ = '>';
@ -4834,10 +4887,10 @@ build_stl_str_hl(
--n; // count the '<'
for (; l < itemcnt; l++)
{
if (item[l].start - n >= s)
item[l].start -= n;
if (stl_items[l].stl_start - n >= s)
stl_items[l].stl_start -= n;
else
item[l].start = s;
stl_items[l].stl_start = s;
}
}
width = maxwidth;
@ -4846,16 +4899,16 @@ build_stl_str_hl(
{
// Apply STL_MIDDLE if any
for (l = 0; l < itemcnt; l++)
if (item[l].type == Middle)
if (stl_items[l].stl_type == Middle)
break;
if (l < itemcnt)
{
p = item[l].start + maxwidth - width;
STRMOVE(p, item[l].start);
for (s = item[l].start; s < p; s++)
p = stl_items[l].stl_start + maxwidth - width;
STRMOVE(p, stl_items[l].stl_start);
for (s = stl_items[l].stl_start; s < p; s++)
*s = fillchar;
for (l++; l < itemcnt; l++)
item[l].start += maxwidth - width;
stl_items[l].stl_start += maxwidth - width;
width = maxwidth;
}
}
@ -4863,13 +4916,14 @@ build_stl_str_hl(
// Store the info about highlighting.
if (hltab != NULL)
{
sp = hltab;
*hltab = stl_hltab;
sp = stl_hltab;
for (l = 0; l < itemcnt; l++)
{
if (item[l].type == Highlight)
if (stl_items[l].stl_type == Highlight)
{
sp->start = item[l].start;
sp->userhl = item[l].minwid;
sp->start = stl_items[l].stl_start;
sp->userhl = stl_items[l].stl_minwid;
sp++;
}
}
@ -4880,13 +4934,14 @@ build_stl_str_hl(
// Store the info about tab pages labels.
if (tabtab != NULL)
{
sp = tabtab;
*tabtab = stl_tabtab;
sp = stl_tabtab;
for (l = 0; l < itemcnt; l++)
{
if (item[l].type == TabPage)
if (stl_items[l].stl_type == TabPage)
{
sp->start = item[l].start;
sp->userhl = item[l].minwid;
sp->start = stl_items[l].stl_start;
sp->userhl = stl_items[l].stl_minwid;
sp++;
}
}
@ -5068,7 +5123,7 @@ ex_buffer_all(exarg_T *eap)
int r;
int count; // Maximum number of windows to open.
int all; // When TRUE also load inactive buffers.
int had_tab = cmdmod.tab;
int had_tab = cmdmod.cmod_tab;
tabpage_T *tpnext;
if (eap->addr_count == 0) // make as many windows as possible
@ -5099,7 +5154,7 @@ ex_buffer_all(exarg_T *eap)
{
wpnext = wp->w_next;
if ((wp->w_buffer->b_nwindows > 1
|| ((cmdmod.split & WSP_VERT)
|| ((cmdmod.cmod_split & WSP_VERT)
? wp->w_height + wp->w_status_height < Rows - p_ch
- tabline_height()
: wp->w_width != Columns)
@ -5220,7 +5275,7 @@ ex_buffer_all(exarg_T *eap)
#endif
// When ":tab" was used open a new tab for a new window repeatedly.
if (had_tab > 0 && tabpage_index(NULL) <= p_tpm)
cmdmod.tab = 9999;
cmdmod.cmod_tab = 9999;
}
--autocmd_no_enter;
win_enter(firstwin, FALSE); // back to first window
@ -5515,8 +5570,8 @@ bt_nofile(buf_T *buf)
bt_dontwrite(buf_T *buf)
{
return buf != NULL && (buf->b_p_bt[0] == 'n'
|| buf->b_p_bt[0] == 't'
|| buf->b_p_bt[0] == 'p');
|| buf->b_p_bt[0] == 't'
|| buf->b_p_bt[0] == 'p');
}
#if defined(FEAT_QUICKFIX) || defined(PROTO)
@ -5547,7 +5602,7 @@ buf_hide(buf_T *buf)
case 'd': return FALSE; // "delete"
case 'h': return TRUE; // "hide"
}
return (p_hid || cmdmod.hide);
return (p_hid || (cmdmod.cmod_flags & CMOD_HIDE));
}
/*
@ -5593,10 +5648,21 @@ buf_spname(buf_T *buf)
}
if (buf->b_fname == NULL)
return (char_u *)_("[No Name]");
return buf_get_fname(buf);
return NULL;
}
/*
* Get "buf->b_fname", use "[No Name]" if it is NULL.
*/
char_u *
buf_get_fname(buf_T *buf)
{
if (buf->b_fname == NULL)
return (char_u *)_("[No Name]");
return buf->b_fname;
}
/*
* Set 'buflisted' for curbuf to "on" and trigger autocommands if it changed.
*/

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