Compare commits

...

252 Commits

Author SHA1 Message Date
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
b816dae16d patch 8.2.1718: Vim9: :def function disallows "firstline" for no good reason
Problem:    Vim9: :def function disallows "firstline" and "lastline" argument
            names for no good reason.
Solution:   Don't check the arguments for a :def function. (closes #6986)
2020-09-20 22:04:00 +02:00
809fcecddc patch 8.2.1717
Problem:    MS-Windows installer doesn't have Russian translations.
Solution:   Add Russian translations. (closes #6985)
2020-09-20 21:43:03 +02:00
b5cfff0b34 patch 8.2.1716: options window has duplicate translations
Problem:    Options window has duplicate translations.
Solution:   Make one entry for "global or local to buffer".  Fix wrong text.
            (closes #6983)
2020-09-20 21:32:03 +02:00
26cd3063b2 patch 8.2.1715: Motif GUI: commented out code missed {}
Problem:    Motif GUI: commented out code missed {}.
Solution:   Add {} and reenable the code. (similar to #6989)
2020-09-20 21:13:27 +02:00
8902b31f1b patch 8.2.1714: text properties corrupted with substitute command
Problem:    Text properties corrupted with substitute command. (Filipe
            Brandenburger)
Solution:   Get the changed line again after using u_savesub(). (closes #6984)
2020-09-20 21:04:35 +02:00
7795bfea6d patch 8.2.1713: Motif GUI: crash when setting menu colors
Problem:    Motif GUI: crash when setting menu colors. (Andrzej Bylicki)
Solution:   Add {} to make "n" incremented correctly. (closes #6989,
            closes #5948)
2020-09-20 19:57:15 +02:00
1d59aa1fdf Update runtime files. 2020-09-19 18:50:13 +02:00
a05e524f3a patch 8.2.1712: Vim9: leaking memory when calling a lambda
Problem:    Vim9: leaking memory when calling a lambda.
Solution:   Decrement function reference from ISN_DCALL.
2020-09-19 18:19:19 +02:00
fdeab65db6 patch 8.2.1711: Vim9: leaking memory when using partial
Problem:    Vim9: leaking memory when using partial.
Solution:   Do delete the function even when it was compiled.
2020-09-19 15:16:50 +02:00
77b20977dc patch 8.2.1710: Vim9: list of list type can be wrong
Problem:    Vim9: list of list type can be wrong.
Solution:   Use VAR_UNKNOWN for empty list.  Recognize VAR_UNKNOWN when
            looking for a common type. (closes #6979)
2020-09-19 14:12:34 +02:00
dec07510bb patch 8.2.1709: Vim9: memory leak when using multiple closures
Problem:    Vim9: memory leak when using multiple closures.
Solution:   Free the partial.
2020-09-18 23:11:10 +02:00
b185a40745 patch 8.2.1708: Vim9: error message for function has unpritable characters
Problem:    Vim9: error message for function has unpritable characters.
Solution:   use printable_func_name(). (closes #6965)
2020-09-18 22:42:00 +02:00
2bbada8116 patch 8.2.1707: small inconsitency in highlight test
Problem:    Small inconsitency in highlight test.
Solution:   Use one argument for :execute. (Antony Scriven, #6975)
2020-09-18 21:55:26 +02:00
7cbfaa51de patch 8.2.1706: Vim9: crash after running into the "Multiple closures" error
Problem:    Vim9: crash after running into the "Multiple closures" error.
Solution:   When a function fails still update any closures. (closes #6973)
2020-09-18 21:25:32 +02:00
e8df010498 patch 8.2.1705: "verbose hi Name" reports incorrect info after ":hi clear"
Problem:    "verbose hi Name" reports incorrect info after ":hi clear".
Solution:   Store the script context. (Antony Scriven, closes #6975)
2020-09-18 19:40:45 +02:00
77e5dcc36a patch 8.2.1704: Vim9: crash in for loop when autoload script has an error
Problem:    Vim9: crash in for loop when autoload script has an error.
Solution:   Reset suppress_errthrow.  Check for NULL list. (closes #6967)
2020-09-17 21:29:03 +02:00
213da551de patch 8.2.1703: ":highlight clear" does not restore default link
Problem:    ":highlight clear" does not restore default link.
Solution:   Remember the default link and restore it. (Antony Scriven,
            closes #6970, closes #4405)
2020-09-17 19:59:26 +02:00
da697645d5 patch 8.2.1702: crash when using undo after deleting folded lines
Problem:    Crash when using undo after deleting folded lines.
Solution:   Check for NULL pointer. (closes #6968)
2020-09-17 19:36:04 +02:00
08e51f446b patch 8.2.1701: Vim9: sort("i") does not work
Problem:    Vim9: sort("i") does not work.
Solution:   Don't try getting a number for a string argument. (closes #6958)
2020-09-16 23:23:36 +02:00
9939f57b7f patch 8.2.1700: Vim9: try/catch causes wrong value to be returned
Problem:    Vim9: try/catch causes wrong value to be returned.
Solution:   Reset tcd_return. (closes #6964)
2020-09-16 22:29:52 +02:00
916911f598 patch 8.2.1699: build failure due to missing error message
Problem:    Build failure due to missing error message.
Solution:   Add error message.
2020-09-16 21:41:53 +02:00
a187c43cfe patch 8.2.1698: cannot lock a variable in legacy Vim script like in Vim9
Problem:    Cannot lock a variable in legacy Vim script like in Vim9.
Solution:   Make ":lockvar 0" work.
2020-09-16 21:08:28 +02:00
7707228aac patch 8.2.1697: inconsistent capitalization of error messages
Problem:    Inconsistent capitalization of error messages.
Solution:   Always start with a capital.
2020-09-16 17:55:40 +02:00
2c12f89055 patch 8.2.1696: unused (duplicate) macros
Problem:    Unused (duplicate) macros.
Solution:   Remove the macros.
2020-09-16 17:30:27 +02:00
2f8cbc4b22 patch 8.2.1695: Vim9: crash when using varargs type "any"
Problem:    Vim9: crash when using varargs type "any".
Solution:   Check if uf_va_type is &t_any. (closes #6957)
2020-09-16 17:22:59 +02:00
573545a55a patch 8.2.1694: compiler warning for loss if data
Problem:    Compiler warning for loss if data.
Solution:   Add typecast.
2020-09-16 15:46:08 +02:00
05eb5b9cae patch 8.2.1693: "hi def" does not work for cleared highlight
Problem:    "hi def" does not work for cleared highlight.
Solution:   Check the "sg_cleared" flag. (Maxim Kim, closes #6956,
            closes #4405)
2020-09-16 15:43:21 +02:00
fb489af2ec patch 8.2.1692: build fails because TTFLAG_STATIC is missing
Problem:    Build fails because TTFLAG_STATIC is missing.
Solution:   Include missing change.
2020-09-16 15:41:09 +02:00
5e65423077 patch 8.2.1691: Vim9: list<any> is not accepted where list<number> is expected
Problem:    Vim9: list<any> is not accepted where list<number> is expected.
Solution:   Add functions to allocate and free a type_T, use it in
            ISN_CHECKTYPE. (closes #6959)
2020-09-16 15:22:00 +02:00
8b51b7f0f1 patch 8.2.1690: text properties not adjusted for "I" in Visual block mode
Problem:    Text properties not adjusted for "I" in Visual block mode.
Solution:   Call inserted_bytes().
2020-09-15 21:34:18 +02:00
ad5e5631c5 patch 8.2.1689: 'colorcolumn' doesn't show in indent
Problem:    'colorcolumn' doesn't show in indent.
Solution:   Also draw the column when draw_state is WL_BRI or WL_SBR.
            (Alexey Demin, closes #6948, closes #6619)
2020-09-15 20:52:26 +02:00
c8f12c9856 patch 8.2.1688: increment/decrement removes text property
Problem:    Increment/decrement removes text property.
Solution:   Insert the new number before deleting the old one. (closes #6962)
2020-09-15 20:34:10 +02:00
9b123d8590 patch 8.2.1687: Vim9: out of bounds error
Problem:    Vim9: out of bounds error.
Solution:   Check that cmdidx is not negative.
2020-09-14 22:39:11 +02:00
71abe48289 patch 8.2.1686: Vim9: "const!" not sufficiently tested
Problem:    Vim9: "const!" not sufficiently tested.
Solution:   Add a few more test cases.  Fix type checking.
2020-09-14 22:28:30 +02:00
332 changed files with 13904 additions and 6059 deletions

102
.github/CODEOWNERS vendored
View File

@ -3,22 +3,25 @@
# You can use github users with @user or email addresses
# These owners will be the default owners for everything in the repo.
* @brammool
#* @brammool
# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners
# will be requested to review.
src/libvterm/* @leonerd
src/iscygpty.* @k-takata
src/libvterm/ @leonerd
runtime/autoload/getscript.vim @cecamp
runtime/autoload/netrw.vim @cecamp
runtime/autoload/netrwFileHandlers.vim @cecamp
runtime/autoload/netrwSettings.vim @cecamp
runtime/autoload/rubycomplete.vim @segfault @dkearns
runtime/autoload/tar.vim @cecamp
runtime/autoload/vimball.vim @cecamp
runtime/autoload/zip.vim @cecamp
runtime/compiler/checkstyle.vim @dkearns
runtime/compiler/cucumber.vim @tpope
runtime/compiler/dart.vim @dkearns
runtime/compiler/dart2js.vim @dkearns
runtime/compiler/dart2native.vim @dkearns
@ -29,16 +32,23 @@ runtime/compiler/dartfmt.vim @dkearns
runtime/compiler/eruby.vim @dkearns
runtime/compiler/gawk.vim @dkearns
runtime/compiler/gjs.vim @dkearns
runtime/compiler/haml.vim @tpope
runtime/compiler/javac.vim @dkearns
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
runtime/compiler/rspec.vim @tpope @dkearns
runtime/compiler/rubocop.vim @dkearns
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
@ -53,40 +63,92 @@ 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/bst.vim @tpope
runtime/ftplugin/css.vim @dkearns
runtime/ftplugin/cucumber.vim @tpope
runtime/ftplugin/eiffel.vim @dkearns
runtime/ftplugin/eruby.vim @tpope @dkearns
runtime/ftplugin/git.vim @tpope
runtime/ftplugin/gitcommit.vim @tpope
runtime/ftplugin/gitconfig.vim @tpope
runtime/ftplugin/gitrebase.vim @tpope
runtime/ftplugin/gitsendemail.vim @tpope
runtime/ftplugin/haml.vim @tpope
runtime/ftplugin/hgcommit.vim @k-takata
runtime/ftplugin/javascript.vim @dkearns
runtime/ftplugin/javascriptreact.vim @dkearns
runtime/ftplugin/liquid.vim @tpope
runtime/ftplugin/markdown.vim @tpope
runtime/ftplugin/matlab.vim @cecamp
runtime/ftplugin/nsis.vim @k-takata
runtime/ftplugin/pdf.vim @tpope
runtime/ftplugin/ruby.vim @tpope @dkearns
runtime/ftplugin/sass.vim @tpope
runtime/ftplugin/scss.vim @tpope
runtime/ftplugin/tmux.vim @ericpruitt
runtime/ftplugin/typescript.vim @dkearns
runtime/ftplugin/typescriptreact.vim @dkearns
runtime/plugin/amiga.vim @cecamp
runtime/plugin/csh.vim @cecamp
runtime/plugin/dcl.vim @cecamp
runtime/plugin/exports.vim @cecamp
runtime/indent/bst.vim @tpope
runtime/indent/cucumber.vim @tpope
runtime/indent/dosbatch.vim @k-takata
runtime/indent/eruby.vim @tpope @dkearns
runtime/indent/gitconfig.vim @tpope
runtime/indent/haml.vim @tpope
runtime/indent/liquid.vim @tpope
runtime/indent/nsis.vim @k-takata
runtime/indent/ruby.vim @AndrewRadev @dkearns
runtime/indent/sass.vim @tpope
runtime/indent/scss.vim @tpope
runtime/indent/teraterm.vim @k-takata
runtime/plugin/getscriptPlugin.vim @cecamp
runtime/plugin/lex.vim @cecamp
runtime/plugin/lisp.vim @cecamp
runtime/plugin/logiPat.vim @cecamp
runtime/plugin/maple.vim @cecamp
runtime/plugin/netrw.vim @cecamp
runtime/plugin/netrwPlugin.vim @cecamp
runtime/plugin/rpcgen.vim @cecamp
runtime/plugin/sh.vim @cecamp
runtime/plugin/sm.vim @cecamp
runtime/plugin/tags.vim @cecamp
runtime/plugin/tarPlugin.vim @cecamp
runtime/plugin/tex.vim @cecamp
runtime/plugin/vim.vim @cecamp
runtime/plugin/vimballPlugin.vim @cecamp
runtime/plugin/wlmfilt.vim @cecamp
runtime/plugin/xmath.vim @cecamp
runtime/plugin/xxd.vim @cecamp
runtime/plugin/yacc.vim @cecamp
runtime/plugin/zipPlugin.vim @cecamp
runtime/syntax/amiga.vim @cecamp
runtime/syntax/bst.vim @tpope
runtime/syntax/csh.vim @cecamp
runtime/syntax/cucumber.vim @tpope
runtime/syntax/dcl.vim @cecamp
runtime/syntax/elmfilt.vim @cecamp
runtime/syntax/eruby.vim @tpope @dkearns
runtime/syntax/exports.vim @cecamp
runtime/syntax/git.vim @tpope
runtime/syntax/gitcommit.vim @tpope
runtime/syntax/gitconfig.vim @tpope
runtime/syntax/gitrebase.vim @tpope
runtime/syntax/haml.vim @tpope
runtime/syntax/hgcommit.vim @k-takata
runtime/syntax/lex.vim @cecamp
runtime/syntax/liquid.vim @tpope
runtime/syntax/lisp.vim @cecamp
runtime/syntax/lynx.vim @dkearns
runtime/syntax/mailcap.vim @dkearns
runtime/syntax/make.vim @rohieb
runtime/syntax/make.vim @rohieb
runtime/syntax/maple.vim @cecamp
runtime/syntax/markdown.vim @tpope
runtime/syntax/netrw.vim @cecamp
runtime/syntax/nsis.vim @k-takata
runtime/syntax/pdf.vim @tpope
runtime/syntax/php.vim @TysonAndre
runtime/syntax/privoxy.vim @dkearns
runtime/syntax/rpcgen.vim @cecamp
runtime/syntax/ruby.vim @dkearns
runtime/syntax/sass.vim @tpope
runtime/syntax/scss.vim @tpope
runtime/syntax/sh.vim @cecamp
runtime/syntax/sm.vim @cecamp
runtime/syntax/tags.vim @cecamp
runtime/syntax/teraterm.vim @k-takata
runtime/syntax/tex.vim @cecamp
runtime/syntax/tidy.vim @dkearns
runtime/syntax/tmux.vim @ericpruitt
runtime/syntax/vim.vim @cecamp
runtime/syntax/wget.vim @dkearns
runtime/syntax/xbl.vim @dkearns
runtime/syntax/xmath.vim @cecamp
runtime/syntax/xslt.vim @Boobies
runtime/syntax/xxd.vim @cecamp
runtime/syntax/yacc.vim @cecamp

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

@ -174,6 +174,7 @@ Page custom SetCustom ValidateCustom
!include "lang\german.nsi"
!include "lang\italian.nsi"
!include "lang\japanese.nsi"
!include "lang\russian.nsi"
!include "lang\simpchinese.nsi"
!include "lang\tradchinese.nsi"
!include "lang\turkish.nsi"

View File

@ -58,10 +58,10 @@ LangString str_desc_console ${LANG_ITALIAN} \
"Versione console di Vim (vim.exe)."
LangString str_section_batch ${LANG_ITALIAN} \
"Crea file di invocazione (MS-DOS) .bat"
"Crea file .bat"
LangString str_desc_batch ${LANG_ITALIAN} \
"Crea file di invocazione .bat per varianti di Vim nella directory \
di Windows, per utilizzo da linea di comando (MS-DOS)."
"Crea file .bat per varianti di Vim nella directory \
di Windows, per utilizzo da riga di comando."
LangString str_group_icons ${LANG_ITALIAN} \
"Crea icone per Vim"

287
nsis/lang/russian.nsi Normal file
View File

@ -0,0 +1,287 @@
# vi:set ts=8 sts=4 sw=4 et fdm=marker:
#
# russian.nsi: Russian language strings for gvim NSIS installer.
#
# Locale ID : 1049
# Locale name : ru-RU
# fileencoding : UTF-8
# Author : Restorer
!insertmacro MUI_LANGUAGE "Russian"
# Overwrite the default translation.
# These strings should be always English. Otherwise dosinst.c fails.
LangString ^SetupCaption ${LANG_RUSSIAN} \
"$(^Name) Setup"
LangString ^UninstallCaption ${LANG_RUSSIAN} \
"$(^Name) Uninstall"
##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
#LangString str_dest_folder ${LANG_RUSSIAN} \
# "Маршрут к каталогу установки (должен оканчиваться каталогом $\"vim$\")"
LangString str_show_readme ${LANG_RUSSIAN} \
"После окончания установки ознакомиться с кратким описанием"
# Install types:
LangString str_type_typical ${LANG_RUSSIAN} \
"Стандартная"
LangString str_type_minimal ${LANG_RUSSIAN} \
"Минимальная"
LangString str_type_full ${LANG_RUSSIAN} \
"Полная"
##############################################################################
# Section Titles & Description {{{1
##############################################################################
LangString str_section_old_ver ${LANG_RUSSIAN} \
"Удаление предыдущих версий"
LangString str_desc_old_ver ${LANG_RUSSIAN} \
"Будут удалены предыдущие установленные версии программы"
LangString str_section_exe ${LANG_RUSSIAN} \
"Графический интерфейс и вспомогательные файлы"
LangString str_desc_exe ${LANG_RUSSIAN} \
"Графический интерфейс программы Vim и все необходимые для этого файлы. \
Это обязательный компонент"
LangString str_section_console ${LANG_RUSSIAN} \
"Консольная программа Vim"
LangString str_desc_console ${LANG_RUSSIAN} \
"Вариант редактора Vim (vim.exe), используемый в командной оболочке"
LangString str_section_batch ${LANG_RUSSIAN} \
"Создать командные файлы"
LangString str_desc_batch ${LANG_RUSSIAN} \
"Создание командных bat-файлов позволяющих работать с редактором \
Vim из командной строки Windows"
LangString str_group_icons ${LANG_RUSSIAN} \
"Создать ярлыки для редактора Vim"
LangString str_desc_icons ${LANG_RUSSIAN} \
"Создание ярлыков редактора Vim для облегчения запуска программы"
LangString str_section_desktop ${LANG_RUSSIAN} \
"На Рабочем столе"
LangString str_desc_desktop ${LANG_RUSSIAN} \
"Создание ярлыков программы Gvim на Рабочем столе"
LangString str_section_start_menu ${LANG_RUSSIAN} \
"В меню кнопки Пуск"
LangString str_desc_start_menu ${LANG_RUSSIAN} \
"Создание ярлыков программы Gvim в меню кнопки Пуск"
#LangString str_section_quick_launch ${LANG_RUSSIAN} \
# "На панели быстрого запуска"
#LangString str_desc_quick_launch ${LANG_RUSSIAN} \
# "Создание ярлыков программы GVim на панели быстрого запуска"
LangString str_section_edit_with ${LANG_RUSSIAN} \
"В контекстном меню"
LangString str_desc_edit_with ${LANG_RUSSIAN} \
"Добавление вызова программы Gvim в пункт $\"Открыть с помощью...$\" контекстного меню"
#LangString str_section_edit_with32 ${LANG_RUSSIAN} \
# "32-разрядная версия программы"
#LangString str_desc_edit_with32 ${LANG_RUSSIAN} \
# "Добавление вызова программы Gvim в пункт $\"Открыть с помощью...$\" контекстного меню \
# для 32-разрядных приложений"
#LangString str_section_edit_with64 ${LANG_RUSSIAN} \
# "64-разрядная версия программы"
#LangString str_desc_edit_with64 ${LANG_RUSSIAN} \
# "Добавление вызова программы Gvim в пункт $\"Открыть с помощью...$\" контекстного меню \
# для 64-разрядных приложений"
LangString str_section_vim_rc ${LANG_RUSSIAN} \
"Настройки программы по умолчанию"
LangString str_desc_vim_rc ${LANG_RUSSIAN} \
"Создание файла _vimrc с предустановленными настройками, если нет других \
файлов настроек"
LangString str_group_plugin ${LANG_RUSSIAN} \
"Создать каталог для подключаемых модулей"
LangString str_desc_plugin ${LANG_RUSSIAN} \
"Создание каталога для размещения подключаемых модулей, которые расширяют \
возможности редактора Vim"
LangString str_section_plugin_home ${LANG_RUSSIAN} \
"Личный каталог"
LangString str_desc_plugin_home ${LANG_RUSSIAN} \
"Создание каталога для подключаемых модулей в домашнем каталоге пользователя"
LangString str_section_plugin_vim ${LANG_RUSSIAN} \
"Общий каталог"
LangString str_desc_plugin_vim ${LANG_RUSSIAN} \
"Создание каталога для подключаемых модулей в каталоге установки редактора Vim. \
Модули в этом каталоге будут доступны для любого пользователя \
зарегистрировавшегося в системе"
LangString str_section_vis_vim ${LANG_RUSSIAN} \
"Подключаемый модуль VisVim"
LangString str_desc_vis_vim ${LANG_RUSSIAN} \
"Подключаемый модуль VisVim используется для интеграции с Microsoft Visual Studio"
LangString str_section_nls ${LANG_RUSSIAN} \
"Поддержка региональных языков"
LangString str_desc_nls ${LANG_RUSSIAN} \
"Установка файлов для поддержки региональных языков операционной системы"
LangString str_unsection_register ${LANG_RUSSIAN} \
"Отменить регистрацию компонентов программы Vim"
LangString str_desc_unregister ${LANG_RUSSIAN} \
"Отмена регистрации компонентов программы Vim в операционной системе"
LangString str_unsection_exe ${LANG_RUSSIAN} \
"Удалить файлы редактора Vim"
LangString str_desc_rm_exe ${LANG_RUSSIAN} \
"Удаление всех исполняемых и вспомогательных файлов редактора Vim"
LangString str_ungroup_plugin ${LANG_RUSSIAN} \
"Удалить каталог подключаемых модулей"
LangString str_desc_rm_plugin ${LANG_RUSSIAN} \
"Удаление каталога подключаемых модулей, если в нём нет файлов"
LangString str_unsection_plugin_home ${LANG_RUSSIAN} \
"Личный каталог"
LangString str_desc_rm_plugin_home ${LANG_RUSSIAN} \
"Удаление каталога подключаемых модулей из домашнего каталога пользователя"
LangString str_unsection_plugin_vim ${LANG_RUSSIAN} \
"Общий каталог"
LangString str_desc_rm_plugin_vim ${LANG_RUSSIAN} \
"Удаление каталога подключаемых модулей из каталога установки редактора Vim"
LangString str_unsection_rootdir ${LANG_RUSSIAN} \
"Удалить основной каталог программы Vim"
LangString str_desc_rm_rootdir ${LANG_RUSSIAN} \
"Удаление основного каталога программы Vim. В этом каталоге находятся файлы \
настроек!"
##############################################################################
# Messages {{{1
##############################################################################
#LangString str_msg_too_many_ver ${LANG_RUSSIAN} \
# "Обнаружено предыдущих версий программы Vim: $vim_old_ver_count.$\r$\n\
# Данная программа установки может удалить не более ${VIM_MAX_OLD_VER}.$\r$\n\
# Удалить лишние версии программы Vim и повторите установку"
#LangString str_msg_invalid_root ${LANG_RUSSIAN} \
# "Недопустимый каталог установки программы Vim $vim_install_root!$\r$\n\
# Маршрут установки должен оканчиваться каталогом $\"vim$\""
#LangString str_msg_bin_mismatch ${LANG_RUSSIAN} \
# "Недопустимый маршрут к каталогу с исполняемыми файлами!$\r$\n$\r$\n\
# Маршрут к каталогу с исполняемыми файлами должен быть $\"$vim_bin_path$\",$\r$\n\
# но от операционной системы получен как $\"$INSTDIR$\"."
#LangString str_msg_vim_running ${LANG_RUSSIAN} \
# "Программа Vim сейчас работает.$\r$\n\
# Прежде чем продолжить, закройте все работающие редакторы Vim"
#LangString str_msg_register_ole ${LANG_RUSSIAN} \
# "Попытка зарегистрировать компоненты программы Vim в пространстве OLE. \
# Но не получено уведомление об успешности данной операции"
#LangString str_msg_unreg_ole ${LANG_RUSSIAN} \
# "Попытка отменить регистрацию компонентов программы Vim в пространстве OLE. \
# Но не получено уведомление об успешности данной операции"
#LangString str_msg_rm_start ${LANG_RUSSIAN} \
# "Выполняется удаление следующих версий программы:"
#LangString str_msg_rm_fail ${LANG_RUSSIAN} \
# "Произошёл сбой при выполнении удаления следующих версий программы:"
#LangString str_msg_no_rm_key ${LANG_RUSSIAN} \
# "Не удалось найти раздел реестра, содержащий информацию об удалении программы"
#LangString str_msg_no_rm_reg ${LANG_RUSSIAN} \
# "Не удалось найти программу выполняющую удаление, указанную в разделе реестра"
#LangString str_msg_no_rm_exe ${LANG_RUSSIAN} \
# "Отсутствуют права на доступ к программе, выполняющей удаление"
#LangString str_msg_rm_copy_fail ${LANG_RUSSIAN} \
# "Произошла ошибка при копировании программы удаления во временный каталог"
#LangString str_msg_rm_run_fail ${LANG_RUSSIAN} \
# "Произошёл сбой при запуске программы, выполняющей удаление"
#LangString str_msg_abort_install ${LANG_RUSSIAN} \
# "Установка программы была отменена"
LangString str_msg_install_fail ${LANG_RUSSIAN} \
"Произошла ошибка при установке программы. Попробуйте повторить установку \
немного попозже"
# когда луна будет в другой фазе и ветер должен дуть с юго‐запада
LangString str_msg_rm_exe_fail ${LANG_RUSSIAN} \
"Некоторые файлы не были удалены из каталога $0 $\r$\n\
Необходимо выполнить их удаление самостоятельно"
#LangString str_msg_rm_root_fail ${LANG_RUSSIAN} \
# "Внимание! В каталоге $\"$vim_install_root$\" содержатся файлы. Удаление каталога не выполнено"
LangString str_msg_uninstalling ${LANG_RUSSIAN} \
"Удаление предыдущих версий программ..."
LangString str_msg_registering ${LANG_RUSSIAN} \
"Регистрация компонентов программы в системе..."
LangString str_msg_unregistering ${LANG_RUSSIAN} \
"Отмена регистрации компонентов программы в системе..."
##############################################################################
# Dialog Box {{{1
##############################################################################
LangString str_vimrc_page_title ${LANG_RUSSIAN} \
"Установка параметров программы"
LangString str_vimrc_page_subtitle ${LANG_RUSSIAN} \
"Параметры, используемые для клавиатуры, «мыши» и функциональности программы"
LangString str_msg_compat_title ${LANG_RUSSIAN} \
" Варианты использования программы "
LangString str_msg_compat_desc ${LANG_RUSSIAN} \
"Совместимость и функциональность программы"
LangString str_msg_compat_vi ${LANG_RUSSIAN} \
"Работа в варианте совместимости с редактором Vi"
LangString str_msg_compat_vim ${LANG_RUSSIAN} \
"Работа в варианте функциональности редактора Vim"
LangString str_msg_compat_defaults ${LANG_RUSSIAN} \
"Работа редактора Vim с некоторыми улучшениями (файл defaults.vim)"
LangString str_msg_compat_all ${LANG_RUSSIAN} \
"Работа редактора Vim со всеми улучшениями (файл vimrc_example.vim). \
Используется по умолчанию"
LangString str_msg_keymap_title ${LANG_RUSSIAN} \
" Клавиатурные команды "
LangString str_msg_keymap_desc ${LANG_RUSSIAN} \
"Клавиатурные команды используемые в ОС Windows (CTRL+V, CTRL+C, CTRL+S, CTRL+F и т. п.)"
LangString str_msg_keymap_default ${LANG_RUSSIAN} \
"Не изменять клавиатурные команды. Использовать принятые в редакторе Vim"
LangString str_msg_keymap_windows ${LANG_RUSSIAN} \
"Изменить указанные клавиатурные команды"
LangString str_msg_mouse_title ${LANG_RUSSIAN} \
" Манипулятор «мышь» "
LangString str_msg_mouse_desc ${LANG_RUSSIAN} \
"Действий правой и левой кнопки манипулятора «мышь»"
LangString str_msg_mouse_default ${LANG_RUSSIAN} \
"Правая кнопка — всплывающее меню, левая кнопка — режим визуальный"
LangString str_msg_mouse_windows ${LANG_RUSSIAN} \
"Правая кнопка — всплывающее меню, левая кнопка — режим выборки (как в ОС Windows)"
LangString str_msg_mouse_unix ${LANG_RUSSIAN} \
"Правая кнопка — расширяемый режим выбора, левая кнопка — режим визуальный (как в UNIXподобных ОС)"

View File

@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across
" AUTOLOAD SECTION
" Date: Jan 07, 2020
" Version: 168
" Date: Sep 18, 2020
" Version: 170
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
@ -43,7 +43,7 @@ if exists("s:needspatches")
endfor
endif
let g:loaded_netrw = "v168"
let g:loaded_netrw = "v170"
if !exists("s:NOTE")
let s:NOTE = 0
let s:WARNING = 1
@ -86,7 +86,16 @@ fun! netrw#ErrorMsg(level,msg,errnum)
endif
" call Decho("level=".level,'~'.expand("<slnum>"))
if g:netrw_use_errorwindow
if g:netrw_use_errorwindow == 2 && (v:version > 802 || (v:version == 802 && has("patch486")))
" use popup window
if type(a:msg) == 3
let msg = [level]+a:msg
else
let msg= level.a:msg
endif
let s:popuperr_id = popup_beval(msg,{})
let s:popuperr_text= ""
elseif g:netrw_use_errorwindow
" (default) netrw creates a one-line window to show error/warning
" messages (reliably displayed)
@ -203,7 +212,11 @@ let g:netrw_localrmdiropt = ""
" ---------------------------------------------------------------------
" Default values for netrw's global protocol variables {{{2
call s:NetrwInit("g:netrw_use_errorwindow",1)
if (v:version > 802 || (v:version == 802 && has("patch486"))) && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on") && has("mouse")
call s:NetrwInit("g:netrw_use_errorwindow",2)
else
call s:NetrwInit("g:netrw_use_errorwindow",1)
endif
if !exists("g:netrw_dav_cmd")
if executable("cadaver")
@ -559,6 +572,7 @@ call s:NetrwInit("s:netrw_posn",'{}')
if v:version >= 700 && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on")
" call Decho("installed beval events",'~'.expand("<slnum>"))
let &l:bexpr = "netrw#BalloonHelp()"
" call Decho("&l:bexpr<".&l:bexpr."> buf#".bufnr())
au FileType netrw setl beval
au WinLeave * if &ft == "netrw" && exists("s:initbeval")|let &beval= s:initbeval|endif
au VimEnter * let s:initbeval= &beval
@ -591,7 +605,18 @@ if v:version >= 700 && has("balloon_eval") && has("syntax") && exists("g:syntax_
if &ft != "netrw"
return ""
endif
if !exists("w:netrw_bannercnt") || v:beval_lnum >= w:netrw_bannercnt || (exists("g:netrw_nobeval") && g:netrw_nobeval)
if exists("s:popuperr_id") && popup_getpos(s:popuperr_id) != {}
" popup error window is still showing
" s:pouperr_id and s:popuperr_text are set up in netrw#ErrorMsg()
if exists("s:popuperr_text") && s:popuperr_text != "" && v:beval_text != s:popuperr_text
" text under mouse hasn't changed; only close window when it changes
call popup_close(s:popuperr_id)
unlet s:popuperr_text
else
let s:popuperr_text= v:beval_text
endif
let mesg= ""
elseif !exists("w:netrw_bannercnt") || v:beval_lnum >= w:netrw_bannercnt || (exists("g:netrw_nobeval") && g:netrw_nobeval)
let mesg= ""
elseif v:beval_text == "Netrw" || v:beval_text == "Directory" || v:beval_text == "Listing"
let mesg = "i: thin-long-wide-tree gh: quick hide/unhide of dot-files qf: quick file info %:open new file"
@ -1247,6 +1272,10 @@ fun! netrw#Lexplore(count,rightside,...)
setlocal winfixwidth
let g:netrw_altv = keep_altv
let t:netrw_lexbufnr = bufnr("%")
" done to prevent build-up of hidden buffers due to quitting and re-invocation of :Lexplore.
" Since the intended use of :Lexplore is to have an always-present explorer window, the extra
" effort to mis-use :Lex is warranted.
set bh=wipe
" call Decho("let t:netrw_lexbufnr=".t:netrw_lexbufnr)
" call Decho("t:netrw_lexposn".(exists("t:netrw_lexposn")? string(t:netrw_lexposn) : " n/a"))
if exists("t:netrw_lexposn")
@ -1908,7 +1937,7 @@ fun! s:NetrwRestoreSetting(keepvar,setting)
if type(a:setting) == 0
exe "let ".a:setting."= ".keepvarval
elseif type(a:setting) == 1
exe "let ".a:setting."= '".keepvarval."'"
exe "let ".a:setting."= '".substitute(keepvarval,"'","''","g")."'"
else
call netrw#ErrorMsg(s:ERROR,"(s:NetrwRestoreSetting) doesn't know how to restore ".a:keepvar." with a setting of type#".type(a:setting),105)
endif
@ -3640,6 +3669,8 @@ fun! s:NetrwBookHistSave()
let savefile= s:NetrwHome()."/.netrwhist"
" call Decho("savefile<".savefile.">",'~'.expand("<slnum>"))
1split
" setting up a new buffer which will become .netrwhist
call s:NetrwEnew()
" call Decho("case g:netrw_use_noswf=".g:netrw_use_noswf.(exists("+acd")? " +acd" : " -acd"),'~'.expand("<slnum>"))
if g:netrw_use_noswf
@ -4722,7 +4753,7 @@ endfun
" "new directory name" is actually a file,
" NetrwBrowseChgDir() edits the file.
fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">")
" call Dfunc("s:NetrwBrowseChgDir(islocal=".a:islocal."> newdir<".a:newdir.">) a:0=".a:0." win#".winnr()." curpos<".string(getpos("."))."> b:netrw_curdir<".(exists("b:netrw_curdir")? b:netrw_curdir : "").">")
" call Decho("tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> line#".line(".")." col#".col(".")." winline#".winline()." wincol#".wincol(),'~'.expand("<slnum>"))
let ykeep= @@
@ -4751,13 +4782,14 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
let newdir = a:newdir
let dolockout = 0
let dorestore = 1
" call Decho("win#".winnr(),'~'.expand("<slnum>"))
" call Decho("dirname<".dirname.">",'~'.expand("<slnum>"))
" call Decho("newdir<".newdir.">",'~'.expand("<slnum>"))
" ignore <cr>s when done in the banner
" call Decho('(s:NetrwBrowseChgDir) ignore [return]s when done in banner (g:netrw_banner='.g:netrw_banner.")",'~'.expand("<slnum>"))
if g:netrw_banner
" call Decho("w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a')." line(.)#".line('.')." line($)#".line("#"),'~'.expand("<slnum>"))
" call Decho("win#".winnr()." w:netrw_bannercnt=".(exists("w:netrw_bannercnt")? w:netrw_bannercnt : 'n/a')." line(.)#".line('.')." line($)#".line("#"),'~'.expand("<slnum>"))
if exists("w:netrw_bannercnt") && line(".") < w:netrw_bannercnt && line("$") >= w:netrw_bannercnt
if getline(".") =~# 'Quick Help'
" call Decho("#1: quickhelp=".g:netrw_quickhelp." ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>"))
@ -4794,7 +4826,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
" ------------------------------
" NetrwBrowseChgDir: edit a file {{{3
" ------------------------------
" call Decho('(s:NetrwBrowseChgDir) edit-a-file: case "handling a file": newdir<'.newdir.'> !~ dirpat<'.dirpat.">",'~'.expand("<slnum>"))
" call Decho('edit-a-file: case "handling a file": win#'.winnr().' newdir<'.newdir.'> !~ dirpat<'.dirpat.">",'~'.expand("<slnum>"))
" save position for benefit of Rexplore
let s:rexposn_{bufnr("%")}= winsaveview()
@ -4829,7 +4861,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
NetrwKeepj call s:NetrwOptionsRestore("s:")
let curdir= b:netrw_curdir
if !exists("s:didsplit")
" call Decho("edit-a-file: s:didsplit does not exist; g:netrw_browse_split=".string(g:netrw_browse_split)." win#".winnr(),'~'.expand("<slnum>"))
" " call Decho("edit-a-file: s:didsplit does not exist; g:netrw_browse_split=".string(g:netrw_browse_split)." win#".winnr()." g:netrw_chgwin=".g:netrw_chgwin",'~'.expand("<slnum>"))
if type(g:netrw_browse_split) == 3
" open file in server
" Note that g:netrw_browse_split is a List: [servername,tabnr,winnr]
@ -4837,22 +4869,27 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
call s:NetrwServerEdit(a:islocal,dirname)
" call Dret("s:NetrwBrowseChgDir")
return
elseif g:netrw_browse_split == 1
" horizontally splitting the window first
" call Decho("edit-a-file: horizontally splitting window prior to edit",'~'.expand("<slnum>"))
keepalt new
let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winheight(0))/100 : -g:netrw_winsize
exe "keepalt ".(g:netrw_alto? "bel " : "abo ").winsz."wincmd s"
if !&ea
keepalt wincmd _
endif
call s:SetRexDir(a:islocal,curdir)
elseif g:netrw_browse_split == 2
" vertically splitting the window first
" call Decho("edit-a-file: vertically splitting window prior to edit",'~'.expand("<slnum>"))
keepalt rightb vert new
let winsz= (g:netrw_winsize > 0)? (g:netrw_winsize*winwidth(0))/100 : -g:netrw_winsize
exe "keepalt ".(g:netrw_alto? "top " : "bot ")."vert ".winsz."wincmd s"
if !&ea
keepalt wincmd |
endif
call s:SetRexDir(a:islocal,curdir)
elseif g:netrw_browse_split == 3
" open file in new tab
" call Decho("edit-a-file: opening new tab prior to edit",'~'.expand("<slnum>"))
@ -4861,6 +4898,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
let b:netrw_curdir= getcwd()
endif
call s:SetRexDir(a:islocal,curdir)
elseif g:netrw_browse_split == 4
" act like "P" (ie. open previous window)
" call Decho("edit-a-file: use previous window for edit",'~'.expand("<slnum>"))
@ -4870,13 +4908,14 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
return
endif
call s:SetRexDir(a:islocal,curdir)
else
" handling a file, didn't split, so remove menu
" call Decho("edit-a-file: handling a file+didn't split, so remove menu",'~'.expand("<slnum>"))
call s:NetrwMenu(0)
" optional change to window
if g:netrw_chgwin >= 1
" call Decho("edit-a-file: changing window to #".g:netrw_chgwin,'~'.expand("<slnum>"))
" call Decho("edit-a-file: changing window to #".g:netrw_chgwin.": (due to g:netrw_chgwin)",'~'.expand("<slnum>"))
if winnr("$")+1 == g:netrw_chgwin
" if g:netrw_chgwin is set to one more than the last window, then
" vertically split the last window to make that window available.
@ -4889,19 +4928,26 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
endif
call s:SetRexDir(a:islocal,curdir)
endif
endif
" the point where netrw actually edits the (local) file
" if its local only: LocalBrowseCheck() doesn't edit a file, but NetrwBrowse() will
" no keepalt to support :e # to return to a directory listing
if !&mod
" if e the new file would fail due to &mod, then don't change any of the flags
let dolockout= 1
endif
if a:islocal
" call Decho("edit-a-file: edit local file: exe e! ".fnameescape(dirname),'~'.expand("<slnum>"))
" some like c-^ to return to the last edited file
" others like c-^ to return to the netrw buffer
" Apr 30, 2020: used to have e! here. That can cause loss of a modified file,
" so emit error E37 instead.
if exists("g:netrw_altfile") && g:netrw_altfile
exe "NetrwKeepj keepalt e! ".fnameescape(dirname)
exe "NetrwKeepj keepalt e ".fnameescape(dirname)
else
exe "NetrwKeepj e! ".fnameescape(dirname)
exe "NetrwKeepj e ".fnameescape(dirname)
endif
" call Decho("edit-a-file: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod,'~'.expand("<slnum>"))
call s:NetrwCursor()
@ -4912,7 +4958,6 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...)
else
" call Decho("edit-a-file: remote file: NetrwBrowse will edit it",'~'.expand("<slnum>"))
endif
let dolockout= 1
" handle g:Netrw_funcref -- call external-to-netrw functions
" This code will handle g:Netrw_funcref as an individual function reference
@ -5376,16 +5421,6 @@ fun! netrw#BrowseX(fname,remote)
endif
let ret= v:shell_error
elseif has("unix") && executable("kfmclient") && s:CheckIfKde()
" call Decho("(netrw#BrowseX) unix and kfmclient",'~'.expand("<slnum>"))
call s:NetrwExe("sil !kfmclient exec ".s:ShellEscape(fname,1)." ".redir)
let ret= v:shell_error
elseif has("unix") && executable("exo-open") && executable("xdg-open") && executable("setsid")
" call Decho("(netrw#BrowseX) unix, exo-open, xdg-open",'~'.expand("<slnum>"))
call s:NetrwExe("sil !setsid xdg-open ".s:ShellEscape(fname,1).redir)
let ret= v:shell_error
elseif has("unix") && $DESKTOP_SESSION == "mate" && executable("atril")
" call Decho("(netrw#BrowseX) unix and atril",'~'.expand("<slnum>"))
if a:fname =~ '^https\=://'
@ -5400,9 +5435,19 @@ fun! netrw#BrowseX(fname,remote)
endif
let ret= v:shell_error
elseif has("unix") && executable("kfmclient") && s:CheckIfKde()
" call Decho("(netrw#BrowseX) unix and kfmclient",'~'.expand("<slnum>"))
call s:NetrwExe("sil !kfmclient exec ".s:ShellEscape(fname,1)." ".redir)
let ret= v:shell_error
elseif has("unix") && executable("exo-open") && executable("xdg-open") && executable("setsid")
" call Decho("(netrw#BrowseX) unix, exo-open, xdg-open",'~'.expand("<slnum>"))
call s:NetrwExe("sil !setsid xdg-open ".s:ShellEscape(fname,1).redir.'&')
let ret= v:shell_error
elseif has("unix") && executable("xdg-open")
" call Decho("(netrw#BrowseX) unix and xdg-open",'~'.expand("<slnum>"))
call s:NetrwExe("sil !xdg-open ".s:ShellEscape(fname,1).redir)
call s:NetrwExe("sil !xdg-open ".s:ShellEscape(fname,1).redir.'&')
let ret= v:shell_error
elseif has("macunix") && executable("open")
@ -6107,10 +6152,10 @@ fun! s:NetrwListHide()
" Duplicate characters don't matter.
" Remove all such characters from the '/~@#...890' string.
" Use the first character left as a separator character.
" call Decho("find a character not in the hide string to use as a separator")
" call Decho("find a character not in the hide string to use as a separator",'~'.expand("<slnum>"))
let listhide= g:netrw_list_hide
let sep = strpart(substitute('~@#$%^&*{};:,<.>?|1234567890','['.escape(listhide,'-]^\').']','','ge'),1,1)
" call Decho("sep=".sep," (sep not in hide string)'~'.expand("<slnum>"))
" call Decho("sep<".sep."> (sep not in hide string)",'~'.expand("<slnum>"))
while listhide != ""
if listhide =~ ','
@ -6120,7 +6165,7 @@ fun! s:NetrwListHide()
let hide = listhide
let listhide = ""
endif
" call Decho("..extracted from listhide: hide<".hide."> g:netrw_sort_by<".g:netrw_sort_by.'>','~'.expand("<slnum>"))
" call Decho("..extracted pattern from listhide: hide<".hide."> g:netrw_sort_by<".g:netrw_sort_by.'>','~'.expand("<slnum>"))
if g:netrw_sort_by =~ '^[ts]'
if hide =~ '^\^'
" call Decho("..modify hide to handle a \"^...\" pattern",'~'.expand("<slnum>"))
@ -6132,7 +6177,7 @@ fun! s:NetrwListHide()
endif
" Prune the list by hiding any files which match
" call Decho("..prune the list by hiding any files which ",((g:netrw_hide == 1)? "" : "don't")." match hide<".hide.">")
" call Decho("..prune the list by hiding any files which ".((g:netrw_hide == 1)? "" : "don't")."match hide<".hide.">")
if g:netrw_hide == 1
" call Decho("..hiding<".hide.">",'~'.expand("<slnum>"))
exe 'sil! NetrwKeepj '.w:netrw_bannercnt.',$g'.sep.hide.sep.'d'
@ -9215,6 +9260,7 @@ endfun
" (full path directory with trailing slash returned)
fun! s:NetrwTreeDir(islocal)
" call Dfunc("s:NetrwTreeDir(islocal=".a:islocal.") getline(".line(".").")"."<".getline('.')."> b:netrw_curdir<".b:netrw_curdir."> tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> ft=".&ft)
" call Decho("Determine tree directory given current cursor position")
" call Decho("g:netrw_keepdir =".(exists("g:netrw_keepdir")? g:netrw_keepdir : 'n/a'),'~'.expand("<slnum>"))
" call Decho("w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("<slnum>"))
" call Decho("w:netrw_treetop =".(exists("w:netrw_treetop")? w:netrw_treetop : 'n/a'),'~'.expand("<slnum>"))
@ -9320,7 +9366,6 @@ fun! s:NetrwTreeDisplay(dir,depth)
call setline(line("$")+1,a:depth.shortdir.'/')
endif
" call Decho("setline#".line("$")." shortdir<".a:depth.shortdir.">",'~'.expand("<slnum>"))
" append a / to dir if its missing one
let dir= a:dir
@ -9334,7 +9379,7 @@ fun! s:NetrwTreeDisplay(dir,depth)
let listhide= split(g:netrw_list_hide,',')
" call Decho("listhide=".string(listhide))
for pat in listhide
call filter(w:netrw_treedict[dir],'v:val !~ "'.pat.'"')
call filter(w:netrw_treedict[dir],'v:val !~ "'.escape(pat,'\\').'"')
endfor
elseif g:netrw_hide == 2
@ -9472,6 +9517,7 @@ fun! s:NetrwTreeListing(dirname)
" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
" display from treetop on down
" call Decho("(s:NetrwTreeListing) w:netrw_treetop<".w:netrw_treetop.">")
NetrwKeepj call s:NetrwTreeDisplay(w:netrw_treetop,"")
" call Decho("s:NetrwTreeDisplay) setl noma nomod ro",'~'.expand("<slnum>"))
@ -9742,7 +9788,7 @@ fun! s:PerformListing(islocal)
" Hiding... -or- Showing... {{{3
if g:netrw_banner
" call Decho("--handle hiding/showing (g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">)",'~'.expand("<slnum>"))
" call Decho("--handle hiding/showing in banner (g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">)",'~'.expand("<slnum>"))
if g:netrw_list_hide != "" && g:netrw_hide
if g:netrw_hide == 1
NetrwKeepj put ='\" Hiding: '.g:netrw_list_hide
@ -9795,7 +9841,7 @@ fun! s:PerformListing(islocal)
" call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>"))
if !g:netrw_banner || line("$") >= w:netrw_bannercnt
" call Decho("manipulate directory listing (hide)",'~'.expand("<slnum>"))
" call Decho("manipulate directory listing (support hide)",'~'.expand("<slnum>"))
" call Decho("g:netrw_hide=".g:netrw_hide." g:netrw_list_hide<".g:netrw_list_hide.">",'~'.expand("<slnum>"))
if g:netrw_hide && g:netrw_list_hide != ""
NetrwKeepj call s:NetrwListHide()
@ -11808,7 +11854,7 @@ endfun
" ---------------------------------------------------------------------
" s:NetrwEnew: opens a new buffer, passes netrw buffer variables through {{{2
fun! s:NetrwEnew(...)
" call Dfunc("s:NetrwEnew() a:0=".a:0." bufnr($)=".bufnr("$")." expand(%)<".expand("%").">")
" call Dfunc("s:NetrwEnew() a:0=".a:0." win#".winnr()." winnr($)=".winnr("$")." bufnr($)=".bufnr("$")." expand(%)<".expand("%").">")
" call Decho("curdir<".((a:0>0)? a:1 : "")."> buf#".bufnr("%")."<".bufname("%").">",'~'.expand("<slnum>"))
" grab a function-local-variable copy of buffer variables
@ -11875,6 +11921,9 @@ fun! s:NetrwEnew(...)
endif
endif
endif
if v:version >= 700 && has("balloon_eval") && !exists("s:initbeval") && !exists("g:netrw_nobeval") && has("syntax") && exists("g:syntax_on")
let &l:bexpr = "netrw#BalloonHelp()"
endif
" call Dret("s:NetrwEnew : buf#".bufnr("%")."<".bufname("%")."> expand(%)<".expand("%")."> expand(#)<".expand("#")."> bh=".&bh." win#".winnr()." winnr($)#".winnr("$"))
endfun
@ -11934,6 +11983,7 @@ endfun
" -1=failed
fun! s:NetrwLcd(newdir)
" call Dfunc("s:NetrwLcd(newdir<".a:newdir.">)")
" call Decho("changing local directory",'~'.expand("<slnum>"))
let err472= 0
try
@ -11969,6 +12019,8 @@ fun! s:NetrwLcd(newdir)
return -1
endif
" call Decho("getcwd <".getcwd().">")
" call Decho("b:netrw_curdir<".b:netrw_curdir.">")
" call Dret("s:NetrwLcd 0")
return 0
endfun

View File

@ -1,8 +1,8 @@
" netrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
" Author: Charles E. Campbell
" Date: May 03, 2013
" Version: 11b ASTRO-ONLY
" Date: Sep 18, 2020
" Version: 11
" Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
@ -20,7 +20,7 @@
if exists("g:loaded_netrwFileHandlers") || &cp
finish
endif
let g:loaded_netrwFileHandlers= "v11b"
let g:loaded_netrwFileHandlers= "v11"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of netrwFileHandlers needs vim 7.2"

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

@ -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,14 @@ found here: |sort()|, |uniq()|.
With [i] case is ignored.
With [l] sort uses the current locale. See
`language collate` to check or set the locale used
for ordering. For example, with "en_US.UTF8",
Ö will be ordered after O and before P,
whereas with the Swedish locale "sv_SE.UTF8",
it will be after Z.
Case is typically ignored by the locale.
Options [n][f][x][o][b] are mutually exclusive.
With [n] sorting is done on the first decimal number
@ -1875,8 +1883,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 @@
*cmdline.txt* For Vim version 8.2. Last change: 2020 Aug 09
*cmdline.txt* For Vim version 8.2. Last change: 2020 Sep 14
VIM REFERENCE MANUAL by Bram Moolenaar
@ -797,7 +797,7 @@ three lines: >
<
Visual Mode and Range *v_:*
*:star-visual-range*
{Visual}: Starts a command-line with the Visual selected lines as a
range. The code `:'<,'>` is used for this range, which makes
it possible to select a similar line from the command-line
@ -873,34 +873,37 @@ it, no matter how many backslashes.
\\# \#
Also see |`=|.
*:<cword>* *<cword>* *:<cWORD>* *<cWORD>*
*:<cexpr>* *<cexpr>* *:<cfile>* *<cfile>*
*:<afile>* *<afile>* *:<abuf>* *<abuf>*
*:<amatch>* *<amatch>* *:<stack>* *<stack>*
*:<sfile>* *<sfile>* *:<slnum>* *<slnum>*
*:<sflnum>* *<sflnum>* *E499* *E500*
*E499* *E500*
Note: these are typed literally, they are not special keys!
*:<cword>* *<cword>*
<cword> is replaced with the word under the cursor (like |star|)
*:<cWORD>* *<cWORD>*
<cWORD> is replaced with the WORD under the cursor (see |WORD|)
*:<cexpr>* *<cexpr>*
<cexpr> is replaced with the word under the cursor, including more
to form a C expression. E.g., when the cursor is on "arg"
of "ptr->arg" then the result is "ptr->arg"; when the
cursor is on "]" of "list[idx]" then the result is
"list[idx]". This is used for |v:beval_text|.
*:<cfile>* *<cfile>*
<cfile> is replaced with the path name under the cursor (like what
|gf| uses)
*:<afile>* *<afile>*
<afile> When executing autocommands, is replaced with the file name
of the buffer being manipulated, or the file for a read or
write. *E495*
*:<abuf>* *<abuf>*
<abuf> When executing autocommands, is replaced with the currently
effective buffer number (for ":r file" and ":so file" it is
the current buffer, the file being read/sourced is not in a
buffer). *E496*
*:<amatch>* *<amatch>*
<amatch> When executing autocommands, is replaced with the match for
which this autocommand was executed. *E497*
It differs from <afile> only when the file name isn't used
to match with (for FileType, Syntax and SpellFileMissing
events).
*:<sfile>* *<sfile>*
<sfile> When executing a ":source" command, is replaced with the
file name of the sourced file. *E498*
When executing a function, is replaced with the call stack,
@ -908,18 +911,24 @@ Note: these are typed literally, they are not special keys!
<stack> is preferred).
Note that filename-modifiers are useless when <sfile> is
not used inside a script.
*:<stack>* *<stack>*
<stack> is replaced with the call stack, using
"function {function-name}[{lnum}]" for a function line
and "script {file-name}[{lnum}]" for a script line, and
".." in between items. E.g.:
"function {function-name1}[{lnum}]..{function-name2}[{lnum}]"
*:<slnum>* *<slnum>*
<slnum> When executing a ":source" command, is replaced with the
line number. *E842*
When executing a function it's the line number relative to
the start of the function.
*:<sflnum>* *<sflnum>*
<sflnum> When executing a script, is replaced with the line number.
It differs from <slnum> in that <sflnum> is replaced with
the script line number in any situation. *E961*
*:<client>* *<client>*
<client> is replaced with the {clinetid} of the last received
message in |server2client()|
*filename-modifiers*
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs* *::S*

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 06
*eval.txt* For Vim version 8.2. Last change: 2020 Oct 23
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
@ -2641,7 +2681,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 +2701,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 +2746,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 +3126,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 +3503,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|: >
@ -4302,6 +4345,7 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
<afile> autocmd file name
<abuf> autocmd buffer number (as a String!)
<amatch> autocmd matched name
<cexpr> C expression under the cursor
<sfile> sourced script file or function name
<slnum> sourced script line number or function
line number
@ -4309,6 +4353,7 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
a function
<SID> "<SNR>123_" where "123" is the
current script ID |<SID>|
<stack> call stack
<cword> word under the cursor
<cWORD> WORD under the cursor
<client> the {clientid} of the last received
@ -5256,13 +5301,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
@ -5473,8 +5525,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})
@ -5489,7 +5542,7 @@ getmarklist([{expr}]) *getmarklist()*
local marks defined in buffer {expr}. For the use of {expr},
see |bufname()|.
Each item in the retuned List is a |Dict| with the following:
Each item in the returned List is a |Dict| with the following:
name - name of the mark prefixed by "'"
pos - a |List| with the position of the mark:
[bufnum, lnum, col, off]
@ -7309,12 +7362,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
@ -7325,11 +7401,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
@ -7605,13 +7711,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|: >
@ -7862,8 +7972,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.
@ -9590,6 +9700,13 @@ 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 locale
is used for ordering. See `language collate` to check or set
the locale used for ordering. For example, with "en_US.UTF8",
Ö will be ordered after O and before P, whereas with the
Swedish locale "sv_SE.UTF8", it will be after Z.
Case is typically ignored by the locale.
When {func} is given and it is 'n' then all items will be
sorted numerical (Implementation detail: This uses the
strtod() function to parse numbers, Strings, Lists, Dicts and
@ -10293,7 +10410,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"
@ -10597,8 +10716,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
@ -11254,7 +11373,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.
@ -12028,8 +12148,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.
@ -12364,7 +12485,9 @@ text...
< is equivalent to: >
:let x = 1
:lockvar! x
< This is useful if you want to make sure the variable
< NOTE: in Vim9 script `:const` works differently, see
|vim9-const|
This is useful if you want to make sure the variable
is not modified. If the value is a List or Dictionary
literal then the items also cannot be changed: >
const ll = [1, 2, 3]
@ -12404,6 +12527,8 @@ text...
[depth] is relevant when locking a |List| or
|Dictionary|. It specifies how deep the locking goes:
0 Lock the variable {name} but not its
value.
1 Lock the |List| or |Dictionary| itself,
cannot add or remove items, but can
still change their values.
@ -12417,7 +12542,14 @@ text...
|Dictionary|, one level deeper.
The default [depth] is 2, thus when {name} is a |List|
or |Dictionary| the values cannot be changed.
*E743*
Example with [depth] 0: >
let mylist = [1, 2, 3]
lockvar 0 mylist
let mylist[0] = 77 " OK
call add(mylist, 4] " OK
let mylist = [7, 8, 9] " Error!
< *E743*
For unlimited depth use [!] and omit [depth].
However, there is a maximum depth of 100 to catch
loops.

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 Apr 30
*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
@ -1843,6 +1844,7 @@ a Append text after the cursor [count] times. If the
*A*
A Append text at the end of the line [count] times.
For using "A" in Visual block mode see |v_b_A|.
<insert> or *i* *insert* *<Insert>*
i Insert text before the cursor [count] times.
@ -1855,6 +1857,7 @@ I Insert text before the first non-blank in the line
When the 'H' flag is present in 'cpoptions' and the
line only contains blanks, insert start just before
the last blank.
For using "I" in Visual block mode see |v_b_I|.
*gI*
gI Insert text in column 1 [count] times.

View File

@ -1,4 +1,4 @@
*map.txt* For Vim version 8.2. Last change: 2020 Sep 06
*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
@ -1506,7 +1524,7 @@ The valid escape sequences are
<bang> (See the '-bang' attribute) Expands to a ! if the
command was executed with a ! modifier, otherwise
expands to nothing.
*<mods>* *:command-modifiers*
*<mods>* *<q-mods>* *:command-modifiers*
<mods> The command modifiers, if specified. Otherwise, expands to
nothing. Supported modifiers are |:aboveleft|, |:belowright|,
|:botright|, |:browse|, |:confirm|, |:hide|, |:keepalt|,

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 @@
*options.txt* For Vim version 8.2. Last change: 2020 Sep 06
*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
@ -2806,7 +2806,10 @@ A jump table for the options with a short description can be found at |Q_op|.
'emoji' 'emo' boolean (default: on)
global
When on all Unicode emoji characters are considered to be full width.
This excludes "text emoji" characters, which are normally displayed as
single width. Unfortunately there is no good specification for this
and it has been determined on trial-and-error basis. Use the
|setcellwidths()| function to change the behavior.
*'encoding'* *'enc'* *E543*
'encoding' 'enc' string (default: "latin1" or value from $LANG)
@ -4679,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
@ -7222,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: >
@ -7288,8 +7291,8 @@ A jump table for the options with a short description can be found at |Q_op|.
N N Printer page number. (Only works in the 'printheader' option.)
l N Line number.
L N Number of lines in buffer.
c N Column number.
v N Virtual column number.
c N Column number (byte index).
v N Virtual column number (screen column).
V N Virtual column number as -{num}. Not displayed if equal to 'c'.
p N Percentage through file in lines as in |CTRL-G|.
P S Percentage through file of displayed window. This is like the

View File

@ -1,4 +1,4 @@
*pi_netrw.txt* For Vim version 8.2. Last change: 2020 Aug 15
*pi_netrw.txt* For Vim version 8.2. Last change: 2020 Sep 19
------------------------------------------------
NETRW REFERENCE MANUAL by Charles E. Campbell
@ -437,9 +437,13 @@ settings are described below, in |netrw-browser-options|, and in
*g:netrw_silent* =0 : transfers done normally
=1 : transfers done silently
*g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one
*g:netrw_use_errorwindow* =2: messages from netrw will use a popup window
Move the mouse and pause to remove the popup window.
(default value if popup windows are availble)
=1 : messages from netrw will use a separate one
line window. This window provides reliable
delivery of messages. (default)
delivery of messages.
(default value if popup windows are not availble)
=0 : messages from netrw will use echoerr ;
messages don't always seem to show up this
way, but one doesn't have to quit the window.
@ -725,6 +729,8 @@ just as easily as if they were local files! >
See |netrw-activate| for more on how to encourage your vim to use plugins
such as netrw.
For password-free use of scp:, see |netrw-ssh-hack|.
==============================================================================
7. Ex Commands *netrw-ex* {{{1
@ -1063,7 +1069,7 @@ QUICK HELP *netrw-quickhelp* {{{2
Reverse sorting order.........................|netrw-r|
*netrw-quickmap* *netrw-quickmaps*
*netrw-quickmap* *netrw-quickmaps*
QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
>
--- ----------------- ----
@ -1080,7 +1086,7 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
a Cycles between normal display, |netrw-a|
hiding (suppress display of files matching g:netrw_list_hide)
and showing (display only files which match g:netrw_list_hide)
c Make browsing directory the current directory |netrw-c|
cd Make browsing directory the current directory |netrw-cd|
C Setting the editing window |netrw-C|
d Make a directory |netrw-d|
D Attempt to remove the file(s)/directory(ies) |netrw-D|
@ -2098,7 +2104,7 @@ the two directories the same, use the "cd" map (type cd). That map will
set Vim's notion of the current directory to netrw's current browsing
directory.
*netrw-c* : This map's name has been changed from "c" to cd (see |netrw-cd|).
|netrw-cd|: This map's name was changed from "c" to cd (see |netrw-cd|).
This change was done to allow for |netrw-cb| and |netrw-cB| maps.
Associated setting variable: |g:netrw_keepdir|
@ -2753,7 +2759,7 @@ your browsing preferences. (see also: |netrw-settings|)
=0 keep the current directory the same as the
browsing directory.
The current browsing directory is contained in
b:netrw_curdir (also see |netrw-c|)
b:netrw_curdir (also see |netrw-cd|)
*g:netrw_keepj* ="keepj" (default) netrw attempts to keep the
|:jumps| table unaffected.
@ -3054,7 +3060,7 @@ your browsing preferences. (see also: |netrw-settings|)
(see |netrw-c-tab|).
*g:netrw_xstrlen* Controls how netrw computes string lengths,
including multibyte characters' string
including multi-byte characters' string
length. (thanks to N Weibull, T Mechelynck)
=0: uses Vim's built-in strlen()
=1: number of codepoints (Latin a + combining
@ -3124,7 +3130,8 @@ a file using the local browser (by putting the cursor on it) and pressing
Related topics:
* To see what the current directory is, use |:pwd|
* To make the currently browsed directory the current directory, see |netrw-c|
* To make the currently browsed directory the current directory, see
|netrw-cd|
* To automatically make the currently browsed directory the current
directory, see |g:netrw_keepdir|.
@ -3799,9 +3806,15 @@ netrw:
or
http://vim.sourceforge.net/scripts/script.php?script_id=120
Decho.vim is provided as a "vimball"; see |vimball-intro|.
Decho.vim is provided as a "vimball"; see |vimball-intro|. You
should edit the Decho.vba.gz file and source it in: >
2. Edit the <netrw.vim> file by typing: >
vim Decho.vba.gz
:so %
:q
<
2. To turn on debug tracing in netrw, then edit the <netrw.vim>
file by typing: >
vim netrw.vim
:DechoOn
@ -3823,14 +3836,34 @@ netrw:
read/write your file over the network in a separate tab or
server vim window.
To save the file, use >
Change the netrw.vimrc file to include the Decho plugin: >
set nocp
so $HOME/.vim/plugin/Decho.vim
so $HOME/.vim/plugin/netrwPlugin.vim
<
You should continue to run vim with >
vim -u netrw.vimrc --noplugins -i NONE [some path here]
<
to avoid entanglements with options and other plugins.
To save the file: under linux, the output will be in a separate
remote server window; in it, just save the file with >
:w! DBG
< Under a vim that doesn't support clientserver, your debugging
output will appear in another tab: >
:tabnext
:set bt=
:w! DBG
<
Furthermore, it'd be helpful if you would type >
< Furthermore, it'd be helpful if you would type >
:Dsep <command>
< where <command> is the command you're about to type next,
thereby making it easier to associate which part of the
debugging trace is due to which command.
@ -3838,17 +3871,34 @@ netrw:
Please send that information to <netrw.vim>'s maintainer along
with the o/s you're using and the vim version that you're using
(see |:version|) (remove the embedded NOSPAM first) >
NcampObell@SdrPchip.AorgM-NOSPAM
<
==============================================================================
12. History *netrw-history* {{{1
v170: Mar 11, 2020 * (reported by Reiner Herrmann) netrw+tree
would not hide with the ^\..* pattern
correctly.
* (Marcin Szamotulski) NetrwOptionRestore
did not restore options correctly that
had a single quote in the option string.
Apr 13, 2020 * implemented error handling via popup
windows (see |popup_beval()|)
Apr 30, 2020 * (reported by Manatsu Takahashi) while
using Lexplore, a modified file could
be overwritten. Sol'n: will not overwrite,
but will emit an |E37| (although one cannot
add an ! to override)
Jun 07, 2020 * (reported by Jo Totland) repeatedly invoking
:Lexplore and quitting it left unused
hidden buffers. Netrw will now set netrw
buffers created by :Lexplore to |bh|=wipe.
v169: Dec 20, 2019 * (reported by amkarthik) that netrw's x
(|netrw-x|) would throw an error when
attempting to open a local directory.
v168: Dec 12, 2019 * scp timeout error message not reported,
hopefully now fixed (Shane Xb Qian)
v167: Nov 29, 2019 * netrw does a save&restore on @* and @+.
That causes problems with the clipboard.
Now restores occurs only if @* or @+ have
@ -4306,4 +4356,4 @@ netrw:
==============================================================================
Modelines: {{{1
vim:tw=78:ts=8:noet:ft=help:norl:fdm=marker
vim:tw=78:ts=8:ft=help:noet:norl:fdm=marker

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 Jul 27
*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,11 +911,22 @@ 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
'ttimeoutlen' option to 100 and set 'timeout' and/or 'ttimeout'.
*popup-filter-errors*
If the filter function can't be called, e.g. because the name is wrong, then
the popup is closed. If the filter causes an error then it is assumed to
return zero. If this happens three times in a row the popup is closed. If
the popup gives errors fewer than 10% of the calls then it won't be closed.
POPUP CALLBACK *popup-callback*

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 @@
*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

@ -4809,6 +4809,7 @@ in their own color.
highlighting for groups added by the user!
Uses the current value of 'background' to decide which
default colors to use.
If there was a default link, restore it. |:hi-link|
:hi[ghlight] clear {group-name}
:hi[ghlight] {group-name} NONE

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

@ -1975,6 +1975,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:<cWORD> cmdline.txt /*:<cWORD>*
:<cexpr> cmdline.txt /*:<cexpr>*
:<cfile> cmdline.txt /*:<cfile>*
:<client> cmdline.txt /*:<client>*
:<cword> cmdline.txt /*:<cword>*
:<sfile> cmdline.txt /*:<sfile>*
:<sflnum> cmdline.txt /*:<sflnum>*
@ -2446,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*
@ -3160,6 +3162,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:sta windows.txt /*:sta*
:stag windows.txt /*:stag*
:star repeat.txt /*:star*
:star-visual-range cmdline.txt /*:star-visual-range*
:start insert.txt /*:start*
:startgreplace insert.txt /*:startgreplace*
:startinsert insert.txt /*:startinsert*
@ -3369,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*
@ -3614,6 +3618,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
<cexpr> cmdline.txt /*<cexpr>*
<cfile> cmdline.txt /*<cfile>*
<character> intro.txt /*<character>*
<client> cmdline.txt /*<client>*
<count> map.txt /*<count>*
<cword> cmdline.txt /*<cword>*
<f-args> map.txt /*<f-args>*
@ -3643,6 +3648,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
<mods> map.txt /*<mods>*
<nomodeline> autocmd.txt /*<nomodeline>*
<q-args> map.txt /*<q-args>*
<q-mods> map.txt /*<q-mods>*
<range> map.txt /*<range>*
<reg> map.txt /*<reg>*
<register> map.txt /*<register>*
@ -3685,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 /*@:*
@ -4371,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*
@ -4925,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*
@ -6324,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*
@ -6457,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*
@ -7751,6 +7761,8 @@ matchaddpos() eval.txt /*matchaddpos()*
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*
@ -7929,7 +7941,6 @@ netrw-browser-options pi_netrw.txt /*netrw-browser-options*
netrw-browser-settings pi_netrw.txt /*netrw-browser-settings*
netrw-browser-var pi_netrw.txt /*netrw-browser-var*
netrw-browsing pi_netrw.txt /*netrw-browsing*
netrw-c pi_netrw.txt /*netrw-c*
netrw-c-tab pi_netrw.txt /*netrw-c-tab*
netrw-cB pi_netrw.txt /*netrw-cB*
netrw-cadaver pi_netrw.txt /*netrw-cadaver*
@ -8392,6 +8403,7 @@ popup-callback popup.txt /*popup-callback*
popup-close popup.txt /*popup-close*
popup-examples popup.txt /*popup-examples*
popup-filter popup.txt /*popup-filter*
popup-filter-errors popup.txt /*popup-filter-errors*
popup-filter-mode popup.txt /*popup-filter-mode*
popup-function-details popup.txt /*popup-function-details*
popup-functions popup.txt /*popup-functions*
@ -9644,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*
@ -10029,10 +10043,13 @@ vim.vim syntax.txt /*vim.vim*
vim7 version7.txt /*vim7*
vim8 version8.txt /*vim8*
vim9 vim9.txt /*vim9*
vim9-classes vim9.txt /*vim9-classes*
vim9-const vim9.txt /*vim9-const*
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 07
*todo.txt* For Vim version 8.2. Last change: 2020 Oct 26
VIM REFERENCE MANUAL by Bram Moolenaar
@ -38,48 +38,19 @@ 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?
Sign highlight in signcolumn disappears if there is line highlighting.
Making everything work:
- Should :const work the same as in legacy script?
Or should it work like in Typescript: only the variable is fixed, not the
value itself.
Then use ":const!" to also fix/lock the value?
Typescript uses "as const", which is weird.
Alternative: const var = <const>value
looks quite strange quite verbose
But can be used in several places:
SomeFunc(<const>[1, 2, 3])
In Vim this basically means "lock this value".
How about:
SomeFunc(<const>[[1], [2], [3]]) # are sub-lists immutable?
SomeFunc(<const>myList) # is myList mutable afterwards?
- Test all command modifiers.
- Check many more builtin function arguments at compile time.
- Closure arguments should be more strict, 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()
- :put with a "=" register argument doesn't work, need to find the expression
and compile it. (#6397)
- 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
- 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'
@ -87,9 +58,10 @@ Making everything work:
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.
- 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.
- 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?
- 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.
@ -99,15 +71,19 @@ 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
- Test that a function defined inside a :def function is local to that
function, g: functions can be defined and script-local functions cannot be
defined.
- Does this work already: can use func as reference:
def SomeFunc() ...
map(list, SomeFunc)
- Support passing v:none to use the default argument value. (#6504)
- make 0 == 'string' fail on the script level, like inside :def.
- Check that when using a user function name without prefix, it does not find
@ -123,23 +99,21 @@ Making everything work:
- Compile redir to local variable: var_redir_start().
- Compile builtin functions that access local variables:
islocked()
- possible memory leak in test_vim9_func through compile_nested_function.
- memory leaks in test_vim9_expr
- memory leaks in test_vim9_script
- memory leaks in test_vim9_cmd
- 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.
@ -151,24 +125,23 @@ Also:
- Make Foo.Bar() work to call the dict function. (#5676)
- Error in any command in "vim9script" aborts sourcing.
- Find a way to test expressions in legacy and Vim9 script without duplication
- Fix memory leaks for test_vim9_disassemble, test_vim9_expr, test_vim9_script
- Test each level of expressions properly, with type checking
- Test try/catch and throw better, also nested.
Test return inside try/finally jumps to finally and then returns.
- can use func as reference:
def SomeFunc() ...
map(list, SomeFunc)
- Test: Function declared inside a :def function is local, disappears at the
end of the function. Unless g: is used, just like with variables.
- implement :type
- import type declaration?
- implement class
- implement interface
- predefined class: Promise<T>
- Future work: See |vim9-classes|
- implement enum
- Make accessing varargs faster: arg[expr]
EVAL expr
LOADVARARG (varags idx)
- Make debugging work - at least per function. Need to recompile a function
to step through it line-by-line? Evaluate the stack and variables on the
stack?
- Make profiling work - Add ISN_PROFILE instructions after every line?
- List commands when 'verbose' is set or :verbose is used.
Further improvements:
- compile options that are an expression, e.g. "expr:" in 'spellsuggest',
'foldexpr', 'foldtext', 'printexpr', 'diffexpr', 'patchexpr', 'charconvert',
@ -183,6 +156,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?)
@ -291,8 +269,13 @@ 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 writtten by Felipe Morales.
Was originally written by Felipe Morales.
Remove SPACE_IN_FILENAME ? It is only used for completion.
@ -303,6 +286,21 @@ 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)
Can we detect true color support? https://gist.github.com/XVilka/8346728
Try setting a color then request the current color, like using t_u7.
@ -328,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:
@ -347,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)
@ -397,6 +398,9 @@ When 'fileignorecase' is set ":e testfile.c" works to edit TestFile.c, but
":find testfile.c" does not ignore case.
Might be related to #6088.
Error for reverse range when using :vimgrep in file "[id-01] file.txt".
(#6919)
When changing the crypt key the buffer should be considered modified.
Like when changing 'fileformat'. Save the old key in save_file_ff().
(Ninu-Ciprian Marginean)
@ -435,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("@#") ?
@ -514,7 +517,7 @@ Better: use the "z" prefix. or ]t) and [t(.
Modeless selection doesn't work in gvim. (#4783)
Caused by patch 8.1.1534.
Visual highlight not removed when 'dipslay' is "lastline" and line doesn't
Visual highlight not removed when 'display' is "lastline" and line doesn't
fit. (Kevin Lawler, #4457)
Current position in the changelist should be local to the buffer. (#2173)
@ -528,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
@ -574,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)
@ -1253,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)
@ -1487,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
@ -1708,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.
@ -1776,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.
@ -2458,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)
@ -2967,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)
@ -2986,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
@ -3273,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)
@ -3841,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

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
@ -42445,7 +42445,7 @@ Files: src/filepath.c, src/testdir/test_fnamemodify.vim
Patch 8.2.0216
Problem: Several Vim9 instructions are not tested.
Solution: Add more tests. Fix :disassamble output. Make catch with pattern
Solution: Add more tests. Fix :disassemble output. Make catch with pattern
work.
Files: src/testdir/test_vim9_script.vim, src/vim9execute.c,
src/vim9compile.c
@ -42665,7 +42665,7 @@ Solution: Change to int. (Mike Williams)
Files: src/vim9compile.c
Patch 8.2.0253
Problem: Crash when using :disassamble without argument. (Dhiraj Mishra)
Problem: Crash when using :disassemble without argument. (Dhiraj Mishra)
Solution: Check for missing argument. (Dominique Pellé, closes #5635,
closes #5637)
Files: src/vim9execute.c, src/testdir/test_vim9_disassemble.vim,
@ -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

@ -1,4 +1,4 @@
*vim9.txt* For Vim version 8.2. Last change: 2020 Sep 13
*vim9.txt* For Vim version 8.2. Last change: 2020 Oct 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -19,6 +19,7 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
3. New style functions |fast-functions|
4. Types |vim9-types|
5. Namespace, Import and Export |vim9script|
6. Future work: classes |vim9-classes|
9. Rationale |vim9-rationale|
@ -49,13 +50,14 @@ errors are handled.
The Vim9 script syntax and semantics are used in:
- a function defined with the `:def` command
- a script file where the first command is `vim9script`
- an autocommand defined in the context of these
- an autocommand defined in the context of the above
When using `:function` in a Vim9 script file the legacy syntax is used.
However, this can be confusing and is therefore discouraged.
Vim9 script and legacy Vim script can be mixed. There is no requirement to
rewrite old scripts, they keep working as before.
rewrite old scripts, they keep working as before. You may want to use a few
`:def` functions for code that needs to be fast.
==============================================================================
@ -63,12 +65,41 @@ rewrite old scripts, they keep working as before.
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
@ -123,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
@ -152,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
@ -184,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!
@ -195,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
@ -207,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.
@ -294,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.
@ -305,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
@ -409,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.
@ -436,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
@ -459,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'
@ -580,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
@ -610,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
@ -688,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.
@ -714,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.
@ -732,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
@ -747,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
@ -764,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
@ -784,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.
@ -807,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 ...
@ -834,6 +887,8 @@ In case the name is ambiguous, another name can be specified: >
To import all exported items under a specific identifier: >
import * as That from 'thatscript.vim'
{not implemented yet: using "This as That"}
Then you can use "That.EXPORTED_CONST", "That.someValue", etc. You are free
to choose the name "That", but it is highly recommended to use the name of the
script file to avoid confusion.
@ -846,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.
@ -876,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
@ -885,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.
@ -900,13 +955,44 @@ If an `import` statement is used in legacy Vim script, the script-local "s:"
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 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.
Thoughts:
- `class` / `endclass`, everything in one file
- Class names are always CamelCase
- Single constructor
- Single inheritance with `class ThisClass extends BaseClass`
- `abstract class`
- `interface` (Abstract class without any implementation)
- `class SomeClass implements SomeInterface`
- Generics for class: `class <Tkey, Tentry>`
- Generics for function: `def <Tkey> GetLast(key: Tkey)`
Again, much of this is from TypeScript.
Some things that look like good additions:
- Use a class as an interface (like Dart)
- Extend a class with methods, using an import (like Dart)
An important class that will be provided is "Promise". Since Vim is single
threaded, connecting asynchronous operations is a natural way of allowing
plugins to do their work without blocking the user. It's a uniform way to
invoke callbacks and handle timeouts and errors.
==============================================================================
9. Rationale *vim9-rationale*
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
@ -917,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.
@ -933,75 +1019,65 @@ 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.
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".
Compiling functions early ~
Removing clutter and weirdness ~
Functions are compiled when called or when `:defcompile` is used. Why not
compile them early, so that syntax and type errors are reported early?
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 does.
The functions can't be compiled right away when encountered, because there may
be forward references to functions defined later. Consider defining functions
A, B and C, where A calls B, B calls C, and C calls A again. It's impossible
to reorder the functions to avoid forward references.
We can also remove clutter, mainly things that were done to make Vim script
backwards compatible with the good old Vi commands.
An alternative would be to first scan through the file to locate items and
figure out their type, so that forward references are found, and only then
execute the script and compile the functions. This means the script has to be
parsed twice, which is slower, and some conditions at the script level, such
as checking if a feature is supported, are hard to use. An attempt was made
to see if it works, but it turned out to be impossible to make work nicely.
Examples:
- Drop `:call` for calling a function and `:eval` for manipulating data.
- Drop using a leading backslash for line continuation, automatically figure
out where an expression ends.
It would be possible to compile all the functions at the end of the script.
The drawback is that if a function never gets called, the overhead of
compiling it counts anyway. Since startup speed is very important, in most
cases it's better to do it later and accept that syntax and type errors are
only reported then. In case these errors should be found early, e.g. when
testing, the `:defcompile` command will help out.
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 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
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 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.
There is no intention to completely match TypeScript syntax and semantics. We
just want to take those parts that we can use for Vim and we expect Vim users
will be happy with. TypeScript is a complex language with its own advantages
and disadvantages. To get an idea of the disadvantages read the book:
"JavaScript: The Good Parts". Or find the article "TypeScript: the good
will be happy with. TypeScript is a complex language with its own history,
advantages and disadvantages. To get an idea of the disadvantages read the
book: "JavaScript: The Good Parts". Or find the article "TypeScript: the good
parts" and read the "Things to avoid" section.
People used to other languages (Java, Python, etc.) will also find things in
TypeScript that they do not like or do not understand. We'll try to avoid
those things.
People familiar with other languages (Java, Python, etc.) will also find
things in TypeScript that they do not like or do not understand. We'll try to
avoid those things.
Specific items from TypeScript we avoid:
- Overloading "+", using it both for addition and string concatenation. This
@ -1011,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.
@ -1020,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
@ -1054,24 +1220,56 @@ globally can be used, not the exported items. Alternatives considered:
Note that you can also use `:import` in legacy Vim script, see above.
Classes ~
Compiling functions early ~
Functions are compiled when called or when `:defcompile` is used. Why not
compile them early, so that syntax and type errors are reported early?
The functions can't be compiled right away when encountered, because there may
be forward references to functions defined later. Consider defining functions
A, B and C, where A calls B, B calls C, and C calls A again. It's impossible
to reorder the functions to avoid forward references.
An alternative would be to first scan through the file to locate items and
figure out their type, so that forward references are found, and only then
execute the script and compile the functions. This means the script has to be
parsed twice, which is slower, and some conditions at the script level, such
as checking if a feature is supported, are hard to use. An attempt was made
to see if it works, but it turned out to be impossible to make work nicely.
It would be possible to compile all the functions at the end of the script.
The drawback is that if a function never gets called, the overhead of
compiling it counts anyway. Since startup speed is very important, in most
cases it's better to do it later and accept that syntax and type errors are
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 embedded language? ~
Vim supports interfaces to Perl, Python, Lua, Tcl and a few others. But
these interfaces have never become widespread. When Vim 9 was designed a
decision was made to phase out these interfaces and concentrate on Vim script,
while encouraging plugin authors to write code in any language and run it as
an external tool, using jobs and channels.
these interfaces have never become widely used, for various reasons. When
Vim9 was designed a decision was made to make these interfaces lower priority
and concentrate on Vim script.
Still, using an external tool has disadvantages. An alternative is to convert
Still, plugin writers may find other languages more familiar, want to use
existing libraries or see a performance benefit. We encourage plugin authors
to write code in any language and run it as an external tool, using jobs and
channels. We can try to make this easier somehow.
Using an external tool also has disadvantages. An alternative is to convert
the tool into Vim script. For that to be possible without too much
translation, and keeping the code fast at the same time, the constructs of the
tool need to be supported. Since most languages support classes the lack of
support for classes in Vim is then a problem.
Previously Vim supported a kind-of object oriented programming by adding
methods to a dictionary. With some care this could be made to work, but it
does not look like real classes. On top of that, it's very slow, because of
the use of dictionaries.
Classes ~
Vim supports a kind-of object oriented programming by adding methods to a
dictionary. With some care this can be made to work, but it does not look
like real classes. On top of that, it's quite slow, because of the use of
dictionaries.
The support of classes in Vim9 script is a "minimal common functionality" of
class support in most languages. It works much like Java, which is the most

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))
@ -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,10 @@
" Vim filetype plugin
" Language: awk, nawk, gawk, mawk
" Maintainer: Antonio Colombo <azc100@gmail.com>
" Last Change: 2017 Feb 17
" 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 +14,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

@ -4,9 +4,9 @@
" Contributors: Edwin Fine <efine145_nospam01 at usa dot net>
" Pawel 'kTT' Salata <rockplayer.pl@gmail.com>
" Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
" Last Update: 2013-Jul-21
" Last Update: 2020-Jun-11
" License: Vim license
" URL: https://github.com/hcs42/vim-erlang
" URL: https://github.com/vim-erlang/vim-erlang-runtime
" Note About Usage:
" This indentation script works best with the Erlang syntax file created by
@ -56,7 +56,8 @@ endfunction
" Line tokenizer library {{{1
" ======================
" Indtokens are "indentation tokens".
" Indtokens are "indentation tokens". See their exact format in the
" documentaiton of the s:GetTokensFromLine function.
" Purpose:
" Calculate the new virtual column after the given segment of a line.
@ -119,9 +120,10 @@ endfunction
" Returns:
" indtokens = [indtoken]
" indtoken = [token, vcol, col]
" token = string (examples: 'begin', '<variable>', '}')
" vcol = integer (the virtual column of the first character of the token)
" col = integer
" token = string (examples: 'begin', '<quoted_atom>', '}')
" vcol = integer (the virtual column of the first character of the token;
" counting starts from 0)
" col = integer (counting starts from 0)
function! s:GetTokensFromLine(line, string_continuation, atom_continuation,
\tabstop)
@ -386,9 +388,12 @@ endfunction
" lnum: integer
" direction: 'up' | 'down'
" Returns:
" result: [] -- the result is an empty list if we hit the beginning or end
" of the file
" | indtoken
" result: [[], 0, 0]
" -- the result is an empty list if we hit the beginning or end of
" the file
" | [indtoken, lnum, i]
" -- the content, lnum and token index of the next (or previous)
" indtoken
function! s:FindIndToken(lnum, dir)
let lnum = a:lnum
while 1
@ -396,9 +401,12 @@ function! s:FindIndToken(lnum, dir)
let [lnum, indtokens] = s:TokenizeLine(lnum, a:dir)
if lnum ==# 0
" We hit the beginning or end of the file
return []
return [[], 0, 0]
elseif !empty(indtokens)
return indtokens[a:dir ==# 'up' ? -1 : 0]
" We found a non-empty line. If we were moving up, we return the last
" token of this line. Otherwise we return the first token if this line.
let i = (a:dir ==# 'up' ? len(indtokens) - 1 : 0)
return [indtokens[i], lnum, i]
endif
endwhile
endfunction
@ -417,7 +425,7 @@ function! s:PrevIndToken(lnum, i)
" If the current line has a previous token, return that
if a:i > 0
return s:all_tokens[a:lnum][a:i - 1]
return [s:all_tokens[a:lnum][a:i - 1], a:lnum, a:i - 1]
else
return s:FindIndToken(a:lnum, 'up')
endif
@ -437,7 +445,7 @@ function! s:NextIndToken(lnum, i)
" If the current line has a next token, return that
if len(s:all_tokens[a:lnum]) > a:i + 1
return s:all_tokens[a:lnum][a:i + 1]
return [s:all_tokens[a:lnum][a:i + 1], a:lnum, a:i + 1]
else
return s:FindIndToken(a:lnum, 'down')
endif
@ -518,7 +526,9 @@ endfunction
" ok. % IsLineAtomContinuation = false
function! s:IsLineAtomContinuation(lnum)
if has('syntax_items')
return synIDattr(synID(a:lnum, 1, 0), 'name') =~# '^erlangQuotedAtom'
let syn_name = synIDattr(synID(a:lnum, 1, 0), 'name')
return syn_name =~# '^erlangQuotedAtom' ||
\ syn_name =~# '^erlangQuotedRecord'
else
return 0
endif
@ -535,7 +545,7 @@ endfunction
" is_standalone: bool
function! s:IsCatchStandalone(lnum, i)
call s:Log(' IsCatchStandalone called: lnum=' . a:lnum . ', i=' . a:i)
let prev_indtoken = s:PrevIndToken(a:lnum, a:i)
let [prev_indtoken, _, _] = s:PrevIndToken(a:lnum, a:i)
" If we hit the beginning of the file, it is not a catch in a try block
if prev_indtoken == []
@ -544,7 +554,7 @@ function! s:IsCatchStandalone(lnum, i)
let prev_token = prev_indtoken[0]
if prev_token =~# '[A-Z_@0-9]'
if prev_token =~# '^[A-Z_@0-9]'
let is_standalone = 0
elseif prev_token =~# '[a-z]'
if index(['after', 'and', 'andalso', 'band', 'begin', 'bnot', 'bor', 'bsl',
@ -659,11 +669,14 @@ endfunction
" stack: [token]
" token: string
" stored_vcol: integer
" lnum: the line number of the "end of clause" mark (or 0 if we hit the
" beginning of the file)
" i: the index of the "end of clause" token within its own line
" Returns:
" result: [should_return, indent]
" should_return: bool -- if true, the caller should return `indent` to Vim
" indent -- integer
function! s:BeginningOfClauseFound(stack, token, stored_vcol)
function! s:BeginningOfClauseFound(stack, token, stored_vcol, lnum, i)
if !empty(a:stack) && a:stack[0] ==# 'when'
call s:Log(' BeginningOfClauseFound: "when" found in stack')
call s:Pop(a:stack)
@ -681,13 +694,45 @@ function! s:BeginningOfClauseFound(stack, token, stored_vcol)
return [1, a:stored_vcol + shiftwidth()]
elseif a:stack[0] ==# ';'
call s:Pop(a:stack)
if empty(a:stack)
call s:Log(' Stack is ["->", ";"], so LTI is in a function head ' .
\'-> return')
return [0, a:stored_vcol]
else
if !empty(a:stack)
return [1, s:UnexpectedToken(a:token, a:stack)]
endif
if a:lnum ==# 0
" Set lnum and i to be NextIndToken-friendly
let lnum = 1
let i = -1
else
let lnum = a:lnum
let i = a:i
endif
" Are we after a "-spec func() ...;" clause?
let [next1_indtoken, next1_lnum, next1_i] = s:NextIndToken(lnum, i)
if !empty(next1_indtoken) && next1_indtoken[0] =~# '-'
let [next2_indtoken, next2_lnum, next2_i] =
\s:NextIndToken(next1_lnum, next1_i)
if !empty(next2_indtoken) && next2_indtoken[0] =~# 'spec'
let [next3_indtoken, next3_lnum, next3_i] =
\s:NextIndToken(next2_lnum, next2_i)
if !empty(next3_indtoken)
let [next4_indtoken, next4_lnum, next4_i] =
\s:NextIndToken(next3_lnum, next3_i)
if !empty(next4_indtoken)
" Yes, we are.
call s:Log(' Stack is ["->", ";"], so LTI is in a "-spec" ' .
\'attribute -> return')
return [1, next4_indtoken[1]]
endif
endif
endif
endif
call s:Log(' Stack is ["->", ";"], so LTI is in a function head ' .
\'-> return')
return [1, a:stored_vcol]
else
return [1, s:UnexpectedToken(a:token, a:stack)]
endif
@ -714,7 +759,7 @@ function! s:SearchEndPair(lnum, curr_col)
return s:SearchPair(
\ a:lnum, a:curr_col,
\ '\C\<\%(case\|try\|begin\|receive\|if\)\>\|' .
\ '\<fun\>\%(\s\|\n\|%.*$\)*(',
\ '\<fun\>\%(\s\|\n\|%.*$\|[A-Z_@][a-zA-Z_@]*\)*(',
\ '',
\ '\<end\>')
endfunction
@ -756,7 +801,7 @@ function! s:ErlangCalcIndent2(lnum, stack)
" Hit the start of the file
if lnum ==# 0
let [ret, res] = s:BeginningOfClauseFound(stack, 'beginning_of_file',
\stored_vcol)
\stored_vcol, 0, 0)
if ret | return res | endif
return 0
@ -775,7 +820,8 @@ function! s:ErlangCalcIndent2(lnum, stack)
endif
if token ==# '<end_of_clause>'
let [ret, res] = s:BeginningOfClauseFound(stack, token, stored_vcol)
let [ret, res] = s:BeginningOfClauseFound(stack, token, stored_vcol,
\lnum, i)
if ret | return res | endif
if stored_vcol ==# -1
@ -787,7 +833,7 @@ function! s:ErlangCalcIndent2(lnum, stack)
endif
elseif stack == ['prev_term_plus']
if token =~# '[a-zA-Z_@]' ||
if token =~# '[a-zA-Z_@#]' ||
\ token ==# '<string>' || token ==# '<string_start>' ||
\ token ==# '<quoted_atom>' || token ==# '<quoted_atom_start>'
call s:Log(' previous token found: curr_vcol + plus = ' .
@ -917,9 +963,18 @@ function! s:ErlangCalcIndent2(lnum, stack)
if ret | return res | endif
elseif token ==# 'fun'
let next_indtoken = s:NextIndToken(lnum, i)
let [next_indtoken, next_lnum, next_i] = s:NextIndToken(lnum, i)
call s:Log(' Next indtoken = ' . string(next_indtoken))
if !empty(next_indtoken) && next_indtoken[0] =~# '^[A-Z_@]'
" The "fun" is followed by a variable, so we might have a named fun:
" "fun Fun() -> ok end". Thus we take the next token to decide
" whether this is a function definition ("fun()") or just a function
" reference ("fun Mod:Fun").
let [next_indtoken, _, _] = s:NextIndToken(next_lnum, next_i)
call s:Log(' Next indtoken = ' . string(next_indtoken))
endif
if !empty(next_indtoken) && next_indtoken[0] ==# '('
" We have an anonymous function definition
" (e.g. "fun () -> ok end")
@ -1327,6 +1382,26 @@ function! ErlangIndent()
return -1
endif
" If the line starts with the comment, and so is the previous non-blank line
if currline =~# '^\s*%'
let lnum = prevnonblank(v:lnum - 1)
if lnum ==# 0
call s:Log('First non-empty line of the file -> return 0.')
return 0
else
let ml = matchlist(getline(lnum), '^\(\s*\)%')
" If the previous line also starts with a comment, then return the same
" indentation that line has. Otherwise exit from this special "if" and
" don't care that the current line is a comment.
if !empty(ml)
let new_col = s:CalcVCol(ml[1], 0, len(ml[1]) - 1, 0, &tabstop)
call s:Log('Comment line after another comment line -> ' .
\'use same indent: ' . new_col)
return new_col
endif
endif
endif
let ml = matchlist(currline,
\'^\(\s*\)\(\%(end\|of\|catch\|after\)\>\|[)\]}]\|>>\)')
@ -1381,6 +1456,24 @@ function! ErlangIndent()
endfunction
" ErlangShowTokensInLine functions {{{1
" ================================
" These functions are useful during development.
function! ErlangShowTokensInLine(line)
echo "Line: " . a:line
let indtokens = s:GetTokensFromLine(a:line, 0, 0, &tabstop)
echo "Tokens:"
for it in indtokens
echo it
endfor
endfunction
function! ErlangShowTokensInCurrentLine()
return ErlangShowTokensInLine(getline('.'))
endfunction
" Cleanup {{{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 23
" If there already is an option window, jump to that one.
let buf = bufnr('option-window')
@ -71,6 +71,7 @@ endfunc
let s:local_to_window = gettext('(local to window)')
let s:local_to_buffer = gettext('(local to buffer)')
let s:global_or_local = gettext('(global or local to buffer)')
" find the window in which the option applies
" returns 0 for global option, 1 for local option, -1 for error
@ -257,7 +258,7 @@ call <SID>OptionG("para", &para)
call <SID>AddOption("sections", gettext("nroff macro names that separate sections"))
call <SID>OptionG("sect", &sect)
call <SID>AddOption("path", gettext("list of directory names used for file searching"))
call append("$", gettext("\t(global or local to buffer)"))
call append("$", "\t" .. s:global_or_local)
call <SID>OptionG("pa", &pa)
call <SID>AddOption("cdpath", gettext("list of directory names used for :cd"))
call <SID>OptionG("cd", &cd)
@ -282,7 +283,7 @@ call <SID>OptionG("cmp", &cmp)
call <SID>AddOption("maxmempattern", gettext("maximum amount of memory in Kbyte used for pattern matching"))
call append("$", " \tset mmp=" . &mmp)
call <SID>AddOption("define", gettext("pattern for a macro definition line"))
call append("$", gettext("\t(global or local to buffer)"))
call append("$", "\t" .. s:global_or_local)
call <SID>OptionG("def", &def)
if has("find_in_path")
call <SID>AddOption("include", gettext("pattern for an include-file line"))
@ -300,10 +301,10 @@ call <SID>BinOptionG("tbs", &tbs)
call <SID>AddOption("taglength", gettext("number of significant characters in a tag name or zero"))
call append("$", " \tset tl=" . &tl)
call <SID>AddOption("tags", gettext("list of file names to search for tags"))
call append("$", gettext("\t(global or local to buffer)"))
call append("$", "\t" .. s:global_or_local)
call <SID>OptionG("tag", &tag)
call <SID>AddOption("tagcase", gettext("how to handle case when searching in tags files:\n\"followic\" to follow 'ignorecase', \"ignore\" or \"match\""))
call append("$", "\t(global or local to buffer)")
call append("$", "\t" .. s:global_or_local)
call <SID>OptionG("tc", &tc)
call <SID>AddOption("tagrelative", gettext("file names in a tags file are relative to the tags file"))
call <SID>BinOptionG("tr", &tr)
@ -616,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"))
@ -688,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")
@ -776,7 +773,7 @@ call <SID>OptionG("km", &km)
call <SID>Header(gettext("editing text"))
call <SID>AddOption("undolevels", gettext("maximum number of changes that can be undone"))
call append("$", gettext("\t(global or local to buffer)"))
call append("$", "\t" .. s:global_or_local)
call append("$", " \tset ul=" . s:old_ul)
call <SID>AddOption("undofile", gettext("automatically save and restore undo history"))
call <SID>BinOptionG("udf", &udf)
@ -790,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"))
@ -836,10 +833,10 @@ if has("insert_expand")
call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("ofu")
call <SID>AddOption("dictionary", gettext("list of dictionary files for keyword completion"))
call append("$", gettext("\t(global or local to buffer)"))
call append("$", "\t" .. s:global_or_local)
call <SID>OptionG("dict", &dict)
call <SID>AddOption("thesaurus", gettext("list of thesaurus files for keyword completion"))
call append("$", gettext("\t(global or local to buffer)"))
call append("$", "\t" .. s:global_or_local)
call <SID>OptionG("tsr", &tsr)
endif
call <SID>AddOption("infercase", gettext("adjust case of a keyword completion match"))
@ -851,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)
@ -862,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")
@ -937,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"))
@ -960,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\""))
@ -1046,7 +1043,7 @@ call <SID>BinOptionG("bk", &bk)
call <SID>AddOption("backupskip", gettext("patterns that specify for which files a backup is not made"))
call append("$", " \tset bsk=" . &bsk)
call <SID>AddOption("backupcopy", gettext("whether to make the backup as a copy or rename the existing file"))
call append("$", gettext("\t(global or local to buffer)"))
call append("$", "\t" .. s:global_or_local)
call append("$", " \tset bkc=" . &bkc)
call <SID>AddOption("backupdir", gettext("list of directories to put backup files in"))
call <SID>OptionG("bdir", &bdir)
@ -1059,7 +1056,7 @@ call <SID>BinOptionG("awa", &awa)
call <SID>AddOption("writeany", gettext("always write without asking for confirmation"))
call <SID>BinOptionG("wa", &wa)
call <SID>AddOption("autoread", gettext("automatically read a file when it was modified outside of Vim"))
call append("$", gettext("\t(global or local to buffer)"))
call append("$", "\t" .. s:global_or_local)
call <SID>BinOptionG("ar", &ar)
call <SID>AddOption("patchmode", gettext("keep oldest version of a file; specifies file name extension"))
call <SID>OptionG("pm", &pm)
@ -1068,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")
@ -1092,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)
@ -1149,7 +1146,7 @@ call <SID>OptionG("srr", &srr)
call <SID>AddOption("shelltemp", gettext("use a temp file for shell commands instead of using a pipe"))
call <SID>BinOptionG("stmp", &stmp)
call <SID>AddOption("equalprg", gettext("program used for \"=\" command"))
call append("$", gettext("\t(global or local to buffer)"))
call append("$", "\t" .. s:global_or_local)
call <SID>OptionG("ep", &ep)
call <SID>AddOption("formatprg", gettext("program used to format lines with \"gq\" command"))
call <SID>OptionG("fp", &fp)
@ -1164,41 +1161,34 @@ if has("quickfix")
call <SID>AddOption("errorfile", gettext("name of the file that contains error messages"))
call <SID>OptionG("ef", &ef)
call <SID>AddOption("errorformat", gettext("list of formats for error messages"))
call append("$", gettext("\t(global or local to buffer)"))
call append("$", "\t" .. s:global_or_local)
call <SID>OptionG("efm", &efm)
call <SID>AddOption("makeprg", gettext("program used for the \":make\" command"))
call append("$", gettext("\t(global or local to buffer)"))
call append("$", "\t" .. s:global_or_local)
call <SID>OptionG("mp", &mp)
call <SID>AddOption("shellpipe", gettext("string used to put the output of \":make\" in the error file"))
call <SID>OptionG("sp", &sp)
call <SID>AddOption("makeef", gettext("name of the errorfile for the 'makeprg' command"))
call <SID>OptionG("mef", &mef)
call <SID>AddOption("grepprg", gettext("program used for the \":grep\" command"))
call append("$", gettext("\t(global or local to buffer)"))
call append("$", "\t" .. s:global_or_local)
call <SID>OptionG("gp", &gp)
call <SID>AddOption("grepformat", gettext("list of formats for output of 'grepprg'"))
call <SID>OptionG("gfm", &gfm)
call <SID>AddOption("makeencoding", gettext("encoding of the \":make\" and \":grep\" output"))
call append("$", gettext("\t(global or local to buffer)"))
call append("$", "\t" .. s:global_or_local)
call <SID>OptionG("menc", &menc)
call <SID>AddOption("quickfixtextfunc", gettext("function to display text in the quickfix window"))
call <SID>OptionG("qftf", &qftf)
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
@ -1235,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)
@ -1309,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)
@ -1349,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
@ -1404,9 +1388,9 @@ if exists("&tcldll")
call <SID>OptionG("tcldll", &tcldll)
endif
if exists("&mzschemedll")
call <SID>AddOption("mzschemedll", gettext("name of the Tcl dynamic library"))
call <SID>AddOption("mzschemedll", gettext("name of the MzScheme dynamic library"))
call <SID>OptionG("mzschemedll", &mzschemedll)
call <SID>AddOption("mzschemegcdll", gettext("name of the Tcl GC dynamic library"))
call <SID>AddOption("mzschemegcdll", gettext("name of the MzScheme GC dynamic library"))
call <SID>OptionG("mzschemegcdll", &mzschemegcdll)
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 25
"
" 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 != ''

View File

@ -20,7 +20,7 @@
if &cp || exists("g:loaded_netrwPlugin")
finish
endif
let g:loaded_netrwPlugin = "v168"
let g:loaded_netrwPlugin = "v170"
let s:keepcpo = &cpo
set cpo&vim
"DechoRemOn

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

@ -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

@ -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

@ -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

@ -2,7 +2,7 @@
" Language: Erlang (http://www.erlang.org)
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
" Contributor: Adam Rutkowski <hq@mtod.org>
" Last Update: 2019-Jun-18
" Last Update: 2020-May-26
" License: Vim license
" URL: https://github.com/vim-erlang/vim-erlang-runtime
@ -44,7 +44,7 @@ setlocal iskeyword+=$,@-@
" Comments
syn match erlangComment '%.*$' contains=erlangCommentAnnotation,erlangTodo
syn match erlangCommentAnnotation ' \@<=@\%(clear\|docfile\|end\|headerfile\|todo\|TODO\|type\|author\|copyright\|doc\|reference\|see\|since\|title\|version\|deprecated\|hidden\|private\|equiv\|spec\|throws\)' contained
syn match erlangCommentAnnotation ' \@<=@\%(clear\|docfile\|end\|headerfile\|todo\|TODO\|type\|author\|copyright\|doc\|reference\|see\|since\|title\|version\|deprecated\|hidden\|param\|private\|equiv\|spec\|throws\)' contained
syn match erlangCommentAnnotation /`[^']*'/ contained
syn keyword erlangTodo TODO FIXME XXX contained
@ -92,7 +92,7 @@ syn match erlangBitType '\%(\/\%(\s\|\n\|%.*\n\)*\)\@<=\%(integer\|float\|binary
" Constants and Directives
syn match erlangUnknownAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\l[[:alnum:]_@]*' contains=erlangComment
syn match erlangAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\%(behaviou\=r\|compile\|export\(_type\)\=\|file\|import\|module\|author\|copyright\|doc\|vsn\|on_load\)\>' contains=erlangComment
syn match erlangAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\%(behaviou\=r\|compile\|export\(_type\)\=\|file\|import\|module\|author\|copyright\|doc\|vsn\|on_load\|optional_callbacks\)\>' contains=erlangComment
syn match erlangInclude '^\s*-\%(\s\|\n\|%.*\n\)*\%(include\|include_lib\)\>' contains=erlangComment
syn match erlangRecordDef '^\s*-\%(\s\|\n\|%.*\n\)*record\>' contains=erlangComment
syn match erlangDefine '^\s*-\%(\s\|\n\|%.*\n\)*\%(define\|undef\)\>' contains=erlangComment

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

@ -105,7 +105,7 @@ if !exists("did_drchip_netrwlist_syntax")
" special syntax highlighting (see :he g:netrw_special_syntax)
hi default link netrwCoreDump WarningMsg
hi default link netrwData DiffChange
hi default link netrwData Folded
hi default link netrwHdr netrwPlain
hi default link netrwLex netrwPlain
hi default link netrwLib DiffChange

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,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,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},
@ -1537,14 +1538,18 @@ win_found:
else
// Hmm, original window disappeared. Just use the first one.
curwin = firstwin;
curbuf = curwin->w_buffer;
#ifdef FEAT_JOB_CHANNEL
// May need to restore insert mode for a prompt buffer.
entering_window(curwin);
#endif
if (win_valid(aco->save_prevwin))
prevwin = aco->save_prevwin;
#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;

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));
}
/*

View File

@ -883,7 +883,7 @@ buf_write(
#endif
)
{
if (buf != NULL && cmdmod.lockmarks)
if (buf != NULL && (cmdmod.cmod_flags & CMOD_LOCKMARKS))
{
// restore the original '[ and '] positions
buf->b_op_start = orig_start;
@ -967,7 +967,7 @@ buf_write(
fname = buf->b_sfname;
}
if (cmdmod.lockmarks)
if (cmdmod.cmod_flags & CMOD_LOCKMARKS)
{
// restore the original '[ and '] positions
buf->b_op_start = orig_start;

View File

@ -115,7 +115,7 @@ changed(void)
// Wait two seconds, to make sure the user reads this unexpected
// message. Since we could be anywhere, call wait_return() now,
// and don't let the emsg() set msg_scroll.
if (need_wait_return && emsg_silent == 0)
if (need_wait_return && emsg_silent == 0 && !in_assert_fails)
{
out_flush();
ui_delay(2002L, TRUE);
@ -453,7 +453,7 @@ changed_common(
#endif
// set the '. mark
if (!cmdmod.keepjumps)
if ((cmdmod.cmod_flags & CMOD_KEEPJUMPS) == 0)
{
curbuf->b_last_change.lnum = lnum;
curbuf->b_last_change.col = col;
@ -693,7 +693,7 @@ changed_bytes(linenr_T lnum, colnr_T col)
* Like changed_bytes() but also adjust text properties for "added" bytes.
* When "added" is negative text was deleted.
*/
static void
void
inserted_bytes(linenr_T lnum, colnr_T col, int added UNUSED)
{
#ifdef FEAT_PROP_POPUP

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