Compare commits

...

309 Commits

Author SHA1 Message Date
09f067fca3 patch 8.2.2754: :sleep! does not always hide the cursor
Problem:    :sleep! does not always hide the cursor.
Solution:   Add the cursor_is_asleep flag. (Jeremy Lerner, closes #8097,
            closes #7998)
2021-04-11 13:29:18 +02:00
f93bbd0262 patch 8.2.2753: Vim9: cannot ignore an item in assignment unpack
Problem:    Vim9: cannot ignore an item in assignment unpack.
Solution:   Allow using an underscore.
2021-04-10 22:35:43 +02:00
e8e3078184 patch 8.2.2752 2021-04-10 21:46:05 +02:00
fed9e830fc patch 8.2.2751: Coverity warns for using NULL pointer
Problem:    Coverity warns for using NULL pointer.
Solution:   Check for NULL in calling function.
2021-04-10 21:38:38 +02:00
da479c7597 patch 8.2.2750: Vim9: error for using underscore in nested function
Problem:    Vim9: error for using underscore in nested function.
Solution:   Do not consider "_" already defined. (closes #8096)
2021-04-10 21:01:38 +02:00
fe95b94ffa patch 8.2.2749: Vim9: test for error can be a bit flaky
Problem:    Vim9: test for error can be a bit flaky.
Solution:   Increase the wait time a bit.
2021-04-10 20:52:43 +02:00
c429769776 patch 8.2.2748: Vim9: memory leak when calling :def function fails
Problem:    Vim9: memory leak when calling :def function fails.
Solution:   Jump to failed_early instead of returning.
2021-04-10 20:46:48 +02:00
bb8a7ce0a1 patch 8.2.2747: Vim9: not always an error for too many function arguments
Problem:    Vim9: not always an error for too many function arguments.
Solution:   Check for getting too many arguments.
2021-04-10 20:10:26 +02:00
87795939d0 patch 8.2.2746: check for duplicate arguments does not work
Problem:    Check for duplicate arguments does not work.
Solution:   Correct condition.
2021-04-10 18:21:30 +02:00
51e7e78de7 patch 8.2.2745: Vim9: missing part of the argument change
Problem:    Vim9: missing part of the argument change.
Solution:   Add missing changes.
2021-04-10 17:46:52 +02:00
962c43bf0d patch 8.2.2744: Vim9: no way to explicitly ignore an argument
Problem:    Vim9: no way to explicitly ignore an argument.
Solution:   Use the underscore as the name for an ignored argument.
2021-04-10 17:18:09 +02:00
599410cb3c patch 8.2.2743: Vim9: function state stuck when compiling with ":silent!"
Problem:    Vim9: function state stuck when compiling with ":silent!".
Solution:   Check for uf_def_status to be UF_COMPILING.
2021-04-10 14:03:43 +02:00
701cc6ca9e patch 8.2.2742: Vim9: when compiling a function fails it is cleared
Problem:    Vim9: when compiling a function fails it is cleared.
Solution:   Keep the function lines, prevent execution with a different
            status. (closes #8093)
2021-04-10 13:33:48 +02:00
1088b69451 patch 8.2.2741: Vim9: Partial call does not check right arguments
Problem:    Vim9: Partial call does not check right arguments.
Solution:   Adjust the offset for whether the partial is before or after the
            arguments. (closes #8091)
2021-04-09 22:12:44 +02:00
2a38908b05 patch 8.2.2740: Vim9: lambda with varargs doesn't work
Problem:    Vim9: lambda with varargs doesn't work.
Solution:   Make "...name" work.  Require type to be a list.
2021-04-09 20:24:31 +02:00
767034c5b8 patch 8.2.2739: Vim9: a lambda accepts too many arguments at the script level
Problem:    Vim9: a lambda accepts too many arguments at the script level.
Solution:   Do not set uf_varargs in Vim9 script.
2021-04-09 17:24:52 +02:00
dcae51facc patch 8.2.2738: extending a list with itself can give wrong result
Problem:    Extending a list with itself can give wrong result.
Solution:   Remember the item before where the insertion happens and skip to
            after the already inserted items. (closes #1112)
2021-04-08 20:10:10 +02:00
d8db838392 patch 8.2.2737: status line not updated when local 'statusline' option set
Problem:    Status line not updated when local 'statusline' option set.
Solution:   Check the 'statusline' option of each window.
2021-04-08 18:27:53 +02:00
175a41c13f patch 8.2.2736: Vim9: for loop over string is a bit slow
Problem:    Vim9: for loop over string is a bit slow.
Solution:   Avoid using strlen().
2021-04-08 18:05:03 +02:00
fa5963880d patch 8.2.2735: Vim9: function reference found with prefix, not without
Problem:    Vim9: function reference found with prefix, not without.
Solution:   Also find function reference without prefix.
2021-04-07 21:58:16 +02:00
15e5e53ef2 patch 8.2.2734: Vim9: cannot use legacy script-local var from :def function
Problem:    Vim9: cannot use legacy script-local var from :def function.
Solution:   Do not insist on using "s:" prefix. (closes #8076)
2021-04-07 21:21:13 +02:00
130cbfc312 Update runtime files 2021-04-07 21:07:20 +02:00
125ed2745c patch 8.2.2733: detecting Lua version is not reliable
Problem:    Detecting Lua version is not reliable.
Solution:   Add "vim.lua_version". (Ozaki Kiichi, closes #8080)
2021-04-07 20:11:12 +02:00
e5b0b98a90 patch 8.2.2732: prompt for s///c in Ex mode can be wrong
Problem:    Prompt for s///c in Ex mode can be wrong.
Solution:   Position the cursor before showing the prompt. (closes #8073)
2021-04-07 19:42:57 +02:00
8dddc1f0e2 patch 8.2.2731: Mac: SF symbols are not displayed properly
Problem:    Mac: SF symbols are not displayed properly.
Solution:   Add custom range to list of double-width characters. (Yee Cheng
            Chin, closes #8077)
2021-04-07 19:00:25 +02:00
c9605f0595 patch 8.2.2730: Coverity complains about not restoring character
Problem:    Coverity complains about not restoring character.
Solution:   Also restore the character in case of an error.
2021-04-06 21:29:32 +02:00
643ce6c0c6 patch 8.2.2729: Vim9: wrong error message for referring to legacy script var
Problem:    Vim9: wrong error message for referring to legacy script variable.
Solution:   Do allow referring to a variable in legacy script without "s:" if
            it exists at compile time. (closes #8076)
2021-04-06 21:17:27 +02:00
e3d1f4c982 patch 8.2.2728: special key names don't work if 'isident' is cleared
Problem:    Special key names don't work if 'isident' is cleared.
Solution:   Add vim_isNormalIDc() and use it for special key names.
            (closes #2389)
2021-04-06 20:21:59 +02:00
e9b8b78e04 patch 8.2.2727: function test fails
Problem:    Function test fails.
Solution:   Adjust expected error number.
2021-04-06 20:18:29 +02:00
86cdb8a4bd patch 8.2.2726: confusing error message with white space before comma
Problem:    Confusing error message with white space before comma in the
            arguments of a function declaration.
Solution:   Give a specific error message. (closes #2235)
2021-04-06 19:01:03 +02:00
e8c4660a55 patch 8.2.2725: Vim9: message about compiling is wrong when using try/catch
Problem:    Vim9: message about compiling is wrong when using try/catch.
Solution:   Store the compiling flag with the message. (closes #8071)
2021-04-05 22:27:37 +02:00
0d351a04e1 patch 8.2.2724: Vim9: concatenating to list in dict not tested
Problem:    Vim9: concatenating to list in dict not tested.
Solution:   Add a test. (issue #8068)
2021-04-05 21:05:26 +02:00
58fb7c39a0 patch 8.2.2723: assignment test fails
Problem:    Assignment test fails.
Solution:   Adjust error number.
2021-04-05 20:59:41 +02:00
b9c0cd897a patch 8.2.2722: Vim9: crash when using LHS with double index
Problem:    Vim9: crash when using LHS with double index.
Solution:   Handle lhs_dest which is "dest_expr". (closes #8068)
            Fix confusing error message for missing dict item.
2021-04-05 20:51:00 +02:00
2927c07b0e patch 8.2.2721: Vim9: cannot have a linebreak inside a lambda
Problem:    Vim9: cannot have a linebreak inside a lambda.
Solution:   Compile the expression before the arguments.
2021-04-05 19:41:21 +02:00
01ac0a1f66 patch 8.2.2720: GTK menu tooltip moves the cursor
Problem:    GTK menu tooltip moves the cursor.
Solution:   Position the cursor after displaying the tooltip.  Do not show the
            tooltip when editing the command line.
2021-04-05 18:20:45 +02:00
e42939af87 patch 8.2.2719: Vim9: appending to dict item doesn't work in a :def function
Problem:    Vim9: appending to dict item doesn't work in a :def function.
Solution:   Implement assignment with operator on indexed item.
2021-04-05 17:11:17 +02:00
0865b15bc6 patch 8.2.2718: Vim9: no explicit test for using a global function without g:
Problem:    Vim9: no explicit test for using a global function without the g:
            prefix.
Solution:   Add a test case.
2021-04-05 15:38:51 +02:00
ce5b06a6a9 patch 8.2.2717: GTK menu items don't show a tooltip
Problem:    GTK menu items don't show a tooltip.
Solution:   Add a callback to show the tooltip. (Leonid V. Fedorenchik,
            closes #8067, closes #7810)
2021-04-05 14:13:20 +02:00
0b94e297af patch 8.2.2716: the equivalent class regexp is missing some characters
Problem:    The equivalent class regexp is missing some characters.
Solution:   Update the list of equivalent characters. (Dominique Pellé,
            closes #8029)
2021-04-05 13:59:53 +02:00
886e5e737d patch 8.2.2715: Vim9: tests fail without the channel feature
Problem:    Vim9: tests fail without the channel feature. (Dominique Pellé)
Solution:   Check for the channel feature. (closes #8063)
2021-04-05 13:36:34 +02:00
409da842db patch 8.2.2714: filetype pattern ending in star is too far up
Problem:    Filetype pattern ending in star is too far up.
Solution:   Move down to where patterns ending in star belong. (closes #8065)
2021-04-05 13:10:43 +02:00
68ffe8cade patch 8.2.2713: folding code not sufficiently tested
Problem:    Folding code not sufficiently tested.
Solution:   Add a few more test cases. (Yegappan Lakshmanan, closes #8064)
2021-04-05 12:47:25 +02:00
f2dd9cb995 patch 8.2.2712: memory leak when adding to a blob fails
Problem:    Memory leak when adding to a blob fails.
Solution:   Clear the second typval before returning.
2021-04-04 21:55:23 +02:00
3c49e74e18 patch 8.2.2711: "gj" in a closed fold does not move out of the fold
Problem:    "gj" in a closed fold does not move out of the fold. (Marco Hinz)
Solution:   Add a check for being in a closed fold. (closes #8062)
2021-04-04 21:26:04 +02:00
90193e6140 patch 8.2.2710: Vim9: not all tests cover script and :def function
Problem:    Vim9: not all tests cover script and :def function.
Solution:   Run tests in both if possible. Fix differences.
2021-04-04 20:49:50 +02:00
26af8e54ff patch 8.2.2709: the GTK GUI has a gap next to the scrollbar
Problem:    The GTK GUI has a gap next to the scrollbar.
Solution:   Calculate the scrollbar padding for GTK. (closes #8027)
2021-04-04 15:57:12 +02:00
3a6aadb328 patch 8.2.2708: test sometimes fails waiting for shell in terminal
Problem:    Test sometimes fails waiting for shell in terminal.
Solution:   Use WaitForAssert() so we can see the actual job status.  Use
            Run_shell_in_terminal().
2021-04-04 15:28:59 +02:00
ceb0619433 patch 8.2.2707: adding a lot of completions can still be a bit slow
Problem:    Adding a lot of completions can still be a bit slow.
Solution:   Add the check for CP_FAST. (Ben Jackson)
2021-04-04 15:05:22 +02:00
a7511c0f4f patch 8.2.2706: Vim9: wrong line number reported for boolean operator
Problem:    Vim9: wrong line number reported for boolean operator.
Solution:   Use the line number before skipping over line break.
            (closes #8058)
2021-04-03 21:47:07 +02:00
77709b194c patch 8.2.2705: Vim9: misleading reported line number for wrong type
Problem:    Vim9: misleading reported line number for wrong type.
Solution:   Remember and use the line number at the start. (closes #8059)
2021-04-03 21:01:01 +02:00
440cf096fa patch 8.2.2704: adding a lot of completions can be a bit slow
Problem:    Adding a lot of completions can be a bit slow.
Solution:   Use fast_breakcheck() instead of ui_breakcheck() when adding a
            list of completions. (Ben Jackson, closes #8061)
2021-04-03 20:13:30 +02:00
6e50ec2f0a patch 8.2.2703: Vim9: memory leak when failing on locked variable
Problem:    Vim9: memory leak when failing on locked variable.
Solution:   Free the memory.
2021-04-03 19:32:44 +02:00
c17ba791a9 patch 8.2.2702: compiler completion test fails when more scripts are added
Problem:    Compiler completion test fails when more scripts are added.
Solution:   Add a more generic pattern.
2021-04-03 19:07:05 +02:00
26f201345d patch 8.2.2701: order of removing FORTIFY_SOURCE is wrong
Problem:    Order of removing FORTIFY_SOURCE is wrong.
Solution:   Use the more specific pattern first.
2021-04-03 17:33:52 +02:00
6437475ffb patch 8.2.2700: nested autocmd test fails sometimes
Problem:    Nested autocmd test fails sometimes.
Solution:   Wait for the job to finish.
2021-04-03 17:22:29 +02:00
c48f2dc0be patch 8.2.2699: Lua test fails
Problem:    Lua test fails.
Solution:   Fix condition. (Yegappan Lakshmanan, closes #8060)
2021-04-03 17:18:52 +02:00
b9c6b6fb73 patch 8.2.2698: Lua test fails on MS-Windows
Problem:    Lua test fails on MS-Windows.
Solution:   Fall back to old method if "lua -v" doesn't work.
2021-04-03 15:35:50 +02:00
0df6030145 patch 8.2.2697: function list test fails
Problem:    Function list test fails.
Solution:   Add missing function. (Yegappan Lakshmanan)
2021-04-03 15:15:47 +02:00
f65ed86f6f patch 8.2.2696: Lua test fails with Lua 5.4.3 and later
Problem:    Lua test fails with Lua 5.4.3 and later.
Solution:   Check for different error messages. (Yegappan Lakshmanan,
            closes #8050)
2021-04-03 14:13:33 +02:00
1e6bbfb560 patch 8.2.2695: cursor position reset with nested autocommands
Problem:    Cursor position reset with nested autocommands.
Solution:   Only check and reset line numbers for not nested autocommands.
            (closes #5820)
2021-04-03 13:19:26 +02:00
5b8cabfef7 patch 8.2.2694: when 'matchpairs' is empty every character beeps
Problem:    When 'matchpairs' is empty every character beeps. (Marco Hinz)
Solution:   Bail out when no character in 'matchpairs' was found.
            (closes #8053)  Add assert_nobeep().
2021-04-02 18:55:57 +02:00
dcf29ac87f patch 8.2.2693: Vim9: locked script variable can be changed
Problem:    Vim9: locked script variable can be changed.
Solution:   Check legacy script variable for being locked. (issue #8031)
2021-04-02 14:44:02 +02:00
f5906aa780 patch 8.2.2692: Vim9: locked script variable can be changed
Problem:    Vim9: locked script variable can be changed.
Solution:   Check for locked value. (closes #8031)
2021-04-02 14:35:15 +02:00
3fa5e64e0e patch 8.2.2691: autoconf may mess up compiler flags
Problem:    Autoconf may mess up compiler flags.
Solution:   Handle removing FORTIFY_SOURCE a bit better. (Vladimir Lomov,
            closes #8049)
2021-04-02 13:30:59 +02:00
ef38bcf051 patch 8.2.2690: PowerShell files are not recognized
Problem:    PowerShell files are not recognized.
Solution:   Recognize several PowerShell extension. (Heath Stewart,
            closes #8051)
2021-04-02 13:00:15 +02:00
160a2b4dac patch 8.2.2689: tiny build fails
Problem:    Tiny build fails.
Solution:   Add #ifdef around use of p_stl.
2021-04-01 21:57:46 +02:00
ca51cc0a33 patch 8.2.2688: Vim9: crash when using s: for script variable
Problem:    Vim9: crash when using s: for script variable.
Solution:   Pass the end pointer. (closes #8045)
2021-04-01 21:38:53 +02:00
d877a5700f patch 8.2.2687: Vim9: cannot use "const" for global variable in :def function
Problem:    Vim9: cannot use "const" for global variable in :def function.
Solution:   Do allow using :const for a global variable. (closes #8030)
2021-04-01 19:42:48 +02:00
ce0b75711a patch 8.2.2686: status line is not updated when going to cmdline mode
Problem:    Status line is not updated when going to cmdline mode.
Solution:   Redraw status lines if 'statusline' is set and going to status
            line mode. (based on patch from Justin M. Keyes et al.,
            closes #8044)
2021-04-01 18:47:14 +02:00
49c51b825a patch 8.2.2685: custom statusline not drawn correctly with WinBar
Problem:    Custom statusline not drawn correctly with WinBar.
Solution:   Also adjust the column for the custom status line. (Yee Cheng
            Chin, closes #8047)
2021-04-01 16:16:18 +02:00
5c504f680e patch 8.2.2684: not enough folding code is tested
Problem:    Not enough folding code is tested.
Solution:   Add more test cases. (Yegappan Lakshmanan, closes #8046)
2021-04-01 13:39:51 +02:00
b91d3f857f patch 8.2.2683: build failure without the +eval feature
Problem:    Build failure without the +eval feature.
Solution:   Add #ifdef.
2021-04-01 13:17:50 +02:00
529fb5a5f6 patch 8.2.2682: Vim9: cannot find Name.Func from "import * as Name"
Problem:    Vim9: cannot find Name.Func from "import * as Name". (Alexander
            Goussas)
Solution:   When no variable found try finding a function. (closes #8045)
            Check that the function was exported.
2021-04-01 12:57:57 +02:00
12be734faf patch 8.2.2681: Vim9: test fails for redeclaring script variable
Problem:    Vim9: test fails for redeclaring script variable.
Solution:   It's OK to assign to an existing script variable in legacy.
2021-03-31 21:47:33 +02:00
e535db86e7 patch 8.2.2680: Vim9: problem defining a script variable from legacy function
Problem:    Vim9: problem defining a script variable from legacy function.
Solution:   Check if the script is Vim9, not the current syntax.
            (closes #8032)
2021-03-31 21:07:24 +02:00
dad4473f02 Update runtime files. 2021-03-31 20:07:33 +02:00
ae0f151ddf patch 8.2.2679: status line missing for non-current window with winbar
Problem:    Winbar drawn over status line for non-current window with winbar
            if frame is zero height. (Leonid V. Fedorenchik)
Solution:   Do not draw the window if the frame height is zero. (closes #8037)
2021-03-30 22:12:12 +02:00
82820d9bf1 patch 8.2.2678: test for 'autoshelldir' does not reset the option
Problem:    Test for 'autoshelldir' does not reset the option.
Solution:   Reset the option after testing.
2021-03-30 20:54:28 +02:00
38a3bfa9a2 patch 8.2.2677: Vim9: cannot use only some of the default arguments
Problem:    Vim9: cannot use only some of the default arguments.
Solution:   Use v:none to use default argument value.  Remove
            uf_def_arg_idx[], use JUMP_IF_ARG_SET. (closes #6504)
2021-03-29 22:14:55 +02:00
9ea7e55ab9 patch 8.2.2676: missing error message
Problem:    Missing error message.
Solution:   Add new error message.
2021-03-29 21:06:04 +02:00
8b9abfd86c patch 8.2.2675: directory change in a terminal window shell is not followed
Problem:    Directory change in a terminal window shell is not followed.
Solution:   Add the 'autoshelldir' option. (closes #6290)
2021-03-29 20:49:05 +02:00
9dbe701fe1 patch 8.2.2674: Motif: cancelling the font dialog resets the font
Problem:    Motif: cancelling the font dialog resets the font.
Solution:   When no font is selected to not change the font. (closes #7825,
            closes #8035)  Fix compiler warnings.
2021-03-29 20:10:26 +02:00
3215466af9 patch 8.2.2673: Vim9: script-local funcref can have lower case name
Problem:    Vim9: script-local funcref can have lower case name.
Solution:   Require an upper case name.
2021-03-28 21:14:06 +02:00
b2cb6c8bbd patch 8.2.2672: Vim9: cannot use :lockvar and :unlockvar in compiled script
Problem:    Vim9: cannot use :lockvar and :unlockvar in compiled script.
Solution:   Implement locking support.
2021-03-28 20:38:34 +02:00
f6bdd82c7e patch 8.2.2671: error for line number in legacy script
Problem:    Error for line number in legacy script.
Solution:   Check for number type.
2021-03-28 16:26:41 +02:00
b2ac7d0663 patch 8.2.2670: Vim9: error for append(0, text)
Problem:    Vim9: error for append(0, text).
Solution:   Check for negative number. (closes #8022)
2021-03-28 15:46:16 +02:00
df749a2b9c patch 8.2.2669: command line completion does not work after "vim9"
Problem:    Command line completion does not work after "vim9".
Solution:   Include the "9". (Naohiro Ono, closes #8025)
2021-03-28 15:29:43 +02:00
f49a1fcdb9 patch 8.2.2668: Vim9: omitting "call" for "confirm()" does not give an error
Problem:    Vim9: omitting "call" for "confirm()" does not give an error.
Solution:   Do not recognize a modifier followed by "(".
2021-03-27 22:20:21 +01:00
24f21fdfca patch 8.2.2667: prop_find() cannot find item matching both id and type
Problem:    prop_find() cannot find item matching both id and type.
Solution:   Add the "both" argument. (Naohiro Ono, closes #8019)
2021-03-27 22:07:29 +01:00
c580943965 patch 8.2.2666: Vim9: not enough function arguments checked for string
Problem:    Vim9: not enough function arguments checked for string.
Solution:   Check in ch_logfile(), char2nr() and others.
2021-03-27 21:23:30 +01:00
7b45d46cf7 patch 8.2.2665: test failures
Problem:    Test failures.
Solution:   Check more specific feature.  Add missing change.
2021-03-27 19:09:02 +01:00
32105ae88f patch 8.2.2664: Vim9: not enough function arguments checked for string
Problem:    Vim9: not enough function arguments checked for string.
Solution:   Check in balloon functions.  Refactor function arguments.
2021-03-27 18:59:25 +01:00
79efa2e3b3 patch 8.2.2663: Vim9: leaking memory when inline function has an error
Problem:    Vim9: leaking memory when inline function has an error.
Solution:   Free the partially allocated function.
2021-03-27 15:40:11 +01:00
7007e31bde patch 8.2.2662: there is no way to avoid some escape sequences
Problem:    There is no way to avoid some escape sequences.
Solution:   Suppress escape sequences when the --not-a-term argument is used.
            (Gary Johnson)
2021-03-27 12:11:33 +01:00
bb5d87c850 patch 8.2.2661: leaking memory when looping over a string
Problem:    Leaking memory when looping over a string.
Solution:   Free the memory.
2021-03-26 22:15:26 +01:00
ccc25aa285 patch 8.2.2660: Vim9: no error for declaration with trailing text
Problem:    Vim9: no error for declaration with trailing text.
Solution:   Give an error. (closes #8014)
2021-03-26 21:27:52 +01:00
c61cb8bfe1 patch 8.2.2659: eval test fails because for loop on string works
Problem:    Eval test fails because for loop on string works.
Solution:   Check looping over function reference fails.
2021-03-26 20:56:45 +01:00
74e54fcb44 patch 8.2.2658: :for cannot loop over a string
Problem:    :for cannot loop over a string.
Solution:   Accept a string argument and iterate over its characters.
2021-03-26 20:41:29 +01:00
522eefd9a2 patch 8.2.2657: Vim9: error message for declaring variable in for loop
Problem:    Vim9: error message for declaring variable in for loop.
Solution:   Clear variables when entering block again. (closes #8012)
2021-03-26 18:49:22 +01:00
a2b3e7dc92 patch 8.2.2656: some command line arguments and regexp errors not tested
Problem:    Some command line arguments and regexp errors not tested.
Solution:   Add a few test cases. (Dominique Pellé, closes #8013)
2021-03-26 17:24:34 +01:00
0a1a6a1aa4 patch 8.2.2655: The -w command line argument doesn't work
Problem:    The -w command line argument doesn't work.
Solution:   Don't set 'window' when set with the -w argument. (closes #8011)
2021-03-26 14:14:18 +01:00
ff87140046 patch 8.2.2654: Vim9: getting a character from a string can be slow
Problem:    Vim9: getting a character from a string can be slow.
Solution:   Avoid a function call to get the character byte size. (#8000)
2021-03-26 13:34:05 +01:00
3a0f092ac0 patch 8.2.2653: build failure
Problem:    Build failure.
Solution:   Add missing changes.
2021-03-25 22:22:30 +01:00
fa984418e7 patch 8.2.2652: Vim9: can use command modifier without an effect
Problem:    Vim9: can use command modifier without an effect.
Solution:   Give an error for a misplaced command modifier.  Fix error message
            number.
2021-03-25 22:15:28 +01:00
a91a71322d patch 8.2.2651: Vim9: restoring command modifiers happens after jump
Problem:    Vim9: restoring command modifiers happens after jump.
Solution:   Move the restore instruction to before the jump. (closes #8006)
            Also handle for and while.
2021-03-25 21:12:15 +01:00
2fecb53115 patch 8.2.2650: Vim9: command modifiers not handled in nested function
Problem:    Vim9: command modifiers not handled in nested function.
Solution:   Keep function-local info in a structure and save it on the stack.
2021-03-24 22:00:56 +01:00
1ff89deeaa patch 8.2.2649: Vim9: some wincmd arguments cause a white space error
Problem:    Vim9: some wincmd arguments cause a white space error.
Solution:   Insert a space before the count. (closes #8001)
2021-03-24 20:08:12 +01:00
c54f347d63 patch 8.2.2648: terminal resize test sometimes hangs
Problem:    Terminal resize test sometimes hangs.
Solution:   Wait for the shell to display a prompt and other output.
2021-03-23 19:22:12 +01:00
f4a2ed0714 patch 8.2.2647: terminal test sometimes hangs
Problem:    Terminal test sometimes hangs.
Solution:   Wait for the shell to display a prompt.
2021-03-23 16:25:09 +01:00
f28f2ac425 patch 8.2.2646: Vim9: error for not using string doesn't mentionargument
Problem:    Vim9: error for not using string doesn't mention argument.
Solution:   Add argument number.
2021-03-22 22:21:26 +01:00
49f1e9ec3e patch 8.2.2645: using inline function is not properly tested
Problem:    Using inline function is not properly tested.
Solution:   Add test cases, esp. for errors.  Minor code improvements.
2021-03-22 20:49:02 +01:00
da1dbed0df patch 8.2.2644: prop_clear() causes a screen update even when nothing changed
Problem:    prop_clear() causes a screen update even when nothing changed.
Solution:   Only redraw when a property was cleared. (Dominique Pellé)
2021-03-22 19:43:34 +01:00
1f448d906b patch 8.2.2643: various code not covered by tests
Problem:    Various code not covered by tests.
Solution:   Add a few more test. (Yegappan Lakshmanan, closes #7995)
2021-03-22 19:37:06 +01:00
e98f60a591 patch 8.2.2642: Vim9: no clear error for wrong inline function
Problem:    Vim9: no clear error for wrong inline function.
Solution:   Check for something following the "{".
2021-03-22 18:22:30 +01:00
2cec027af4 patch 8.2.2641: display test fails because of lacking redraw
Problem:    Display test fails because of lacking redraw.
Solution:   Add a redraw command.
2021-03-22 17:30:47 +01:00
f1387285e2 patch 8.2.2640: screenstring() returns non-existing composing characters
Problem:    screenstring() returns non-existing composing characters.
Solution:   Only use composing characters if there is a base character.
2021-03-22 17:11:15 +01:00
5ea79a2599 patch 8.2.2639: build failure when fsync() is not available
Problem:    Build failure when fsync() is not available.
Solution:   Add #ifdef.
2021-03-22 16:45:35 +01:00
4c86830fc5 patch 8.2.2638: cannot write a message to the terminal from the GUI
Problem:    Cannot write a message to the terminal from the GUI.
Solution:   Add :echoconsole and use it in the test runner. (issue #7975)
2021-03-22 16:19:45 +01:00
09f8b3a022 patch 8.2.2637: prop_remove() causes a redraw even when nothing changed
Problem:    prop_remove() causes a redraw even when nothing changed.
Solution:   Only redraw if a property was removed.
2021-03-21 22:29:54 +01:00
67da21a147 patch 8.2.2636: memory leak when compiling inline function
Problem:    Memory leak when compiling inline function.
Solution:   Free the prefetched line.
2021-03-21 22:12:34 +01:00
7a6eaa06f9 patch 8.2.2635: Vim9: cannot define an inline function
Problem:    Vim9: cannot define an inline function.
Solution:   Make an inline function mostly work.
2021-03-21 20:53:29 +01:00
f90c855c71 patch 8.2.2634: 'tagfunc' does not indicate using a pattern
Problem:    'tagfunc' does not indicate using a pattern.
Solution:   Add the "r" flag. (Andy Massimino, closes #7982)
2021-03-21 14:49:57 +01:00
196a1f7409 patch 8.2.2633: multi-byte 'fillchars' for folding do not show properly
Problem:    Multi-byte 'fillchars' for folding do not show properly.
Solution:   Handle multi-byte characters correctly. (Yegappan Lakshmanan,
            closes #7983, closes #7955)
2021-03-21 14:39:19 +01:00
c5cf369e95 patch 8.2.2632: not all command line arguments are tested
Problem:    Not all command line arguments are tested.
Solution:   Add tests for -D and -serverlist. (Dominique Pellé, closes #7992)
2021-03-20 22:16:56 +01:00
a0c8aea479 patch 8.2.2631: commands from winrestcmd() do not always work properly
Problem:    Commands from winrestcmd() do not always work properly. (Leonid V.
            Fedorenchik)
Solution:   Repeat the size commands twice. (closes #7988)
2021-03-20 19:55:35 +01:00
592f57f5fe patch 8.2.2630: hard to see where a test gets stuck
Problem:    Hard to see where a test gets stuck.
Solution:   Print the executed test function. (Dominique Pellé, closes #7975)
2021-03-20 16:44:25 +01:00
a0399efa72 patch 8.2.2629: Vim9: error for #{{ is not desired
Problem:    Vim9: error for #{{ is not desired.
Solution:   Adjust the checks. (closes #7990)
2021-03-20 15:00:01 +01:00
5c7a299c16 patch 8.2.2628: Vim9: #{ can still be used at the script level
Problem:    Vim9: #{ can still be used at the script level.
Solution:   Give an error for #{ like in a :def function.
2021-03-20 13:29:38 +01:00
4355894869 patch 8.2.2627: no need to check for BSD after checking for not root
Problem:    No need to check for BSD after checking for not root.
Solution:   Remove CheckNotBSD. (Ozaki Kiichi, closes #7989)
2021-03-20 12:49:15 +01:00
240014321b patch 8.2.2626: GTK3: error when starting up and -geometry is given
Problem:    GTK3: error when starting up and -geometry is given. (Dominique
            Pellé)
Solution:   Use another function to get the monitor if the window has not been
            created yet. (closes #7978)
2021-03-20 12:36:46 +01:00
af125866db patch 8.2.2625: rss files not recognized
Problem:    Rss files not recognized.
Solution:   Recognize .rss as XML. (Kivin Locke, closes #7987)
2021-03-19 20:27:40 +01:00
74b99f6ab6 patch 8.2.2624: atom files not recognized
Problem:    Atom files not recognized.
Solution:   Recognize .atom as XML. (Kivin Locke, closes #7986)
2021-03-19 20:19:12 +01:00
17709e280a patch 8.2.2623: some tests fail when run as root
Problem:    Some tests fail when run as root.
Solution:   Use CheckNotRoot.
2021-03-19 14:38:12 +01:00
a555e6fcb6 patch 8.2.2622: GTK: error when starting up and -geometry is given
Problem:    GTK: error when starting up and -geometry is given. (Dominique
            Pellé)
Solution:   Use another function to get the monitor if the window has not been
            created yet. (closes #7978)
2021-03-18 22:28:57 +01:00
108cf0153c patch 8.2.2621: typval2type() cannot handle recursive structures
Problem:    typval2type() cannot handle recursive structures.
Solution:   Use copyID. (closes #7979)
2021-03-18 22:15:04 +01:00
4b3e1964d8 patch 8.2.2620: Vim9: Using #{ for a dictionary gives strange errors
Problem:    Vim9: Using #{ for a dictionary gives strange errors.
Solution:   Give an error when using #{ for a comment after a command.
2021-03-18 21:37:55 +01:00
5f91e74bf9 patch 8.2.2619: Vim9: no test for return type of lambda
Problem:    Vim9: no test for return type of lambda.
Solution:   Add a test.
2021-03-17 21:29:29 +01:00
3f32788000 patch 8.2.2618: Vim9: cannot use a normal list name to store function refs
Problem:    Vim9: cannot use a normal list name to store function refs.
Solution:   Allow a lower case name if it is indexed.
2021-03-17 20:56:38 +01:00
8863bda25d patch 8.2.2617: Vim9: script variable in block not found by function
Problem:    Vim9: script variable in a block scope not found by a nested
            function.
Solution:   Copy the block scope IDs before compiling the function.
2021-03-17 18:42:08 +01:00
3e1916947d patch 8.2.2616: Vim9: if 'cpo' is change in Vim9 script it may be restored
Problem:    Vim9: if 'cpo' is change in Vim9 script it may be restored.
Solution:   Apply the changes to 'cpo' to the restored value.
2021-03-17 17:46:00 +01:00
a4c81bea38 patch 8.2.2615: test is sourcing the wrong file
Problem:    Test is sourcing the wrong file.
Solution:   Correct the file name.
2021-03-17 15:23:16 +01:00
c970e4225b patch 8.2.2614: Vim9: function is deleted while executing
Problem:    Vim9: function is deleted while executing.
Solution:   increment the call count, when more than zero do not delete the
            function but mark it as dead. (closes #7977)
2021-03-17 15:03:04 +01:00
6ccfd99b92 patch 8.2.2613: new test throws exception
Problem:    New test throws exception.
Solution:   Adjust the function cleanup.
2021-03-17 13:39:33 +01:00
18b7d86d7f patch 8.2.2612: col('.') may get outdated column value
Problem:    col('.') may get outdated column value.
Solution:   Add a note to the help how to make this work and add a test for
            it. (closes #7971)
2021-03-17 13:28:05 +01:00
f8c52e8d08 patch 8.2.2611: conditions for startup tests are not exactly right
Problem:    Conditions for startup tests are not exactly right.
Solution:   Check for type of GUI instead of MS-Windows. (Ozaki Kiichi,
            closes #7976)
2021-03-17 12:27:23 +01:00
1e448465e1 patch 8.2.2610: mouse click test fails when using remote connection
Problem:    Mouse click test fails when using remote connection.
Solution:   Use a larger 'mousetime'. (Dominique Pellé, closes #7968)
2021-03-16 21:17:16 +01:00
3214812997 patch 8.2.2609: test disabled on MS-Windows even though it should work
Problem:    Test disabled on MS-Windows even though it should work.
Solution:   Restore the condition for skipping the test. (Ken Takata,
            closes #7970)
2021-03-16 13:23:30 +01:00
f4fcedc59d patch 8.2.2608: character input not fully tested
Problem:    Character input not fully tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes #7963)
2021-03-15 18:36:20 +01:00
02b4d9b18a patch 8.2.2607: strcharpart() cannot include composing characters
Problem:    strcharpart() cannot include composing characters.
Solution:   Add the {skipcc} argument.
2021-03-14 19:46:45 +01:00
70ce8a1561 patch 8.2.2606: strchars() defaults to counting composing characters
Problem:    strchars() defaults to counting composing characters.
Solution:   Add strcharlen() which ignores composing characters.
2021-03-14 19:02:09 +01:00
0289a093a4 patch 8.2.2605: Vim9: string index and slice does not include composing chars
Problem:    Vim9: string index and slice does not include composing chars.
Solution:   Include composing characters. (issue #6563)
2021-03-14 18:40:19 +01:00
240309c9bf patch 8.2.2604: GUI-specific command line arguments not tested
Problem:    GUI-specific command line arguments not tested.
Solution:   Add tests for several arguments. (Dominique Pellé, closes #7962)
2021-03-14 16:20:37 +01:00
77b10ffad4 patch 8.2.2603: Vim9: no effect if user command is also a function
Problem:    Vim9: no effect if user command is also a function.
Solution:   Check for paren following. (closes #7960)
2021-03-14 13:21:35 +01:00
2e34c34be1 patch 8.2.2602: Vim9: continue doesn't work if :while is very first command
Problem:    Vim9: continue doesn't work if :while is very first command.
            (Yegappan Lakshmanan)
Solution:   Add one to the continue instruction index.
2021-03-14 12:13:33 +01:00
6bce5856b5 patch 8.2.2601: memory usage test often fails on FreeBSD
Problem:    Memory usage test often fails on FreeBSD.
Solution:   Increase multiplier for upper limit.
2021-03-13 22:11:51 +01:00
93e1cae739 patch 8.2.2600: Vim9: crash when putting an unknown type in a dictionary
Problem:    Vim9: crash when putting an unknown type in a dictionary.
            (Yegappan Lakshmanan)
Solution:   Handle a NULL type pointer.
2021-03-13 21:24:56 +01:00
edba70703b patch 8.2.2599: build failure
Problem:    Build failure.
Solution:   Add missing change.
2021-03-13 21:14:18 +01:00
6508880d6c patch 8.2.2598: Vim9: :open does not need to be supported
Problem:    Vim9: :open does not need to be supported.
Solution:   Do not support :open in Vim9 script.
2021-03-13 21:07:21 +01:00
cb4e80fab9 patch 8.2.2597: Vim9: "import * as" does not work at script level
Problem:    Vim9: "import * as" does not work at script level.
Solution:   Implement using an imported namespace.
2021-03-13 20:57:19 +01:00
41cd80335c patch 8.2.2596: :doautocmd may confuse scripts listening to WinEnter
Problem:    :doautocmd may confuse scripts listening to WinEnter.
Solution:   Do the current buffer last. (closes #7958)
2021-03-13 15:47:56 +01:00
9e813b3dea patch 8.2.2595: setting 'winminheight' may cause 'lines' to change
Problem:    Setting 'winminheight' may cause 'lines' to change.
Solution:   Also take minimal height of other tabpages into account. (#7899)
2021-03-13 14:29:05 +01:00
0756f757ed patch 8.2.2594: alternate buffer added to session file even when it's hidden
Problem:    Alternate buffer added to session file even when it's hidden.
Solution:   Check the 'buflisted' option. (closes #7951)
2021-03-13 13:52:33 +01:00
0de8e2d6a3 patch 8.2.2593: list of distributed files is incomplete
Problem:    List of distributed files is incomplete.
Solution:   Add a file and rename another.
2021-03-13 13:30:03 +01:00
c8cdf0f80b Update runtime files. 2021-03-13 13:28:13 +01:00
6fd367a97c patch 8.2.2592: code coverage could be improved
Problem:    Code coverage could be improved.
Solution:   Add a few more tests. (Dominique Pellé, closes #7957)
2021-03-13 13:14:04 +01:00
c80f647512 patch 8.2.2591: Poke files are not recognized
Problem:    Poke files are not recognized.
Solution:   Add a filetype entry. (Matt Ihlenfield)
2021-03-12 22:16:41 +01:00
12bce95887 patch 8.2.2590: Vim9: default argument value may cause internal error
Problem:    Vim9: default argument value may cause internal error.
Solution:   Hide later function arguments when compiling the expression.
            (closes #7948)
2021-03-11 20:04:04 +01:00
776b954622 patch 8.2.2589: recover test hangs in the GUI
Problem:    Recover test hangs in the GUI.
Solution:   Add g:skipped_reason to skip a _nocatch_ test.
2021-03-10 22:27:48 +01:00
23b32a8d6b patch 8.2.2588: build failure with tiny features
Problem:    Build failure with tiny features.
Solution:   Add #ifdef.  Run recover test separately.
2021-03-10 21:55:46 +01:00
6635ae1437 patch 8.2.2587: recover test fails on FreeBSD
Problem:    Recover test fails on FreeBSD.
Solution:   Check for Linux.
2021-03-10 21:46:39 +01:00
f52f0606ed patch 8.2.2586: process id may be invalid
Problem:    Process id may be invalid.
Solution:   Use sysinfo.uptime to check for recent reboot. (suggested by Hugo
            van der Sanden, closes #7947)
2021-03-10 21:26:37 +01:00
c23555de34 patch 8.2.2585: Vim9: illegal memory access
Problem:    Vim9: illegal memory access.
Solution:   Check byte right after "null", not one more.
2021-03-10 19:04:07 +01:00
d345fb9216 patch 8.2.2584: Vim9: type error for assigning "any" to a list
Problem:    Vim9: type error for assigning the result of list concatenation to
            a list.
Solution:   Do not consider concatenation result in a constant. (closes #7942)
2021-03-10 18:43:09 +01:00
7ad67d1150 patch 8.2.2583: Vim9: cannot compare result of getenv() with null
Problem:    Vim9: cannot compare result of getenv() with null.
Solution:   Make the return type of getenv() "any". (closes #7943)
2021-03-10 16:08:26 +01:00
ffb7dcdb77 patch 8.2.2582: Vim9: screendump test fails on MS-Windows
Problem:    Vim9: screendump test fails on MS-Windows.
Solution:   Use :function instead of :def.
2021-03-10 14:00:18 +01:00
37294bd6a2 patch 8.2.2581: Vim9: sourcing Vim9 script triggers a redraw
Problem:    Vim9: sourcing Vim9 script triggers a redraw.
Solution:   Do not let setting/restoring 'cpoptions' cause a redraw.
            (closes #7920)
2021-03-10 13:40:08 +01:00
e3ffcd9902 patch 8.2.2580: Vim9: checking vararg type may be wrong
Problem:    Vim9: checking vararg type is wrong when function is auto-loaded.
Solution:   Use the member type. (closes #7933)
2021-03-08 21:47:13 +01:00
d00a7fb81a patch 8.2.2579: Vim9: crash in garbagecollect after for loop
Problem:    Vim9: crash in garbagecollect after for loop.
Solution:   Do not set a reference in script item when the name was cleared.
            (closes #7935)
2021-03-08 20:47:14 +01:00
86c3a2162c patch 8.2.2578: Lua cannot handle a passed in lambda
Problem:    Lua cannot handle a passed in lambda.
Solution:   Handle VAR_PARTIAL. (Prabir Shrestha, closes #7937, closes #7936)
2021-03-08 19:50:24 +01:00
9355ae4149 patch 8.2.2577: compiler warning for type conversion
Problem:    Compiler warning for type conversion.
Solution:   Add a typecast. (Mike Williams)
2021-03-08 19:04:05 +01:00
608d78fb45 patch 8.2.2576: Vim9: defining a :func function checks for white space
Problem:    Vim9: defining a :func function checks for white space after a
            comma in the arguments.
Solution:   Only check for white space in a :def function. (closes #7930)
2021-03-06 22:33:12 +01:00
6914e87d3c patch 8.2.2575: Vim9: a function name with "->" in the next line doesn't work
Problem:    Vim9: a function name with "->" in the next line doesn't work.
Solution:   Recognize a function name by itself. (closes #7770)
2021-03-06 21:01:09 +01:00
04947cc6ed patch 8.2.2574: Vim9: crash when calling partial with wrong function
Problem:    Vim9: crash when calling partial with wrong function.
Solution:   Check argument types of called function. (closes #7912)
2021-03-06 19:26:46 +01:00
a974953443 patch 8.2.2573: Vim9: using inalid pointer for error message
Problem:    Vim9: using inalid pointer for error message.
Solution:   Use the right pointer. (closes #7921)
2021-03-06 18:18:19 +01:00
18062fcad6 patch 8.2.2572: Vim9: crash when getting the types for a legacy function
Problem:    Vim9: crash when getting the types for a legacy function.
Solution:   Initialize the type list growarray. (closes #7929)
2021-03-05 21:35:47 +01:00
8c801b374b patch 8.2.2571: test may leave file behind
Problem:    Test may leave file behind.
Solution:   Delete the temporary file.  Don't profile in the running Vim
            instance.
2021-03-05 20:58:22 +01:00
f9a65505d1 patch 8.2.2570: tests fail when run as root
Problem:    Tests fail when run as root.
Solution:   Add a comment mentioning the expected failure. (issue #7919)
2021-03-05 20:47:44 +01:00
008bff967f patch 8.2.2569: 'fillchars' "stl" and "stlnc" items must be single byte
Problem:    'fillchars' "stl" and "stlnc" items must be single byte.
Solution:   Accept multi-byte characters. (Christian Wellenbrock, Yegappan
            Lakshmanan, closes #7927)
2021-03-04 21:55:58 +01:00
6057748a1a patch 8.2.2568: second time a preview popup is opened highlight is not set
Problem:    Second time a preview popup is opened highlight is not set.
            (Gabriel Dupras)
Solution:   Apply 'previewpopup' after getting the file. (closes #7928)
2021-03-04 21:35:07 +01:00
6c3843ca8a patch 8.2.2567: Vim9: no error if variable is defined for existing function
Problem:    Vim9: no error if variable is defined for existing function.
Solution:   Check if name isn't already in use. (closes #7897)
2021-03-04 12:38:21 +01:00
2e2d758902 patch 8.2.2566: Vim9: Function name is not recognized
Problem:    Vim9: Function name is not recognized.
Solution:   Change lookup_scriptvar() to also find function names.
            (closes #7770)
2021-03-03 21:22:41 +01:00
f76ec1eeb5 patch 8.2.2565: Vim9: "..=" not always recognized
Problem:    Vim9: "..=" not always recognized.
Solution:   Do not consider "..=" to be string concatenation. (closes #7905)
2021-03-03 17:58:16 +01:00
51b477f74f patch 8.2.2564: focus events end Insert mode if 'esckeys' is not set
Problem:    Focus events end Insert mode if 'esckeys' is not set.
Solution:   Do not enable focus events when 'esckeys' is off. (closes #7926)
2021-03-03 15:24:28 +01:00
4fa1175765 patch 8.2.2563: cannot use multibyte characters for folding in 'fillchars'
Problem:    Cannot use multibyte characters for folding in 'fillchars'.
Solution:   Port pull request 11568 to Vim. (Yegappan Lakshmanan,
            closes #7924)
2021-03-03 13:26:02 +01:00
37096afd3f patch 8.2.2562: GUI: star register changed when 'clipboard is "unnamedplus"
Problem:    GUI: star register changed when 'clipboard is "unnamedplus". (Ingo
            Karkat)
Solution:   Do not change the star register when 'clipboard' contains
            "unnamedplus" and not "unnamed". (closes #1516)
2021-03-02 19:04:11 +01:00
3dc3474f00 patch 8.2.2561: not all textprop code is covered by tests
Problem:    Not all textprop code is covered by tests.
Solution:   Add a few more test cases. (Dominique Pellé, closes #7908)
2021-03-02 13:36:47 +01:00
39d4cab494 patch 8.2.2560: setting 'winminheigt' does not take tabline into account
Problem:    Setting 'winminheigt' does not take tabline into account.
Solution:   Subtract the tabline from the available height. (closes #7899)
2021-03-01 21:02:46 +01:00
3650fd7098 patch 8.2.2559: MS-Windows: guifont test fails on Windows XP
Problem:    MS-Windows: guifont test fails on Windows XP.
Solution:   Check windowsversion().
2021-02-28 23:13:40 +01:00
057e84afe5 patch 8.2.2558: no error if a lambda argument shadows a variable
Problem:    No error if a lambda argument shadows a variable.
Solution:   Check that the argument name shadows a local, argument or script
            variable. (closes #7898)
2021-02-28 16:55:11 +01:00
087b5ff35d patch 8.2.2557: compiler warning for shadowd variable
Problem:    Compiler warning for shadowd variable.
Solution:   Declare "p" only once.
2021-02-27 23:39:22 +01:00
0a84284e60 patch 8.2.2556: Vim9: :import with "as" not fully supported
Problem:    Vim9: :import with "as" not fully supported.
Solution:   Implement "as" for more cases.
2021-02-27 22:41:19 +01:00
3f1e9f000f patch 8.2.2555: Vim9: missing test for 8.2.2553
Problem:    Vim9: missing test for 8.2.2553.
Solution:   Add a simple test.
2021-02-27 22:36:43 +01:00
0f2a5cc68b patch 8.2.2554: Vim9: exporting a final is not tested
Problem:    Vim9: exporting a final is not tested.
Solution:   Add a test.
2021-02-27 22:33:21 +01:00
9faec4e3d4 Update runtime files. 2021-02-27 16:38:07 +01:00
0abc6e471a patch 8.2.2553: Vim9: Cannot put "|" after "{"
Problem:    Vim9: Cannot put "|" after "{".
Solution:   Add the EX_TRLBAR flag. (issue #7904)
2021-02-26 22:21:23 +01:00
9f646c2e11 patch 8.2.2552: Vim9: no reason to consider "{{{{{{{{" a command
Problem:    Vim9: no reason to consider "{{{{{{{{" a command.
Solution:   Just use "{". (issue #7904)
2021-02-26 21:56:47 +01:00
d0bce504ec patch 8.2.2551: MS-Windows: colors test file is not installed
Problem:    MS-Windows: colors test file is not installed.
Solution:   Also copy runtime/colors/tools. (Ken Takata, closes #7902)
2021-02-26 20:25:35 +01:00
0e62a6742b patch 8.2.2550: signal stack size is wrong with latest glibc 2.34
Problem:    Signal stack size is wrong with latest glibc 2.34.
Solution:   Use sysconf(_SC_SIGSTKSZ) if available. (Zdenek Dohnal, closes
            #7895)
2021-02-25 17:17:56 +01:00
1bd3cb2019 patch 8.2.2549: crash after using "g:" in a for loop
Problem:    Crash after using "g:" in a for loop.
Solution:   Increment the reference count. (closes #7892)
2021-02-24 12:27:31 +01:00
7d41410a45 patch 8.2.2548: May get stuck in the cmdline window using :normal
Problem:    May get stuck in the cmdline window using :normal.
Solution:   Have nv_esc() return K_IGNORE.
2021-02-23 19:39:20 +01:00
2c6553498e patch 8.2.2547: "%" command not accurate for big files
Problem:    "%" command not accurate for big files.
Solution:   Make it more accurate for files up to 21M lines. (Dominique Pellé,
            closes #7889)
2021-02-23 19:32:03 +01:00
21a83bd53d patch 8.2.2546: typo in mouse key name
Problem:    Typo in mouse key name.
Solution:   Fix the typo. (issue #4725)
2021-02-23 19:19:58 +01:00
eba13e4ea2 patch 8.2.2545: errors and crash when terminal window is zero height
Problem:    Errors and crash when terminal window is zero height. (Leonid V.
            Fedorenchik)
Solution:   Do not resize when width or height is zero. (closes #7890)
2021-02-23 17:47:23 +01:00
bc327ccc3d patch 8.2.2544: Vim9: error for argument when checking for lambda
Problem:    Vim9: error for argument when checking for lambda.
Solution:   Respect the skip flag. (closes #7887)
2021-02-23 12:05:46 +01:00
9cb577a682 patch 8.2.2543: Vim9: a return inside try/catch does not restore properly
Problem:    Vim9: a return inside try/catch does not restore exception state
            properly.
Solution:   When there is no ":finally" jump to ":endtry". (closes #7882)
2021-02-22 22:45:10 +01:00
41f0895c6e patch 8.2.2542: highlight of char beyond line end is not correct
Problem:    Highlight of char beyond line end is not correct. (Chuan Wei Foo)
Solution:   Fix counting NUL as one cell.  Draw one more character if the EOL
            is part of the match. (closes #7883)
2021-02-22 22:13:49 +01:00
6bfc475f71 patch 8.2.2541: popup_create() does not allow boolean for "cursorline"
Problem:    Popup_create() does not allow boolean for "cursorline".
Solution:   Use dict_get_bool(). (issue #7869)
2021-02-21 23:12:18 +01:00
b4893b8450 patch 8.2.2540: Vim9: no error for using script var name for argument
Problem:    Vim9: no error for using script var name for argument.
Solution:   Check for this error. (closes #7868)
2021-02-21 22:20:24 +01:00
7e82c5f338 patch 8.2.2539: Vim9: return from finally block causes a hang
Problem:    Vim9: return from finally block causes a hang.
Solution:   Store both the finally and endtry indexes. (closes #7885)
2021-02-21 21:32:45 +01:00
21578271bb patch 8.2.2538: crash when using Python list iterator
Problem:    Crash when using Python list iterator.
Solution:   Increment the list reference count. (closes #7886)
2021-02-21 19:12:47 +01:00
027c4ab4d2 patch 8.2.2537: Vim9: crash when map() fails
Problem:    Vim9: crash when map() fails.
Solution:   Clear typval before using it. (closes #7884)
2021-02-21 16:20:18 +01:00
dc167465f8 patch 8.2.2536: Coverity complains about unchecked return value
Problem:    Coverity complains about unchecked return value.
Solution:   Add (void).
2021-02-20 20:26:16 +01:00
723ef5db98 patch 8.2.2535: MS-Windows: cannot run all vim9 tests
Problem:    MS-Windows: cannot run all vim9 tests.
Solution:   Make test_vim9 target work.
2021-02-20 20:13:42 +01:00
a1070eae77 patch 8.2.2534: missing test coverage
Problem:    Missing test coverage.
Solution:   Improve test coverage for completion with different encodings,
            mapset(), and term function failures. (Dominique Pellé,
            closes #7877)
2021-02-20 19:21:36 +01:00
5b5ae29bd3 patch 8.2.2533: Vim9: cannot use a range with :unlet
Problem:    Vim9: cannot use a range with :unlet.
Solution:   Implement ISN_UNLETRANGE.
2021-02-20 17:04:02 +01:00
ada1d870b4 patch 8.2.2532: Vim9: confusing error if :k is used with a range
Problem:    Vim9: confusing error if :k is used with a range.
Solution:   Give an error about the range. (issue #7874)
2021-02-20 08:16:51 +01:00
10b9421f3b patch 8.2.2531: Vim9: the :k command is obscure
Problem:    Vim9: the :k command is obscure.
Solution:   Disallow using :k, can use :mark instead. (closes #7874)
2021-02-19 21:42:57 +01:00
12d265315f patch 8.2.2530: Vim9: not enough testing for profiling
Problem:    Vim9: not enough testing for profiling.
Solution:   Add a test with nested functions and a lambda.  Fix profiling
            for calling a compiled function.
2021-02-19 19:13:21 +01:00
d3f8a9ee65 patch 8.2.2529: Vim9: Not possible to use legacy and Vim9 script in one file
Problem:    Vim9: Not possible to use legacy and Vim9 script in one file.
Solution:   Vim9: allow for "if false" before :vim9script. (closes #7851)
2021-02-17 21:57:03 +01:00
c7dac8534e patch 8.2.2528: Vim9: crash when compiling lambda fails
Problem:    Vim9: crash when compiling lambda fails.
Solution:   Bail out after compilation fails. (closes #7862)
2021-02-17 18:49:11 +01:00
064095012c patch 8.2.2527: Vim9: lambda return type is not determined at script level
Problem:    Vim9: lambda return type is not determined at script level.
Solution:   Compile the lambda to get the return type. (closes #7843)
2021-02-17 17:00:27 +01:00
527ed38cfa patch 8.2.2526: build failure
Problem:    Build failure.
Solution:   Change lookup_scriptvar() arguments.
2021-02-17 15:05:45 +01:00
e0890d678d patch 8.2.2525: Vim9: only local variables checked for a name
Problem:    Vim9: only local variables checked for a name.
Solution:   Also check arguments and script variables. (closes #7838)
2021-02-17 14:52:14 +01:00
3aca5a6fbc patch 8.2.2524: cannot change the characters displayed in the foldcolumn
Problem:    Cannot change the characters displayed in the foldcolumn.
Solution:   Add fields to 'fillchars'. (Yegappan Lakshmanan, Matthieu Coudron,
            closes #7860)
2021-02-17 13:14:07 +01:00
c0fcb6e0b1 patch 8.2.2523: Svelte filetype not recognized
Problem:    Svelte filetype not recognized.
Solution:   Add a detection rule. (Brian Ryall, closes #7858)
2021-02-17 12:29:17 +01:00
9bbd883b35 patch 8.2.2522: Beancount filetype not recognized
Problem:    Beancount filetype not recognized.
Solution:   Add a detection rule. (Brian Ryall, closes #7859)
2021-02-17 12:25:49 +01:00
333bd56422 patch 8.2.2521: some compilers can't handle pointer initialization
Problem:    Some compilers can't handle pointer initialization. (John
            Marriott)
Solution:   Use a local struct and assign it afterwards.
2021-02-16 22:22:13 +01:00
04ea7e9049 patch 8.2.2520: missing tests for 'listchars'
Problem:    Missing tests for 'listchars'.
Solution:   Add a few more checks. (Yegappan Lakshmanan, closes #7854)
2021-02-16 21:14:33 +01:00
b8554304c3 patch 8.2.2519: Vim9: no reason to keep strange Vi behavior
Problem:    Vim9: no reason to keep strange Vi behavior.
Solution:   ":3" and ":3|" both go to line 3. ":|" does not print the line.
            (closes #7840)
2021-02-15 21:30:30 +01:00
eed9d46293 patch 8.2.2518: 'listchars' should be window-local
Problem:    'listchars' should be window-local.
Solution:   Make 'listchars' global-local. (Yegappan Lakshmanan, Marco Hinz,
            closes #5206, closes #7850)
2021-02-15 20:38:25 +01:00
7c5b3c0369 patch 8.2.2517: Vim9: fix for s390 not tested on other systems
Problem:    Vim9: fix for s390 not tested on other systems.
Solution:   Add a test.
2021-02-14 22:40:57 +01:00
4afa77419f patch 8.2.2516: test failure on s390
Problem:    Test failure on s390. (analyses by James McCoy)
Solution:   Only set the try_finally label when not skipping.
2021-02-14 16:34:59 +01:00
6281815ecc patch 8.2.2515: memory access error when truncating an empty message
Problem:    Memory access error when truncating an empty message.
Solution:   Check for an empty string. (Dominique Pellé, closes #7841)
2021-02-14 15:37:30 +01:00
2379f87eb4 patch 8.2.2514: Vim9: build error in tiny version
Problem:    Vim9: build error in tiny version.
Solution:   Add #ifdef.
2021-02-14 14:07:34 +01:00
9979fcd72e patch 8.2.2513: Vim9: missing part of :vim9cmd change
Problem:    Vim9: missing part of :vim9cmd change.
Solution:   Use command modifier in in_vim9script().
2021-02-14 13:30:01 +01:00
03dfde2b5f patch 8.2.2512: Vim9: compiling error test sometimes fails
Problem:    Vim9: compiling error test sometimes fails.
Solution:   use WaitForAssert() instead of sleeping for a bit. (Dominique
            Pellé, closes #7837)
2021-02-14 13:17:22 +01:00
39f3b14110 patch 8.2.2511: Vim9: cannot use Vim9 script syntax in some places
Problem:    Vim9: cannot use Vim9 script syntax in some places.
Solution:   Add the :vim9cmd command modifier. Incompatible: Makes ":vim9"
            mean ":vim9cmd" instead of ":vim9script".
2021-02-14 12:57:36 +01:00
10ccfb2a17 patch 8.2.2510: internal error when popup with mask is zero height or width
Problem:    Internal error when popup with mask is zero height or width.
Solution:   Bail out if width or height is zero. (closes #7831)
2021-02-13 21:31:18 +01:00
8d4be89011 patch 8.2.2509: tests fail on s390 build
Problem:    Tests fail on s390 build.
Solution:   Initialize trycmd_T.
2021-02-13 18:33:02 +01:00
a98f8a2305 patch 8.2.2508: cannot change the character displayed in non existing lines
Problem:    Cannot change the character displayed in non existing lines.
Solution:   Add the "eob" item to 'fillchars'. (closes #7832, closes #3820)
2021-02-13 18:24:23 +01:00
942db23c9c Update runtime files 2021-02-13 18:14:48 +01:00
0fa09676c2 patch 8.2.2507: github build may fail if Ubuntu 20.04 is used
Problem:    Github build may fail if Ubuntu 20.04 is used.  Installing rust is
            not needed.
Solution:   Specify ubuntu-18.04 instead of latest. Update "pip" instead of
            installing rust. (Ozaki Kiichi, closes #7820)
2021-02-13 17:08:33 +01:00
c150c09ec4 patch 8.2.2506: Vim9: :continue does not work correctly in a :try block
Problem:    Vim9: :continue does not work correctly in a :try block
Solution:   Add the TRYCLEANUP instruction. (closes #7827)
2021-02-13 15:02:46 +01:00
31842cd077 patch 8.2.2505: Vim9: crash after defining function with invalid return type
Problem:    Vim9: crash after defining function with invalid return type.
Solution:   Clear function growarrays.  Fix memory leak.
2021-02-12 22:10:21 +01:00
44ec21c467 patch 8.2.2504: Vim9: crash when using an argument from a closure
Problem:    Vim9: crash when using an argument from a closure.
Solution:   Check if gen_load_outer is NULL. (closes #7821)
2021-02-12 21:50:57 +01:00
d9d7789b6f patch 8.2.2503: Vim9: a caught error may leave something on the stack
Problem:    Vim9: a caught error may leave something on the stack.
Solution:   Drop items from the stack if needed. (closes #7826)
2021-02-12 21:32:47 +01:00
ca753ec862 patch 8.2.2502: a few github actions are failing
Problem:    A few github actions are failing.
Solution:   Install setuptools-rust. (closes #7823)
2021-02-12 19:48:51 +01:00
f785aa1354 patch 8.2.2501: not always clear where an error is reported
Problem:    Not always clear where an error is reported.
Solution:   Add the where_T structure and pass it around. (closes #7796)
2021-02-11 21:19:34 +01:00
0bcadf14aa patch 8.2.2500: build fails without the GUI feature
Problem:    Build fails without the GUI feature.
Solution:   Add #ifdef.
2021-02-11 19:18:58 +01:00
3b678047bc patch 8.2.2499: "vim -g --version" does not redirect output
Problem:    "vim -g --version" does not redirect output.
Solution:   Reset gui.starting when showing version info. (closes #7815)
2021-02-11 19:08:05 +01:00
5affc03468 patch 8.2.2498: no test for what 8.2.2494 fixes
Problem:    No test for what 8.2.2494 fixes.
Solution:   Add a simple change to test the fix. (closes #7818)
2021-02-11 18:36:30 +01:00
418a29f0ff patch 8.2.2497: no error when using more than one character for a register
Problem:    No error when using more than one character for a register name.
Solution:   In Vim9 script check for a single character string. (closes #7814)
            Fix that VAR_BOOL and VAR_SPECIAL are not considered equal.
2021-02-10 22:23:41 +01:00
5202929dab patch 8.2.2496: insufficien testing for text jumping fix
Problem:    Insufficien testing for text jumping fix.
Solution:   Add another test case.
2021-02-10 21:20:30 +01:00
8f33ebfade patch 8.2.2495: text jumps up and down when moving the cursor
Problem:    Text jumps up and down when moving the cursor in a small window
            with wrapping text and 'scrolloff' set.
Solution:   Adjust the computation of w_skipcol. (partly by Ghjuvan Lacambre,
            closes #7813)
2021-02-10 21:10:12 +01:00
3ff656f6b4 patch 8.2.2494: ":rviminfo!" clears most of oldfiles
Problem:    ":rviminfo!" clears most of oldfiles.
Solution:   Add VIF_ONLY_CURBUF to read_viminfo(). (closes #1781)
2021-02-10 19:22:15 +01:00
f3fa18468c patch 8.2.2493: text property for text left of window shows up
Problem:    Text property for text left of window shows up.
Solution:   Check if the text property ends before the current column.
            (closes #7806)
2021-02-10 17:20:28 +01:00
b17ec4d427 patch 8.2.2492: command line buffer name cannot be translated
Problem:    Command line buffer name cannot be translated.
Solution:   Add _(). (Gabriel Dupras, closes #7812)
2021-02-10 16:45:24 +01:00
82db31c104 patch 8.2.2491: popup window for text property may show in first screen line
Problem:    Popup window for text property may show in first screen line.
Solution:   If the text position is invisible do not show the popup window.
            (closes #7807)
2021-02-10 14:56:11 +01:00
4223d43c0f patch 8.2.2490: 'wrap' option is always reset when starting diff mode
Problem:    'wrap' option is always reset when starting diff mode.
Solution:   Add the "followwrap" item in 'diffopt'. (Rick Howe, closes #7797)
2021-02-10 13:18:17 +01:00
963ffa0a5a patch 8.2.2489: current buffer is wrong after deletebufline() fails
Problem:    current buffer is wrong after deletebufline() fails to delete a
            line in another buffer.
Solution:   Restore the current buffer.
2021-02-09 20:02:55 +01:00
a853089479 patch 8.2.2488: json_encode() gives generic argument error
Problem:    json_encode() gives generic argument error.
Solution:   Mention the type that can't be encoded. (issue #7802)
2021-02-08 21:53:09 +01:00
4549dad874 patch 8.2.2487: terminal shows garbage after double-wide character
Problem:    Terminal shows garbage after double-wide character with a
            combining character. (Kyoichiro Yamada)
Solution:   Libvterm: do not add the width of the combining character to the
            glyph width. (closes #7801)
2021-02-08 21:29:48 +01:00
ba98fb54ae patch 8.2.2486: Vim9: some errors for white space do not show context
Problem:    Vim9: some errors for white space do not show context.
Solution:   Include the text at the error.
2021-02-07 18:06:29 +01:00
0123cc1e14 patch 8.2.2485: when sourcing a script again the script version isn't reset
Problem:    When sourcing a script again the script version isn't reset.
Solution:   Set sn_version to one when sourcing a script again. Clear
            sn_save_cpo properly. (closes #7608)
2021-02-07 17:17:58 +01:00
dee37dc733 patch 8.2.2484: Vim9: Cannot use a comment starting with #{
Problem:    Vim9: Cannot use a comment starting with #{ after an expression.
Solution:   Remove the check for "{" since #{ dictionaries are not supported.
2021-02-07 16:40:05 +01:00
6628b7ebff patch 8.2.2483: Vim9: type error for misformed expression
Problem:    Vim9: type error for misformed expression.
Solution:   Check for end of command before checking type. (closes #7795)
2021-02-07 16:33:35 +01:00
a5a1ec1826 patch 8.2.2482: build error
Problem:    Build error.
Solution:   Add new error message.
2021-02-07 16:05:47 +01:00
4f53b79bf5 patch 8.2.2481: Vim9: confusing error when variable arguments have default
Problem:    Vim9: confusing error when variable arguments have a default
            value.
Solution:   Give a specific error message. (closes #7793)
2021-02-07 15:59:49 +01:00
c3fc75db02 patch 8.2.2480: Vim9: some errors for white space do not show context
Problem:    Vim9: some errors for white space do not show context.
Solution:   Include the text at the error.
2021-02-07 15:28:09 +01:00
00385114db patch 8.2.2479: set/getbufline test fails without the job feature
Problem:    set/getbufline test fails without the job feature.
Solution:   Check whether the job feature is supported. (Dominique Pellé,
            closes #7790)
2021-02-07 14:31:06 +01:00
0dc5f603e9 patch 8.2.2478: MS-Windows: backup files for plugins are loaded
Problem:    MS-Windows: backup files for plugins are loaded.
Solution:   Do not use the alternate file name for files ending in "~".
2021-02-07 14:01:35 +01:00
dd07c02232 patch 8.2.2477: autocommand tests hang on MS-Windows
Problem:    Autocommand tests hang on MS-Windows.
Solution:   Skip a couple of tests.  Fix file name.
2021-02-07 13:32:46 +01:00
983d83ff1c patch 8.2.2476: using freed memory when splitting window while closing buffer
Problem:    Using freed memory when using an autocommand to split a window
            while a buffer is being closed.
Solution:   Disallow splitting when the buffer has b_locked_split set.
2021-02-07 12:12:43 +01:00
dfc3db76b9 patch 8.2.2475: autocommand tests hangs on MS-Windows
Problem:    Autocommand tests hangs on MS-Windows.
Solution:   Skip one test.
2021-02-06 19:28:48 +01:00
2c7080bf1c patch 8.2.2474: using freed memory when window is closed by autocommand
Problem:    Using freed memory when window is closed by autocommand.
            (houyunsong)
Solution:   Check the window pointer is still valid.
2021-02-06 19:19:42 +01:00
8c6951fa28 patch 8.2.2473: crash when leaving command line window triggers autocommand
Problem:    Crash when leaving command line window triggers autocommand.
            (houyunsong)
Solution:   Make sure not to close the current window or buffer.
2021-02-06 18:08:45 +01:00
aad5f9d79a patch 8.2.2472: crash when using command line window in an autocommand
Problem:    Crash when using command line window in an autocommand.
            (houyunsong)
Solution:   Save and restore au_new_curbuf.
2021-02-06 17:30:31 +01:00
efa1923565 patch 8.2.2471: popup_setoptions() does not set textprop in other tab
Problem:    Popup_setoptions() does not set textprop in other tab.
Solution:   use win_valid_any_tab(). (closes #7788)
2021-02-06 14:59:27 +01:00
6502643677 patch 8.2.2470: popup_getoptions() does not get textprop from other tab
Problem:    Popup_getoptions() does not get textprop from other tab.
Solution:   use win_valid_any_tab(). (closes #7786)
2021-02-06 14:22:32 +01:00
f5a5116a96 patch 8.2.2469: confusing error if :winsize has a wrong argument
Problem:    Confusing error if :winsize has a wrong argument.
Solution:   Quote the argument in the error. (closes #2523)
2021-02-06 12:58:18 +01:00
038e09ee76 patch 8.2.2468: not easy to get the full command name from a shortened one
Problem:    Not easy to get the full command name from a shortened one.
Solution:   Add fullcommand(). (Martin Tournoij, closes #7777)
2021-02-06 12:38:51 +01:00
139348f3e8 patch 8.2.2467: script generated by :mkview changes alternate file
Problem:    Script generated by :mkview changes alternate file.
Solution:   Only write :balt in the session file. (Harish Rajagopal,
            closes #7779)
2021-02-05 21:55:53 +01:00
ab65fc77c5 patch 8.2.2466: max() and min() can give many error messages
Problem:    Max() and min() can give many error messages.
Solution:   Bail out at the first error. (closes #1039, closes #7778)
2021-02-04 22:07:16 +01:00
92bb83e41c patch 8.2.2465: using freed memory in :psearch
Problem:    Using freed memory in :psearch. (houyunsong)
Solution:   Check the current window is still valid.  Fix flaky test.
2021-02-03 23:04:46 +01:00
8ab375706e patch 8.2.2464: using freed memory if window closed in autocommand
Problem:    Using freed memory if window closed in autocommand. (houyunsong)
Solution:   Check the window still exists.
2021-02-03 21:56:59 +01:00
6bcb877ec1 patch 8.2.2463: using :arglocal in an autocommand may use freed memory
Problem:    Using :arglocal in an autocommand may use freed memory.
            (houyunsong)
Solution:   Check if the arglist is locked.
2021-02-03 21:23:29 +01:00
2c363a2e95 patch 8.2.2462: Coverity warns for not checking for fseek() error
Problem:    Coverity warns for not checking for fseek() error.
Solution:   Give an error message if fseek() fails.
2021-02-03 20:14:23 +01:00
fef8064b54 patch 8.2.2461: Coverity warns for unchecked return value
Problem:    Coverity warns for unchecked return value.
Solution:   Add "(void)" to avoid the warning.
2021-02-03 20:01:19 +01:00
fc1dafa91c patch 8.2.2460: Coverity warns for unused value
Problem:    Coverity warns for unused value.
Solution:   Do not reset the return value to OK.
2021-02-03 19:57:00 +01:00
8bead9a058 patch 8.2.2459: Coverity reports dead code
Problem:    Coverity reports dead code.
Solution:   Remove the dead code.
2021-02-03 19:51:18 +01:00
0dcd39bad5 patch 8.2.2458: Coverity warns for :retab using freed memory
Problem:    Coverity warns for :retab using freed memory.
Solution:   Use the updated line pointer when moving text properties.
2021-02-03 19:44:25 +01:00
4dba04256b patch 8.2.2457: Coverity warns for memory leak
Problem:    Coverity warns for memory leak.
Solution:   Free memory when out of memory.
2021-02-03 19:35:13 +01:00
7b6903f02c patch 8.2.2456: Coverity warning for strcpy() into fixed size array
Problem:    Coverity warning for strcpy() into fixed size array.
Solution:   Add a type cast to hopefully silence the bogus warning.
2021-02-03 19:31:29 +01:00
2e5910bfbb patch 8.2.2455: Vim9: key type for literal dict and indexing is inconsistent
Problem:    Vim9: key type that can be used for literal dict and indexing is
            inconsistent.
Solution:   Allow using number and bool as key for a literal dict. (#7771)
2021-02-03 17:41:24 +01:00
91478ae49a patch 8.2.2454: leading space can not be made visible
Problem:    Leading space can not be made visible.
Solution:   Add "lead:" to 'listchars'. (closes #7772)
2021-02-03 15:58:13 +01:00
148be9bc1c patch 8.2.2453: Vim9: a variable name with "->" in the next line doesn't work
Problem:    Vim9: a variable name with "->" in the next line doesn't work.
Solution:   Recognize a variable name by itself. (closes #7770)
2021-02-02 21:33:52 +01:00
d5e8c92816 patch 8.2.2452: no completion for the 'filetype' option
Problem:    No completion for the 'filetype' option.
Solution:   Add filetype completion. (Martin Tournoij, closes #7747)
2021-02-02 21:10:01 +01:00
e7bebc495d patch 8.2.2451: MS-Windows: Extended Attributes not preserved
Problem:    MS-Windows: Extended Attributes not preserved.
Solution:   Preserve Extended Attributes when writing a file. (Ken Takata,
            closes #7765)
2021-02-01 20:50:37 +01:00
303 changed files with 13404 additions and 4170 deletions

14
.github/CODEOWNERS vendored
View File

@ -42,6 +42,7 @@ runtime/compiler/jshint.vim @dkearns
runtime/compiler/jsonlint.vim @dkearns
runtime/compiler/lazbuild.vim @dkearns
runtime/compiler/php.vim @dkearns
runtime/compiler/powershell.vim @heaths
runtime/compiler/rake.vim @tpope @dkearns
runtime/compiler/rhino.vim @dkearns
runtime/compiler/rspec.vim @tpope @dkearns
@ -51,6 +52,7 @@ runtime/compiler/rubyunit.vim @dkearns
runtime/compiler/sass.vim @tpope
runtime/compiler/se.vim @dkearns
runtime/compiler/shellcheck.vim @dkearns
runtime/compiler/sml.vim @dkearns
runtime/compiler/stylelint.vim @dkearns
runtime/compiler/tcl.vim @dkearns
runtime/compiler/tidy.vim @dkearns
@ -66,6 +68,7 @@ runtime/doc/pi_netrw.txt @cecamp
runtime/doc/pi_tar.txt @cecamp
runtime/doc/pi_vimball.txt @cecamp
runtime/doc/pi_zip.txt @cecamp
runtime/doc/ps1.txt @heaths
runtime/ftplugin/awk.vim @dkearns
runtime/ftplugin/basic.vim @dkearns
runtime/ftplugin/bst.vim @tpope
@ -92,6 +95,8 @@ runtime/ftplugin/matlab.vim @cecamp
runtime/ftplugin/nroff.vim @a-vrma
runtime/ftplugin/nsis.vim @k-takata
runtime/ftplugin/pdf.vim @tpope
runtime/ftplugin/ps1.vim @heaths
runtime/ftplugin/ps1xml.vim @heaths
runtime/ftplugin/ruby.vim @tpope @dkearns
runtime/ftplugin/sass.vim @tpope
runtime/ftplugin/scss.vim @tpope
@ -110,6 +115,7 @@ runtime/indent/gitconfig.vim @tpope
runtime/indent/haml.vim @tpope
runtime/indent/liquid.vim @tpope
runtime/indent/nsis.vim @k-takata
runtime/indent/ps1.vim @heaths
runtime/indent/ruby.vim @AndrewRadev @dkearns
runtime/indent/sass.vim @tpope
runtime/indent/scss.vim @tpope
@ -141,6 +147,7 @@ runtime/syntax/csh.vim @cecamp
runtime/syntax/cucumber.vim @tpope
runtime/syntax/datascript.vim @dpelle
runtime/syntax/dcl.vim @cecamp
runtime/syntax/desktop.vim @e-kwsm
runtime/syntax/doxygen.vim @frogonwheels
runtime/syntax/dtd.vim @chrisbra
runtime/syntax/elmfilt.vim @cecamp
@ -151,6 +158,7 @@ runtime/syntax/gitcommit.vim @tpope
runtime/syntax/gitconfig.vim @tpope
runtime/syntax/gitrebase.vim @tpope
runtime/syntax/gprof.vim @dpelle
runtime/syntax/groff.vim @jmarshall
runtime/syntax/haml.vim @tpope
runtime/syntax/haskell.vim @coot
runtime/syntax/hgcommit.vim @k-takata
@ -161,15 +169,17 @@ 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/nroff.vim @jmarshall
runtime/syntax/nsis.vim @k-takata
runtime/syntax/pdf.vim @tpope
runtime/syntax/php.vim @TysonAndre
runtime/syntax/privoxy.vim @dkearns
runtime/syntax/prolog.vim @XVilka
runtime/syntax/ps1.vim @heaths
runtime/syntax/ps1xml.vim @heaths
runtime/syntax/rc.vim @chrisbra
runtime/syntax/rpcgen.vim @cecamp
runtime/syntax/ruby.vim @dkearns
@ -179,7 +189,9 @@ runtime/syntax/sh.vim @cecamp
runtime/syntax/sm.vim @cecamp
runtime/syntax/spec.vim @ignatenkobrain
runtime/syntax/sqloracle.vim @chrisbra
runtime/syntax/sshconfig.vim @Jakuje
runtime/syntax/sshdconfig.vim @Jakuje
runtime/syntax/sudoers.vim @e-kwsm
runtime/syntax/tags.vim @cecamp
runtime/syntax/teraterm.vim @k-takata
runtime/syntax/tex.vim @cecamp

View File

@ -7,7 +7,7 @@ on:
jobs:
linux:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
env:
CC: ${{ matrix.compiler }}
@ -208,6 +208,7 @@ jobs:
TRAVIS_JOB_ID: ${{ github.run_id }}
run: |
sudo apt-get install -y python3-setuptools python3-wheel
sudo -H pip3 install pip -U
# needed for https support for coveralls building cffi only works with gcc, not with clang
CC=gcc pip3 install --user cpp-coveralls pyopenssl ndg-httpsclient pyasn1
~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8
@ -227,7 +228,7 @@ jobs:
done
coveralls:
runs-on: ubuntu-latest
runs-on: ubuntu-18.04
needs: linux
if: always() && github.event_name != 'pull_request'

View File

@ -13,7 +13,8 @@ SRC_ALL = \
.hgignore \
.lgtm.yml \
.travis.yml \
appveyor.yml \
.appveyor.yml \
.codecov.yml \
ci/appveyor.bat \
ci/build-snd-dummy.sh \
ci/config.mk*.sed \

View File

@ -70,6 +70,7 @@ the text. For example, reindent all the lines:
| Vim new | 0.190276 |
The differences are smaller, but Vim 9 script is clearly the fastest.
Using LuaJIT gives 0.25, only a little bit faster than plain Lua.
How does Vim9 script work? The function is first compiled into a sequence of
instructions. Each instruction has one or two parameters and a stack is

View File

@ -6,7 +6,7 @@ if 1
echo "*** Interface versions ***\n"
echo 'Lua:'
PrintVer lua print(_VERSION)
PrintVer lua print(vim.lua_version, jit and "(LuaJIT)" or "")
echo 'MzScheme:'
PrintVer mzscheme (display (version))

View File

@ -359,6 +359,8 @@ Section "$(str_section_exe)" id_section_exe
SetOutPath $0\colors
File ${VIMRT}\colors\*.*
SetOutPath $0\colors\tools
File ${VIMRT}\colors\tools\*.*
SetOutPath $0\compiler
File ${VIMRT}\compiler\*.*

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" URL: https://github.com/shawncplus/phpcomplete.vim
" Last Change: 2018 Oct 10
" Last Change: 2021 Feb 08
"
" OPTIONS:
"
@ -122,7 +122,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
endif
endif
" If exists b:php_menu it means completion was already constructed we
" don't need to do anything more
if exists("b:php_menu")
@ -148,8 +147,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
try
let eventignore = &eventignore
let &eventignore = 'all'
let winheight = winheight(0)
let winnr = winnr()
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
@ -183,7 +180,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
endif
if filereadable(classlocation)
let classfile = readfile(classlocation)
let classcontent = ''
let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname)
let sccontent = split(classcontent, "\n")
@ -217,7 +213,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
return phpcomplete#CompleteGeneral(a:base, current_namespace, imports)
endif
finally
silent! exec winnr.'resize '.winheight
let &eventignore = eventignore
endtry
endfunction
@ -1025,7 +1020,7 @@ function! phpcomplete#CompleteUserClass(context, base, sccontent, visibility) "
let c_var = '$'.c_var
endif
let c_variables[c_var] = ''
if g:phpcomplete_parse_docblock_comments && len(get(variables, var_index)) > 0
if g:phpcomplete_parse_docblock_comments && len(get(variables, var_index, '')) > 0
let c_doc[c_var] = phpcomplete#GetDocBlock(a:sccontent, variables[var_index])
endif
let var_index += 1
@ -2082,26 +2077,17 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
" ...
" ]
"
let full_file_path = fnamemodify(a:file_path, ':p')
let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
let cfile = join(a:file_lines, "\n")
let full_file_path = fnamemodify(a:file_path, ':p')
let result = []
" We use new buffer and (later) normal! because
" this is the most efficient way. The other way
" is to go through the looong string looking for
" matching {}
let popup_id = popup_create(a:file_lines, {'hidden': v:true})
" remember the window we started at
let phpcomplete_original_window = winnr()
call win_execute(popup_id, 'call search(''\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)'')')
call win_execute(popup_id, "let cfline = line('.')")
call win_execute(popup_id, "call search('{')")
call win_execute(popup_id, "let endline = line('.')")
silent! below 1new
silent! 0put =cfile
call search('\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)')
let cfline = line('.')
call search('{')
let endline = line('.')
let content = join(getline(cfline, endline), "\n")
call win_execute(popup_id, 'let content = join(getline('.cfline.', '.endline.'), "\n")')
" Catch extends
if content =~? 'extends'
let extends_string = matchstr(content, '\(class\|interface\)\_s\+'.a:class_name.'\_.\+extends\_s\+\zs\('.class_name_pattern.'\(,\|\_s\)*\)\+\ze\(extends\|{\)')
@ -2117,14 +2103,16 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
else
let implemented_interfaces = []
endif
call searchpair('{', '', '}', 'W')
let class_closing_bracket_line = line('.')
call win_execute(popup_id, 'let [class_closing_bracket_line, class_closing_bracket_col] = searchpairpos("{", "", "}", "W")')
" Include class docblock
let doc_line = cfline - 1
if getline(doc_line) =~? '^\s*\*/'
call win_execute(popup_id, 'let l = getline('.doc_line.')')
if l =~? '^\s*\*/'
while doc_line != 0
if getline(doc_line) =~? '^\s*/\*\*'
call win_execute(popup_id, 'let l = getline('.doc_line.')')
if l =~? '^\s*/\*\*'
let cfline = doc_line
break
endif
@ -2132,22 +2120,22 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
endwhile
endif
let classcontent = join(getline(cfline, class_closing_bracket_line), "\n")
call win_execute(popup_id, 'let classcontent = join(getline('.cfline.', '.class_closing_bracket_line.'), "\n")')
let used_traits = []
" move back to the line next to the class's definition
call cursor(endline + 1, 1)
call win_execute(popup_id, 'call cursor('.(endline + 1).', 1)')
let keep_searching = 1
while keep_searching != 0
" try to grab "use..." keywords
let [lnum, col] = searchpos('\c^\s\+use\s\+'.class_name_pattern, 'cW', class_closing_bracket_line)
let syn_name = synIDattr(synID(lnum, col, 0), "name")
call win_execute(popup_id, 'let [lnum, col] = searchpos(''\c^\s\+use\s\+'.class_name_pattern.''', "cW", '.class_closing_bracket_line.')')
call win_execute(popup_id, 'let syn_name = synIDattr(synID('.lnum.', '.col.', 0), "name")')
if syn_name =~? 'string\|comment'
call cursor(lnum + 1, 1)
call win_execute(popup_id, 'call cursor('.(lnum + 1).', 1)')
continue
endif
let trait_line = getline(lnum)
call win_execute(popup_id, 'let trait_line = getline('.lnum.')')
if trait_line !~? ';'
" try to find the next line containing ';'
let l = lnum
@ -2157,25 +2145,23 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
while search_line !~? ';' && l > 0
" file lines are reversed so we need to go backwards
let l += 1
let search_line = getline(l)
call win_execute(popup_id, 'let search_line = getline('.l.')')
let trait_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
endwhile
endif
let use_expression = matchstr(trait_line, '^\s*use\s\+\zs.\{-}\ze;')
let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
let used_traits += map(use_parts, 'substitute(v:val, "\\s", "", "g")')
call cursor(lnum + 1, 1)
call win_execute(popup_id, 'call cursor('.(lnum + 1).', 1)')
if [lnum, col] == [0, 0]
let keep_searching = 0
endif
endwhile
silent! bw! %
call popup_close(popup_id)
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(a:file_lines[0:cfline])
" go back to original window
exe phpcomplete_original_window.'wincmd w'
call add(result, {
\ 'class': a:class_name,
\ 'content': classcontent,
@ -2532,40 +2518,37 @@ function! phpcomplete#FormatDocBlock(info) " {{{
endif
return res
endfunction!
endfunction
" }}}
function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
let original_window = winnr()
silent! below 1new
silent! 0put =a:file_lines
normal! G
let popup_id = popup_create(a:file_lines, {'hidden': v:true})
call win_execute(popup_id, 'normal! G')
" clear out classes, functions and other blocks
while 1
let block_start_pos = searchpos('\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{', 'Web')
call win_execute(popup_id, 'let block_start_pos = searchpos(''\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{'', "Web")')
if block_start_pos == [0, 0]
break
endif
let block_end_pos = searchpairpos('{', '', '}\|\%$', 'W', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
call win_execute(popup_id, 'let block_end_pos = searchpairpos("{", "", ''}\|\%$'', "W", ''synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"'')')
let popup_lines = winbufnr(popup_id)->getbufline(1, '$')
if block_end_pos != [0, 0]
" end of the block found, just delete it
silent! exec block_start_pos[0].','.block_end_pos[0].'d _'
call remove(popup_lines, block_start_pos[0] - 1, block_end_pos[0] - 1)
else
" block pair not found, use block start as beginning and the end
" of the buffer instead
silent! exec block_start_pos[0].',$d _'
call remove(popup_lines, block_start_pos[0] - 1, -1)
endif
call popup_settext(popup_id, popup_lines)
endwhile
normal! G
call win_execute(popup_id, 'normal! G', 'silent!')
" grab the remains
let file_lines = reverse(getline(1, line('.') - 1))
silent! bw! %
exe original_window.'wincmd w'
call win_execute(popup_id, "let file_lines = reverse(getline(1, line('.')-1))")
call popup_close(popup_id)
let namespace_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
let i = 0

View File

@ -1,12 +1,16 @@
" Vim completion script
" Language: All languages, uses existing syntax highlighting rules
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Version: 13.0
" Last Change: 2019 Aug 08
" Version: 14.0
" Last Change: 2020 Dec 30
" Usage: For detailed help, ":help ft-syntax-omni"
" History
"
" Version 14.0
" - Fixed issue with single quotes and is_keyword
" https://github.com/vim/vim/issues/7463
"
" Version 13.0
" - Extended the option omni_syntax_group_include_{filetype}
" to accept a comma separated list of regex's rather than
@ -179,7 +183,8 @@ function! syntaxcomplete#Complete(findstart, base)
endif
" let base = s:prepended . a:base
let base = s:prepended
" let base = s:prepended
let base = substitute(s:prepended, "'", "''", 'g')
let filetype = substitute(&filetype, '\.', '_', 'g')
let list_idx = index(s:cache_name, filetype, 0, &ignorecase)
@ -548,7 +553,7 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
" let syn_list = substitute( @l, '^.*xxx\s*\%(contained\s*\)\?', "", '' )
" let syn_list = substitute( @l, '^.*xxx\s*', "", '' )
" We only want the words for the lines begining with
" We only want the words for the lines beginning with
" containedin, but there could be other items.
" Tried to remove all lines that do not begin with contained

View File

@ -0,0 +1,84 @@
" Vim compiler file
" Compiler: powershell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2020 Mar 30
if exists("current_compiler")
finish
endif
let current_compiler = "powershell"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
if !exists("g:ps1_makeprg_cmd")
if executable('pwsh')
" pwsh is the future
let g:ps1_makeprg_cmd = 'pwsh'
elseif executable('pwsh.exe')
let g:ps1_makeprg_cmd = 'pwsh.exe'
elseif executable('powershell.exe')
let g:ps1_makeprg_cmd = 'powershell.exe'
else
let g:ps1_makeprg_cmd = ''
endif
endif
if !executable(g:ps1_makeprg_cmd)
echoerr "To use the powershell compiler, please set g:ps1_makeprg_cmd to the powershell executable!"
endif
" Show CategoryInfo, FullyQualifiedErrorId, etc?
let g:ps1_efm_show_error_categories = get(g:, 'ps1_efm_show_error_categories', 0)
" Use absolute path because powershell requires explicit relative paths
" (./file.ps1 is okay, but # expands to file.ps1)
let &l:makeprg = g:ps1_makeprg_cmd .' %:p:S'
" Parse file, line, char from callstacks:
" Write-Ouput : The term 'Write-Ouput' is not recognized as the name of a
" cmdlet, function, script file, or operable program. Check the spelling
" of the name, or if a path was included, verify that the path is correct
" and try again.
" At C:\script.ps1:11 char:5
" + Write-Ouput $content
" + ~~~~~~~~~~~
" + CategoryInfo : ObjectNotFound: (Write-Ouput:String) [], CommandNotFoundException
" + FullyQualifiedErrorId : CommandNotFoundException
" Showing error in context with underlining.
CompilerSet errorformat=%+G+%m
" Error summary.
CompilerSet errorformat+=%E%*\\S\ :\ %m
" Error location.
CompilerSet errorformat+=%CAt\ %f:%l\ char:%c
" Errors that span multiple lines (may be wrapped to width of terminal).
CompilerSet errorformat+=%C%m
" Ignore blank/whitespace-only lines.
CompilerSet errorformat+=%Z\\s%#
if g:ps1_efm_show_error_categories
CompilerSet errorformat^=%+G\ \ \ \ +\ %.%#\\s%#:\ %m
else
CompilerSet errorformat^=%-G\ \ \ \ +\ %.%#\\s%#:\ %m
endif
" Parse file, line, char from of parse errors:
" At C:\script.ps1:22 char:16
" + Stop-Process -Name "invalidprocess
" + ~~~~~~~~~~~~~~~
" The string is missing the terminator: ".
" + CategoryInfo : ParserError: (:) [], ParseException
" + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
CompilerSet errorformat+=At\ %f:%l\ char:%c
let &cpo = s:cpo_save
unlet s:cpo_save
" vim:set sw=2 sts=2:

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

@ -0,0 +1,28 @@
" Vim compiler file
" Compiler: SML/NJ Compiler
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2020 Feb 10
if exists("current_compiler")
finish
endif
let current_compiler = "sml"
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=sml
CompilerSet errorformat=%f:%l.%c-%\\d%\\+.%\\d%\\+\ %trror:\ %m,
\%f:%l.%c\ %trror:\ %m,
\%trror:\ %m
\%f:%l.%c-%\\d%\\+.%\\d%\\+\ %tarning:\ %m,
\%f:%l.%c\ %tarning:\ %m,
\%tarning:\ %m,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -30,6 +30,7 @@ DOCS = \
filetype.txt \
fold.txt \
ft_ada.txt \
ft_ps1.txt \
ft_rust.txt \
ft_sql.txt \
gui.txt \
@ -173,6 +174,7 @@ HTMLS = \
filetype.html \
fold.html \
ft_ada.html \
ft_ps1.html \
ft_rust.html \
ft_sql.html \
gui.html \

View File

@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.2. Last change: 2021 Jan 28
*autocmd.txt* For Vim version 8.2. Last change: 2021 Mar 13
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1519,9 +1519,11 @@ option will not cause any commands to be executed.
*:doautoa* *:doautoall*
:doautoa[ll] [<nomodeline>] [group] {event} [fname]
Like ":doautocmd", but apply the autocommands to each
loaded buffer. Note that [fname] is used to select
the autocommands, not the buffers to which they are
applied.
loaded buffer. The current buffer is done last.
Note that [fname] is used to select the autocommands,
not the buffers to which they are applied.
Careful: Don't use this for autocommands that delete a
buffer, change to another buffer or change the
contents of a buffer; the result is unpredictable.

View File

@ -1,4 +1,4 @@
*change.txt* For Vim version 8.2. Last change: 2021 Jan 21
*change.txt* For Vim version 8.2. Last change: 2021 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@ -649,6 +649,8 @@ For other systems the tmpnam() library function is used.
The space between `:substitute` and the 'c', 'g',
'i', 'I' and 'r' flags isn't required, but in scripts
it's a good idea to keep it to avoid confusion.
Also see the two and three letter commands to repeat
:substitute below |:substitute-repeat|.
:[range]~[&][flags] [count] *:~*
Repeat last substitute with same substitute string
@ -877,20 +879,26 @@ either the first or second pattern in parentheses did not match, so either
*:sge* *:sgi* *:sgI* *:sgl* *:sgn* *:sgp* *:sgr* *:sI* *:si*
*:sic* *:sIc* *:sie* *:sIe* *:sIg* *:sIl* *:sin* *:sIn* *:sIp*
*:sip* *:sIr* *:sir* *:sr* *:src* *:srg* *:sri* *:srI* *:srl*
*:srn* *:srp*
*:srn* *:srp* *:substitute-repeat*
2-letter and 3-letter :substitute commands ~
These commands repeat the previous `:substitute` command with the given flags.
The first letter is always "s", followed by one or two of the possible flag
characters. For example `:sce` works like `:s///ce`. The table lists the
possible combinations, not all flags are possible, because the command is
short for another command.
List of :substitute commands
| c e g i I n p l r
| c :sc :sce :scg :sci :scI :scn :scp :scl ---
| c :sc :sce :scg :sci :scI :scn :scp :scl
| e
| g :sgc :sge :sg :sgi :sgI :sgn :sgp :sgl :sgr
| i :sic :sie --- :si :siI :sin :sip --- :sir
| i :sic :sie :si :siI :sin :sip :sir
| I :sIc :sIe :sIg :sIi :sI :sIn :sIp :sIl :sIr
| n
| p
| l
| r :src --- :srg :sri :srI :srn :srp :srl :sr
| r :src :srg :sri :srI :srn :srp :srl :sr
Exceptions:
:scr is `:scriptnames`

View File

@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 8.2. Last change: 2021 Jan 26
*cmdline.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -597,9 +597,11 @@ followed by another Vim command:
:global
:help
:helpfind
:helpgrep
:lcscope
:ldo
:lfdo
:lhelpgrep
:make
:normal
:perl

View File

@ -1,4 +1,4 @@
*diff.txt* For Vim version 8.2. Last change: 2019 Nov 10
*diff.txt* For Vim version 8.2. Last change: 2021 Feb 10
VIM REFERENCE MANUAL by Bram Moolenaar
@ -59,7 +59,7 @@ In each of the edited files these options are set:
'scrollbind' on
'cursorbind' on
'scrollopt' includes "hor"
'wrap' off
'wrap' off, or leave as-is if 'diffopt' includes "followwrap"
'foldmethod' "diff"
'foldcolumn' value from 'diffopt', default is 2
@ -144,7 +144,7 @@ Otherwise they are set to their default value:
'scrollbind' off
'cursorbind' off
'scrollopt' without "hor"
'wrap' on
'wrap' on, or leave as-is if 'diffopt' includes "followwrap"
'foldmethod' "manual"
'foldcolumn' 0

View File

@ -1,4 +1,4 @@
*editing.txt* For Vim version 8.2. Last change: 2021 Jan 08
*editing.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1253,7 +1253,7 @@ For versions of Vim where browsing is not supported, the command is executed
unmodified.
*browsefilter*
For MS Windows and GTK, you can modify the filters that are used in the browse
For MS-Windows and GTK, you can modify the filters that are used in the browse
dialog. By setting the g:browsefilter or b:browsefilter variables, you can
change the filters globally or locally to the buffer. The variable is set to
a string in the format "{filter label}\t{pattern};{pattern}\n" where {filter

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.2. Last change: 2021 Jan 31
*eval.txt* For Vim version 8.2. Last change: 2021 Apr 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -439,8 +439,8 @@ Changing the order of items in a list: >
For loop ~
The |:for| loop executes commands for each item in a list. A variable is set
to each item in the list in sequence. Example: >
The |:for| loop executes commands for each item in a List, String or Blob.
A variable is set to each item in sequence. Example with a List: >
:for item in mylist
: call Doit(item)
:endfor
@ -457,7 +457,7 @@ If all you want to do is modify each item in the list then the |map()|
function will be a simpler method than a for loop.
Just like the |:let| command, |:for| also accepts a list of variables. This
requires the argument to be a list of lists. >
requires the argument to be a List of Lists. >
:for [lnum, col] in [[1, 3], [2, 8], [3, 0]]
: call Doit(lnum, col)
:endfor
@ -473,6 +473,14 @@ It is also possible to put remaining items in a List variable: >
: endif
:endfor
For a Blob one byte at a time is used.
For a String one character, including any composing characters, is used as a
String. Example: >
for c in text
echo 'This character is ' .. c
endfor
List functions ~
*E714*
@ -1187,7 +1195,8 @@ byte under the cursor: >
In Vim9 script:
If expr8 is a String this results in a String that contains the expr1'th
single character from expr8. To use byte indexes use |strpart()|.
single character (including any composing characters) from expr8. To use byte
indexes use |strpart()|.
Index zero gives the first byte or character. Careful: text column numbers
start with one!
@ -1217,8 +1226,9 @@ In legacy Vim script the indexes are byte indexes. This doesn't recognize
multibyte encodings, see |byteidx()| for computing the indexes. If expr8 is
a Number it is first converted to a String.
In Vim9 script the indexes are character indexes. To use byte indexes use
|strpart()|.
In Vim9 script the indexes are character indexes and include composing
characters. To use byte indexes use |strpart()|. To use character indexes
without including composing characters use |strcharpart()|.
The item at index expr1b is included, it is inclusive. For an exclusive index
use the |slice()| function.
@ -1540,8 +1550,11 @@ the following ways:
The arguments are optional. Example: >
:let F = {-> 'error function'}
:echo F()
:echo F('ignored')
< error function
Note that in Vim9 script another kind of lambda can be used: |vim9-lambda|.
*closure*
Lambda expressions can access outer scope variables and arguments. This is
often called a closure. Example where "i" and "a:arg" are used in a lambda
@ -1576,7 +1589,7 @@ The lambda expression is also useful for Channel, Job and timer: >
Handler called
Note how execute() is used to execute an Ex command. That's ugly though.
In Vim9 script you can use a command block, see |inline-function|.
Lambda expressions have internal names like '<lambda>42'. If you get an error
for a lambda expression, you can find what it is with the following command: >
@ -2430,6 +2443,7 @@ assert_inrange({lower}, {upper}, {actual} [, {msg}])
Number assert {actual} is inside the range
assert_match({pat}, {text} [, {msg}])
Number assert {pat} matches {text}
assert_nobeep({cmd}) Number assert {cmd} does not cause a beep
assert_notequal({exp}, {act} [, {msg}])
Number assert {exp} is not equal {act}
assert_notmatch({pat}, {text} [, {msg}])
@ -2562,6 +2576,7 @@ foldlevel({lnum}) Number fold level at {lnum}
foldtext() String line displayed for closed fold
foldtextresult({lnum}) String text for closed fold at {lnum}
foreground() Number bring the Vim window to the foreground
fullcommand({name}) String get full command from {name}
funcref({name} [, {arglist}] [, {dict}])
Funcref reference to function {name}
function({name} [, {arglist}] [, {dict}])
@ -2922,10 +2937,11 @@ str2list({expr} [, {utf8}]) List convert each character of {expr} to
ASCII/UTF8 value
str2nr({expr} [, {base} [, {quoted}]])
Number convert String to Number
strcharpart({str}, {start} [, {len}])
strcharlen({expr}) Number character length of the String {expr}
strcharpart({str}, {start} [, {len} [, {skipcc}]])
String {len} characters of {str} at
character {start}
strchars({expr} [, {skipcc}]) Number character length of the String {expr}
strchars({expr} [, {skipcc}]) Number character count of the String {expr}
strdisplaywidth({expr} [, {col}]) Number display length of the String {expr}
strftime({format} [, {time}]) String format time with a specified format
strgetchar({str}, {index}) Number get char {index} from {str}
@ -4902,6 +4918,21 @@ foreground() Move the Vim window to the foreground. Useful when sent from
{only in the Win32, Athena, Motif and GTK GUI versions and the
Win32 console version}
fullcommand({name}) *fullcommand()*
Get the full command name from a short abbreviated command
name; see |20.2| for details on command abbreviations.
{name} may start with a `:` and can include a [range], these
are skipped and not returned.
Returns an empty string if a command doesn't exist or if it's
ambiguous (for user-defined functions).
For example `fullcommand('s')`, `fullcommand('sub')`,
`fullcommand(':%substitute')` all return "substitute".
Can also be used as a |method|: >
GetName()->fullcommand()
<
*funcref()*
funcref({name} [, {arglist}] [, {dict}])
Just like |function()|, but the returned Funcref will lookup
@ -5080,6 +5111,13 @@ getbufinfo([{dict}])
listed TRUE if the buffer is listed.
lnum Line number used for the buffer when
opened in the current window.
Only valid if the buffer has been
displayed in the window in the past.
If you want the line number of the
last known cursor position in a given
window, use |line()|: >
:echo line('.', {winid})
<
linecount Number of lines in the buffer (only
valid when loaded)
loaded TRUE if the buffer is loaded.
@ -5284,6 +5322,9 @@ getcharpos({expr})
Get the position for {expr}. Same as |getpos()| but the column
number in the returned List is a character index instead of
a byte index.
If |getpos()| returns a very large column number, such as
2147483647, then getcharpos() will return the character index
of the last character.
Example:
With the cursor on '세' in line 5 with text "여보세요": >
@ -5763,6 +5804,8 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
The column number in the returned List is the byte position
within the line. To get the character position in the line,
use |getcharpos()|
The column number can be very large, e.g. 2147483647, in which
case it means "after the end of the line".
This can be used to save and restore the position of a mark: >
let save_a_mark = getpos("'a")
...
@ -5887,6 +5930,7 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()*
When the register was not set an empty list is returned.
If {regname} is not specified, |v:register| is used.
In |Vim9-script| {regname} must be one character.
Can also be used as a |method|: >
GetRegname()->getreg()
@ -5914,6 +5958,7 @@ getreginfo([{regname}]) *getreginfo()*
will be returned.
If {regname} is not specified, |v:register| is used.
The returned Dictionary can be passed to |setreg()|.
In |Vim9-script| {regname} must be one character.
Can also be used as a |method|: >
GetRegname()->getreginfo()
@ -5927,6 +5972,7 @@ getregtype([{regname}]) *getregtype()*
"" for an empty or unknown register
<CTRL-V> is one character with value 0x16.
If {regname} is not specified, |v:register| is used.
In |Vim9-script| {regname} must be one character.
Can also be used as a |method|: >
GetRegname()->getregtype()
@ -6044,7 +6090,7 @@ getwininfo([{winid}]) *getwininfo()*
tab pages is returned.
Each List item is a |Dictionary| with the following entries:
botline last displayed buffer line
botline last complete displayed buffer line
bufnr number of buffer in the window
height window height (excluding winbar)
loclist 1 if showing a location list
@ -6060,12 +6106,12 @@ getwininfo([{winid}]) *getwininfo()*
width window width
winbar 1 if the window has a toolbar, 0
otherwise
wincol leftmost screen column of the window,
col from |win_screenpos()|
wincol leftmost screen column of the window;
"col" from |win_screenpos()|
winid |window-ID|
winnr window number
winrow topmost screen column of the window,
row from |win_screenpos()|
winrow topmost screen line of the window;
"row" from |win_screenpos()|
Can also be used as a |method|: >
GetWinnr()->getwininfo()
@ -7431,7 +7477,8 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
to be used when fast match additions and deletions are
required, for example to highlight matching parentheses.
The list {pos} can contain one of these items:
{pos} is a list of positions. Each position can be one of
these:
- A number. This whole line will be highlighted. The first
line has number 1.
- A list with one number, e.g., [23]. The whole line with this
@ -7444,7 +7491,7 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
- A list with three numbers, e.g., [23, 11, 3]. As above, but
the third number gives the length of the highlight in bytes.
The maximum number of positions is 8.
The maximum number of positions in {pos} is 8.
Example: >
:highlight MyGroup ctermbg=green guibg=green
@ -7453,8 +7500,7 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
:call matchdelete(m)
< Matches added by |matchaddpos()| are returned by
|getmatches()| with an entry "pos1", "pos2", etc., with the
value a list like the {pos} item.
|getmatches()|.
Can also be used as a |method|: >
GetGroup()->matchaddpos([23, 11])
@ -9642,6 +9688,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
setreg({regname}, {value} [, {options}])
Set the register {regname} to {value}.
If {regname} is "" or "@", the unnamed register '"' is used.
In |Vim9-script| {regname} must be one character.
{value} may be any value returned by |getreg()| or
|getreginfo()|, including a |List| or |Dict|.
@ -9893,7 +9940,7 @@ slice({expr}, {start} [, {end}]) *slice()*
Similar to using a |slice| "expr[start : end]", but "end" is
used exclusive. And for a string the indexes are used as
character indexes instead of byte indexes, like in
|vim9script|.
|vim9script|. Also, composing characters are not counted.
When {end} is omitted the slice continues to the last item.
When {end} is -1 the last item is omitted.
@ -10251,23 +10298,44 @@ str2nr({expr} [, {base} [, {quoted}]]) *str2nr()*
Can also be used as a |method|: >
GetText()->str2nr()
strcharpart({src}, {start} [, {len}]) *strcharpart()*
strcharlen({expr}) *strcharlen()*
The result is a Number, which is the number of characters
in String {expr}. Composing characters are ignored.
|strchars()| can count the number of characters, counting
composing characters separately.
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
Can also be used as a |method|: >
GetText()->strcharlen()
strcharpart({src}, {start} [, {len} [, {skipcc}]]) *strcharpart()*
Like |strpart()| but using character index and length instead
of byte index and length.
When {skipcc} is omitted or zero, composing characters are
counted separately.
When {skipcc} set to 1, Composing characters are ignored,
similar to |slice()|.
When a character index is used where a character does not
exist it is assumed to be one character. For example: >
exist it is omitted and counted as one character. For
example: >
strcharpart('abc', -1, 2)
< results in 'a'.
Can also be used as a |method|: >
GetText()->strcharpart(5)
strchars({expr} [, {skipcc}]) *strchars()*
The result is a Number, which is the number of characters
in String {expr}.
When {skipcc} is omitted or zero, composing characters are
counted separately.
When {skipcc} set to 1, Composing characters are ignored.
|strcharlen()| always does this.
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
{skipcc} is only available after 7.4.755. For backward
@ -11801,7 +11869,7 @@ gui_mac Compiled with Macintosh GUI.
gui_motif Compiled with Motif GUI.
gui_photon Compiled with Photon GUI.
gui_running Vim is running in the GUI, or it will start soon.
gui_win32 Compiled with MS Windows Win32 GUI.
gui_win32 Compiled with MS-Windows Win32 GUI.
gui_win32s idem, and Win32s system being used (Windows 3.1)
haiku Haiku version of Vim.
hangul_input Compiled with Hangul input support. |hangul|
@ -12753,8 +12821,8 @@ text...
it can no longer be changed (until it is unlocked).
A locked variable can be deleted: >
:lockvar v
:let v = 'asdf' " fails!
:unlet v
:let v = 'asdf' " fails!
:unlet v " works
< *E741* *E940*
If you try to change a locked variable you get an
error message: "E741: Value is locked: {name}".
@ -13092,7 +13160,12 @@ text...
< If you just want a highlighted message use |:echohl|.
And to get a beep: >
:exe "normal \<Esc>"
<
:echoc[onsole] {expr1} .. *:echoc* *:echoconsole*
Intended for testing: works like `:echomsg` but when
running in the GUI and started from a terminal write
the text to stdout.
*:eval*
:eval {expr} Evaluate {expr} and discard the result. Example: >
:eval Getlist()->Filter()->append('$')
@ -13122,7 +13195,7 @@ text...
Cannot be followed by a comment.
Examples: >
:execute "buffer" nextbuf
:execute "normal" count . "w"
:execute "normal" count .. "w"
<
":execute" can be used to append a command to commands
that don't accept a '|'. Example: >
@ -13138,8 +13211,8 @@ text...
file names. The |fnameescape()| function can be used
for Vim commands, |shellescape()| for |:!| commands.
Examples: >
:execute "e " . fnameescape(filename)
:execute "!ls " . shellescape(filename, 1)
:execute "e " .. fnameescape(filename)
:execute "!ls " .. shellescape(filename, 1)
<
Note: The executed string may be any command-line, but
starting or ending "if", "while" and "for" does not

View File

@ -1,4 +1,4 @@
*filetype.txt* For Vim version 8.2. Last change: 2021 Jan 21
*filetype.txt* For Vim version 8.2. Last change: 2021 Mar 11
VIM REFERENCE MANUAL by Bram Moolenaar
@ -628,6 +628,13 @@ For fish, add to the config file
set -x MANPAGER "vim -M +MANPAGER -"
MARKDOWN *ft-markdown-plugin*
To enable folding use this: >
let g:markdown_folding = 1
<
PDF *ft-pdf-plugin*
Two maps, <C-]> and <C-T>, are provided to simulate a tag stack for navigating

64
runtime/doc/ft_ps1.txt Normal file
View File

@ -0,0 +1,64 @@
*ps1.txt* A Windows PowerShell syntax plugin for Vim
Author: Peter Provost <https://www.github.com/PProvost>
License: Apache 2.0
URL: https://github.com/PProvost/vim-ps1
INTRODUCTION *ps1-syntax*
This plugin provides Vim syntax, indent and filetype detection for Windows
PowerShell scripts, modules, and XML configuration files.
ABOUT *ps1-about*
Grab the latest version or report a bug on GitHub:
https://github.com/PProvost/vim-ps1
FOLDING *ps1-folding*
The ps1 syntax file provides syntax folding (see |:syn-fold|) for script blocks
and digital signatures in scripts.
When 'foldmethod' is set to "syntax" then function script blocks will be
folded unless you use the following in your .vimrc or before opening a script: >
:let g:ps1_nofold_blocks = 1
<
Digital signatures in scripts will also be folded unless you use: >
:let g:ps1_nofold_sig = 1
<
Note: syntax folding might slow down syntax highlighting significantly,
especially for large files.
COMPILER *ps1-compiler*
The powershell `:compiler` script configures |:make| to execute the script in
PowerShell.
It tries to pick a smart default PowerShell command: `pwsh` if available and
`powershell` otherwise, but you can customize the command: >
:let g:ps1_makeprg_cmd = '/path/to/pwsh'
<
To configure whether to show the exception type information: >
:let g:ps1_efm_show_error_categories = 1
<
KEYWORD LOOKUP *ps1-keyword*
To look up keywords using PowerShell's Get-Help, press the |K| key. For more
convenient paging, the pager `less` should be installed, which is included in
many Linux distributions and in macOS.
Many other distributions are available for Windows like
https://chocolatey.org/packages/less/. Make sure `less` is in a directory
listed in the `PATH` environment variable, which chocolatey above does.
------------------------------------------------------------------------------
vim:ft=help:

View File

@ -1,4 +1,4 @@
*gui_w32.txt* For Vim version 8.2. Last change: 2020 Mar 25
*gui_w32.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -403,7 +403,7 @@ The "File/Print" menu prints the text with syntax highlighting, see
printer installed this should also work: >
:w >>prn
Vim supports a number of standard MS Windows features. Some of these are
Vim supports a number of standard MS-Windows features. Some of these are
detailed elsewhere: see |'mouse'|, |win32-hidden-menus|.
*drag-n-drop-win32*

View File

@ -1,4 +1,4 @@
*if_lua.txt* For Vim version 8.2. Last change: 2020 Jun 28
*if_lua.txt* For Vim version 8.2. Last change: 2021 Apr 07
VIM REFERENCE MANUAL by Luis Carvalho
@ -208,6 +208,8 @@ Vim evaluation and command execution, and others.
created on demand. Example: >
:lua print(vim.fn.has('timers'))
<
vim.lua_version The Lua version Vim was compiled with, in the
form {major}.{minor}.{patch}, e.g. "5.1.4".
==============================================================================
3. List userdata *lua-list*

View File

@ -610,14 +610,14 @@ the use of square and curly brackets, and otherwise by community convention.
These conventions are not universally followed, so the Clojure indent script
offers a few configurable options, listed below.
If the current vim does not include |searchpairpos()|, the indent script falls
If the current vim does not include searchpairpos(), the indent script falls
back to normal 'lisp' indenting, and the following options are ignored.
*g:clojure_maxlines*
Set maximum scan distance of |searchpairpos()|. Larger values trade
performance for correctness when dealing with very long forms. A value of 0
will scan without limits.
Set maximum scan distance of searchpairpos(). Larger values trade performance
for correctness when dealing with very long forms. A value of 0 will scan
without limits.
>
" Default
let g:clojure_maxlines = 100

View File

@ -1,4 +1,4 @@
*index.txt* For Vim version 8.2. Last change: 2021 Jan 15
*index.txt* For Vim version 8.2. Last change: 2021 Mar 22
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1176,6 +1176,7 @@ tag command action ~
|:bNext| :bN[ext] go to previous buffer in the buffer list
|:ball| :ba[ll] open a window for each buffer in the buffer list
|:badd| :bad[d] add buffer to the buffer list
|:balt| :balt like ":badd" but also set the alternate file
|:bdelete| :bd[elete] remove a buffer from the buffer list
|:behave| :be[have] set mouse and selection behavior
|:belowright| :bel[owright] make split window appear right or below
@ -1293,6 +1294,7 @@ tag command action ~
|:edit| :e[dit] edit a file
|:earlier| :ea[rlier] go to older change, undo
|:echo| :ec[ho] echoes the result of expressions
|:echoconsole| :echoc[onsole] like :echomsg but write to stdout
|:echoerr| :echoe[rr] like :echo, show like an error and use history
|:echohl| :echoh[l] set highlighting for echo commands
|:echomsg| :echom[sg] same as :echo, put message in history
@ -1698,7 +1700,8 @@ tag command action ~
|: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
|:vim9script| :vim9[script] indicates Vim9 script file
|:vim9cmd| :vim9[cmd] make following command use Vim9 script syntax
|:vim9script| :vim9s[cript] indicates Vim9 script file
|:vimgrep| :vim[grep] search for pattern in files
|:vimgrepadd| :vimgrepa[dd] like :vimgrep, but append to current list
|:visual| :vi[sual] same as ":edit", but turns off "Ex" mode

View File

@ -1,4 +1,4 @@
*map.txt* For Vim version 8.2. Last change: 2020 Dec 10
*map.txt* For Vim version 8.2. Last change: 2021 Mar 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -263,6 +263,20 @@ input. Example: >
endfunc
nnoremap <expr> <F3> <Sid>OpenPopup()
Also, keep in mind that the expression may be evaluated when looking for
typeahead, before the previous command has been executed. For example: >
func StoreColumn()
let g:column = col('.')
return 'x'
endfunc
nnoremap <expr> x StoreColumn()
nmap ! f!x
You will notice that g:column has the value from before executing "f!",
because "x" is evaluated before "f!" is executed.
This can be solved by inserting <Ignore> before the character that is
expression-mapped: >
nmap ! f!<Ignore>x
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:

View File

@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 8.2. Last change: 2020 Aug 15
*mbyte.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@ -770,7 +770,7 @@ is suitable for complex input, such as CJK.
of the two ways: FrontEnd system and BackEnd system. In the FrontEnd
system, input events are snatched by the |IM-server| first, then |IM-server|
give the application the result of input. On the other hand, the BackEnd
system works reverse order. MS Windows adopt BackEnd system. In X, most of
system works reverse order. MS-Windows adopt BackEnd system. In X, most of
|IM-server|s adopt FrontEnd system. The demerit of BackEnd system is the
large overhead in communication, but it provides safe synchronization with
no restrictions on applications.

View File

@ -1,4 +1,4 @@
*motion.txt* For Vim version 8.2. Last change: 2020 Oct 18
*motion.txt* For Vim version 8.2. Last change: 2021 Mar 28
VIM REFERENCE MANUAL by Bram Moolenaar
@ -942,8 +942,7 @@ These commands are not marks themselves, but jump to a mark:
line.
*]`*
]` [count] times to lowercase mark after the cursor. {not
in Vi}
]` [count] times to lowercase mark after the cursor.
*['*
[' [count] times to previous line with a lowercase mark
@ -1037,6 +1036,12 @@ CTRL-I Go to [count] newer cursor position in jump list
(not a motion command).
{not available without the |+jumplist| feature}
NOTE: In the GUI and in a terminal supporting
|modifyOtherKeys|, CTRL-I can be mapped separately
from <Tab>, on the condition that CTRL-I is
mapped before <Tab>, otherwise the mapping applies to
both.
*:ju* *:jumps*
:ju[mps] Print the jump list (not a motion command).
{not available without the |+jumplist| feature}
@ -1054,11 +1059,11 @@ The maximum number of entries is fixed at 100.
For example, after three jump commands you have this jump list:
jump line col file/text ~
3 1 0 some text ~
2 70 0 another line ~
1 1154 23 end. ~
> ~
jump line col file/text ~
3 1 0 some text ~
2 70 0 another line ~
1 1154 23 end. ~
> ~
The "file/text" column shows the file name, or the text at the jump if it is
in the current file (an indent is removed and a long line is truncated to fit
@ -1067,11 +1072,11 @@ in the window).
You are currently in line 1167. If you then use the CTRL-O command, the
cursor is put in line 1154. This results in:
jump line col file/text ~
2 1 0 some text ~
1 70 0 another line ~
> 0 1154 23 end. ~
1 1167 0 foo bar ~
jump line col file/text ~
2 1 0 some text ~
1 70 0 another line ~
> 0 1154 23 end. ~
1 1167 0 foo bar ~
The pointer will be set at the last used jump position. The next CTRL-O
command will use the entry above it, the next CTRL-I command will use the
@ -1098,12 +1103,12 @@ that calling setpos() does not do this.
After the CTRL-O command that got you into line 1154 you could give another
jump command (e.g., "G"). The jump list would then become:
jump line col file/text ~
4 1 0 some text ~
3 70 0 another line ~
2 1167 0 foo bar ~
1 1154 23 end. ~
> ~
jump line col file/text ~
4 1 0 some text ~
3 70 0 another line ~
2 1167 0 foo bar ~
1 1154 23 end. ~
> ~
The line numbers will be adjusted for deleted and inserted lines. This fails
if you stop editing a file without writing, like with ":n!".
@ -1152,7 +1157,7 @@ Note that when text has been inserted or deleted the cursor position might be
a bit different from the position of the change. Especially when lines have
been deleted.
When the |:keepjumps| command modifier is used the position of a change is not
When the `:keepjumps` command modifier is used the position of a change is not
remembered.
*:changes*
@ -1193,7 +1198,7 @@ remembered.
#if, #ifdef, #else, #elif, #endif
C preprocessor conditionals (when the
cursor is on the # or no ([{
following)
is following)
For other items the matchit plugin can be used, see
|matchit-install|. This plugin also helps to skip
matches in comments.
@ -1222,19 +1227,16 @@ remembered.
#if/#else/#endif makes the movement linewise.
*[(*
[( go to [count] previous unmatched '('.
[( Go to [count] previous unmatched '('.
|exclusive| motion.
*[{*
[{ go to [count] previous unmatched '{'.
[{ Go to [count] previous unmatched '{'.
|exclusive| motion.
*])*
]) go to [count] next unmatched ')'.
]) Go to [count] next unmatched ')'.
|exclusive| motion.
*]}*
]} go to [count] next unmatched '}'.
]} Go to [count] next unmatched '}'.
|exclusive| motion.
The above four commands can be used to go to the start or end of the current
@ -1268,7 +1270,7 @@ bring you back to the switch statement.
class. When no '}' is found before the cursor this is
an error. |exclusive| motion.
The above two commands assume that the file contains a class with methods.
The above four commands assume that the file contains a class with methods.
The class definition is surrounded in '{' and '}'. Each method in the class
is also surrounded with '{' and '}'. This applies to the Java language. The
file looks like this: >
@ -1282,17 +1284,21 @@ file looks like this: >
body_two();
}
}
[To try this out copy the text and put it in a new buffer, the help text above
confuses the jump commands]
Starting with the cursor on "body_two()", using "[m" will jump to the '{' at
the start of "method_two()" (obviously this is much more useful when the
method is long!). Using "2[m" will jump to the start of "method_one()".
Using "3[m" will jump to the start of the class.
*[#*
[# go to [count] previous unmatched "#if" or "#else".
[# Go to [count] previous unmatched "#if" or "#else".
|exclusive| motion.
*]#*
]# go to [count] next unmatched "#else" or "#endif".
]# Go to [count] next unmatched "#else" or "#endif".
|exclusive| motion.
These two commands work in C programs that contain #if/#else/#endif
@ -1300,11 +1306,11 @@ constructs. It brings you to the start or end of the #if/#else/#endif where
the current line is included. You can then use "%" to go to the matching line.
*[star* *[/*
[* or [/ go to [count] previous start of a C comment "/*".
[* or [/ Go to [count] previous start of a C comment "/*".
|exclusive| motion.
*]star* *]/*
]* or ]/ go to [count] next end of a C comment "*/".
]* or ]/ Go to [count] next end of a C comment "*/".
|exclusive| motion.

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2021 Jan 08
*options.txt* For Vim version 8.2. Last change: 2021 Apr 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -749,6 +749,15 @@ A jump table for the options with a short description can be found at |Q_op|.
or selected.
Note: When this option is on some plugins may not work.
*'autoshelldir'* *'asd'* *'noautoshelldir'* *'noasd'*
'autoshelldir' 'asd' boolean (default off)
global
When on, Vim will change the current working directory whenever you
change the directory of the shell running in a terminal window. You
need proper setting-up, so whenever the shell's pwd changes an OSC 7
escape sequence will be emitted. For example, on Linux, you can source
/etc/profile.d/vte.sh in your shell profile if you use bash or zsh.
*'arabic'* *'arab'* *'noarabic'* *'noarab'*
'arabic' 'arab' boolean (default off)
local to window
@ -1568,7 +1577,11 @@ A jump table for the options with a short description can be found at |Q_op|.
{only in GUI versions or when the |+xterm_clipboard|
feature is included}
This option is a list of comma separated names.
These names are recognized:
Note: if one of the items is "exclude:", then you can't add an item
after that. Therefore do append an item with += but use ^= to
prepend, e.g.: >
set clipboard^=unnamed
< These names are recognized:
*clipboard-unnamed*
unnamed When included, Vim will use the clipboard register '*'
@ -2677,6 +2690,8 @@ A jump table for the options with a short description can be found at |Q_op|.
foldcolumn:{n} Set the 'foldcolumn' option to {n} when
starting diff mode. Without this 2 is used.
followwrap Follow the 'wrap' option and leave as it is.
internal Use the internal diff library. This is
ignored when 'diffexpr' is set. *E960*
When running out of memory when writing a
@ -3229,7 +3244,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Only normal file name characters can be used, "/\*?[|<>" are illegal.
*'fillchars'* *'fcs'*
'fillchars' 'fcs' string (default "vert:|,fold:-")
'fillchars' 'fcs' string (default "vert:|,fold:-,eob:~")
global
{not available when compiled without the |+folding|
feature}
@ -3241,7 +3256,11 @@ A jump table for the options with a short description can be found at |Q_op|.
stlnc:c ' ' or '=' statusline of the non-current windows
vert:c '|' vertical separators |:vsplit|
fold:c '-' filling 'foldtext'
foldopen:c '-' mark the beginning of a fold
foldclose:c '+' show a closed fold
foldsep:c '|' open fold middle character
diff:c '-' deleted lines of the 'diff' option
eob:c '~' empty lines below the end of a buffer
Any one that is omitted will fall back to the default. For "stl" and
"stlnc" the space will be used when there is highlighting, '^' or '='
@ -3252,7 +3271,8 @@ A jump table for the options with a short description can be found at |Q_op|.
< This is similar to the default, except that these characters will also
be used when there is highlighting.
for "stl" and "stlnc" only single-byte values are supported.
For "stl" and "stlnc" single-byte and multibyte characters are
supported. But double-width characters are not supported.
The highlighting used for these items:
item highlight group ~
@ -3261,6 +3281,7 @@ A jump table for the options with a short description can be found at |Q_op|.
vert:c VertSplit |hl-VertSplit|
fold:c Folded |hl-Folded|
diff:c DiffDelete |hl-DiffDelete|
eob:c EndOfBuffer |hl-EndOfBuffer|
*'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
'fixendofline' 'fixeol' boolean (default on)
@ -3844,7 +3865,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'go-v'*
'v' Use a vertical button layout for dialogs. When not included,
a horizontal layout is preferred, but when it doesn't fit a
vertical layout is used anyway.
vertical layout is used anyway. Not supported in GTK 3.
*'go-p'*
'p' Use Pointer callbacks for X11 GUI. This is required for some
window managers. If the cursor is not blinking or hollow at
@ -4127,7 +4148,7 @@ A jump table for the options with a short description can be found at |Q_op|.
the window. This happens only when the 'icon' option is on.
Only works if the terminal supports setting window icon text
(currently only X11 GUI and terminals with a non-empty 't_IS' option).
Does not work for MS Windows.
Does not work for MS-Windows.
When Vim was compiled with HAVE_X11 defined, the original icon will be
restored if possible |X11|.
When this option contains printf-style '%' items, they will be
@ -4846,7 +4867,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'listchars'* *'lcs'*
'listchars' 'lcs' string (default "eol:$")
global
global or local to window |global-local|
Strings to use in 'list' mode and for the |:list| command. It is a
comma separated list of string settings.
*lcs-eol*
@ -4877,7 +4898,13 @@ A jump table for the options with a short description can be found at |Q_op|.
*lcs-space*
space:c Character to show for a space. When omitted, spaces
are left blank.
*lcs-trail*
*lcs-lead*
lead:c Character to show for leading spaces. When omitted,
leading spaces are blank. Overrides the "space"
setting for leading spaces. You can combine it with
"tab:", for example: >
:set listchars+=tab:>-,lead:.
< *lcs-trail*
trail:c Character to show for trailing spaces. When omitted,
trailing spaces are blank. Overrides the "space"
setting for trailing spaces.
@ -5009,7 +5036,7 @@ A jump table for the options with a short description can be found at |Q_op|.
jump between two double quotes.
The characters must be separated by a colon.
The pairs must be separated by a comma. Example for including '<' and
'>' (HTML): >
'>' (for HTML): >
:set mps+=<:>
< A more exotic example, to jump between the '=' and ';' in an
@ -6226,7 +6253,7 @@ A jump table for the options with a short description can be found at |Q_op|.
<
*'runtimepath'* *'rtp'* *vimfiles*
'runtimepath' 'rtp' string (default:
Unix: "$HOME/.vim,
Unix: "$HOME/.vim,
$VIM/vimfiles,
$VIMRUNTIME,
$VIM/vimfiles/after,
@ -6236,7 +6263,7 @@ A jump table for the options with a short description can be found at |Q_op|.
$VIMRUNTIME,
$VIM/vimfiles/after,
home:vimfiles/after"
PC: "$HOME/vimfiles,
MS-Windows: "$HOME/vimfiles,
$VIM/vimfiles,
$VIMRUNTIME,
$VIM/vimfiles/after,
@ -6248,8 +6275,8 @@ A jump table for the options with a short description can be found at |Q_op|.
$VIM/vimfiles,
$VIMRUNTIME,
$VIM/vimfiles/after,
$BE_USER_SETTINGS/vim/after")
VMS: "sys$login:vimfiles,
$BE_USER_SETTINGS/vim/after"
VMS: "sys$login:vimfiles,
$VIM/vimfiles,
$VIMRUNTIME,
$VIM/vimfiles/after,
@ -8763,23 +8790,31 @@ A jump table for the options with a short description can be found at |Q_op|.
part specifies what to do for each consecutive use of 'wildchar'. The
first part specifies the behavior for the first use of 'wildchar',
The second part for the second use, etc.
These are the possible values for each part:
Each part consists of a colon separated list consisting of the
following possible values:
"" Complete only the first match.
"full" Complete the next full match. After the last match,
the original string is used and then the first match
again.
again. Will also start 'wildmenu' if it is enabled.
"longest" Complete till longest common string. If this doesn't
result in a longer string, use the next part.
"longest:full" Like "longest", but also start 'wildmenu' if it is
enabled.
"list" When more than one match, list all matches.
"lastused" When completing buffer names and more than one buffer
matches, sort buffers by time last used (other than
the current buffer).
When there is only a single match, it is fully completed in all cases.
Examples of useful colon-separated values:
"longest:full" Like "longest", but also start 'wildmenu' if it is
enabled. Will not complete to the next full match.
"list:full" When more than one match, list all matches and
complete first match.
"list:longest" When more than one match, list all matches and
complete till longest common string.
"list:lastused" When more than one buffer matches, sort buffers
by time last used (other than the current buffer).
When there is only a single match, it is fully completed in all cases.
"list:lastused" When more than one buffer matches, list all matches
and sort buffers by time last used (other than the
current buffer).
Examples: >
:set wildmode=full
@ -8838,15 +8873,15 @@ A jump table for the options with a short description can be found at |Q_op|.
*'window'* *'wi'*
'window' 'wi' number (default screen height - 1)
global
Window height. Do not confuse this with the height of the Vim window,
use 'lines' for that.
Used for |CTRL-F| and |CTRL-B| when there is only one window and the
value is smaller than 'lines' minus one. The screen will scroll
'window' minus two lines, with a minimum of one.
Window height used for |CTRL-F| and |CTRL-B| when there is only one
window and the value is smaller than 'lines' minus one. The screen
will scroll 'window' minus two lines, with a minimum of one.
When 'window' is equal to 'lines' minus one CTRL-F and CTRL-B scroll
in a much smarter way, taking care of wrapping lines.
When resizing the Vim window, the value is smaller than 1 or more than
or equal to 'lines' it will be set to 'lines' minus 1.
Note: Do not confuse this with the height of the Vim window, use
'lines' for that.
*'winheight'* *'wh'* *E591*
'winheight' 'wh' number (default 1)

View File

@ -1,4 +1,4 @@
*os_win32.txt* For Vim version 8.2. Last change: 2017 Mar 21
*os_win32.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by George Reilly
@ -83,7 +83,7 @@ executable() returns 1 the executable can actually be executed.
Command line arguments *win32-cmdargs*
Analysis of a command line into parameters is not standardised in MS Windows.
Analysis of a command line into parameters is not standardised in MS-Windows.
Vim and gvim used to use different logic to parse it (before 7.4.432), and the
logic was also depended on what it was compiled with. Now Vim and gvim both
use the CommandLineToArgvW() Win32 API, so they behave in the same way.

View File

@ -1,4 +1,4 @@
*pattern.txt* For Vim version 8.2. Last change: 2021 Jan 08
*pattern.txt* For Vim version 8.2. Last change: 2021 Feb 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -229,7 +229,7 @@ This is like executing two search commands after each other, except that:
*last-pattern*
The last used pattern and offset are remembered. They can be used to repeat
the search, possibly in another direction or with another count. Note that
two patterns are remembered: One for 'normal' search commands and one for the
two patterns are remembered: One for "normal" search commands and one for the
substitute command ":s". Each time an empty pattern is given, the previously
used pattern is used. However, if there is no previous search command, a
previous substitute pattern is used, if possible.

View File

@ -1,4 +1,4 @@
*popup.txt* For Vim version 8.2. Last change: 2021 Jan 21
*popup.txt* For Vim version 8.2. Last change: 2021 Feb 21
VIM REFERENCE MANUAL by Bram Moolenaar
@ -620,7 +620,8 @@ The second argument of |popup_create()| is a dictionary with options:
property moves. Use an empty string to remove. See
|popup-textprop-pos|.
textpropwin What window to search for the text property. When
omitted or invalid the current window is used.
omitted or invalid the current window is used. Used
when "textprop" is present.
textpropid Used to identify the text property when "textprop" is
present. Use zero to reset.
fixed When FALSE (the default), and:
@ -692,8 +693,8 @@ The second argument of |popup_create()| is a dictionary with options:
the left.
border List with numbers, defining the border thickness
above/right/below/left of the popup (similar to CSS).
Only values of zero and non-zero are recognized.
An empty list uses a border all around.
Only values of zero and non-zero are currently
recognized. An empty list uses a border all around.
borderhighlight List of highlight group names to use for the border.
When one entry it is used for all borders, otherwise
the highlight for the top/right/bottom/left border.
@ -741,10 +742,10 @@ The second argument of |popup_create()| is a dictionary with options:
line or to another window.
mousemoved Like "moved" but referring to the mouse pointer
position
cursorline non-zero: Highlight the cursor line. Also scrolls the
text to show this line (only works properly
when 'wrap' is off).
zero: Do not highlight the cursor line.
cursorline TRUE: Highlight the cursor line. Also scrolls the
text to show this line (only works properly
when 'wrap' is off).
zero: Do not highlight the cursor line.
Default is zero, except for |popup_menu()|.
filter A callback that can filter typed characters, see
|popup-filter|.

View File

@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 8.2. Last change: 2020 May 31
*quickfix.txt* For Vim version 8.2. Last change: 2021 Feb 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1025,6 +1025,12 @@ commands can be combined to create a NewGrep command: >
'smartcase' is not used.
If {pattern} is empty (e.g. // is specified), the last
used search pattern is used. |last-pattern|
|QuickFixCmdPre| and |QuickFixCmdPost| are triggered.
A file that is opened for matching may use a buffer
number, but it is reused if possible to avoid
consuming buffer numbers.
:{count}vim[grep] ...
When a number is put before the command this is used
as the maximum number of matches to find. Use

View File

@ -1,4 +1,4 @@
*quickref.txt* For Vim version 8.2. Last change: 2020 Aug 15
*quickref.txt* For Vim version 8.2. Last change: 2021 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@ -605,6 +605,7 @@ Short explanation of each option: *option-list*
'ambiwidth' 'ambw' what to do with Unicode chars of ambiguous width
'antialias' 'anti' Mac OS X: use smooth, antialiased fonts
'autochdir' 'acd' change directory to the file in the current window
'autoshelldir' 'asd' change directory to the shell's current directory
'arabic' 'arab' for Arabic as a default second language
'arabicshape' 'arshape' do shaping for Arabic characters
'autoindent' 'ai' take indent for new line from previous line

View File

@ -1,4 +1,4 @@
*repeat.txt* For Vim version 8.2. Last change: 2021 Jan 23
*repeat.txt* For Vim version 8.2. Last change: 2021 Feb 13
VIM REFERENCE MANUAL by Bram Moolenaar
@ -354,13 +354,15 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
Vim version, or update Vim to a newer version. See
|vimscript-version| for what changed between versions.
:vim9[script] [noclear] *:vim9* *:vim9script*
:vim9s[cript] [noclear] *:vim9s* *:vim9script*
Marks a script file as containing |Vim9-script|
commands. Also see |vim9-namespace|.
Must be the first command in the file.
For [noclear] see |vim9-reload|.
Without the |+eval| feature this changes the syntax
for some commands.
See |:vim9cmd| for executing one command with Vim9
syntax and semantics.
*:scr* *:scriptnames*
:scr[iptnames] List all sourced script names, in the order they were
@ -675,9 +677,9 @@ Your directory layout would be like this:
opt/fooextra/doc/tags " help tags
This allows for the user to do: >
mkdir ~/.vim/pack/myfoobar
cd ~/.vim/pack/myfoobar
git clone https://github.com/you/foobar.git
mkdir ~/.vim/pack
cd ~/.vim/pack
git clone https://github.com/you/foobar.git myfoobar
Here "myfoobar" is a name that the user can choose, the only condition is that
it differs from other packages.
@ -877,7 +879,7 @@ DEFINING BREAKPOINTS
valid in the script where it has been defined and if that
script is called from several other scripts, this will stop
whenever that particular variable will become visible or
unaccessible again.
inaccessible again.
The [lnum] is the line number of the breakpoint. Vim will stop at or after
this line. When omitted line 1 is used.

View File

@ -1,4 +1,4 @@
*sign.txt* For Vim version 8.2. Last change: 2020 Oct 28
*sign.txt* For Vim version 8.2. Last change: 2021 Mar 07
VIM REFERENCE MANUAL by Gordon Prieur
@ -146,6 +146,9 @@ See |sign_define()| for the equivalent Vim script function.
texthl={group}
Highlighting group used for the text item.
Example: >
:sign define MySign text=>> texthl=Search linehl=DiffText
<
DELETING A SIGN *:sign-undefine* *E155*
@ -155,7 +158,9 @@ See |sign_undefine()| for the equivalent Vim script function.
Deletes a previously defined sign. If signs with this {name}
are still placed this will cause trouble.
Example: >
:sign undefine MySign
<
LISTING SIGNS *:sign-list* *E156*
@ -209,6 +214,10 @@ See |sign_place()| for the equivalent Vim script function.
Same, but use buffer {nr}. If the buffer argument is not
given, place the sign in the current buffer.
Example: >
:sign place 10 line=99 name=sign3
:sign place 10 line=99 name=sign3 buffer=3
<
*E885*
:sign place {id} name={name} file={fname}
Change the placed sign {id} in file {fname} to use the defined
@ -221,10 +230,17 @@ See |sign_place()| for the equivalent Vim script function.
"priority={prio}" attribute can be used to change the priority
of an existing sign.
Example: >
:sign place 23 name=sign1 file=/path/to/edit.py
<
:sign place {id} name={name} [buffer={nr}]
Same, but use buffer {nr}. If the buffer argument is not
given, use the current buffer.
Example: >
:sign place 23 name=sign1
:sign place 23 name=sign1 buffer=7
<
REMOVING SIGNS *:sign-unplace* *E159*

View File

@ -1,4 +1,4 @@
*starting.txt* For Vim version 8.2. Last change: 2020 Dec 19
*starting.txt* For Vim version 8.2. Last change: 2021 Feb 10
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1344,7 +1344,11 @@ resulting file, when executed with a ":source" command:
"options". Script-local mappings will not be written.
2. Restores global variables that start with an uppercase letter and contain
at least one lowercase letter, if 'sessionoptions' contains "globals".
3. Unloads all currently loaded buffers.
3. Closes all windows in the current tab page, except the current one; closes
all tab pages except the current one (this results in currently loaded
buffers to be unloaded, some may become hidden if 'hidden' is set or
otherwise specified); wipes out the current buffer, if it is empty
and unnamed.
4. Restores the current directory if 'sessionoptions' contains "curdir", or
sets the current directory to where the Session file is if 'sessionoptions'
contains "sesdir".
@ -1640,13 +1644,17 @@ either have to fix the error, or delete the file (while Vim is running, so
most of the information will be restored).
*:rv* *:rviminfo* *E195*
:rv[iminfo][!] [file] Read from viminfo file [file] (default: see above).
:rv[iminfo][!] [file] Read from viminfo file [file] (default: see
|viminfo-file-name| above).
If [!] is given, then any information that is
already set (registers, marks, |v:oldfiles|, etc.)
will be overwritten
*:wv* *:wviminfo* *E137* *E138* *E574* *E886* *E929*
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see above).
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see
|viminfo-file-name| above).
This command has no effect when 'viminfofile' has been
set to "NONE".
The information in the file is first read in to make
a merge between old and new info. When [!] is used,
the old information is not read first, only the

View File

@ -1,4 +1,4 @@
*syntax.txt* For Vim version 8.2. Last change: 2021 Jan 21
*syntax.txt* For Vim version 8.2. Last change: 2021 Apr 02
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1741,8 +1741,8 @@ The coloring scheme for tags in the HTML file works as follows.
The <> of opening tags are colored differently than the </> of a closing tag.
This is on purpose! For opening tags the 'Function' color is used, while for
closing tags the 'Type' color is used (See syntax.vim to check how those are
defined for you)
closing tags the 'Identifier' color is used (See syntax.vim to check how those
are defined for you)
Known tag names are colored the same way as statements in C. Unknown tag
names are colored with the same color as the <> or </> respectively which
@ -2236,9 +2236,10 @@ can use them.
For example, Linux and BSD distributions use groff as their default text
processing package. In order to activate the extra syntax highlighting
features for groff, add the following option to your start-up files: >
features for groff, arrange for files to be recognized as groff (see
|ft-groff-syntax|) or add the following option to your start-up files: >
:let b:nroff_is_groff = 1
:let nroff_is_groff = 1
Groff is different from the old AT&T n/troff that you may still find in
Solaris. Groff macro and request names can be longer than 2 characters and
@ -4676,7 +4677,7 @@ matches, nextgroup, etc. But there are a few differences:
- A line continuation pattern can be given. It is used to decide which group
of lines need to be searched like they were one line. This means that the
search for a match with the specified items starts in the first of the
consecutive that contain the continuation pattern.
consecutive lines that contain the continuation pattern.
- When using "nextgroup" or "contains", this only works within one line (or
group of continued lines).
- When using a region, it must start and end in the same line (or group of

View File

@ -57,11 +57,13 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'ari' options.txt /*'ari'*
'arshape' options.txt /*'arshape'*
'as' todo.txt /*'as'*
'asd' options.txt /*'asd'*
'autochdir' options.txt /*'autochdir'*
'autoindent' options.txt /*'autoindent'*
'autoprint' vi_diff.txt /*'autoprint'*
'autoread' options.txt /*'autoread'*
'autosave' todo.txt /*'autosave'*
'autoshelldir' options.txt /*'autoshelldir'*
'autowrite' options.txt /*'autowrite'*
'autowriteall' options.txt /*'autowriteall'*
'aw' options.txt /*'aw'*
@ -508,10 +510,12 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'noari' options.txt /*'noari'*
'noarshape' options.txt /*'noarshape'*
'noas' todo.txt /*'noas'*
'noasd' options.txt /*'noasd'*
'noautochdir' options.txt /*'noautochdir'*
'noautoindent' options.txt /*'noautoindent'*
'noautoread' options.txt /*'noautoread'*
'noautosave' todo.txt /*'noautosave'*
'noautoshelldir' options.txt /*'noautoshelldir'*
'noautowrite' options.txt /*'noautowrite'*
'noautowriteall' options.txt /*'noautowriteall'*
'noaw' options.txt /*'noaw'*
@ -1292,6 +1296,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
+cmdline_compl various.txt /*+cmdline_compl*
+cmdline_hist various.txt /*+cmdline_hist*
+cmdline_info various.txt /*+cmdline_info*
+cmdwin various.txt /*+cmdwin*
+comments various.txt /*+comments*
+conceal various.txt /*+conceal*
+cryptv various.txt /*+cryptv*
@ -2396,6 +2401,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:ec eval.txt /*:ec*
:echo eval.txt /*:echo*
:echo-redraw eval.txt /*:echo-redraw*
:echoc eval.txt /*:echoc*
:echoconsole eval.txt /*:echoconsole*
:echoe eval.txt /*:echoe*
:echoerr eval.txt /*:echoerr*
:echoh eval.txt /*:echoh*
@ -3190,6 +3197,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:stselect tagsrch.txt /*:stselect*
:su change.txt /*:su*
:substitute change.txt /*:substitute*
:substitute-repeat change.txt /*:substitute-repeat*
:sun windows.txt /*:sun*
:sunhide windows.txt /*:sunhide*
:sunm map.txt /*:sunm*
@ -3401,7 +3409,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:vie editing.txt /*:vie*
:view editing.txt /*:view*
:vim quickfix.txt /*:vim*
:vim9 repeat.txt /*:vim9*
:vim9 vim9.txt /*:vim9*
:vim9cmd vim9.txt /*:vim9cmd*
:vim9s repeat.txt /*:vim9s*
:vim9script repeat.txt /*:vim9script*
:vimgrep quickfix.txt /*:vimgrep*
:vimgrepa quickfix.txt /*:vimgrepa*
@ -3943,6 +3953,7 @@ E1136 map.txt /*E1136*
E1137 map.txt /*E1137*
E114 eval.txt /*E114*
E115 eval.txt /*E115*
E1155 autocmd.txt /*E1155*
E116 eval.txt /*E116*
E117 eval.txt /*E117*
E118 eval.txt /*E118*
@ -5423,6 +5434,7 @@ assert_fails() testing.txt /*assert_fails()*
assert_false() testing.txt /*assert_false()*
assert_inrange() testing.txt /*assert_inrange()*
assert_match() testing.txt /*assert_match()*
assert_nobeep() testing.txt /*assert_nobeep()*
assert_notequal() testing.txt /*assert_notequal()*
assert_notmatch() testing.txt /*assert_notmatch()*
assert_report() testing.txt /*assert_report()*
@ -6416,6 +6428,7 @@ fixed-7.2 version7.txt /*fixed-7.2*
fixed-7.3 version7.txt /*fixed-7.3*
fixed-7.4 version7.txt /*fixed-7.4*
flatten() eval.txt /*flatten()*
flattennew() eval.txt /*flattennew()*
flexwiki.vim syntax.txt /*flexwiki.vim*
float-e eval.txt /*float-e*
float-functions usr_41.txt /*float-functions*
@ -6573,6 +6586,7 @@ ft-mail.vim syntax.txt /*ft-mail.vim*
ft-make-syntax syntax.txt /*ft-make-syntax*
ft-man-plugin filetype.txt /*ft-man-plugin*
ft-maple-syntax syntax.txt /*ft-maple-syntax*
ft-markdown-plugin filetype.txt /*ft-markdown-plugin*
ft-masm-syntax syntax.txt /*ft-masm-syntax*
ft-mathematica-syntax syntax.txt /*ft-mathematica-syntax*
ft-matlab-indent indent.txt /*ft-matlab-indent*
@ -6663,6 +6677,7 @@ ftplugin-name usr_05.txt /*ftplugin-name*
ftplugin-overrule filetype.txt /*ftplugin-overrule*
ftplugin-special usr_41.txt /*ftplugin-special*
ftplugins usr_05.txt /*ftplugins*
fullcommand() eval.txt /*fullcommand()*
funcref() eval.txt /*funcref()*
function() eval.txt /*function()*
function-argument eval.txt /*function-argument*
@ -7493,6 +7508,7 @@ info-message starting.txt /*info-message*
inform.vim syntax.txt /*inform.vim*
informix ft_sql.txt /*informix*
initialization starting.txt /*initialization*
inline-function vim9.txt /*inline-function*
input() eval.txt /*input()*
inputdialog() eval.txt /*inputdialog()*
inputlist() eval.txt /*inputlist()*
@ -7633,6 +7649,7 @@ lc_time-variable eval.txt /*lc_time-variable*
lcs-conceal options.txt /*lcs-conceal*
lcs-eol options.txt /*lcs-eol*
lcs-extends options.txt /*lcs-extends*
lcs-lead options.txt /*lcs-lead*
lcs-nbsp options.txt /*lcs-nbsp*
lcs-precedes options.txt /*lcs-precedes*
lcs-space options.txt /*lcs-space*
@ -7661,6 +7678,7 @@ linewise-visual visual.txt /*linewise-visual*
lisp.vim syntax.txt /*lisp.vim*
lispindent() eval.txt /*lispindent()*
list eval.txt /*list*
list-concatenation eval.txt /*list-concatenation*
list-functions usr_41.txt /*list-functions*
list-identity eval.txt /*list-identity*
list-index eval.txt /*list-index*
@ -8566,6 +8584,12 @@ prop_type_change() textprop.txt /*prop_type_change()*
prop_type_delete() textprop.txt /*prop_type_delete()*
prop_type_get() textprop.txt /*prop_type_get()*
prop_type_list() textprop.txt /*prop_type_list()*
ps1-about ft_ps1.txt /*ps1-about*
ps1-compiler ft_ps1.txt /*ps1-compiler*
ps1-folding ft_ps1.txt /*ps1-folding*
ps1-keyword ft_ps1.txt /*ps1-keyword*
ps1-syntax ft_ps1.txt /*ps1-syntax*
ps1.txt ft_ps1.txt /*ps1.txt*
psql ft_sql.txt /*psql*
ptcap.vim syntax.txt /*ptcap.vim*
pterm-mouse options.txt /*pterm-mouse*
@ -9154,6 +9178,7 @@ str2float() eval.txt /*str2float()*
str2list() eval.txt /*str2list()*
str2nr() eval.txt /*str2nr()*
strcasestr() eval.txt /*strcasestr()*
strcharlen() eval.txt /*strcharlen()*
strcharpart() eval.txt /*strcharpart()*
strchars() eval.txt /*strchars()*
strchr() eval.txt /*strchr()*
@ -10120,6 +10145,8 @@ 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-lambda vim9.txt /*vim9-lambda*
vim9-mix vim9.txt /*vim9-mix*
vim9-namespace vim9.txt /*vim9-namespace*
vim9-rationale vim9.txt /*vim9-rationale*
vim9-reload vim9.txt /*vim9-reload*

View File

@ -888,19 +888,25 @@ like |CTRL-]|.
The function used for generating the taglist is specified by setting the
'tagfunc' option. The function will be called with three arguments:
a:pattern The tag identifier used during the tag search.
a:flags List of flags to control the function behavior.
a:pattern The tag identifier or pattern used during the tag search.
a:flags String containing flags to control the function behavior.
a:info Dict containing the following entries:
buf_ffname Full filename which can be used for priority.
user_data Custom data String, if stored in the tag
stack previously by tagfunc.
Currently two flags may be passed to the tag function:
Currently up to three flags may be passed to the tag function:
'c' The function was invoked by a normal command being processed
(mnemonic: the tag function may use the context around the
cursor to perform a better job of generating the tag list.)
'i' In Insert mode, the user was completing a tag (with
|i_CTRL-X_CTRL-]|).
|i_CTRL-X_CTRL-]| or 'completeopt' contains `t`).
'r' The first argument to tagfunc should be interpreted as a
|pattern| (see |tag-regexp|), such as when using: >
:tag /pat
< It is also given when completing in insert mode.
If this flag is not present, the argument is usually taken
literally as the full tag name.
Note that when 'tagfunc' is set, the priority of the tags described in
|tag-priority| does not apply. Instead, the priority is exactly as the

View File

@ -1,4 +1,4 @@
*terminal.txt* For Vim version 8.2. Last change: 2021 Jan 04
*terminal.txt* For Vim version 8.2. Last change: 2021 Feb 13
VIM REFERENCE MANUAL by Bram Moolenaar
@ -126,11 +126,28 @@ After opening the terminal window and setting 'buftype' to "terminal" the
|TerminalWinOpen| autocommand event is triggered. This makes it possible to set
options specifically for the terminal window and buffer. Example: >
au TerminalWinOpen * setlocal bufhidden=hide
This only works properly if the terminal is not hidden.
There is also the |TerminalOpen| event, but this may be triggered for a hidden
terminal, and the current window and buffer may not be for the new terminal.
For both hidden and non-hidden terminals this works, both for buffer-local and
window-local options: >
au TerminalWinOpen,BufWinEnter * if &buftype == 'terminal'
\ | setlocal bufhidden=hide colorcolumn=123
\ | endif
Note that for a hidden terminal the options are not set until the terminal is
no longer hidden.
There is also the |TerminalOpen| event. Keep in mind this may be triggered
for a hidden terminal, then the current window and buffer are not that of the
new terminal.
You need to use <abuf>, which is set to the terminal buffer. Example: >
au TerminalOpen * call setbufvar(+expand('<abuf>'), '&colorcolumn', 123)
au TerminalOpen * call setbufvar(expand('<abuf>')->str2nr(),
\ '&termwinscroll', 1000)
For a window-local option, you need to delay setting the option until the
terminal window has been created (this only works for a hidden terminal): >
au TerminalOpen * exe printf(
\ 'au BufWinEnter <buffer=%d> ++once setlocal colorcolumn=%d',
\ expand('<abuf>')->str2nr(), 123)
For a non-hidden terminal use |TerminalWinOpen|.
Mouse events (click and drag) are passed to the terminal. Mouse move events
are only passed when Vim itself is receiving them. For a terminal that is
@ -717,6 +734,8 @@ term_scrape({buf}, {row}) *term_scrape()*
"attr" attributes of the cell, use |term_getattr()|
to get the individual flags
"width" cell width: 1 or 2
For a double-width cell there is one item, thus the list can
be shorter than the width of the terminal.
Can also be used as a |method|: >
GetBufnr()->term_scrape(row)

View File

@ -1,4 +1,4 @@
*testing.txt* For Vim version 8.2. Last change: 2020 Dec 12
*testing.txt* For Vim version 8.2. Last change: 2021 Apr 02
VIM REFERENCE MANUAL by Bram Moolenaar
@ -168,6 +168,7 @@ test_override({name}, {val}) *test_override()*
wait time of up to 3 seconds for messages
term_props reset all terminal properties when the version
string is detected
uptime overrules sysinfo.uptime
ALL clear all overrides ({val} is not used)
"starting" is to be used when a test should behave like
@ -242,7 +243,8 @@ test_srand_seed([seed]) *test_srand_seed()*
assert_beeps({cmd}) *assert_beeps()*
Run {cmd} and add an error message to |v:errors| if it does
NOT produce a beep or visual bell.
Also see |assert_fails()| and |assert-return|.
Also see |assert_fails()|, |assert_nobeep()| and
|assert-return|.
Can also be used as a |method|: >
GetCmd()->assert_beeps()
@ -375,6 +377,14 @@ assert_match({pattern}, {actual} [, {msg}])
Can also be used as a |method|: >
getFile()->assert_match('foo.*')
<
assert_nobeep({cmd}) *assert_nobeep()*
Run {cmd} and add an error message to |v:errors| if it
produces a beep or visual bell.
Also see |assert_beeps()|.
Can also be used as a |method|: >
GetCmd()->assert_nobeep()
<
*assert_notequal()*
assert_notequal({expected}, {actual} [, {msg}])

View File

@ -1,4 +1,4 @@
*textprop.txt* For Vim version 8.2. Last change: 2020 Oct 14
*textprop.txt* For Vim version 8.2. Last change: 2021 Mar 22
VIM REFERENCE MANUAL by Bram Moolenaar
@ -175,6 +175,7 @@ prop_find({props} [, {direction}])
Search for a text property as specified with {props}:
id property with this ID
type property with this type name
both "id" and "type" must both match
bufnr buffer to search in; when present a
start position with "lnum" and "col"
must be given; when omitted the
@ -187,6 +188,7 @@ prop_find({props} [, {direction}])
skipstart do not look for a match at the start
position
A property matches when either "id" or "type" matches.
{direction} can be "f" for forward and "b" for backward. When
omitted forward search is performed.
@ -258,8 +260,8 @@ prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970*
properties the one with the highest priority
will be used; negative values can be used, the
default priority is zero
combine when TRUE combine the highlight with any
syntax highlight; when omitted or FALSE syntax
combine when omitted or TRUE combine the highlight
with any syntax highlight; when FALSE syntax
highlight will not be used
start_incl when TRUE inserts at the start position will
be included in the text property

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2021 Jan 31
*todo.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -39,53 +39,15 @@ browser use: https://github.com/vim/vim/issues/1234
-------------------- Known bugs and current work -----------------------
Vim9 - Make everything work:
- Add a test for profiling with nested function calls and lambda.
- Expand `=expr` in :next, :argedit, :argadd, :argdelete, :drop
- Expand `=expr` in :vimgrep, :vimgrepadd, :lvimgrep, :lvimgrepadd
- Expand `=expr` in :mkspell
- Unlet with range: "unlet list[a : b]"
- Implement "export {one, two three}".
- ISN_CHECKTYPE could use check_argtype()
- Using a script variable inside a :def function doesn't work if the variable
is inside a block, see Test_nested_function(). Should it work?
- give error for variable name:
var p = function('NoSuchFunc')
- Make closures work better:
- Create closure in a loop. Need to make a list of them.
- 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')
- Make inline function work, to be used as a funcref:
var Ref = (arg: type): type => {
statement
return expr
}
var Ref = (arg: type) => {
statement
statement
}
- For builtin functions using tv_get_string*() use check_for_string() to be
more strict about the argument type.
- Implement :lockvar and :unlockvar. How about local variables? Perhaps only
allow this for global variables. Use :final or :const otherwise.
- Allow function names that will be script-local to start with lower case
letter? Or also require names with s: prefix to use upper case?
Also apply this function references "var ref = SomeFunc"
- Support passing v:none to use the default argument value. (#6504)
- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
more strict about the argument type (not a bool).
done: balloon_()
- Check many more builtin function arguments at compile time.
- 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
a global function. Prefixing g: is required.
- Need the equivalent of get_lval() and set_var_lval() to implement assignment
to nested list and dict members.
- Assignment to dict doesn't work:
var ret: dict<string> = #{}
ret[i] = string(i)
- Appending to dict item doesn't work:
var d[i] ..= value
- Using ".." at script level doesn't convert arguments to a string.
- This fails in a :def function but not at the script level:
var s = 'asdf'->((a) => a)('x')
Disallow passing more arguments to lambda than expected?
- Implement blob index and slice, also with assignment?
- Compile replacement of :s command: s/pat/\=expr/
- Compile redir to local variable: var_redir_start().
- Implement type cast at the script level.
@ -93,8 +55,6 @@ Vim9 - Make everything work:
islocked()
- 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.
- Make "++nr" work. "++g:count" doesn't work, thinks it is a range.
- Reload: How to make sure type of script function hasn't changed?
@ -106,13 +66,19 @@ Vim9 - Make everything work:
- give an error for "echo Func()" if Func() does not return anything.
- Using "windo echo expr" does not accept a line break inside "expr" (in a
:def function and at script level in a not executed block). #7681
- "assert_fails()" cannot access local variables. Perhaps add this:
assertfails
... cmd ...
endassertfails /E99:.*cmd/
Similar to try/catch/endtry but without the boilerplate.
Once Vim9 is stable:
- Change the help to prefer Vim9 syntax where appropriate
- Use Vim9 for runtime files.
PR #7497 for autoload/ccomplete.vim
- Add all the error numbers in a good place in documentation.
- In the generic eval docs, point out the Vim9 syntax where it differs.
- Add the "vim9script" feature, can use has('vim9script')
- Use Vim9 for runtime files.
PR #7497 for autoload/ccomplete.vim
Also for Vim9:
- better implementation for partial and tests for that.
@ -166,6 +132,7 @@ Popup windows:
However, it may also cause trouble, changing the popup of another plugin.
- Width is not computed correctly when minwidth and maxwidth are &columns
and padding and a scrollbar are used. (#6676)
- Should popup_getoptions() also return the mask? #7774
- Add a way to use popup_menu() synchronously: instead of invoking the
callback, return the choice. (Ben Jackson, #6534)
- Use popup (or popup menu) for command line completion
@ -186,6 +153,7 @@ Text properties:
- Popup attached to text property stays visible when text is deleted with
"cc". (#7737) "C" works OK. "dd" also files in a buffer with a single
line.
- Auto-indenting may cause highlighting to shift. (#7719)
- "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
- Combining text property with 'cursorline' does not always work (Billie
Cleek, #5533)
@ -196,8 +164,6 @@ Text properties:
'incsearch' with :s:
- :s/foo using CTRL-G moves to another line, should not happen, or use the
correct line (it uses the last but one line) (Lifepillar, Aug 18, #3345)
- :s@pat/tern@ doesn't include "/" in the pattern. (Takahiro Yoshihara, #3637)
pass delim to do_search() ?
- Also support range: :/foo/,/bar/delete
- Also support for user command, e.g. Cfilter
- :%s/foo should take the first match below the cursor line, unless there
@ -267,7 +233,26 @@ Terminal emulator window:
- When 'encoding' is not utf-8, or the job is using another encoding, setup
conversions.
Valgind reports memory leaks in test_options
Include patch #6290: recognize shell directory change.
Valgrind reports memory leaks in test_options.
Valgrind reports overlapping memcpy in
test_conceal.3
test_edit.1
test_functions.4
test_ins_complete.3
test_method
test_normal
test_popupwin.35 et al.
test_search_stat
Using uninitialized value in test_crypt (can't explain why).
Memory leak in test_debugger
Memory leak in test_paste, using XtOpenDisplay several times
OLD:
TODO: be able to run all parts of test_alot with valgrind separately
Memory leak in test_alot with pyeval() (allocating partial)
Memory leak in test_alot with expand()
Memory leaks in test_channel? (or is it because of fork())
test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
@ -281,9 +266,16 @@ Was originally written by Felipe Morales.
Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
(#4087) Did patch 8.2.2379 help?
Also, z= in German on a long word can take a very long time, but CTRL-C to
interrupt does not work. Where to add ui_breakcheck()?
Remove SPACE_IN_FILENAME ? It is only used for completion.
Add optional argument to virtcol() that specifies "start", "cursor" or "end"
to tell which value from getvvcol() should be used. (#7964)
Value returned by virtcol() changes depending on how lines wrap. This is
inconsistent with the documentation.
Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598)
Scroll doesn't work correctly, why?
@ -292,6 +284,8 @@ with 'termguicolors'. #1740
Patch for blockwise paste reporting changes: #6660.
Patch to make fillchars global-local. (#5206)
Missing filetype test for bashrc, PKGBUILD, etc.
Add an option to not fetch terminal codes in xterm, to avoid flicker when t_Co
@ -310,6 +304,10 @@ Try setting a color then request the current color, like using t_u7.
Regexp to search for duplicate lines does not work correctly:
/\(^.*\n\)\1 (Chris Morgan, #6239)
MS-Windows: when writing undo file the infostreams are copied in
mch_copy_file_attribute(), that seems unnecessary. (#7925)
Add a flag to only copy attributes?
Changing a capturing group to non-capturing changes the result: #7607
:echo matchstr('aaa bbb', '\(.\{-1,}\>\)\|.*')
aaa
@ -386,6 +384,10 @@ manager. Problem with Motif?
Patch to add :argdedupe. (Nir Lichtman, #6235)
When editing a file with ":edit" the output of :swapname is relative, while
editing it with "vim file" it is absolute. (#355)
Which one should it be?
:map output does not clear the reset of the command line.
(#5623, also see #5962)
@ -568,7 +570,7 @@ The quoting of the [command] argument of :terminal is not clearly documented.
Give a few examples. (#4288)
Opening a file with --remote-tab-silent that matches 'wildignore' does not
work, results in (E479: No match". (#4610)
work, results in "E479: No match". (#4610)
7 Add an option to add one pixel column to the character width? Lucida
Console italic is wider than the normal font ("d" overlaps with next char).
@ -757,25 +759,13 @@ Make ":interactive !cmd" stop termcap mode, also when used in an autocommand.
Add buffer argument to undotree(). (#4001)
Memory leak in test_debugger
Using uninitialized value in test_crypt (can't explain why).
Memory leak in test_terminal_fail
TODO: be able to run all parts of test_alot with valgrind separately
Memory leak in test_alot with pyeval() (allocating partial)
Memory leak in test_alot with expand()
Memory leaks in test_channel? (or is it because of fork())
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
19.
Should make 'listchars' global-local. Local to window or to buffer?
Probably window. #5206
Add something like 'fillchars' local to window, but allow for specifying a
highlight name. Esp. for the statusline.
And "extends" and "precedes" are also useful without 'list' set. Also in
'fillchars' or another option?
Related: #3820 - Support setting the character displayed below the last line?
Neovim uses "eob:X" in 'fillchars'.
Sourceforge Vim pages still have content, redirect from empty page.
Check for PHP errors. (Wayne Davison, 2018 Oct 26)
@ -1114,9 +1104,6 @@ Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May
Using "wviminfo /tmp/viminfo" does not store file marks that Vim knows about,
it only works when merging with an existing file. (Shougo, 2017 Jun 19, #1781)
Is it possible to keep the complete menu open when calling complete()?
(Prabir Shrestha, 2017 May 19, #1713)
Memory leak in test97? The string is actually freed. Weird.
assert_fails() can only check for the first error. Make it possible to have
@ -1167,9 +1154,6 @@ timer expires.
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)
8 "stl" and "stlnc" in 'fillchars' don't work for multibyte characters.
Patch by Christian Wellenbrock, 2013 Jul 5.
Using CTRL-G_U in InsertCharPre causes trouble for redo. (Israel Chauca
Fuentes, 2017 Feb 12, #1470)
@ -1221,10 +1205,6 @@ Patch for wrong cursor position on wrapped line, involving breakindent.
Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30)
When 'completeopt' has "noselect" does not insert a newline. (Lifepillar, 2017
Apr 23, #1653)
Can 'completeopt' be made buffer-local? (#5487)
Window resizing with 'winfixheight': With a vertical split the height changes
anyway. (Tommy allen, 2017 Feb 21, #1502)
@ -1239,9 +1219,6 @@ Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24)
On Windows buffer completion sees backslash as escape char instead of path
separator. (Toffanim, 2016 Nov 24, #1274)
min() and max() spawn lots of error messages if sorted list/dictionary
contains invalid data (Nikolay Pavlov, 2016 Sep 4, #1039)
Should :vmap in matchit.vim be :xmap? (Tony Mechelynck)
Problem with whitespace in errorformat. (Gerd Wachsmuth, 2016 May 15, #807)
@ -1251,6 +1228,8 @@ Undo problem: "g-" doesn't go back, gets stuck. (Björn Linse, 2016 Jul 18)
Add "unicode true" to NSIS installer. Doesn't work with Windows 95, which we
no longer support.
Suppoert sort(l, 'F'), convert strings to float. (#7857)
sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep
4#1038)
@ -1342,9 +1321,6 @@ Regexp problems:
Another one: echom matchstr(" sdfsfsf\n sfdsdfsdf",'[^\n]*')
(2017 May 15, #1252)
Feature request: Complete members of a dictionary. (Luc Hermitte, 2017 Jan 4,
#1350)
Undo message is not always properly displayed. Patch by Ken Takata, 2013 oct
3. Doesn't work properly according to Yukihiro Nakadaira.
Also see #1635.
@ -1503,9 +1479,6 @@ specifically? First try with the parens, then without.
Patch to add :mapgroup, put mappings in a group like augroup.
(Yasuhiro Matsumoto, 2016 Feb 19)
Value returned by virtcol() changes depending on how lines wrap. This is
inconsistent with the documentation.
Can we cache the syntax attributes, so that updates for 'relativenumber' and
'cursorline'/'cursorcolumn' are a lot faster? Thus store the attributes
before combining them.
@ -1520,9 +1493,6 @@ Build with Python on Mac does not always use the right library.
To support Thai (and other languages) word boundaries, include the ICU
library: http://userguide.icu-project.org/boundaryanalysis
When complete() first argument is before where insert started and 'backspace'
is Vi compatible, the completion fails. (Hirohito Higashi, 2015 Feb 19)
Patch to use two highlight groups for relative numbers. (Shaun Brady, 2016 Jan
30)
@ -1728,9 +1698,6 @@ Patch for XDG base directory support. (Jean François Bignolles, 2014 Mar 4)
Remark on the docs. Should not be a compile time feature. But then what?
Also see #2034.
Completion of ":e" is ":earlier", should be ":edit". Complete to the matching
command instead of doing this alphabetically. (Mikel Jorgensen)
Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14)
Several syntax file match "^\s*" which may get underlined if that's in the
@ -1775,10 +1742,6 @@ The BufUnload event is triggered when re-using the empty buffer.
(Pokey Rule, 2013 Jul 22)
Patch by Marcin Szamotulski, 2013 Jul 22.
The CompleteDone autocommand needs some info passed to it:
- The word that was selected (empty if abandoned complete)
- Type of completion: tag, omnifunc, user func.
Patch to allow more types in remote_expr(). (Lech Lorens, 2014 Jan 5)
Doesn't work for string in list. Other way to pass all types of variables
reliably?
@ -2239,10 +2202,6 @@ Syntax priority problem. (Charles Campbell, 2011 Sep 15)
When completion inserts the first match, it may trigger the line to be folded.
Disable updating folds while completion is active? (Peter Odding, 2010 Jun 9)
When a:base in 'completefunc' starts with a number it's passed as a number,
not a string. (Sean Ma) Need to add flag to call_func_retlist() to force a
string value.
For running gvim on a USB stick: avoid the OLE registration. Use a command
line argument -noregister.
@ -2474,9 +2433,6 @@ backslash? (Robert Vibrant, 2008 Jun 5)
When 'rightleft' is set, cursorcolumn isn't highlighted after the end of a
line. It's also wrong in folds. (Dominique Pelle, 2010 Aug 21)
Using an insert mode expression mapping, cursor is not in the expected
position. (ZyX, 2010 Aug 29)
After using <Tab> for command line completion after ":ta blah" and getting E33
(no tags file), further editing the command to e.g., ":echo 'blah'", the
command is not executed. Fix by Ian Kelling?
@ -2633,10 +2589,6 @@ More AmigaOS4 patches. (Peter Bengtsson, Nov 9)
Amiga patches with vbcc. (Adrien Destugues, 2010 Aug 30)
http://pulkomandy.ath.cx/drop/vim73_vbcc_amiga.diff
Insert mode completion: When editing the text and pressing CTRL-N again goes
back to originally completed text, edited text is gone. (Peng Yu, 2008 Jul 24)
Suggestion by Ben Schmidt, 2008 Aug 6.
Problem with compound words? (Bert, 2008 May 6)
No warning for when flags are defined after they are used in an affix.
@ -4931,6 +4883,23 @@ Omni completion:
Insert mode completion/expansion:
- Is it possible to keep the complete menu open when calling complete()?
(Prabir Shrestha, 2017 May 19, #1713)
- When 'completeopt' has "noselect" does not insert a newline.
(Lifepillar, 2017 Apr 23, #1653)
- Can 'completeopt' be made buffer-local? (#5487)
- When complete() first argument is before where insert started and
'backspace' is Vi compatible, the completion fails.
(Hirohito Higashi, 2015 Feb 19)
- The CompleteDone autocommand needs some info passed to it:
- The word that was selected (empty if abandoned complete)
- Type of completion: tag, omnifunc, user func.
- When a:base in 'completefunc' starts with a number it's passed as a
number, not a string. (Sean Ma) Need to add flag to call_func_retlist()
to force a string value.
- When editing the text and pressing CTRL-N again goes back to originally
completed text, edited text is gone. (Peng Yu, 2008 Jul 24)
Suggestion by Ben Schmidt, 2008 Aug 6.
- GUI implementation of the popup menu.
7 When searching in other files the name flash by, too fast to read. Only
display a name every second or so, like with ":vimgrep".
@ -5028,6 +4997,10 @@ Command line editing:
Command line completion:
- Feature request: Complete members of a dictionary.
(Luc Hermitte, 2017 Jan 4, #1350)
- Completion of ":e" is ":earlier", should be ":edit". Complete to the
matching command instead of doing this alphabetically. (Mikel Jorgensen)
8 Change expand_interactively into a flag that is passed as an argument.
8 With command line completion after '%' and '#', expand current/alternate
file name, so it can be edited. Also with modifiers, such as "%:h".

View File

@ -43,7 +43,7 @@ like:
|~ |
|"file.txt" [New file] |
+---------------------------------------+
('#" is the cursor position.)
('#' is the cursor position.)
The tilde (~) lines indicate lines not in the file. In other words, when Vim
runs out of file to display, it displays tilde lines. At the bottom of the

View File

@ -1,4 +1,4 @@
*usr_04.txt* For Vim version 8.2. Last change: 2019 Nov 21
*usr_04.txt* For Vim version 8.2. Last change: 2021 Feb 22
VIM USER MANUAL - by Bram Moolenaar
@ -464,9 +464,9 @@ of characters to replace. It will not continue on the next line.
You can switch between Insert mode and Replace mode with the <Insert> key.
When you use <BS> (backspace) to make correction, you will notice that the
old text is put back. Thus it works like an undo command for the last typed
character.
When you use <BS> (backspace) to make a correction, you will notice that the
old text is put back. Thus it works like an undo command for the previously
typed character.
==============================================================================
*04.10* Conclusion

View File

@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 8.2. Last change: 2021 Jan 13
*usr_41.txt* For Vim version 8.2. Last change: 2021 Mar 14
VIM USER MANUAL - by Bram Moolenaar
@ -611,7 +611,8 @@ String manipulation: *string-functions*
stridx() first index of a short string in a long string
strridx() last index of a short string in a long string
strlen() length of a string in bytes
strchars() length of a string in characters
strcharlen() length of a string in characters
strchars() number of characters in a string
strwidth() size of string when displayed
strdisplaywidth() size of string when displayed, deals with tabs
setcellwidths() set character cell width overrides
@ -883,6 +884,7 @@ Command line: *command-line-functions*
getcmdtype() return the current command-line type
getcmdwintype() return the current command-line window type
getcompletion() list of command-line completion matches
fullcommand() get full command name
Quickfix and location lists: *quickfix-functions*
getqflist() list of quickfix errors
@ -1001,6 +1003,7 @@ Testing: *test-functions*
assert_true() assert that an expression is true
assert_exception() assert that a command throws an exception
assert_beeps() assert that a command beeps
assert_nobeep() assert that a command does not cause a beep
assert_fails() assert that a command fails
assert_report() report a test failure
test_alloc_fail() make memory allocation fail

View File

@ -1,4 +1,4 @@
*various.txt* For Vim version 8.2. Last change: 2021 Jan 26
*various.txt* For Vim version 8.2. Last change: 2021 Mar 23
VIM REFERENCE MANUAL by Bram Moolenaar
@ -572,7 +572,7 @@ N *+X11* Unix only: can restore window title |X11|
it in / any non-ID character (see |'isident'|) can be
used, so long as it does not appear in {pat}. Without
the enclosing character the pattern cannot include the
bar character.
bar character. 'ignorecase' is not used.
The pattern is matched against the relevant part of
the output, not necessarily the whole line. Only some
@ -724,7 +724,7 @@ K Run a program to lookup the keyword under the
feature}
*:sl!* *:sleep!*
:[N]sl[eep]! [N] [m] Same as above, but hide the cursor
:[N]sl[eep]! [N] [m] Same as above, but hide the cursor.
*:xrestore* *:xr*
:xr[estore] [display] Reinitializes the connection to the X11 server. Useful

View File

@ -1,4 +1,4 @@
*version5.txt* For Vim version 8.2. Last change: 2020 Dec 19
*version5.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -405,7 +405,7 @@ Both of these are only available when enabled at compile time.
Win32 GUI version *added-win32-GUI*
-----------------
The GUI has been ported to MS Windows 95 and NT. All the features of the X11
The GUI has been ported to MS-Windows 95 and NT. All the features of the X11
GUI are available to Windows users now. |gui-w32|
This also fixes problems with running the Win32 console version under Windows
95, where console support has always been bad.
@ -4403,7 +4403,7 @@ the last char of the line, "<<" moved an extra line. Also for other operators
that always work on lines.
link.sh changed "-lnsl_s" to "_s" when looking for "nsl" to be removed.
Now it only remove whole words.
Now it only removes whole words.
When jumped to a mark or using "fz", and there is an error, the current column
was lost. E.g. when using "$fzj".

View File

@ -1,4 +1,4 @@
*version6.txt* For Vim version 8.2. Last change: 2020 Aug 17
*version6.txt* For Vim version 8.2. Last change: 2021 Apr 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1025,7 +1025,7 @@ Port to OS/390 Unix (Ralf Schandl)
Included jsbmouse support. (Darren Garth)
Support for dec mouse in Unix. (Steve Wall)
Port to 16-bit MS Windows (Windows 3.1x) (Vince Negri)
Port to 16-bit MS-Windows (Windows 3.1x) (Vince Negri)
Port to QNX. Supports the Photon GUI, mouse, etc. (Julian Kinraid)

View File

@ -2300,7 +2300,7 @@ value didn't fill the whole screen. (SungHyun Nam)
Win32 installer: The generated _vimrc contained an absolute path to diff.exe.
After upgrading it becomes invalid. Now use $VIMRUNTIME instead.
The command line was cleared to often when 'showmode' was set and ":silent
The command line was cleared too often when 'showmode' was set and ":silent
normal vy" was used. Don't clear the command line unless the mode was
actually displayed. Added the "mode_displayed" variable.

View File

@ -1776,7 +1776,7 @@ Files: runtime/doc/change.txt, runtime/doc/eval.txt,
Patch 7.4.219
Problem: When 'relativenumber' or 'cursorline' are set the window is
redrawn much to often. (Patrick Hemmer, Dominique Pelle)
redrawn much too often. (Patrick Hemmer, Dominique Pelle)
Solution: Check the VALID_CROW flag instead of VALID_WROW.
Files: src/move.c

View File

@ -1,4 +1,4 @@
*vim9.txt* For Vim version 8.2. Last change: 2021 Jan 23
*vim9.txt* For Vim version 8.2. Last change: 2021 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@ -51,6 +51,7 @@ 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 the above
- a command prefixed with the `vim9cmd` command modifier
When using `:function` in a Vim9 script file the legacy syntax is used, with
the highest |scriptversion|. However, this can be confusing and is therefore
@ -60,6 +61,12 @@ Vim9 script and legacy Vim script can be mixed. There is no requirement to
rewrite old scripts, they keep working as before. You may want to use a few
`:def` functions for code that needs to be fast.
*:vim9* *:vim9cmd*
:vim9[cmd] {cmd}
Execute {cmd} using Vim9 script syntax and semantics.
Useful when typing a command and in a legacy script or
function.
==============================================================================
2. Differences from legacy Vim script *vim9-differences*
@ -89,8 +96,8 @@ script and `:def` functions; details are below:
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.
- You cannot use `:xit`, `:t`, `:k`, `:append`, `:change`, `:insert`, `:open`
or curly-braces names.
- A range before a command must be prefixed with a colon: >
:%s/this/that
- Unless mentioned specifically, the highest |scriptversion| is used.
@ -118,6 +125,10 @@ that starts a comment: >
var name = value # comment
var name = value# error!
Do not start a comment with #{, it looks like the legacy dictionary literal
and produces an error where this might be confusing. #{{ or #{{{ are OK,
these can be used to start a fold.
In legacy Vim script # is also used for the alternate file name. In Vim9
script you need to use %% instead. Instead of ## use %%% (stands for all
arguments).
@ -126,18 +137,21 @@ arguments).
Vim9 functions ~
A function defined with `:def` is compiled. Execution is many times faster,
often 10x to 100x times.
often 10 to 100 times.
Many errors are already found when compiling, before the function is executed.
The syntax is strict, to enforce code that is easy to read and understand.
Compilation is done when either of these is encountered:
Compilation is done when any of these is encountered:
- the first time the function is called
- when the `:defcompile` command is encountered in the script where the
- when the `:defcompile` command is encountered in the script after the
function was defined
- `:disassemble` is used for the function.
- a function that is compiled calls the function or uses it as a function
reference
*E1091*
If compilation fails it is not tried again on the next call, instead this
error is given: "E1091: Function is not compiled: {name}".
`:def` has no options like `:function` does: "range", "abort", "dict" or
"closure". A `:def` function always aborts on an error (unless `:silent!` was
@ -150,13 +164,31 @@ functions.
Arguments are accessed by name, without "a:", just like any other language.
There is no "a:" dictionary or "a:000" list.
*vim9-variable-arguments*
Variable arguments are defined as the last argument, with a name and have a
list type, similar to TypeScript. For example, a list of numbers: >
def MyFunc(...itemlist: list<number>)
for item in itemlist
...
When a function argument is optional (it has a default value) passing `v:none`
as the argument results in using the default value. This is useful when you
want to specify a value for an argument that comes after an argument that
should use its default value. Example: >
def MyFunc(one = 'one', last = 'last)
...
enddef
MyFunc(v:none, 'LAST') # first argument uses default value 'one'
<
*vim9-ignored-argument*
The argument "_" (an underscore) can be used to ignore the argument. This is
most useful in callbacks where you don't need it, but do need to give an
argument to match the call. E.g. when using map() two arguments are passed,
the key and the value, to ignore the key: >
map(myList, (_, v) => v * 2)
There is no error for using the "_" argument multiple times. No type needs to
be given.
Functions and variables are script-local by default ~
*vim9-scopes*
@ -183,6 +215,12 @@ search for the function:
However, it is recommended to always use "g:" to refer to a global function
for clarity.
Since a script-local function reference can be used without "s:" the name must
start with an upper case letter even when using the "s:" prefix. In legacy
script "s:funcref" could be used, because it could not be referred to with
"funcref". In Vim9 script it can, therefore "s:Funcref" must be used to avoid
that the name interferes with builtin functions.
In all cases the function must be defined before used. That is when it is
called, when `:defcompile` causes it to be compiled, or when code that calls
it is being compiled (to figure out the return type).
@ -272,20 +310,43 @@ 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
and functions.
`:lockvar` does not work on local variables. Use `:const` and `:final`
instead.
Variables, functions and function arguments cannot shadow previously defined
or imported variables and functions in the same script file.
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. >
Global variables must be prefixed with "g:", also at the script level. >
vim9script
var script_local = 'text'
g:global = 'value'
var Funcref = g:ThatFunction
Global functions must be prefixed with "g:" when defining them, but can be
called without "g:". >
vim9script
def g:GlobalFunc(): string
return 'text'
enddef
echo GlobalFunc()
The "g:" prefix is not needed for auto-load functions.
Since `&opt = value` is now assigning a value to option "opt", ":&" cannot be
used to repeat a `:substitute` command.
For an unpack assignment the underscore can be used to ignore a list item,
similar to how a function argument can be ignored: >
[a, _, c] = theList
[a, b; _] = longList
< *E1092*
Declaring more than one variable at a time, using the unpack notation, is
currently not supported: >
var [v1, v2] = GetValues() # Error!
That is because the type needs to be inferred from the list item type, which
isn't that easy.
Constants ~
*vim9-const* *vim9-final*
@ -300,14 +361,14 @@ Example: >
const myList = [1, 2]
myList = [3, 4] # Error!
myList[0] = 9 # Error!
muList->add(3) # Error!
myList->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
myList->add(3) # OK
It is common to write constants as ALL_CAPS, but you don't have to.
@ -319,13 +380,6 @@ The constant only applies to the value itself, not what it refers to. >
NAMES[1] = ["Emma"] # Error!
NAMES[1][0] = "Emma" # OK, now females[0] == "Emma"
< *E1092*
Declaring more than one variable at a time, using the unpack notation, is
currently not supported: >
var [v1, v2] = GetValues() # Error!
That is because the type needs to be inferred from the list item type, which
isn't that easy.
Omitting :call and :eval ~
@ -334,7 +388,8 @@ Functions can be called without `:call`: >
Using `:call` is still possible, but this is discouraged.
A method call without `eval` is possible, so long as the start is an
identifier or can't be an Ex command. Examples: >
identifier or can't be an Ex command. For a function either "(" or "->" must
be following, without a line break. Examples: >
myList->add(123)
g:myList->add(123)
[1, 2, 3]->Process()
@ -371,7 +426,7 @@ number of arguments and any return type. The function can be defined later.
Lambda using => instead of -> ~
*vim9-lambda*
In legacy script there can be confusion between using "->" for a method call
and for a lambda. Also, when a "{" is found the parser needs to figure out if
it is the start of a lambda or a dictionary, which is now more complicated
@ -395,17 +450,44 @@ But you can use a backslash to concatenate the lines before parsing: >
filter(list, (k,
\ v)
\ => v > 0)
< *vim9-lambda-arguments*
In legacy script a lambda could be called with any number of extra arguments,
there was no way to warn for not using them. In Vim9 script the number of
arguments must match. If you do want to accept any arguments, or any further
arguments, use "..._", which makes the function accept
|vim9-variable-arguments|. Example: >
var Callback = (..._) => 'anything'
echo Callback(1, 2, 3) # displays "anything"
< *inline-function*
Additionally, a lambda can contain statements in {}: >
var Lambda = (arg) => {
g:was_called = 'yes'
return expression
}
NOT IMPLEMENTED YET
This can be useful for a timer, for example: >
var count = 0
var timer = timer_start(500, (_) => {
count += 1
echom 'Handler called ' .. count
}, {repeat: 3})
The ending "}" must be at the start of a line. It can be followed by other
characters, e.g.: >
var d = mapnew(dict, (k, v): string => {
return 'value'
})
No command can follow the "{", only a comment can be used there.
Rationale: The "}" cannot be after a command because it would require parsing
the commands to find it. For consistency with that no command can follow the
"{". Unfortunately this means using "() => { command }" does not work, line
breaks are always required.
*vim9-curly*
To avoid the "{" of a dictionary literal to be recognized as a statement block
wrap it in parenthesis: >
wrap it in parentheses: >
var Lambda = (arg) => ({key: 42})
Also when confused with the start of a command block: >
@ -548,12 +630,19 @@ In case the key needs to be an expression, square brackets can be used, just
like in JavaScript: >
var dict = {["key" .. nr]: value}
The key type can be string, number, bool or float. Other types result in an
error. A number can be given with and without the []: >
var dict = {123: 'without', [456]: 'with'}
echo dict
{'456': 'with', '123': 'without'}
No :xit, :t, :append, :change or :insert ~
No :xit, :t, :k, :append, :change or :insert ~
These commands are too easily confused with local variable names.
Instead of `:x` or `:xit` you can use `:exit`.
Instead of `:t` you can use `:copy`.
Instead of `:k` you can use `:mark`.
Comparators ~
@ -682,13 +771,15 @@ for v:null. When converting a boolean to a string "false" and "true" are
used, not "v:false" and "v:true" like in legacy script. "v:none" is not
changed, it is only used in JSON and has no equivalent in other languages.
Indexing a string with [idx] or [idx : idx] uses character indexes instead of
byte indexes. Example: >
Indexing a string with [idx] or taking a slice with [idx : idx] uses character
indexes instead of byte indexes. Composing characters are included.
Example: >
echo 'bár'[1]
In legacy script this results in the character 0xc3 (an illegal byte), in Vim9
script this results in the string 'á'.
A negative index is counting from the end, "[-1]" is the last character.
To exclude the last character use |slice()|.
To count composing characters separately use |strcharpart()|.
If the index is out of range then an empty string results.
In legacy script "++var" and "--var" would be silently accepted and have no
@ -786,6 +877,8 @@ Patterns are used like 'magic' is set, unless explicitly overruled.
The 'edcompatible' option value is not used.
The 'gdefault' option value is not used.
You may also find this wiki useful. It was written by an early adopter of
Vim9 script: https://github.com/lacygoill/wiki/blob/master/vim/vim9.md
==============================================================================
@ -829,12 +922,14 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
:enddef End of a function defined with `:def`. It should be on
a line by its own.
You may also find this wiki useful. It was written by an early adopter of
Vim9 script: https://github.com/lacygoill/wiki/blob/master/vim/vim9.md
If the script the function is defined in is Vim9 script, then script-local
variables can be accessed without the "s:" prefix. They must be defined
before the function is compiled. If the script the function is defined in is
legacy script, then script-local variables must be accessed with the "s:"
prefix and they do not need to exist (they can be deleted any time).
prefix if they do not exist at the time of compiling.
*:defc* *:defcompile*
:defc[ompile] Compile functions defined in the current script that
@ -872,6 +967,27 @@ For these the backtick expansion can be used. Example: >
g/pattern/s/^/`=newText`/
enddef
Closures defined in a loop will share the same context. For example: >
var flist: list<func>
for i in range(10)
var inloop = i
flist[i] = () => inloop
endfor
The "inloop" variable will exist only once, all closures put in the list refer
to the same instance, which in the end will have the value 9. This is
efficient. If you do want a separate context for each closure call a function
to define it: >
def GetFunc(i: number): func
var inloop = i
return () => inloop
enddef
var flist: list<func>
for i in range(10)
flist[i] = GetFunc(i)
endfor
==============================================================================
4. Types *vim9-types*
@ -998,12 +1114,15 @@ dictionary. If there is a mix of types, the "any" type is used. >
['a', 'b', 'c'] list<string>
[1, 'x', 3] list<any>
For script-local variables in Vim9 script the type is checked, also when the
variable was declared in a legacy function.
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
such as "123", but leads to unexpected problems (and no error message) if the
string doesn't start with a number. Quite often this leads to hard-to-find
bugs.
@ -1015,10 +1134,14 @@ an error, thus breaking backwards compatibility. For example:
- Using a number where a string is expected. *E1024*
One consequence is that the item type of a list or dict given to map() must
not change. This will give an error in compiled code: >
not change. This will give an error in Vim9 script: >
map([1, 2, 3], (i, v) => 'item ' .. i)
E1012: Type mismatch; expected list<number> but got list<string>
Instead use |mapnew()|.
E1012: Type mismatch; expected number but got string
Instead use |mapnew()|. If the item type was determined to be "any" it can
change to a more specific type. E.g. when a list of mixed types gets changed
to a list of numbers.
Same for |extend()|, use |extendnew()| instead, and for |flatten()|, use
|flattennew()| instead.
==============================================================================
@ -1038,9 +1161,9 @@ that you don't do that.
Namespace ~
*vim9-namespace*
To recognize a file that can be imported the `vim9script` statement must
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: >
appear as the first statement in the file (see |vim9-mix| for an exception).
It tells Vim to interpret the script in its own namespace, instead of the
global namespace. If a file starts with: >
vim9script
var myvar = 'yes'
Then "myvar" will only exist in this file. While without `vim9script` it would
@ -1058,7 +1181,30 @@ A side effect of `:vim9script` is that the 'cpoptions' option is set to the
Vim default value, like with: >
:set cpo&vim
One of the effects is that |line-continuation| is always enabled.
The original value of 'cpoptions' is restored at the end of the script.
The original value of 'cpoptions' is restored at the end of the script, while
flags added or removed in the script are also added to or removed from the
original value to get the same effect. The order of flags may change.
*vim9-mix*
There is one way to use both legacy and Vim9 syntax in one script file: >
" comments may go here
if !has('vim9script')
" legacy script commands go here
finish
endif
vim9script
# Vim9 script commands go here
This allows for writing a script that takes advantage of the Vim9 script
syntax if possible, but will also work on a Vim version without it.
This can only work in two ways:
1. The "if" statement evaluates to false, the commands up to `endif` are
skipped and `vim9script` is then the first command actually executed.
2. The "if" statement evaluates to true, the commands up to `endif` are
executed and `finish` bails out before reaching `vim9script`.
TODO: The "vim9script" feature does not exist yet, it will only be added once
the Vim9 script syntax has been fully implemented.
Export ~
@ -1072,7 +1218,7 @@ Exporting an item can be written as: >
export class MyClass ...
As this suggests, only constants, variables, `:def` functions and classes can
be exported. {classes are not implemented yet}
be exported. {not implemented yet: export class}
*E1042*
`:export` can only be used in Vim9 script, at the script level.

View File

@ -1,4 +1,4 @@
*windows.txt* For Vim version 8.2. Last change: 2020 Dec 18
*windows.txt* For Vim version 8.2. Last change: 2021 Mar 21
VIM REFERENCE MANUAL by Bram Moolenaar
@ -138,10 +138,12 @@ status line is inverted anyway; you will only see this problem on terminals
that have termcap codes for italics.
*filler-lines*
The lines after the last buffer line in a window are called filler lines.
These lines start with a tilde (~) character. By default, these are
highlighted as NonText (|hl-NonText|). The EndOfBuffer highlight group
(|hl-EndOfBuffer|) can be used to change the highlighting of filler lines.
The lines after the last buffer line in a window are called filler lines. By
default, these lines start with a tilde (~) character. The 'eob' item in the
'fillchars' option can be used to change this character. By default, these
characters are highlighted as NonText (|hl-NonText|). The EndOfBuffer
highlight group (|hl-EndOfBuffer|) can be used to change the highlighting of
the filler characters.
==============================================================================
3. Opening and closing a window *opening-window* *E36*
@ -208,7 +210,9 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
:[N]new [++opt] [+cmd] {file}
:[N]sp[lit] [++opt] [+cmd] {file} *:split_f*
Create a new window and start editing file {file} in it. This
behaves like a ":split" first, and then an ":e" command.
behaves almost like a ":split" first, and then an ":edit"
command, but the alternate file name in the original window is
set to {file}.
If [+cmd] is given, execute the command when the file has been
loaded |+cmd|.
Also see |++opt|.
@ -786,7 +790,7 @@ can also get to them with the buffer list commands, like ":bnext".
Examples: >
:windo set nolist nofoldcolumn | normal zn
:windo set nolist foldcolumn=0 | normal! zn
This resets the 'list' option and disables folding in all windows. >
@ -794,7 +798,7 @@ This resets the 'list' option and disables folding in all windows. >
This resets the 'fileencoding' in each buffer and writes it if this changed
the buffer. The result is that all buffers will use the 'encoding' encoding
(if conversion works properly).
(if conversion succeeds).
==============================================================================
9. Tag or file name under the cursor *window-tag*

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Jan 21
" Last Change: 2021 Apr 05
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@ -168,6 +168,9 @@ au BufNewFile,BufRead *.mar setf vmasm
" Atlas
au BufNewFile,BufRead *.atl,*.as setf atlas
" Atom is based on XML
au BufNewFile,BufRead *.atom setf xml
" Autoit v3
au BufNewFile,BufRead *.au3 setf autoit
@ -216,6 +219,9 @@ au BufNewFile,BufRead *.bc setf bc
" BDF font
au BufNewFile,BufRead *.bdf setf bdf
" Beancount
au BufNewFile,BufRead *.beancount setf beancount
" BibTeX bibliography database file
au BufNewFile,BufRead *.bib setf bib
@ -1273,6 +1279,11 @@ au BufNewFile,BufRead .povrayrc setf povini
" Povray, Pascal, PHP or assembly
au BufNewFile,BufRead *.inc call dist#ft#FTinc()
" PowerShell
au BufNewFile,BufRead *.ps1,*.psd1,*.psm1,*.pssc setf ps1
au BufNewFile,BufRead *.ps1xml setf ps1xml
au BufNewFile,BufRead *.cdxml,*.psc1 setf xml
" Printcap and Termcap
au BufNewFile,BufRead *printcap
\ let b:ptcap_type = "print" | setf ptcap
@ -1331,6 +1342,9 @@ au BufNewFile,BufRead *.pml setf promela
au BufNewFile,BufRead *.proto setf proto
au BufNewFile,BufRead *.pbtxt setf pbtxt
" Poke
au BufNewFile,BufRead *.pk setf poke
" Protocols
au BufNewFile,BufRead */etc/protocols setf protocols
@ -1388,6 +1402,9 @@ else
au BufNewFile,BufRead *.rmd,*.smd setf rmd
endif
" RSS looks like XML
au BufNewFile,BufRead *.rss setf xml
" R reStructuredText file
if has("fname_case")
au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst
@ -1488,6 +1505,9 @@ au BufNewFile,BufRead *.sdl,*.pr setf sdl
" sed
au BufNewFile,BufRead *.sed setf sed
" svelte
au BufNewFile,BufRead *.svelte setf svelte
" Sieve (RFC 3028, 5228)
au BufNewFile,BufRead *.siv,*.sieve setf sieve
@ -1537,11 +1557,10 @@ au BufNewFile,BufRead catalog setf catalog
" 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,APKBUILD call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.ebuild,*.bash,*.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))
" Shell script (Arch Linux) or PHP file (Drupal)
au BufNewFile,BufRead *.install
\ if getline(1) =~ '<?php' |
@ -2212,8 +2231,11 @@ au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
" SGML catalog file
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
" avoid doc files being recognized a shell files
au BufNewFile,BufRead */doc/{,.}bash[_-]completion{,.d,.sh}{,/*} setf text
" Shell scripts ending in a star
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD* call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD*,*/{,.}bash[_-]completion{,.d,.sh}{,/*} 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,11 +1,11 @@
" Vim filetype plugin file
" Language: Clojure
" Author: Meikel Brandmeyer <mb@kotka.de>
"
" Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim
" Last Change: 18 July 2016
" Language: Clojure
" Maintainer: Alex Vear <av@axvr.io>
" Former Maintainers: Sung Pae <self@sungpae.com>
" Meikel Brandmeyer <mb@kotka.de>
" URL: https://github.com/clojure-vim/clojure.vim
" License: Vim (see :h license)
" Last Change: 2021-02-13
if exists("b:did_ftplugin")
finish
@ -43,7 +43,7 @@ setlocal commentstring=;\ %s
" specially and hence are not indented specially.
"
" -*- LISPWORDS -*-
" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-011/clj/src/vim_clojure_static/generate.clj
" Generated from https://github.com/clojure-vim/clojure.vim/blob/f8594e7030cdfb0b7990ac92953c77a08a7220f0/clj/src/vim_clojure_static/generate.clj
setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test
" Provide insert mode completions for special forms and clojure.core. As
@ -57,21 +57,6 @@ for s:setting in ['omnifunc', 'completefunc']
endif
endfor
" Take all directories of the CLOJURE_SOURCE_DIRS environment variable
" and add them to the path option.
"
" This is a legacy option for VimClojure users.
if exists('$CLOJURE_SOURCE_DIRS')
for s:dir in split($CLOJURE_SOURCE_DIRS, (has("win32") || has("win64")) ? ';' : ':')
let s:dir = fnameescape(s:dir)
" Whitespace escaping for Windows
let s:dir = substitute(s:dir, '\', '\\\\', 'g')
let s:dir = substitute(s:dir, '\ ', '\\ ', 'g')
execute "setlocal path+=" . s:dir . "/**"
endfor
let b:undo_ftplugin .= ' | setlocal path<'
endif
" Skip brackets in ignored syntax regions when using the % command
if exists('loaded_matchit')
let b:match_words = &matchpairs

View File

@ -1,13 +1,13 @@
" Vim settings file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66)
" Version: (v52) 2020 October 07
" Version: (v53) 2021 April 06
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-plugin from Vim
" Credits:
" 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.
" Doug Kearns, and Fritz Reese.
" Only do these settings when not done yet for this buffer
if exists("b:did_ftplugin")
@ -66,12 +66,19 @@ endif
" Set comments and textwidth according to source type
if (b:fortran_fixed_source == 1)
setlocal comments=:!,:*,:C
" Fixed format requires a textwidth of 72 for code
setlocal tw=72
" Fixed format requires a textwidth of 72 for code,
" but some vendor extensions allow longer lines
if exists("fortran_extended_line_length")
setlocal tw=132
elseif exists("fortran_cardimage_line_length")
setlocal tw=80
else
setlocal tw=72
" If you need to add "&" on continued lines so that the code is
" compatible with both free and fixed format, then you should do so
" in column 73 and uncomment the next line
" setlocal tw=73
endif
else
setlocal comments=:!
" Free format allows a textwidth of 132

View File

@ -4,7 +4,7 @@
" URL: http://sites.google.com/site/khorser/opensource/vim
" Original author: Dorai Sitaram <ds26@gte.com>
" Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
" Last Change: Oct 23, 2013
" Last Change: Mar 10, 2021
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@ -14,13 +14,11 @@ endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
setl comments=:;
setl comments=:;;;;,:;;;,:;;,:;,sr:#\|,mb:\|,ex:\|#
setl define=^\\s*(def\\k*
setl formatoptions-=t
setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94
setl lisp
setl commentstring=;%s
setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|#
let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp< commentstring<"

32
runtime/ftplugin/poke.vim Normal file
View File

@ -0,0 +1,32 @@
" Vim filetype plugin file
" Language: GNU Poke
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 March 11
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s
setlocal formatoptions-=t formatoptions+=croql
setlocal include=load
setlocal suffixesadd=.pk
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Poke Files (*.pk)\t*.pk\n" .
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl fo< com< cms< inc< sua<" .
\ " | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8

59
runtime/ftplugin/ps1.vim Normal file
View File

@ -0,0 +1,59 @@
" Vim filetype plugin file
" Language: Windows PowerShell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2021 Apr 02
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
" Don't load another plug-in for this buffer
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal tw=0
setlocal commentstring=#%s
setlocal formatoptions=tcqro
" Enable autocompletion of hyphenated PowerShell commands,
" e.g. Get-Content or Get-ADUser
setlocal iskeyword+=-
" Change the browse dialog on Win32 to show mainly PowerShell-related files
if has("gui_win32")
let b:browsefilter =
\ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" .
\ "PowerShell Script Files (*.ps1)\t*.ps1\n" .
\ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" .
\ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" .
\ "All Files (*.*)\t*.*\n"
endif
" Look up keywords by Get-Help:
" check for PowerShell Core in Windows, Linux or MacOS
if executable('pwsh') | let s:pwsh_cmd = 'pwsh'
" on Windows Subsystem for Linux, check for PowerShell Core in Windows
elseif exists('$WSLENV') && executable('pwsh.exe') | let s:pwsh_cmd = 'pwsh.exe'
" check for PowerShell <= 5.1 in Windows
elseif executable('powershell.exe') | let s:pwsh_cmd = 'powershell.exe'
endif
if exists('s:pwsh_cmd')
if !has('gui_running') && executable('less') &&
\ !(exists('$ConEmuBuild') && &term =~? '^xterm')
" For exclusion of ConEmu, see https://github.com/Maximus5/ConEmu/issues/2048
command! -buffer -nargs=1 GetHelp silent exe '!' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>" | ' . (has('unix') ? 'LESS= less' : 'less') | redraw!
elseif has('terminal')
command! -buffer -nargs=1 GetHelp silent exe 'term ' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>"' . (executable('less') ? ' | less' : '')
else
command! -buffer -nargs=1 GetHelp echo system(s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full <args>')
endif
endif
setlocal keywordprg=:GetHelp
" Undo the stuff we changed
let b:undo_ftplugin = "setlocal tw< cms< fo< iskeyword< keywordprg<" .
\ " | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -0,0 +1,34 @@
" Vim filetype plugin file
" Language: Windows PowerShell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2021 Apr 02
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
" Don't load another plug-in for this buffer
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal tw=0
setlocal commentstring=#%s
setlocal formatoptions=tcqro
" Change the browse dialog on Win32 to show mainly PowerShell-related files
if has("gui_win32")
let b:browsefilter =
\ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" .
\ "PowerShell Script Files (*.ps1)\t*.ps1\n" .
\ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" .
\ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" .
\ "All Files (*.*)\t*.*\n"
endif
" Undo the stuff we changed
let b:undo_ftplugin = "setlocal tw< cms< fo<" .
\ " | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Jan 23
" Last Change: 2021 Feb 20
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@ -54,7 +54,7 @@ if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>'
" Comments starts with # in Vim9 script
setlocal commentstring=#%s
else
setlocal com=sO:\"\ -,mO:\"\ \ ,:\"
setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"
" Comments starts with a double quote in legacy script
setlocal commentstring=\"%s
endif
@ -94,7 +94,7 @@ if exists("loaded_matchit")
" func name
" require a parenthesis following, then there can be an "endfunc".
let b:match_words =
\ '\<\%(fu\%[nction]\|def\)\s\+\S\+(:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
\ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+(:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
\ '{:},' .

View File

@ -62,10 +62,14 @@ fun! CdlGetIndent(lnum)
" PREVIOUS LINE
let ind = indent(lnum)
let line = getline(lnum)
let f = -1 " wether a '=' is a conditional or a asignment, -1 means we don't know yet
" one 'closing' element at the beginning of the line has already reduced the
" indent, but 'else', 'elseif' & 'then' increment it for the next line
" '=' at the beginning has already de right indent (increased for asignments)
" Whether a '=' is a conditional or an assignment. -1 means we don't know
" yet.
" One 'closing' element at the beginning of the line has already reduced the
" indent, but 'else', 'elseif' & 'then' increment it for the next line.
" '=' at the beginning already has the right indent (increased for
" asignments).
let f = -1
let inicio = matchend(line, '^\c\s*\(else\a*\|then\|endif\|/[*/]\|[);={]\)')
if inicio > 0
let c = line[inicio-1]

View File

@ -1,12 +1,11 @@
" Vim indent file
" Language: Clojure
" Author: Meikel Brandmeyer <mb@kotka.de>
" URL: http://kotka.de/projects/clojure/vimclojure.html
"
" Maintainer: Sung Pae <self@sungpae.com>
" URL: https://github.com/guns/vim-clojure-static
" License: Same as Vim
" Last Change: 18 July 2016
" Language: Clojure
" Maintainer: Alex Vear <av@axvr.io>
" Former Maintainers: Sung Pae <self@sungpae.com>
" Meikel Brandmeyer <mb@kotka.de>
" URL: https://github.com/clojure-vim/clojure.vim
" License: Vim (see :h license)
" Last Change: 2021-02-13
if exists("b:did_indent")
finish
@ -87,7 +86,7 @@ if exists("*searchpairpos")
function! s:match_pairs(open, close, stopat)
" Stop only on vector and map [ resp. {. Ignore the ones in strings and
" comments.
if a:stopat == 0
if a:stopat == 0 && g:clojure_maxlines > 0
let stopat = max([line(".") - g:clojure_maxlines, 0])
else
let stopat = a:stopat
@ -121,7 +120,7 @@ if exists("*searchpairpos")
if s:syn_id_name() !~? "string"
return -1
endif
if s:current_char() != '\\'
if s:current_char() != '\'
return -1
endif
call cursor(0, col("$") - 1)
@ -170,7 +169,35 @@ if exists("*searchpairpos")
call search('\S', 'W')
let w = s:strip_namespace_and_macro_chars(s:current_word())
if g:clojure_special_indent_words =~# '\V\<' . w . '\>'
" `letfn` is a special-special-case.
if w ==# 'letfn'
" Earlier code left the cursor at:
" (letfn [...] ...)
" ^
" Search and get coordinates of first `[`
" (letfn [...] ...)
" ^
call search('\[', 'W')
let pos = getcurpos()
let letfn_bracket = [pos[1], pos[2]]
" Move cursor to start of the form this function was
" initially called on. Grab the coordinates of the
" closest outer `[`.
call cursor(a:position)
let outer_bracket = s:match_pairs('\[', '\]', 0)
" If the located square brackets are not the same,
" don't use special-case formatting.
if outer_bracket != letfn_bracket
return 0
endif
endif
return 1
endif
@ -190,11 +217,7 @@ if exists("*searchpairpos")
" Check if form is a reader conditional, that is, it is prefixed by #?
" or @#?
function! s:is_reader_conditional_special_case(position)
if getline(a:position[0])[a:position[1] - 3 : a:position[1] - 2] == "#?"
return 1
endif
return 0
return getline(a:position[0])[a:position[1] - 3 : a:position[1] - 2] == "#?"
endfunction
" Returns 1 for opening brackets, -1 for _anything else_.
@ -261,7 +284,7 @@ if exists("*searchpairpos")
call cursor(paren)
if s:is_method_special_case(paren)
return [paren[0], paren[1] + shiftwidth() - 1]
return [paren[0], paren[1] + &shiftwidth - 1]
endif
if s:is_reader_conditional_special_case(paren)
@ -292,6 +315,19 @@ if exists("*searchpairpos")
return paren
endif
" If the keyword begins with #, check if it is an anonymous
" function or set, in which case we indent by the shiftwidth
" (minus one if g:clojure_align_subforms = 1), or if it is
" ignored, in which case we use the ( position for indent.
if w[0] == "#"
" TODO: Handle #=() and other rare reader invocations?
if w[1] == '(' || w[1] == '{'
return [paren[0], paren[1] + (g:clojure_align_subforms ? 0 : &shiftwidth - 1)]
elseif w[1] == '_'
return paren
endif
endif
" Test words without namespace qualifiers and leading reader macro
" metacharacters.
"
@ -299,19 +335,19 @@ if exists("*searchpairpos")
let ww = s:strip_namespace_and_macro_chars(w)
if &lispwords =~# '\V\<' . ww . '\>'
return [paren[0], paren[1] + shiftwidth() - 1]
return [paren[0], paren[1] + &shiftwidth - 1]
endif
if g:clojure_fuzzy_indent
\ && !s:match_one(g:clojure_fuzzy_indent_blacklist, ww)
\ && s:match_one(g:clojure_fuzzy_indent_patterns, ww)
return [paren[0], paren[1] + shiftwidth() - 1]
return [paren[0], paren[1] + &shiftwidth - 1]
endif
call search('\v\_s', 'cW')
call search('\v\S', 'W')
if paren[0] < line(".")
return [paren[0], paren[1] + (g:clojure_align_subforms ? 0 : shiftwidth() - 1)]
return [paren[0], paren[1] + (g:clojure_align_subforms ? 0 : &shiftwidth - 1)]
endif
call search('\v\S', 'bW')

View File

@ -1,7 +1,7 @@
" Vim indent script for HTML
" Maintainer: Bram Moolenaar
" Original Author: Andy Wokula <anwoku@yahoo.de>
" Last Change: 2020 Dec 11
" Last Change: 2021 Jan 26
" Version: 1.0 "{{{
" Description: HTML indent script with cached state for faster indenting on a
" range of lines.
@ -941,11 +941,11 @@ func! s:InsideTag(foundHtmlString)
let idx = match(text, '<' . s:tagname . '\s\+\zs\w')
endif
if idx == -1
" after just "<tag" indent one level more
" after just "<tag" indent two levels more
let idx = match(text, '<' . s:tagname . '$')
if idx >= 0
call cursor(lnum, idx)
return virtcol('.') + shiftwidth()
call cursor(lnum, idx + 1)
return virtcol('.') - 1 + shiftwidth() * 2
endif
endif
if idx > 0

17
runtime/indent/ps1.vim Normal file
View File

@ -0,0 +1,17 @@
" Vim indent file
" Language: Windows PowerShell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2017 Oct 19
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
" smartindent is good enough for powershell
setlocal smartindent
" disable the indent removal for # marks
inoremap <buffer> # X#
let b:undo_indent = "setl si<"

View File

@ -4,7 +4,6 @@
" Previous Maintainer: Nikolai Weibull <now at bitwi.se>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2019 Dec 08
" 0. Initialization {{{1
" =================
@ -27,7 +26,12 @@ endif
if !exists('g:ruby_indent_block_style')
" Possible values: "expression", "do"
let g:ruby_indent_block_style = 'expression'
let g:ruby_indent_block_style = 'do'
endif
if !exists('g:ruby_indent_hanging_elements')
" Non-zero means hanging indents are enabled, zero means disabled
let g:ruby_indent_hanging_elements = 1
endif
setlocal nosmartindent
@ -322,7 +326,11 @@ function! s:ClosingBracketOnEmptyLine(cline_info) abort
if searchpair(escape(bracket_pair[0], '\['), '', bracket_pair[1], 'bW', s:skip_expr) > 0
if closing_bracket == ')' && col('.') != col('$') - 1
let ind = virtcol('.') - 1
if g:ruby_indent_hanging_elements
let ind = virtcol('.') - 1
else
let ind = indent(line('.'))
end
elseif g:ruby_indent_block_style == 'do'
let ind = indent(line('.'))
else " g:ruby_indent_block_style == 'expression'
@ -547,7 +555,9 @@ function! s:AfterUnbalancedBracket(pline_info) abort
let [opening, closing] = s:ExtraBrackets(info.plnum)
if opening.pos != -1
if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if !g:ruby_indent_hanging_elements
return indent(info.plnum) + info.sw
elseif opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if col('.') + 1 == col('$')
return indent(info.plnum) + info.sw
else
@ -632,8 +642,7 @@ function! s:PreviousNotMSL(msl_info) abort
" TODO (2016-10-07) Wrong/unused? How could it be "1"?
return indent(info.plnum) - 1
" If previous line is a continuation return its indent.
" TODO: the || s:IsInString() thing worries me a bit.
elseif s:Match(info.plnum, s:non_bracket_continuation_regex) || s:IsInString(info.plnum, strlen(line))
elseif s:Match(info.plnum, s:non_bracket_continuation_regex)
return indent(info.plnum)
endif
endif

View File

@ -19,7 +19,7 @@ div#d2 { color: green; }
</div>
<div
class="foo bar">
class="foo bar">
text
</div>

View File

@ -15,6 +15,21 @@ let x = [
\ ]
endif
" TODO: add searchpair() to find matching {
"for x in [
"{
"key: 'value'
"},
"]
"eval 0
"endfor
for x in [
{key: 'value'},
]
eval 0
endfor
" END_INDENT
" START_INDENT

View File

@ -15,6 +15,21 @@ if 1
\ ]
endif
" TODO: add searchpair() to find matching {
"for x in [
"{
"key: 'value'
"},
"]
"eval 0
"endfor
for x in [
{key: 'value'},
]
eval 0
endfor
" END_INDENT
" START_INDENT

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: Vim script
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Jan 21
" Last Change: 2021 Feb 18
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@ -99,7 +99,9 @@ function GetVimIndentIntern()
let ind = ind + shiftwidth()
else
" A line starting with :au does not increment/decrement indent.
if prev_text !~ '^\s*au\%[tocmd]'
" A { may start a block or a dict. Assume that when a } follows it's a
" terminated dict.
if prev_text !~ '^\s*au\%[tocmd]' && prev_text !~ '^\s*{.*}'
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()
@ -152,13 +154,17 @@ function GetVimIndentIntern()
endif
" Below a line starting with "]" we must be below the end of a list.
if prev_text_end =~ '^\s*]'
" Include a "}" and "},} in case a dictionary ends too.
if prev_text_end =~ '^\s*\(},\=\s*\)\=]'
let ind = ind - shiftwidth()
endif
" A line ending in "{"/"[} is most likely the start of a dict/list literal,
" indent the next line more. Not for a continuation line.
if prev_text_end =~ '[{[]\s*$' && !found_cont
let ends_in_comment = has('syntax_items')
\ && synIDattr(synID(lnum, len(getline(lnum)), 1), "name") =~ '\(Comment\|String\)$'
" A line ending in "{" or "[" is most likely the start of a dict/list literal,
" indent the next line more. Not for a continuation line or {{{.
if !ends_in_comment && prev_text_end =~ '\s[{[]\s*$' && !found_cont
let ind = ind + shiftwidth()
endif

View File

@ -266,6 +266,8 @@ if exists("+autochdir")
call <SID>AddOption("autochdir", gettext("change to directory of file in buffer"))
call <SID>BinOptionG("acd", &acd)
endif
call <SID>AddOption("autoshelldir", gettext("change to pwd of shell in terminal buffer"))
call <SID>BinOptionG("asd", &asd)
call <SID>AddOption("wrapscan", gettext("search commands wrap around the end of the buffer"))
call <SID>BinOptionG("ws", &ws)
call <SID>AddOption("incsearch", gettext("show match for partly typed search command"))

View File

@ -1,6 +1,6 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 Jun 18
" Last Change: 2021 Apr 07
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@ -107,9 +107,10 @@ func s:Highlight_Matching_Pair()
" Build an expression that detects whether the current cursor position is
" in certain syntax types (string, comment, etc.), for use as
" searchpairpos()'s skip argument.
" We match "escape" for special items, such as lispEscapeSpecial.
" We match "escape" for special items, such as lispEscapeSpecial, and
" match "symbol" for lispBarSymbol.
let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' .
\ '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))'
\ '''v:val =~? "string\\|character\\|singlequote\\|escape\\symbol\\|comment"''))'
" If executing the expression determines that the cursor is currently in
" one of the syntax types, then we want searchpairpos() to find the pair
" within those syntax types (i.e., not skip). Otherwise, the cursor is

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types in scripts
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2020 Aug 15
" Last change: 2021 Jan 22
" This file is called by an autocommand for every file that has just been
" loaded into a buffer. It checks if the type of file can be recognized by

File diff suppressed because one or more lines are too long

View File

@ -1,16 +1,22 @@
" Vim syntax file
" Language: Dot
" Filenames: *.dot
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
" URL: http://www.ocaml.info/vim/syntax/dot.vim
" Last Change: 2011 May 17 - improved identifier matching + two new keywords
" Last Change: 2021 Mar 24 - better attr + escape string matching, new keywords (Farbod Salamat-Zadeh)
" 2011 May 17 - improved identifier matching + two new keywords
" 2001 May 04 - initial version
" quit when a syntax file was already loaded
if exists("b:current_syntax")
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
let s:keepcpo = &cpo
set cpo&vim
" Errors
syn match dotParErr ")"
syn match dotBrackErr "]"
@ -29,39 +35,43 @@ syn keyword dotTodo contained TODO FIXME XXX
" Strings
syn region dotString start=+"+ skip=+\\\\\|\\"+ end=+"+
" Escape strings
syn match dotEscString /\v\\(N|G|E|T|H|L)/ containedin=dotString
syn match dotEscString /\v\\(n|l|r)/ containedin=dotString
" General keywords
syn keyword dotKeyword digraph node edge subgraph
syn keyword dotKeyword graph digraph subgraph node edge strict
" Graph attributes
syn keyword dotType center layers margin mclimit name nodesep nslimit
syn keyword dotType ordering page pagedir rank rankdir ranksep ratio
syn keyword dotType rotate size
" Node attributes
syn keyword dotType distortion fillcolor fontcolor fontname fontsize
syn keyword dotType height layer orientation peripheries regular
syn keyword dotType shape shapefile sides skew width
" Edge attributes
syn keyword dotType arrowhead arrowsize arrowtail constraint decorateP
syn keyword dotType dir headclip headlabel headport labelangle labeldistance
syn keyword dotType labelfontcolor labelfontname labelfontsize
syn keyword dotType minlen port_label_distance samehead sametail
syn keyword dotType tailclip taillabel tailport weight
" Shared attributes (graphs, nodes, edges)
syn keyword dotType color
" Shared attributes (graphs and edges)
syn keyword dotType bgcolor label URL
" Shared attributes (nodes and edges)
syn keyword dotType fontcolor fontname fontsize layer style
" Node, edge and graph attributes
syn keyword dotType _background area arrowhead arrowsize arrowtail bb bgcolor
\ center charset class clusterrank color colorscheme comment compound
\ concentrate constraint Damping decorate defaultdist dim dimen dir
\ diredgeconstraints distortion dpi edgehref edgetarget edgetooltip
\ edgeURL epsilon esep fillcolor fixedsize fontcolor fontname fontnames
\ fontpath fontsize forcelabels gradientangle group head_lp headclip
\ headhref headlabel headport headtarget headtooltip headURL height href
\ id image imagepath imagepos imagescale inputscale K label label_scheme
\ labelangle labeldistance labelfloat labelfontcolor labelfontname
\ labelfontsize labelhref labeljust labelloc labeltarget labeltooltip
\ labelURL landscape layer layerlistsep layers layerselect layersep
\ layout len levels levelsgap lhead lheight lp ltail lwidth margin
\ maxiter mclimit mindist minlen mode model mosek newrank nodesep
\ nojustify normalize notranslate nslimit nslimit1 ordering orientation
\ outputorder overlap overlap_scaling overlap_shrink pack packmode pad
\ page pagedir pencolor penwidth peripheries pin pos quadtree quantum
\ rank rankdir ranksep ratio rects regular remincross repulsiveforce
\ resolution root rotate rotation samehead sametail samplepoints scale
\ searchsize sep shape shapefile showboxes sides size skew smoothing
\ sortv splines start style stylesheet tail_lp tailclip tailhref
\ taillabel tailport tailtarget tailtooltip tailURL target tooltip
\ truecolor URL vertices viewport voro_margin weight width xdotversion
\ xlabel xlp z
" Special chars
syn match dotKeyChar "="
syn match dotKeyChar ";"
syn match dotKeyChar "->"
syn match dotKeyChar "--"
" Identifier
syn match dotIdentifier /\<\w\+\(:\w\+\)\?\>/
@ -71,27 +81,41 @@ syn sync minlines=50
syn sync maxlines=500
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_dot_syntax_inits")
if version < 508
let did_dot_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
hi def link dotParErr Error
hi def link dotBraceErr Error
hi def link dotBrackErr Error
HiLink dotParErr Error
HiLink dotBraceErr Error
HiLink dotBrackErr Error
hi def link dotComment Comment
hi def link dotTodo Todo
HiLink dotComment Comment
HiLink dotTodo Todo
hi def link dotParEncl Keyword
hi def link dotBrackEncl Keyword
hi def link dotBraceEncl Keyword
HiLink dotParEncl Keyword
HiLink dotBrackEncl Keyword
HiLink dotBraceEncl Keyword
hi def link dotKeyword Keyword
hi def link dotType Type
hi def link dotKeyChar Keyword
HiLink dotKeyword Keyword
HiLink dotType Type
HiLink dotKeyChar Keyword
hi def link dotString String
hi def link dotIdentifier Identifier
HiLink dotString String
HiLink dotEscString Keyword
HiLink dotIdentifier Identifier
delcommand HiLink
endif
let b:current_syntax = "dot"
let &cpo = s:keepcpo
unlet s:keepcpo
" vim: ts=8

View File

@ -1,6 +1,6 @@
" Vim syntax file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
" Version: (v103) 2020 October 07
" Version: (v104) 2021 April 06
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-syntax from Vim
" Credits:
@ -8,10 +8,10 @@
" 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é, Alexander Wagner, Roman Bertle, Charles Rendleman,
" Walter Dieudonne, Alexander Wagner, Roman Bertle, Charles Rendleman,
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
" Stefano Zaghi, Vishnu V. Krishnan, Judicaël Grasset, Takuma Yoshida,
" Eisuke Kawashima, and André Chalella.`
" Stefano Zaghi, Vishnu V. Krishnan, Judicael Grasset, Takuma Yoshida,
" Eisuke Kawashima, Andre Chalella, and Fritz Reese.
if exists("b:current_syntax")
finish
@ -360,8 +360,15 @@ syn cluster fortranCommentGroup contains=fortranTodo
if (b:fortran_fixed_source == 1)
if !exists("fortran_have_tabs")
"Flag items beyond column 72
syn match fortranSerialNumber excludenl "^.\{73,}$"lc=72
" Fixed format requires a textwidth of 72 for code,
" but some vendor extensions allow longer lines
if exists("fortran_extended_line_length")
syn match fortranSerialNumber excludenl "^.\{133,}$"lc=132
elseif exists("fortran_cardimage_line_length")
syn match fortranSerialNumber excludenl "^.\{81,}$"lc=80
else
syn match fortranSerialNumber excludenl "^.\{73,}$"lc=72
endif
"Flag left margin errors
syn match fortranLabelError "^.\{-,4}[^0-9 ]" contains=fortranTab
syn match fortranLabelError "^.\{4}\d\S"

View File

@ -1,7 +1,7 @@
" VIM syntax file
" Language: groff
" Maintainer: Alejandro López-Valencia <dradul@yahoo.com>
" URL: http://dradul.tripod.com/vim
" Maintainer: John Marshall <jmarshall@hey.com>
" Previous Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
" Last Change: 2003-05-08-12:41:13 GMT-5.
" This uses the nroff.vim syntax file.

View File

@ -2,9 +2,9 @@
" Language: Groovy
" Original Author: Alessio Pace <billy.corgan AT tiscali.it>
" Maintainer: Tobias Rapp <yahuxo+vim AT mailbox.org>
" Version: 0.1.17
" Version: 0.1.18
" URL: http://www.vim.org/scripts/script.php?script_id=945
" Last Change: 2020 May 26
" Last Change: 2021 Feb 03
" THE ORIGINAL AUTHOR'S NOTES:
"
@ -253,7 +253,8 @@ if exists("groovy_regex_strings")
endif
" syn region groovyELExpr start=+${+ end=+}+ keepend contained
syn match groovyELExpr /\${.\{-}}/ contained
syn match groovyELExpr /\$[a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE_][a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE0-9_.]*/ contained
" Fix: force use of the NFA regexp engine (2), see GitHub issue #7280
syn match groovyELExpr /\%#=2\$[a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE_][a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE0-9_.]*/ contained
hi def link groovyELExpr Identifier
" TODO: better matching. I am waiting to understand how it really works in groovy

View File

@ -1,10 +1,11 @@
" Vim syntax file
" Language: HTML
" Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
" Previous Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
" Repository: https://notabug.org/jorgesumle/vim-html-syntax
" Last Change: 2020 Mar 17
" Included patch from Florian Breisch to add the summary element
" Last Change: 2021 Mar 02
" Included patch #7900 to fix comments
" Included patch #7916 to fix a few more things
"
" Please check :help html.vim for some comments and a description of the options
@ -79,26 +80,16 @@ syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap
syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1
" aria attributes
syn match htmlArg contained "\<\(aria-activedescendant\|aria-atomic\)\>"
syn match htmlArg contained "\<\(aria-autocomplete\|aria-busy\|aria-checked\)\>"
syn match htmlArg contained "\<\(aria-colcount\|aria-colindex\|aria-colspan\)\>"
syn match htmlArg contained "\<\(aria-controls\|aria-current\)\>"
syn match htmlArg contained "\<\(aria-describedby\|aria-details\)\>"
syn match htmlArg contained "\<\(aria-disabled\|aria-dropeffect\)\>"
syn match htmlArg contained "\<\(aria-errormessage\|aria-expanded\)\>"
syn match htmlArg contained "\<\(aria-flowto\|aria-grabbed\|aria-haspopup\)\>"
syn match htmlArg contained "\<\(aria-hidden\|aria-invalid\)\>"
syn match htmlArg contained "\<\(aria-keyshortcuts\|aria-label\)\>"
syn match htmlArg contained "\<\(aria-labelledby\|aria-level\|aria-live\)\>"
syn match htmlArg contained "\<\(aria-modal\|aria-multiline\)\>"
syn match htmlArg contained "\<\(aria-multiselectable\|aria-orientation\)\>"
syn match htmlArg contained "\<\(aria-owns\|aria-placeholder\|aria-posinset\)\>"
syn match htmlArg contained "\<\(aria-pressed\|aria-readonly\|aria-relevant\)\>"
syn match htmlArg contained "\<\(aria-required\|aria-roledescription\)\>"
syn match htmlArg contained "\<\(aria-rowcount\|aria-rowindex\|aria-rowspan\)\>"
syn match htmlArg contained "\<\(aria-selected\|aria-setsize\|aria-sort\)\>"
syn match htmlArg contained "\<\(aria-valuemax\|aria-valuemin\)\>"
syn match htmlArg contained "\<\(aria-valuenow\|aria-valuetext\)\>"
exe 'syn match htmlArg contained "\<aria-\%(' . join([
\ 'activedescendant', 'atomic', 'autocomplete', 'busy', 'checked', 'colcount',
\ 'colindex', 'colspan', 'controls', 'current', 'describedby', 'details',
\ 'disabled', 'dropeffect', 'errormessage', 'expanded', 'flowto', 'grabbed',
\ 'haspopup', 'hidden', 'invalid', 'keyshortcuts', 'label', 'labelledby', 'level',
\ 'live', 'modal', 'multiline', 'multiselectable', 'orientation', 'owns',
\ 'placeholder', 'posinset', 'pressed', 'readonly', 'relevant', 'required',
\ 'roledescription', 'rowcount', 'rowindex', 'rowspan', 'selected', 'setsize',
\ 'sort', 'valuemax', 'valuemin', 'valuenow', 'valuetext'
\ ], '\|') . '\)\>"'
syn keyword htmlArg contained role
" Netscape extensions
@ -139,13 +130,19 @@ syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
" Comments (the real ones or the old netscape ones)
if exists("html_wrong_comments")
syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
else
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError,@Spell
syn match htmlCommentError contained "[^><!]"
syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc,@Spell
" The HTML 5.2 syntax 8.2.4.41: bogus comment is parser error; browser skips until next &gt
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentError keepend
" Idem 8.2.4.42,51: Comment starts with <!-- and ends with -->
" Idem 8.2.4.43,44: Except <!--> and <!---> are parser errors
" Idem 8.2.4.52: dash-dash-bang (--!>) is error ignored by parser, also closes comment
syn region htmlComment matchgroup=htmlComment start=+<!--\%(-\?>\)\@!+ end=+--!\?>+ contains=htmlCommentNested,@htmlPreProc,@Spell keepend
" Idem 8.2.4.49: nested comment is parser error, except <!--> is all right
syn match htmlCommentNested contained "<!-->\@!"
syn match htmlCommentError contained "[^><!]"
endif
syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+
syn region htmlComment start=+<!DOCTYPE+ end=+>+ keepend
" server-parsed commands
syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr
@ -266,7 +263,7 @@ hi def link htmlEndTag Identifier
hi def link htmlArg Type
hi def link htmlTagName htmlStatement
hi def link htmlSpecialTagName Exception
hi def link htmlValue String
hi def link htmlValue String
hi def link htmlSpecialChar Special
if !exists("html_no_rendering")
@ -310,13 +307,10 @@ hi def link htmlPreProc PreProc
hi def link htmlPreAttr String
hi def link htmlPreProcAttrName PreProc
hi def link htmlPreProcAttrError Error
hi def link htmlSpecial Special
hi def link htmlSpecialChar Special
hi def link htmlString String
hi def link htmlStatement Statement
hi def link htmlComment Comment
hi def link htmlCommentPart Comment
hi def link htmlValue String
hi def link htmlCommentNested htmlError
hi def link htmlCommentError htmlError
hi def link htmlTagError htmlError
hi def link htmlEvent javaScript

View File

@ -7,7 +7,7 @@
" (ss) repaired several quoting and grouping glitches
" (ss) fixed regex parsing issue with multiple qualifiers [gi]
" (ss) additional factoring of keywords, globals, and members
" Last Change: 2020 May 14
" Last Change: 2021 Mar 30
" 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke)
" 2018 Apr 14: adjusted javaScriptRegexpString (LongJohnCoder)
@ -41,6 +41,7 @@ syn region javaScriptEmbed start=+${+ end=+}+ contains=@javaScriptEmbed
syn match javaScriptSpecialCharacter "'\\.'"
syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
syn match javaScriptNumber "-\=\<\d\+\%(_\d\+\)*\>"
syn region javaScriptRegexpString start=+[,(=+]\s*/[^/*]+ms=e-1,me=e-1 skip=+\\\\\|\\/+ end=+/[gimuys]\{0,2\}\s*$+ end=+/[gimuys]\{0,2\}\s*[+;.,)\]}]+me=e-1 end=+/[gimuys]\{0,2\}\s\+\/+me=e-1 contains=@htmlPreproc,javaScriptComment oneline
syn keyword javaScriptConditional if else switch

View File

@ -1,11 +1,11 @@
" Vim syntax file
" Language: Haskell with literate comments, Bird style,
" TeX style and plain text surrounding
" Markdown style, TeX style and plain text surrounding
" \begin{code} \end{code} blocks
" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org>
" Original Author: Arthur van Leeuwen <arthurvl@cs.uu.nl>
" Last Change: 2010 Apr 11
" Version: 1.04
" Last Change: 2020 Feb 25
" Version: 1.05
"
" Thanks to Ian Lynagh for thoughtful comments on initial versions and
" for the inspiration for writing this in the first place.
@ -44,8 +44,8 @@ endif
" First off, see if we can inherit a user preference for lhs_markup
if !exists("b:lhs_markup")
if exists("lhs_markup")
if lhs_markup =~ '\<\%(tex\|none\)\>'
let b:lhs_markup = matchstr(lhs_markup,'\<\%(tex\|none\)\>')
if lhs_markup =~ '\<\%(tex\|md\|none\)\>'
let b:lhs_markup = matchstr(lhs_markup,'\<\%(tex\|md\|none\)\>')
else
echohl WarningMsg | echo "Unknown value of lhs_markup" | echohl None
let b:lhs_markup = "unknown"
@ -54,7 +54,7 @@ if !exists("b:lhs_markup")
let b:lhs_markup = "unknown"
endif
else
if b:lhs_markup !~ '\<\%(tex\|none\)\>'
if b:lhs_markup !~ '\<\%(tex\|md\|none\)\>'
let b:lhs_markup = "unknown"
endif
endif
@ -74,6 +74,8 @@ call cursor(1,1)
if b:lhs_markup == "unknown"
if search('\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0
let b:lhs_markup = "tex"
elseif search('```haskell','W') != 0
let b:lhs_markup = "md"
else
let b:lhs_markup = "plain"
endif
@ -86,6 +88,10 @@ if b:lhs_markup == "tex"
" Tex.vim removes "_" from 'iskeyword', but we need it for Haskell.
setlocal isk+=_
syntax cluster lhsTeXContainer contains=tex.*Zone,texAbstract
elseif b:lhs_markup == "md"
runtime! syntax/markdown.vim
unlet b:current_syntax
syntax cluster lhsTeXContainer contains=markdown.*
else
syntax cluster lhsTeXContainer contains=.*
endif
@ -96,9 +102,12 @@ syntax include @haskellTop syntax/haskell.vim
syntax region lhsHaskellBirdTrack start="^>" end="\%(^[^>]\)\@=" contains=@haskellTop,lhsBirdTrack containedin=@lhsTeXContainer
syntax region lhsHaskellBeginEndBlock start="^\\begin{code}\s*$" matchgroup=NONE end="\%(^\\end{code}.*$\)\@=" contains=@haskellTop,beginCodeBegin containedin=@lhsTeXContainer
syntax region lhsHaskellMDBlock start="^```haskell$" matchgroup=NONE end="^```$" keepend contains=@haskellTop,lhsMarkdownCode containedin=@lhsTeXContainer
syntax match lhsBirdTrack "^>" contained
syntax match lhsMarkdownCode "^\(```haskell\|^```\)$" contained
syntax match beginCodeBegin "^\\begin" nextgroup=beginCodeCode contained
syntax region beginCodeCode matchgroup=texDelimiter start="{" end="}"
@ -107,6 +116,8 @@ syntax region beginCodeCode matchgroup=texDelimiter start="{" end="}"
hi def link lhsBirdTrack Comment
hi def link lhsMarkdownCode Comment
hi def link beginCodeBegin texCmdName
hi def link beginCodeCode texSection

View File

@ -4,6 +4,7 @@
" Latest Revision: 2008-06-29
" Changes: 2008-06-29 support for RFC3339 tuimestamps James Vega
" 2016 Jan 19: messagesDate changed by Bram
" 2021 Jan 27: messagesHourRFC3339 changed from #946
if exists("b:current_syntax")
finish
@ -26,7 +27,7 @@ syn match messagesDateRFC3339 contained display '\d\{4}-\d\d-\d\d'
syn match messagesRFC3339T contained display '\cT'
\ nextgroup=messagesHourRFC3339
syn match messagesHourRFC3339 contained display '\c\d\d:\d\d:\d\d\(\.\d\+\)\=\([+-]\d\d:\d\d\|Z\)'
syn match messagesHourRFC3339 contained display '\c\d\d:\d\d:\d\d\(\.\d\+\)\=\([+-]\d\d:\d\d\|Z\)\s*'
\ nextgroup=messagesHost
syn match messagesHost contained display '\S*\s*'

View File

@ -3,7 +3,7 @@
" Maintainer: Andrii Sokolov <andriy145@gmail.com>
" Original Author: Manuel M.H. Stol <Manuel.Stol@allieddata.nl>
" Former Maintainer: Manuel M.H. Stol <Manuel.Stol@allieddata.nl>
" Contributors: Leonard König <leonard.r.koenig@gmail.com> (C string highlighting)
" Contributors: Leonard König <leonard.r.koenig@gmail.com> (C string highlighting), Peter Stanhope <dev.rptr@gmail.com> (Add missing 64-bit mode registers)
" Last Change: 2017 Jan 23
" NASM Home: http://www.nasm.us/
@ -240,7 +240,8 @@ syn cluster nasmGrpPreProcs contains=nasmMacroDef,@nasmGrpInMacros,@nasmGrpPreCo
syn match nasmGen08Register "\<[A-D][HL]\>"
syn match nasmGen16Register "\<\([A-D]X\|[DS]I\|[BS]P\)\>"
syn match nasmGen32Register "\<E\([A-D]X\|[DS]I\|[BS]P\)\>"
syn match nasmGen64Register "\<R\([A-D]X\|[DS]I\|[BS]P\|[89]\|1[0-5]\|[89][WD]\|1[0-5][WD]\)\>"
syn match nasmGen64Register "\<R\([A-D]X\|[DS]I\|[BS]P\|[89]\|1[0-5]\|[89][WDB]\|1[0-5][WDB]\)\>"
syn match nasmExtRegister "\<\([SB]PL\|[SD]IL\)\>"
syn match nasmSegRegister "\<[C-GS]S\>"
syn match nasmSpcRegister "\<E\=IP\>"
syn match nasmFpuRegister "\<ST\o\>"

View File

@ -1,16 +1,9 @@
" VIM syntax file
" Language: nroff/groff
" Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
" URL: http://vorbote.wordpress.com/
" Last Change: 2012 Feb 2
"
" {{{1 Acknowledgements
"
" ACKNOWLEDGEMENTS:
"
" 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.
" Maintainer: John Marshall <jmarshall@hey.com>
" Previous Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
" Previous Maintainer: Jérôme Plût <Jerome.Plut@ens.fr>
" Last Change: 2021 Mar 28
"
" {{{1 Todo
"
@ -31,6 +24,13 @@ endif
let s:cpo_save = &cpo
set cpo&vim
if exists("nroff_is_groff")
let b:nroff_is_groff = 1
endif
syn spell toplevel
syn case match
"
" {{{1 plugin settings...
"
@ -48,7 +48,7 @@ endif
"
setlocal paragraphs+=XP
"
" {{{2 Activate navigation to preporcessor sections.
" {{{2 Activate navigation to preprocessor sections.
"
if exists("b:preprocs_as_sections")
setlocal sections=EQTSPS[\ G1GS
@ -169,9 +169,9 @@ endif
" <jp />
syn region nroffEquation start=/^\.\s*EQ\>/ end=/^\.\s*EN\>/
syn region nroffTable start=/^\.\s*TS\>/ end=/^\.\s*TE\>/
syn region nroffTable start=/^\.\s*TS\>/ end=/^\.\s*TE\>/ contains=@Spell
syn region nroffPicture start=/^\.\s*PS\>/ end=/^\.\s*PE\>/
syn region nroffRefer start=/^\.\s*\[\>/ end=/^\.\s*\]\>/
syn region nroffRefer start=/^\.\s*\[\>/ end=/^\.\s*\]\>/ contains=@Spell
syn region nroffGrap start=/^\.\s*G1\>/ end=/^\.\s*G2\>/
syn region nroffGremlin start=/^\.\s*GS\>/ end=/^\.\s*GE|GF\>/
@ -179,11 +179,11 @@ syn region nroffGremlin start=/^\.\s*GS\>/ end=/^\.\s*GE|GF\>/
" ------------------------------------------------------------
syn region nroffIgnore start=/^[.']\s*ig/ end=/^['.]\s*\./
syn match nroffComment /\(^[.']\s*\)\=\\".*/ contains=nroffTodo
syn match nroffComment /^'''.*/ contains=nroffTodo
syn match nroffComment /\(^[.']\s*\)\=\\".*/ contains=nroffTodo,@Spell
syn match nroffComment /^'''.*/ contains=nroffTodo,@Spell
if exists("b:nroff_is_groff")
syn match nroffComment "\\#.*$" contains=nroffTodo
syn match nroffComment "\\#.*$" contains=nroffTodo,@Spell
endif
syn keyword nroffTodo TODO XXX FIXME contained
@ -198,7 +198,7 @@ syn keyword nroffTodo TODO XXX FIXME contained
"
hi def link nroffEscChar nroffSpecialChar
hi def link nroffEscCharAr nroffSpecialChar
hi def link nroffEscCharArg nroffSpecialChar
hi def link nroffSpecialChar SpecialChar
hi def link nroffSpace Delimiter
@ -211,7 +211,7 @@ hi def link nroffEscPar nroffEscape
hi def link nroffEscRegPar nroffEscape
hi def link nroffEscArg nroffEscape
hi def link nroffSize nroffEscape
hi def link nroffEscape Preproc
hi def link nroffEscape PreProc
hi def link nroffIgnore Comment
hi def link nroffComment Comment

151
runtime/syntax/poke.vim Normal file
View File

@ -0,0 +1,151 @@
" Copyright (C) 2021 Matthew T. Ihlenfield.
"
" This program is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
"
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program. If not, see <http://www.gnu.org/licenses/>.
"
" Vim syntax file
" Language: Poke
" Maintainer: Matt Ihlenfield <mtihlenfield@protonmail.com>
" Filenames: *.pk
" Latest Revision: 10 March 2021
if exists('b:current_syntax')
finish
endif
" Poke statement
syn keyword pokeStatement assert break continue return
syn keyword pokeStatement type unit fun method nextgroup=pokeFunction skipwhite
syn keyword pokeStatement var nextgroup=pokeVar skipWhite
" Identifiers
syn match pokeVar '\h\w*' display contained
" User defined functions
syn match pokeFunction '\h\w*' display contained
" Poke operators
syn keyword pokeOperator in sizeof as isa unmap
" Conditionals
syn keyword pokeConditional if else where
" Structures, unions, etc...
syn keyword pokeStructure struct union pinned
" Loops
syn keyword pokeRepeat while for
" Imports
syn keyword pokeLoad load
" Exceptions
syn keyword pokeException try catch until raise
" Exception types
syn keyword pokeExceptionType Exception E_generic E_out_of_bounds
syn keyword pokeExceptionType E_eof E_elem E_constraint
syn keyword pokeExceptionType E_conv E_map_bounds E_map
syn keyword pokeExceptionType E_div_by_zero E_no_ios E_no_return
syn keyword pokeExceptionType E_io E_io_flags E_assert E_overflow
" Exception codes
syn keyword pokeExceptionCode EC_generic EC_out_of_bounds
syn keyword pokeExceptionCode EC_eof EC_elem EC_constraint
syn keyword pokeExceptionCode EC_conv EC_map_bounds EC_map
syn keyword pokeExceptionCode EC_div_by_zero EC_no_ios EC_no_return
syn keyword pokeExceptionCode EC_io EC_io_flags EC_assert EC_overflow
" Poke builtin types
syn keyword pokeBuiltinType string void int uint bit nibble
syn keyword pokeBuiltinType byte char ushort short ulong long
syn keyword pokeBuiltinType uint8 uint16 uint32 uint64
syn keyword pokeBuiltinType off64 uoff64 offset
syn keyword pokeBuiltinType Comparator POSIX_Time32 POSIX_Time64
syn keyword pokeBuiltinType big little any
" Poke constants
syn keyword pokeConstant ENDIAN_LITTLE ENDIAN_BIG
syn keyword pokeConstant IOS_F_READ IOS_F_WRITE IOS_F_TRUNCATE IOS_F_CREATE
syn keyword pokeConstant IOS_M_RDONLY IOS_M_WRONLY IOS_M_RDWR
syn keyword pokeConstant load_path NULL OFFSET
" Poke std lib
syn keyword pokeBuiltinFunction print printf catos stoca atoi ltos reverse
syn keyword pokeBuiltinFunction ltrim rtrim strchr qsort crc32 alignto
syn keyword pokeBuiltinFunction open close flush get_ios set_ios iosize
syn keyword pokeBuiltinFunction rand get_endian set_endian strace exit
syn keyword pokeBuiltinFunction getenv
" Formats
" Special chars
syn match pokeSpecial "\\\([nt\\]\|\o\{1,3}\)" display contained
" Chars
syn match pokeChar "'[^']*'" contains=pokeSpecial
" Attributes
syn match pokeAttribute "\h\w*'\h\w"
" Strings
syn region pokeString skip=+\\\\\|\\"+ start=+"+ end=+"+ contains=pokeSpecial
" Integer literals
syn match pokeInteger "\<\d\+_*\d*\([LlHhBbNn]\=[Uu]\=\|[Uu]\=[LlHhBbNn]\=\)\>"
syn match pokeInteger "\<0[Xx]\x\+_*\x*\([LlHhBbNn]\=[Uu]\=\|[Uu]\=[LlHhBbNn]\=\)\>"
syn match pokeInteger "\<0[Oo]\o\+_*\o*\([LlHhBbNn]\=[Uu]\=\|[Uu]\=[LlHhBbNn]\=\)\>"
syn match pokeInteger "\<0[Bb][01]\+_*[01]*\([LlHhBbNn]\=[Uu]\=\|[Uu]\=[LlHhBbNn]\=\)\>"
" Units
syn keyword pokeBuiltinUnit b M B
syn keyword pokeBuiltinUnit Kb KB Mb MB Gb GB
syn keyword pokeBuiltinUnit Kib KiB Mib MiB Gib GiB
" Offsets
syn match pokeOffset "#\h\w*" contains=pokeBuiltinUnit
" Comments
syn keyword pokeCommentTodo TODO FIXME XXX TBD contained
syn match pokeLineComment "\/\/.*" contains=pokeCommentTodo,@Spell extend
syn region pokeComment start="/\*" end="\*/" contains=pokeCommentTodo,@Spell fold extend
" Allow folding of blocks
syn region pokeBlock start="{" end="}" transparent fold
" Highlight groups
hi def link pokeBuiltinFunction Function
hi def link pokeBuiltinType Type
hi def link pokeBuiltinUnit Keyword
hi def link pokeChar Character
hi def link pokeComment Comment
hi def link pokeCommentTodo Todo
hi def link pokeConditional Conditional
hi def link pokeConstant Constant
hi def link pokeException Exception
hi def link pokeExceptionCode Constant
hi def link pokeExceptionType Type
hi def link pokeFunction Function
hi def link pokeInteger Number
hi def link pokeLineComment Comment
hi def link pokeLoad Include
hi def link pokeOffset StorageClass
hi def link pokeOperator Operator
hi def link pokeSpecial SpecialChar
hi def link pokeStatement Statement
hi def link pokeString String
hi def link pokeStructure Structure
hi def link pokeRepeat Repeat
hi def link pokeVar Identifier
let b:current_syntax = 'poke'

182
runtime/syntax/ps1.vim Normal file
View File

@ -0,0 +1,182 @@
" Vim syntax file
" Language: Windows PowerShell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2020 Nov 24
"
" The following settings are available for tuning syntax highlighting:
" let ps1_nofold_blocks = 1
" let ps1_nofold_sig = 1
" let ps1_nofold_region = 1
if exists("b:current_syntax")
finish
endif
" Operators contain dashes
setlocal iskeyword+=-
" PowerShell doesn't care about case
syn case ignore
" Sync-ing method
syn sync minlines=100
" Certain tokens can't appear at the top level of the document
syn cluster ps1NotTop contains=@ps1Comment,ps1CDocParam,ps1FunctionDeclaration
" Comments and special comment words
syn keyword ps1CommentTodo TODO FIXME XXX TBD HACK NOTE contained
syn match ps1CDocParam /.*/ contained
syn match ps1CommentDoc /^\s*\zs\.\w\+\>/ nextgroup=ps1CDocParam contained
syn match ps1CommentDoc /#\s*\zs\.\w\+\>/ nextgroup=ps1CDocParam contained
syn match ps1Comment /#.*/ contains=ps1CommentTodo,ps1CommentDoc,@Spell
syn region ps1Comment start="<#" end="#>" contains=ps1CommentTodo,ps1CommentDoc,@Spell
" Language keywords and elements
syn keyword ps1Conditional if else elseif switch default
syn keyword ps1Repeat while for do until break continue foreach in
syn match ps1Repeat /\<foreach\>/ nextgroup=ps1Block skipwhite
syn match ps1Keyword /\<while\>/ nextgroup=ps1Block skipwhite
syn match ps1Keyword /\<where\>/ nextgroup=ps1Block skipwhite
syn keyword ps1Exception begin process end exit inlinescript parallel sequence
syn keyword ps1Keyword try catch finally throw
syn keyword ps1Keyword return filter in trap param data dynamicparam
syn keyword ps1Constant $true $false $null
syn match ps1Constant +\$?+
syn match ps1Constant +\$_+
syn match ps1Constant +\$\$+
syn match ps1Constant +\$^+
" Keywords reserved for future use
syn keyword ps1Keyword class define from using var
" Function declarations
syn keyword ps1Keyword function nextgroup=ps1Function skipwhite
syn keyword ps1Keyword filter nextgroup=ps1Function skipwhite
syn keyword ps1Keyword workflow nextgroup=ps1Function skipwhite
syn keyword ps1Keyword configuration nextgroup=ps1Function skipwhite
syn keyword ps1Keyword class nextgroup=ps1Function skipwhite
syn keyword ps1Keyword enum nextgroup=ps1Function skipwhite
" Function declarations and invocations
syn match ps1Cmdlet /\v(add|clear|close|copy|enter|exit|find|format|get|hide|join|lock|move|new|open|optimize|pop|push|redo|remove|rename|reset|search|select|Set|show|skip|split|step|switch|undo|unlock|watch)(-\w+)+/ contained
syn match ps1Cmdlet /\v(connect|disconnect|read|receive|send|write)(-\w+)+/ contained
syn match ps1Cmdlet /\v(backup|checkpoint|compare|compress|convert|convertfrom|convertto|dismount|edit|expand|export|group|import|initialize|limit|merge|mount|out|publish|restore|save|sync|unpublish|update)(-\w+)+/ contained
syn match ps1Cmdlet /\v(debug|measure|ping|repair|resolve|test|trace)(-\w+)+/ contained
syn match ps1Cmdlet /\v(approve|assert|build|complete|confirm|deny|deploy|disable|enable|install|invoke|register|request|restart|resume|start|stop|submit|suspend|uninstall|unregister|wait)(-\w+)+/ contained
syn match ps1Cmdlet /\v(block|grant|protect|revoke|unblock|unprotect)(-\w+)+/ contained
syn match ps1Cmdlet /\v(use)(-\w+)+/ contained
" Other functions
syn match ps1Function /\w\+\(-\w\+\)\+/ contains=ps1Cmdlet
" Type declarations
syn match ps1Type /\[[a-z_][a-z0-9_.,\[\]]\+\]/
" Variable references
syn match ps1ScopeModifier /\(global:\|local:\|private:\|script:\)/ contained
syn match ps1Variable /\$\w\+\(:\w\+\)\?/ contains=ps1ScopeModifier
syn match ps1Variable /\${\w\+\(:\?[[:alnum:]_()]\+\)\?}/ contains=ps1ScopeModifier
" Operators
syn keyword ps1Operator -eq -ne -ge -gt -lt -le -like -notlike -match -notmatch -replace -split -contains -notcontains
syn keyword ps1Operator -ieq -ine -ige -igt -ile -ilt -ilike -inotlike -imatch -inotmatch -ireplace -isplit -icontains -inotcontains
syn keyword ps1Operator -ceq -cne -cge -cgt -clt -cle -clike -cnotlike -cmatch -cnotmatch -creplace -csplit -ccontains -cnotcontains
syn keyword ps1Operator -in -notin
syn keyword ps1Operator -is -isnot -as -join
syn keyword ps1Operator -and -or -not -xor -band -bor -bnot -bxor
syn keyword ps1Operator -f
syn match ps1Operator /!/
syn match ps1Operator /=/
syn match ps1Operator /+=/
syn match ps1Operator /-=/
syn match ps1Operator /\*=/
syn match ps1Operator /\/=/
syn match ps1Operator /%=/
syn match ps1Operator /+/
syn match ps1Operator /-\(\s\|\d\|\.\|\$\|(\)\@=/
syn match ps1Operator /\*/
syn match ps1Operator /\//
syn match ps1Operator /|/
syn match ps1Operator /%/
syn match ps1Operator /&/
syn match ps1Operator /::/
syn match ps1Operator /,/
syn match ps1Operator /\(^\|\s\)\@<=\. \@=/
" Regular Strings
" These aren't precisely correct and could use some work
syn region ps1String start=/"/ skip=/`"/ end=/"/ contains=@ps1StringSpecial,@Spell
syn region ps1String start=/'/ skip=/''/ end=/'/
" Here-Strings
syn region ps1String start=/@"$/ end=/^"@/ contains=@ps1StringSpecial,@Spell
syn region ps1String start=/@'$/ end=/^'@/
" Interpolation
syn match ps1Escape /`./
syn region ps1Interpolation matchgroup=ps1InterpolationDelimiter start="$(" end=")" contained contains=ALLBUT,@ps1NotTop
syn region ps1NestedParentheses start="(" skip="\\\\\|\\)" matchgroup=ps1Interpolation end=")" transparent contained
syn cluster ps1StringSpecial contains=ps1Escape,ps1Interpolation,ps1Variable,ps1Boolean,ps1Constant,ps1BuiltIn,@Spell
" Numbers
syn match ps1Number "\(\<\|-\)\@<=\(0[xX]\x\+\|\d\+\)\([KMGTP][B]\)\=\(\>\|-\)\@="
syn match ps1Number "\(\(\<\|-\)\@<=\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[dD]\="
syn match ps1Number "\<\d\+[eE][-+]\=\d\+[dD]\=\>"
syn match ps1Number "\<\d\+\([eE][-+]\=\d\+\)\=[dD]\>"
" Constants
syn match ps1Boolean "$\%(true\|false\)\>"
syn match ps1Constant /\$null\>/
syn match ps1BuiltIn "$^\|$?\|$_\|$\$"
syn match ps1BuiltIn "$\%(args\|error\|foreach\|home\|input\)\>"
syn match ps1BuiltIn "$\%(match\(es\)\?\|myinvocation\|host\|lastexitcode\)\>"
syn match ps1BuiltIn "$\%(ofs\|shellid\|stacktrace\)\>"
" Named Switch
syn match ps1Label /\s-\w\+/
" Folding blocks
if !exists('g:ps1_nofold_blocks')
syn region ps1Block start=/{/ end=/}/ transparent fold
endif
if !exists('g:ps1_nofold_region')
syn region ps1Region start=/#region/ end=/#endregion/ transparent fold keepend extend
endif
if !exists('g:ps1_nofold_sig')
syn region ps1Signature start=/# SIG # Begin signature block/ end=/# SIG # End signature block/ transparent fold
endif
" Setup default color highlighting
hi def link ps1Number Number
hi def link ps1Block Block
hi def link ps1Region Region
hi def link ps1Exception Exception
hi def link ps1Constant Constant
hi def link ps1String String
hi def link ps1Escape SpecialChar
hi def link ps1InterpolationDelimiter Delimiter
hi def link ps1Conditional Conditional
hi def link ps1Cmdlet Function
hi def link ps1Function Identifier
hi def link ps1Variable Identifier
hi def link ps1Boolean Boolean
hi def link ps1Constant Constant
hi def link ps1BuiltIn StorageClass
hi def link ps1Type Type
hi def link ps1ScopeModifier StorageClass
hi def link ps1Comment Comment
hi def link ps1CommentTodo Todo
hi def link ps1CommentDoc Tag
hi def link ps1CDocParam Identifier
hi def link ps1Operator Operator
hi def link ps1Repeat Repeat
hi def link ps1RepeatAndCmdlet Repeat
hi def link ps1Keyword Keyword
hi def link ps1KeywordAndCmdlet Keyword
hi def link ps1Label Label
let b:current_syntax = "ps1"

51
runtime/syntax/ps1xml.vim Normal file
View File

@ -0,0 +1,51 @@
" Vim syntax file
" Language: Windows PowerShell
" URL: https://github.com/PProvost/vim-ps1
" Last Change: 2013 Jun 24
if exists("b:current_syntax")
finish
endif
let s:ps1xml_cpo_save = &cpo
set cpo&vim
doau syntax xml
unlet b:current_syntax
syn case ignore
syn include @ps1xmlScriptBlock <sfile>:p:h/ps1.vim
unlet b:current_syntax
syn region ps1xmlScriptBlock
\ matchgroup=xmlTag start="<Script>"
\ matchgroup=xmlEndTag end="</Script>"
\ fold
\ contains=@ps1xmlScriptBlock
\ keepend
syn region ps1xmlScriptBlock
\ matchgroup=xmlTag start="<ScriptBlock>"
\ matchgroup=xmlEndTag end="</ScriptBlock>"
\ fold
\ contains=@ps1xmlScriptBlock
\ keepend
syn region ps1xmlScriptBlock
\ matchgroup=xmlTag start="<GetScriptBlock>"
\ matchgroup=xmlEndTag end="</GetScriptBlock>"
\ fold
\ contains=@ps1xmlScriptBlock
\ keepend
syn region ps1xmlScriptBlock
\ matchgroup=xmlTag start="<SetScriptBlock>"
\ matchgroup=xmlEndTag end="</SetScriptBlock>"
\ fold
\ contains=@ps1xmlScriptBlock
\ keepend
syn cluster xmlRegionHook add=ps1xmlScriptBlock
let b:current_syntax = "ps1xml"
let &cpo = s:ps1xml_cpo_save
unlet s:ps1xml_cpo_save

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: Python
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
" Last Change: 2016 Oct 29
" Last Change: 2021 Feb 15
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
"
@ -71,30 +71,17 @@ endif
" Keep Python keywords in alphabetical order inside groups for easy
" comparison with the table in the 'Python Language Reference'
" https://docs.python.org/2/reference/lexical_analysis.html#keywords,
" https://docs.python.org/3/reference/lexical_analysis.html#keywords.
" https://docs.python.org/reference/lexical_analysis.html#keywords.
" Groups are in the order presented in NAMING CONVENTIONS in syntax.txt.
" Exceptions come last at the end of each group (class and def below).
"
" Keywords 'with' and 'as' are new in Python 2.6
" (use 'from __future__ import with_statement' in Python 2.5).
" The list can be checked using:
"
" Some compromises had to be made to support both Python 3 and 2.
" We include Python 3 features, but when a definition is duplicated,
" the last definition takes precedence.
"
" - 'False', 'None', and 'True' are keywords in Python 3 but they are
" built-ins in 2 and will be highlighted as built-ins below.
" - 'exec' is a built-in in Python 3 and will be highlighted as
" built-in below.
" - 'nonlocal' is a keyword in Python 3 and will be highlighted.
" - 'print' is a built-in in Python 3 and will be highlighted as
" built-in below (use 'from __future__ import print_function' in 2)
" - async and await were added in Python 3.5 and are soft keywords.
" python3 -c 'import keyword, pprint; pprint.pprint(keyword.kwlist, compact=True)'
"
syn keyword pythonStatement False None True
syn keyword pythonStatement as assert break continue del exec global
syn keyword pythonStatement lambda nonlocal pass print return with yield
syn keyword pythonStatement as assert break continue del global
syn keyword pythonStatement lambda nonlocal pass return with yield
syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite
syn keyword pythonConditional elif else if
syn keyword pythonRepeat for while
@ -103,7 +90,7 @@ syn keyword pythonException except finally raise try
syn keyword pythonInclude from import
syn keyword pythonAsync async await
" Decorators (new in Python 2.4)
" Decorators
" A dot must be allowed because of @MyClass.myfunc decorators.
syn match pythonDecorator "@" display contained
syn match pythonDecoratorName "@\s*\h\%(\w\|\.\)*" display contains=pythonDecorator
@ -168,8 +155,7 @@ syn match pythonEscape "\\$"
" - 08e0 or 08j are highlighted,
"
" and so on, as specified in the 'Python Language Reference'.
" https://docs.python.org/2/reference/lexical_analysis.html#numeric-literals
" https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals
" https://docs.python.org/reference/lexical_analysis.html#numeric-literals
if !exists("python_no_number_highlight")
" numbers (including longs and complex)
syn match pythonNumber "\<0[oO]\=\o\+[Ll]\=\>"
@ -186,37 +172,37 @@ endif
" Group the built-ins in the order in the 'Python Library Reference' for
" easier comparison.
" https://docs.python.org/2/library/constants.html
" https://docs.python.org/3/library/constants.html
" http://docs.python.org/2/library/functions.html
" http://docs.python.org/3/library/functions.html
" http://docs.python.org/2/library/functions.html#non-essential-built-in-functions
" http://docs.python.org/3/library/functions.html#non-essential-built-in-functions
" https://docs.python.org/library/constants.html
" http://docs.python.org/library/functions.html
" Python built-in functions are in alphabetical order.
"
" The list can be checked using:
"
" python3 -c 'import builtins, pprint; pprint.pprint(dir(builtins), compact=True)'
"
" The constants added by the `site` module are not listed below because they
" should not be used in programs, only in interactive interpreter.
" Similarly for some other attributes and functions `__`-enclosed from the
" output of the above command.
"
if !exists("python_no_builtin_highlight")
" built-in constants
" 'False', 'True', and 'None' are also reserved words in Python 3
syn keyword pythonBuiltin False True None
syn keyword pythonBuiltin NotImplemented Ellipsis __debug__
" constants added by the `site` module
syn keyword pythonBuiltin quit exit copyright credits license
" built-in functions
syn keyword pythonBuiltin abs all any bin bool bytearray callable chr
syn keyword pythonBuiltin classmethod compile complex delattr dict dir
syn keyword pythonBuiltin divmod enumerate eval filter float format
syn keyword pythonBuiltin frozenset getattr globals hasattr hash
syn keyword pythonBuiltin help hex id input int isinstance
syn keyword pythonBuiltin abs all any ascii bin bool breakpoint bytearray
syn keyword pythonBuiltin bytes callable chr classmethod compile complex
syn keyword pythonBuiltin delattr dict dir divmod enumerate eval exec
syn keyword pythonBuiltin filter float format frozenset getattr globals
syn keyword pythonBuiltin hasattr hash help hex id input int isinstance
syn keyword pythonBuiltin issubclass iter len list locals map max
syn keyword pythonBuiltin memoryview min next object oct open ord pow
syn keyword pythonBuiltin print property range repr reversed round set
syn keyword pythonBuiltin setattr slice sorted staticmethod str
syn keyword pythonBuiltin sum super tuple type vars zip __import__
" Python 2 only
syn keyword pythonBuiltin basestring cmp execfile file
syn keyword pythonBuiltin long raw_input reduce reload unichr
syn keyword pythonBuiltin unicode xrange
" Python 3 only
syn keyword pythonBuiltin ascii bytes exec
" non-essential built-in functions; Python 2 only
syn keyword pythonBuiltin apply buffer coerce intern
syn keyword pythonBuiltin setattr slice sorted staticmethod str sum super
syn keyword pythonBuiltin tuple type vars zip __import__
" avoid highlighting attributes as builtins
syn match pythonAttribute /\.\h\w*/hs=s+1
\ contains=ALLBUT,pythonBuiltin,pythonFunction,pythonAsync
@ -224,28 +210,27 @@ if !exists("python_no_builtin_highlight")
endif
" From the 'Python Library Reference' class hierarchy at the bottom.
" http://docs.python.org/2/library/exceptions.html
" http://docs.python.org/3/library/exceptions.html
" http://docs.python.org/library/exceptions.html
if !exists("python_no_exception_highlight")
" builtin base exceptions (used mostly as base classes for other exceptions)
syn keyword pythonExceptions BaseException Exception
syn keyword pythonExceptions ArithmeticError BufferError
syn keyword pythonExceptions LookupError
" builtin base exceptions removed in Python 3
syn keyword pythonExceptions EnvironmentError StandardError
syn keyword pythonExceptions ArithmeticError BufferError LookupError
" builtin exceptions (actually raised)
syn keyword pythonExceptions AssertionError AttributeError
syn keyword pythonExceptions EOFError FloatingPointError GeneratorExit
syn keyword pythonExceptions ImportError IndentationError
syn keyword pythonExceptions IndexError KeyError KeyboardInterrupt
syn keyword pythonExceptions MemoryError NameError NotImplementedError
syn keyword pythonExceptions OSError OverflowError ReferenceError
syn keyword pythonExceptions RuntimeError StopIteration SyntaxError
syn keyword pythonExceptions AssertionError AttributeError EOFError
syn keyword pythonExceptions FloatingPointError GeneratorExit ImportError
syn keyword pythonExceptions IndentationError IndexError KeyError
syn keyword pythonExceptions KeyboardInterrupt MemoryError
syn keyword pythonExceptions ModuleNotFoundError NameError
syn keyword pythonExceptions NotImplementedError OSError OverflowError
syn keyword pythonExceptions RecursionError ReferenceError RuntimeError
syn keyword pythonExceptions StopAsyncIteration StopIteration SyntaxError
syn keyword pythonExceptions SystemError SystemExit TabError TypeError
syn keyword pythonExceptions UnboundLocalError UnicodeError
syn keyword pythonExceptions UnicodeDecodeError UnicodeEncodeError
syn keyword pythonExceptions UnboundLocalError UnicodeDecodeError
syn keyword pythonExceptions UnicodeEncodeError UnicodeError
syn keyword pythonExceptions UnicodeTranslateError ValueError
syn keyword pythonExceptions ZeroDivisionError
" builtin exception aliases for OSError
syn keyword pythonExceptions EnvironmentError IOError WindowsError
" builtin OS exceptions in Python 3
syn keyword pythonExceptions BlockingIOError BrokenPipeError
syn keyword pythonExceptions ChildProcessError ConnectionAbortedError
@ -253,18 +238,13 @@ if !exists("python_no_exception_highlight")
syn keyword pythonExceptions ConnectionResetError FileExistsError
syn keyword pythonExceptions FileNotFoundError InterruptedError
syn keyword pythonExceptions IsADirectoryError NotADirectoryError
syn keyword pythonExceptions PermissionError ProcessLookupError
syn keyword pythonExceptions RecursionError StopAsyncIteration
syn keyword pythonExceptions TimeoutError
" builtin exceptions deprecated/removed in Python 3
syn keyword pythonExceptions IOError VMSError WindowsError
syn keyword pythonExceptions PermissionError ProcessLookupError TimeoutError
" builtin warnings
syn keyword pythonExceptions BytesWarning DeprecationWarning FutureWarning
syn keyword pythonExceptions ImportWarning PendingDeprecationWarning
syn keyword pythonExceptions RuntimeWarning SyntaxWarning UnicodeWarning
syn keyword pythonExceptions ResourceWarning RuntimeWarning
syn keyword pythonExceptions SyntaxWarning UnicodeWarning
syn keyword pythonExceptions UserWarning Warning
" builtin warnings in Python 3
syn keyword pythonExceptions ResourceWarning
endif
if exists("python_space_error_highlight")

View File

@ -1,14 +1,15 @@
" Vim syntax file
" Language: OpenSSH client configuration file (ssh_config)
" Author: David Necas (Yeti)
" Maintainer: Dominik Fischer <d dot f dot fischer at web dot de>
" Maintainer: Jakub Jelen <jakuje at gmail dot com>
" Previous Maintainer: Dominik Fischer <d dot f dot fischer at web dot de>
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
" Contributor: Karsten Hopp <karsten@redhat.com>
" Contributor: Dean, Adam Kenneth <adam.ken.dean@hpe.com>
" Last Change: 2020 Feb 12
" Last Change: 2021 Mar 29
" Added RemoteCommand from pull request #4809
" Included additional keywords from Martin.
" SSH Version: 7.4p1
" SSH Version: 8.5p1
"
" Setup
@ -174,6 +175,7 @@ syn keyword sshconfigKeyword HostKeyAlgorithms
syn keyword sshconfigKeyword HostKeyAlias
syn keyword sshconfigKeyword HostName
syn keyword sshconfigKeyword HostbasedAuthentication
syn keyword sshconfigKeyword HostbasedAcceptedAlgorithms
syn keyword sshconfigKeyword HostbasedKeyTypes
syn keyword sshconfigKeyword IPQoS
syn keyword sshconfigKeyword IdentitiesOnly
@ -185,9 +187,11 @@ syn keyword sshconfigKeyword IPQoS
syn keyword sshconfigKeyword KbdInteractiveAuthentication
syn keyword sshconfigKeyword KbdInteractiveDevices
syn keyword sshconfigKeyword KexAlgorithms
syn keyword sshconfigKeyword KnownHostsCommand
syn keyword sshconfigKeyword LocalCommand
syn keyword sshconfigKeyword LocalForward
syn keyword sshconfigKeyword LogLevel
syn keyword sshconfigKeyword LogVerbose
syn keyword sshconfigKeyword MACs
syn keyword sshconfigKeyword Match
syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost
@ -195,11 +199,13 @@ syn keyword sshconfigKeyword NumberOfPasswordPrompts
syn keyword sshconfigKeyword PKCS11Provider
syn keyword sshconfigKeyword PasswordAuthentication
syn keyword sshconfigKeyword PermitLocalCommand
syn keyword sshconfigKeyword PermitRemoteOpen
syn keyword sshconfigKeyword Port
syn keyword sshconfigKeyword PreferredAuthentications
syn keyword sshconfigKeyword ProxyCommand
syn keyword sshconfigKeyword ProxyJump
syn keyword sshconfigKeyword ProxyUseFDPass
syn keyword sshconfigKeyword PubkeyAcceptedAlgorithms
syn keyword sshconfigKeyword PubkeyAcceptedKeyTypes
syn keyword sshconfigKeyword PubkeyAuthentication
syn keyword sshconfigKeyword RekeyLimit

View File

@ -7,8 +7,8 @@
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
" Contributor: Karsten Hopp <karsten@redhat.com>
" Originally: 2009-07-09
" Last Change: 2020-10-20
" SSH Version: 8.4p1
" Last Change: 2021-03-29
" SSH Version: 8.5p1
"
" Setup
@ -195,6 +195,7 @@ syn keyword sshdconfigKeyword HostCertificate
syn keyword sshdconfigKeyword HostKey
syn keyword sshdconfigKeyword HostKeyAgent
syn keyword sshdconfigKeyword HostKeyAlgorithms
syn keyword sshdconfigKeyword HostbasedAcceptedAlgorithms
syn keyword sshdconfigKeyword HostbasedAcceptedKeyTypes
syn keyword sshdconfigKeyword HostbasedAuthentication
syn keyword sshdconfigKeyword HostbasedUsesNameFromPacketOnly
@ -213,6 +214,7 @@ syn keyword sshdconfigKeyword KexAlgorithms
syn keyword sshdconfigKeyword KeyRegenerationInterval
syn keyword sshdconfigKeyword ListenAddress
syn keyword sshdconfigKeyword LogLevel
syn keyword sshdconfigKeyword LogVerbose
syn keyword sshdconfigKeyword LoginGraceTime
syn keyword sshdconfigKeyword MACs
syn keyword sshdconfigKeyword Match
@ -220,6 +222,8 @@ syn keyword sshdconfigKeyword MaxAuthTries
syn keyword sshdconfigKeyword MaxSessions
syn keyword sshdconfigKeyword MaxStartups
syn keyword sshdconfigKeyword PasswordAuthentication
syn keyword sshdconfigKeyword PerSourceMaxStartups
syn keyword sshdconfigKeyword PerSourceNetBlockSize
syn keyword sshdconfigKeyword PermitBlacklistedKeys
syn keyword sshdconfigKeyword PermitEmptyPasswords
syn keyword sshdconfigKeyword PermitListen
@ -234,6 +238,7 @@ syn keyword sshdconfigKeyword Port
syn keyword sshdconfigKeyword PrintLastLog
syn keyword sshdconfigKeyword PrintMotd
syn keyword sshdconfigKeyword Protocol
syn keyword sshdconfigKeyword PubkeyAcceptedAlgorithms
syn keyword sshdconfigKeyword PubkeyAcceptedKeyTypes
syn keyword sshdconfigKeyword PubkeyAuthentication
syn keyword sshdconfigKeyword PubkeyAuthOptions

View File

@ -1,7 +1,8 @@
" Vim syntax file
" Language: sudoers(5) configuration files
" Maintainer: Eisuke Kawashima ( e.kawaschima+vim AT gmail.com )
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2018-08-18
" Latest Revision: 2021 Mar 15
" Recent Changes: Support for #include and #includedir.
" Added many new options (Samuel D. Leslie)
@ -26,7 +27,7 @@ syn cluster sudoersCmndSpecList contains=sudoersUserRunasBegin,sudoersPASS
syn keyword sudoersTodo contained TODO FIXME XXX NOTE
syn region sudoersComment display oneline start='#' end='$' contains=sudoersTodo
syn region sudoersInclude display oneline start='#\(include\|includedir\)' end='$'
syn region sudoersInclude display oneline start='[#@]\%(include\|includedir\)\>' end='$'
syn keyword sudoersAlias User_Alias Runas_Alias nextgroup=sudoersUserAlias skipwhite skipnl
syn keyword sudoersAlias Host_Alias nextgroup=sudoersHostAlias skipwhite skipnl
@ -201,7 +202,7 @@ syn keyword sudoersBooleanParameter contained skipwhite skipnl
\ shell_noargs
\ stay_setuid
\ sudoedit_checkdir
\ sudoedit_fellow
\ sudoedit_follow
\ syslog_pid
\ targetpw
\ tty_tickets

View File

@ -60,8 +60,8 @@ To built Vim on Ubuntu from scratch on a clean system using git:
% sudo apt install libxt-dev
% make reconfig
Add GUI support (ignore compiler warnings):
% sudo apt install libgtk2.0-dev
Add GUI support:
% sudo apt install libgtk-3-dev
% make reconfig
Add Python 3 support:
@ -134,8 +134,12 @@ These configure arguments can be used to select which GUI to use:
--disable-motif-check
--disable-athena-check
This configure argument can be used to disable the GUI, even when the necessary
files are found:
--disable-gui
--enable-gui defaults to "auto", so it will automatically look for a GUI (in
the order of GTK, Motif, then Athena). If one is found, then is uses it and
the order of GTK, Motif, then Athena). If one is found, then it is used and
does not proceed to check any of the remaining ones. Otherwise, it moves on
to the next one.

View File

@ -1489,6 +1489,16 @@ $(NEW_TESTS):
$(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) report
cd ..
# Run Vim9 tests.
# These do not depend on the executable, compile it when needed.
test_vim9:
cd testdir
-del test_vim9_*.res
$(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) nolog
$(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) $(TEST_VIM9_RES)
$(MAKE) /NOLOGO -f Make_dos.mak VIMPROG=..\$(VIMTESTTARGET) report
cd ..
###########################################################################
# Create a default rule for transforming .c files to .obj files in $(OUTDIR)

View File

@ -557,6 +557,8 @@ ex_args(exarg_T *eap)
if (eap->cmdidx != CMD_args)
{
if (check_arglist_locked() == FAIL)
return;
alist_unlink(ALIST(curwin));
if (eap->cmdidx == CMD_argglobal)
ALIST(curwin) = &global_alist;
@ -566,6 +568,8 @@ ex_args(exarg_T *eap)
if (*eap->arg != NUL)
{
if (check_arglist_locked() == FAIL)
return;
// ":args file ..": define new argument list, handle like ":next"
// Also for ":argslocal file .." and ":argsglobal file ..".
ex_next(eap);

57
src/auto/configure vendored
View File

@ -13918,6 +13918,35 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5
$as_echo_n "checking for sysinfo.uptime... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/sysinfo.h>
int
main ()
{
struct sysinfo sinfo;
long ut;
(void)sysinfo(&sinfo);
ut = sinfo.uptime;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
$as_echo_n "checking for sysconf... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@ -13943,6 +13972,30 @@ $as_echo "not usable" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _SC_SIGSTKSZ via sysconf()" >&5
$as_echo_n "checking for _SC_SIGSTKSZ via sysconf()... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <unistd.h>
int
main ()
{
(void)sysconf(_SC_SIGSTKSZ);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSCONF_SIGSTKSZ 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
$as_echo "not usable" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
@ -14853,8 +14906,8 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
if test "$gccmajor" -gt "3"; then
CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ *-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'`
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else

View File

@ -1336,7 +1336,7 @@ do_doautocmd(
void
ex_doautoall(exarg_T *eap)
{
int retval;
int retval = OK;
aco_save_T aco;
buf_T *buf;
bufref_T bufref;
@ -1353,7 +1353,8 @@ ex_doautoall(exarg_T *eap)
*/
FOR_ALL_BUFFERS(buf)
{
if (buf->b_ml.ml_mfp != NULL)
// Only do loaded buffers and skip the current buffer, it's done last.
if (buf->b_ml.ml_mfp != NULL && buf != curbuf)
{
// find a window for this buffer and save some values
aucmd_prepbuf(&aco, buf);
@ -1363,22 +1364,31 @@ ex_doautoall(exarg_T *eap)
retval = do_doautocmd(arg, FALSE, &did_aucmd);
if (call_do_modelines && did_aucmd)
{
// Execute the modeline settings, but don't set window-local
// options if we are using the current window for another
// buffer.
do_modelines(curwin == aucmd_win ? OPT_NOWIN : 0);
}
// restore the current window
aucmd_restbuf(&aco);
// stop if there is some error or buffer was deleted
if (retval == FAIL || !bufref_valid(&bufref))
{
retval = FAIL;
break;
}
}
}
// Execute autocommands for the current buffer last.
if (retval == OK)
{
do_doautocmd(arg, FALSE, &did_aucmd);
if (call_do_modelines && did_aucmd)
do_modelines(0);
}
check_cursor(); // just in case lines got deleted
}
@ -2106,14 +2116,16 @@ apply_autocmds_group(
ap->last = FALSE;
ap->last = TRUE;
// make sure cursor and topline are valid
check_lnums(TRUE);
if (nesting == 1)
// make sure cursor and topline are valid
check_lnums(TRUE);
do_cmdline(NULL, getnextac, (void *)&patcmd,
DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT);
// restore cursor and topline, unless they were changed
reset_lnums();
if (nesting == 1)
// restore cursor and topline, unless they were changed
reset_lnums();
#ifdef FEAT_EVAL
if (eap != NULL)
@ -2166,12 +2178,14 @@ apply_autocmds_group(
while (au_pending_free_buf != NULL)
{
buf_T *b = au_pending_free_buf->b_next;
vim_free(au_pending_free_buf);
au_pending_free_buf = b;
}
while (au_pending_free_win != NULL)
{
win_T *w = au_pending_free_win->w_next;
vim_free(au_pending_free_win);
au_pending_free_win = w;
}

View File

@ -595,6 +595,7 @@ close_buffer(
if (buf->b_nwindows == 1)
{
++buf->b_locked;
++buf->b_locked_split;
if (apply_autocmds(EVENT_BUFWINLEAVE, buf->b_fname, buf->b_fname,
FALSE, buf)
&& !bufref_valid(&bufref))
@ -605,6 +606,7 @@ aucmd_abort:
return FALSE;
}
--buf->b_locked;
--buf->b_locked_split;
if (abort_if_last && one_window())
// Autocommands made this the only window.
goto aucmd_abort;
@ -614,12 +616,14 @@ aucmd_abort:
if (!unload_buf)
{
++buf->b_locked;
++buf->b_locked_split;
if (apply_autocmds(EVENT_BUFHIDDEN, buf->b_fname, buf->b_fname,
FALSE, buf)
&& !bufref_valid(&bufref))
// Autocommands deleted the buffer.
goto aucmd_abort;
--buf->b_locked;
--buf->b_locked_split;
if (abort_if_last && one_window())
// Autocommands made this the only window.
goto aucmd_abort;
@ -800,6 +804,7 @@ buf_freeall(buf_T *buf, int flags)
// Make sure the buffer isn't closed by autocommands.
++buf->b_locked;
++buf->b_locked_split;
set_bufref(&bufref, buf);
if (buf->b_ml.ml_mfp != NULL)
{
@ -826,6 +831,7 @@ buf_freeall(buf_T *buf, int flags)
return;
}
--buf->b_locked;
--buf->b_locked_split;
// If the buffer was in curwin and the window has changed, go back to that
// window, if it still exists. This avoids that ":edit x" triggering a
@ -1718,8 +1724,8 @@ set_curbuf(buf_T *buf, int action)
set_bufref(&prevbufref, prevbuf);
set_bufref(&newbufref, buf);
// Autocommands may delete the current buffer and/or the buffer we want to go
// to. In those cases don't close the buffer.
// Autocommands may delete the current buffer and/or the buffer we want to
// go to. In those cases don't close the buffer.
if (!apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf)
|| (bufref_valid(&prevbufref)
&& bufref_valid(&newbufref)
@ -4151,9 +4157,6 @@ build_stl_str_hl(
if (fillchar == 0)
fillchar = ' ';
// Can't handle a multi-byte fill character yet.
else if (mb_char2len(fillchar) > 1)
fillchar = '-';
// The cursor in windows other than the current one isn't always
// up-to-date, esp. because of autocommands and timers.
@ -4329,7 +4332,7 @@ build_stl_str_hl(
// Fill up space left over by half a double-wide char.
while (++l < stl_items[stl_groupitem[groupdepth]].stl_minwid)
*p++ = fillchar;
MB_CHAR2BYTES(fillchar, p);
// correct the start of the items for the truncation
for (l = stl_groupitem[groupdepth] + 1; l < curitem; l++)
@ -4348,20 +4351,20 @@ build_stl_str_hl(
// fill by appending characters
n = 0 - n;
while (l++ < n && p + 1 < out + outlen)
*p++ = fillchar;
MB_CHAR2BYTES(fillchar, p);
}
else
{
// fill by inserting characters
mch_memmove(t + n - l, t, (size_t)(p - t));
l = n - l;
l = (n - l) * MB_CHAR2LEN(fillchar);
mch_memmove(t + l, t, (size_t)(p - t));
if (p + l >= out + outlen)
l = (long)((out + outlen) - p - 1);
p += l;
for (n = stl_groupitem[groupdepth] + 1; n < curitem; n++)
stl_items[n].stl_start += l;
for ( ; l > 0; l--)
*t++ = fillchar;
MB_CHAR2BYTES(fillchar, t);
}
}
continue;
@ -4543,7 +4546,7 @@ build_stl_str_hl(
case STL_VIRTCOL_ALT:
// In list mode virtcol needs to be recomputed
virtcol = wp->w_virtcol;
if (wp->w_p_list && lcs_tab1 == NUL)
if (wp->w_p_list && wp->w_lcs_chars.tab1 == NUL)
{
wp->w_p_list = FALSE;
getvcol(wp, &wp->w_cursor, NULL, &virtcol, NULL);
@ -4740,23 +4743,24 @@ build_stl_str_hl(
if (l + 1 == minwid && fillchar == '-' && VIM_ISDIGIT(*t))
*p++ = ' ';
else
*p++ = fillchar;
MB_CHAR2BYTES(fillchar, p);
}
minwid = 0;
}
else
minwid *= -1;
while (*t && p + 1 < out + outlen)
for (; *t && p + 1 < out + outlen; t++)
{
*p++ = *t++;
// Change a space by fillchar, unless fillchar is '-' and a
// digit follows.
if (fillable && p[-1] == ' '
&& (!VIM_ISDIGIT(*t) || fillchar != '-'))
p[-1] = fillchar;
if (fillable && *t == ' '
&& (!VIM_ISDIGIT(*(t + 1)) || fillchar != '-'))
MB_CHAR2BYTES(fillchar, p);
else
*p++ = *t;
}
for (; l < minwid && p + 1 < out + outlen; l++)
*p++ = fillchar;
MB_CHAR2BYTES(fillchar, p);
}
else if (num >= 0)
{
@ -4859,7 +4863,7 @@ build_stl_str_hl(
}
// Fill up for half a double-wide character.
while (++width < maxwidth)
*s++ = fillchar;
MB_CHAR2BYTES(fillchar, s);
}
else
s = out + maxwidth - 1;
@ -4891,7 +4895,7 @@ build_stl_str_hl(
while (++width < maxwidth)
{
s = s + STRLEN(s);
*s++ = fillchar;
MB_CHAR2BYTES(fillchar, s);
*s = NUL;
}
@ -4914,12 +4918,13 @@ build_stl_str_hl(
break;
if (l < itemcnt)
{
p = stl_items[l].stl_start + maxwidth - width;
int middlelength = (maxwidth - width) * MB_CHAR2LEN(fillchar);
p = stl_items[l].stl_start + middlelength;
STRMOVE(p, stl_items[l].stl_start);
for (s = stl_items[l].stl_start; s < p; s++)
*s = fillchar;
for (s = stl_items[l].stl_start; s < p;)
MB_CHAR2BYTES(fillchar, s);
for (l++; l < itemcnt; l++)
stl_items[l].stl_start += maxwidth - width;
stl_items[l].stl_start += middlelength;
width = maxwidth;
}
}

View File

@ -4883,6 +4883,11 @@ f_ch_logfile(typval_T *argvars, typval_T *rettv UNUSED)
// Don't open a file in restricted mode.
if (check_restricted() || check_secure())
return;
if (in_vim9script()
&& (check_for_string_arg(argvars, 0) == FAIL
|| check_for_string_arg(argvars, 1) == FAIL))
return;
fname = tv_get_string(&argvars[0]);
if (argvars[1].v_type == VAR_STRING)
opt = tv_get_string_buf(&argvars[1], buf);

View File

@ -753,7 +753,7 @@ vim_strnsize(char_u *s, int len)
#ifdef FEAT_VARTABS
# define RET_WIN_BUF_CHARTABSIZE(wp, buf, p, col) \
if (*(p) == TAB && (!(wp)->w_p_list || lcs_tab1)) \
if (*(p) == TAB && (!(wp)->w_p_list || wp->w_lcs_chars.tab1)) \
{ \
return tabstop_padding(col, (buf)->b_p_ts, (buf)->b_p_vts_array); \
} \
@ -761,7 +761,7 @@ vim_strnsize(char_u *s, int len)
return ptr2cells(p);
#else
# define RET_WIN_BUF_CHARTABSIZE(wp, buf, p, col) \
if (*(p) == TAB && (!(wp)->w_p_list || lcs_tab1)) \
if (*(p) == TAB && (!(wp)->w_p_list || wp->w_lcs_chars.tab1)) \
{ \
int ts; \
ts = (buf)->b_p_ts; \
@ -834,6 +834,16 @@ vim_isIDc(int c)
return (c > 0 && c < 0x100 && (g_chartab[c] & CT_ID_CHAR));
}
/*
* Like vim_isIDc() but not using the 'isident' option: letters, numbers and
* underscore.
*/
int
vim_isNormalIDc(int c)
{
return ASCII_ISALNUM(c) || c == '_';
}
/*
* return TRUE if 'c' is a keyword character: Letters and characters from
* 'iskeyword' option for the current buffer.
@ -1153,7 +1163,7 @@ win_nolbr_chartabsize(
{
int n;
if (*s == TAB && (!wp->w_p_list || lcs_tab1))
if (*s == TAB && (!wp->w_p_list || wp->w_lcs_chars.tab1))
{
# ifdef FEAT_VARTABS
return tabstop_padding(col, wp->w_buffer->b_p_ts,
@ -1248,7 +1258,7 @@ getvcol(
* use a simple loop.
* Also use this when 'list' is set but tabs take their normal size.
*/
if ((!wp->w_p_list || lcs_tab1 != NUL)
if ((!wp->w_p_list || wp->w_lcs_chars.tab1 != NUL)
#ifdef FEAT_LINEBREAK
&& !wp->w_p_lbr && *get_showbreak_value(wp) == NUL && !wp->w_p_bri
#endif
@ -2005,7 +2015,8 @@ hex2nr(int c)
return c - '0';
}
#if defined(FEAT_TERMRESPONSE) || defined(FEAT_GUI_GTK) || defined(PROTO)
#if defined(FEAT_TERMRESPONSE) || defined(FEAT_GUI_GTK) \
|| defined(PROTO) || defined(FEAT_AUTOSHELLDIR)
/*
* Convert two hex characters to a byte.
* Return -1 if one of the characters is not hex.

View File

@ -1020,8 +1020,9 @@ set_one_cmd_context(
p = cmd;
while (ASCII_ISALPHA(*p) || *p == '*') // Allow * wild card
++p;
// a user command may contain digits
if (ASCII_ISUPPER(cmd[0]))
// A user command may contain digits.
// Include "9" for "vim9*" commands; "vim9cmd" and "vim9script".
if (ASCII_ISUPPER(cmd[0]) || STRNCMP("vim9", cmd, 4) == 0)
while (ASCII_ISALNUM(*p) || *p == '*')
++p;
// for python 3.x: ":py3*" commands completion

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