Compare commits

..

333 Commits

Author SHA1 Message Date
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
3a0f092ac0 patch 8.2.2653: build failure
Problem:    Build failure.
Solution:   Add missing changes.
2021-03-25 22:22:30 +01:00
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
edba70703b patch 8.2.2599: build failure
Problem:    Build failure.
Solution:   Add missing change.
2021-03-13 21:14:18 +01:00
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
c8cdf0f80b Update runtime files. 2021-03-13 13:28:13 +01:00
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
9faec4e3d4 Update runtime files. 2021-02-27 16:38:07 +01:00
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
527ed38cfa patch 8.2.2526: build failure
Problem:    Build failure.
Solution:   Change lookup_scriptvar() arguments.
2021-02-17 15:05:45 +01:00
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
942db23c9c Update runtime files 2021-02-13 18:14:48 +01:00
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
a5a1ec1826 patch 8.2.2482: build error
Problem:    Build error.
Solution:   Add new error message.
2021-02-07 16:05:47 +01:00
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
7781ebe50f patch 8.2.2450: MS-Windows: ADS was not preserved if 'backupcopy' is "yes"
Problem:    MS-Windows: ADS was not preserved if 'backupcopy' is "yes".
Solution:   Copy ADS before truncating the file. (Ken Takata, closes #7762)
2021-02-01 20:35:01 +01:00
Bram Moolenaar
3b69006973 patch 8.2.2449: Vim9: flatten() always changes the list type
Problem:    Vim9: flatten() always changes the list type.
Solution:   Disallow using flatten() and add flattennew().
2021-02-01 20:14:51 +01:00
Bram Moolenaar
9d20daffc2 patch 8.2.2448: compilation error with Ruby 3.0
Problem:    Compilation error with Ruby 3.0.
Solution:   Adjust #ifdefs and declaration. (Ken Takata, closes #7761)
2021-02-01 19:31:47 +01:00
Bram Moolenaar
f9547eb6ef patch 8.2.2447: 'foldlevel' not applied to folds restored from session
Problem:    'foldlevel' not applied to folds restored from session.
Solution:   Set 'foldlevel' after creaiting the folds. (closes #7767)
2021-02-01 19:24:55 +01:00
Bram Moolenaar
5daa911626 patch 8.2.2446: setting 'term' empty has different error if compiled with GUI
Problem:    Setting 'term' empty has different error if compiled with GUI.
Solution:   Insert "else". (closes #7766)
2021-02-01 18:39:47 +01:00
Bram Moolenaar
0346b799fc patch 8.2.2445: Vim9: no proper error for lambda missing return type
Problem:    Vim9: no proper error for lambda missing return type.
Solution:   Check for this error. (closes #7758)
2021-01-31 22:18:29 +01:00
Bram Moolenaar
e507ff15d5 patch 8.2.2444: Vim9: compile error with combination of operator and list
Problem:    Vim9: compile error with combination of operator and list.
Solution:   Generate constants before parsing a list or dict. (closes #7757)
2021-01-31 21:47:42 +01:00
Bram Moolenaar
80ad3e2569 patch 8.2.2443: Vim9: no compile time error for wrong str2float argument
Problem:    Vim9: no compile time error for wrong str2float argument.
Solution:   Check argument type. (closes #7759)
2021-01-31 20:48:58 +01:00
Bram Moolenaar
f272ae12ac patch 8.2.2442: automatic GUI selection does not check for GTK 3
Problem:    Automatic GUI selection does not check for GTK 3.
Solution:   Make SKIP_GTK3 empty for automatic GUI support.  Set SKIP_GTK3 to
            YES when checking for GTK2.
2021-01-31 19:52:50 +01:00
Bram Moolenaar
c03f5c677a patch 8.2.2441: Vim9: extend() does not give an error for a type mismatch
Problem:    Vim9: extend() does not give an error for a type mismatch.
Solution:   Check the type of the second argument. (closes #7760)
2021-01-31 17:48:30 +01:00
Bram Moolenaar
853886722c patch 8.2.2440: documentation based on patches is outdated
Problem:    Documentation based on patches is outdated.
Solution:   Add changes to documentation in a patch.
2021-01-31 17:03:52 +01:00
Bram Moolenaar
3d2bb8b6f1 patch 8.2.2439: not easy to figure out what packages to get
Problem:    Not easy to figure out what packages to get when installing Vim on
            a new Ubuntu system.
Solution:   Mention explicit commands that are easy to follow.
2021-01-31 16:45:53 +01:00
Bram Moolenaar
6a12e3342d patch 8.2.2438: out of bounds compiler warning
Problem:    Out of bounds compiler warning.
Solution:   Increase the size of uf_name.
2021-01-31 14:46:00 +01:00
Bram Moolenaar
4d8479b335 patch 8.2.2437: deprecation warnings with default configuration
Problem:    Deprecation warnings with default configuration.
Solution:   Add -Wno-deprecated-declarations.
2021-01-31 14:36:06 +01:00
Bram Moolenaar
206c2a6e19 patch 8.2.2436: Vim9 script test is a bit flaky
Problem:    Vim9 script test is a bit flaky.
Solution:   Wait longer for exit callback.
2021-01-31 14:04:44 +01:00
Bram Moolenaar
3445320839 patch 8.2.2435: setline() gives an error for some types
Problem:    setline() gives an error for some types.
Solution:   Allow any type, convert each item to a string.
2021-01-31 13:08:38 +01:00
Bram Moolenaar
f2b26bcf8f patch 8.2.2434: Vim9: no error when compiling str2nr() with a number
Problem:    Vim9: no error when compiling str2nr() with a number.
Solution:   Add argument type checks. (closes #7759)
2021-01-30 23:05:11 +01:00
Bram Moolenaar
b63f3ca66d patch 8.2.2433: opening cmdline window gives error in BufLeave autocommand
Problem:    Opening cmdline window gives error in BufLeave autocommand.
Solution:   Reset cmdwin_type when triggering the autocommand.
2021-01-30 21:40:03 +01:00
Bram Moolenaar
76ab5446d5 patch 8.2.2432: libvterm tests are executed even when libtool doesn't work
Problem:    Libvterm tests are executed even when libtool doesn't work.
Solution:   Only run libvterm tests if /usr/bin/gcc exists.
2021-01-30 20:35:28 +01:00
Bram Moolenaar
ebd211c8a3 patch 8.2.2431: warning for -fno-strength-reduce with Clang 11
Problem:    Warning for -fno-strength-reduce with Clang 11.
Solution:   Adjust check for clang version number.
2021-01-30 19:33:36 +01:00
Bram Moolenaar
f8c6a17180 patch 8.2.2430: :vimgrep expands wildcards twice
Problem:    :vimgrep expands wildcards twice.
Solution:   Do not expand wildcards a second time.
2021-01-30 18:09:06 +01:00
Bram Moolenaar
59ff64079b patch 8.2.2429: :goto does not work correctly with text properties
Problem:    :goto does not work correctly with text properties. (Sam McCall)
Solution:   Add a test. (Andrew Radev)  Also use the text property size when
            computing the remaining offset. (closes #5930)
2021-01-30 17:16:28 +01:00
Bram Moolenaar
92e5df8047 patch 8.2.2428: FocusGained does not work when 'ttymouse' is empty
Problem:    FocusGained does not work when 'ttymouse' is empty.
Solution:   Don't use the short mouse code if there is a longer matching code.
            (closes #7755)  Add a test.
2021-01-30 15:39:47 +01:00
Bram Moolenaar
3eb6bd9c2b patch 8.2.2427: can still switch windows for 'completefunc'
Problem:    Can still switch windows for 'completefunc'.
Solution:   Also disallow switching windows for other completions.
2021-01-29 21:47:24 +01:00
Bram Moolenaar
28976e2acc patch 8.2.2426: allowing 'completefunc' to switch windows causes trouble
Problem:    Allowing 'completefunc' to switch windows causes trouble.
Solution:   use "textwinlock" instead of "textlock".
2021-01-29 21:07:07 +01:00
Bram Moolenaar
df2c2988bb patch 8.2.2425: cursor on invalid line with range and :substitute
Problem:    Cursor on invalid line with range and :substitute.
Solution:   Do not move the cursor when skipping commands. (closes #3434)
2021-01-28 20:18:08 +01:00
Bram Moolenaar
97202d9516 patch 8.2.2424: some tests are known to cause an error with ASAN
Problem:    Some tests are known to cause an error with ASAN.
Solution:   Add CheckNotAsan.
2021-01-28 18:34:35 +01:00
Bram Moolenaar
61015162ba patch 8.2.2423: missing error message
Problem:    Missing error message.
Solution:   Add the error message.
2021-01-28 17:56:09 +01:00
Bram Moolenaar
1d859e2421 patch 8.2.2422: crash when deleting with line number out of range
Problem:    Crash when deleting with line number out of range. (Houyunsong)
Solution:   Avoid using a negative line number.
2021-01-28 17:24:58 +01:00
Bram Moolenaar
5ed58c7b70 patch 8.2.2421: double free when using autocommand with "argdel"
Problem:    Double free when using autocommand with "argdel". (Houyunsong)
Solution:   Add the arglist_locked flag.
2021-01-28 14:24:55 +01:00
Bram Moolenaar
9a046fd08b patch 8.2.2420: too many problems with using all autocommand events
Problem:    Too many problems with using all autocommand events.
Solution:   Disallow defining an autocommand for all events.
2021-01-28 13:47:59 +01:00
Bram Moolenaar
d697ddea14 patch 8.2.2419: autocmd test was failing on MS-Windows with GUI
Problem:    Autocmd test was failing on MS-Windows with GUI.
Solution:   Remove stray feedkeys().
2021-01-28 12:08:35 +01:00
Bram Moolenaar
2e6cdb91e8 patch 8.2.2418: color not changed if ModeMsg highlight is set in InsertEnter
Problem:    Color not changed if ModeMsg highlight is set in InsertEnter
            autocmd event. (Paul Swanson)
Solution:   Call highlight_changed() after triggering InsertEnter.
            (closes #7751)
2021-01-28 11:07:44 +01:00
Bram Moolenaar
3e492c2d5f patch 8.2.2417: condition stack values may be used when not set
Problem:    Condition stack values may be used when not set.
Solution:   Clear cs_script_var_len and cs_block_id just in case they get used
            later. (issue #7733)
2021-01-27 21:37:13 +01:00
Bram Moolenaar
bed72df3e6 patch 8.2.2416: may get stuck in command line window state
Problem:    May get stuck in command line window state.
Solution:   Reset "cmdwin_type" when editing buffer fails.  Make arglist test
            pass on MS-Windows.
2021-01-27 20:34:29 +01:00
Bram Moolenaar
21829c5f2c patch 8.2.2415: no way to check for the cmdwin feature
Problem:    No way to check for the cmdwin feature, cmdline_hist is now always
            enabled.
Solution:   Add has('cmdwin') support. Skip arglist test on Windows
            temporarily.
2021-01-26 22:42:21 +01:00
Bram Moolenaar
b7e2670b6a patch 8.2.2414: using freed memory when closing the cmdline window
Problem:    Using freed memory when closing the cmdline window.
Solution:   Check the window is still valid.
2021-01-26 22:00:52 +01:00
Bram Moolenaar
bb4b93ed85 patch 8.2.2413: crash when using :all while using a cmdline window
Problem:    Crash when using :all while using a cmdline window. (Zdenek Dohnal)
Solution:   Disallow :all from the cmdline window.
2021-01-26 21:35:08 +01:00
Bram Moolenaar
ce0370d9e6 patch 8.2.2412: not all fields in "cstack" are initialized
Problem:    Not all fields in "cstack" are initialized which might cause a
            crash.
Solution:   Use CLEAR_FIELD().
2021-01-26 19:32:53 +01:00
Bram Moolenaar
98989a0014 patch 8.2.2411: profile test fails on MS-Windows
Problem:    Profile test fails on MS-Windows.
Solution:   Do the profiling in a separate Vim command.
2021-01-26 12:06:30 +01:00
Bram Moolenaar
ff0e57fe77 patch 8.2.2410: build failure without the +profiling feature
Problem:    Build failure without the +profiling feature.
Solution:   Add dummy argument to macro.
2021-01-25 23:02:38 +01:00
Bram Moolenaar
e0e3917554 Update runtime files. 2021-01-25 21:14:57 +01:00
Bram Moolenaar
e5ea346a07 patch 8.2.2409: Vim9: profiling only works for one function
Problem:    Vim9: profiling only works for one function.
Solution:   Select the right instructions when calling and returning.
            (closes #7743)
2021-01-25 21:01:48 +01:00
Bram Moolenaar
5c829bf229 patch 8.2.2408: MinGW: "--preprocessor" flag no longer supported
Problem:    MinGW: "--preprocessor" flag no longer supported.
Solution:   Remove the flag, use the defaults. (Christopher Wellons,
            closes #7741)
2021-01-25 19:18:02 +01:00
Bram Moolenaar
ab55f11d9b patch 8.2.2407: old jumplist code is never used
Problem:    Old jumplist code is never used.
Solution:   Delete the dead code. (Yegappan Lakshmanan, closes #7740)
2021-01-25 18:44:57 +01:00
Bram Moolenaar
c05fe07529 patch 8.2.2406: Vim9: profiled :def function leaks memory
Problem:    Vim9: profiled :def function leaks memory.
Solution:   Delete the profiled instructions.
2021-01-24 21:30:48 +01:00
Bram Moolenaar
4efd994829 patch 8.2.2405: Vim9: no need to allow white space before "(" for :def
Problem:    Vim9: no need to allow white space before "(" for :def.
Solution:   Give an error for stray white space. (issue #7734)
2021-01-24 21:14:20 +01:00
Bram Moolenaar
107e9cecf7 patch 8.2.2404: Vim9: profiling try/catch not correct
Problem:    Vim9: profiling try/catch not correct.
Solution:   Add profile instructions.  Fix that "entry" did not rethrow an
            excpetion.
2021-01-24 20:52:00 +01:00
Bram Moolenaar
ced68a0070 patch 8.2.2403: Vim9: profiling if/elseif/endif not correct
Problem:    Vim9: profiling if/elseif/endif not correct.
Solution:   Add profile instructions.  Fix that "elseif" was wrong.
2021-01-24 17:53:47 +01:00
Bram Moolenaar
8323cab31c patch 8.2.2402: some filetypes not detected
Problem:    Some filetypes not detected.
Solution:   Detect Ruby Signature and Puppet related files. (Doug Kearns)
2021-01-24 15:25:56 +01:00
Bram Moolenaar
f002a41d12 patch 8.2.2401: build fails without +profiling feature
Problem:    Build fails without +profiling feature.
Solution:   Add #ifdefs.
2021-01-24 13:34:18 +01:00
Bram Moolenaar
b204990346 patch 8.2.2400: Vim9: compiled functions are not profiled
Problem:    Vim9: compiled functions are not profiled.
Solution:   Add initial changes to profile compiled functions.  Fix that a
            script-local function was hard to debug.
2021-01-24 12:53:53 +01:00
Bram Moolenaar
7cf0c114d6 patch 8.2.2399: fold test fails in wide terminal
Problem:    Fold test fails in wide terminal.
Solution:   Adjust the test. (Dominique Pelle, closes #7731, closes #7739)
2021-01-24 12:00:01 +01:00
Bram Moolenaar
40be52ba71 patch 8.2.2398: method test fails
Problem:    Method test fails.
Solution:   Adjust test for allowed white space.
2021-01-23 15:27:09 +01:00
Bram Moolenaar
dfbc5fd879 patch 8.2.2397: Vim9: "%%" not seen as alternate file name for ":bdel"
Problem:    Vim9: "%%" not seen as alternate file name for commands with a
            buffer name argument.
Solution:   Recognize "%%" like "#". (closes #7732)
2021-01-23 15:15:01 +01:00
Bram Moolenaar
7cebe8ba7d patch 8.2.2396: Vim9: no white space allowed before "->"
Problem:    Vim9: no white space allowed before "->".
Solution:   Allow for white space. (closes #7725)
2021-01-23 14:22:16 +01:00
Bram Moolenaar
9a562c184d patch 8.2.2395: Vim9: error for wrong type may report wrong line number
Problem:    Vim9: error for wrong type may report wrong line number.
Solution:   Save and restore the line number when evaluating the expression.
            (closes #7727)
2021-01-23 13:39:14 +01:00
Bram Moolenaar
9ae3705b6e patch 8.2.2394: Vim9: min() and max() return type is "any"
Problem:    Vim9: min() and max() return type is "any".
Solution:   Use return type "number". (closes #7728)
2021-01-22 22:31:10 +01:00
Bram Moolenaar
4bce26bb70 patch 8.2.2393: Vim9: error message when script line starts with "[{"
Problem:    Vim9: error message when script line starts with "[{".
Solution:   Do not give an error for checking for end of list.
2021-01-22 22:06:56 +01:00
Bram Moolenaar
402115f1c2 patch 8.2.2392: fennel filetype not recognized
Problem:    Fennel filetype not recognized.
Solution:   Detect with pattern and hashbang. (Chinmay Dalal, closes #7729)
2021-01-22 20:55:04 +01:00
Bram Moolenaar
0d3de8cb59 patch 8.2.2391: memory leak when creating a global function with closure
Problem:    Memory leak when creating a global function with closure.
Solution:   Create a separate partial for every instantiated function.
2021-01-22 20:46:27 +01:00
Bram Moolenaar
b3005ce191 patch 8.2.2390: Vim9: using positive offset is unexpected
Problem:    Vim9: using positive offset is unexpected.
Solution:   Use int8_T instead of char. (James McCoy)
2021-01-22 17:51:06 +01:00
Bram Moolenaar
9b6344613e patch 8.2.2389: test failure on a few systems
Problem:    Test failure on a few systems.
Solution:   Avoid that "char" value is negative.
2021-01-21 22:53:38 +01:00
Bram Moolenaar
57d5a01cb4 patch 8.2.2388: no easy way to get the maximum or mininum number value
Problem:    No easy way to get the maximum or mininum number value.
Solution:   Add v:numbermax and v:numbermin.
2021-01-21 21:42:31 +01:00
Bram Moolenaar
e32e516dfa patch 8.2.2387: runtime type check does not mention argument index
Problem:    Runtime type check does not mention argument index.
Solution:   Add ct_arg_idx. (closes #7720)
2021-01-21 20:21:29 +01:00
Bram Moolenaar
f904133e1a patch 8.2.2386: Vim9: crash when using ":silent! put"
Problem:    Vim9: crash when using ":silent! put".
Solution:   When ignoring an error for ":silent!" rewind the stack and skip
            ahead to restoring the cmdmod. (closes #7717)
2021-01-21 19:41:16 +01:00
Bram Moolenaar
e71996bd08 patch 8.2.2385: "gj" and "gk" do not work correctly when inside a fold
Problem:    "gj" and "gk" do not work correctly when inside a fold.
Solution:   Move check for folding. (closes #7724, closes #4095)
2021-01-21 17:03:07 +01:00
Bram Moolenaar
5e6a7aa2b2 patch 8.2.2384: turtle filetype not recognized
Problem:    Turtle filetype not recognized.
Solution:   Add a rule to detect turtle files. (closes #7722)
2021-01-21 14:45:13 +01:00
Bram Moolenaar
ccb47a2899 patch 8.2.2383: focus escape sequences are not named
Problem:    Focus escape sequences are not named in ":set termcap" output.
Solution:   Add the names to the list. (closes #7718)
2021-01-21 13:36:43 +01:00
Bram Moolenaar
b1f2857096 patch 8.2.2382: build failure
Problem:    Build failure.
Solution:   Add missing changes.
2021-01-21 13:03:20 +01:00
Bram Moolenaar
c5f59fab23 patch 8.2.2381: Vim9: divide by zero does not abort expression execution
Problem:    Vim9: divide by zero does not abort expression execution.
Solution:   Use a "failed" flag. (issue #7704)
2021-01-21 12:34:14 +01:00
Bram Moolenaar
a0f7f73ebb patch 8.2.2380: Vim9: occasional crash when using try/catch and a timer
Problem:    Vim9: occasional crash when using try/catch and a timer.
Solution:   Save and restore "need_rethrow" when invoking a timer callback.
            (closes #7708)
2021-01-20 22:22:49 +01:00
Bram Moolenaar
77a849c4b3 patch 8.2.2379: do spell suggestions twice if 'spellsuggest' contains number
Problem:    Finding spell suggestions twice if 'spellsuggest' contains number.
Solution:   Only do internal suggestions once.  (closes #7713)
2021-01-20 21:42:33 +01:00
Bram Moolenaar
99880f96cf patch 8.2.2378: Vim9: no error message for dividing by zero
Problem:    Vim9: no error message for dividing by zero.
Solution:   Give an error message. (issue #7704)
2021-01-20 21:23:14 +01:00
Bram Moolenaar
a28639e711 patch 8.2.2377: Vim9: crash when using a range after another expression
Problem:    Vim9: crash when using a range after another expression.
Solution:   Set the variable type to number. Fix using :put with a range and
            the "=" register. (closes #7706)
2021-01-19 22:48:09 +01:00
Bram Moolenaar
e64f83cc6a patch 8.2.2376: Vim9: crash when dividing by zero in compiled code
Problem:    Vim9: crash when dividing by zero in compiled code using
            constants.
Solution:   Call num_divide() and num_modulus(). (closes #7704)
2021-01-19 22:16:41 +01:00
Bram Moolenaar
09fbedc8dc patch 8.2.2375: test for RGB color skipped in the terminal
Problem:    Test for RGB color skipped in the terminal.
Solution:   Run the GUI if possible.
2021-01-19 17:22:58 +01:00
Bram Moolenaar
98a29d00a4 Update runtime files. 2021-01-18 19:55:44 +01:00
Bram Moolenaar
82aa6e09e0 patch 8.2.2374: accessing uninitialized memory in test_undo
Problem:    Accessing uninitialized memory in test_undo.
Solution:   Do not look in typebuf.tb_buf if it is empty. (Dominique Pellé,
            closes #7697)
2021-01-17 22:04:02 +01:00
Bram Moolenaar
f30a14db3b patch 8.2.2373: Vim9: list assignment only accepts a number index
Problem:    Vim9: list assignment only accepts a number index.
Solution:   Accept "any" and do a runtime type check. (closes #7694)
2021-01-17 21:51:24 +01:00
Bram Moolenaar
585587dadb patch 8.2.2372: confusing error message for wrong :let command
Problem:    Confusing error message for wrong :let command.
Solution:   Only check for type in Vim9 script.
2021-01-17 20:52:13 +01:00
Bram Moolenaar
036d07144e patch 8.2.2371: Vim9: crash when using types in :for with unpack
Problem:    Vim9: crash when using types in :for with unpack.
Solution:   Check for skip_var_list() failing. Pass include_type to
            skip_var_one(). Skip type when compiling. (closes #7694)
2021-01-17 20:23:38 +01:00
Bram Moolenaar
1430ceeb2d patch 8.2.2370: Vim9: command fails in catch block
Problem:    Vim9: command fails in catch block.
Solution:   Reset force_abort and need_rethrow. (closes #7692)
2021-01-17 19:20:32 +01:00
Bram Moolenaar
3af15ab788 patch 8.2.2369: Vim9: functions return true/false but can't be used as bool
Problem:    Vim9: functions return true/false but can't be used as bool.
Solution:   Add ret_number_bool(). (closes #7693)
2021-01-17 16:16:23 +01:00
Bram Moolenaar
85773bf32b patch 8.2.2368: insufficient tests for setting options
Problem:    Insufficient tests for setting options.
Solution:   Add a few tests. (Dominique Pellé, closes #7695)
2021-01-17 13:48:03 +01:00
Bram Moolenaar
239f8d9326 patch 8.2.2367: test failures on some less often used systems
Problem:    Test failures on some less often used systems.
Solution:   Adjust printf formats and types. (James McCoy, closes #7691)
2021-01-17 13:21:20 +01:00
Bram Moolenaar
e2edc2ed4a patch 8.2.2366: when using ":sleep" the cursor is always displayed
Problem:    When using ":sleep" the cursor is always displayed.
Solution:   Do not display the cursor when using ":sleep!". (Jeremy Lerner,
            closes #7688)
2021-01-16 20:21:23 +01:00
Bram Moolenaar
70250fb4d2 patch 8.2.2365: Vim9: no check for map() changing item type at script level
Problem:    Vim9: no check for map() changing item type at script level.
Solution:   Check the new value type.
2021-01-16 19:01:53 +01:00
Bram Moolenaar
f898f7c68d patch 8.2.2364: Vim9: line break in lambda accesses freed memory
Problem:    Vim9: line break in lambda accesses freed memory.
Solution:   Make a copy of the return type. (closes #7664)
2021-01-16 18:09:52 +01:00
Bram Moolenaar
9ebcf231bd patch 8.2.2363: curpos() does not accept a string argument as before
Problem:    curpos() does not accept a string argument as before.
solution:   Make a string argument work again. (Yegappan Lakshmanan,
            closes #7690
2021-01-16 16:52:49 +01:00
Bram Moolenaar
351ead09dd patch 8.2.2362: Vim9: check of builtin function argument type is incomplete
Problem:    Vim9: check of builtin function argument type is incomplete.
Solution:   Use need_type() instead of check_arg_type().
2021-01-16 16:07:01 +01:00
Bram Moolenaar
7c886db915 patch 8.2.2361: Vim9: no highlight for "s///gc" when using 'opfunc'
Problem:    Vim9: no highlight for "s///gc" when using 'opfunc'.
Solution:   Reset 'lazyredraw' temporarily. (closes #7687)
2021-01-16 14:34:45 +01:00
Bram Moolenaar
a3b494d6af patch 8.2.2360: test leaves file behind
Problem:    Test leaves file behind.
Solution:   Delete the right file. (Dominique Pellé, closes #7689)
2021-01-16 13:43:31 +01:00
Bram Moolenaar
e2924328c1 patch 8.2.2359: strange test failure with MS-Windows
Problem:    Strange test failure with MS-Windows.
Solution:   Skip the system() call for now.
2021-01-16 13:11:42 +01:00
Bram Moolenaar
bf78974ca4 patch 8.2.2358: wrong #ifdef for use_xterm_like_mouse()
Problem:    Wrong #ifdef for use_xterm_like_mouse().
Solution:   Use FEAT_MOUSE_XTERM.
2021-01-16 11:21:40 +01:00
Bram Moolenaar
648ea76e1d patch 8.2.2357: Vim9: crash when parsing function return type fails
Problem:    Vim9: crash when parsing function return type fails.
Solution:   Bail out and set return type to "unknown". (closes #7685)
2021-01-15 19:04:32 +01:00
Bram Moolenaar
883cf97f10 patch 8.2.2356: Vim9: ":put =expr" does not handle a list properly
Problem:    Vim9: ":put =expr" does not handle a list properly.
Solution:   Use the same logic as eval_to_string_eap(). (closes #7684)
2021-01-15 18:04:43 +01:00
Bram Moolenaar
97c6943e11 patch 8.2.2355: stray test failure on Appveyor
Problem:    Stray test failure on Appveyor.
Solution:   Finish insert command.
2021-01-15 16:45:21 +01:00
Bram Moolenaar
797e63b9f2 patch 8.2.2354: crash with a weird combination of autocommands
Problem:    Crash with a weird combination of autocommands.
Solution:   Increment b_nwindows when needed. (closes #7674)
2021-01-15 16:22:52 +01:00
Bram Moolenaar
17d015b243 patch 8.2.2353: spartql files are not detected
Problem:    Spartql files are not detected.
Solution:   Add the sparql filetype.  (closes #7679)
2021-01-15 13:35:30 +01:00
Bram Moolenaar
d44cc593ce patch 8.2.2352: if focus lost/gained is received twice code is not ignored
Problem:    If the focus lost/gained escape sequence is received twice it is
            not ignored. (Christ van Willigen)
Solution:   Adjust the logic to ignore the escape code.
2021-01-14 21:57:58 +01:00
Bram Moolenaar
8f81b22e86 patch 8.2.2351: Vim9: error msg for "throw" in function called with "silent!"
Problem:    Vim9: error message for "throw" in function that was called with
            "silent!".
Solution:   Do not throw the exception when not caught or displayed.
            (closes #7672)
2021-01-14 21:47:06 +01:00
Bram Moolenaar
033135eb8e patch 8.2.2350: using "void" for no reason
Problem:    Using "void" for no reason.
Solution:   Use "char *".
2021-01-14 21:40:22 +01:00
Bram Moolenaar
2415669348 patch 8.2.2349: Vim9: cannot handle line break after parenthesis at line end
Problem:    Vim9: cannot handle line break after parenthesis at line end.
Solution:   Skip over line break. (closes #7677)
2021-01-14 20:35:49 +01:00
Bram Moolenaar
fadd55bd63 patch 8.2.2348: no check for modified files after focus gained
Problem:    No check for modified files after focus gained. (Mathias Stearn)
Solution:   Call ui_focus_change().
2021-01-14 19:19:18 +01:00
Bram Moolenaar
e1ee58ac78 patch 8.2.2347: build failure without GUI
Problem:    Build failure without GUI.
Solution:   Add #ifdef.
2021-01-14 19:04:44 +01:00
Bram Moolenaar
845b72854d patch 8.2.2346: Codecov reports every little coverage drop
Problem:    Codecov reports every little coverage drop.
Solution:   Tolerate a 0.05% drop. Hide the appveyor config file. (Ozaki
            Kiichi, closes #7678)
2021-01-14 17:55:59 +01:00
Bram Moolenaar
681fc3fa78 patch 8.2.2345: no focus events in a terminal
Problem:    No focus events in a terminal.
Solution:   Add the t_fd and t_fe termcap entries and implement detecting
            focus events. (Hayaki Saito, Magnus Groß, closes #7673,
            closes #609, closes #5526)
2021-01-14 17:35:21 +01:00
Bram Moolenaar
6601b62943 patch 8.2.2344: using inclusive index for slice is not always desired
Problem:    Using inclusive index for slice is not always desired.
Solution:   Add the slice() method, which has an exclusive index. (closes
            #7408)
2021-01-13 21:47:15 +01:00
Bram Moolenaar
c423ad77ed patch 8.2.2343: Vim9: return type of readfile() is any
Problem:    Vim9: return type of readfile() is any.
Solution:   Add readblob() so that readfile() can be expected to always
            return a list of strings. (closes #7671)
2021-01-13 20:38:03 +01:00
Bram Moolenaar
9145846b6a patch 8.2.2342: "char" functions may return wrong column in Insert mode
Problem:    "char" functions return the wront column in Insert mode when the
            cursor is beyond the end of the line.
Solution:   Compute the column correctly. (Yegappan Lakshmanan, closes #7669)
2021-01-13 20:08:38 +01:00
Bram Moolenaar
1bb4de5302 patch 8.2.2341: expresison command line completion incomplete after "g:"
Problem:    Expresison command line completion shows variables but not
            functions after "g:". (Gary Johnson)
Solution:   Prefix "g:" when needed to a global function.
2021-01-13 19:48:46 +01:00
Bram Moolenaar
37487e16da patch 8.2.2340: win_execute() unexpectedly returns number zero when failing
Problem:    win_execute() unexpectedly returns number zero when failing.
Solution:   Return an empty string. (closes #7665)
2021-01-12 22:08:53 +01:00
Bram Moolenaar
a47e05f04a patch 8.2.2339: cannot get the type of a value as a string
Problem:    Cannot get the type of a value as a string.
Solution:   Add typename().
2021-01-12 21:49:00 +01:00
Bram Moolenaar
64ed4d4398 patch 8.2.2338: Vim9: no error if using job_info() result wrongly
Problem:    Vim9: no error if using job_info() result wrongly.
Solution:   Adjust return type on number of arguments. (closes #7667)
2021-01-12 21:22:31 +01:00
Bram Moolenaar
67876de7bb patch 8.2.2337: configure test for GTK only says "no"
Problem:    Configure test for GTK only says "no". (Harm te Hennepe)
Solution:   Hint that a -def package is needed. (closes #5229)
2021-01-12 20:51:24 +01:00
Bram Moolenaar
b0e6b51364 patch 8.2.2336: Vim9: not possible to extend dictionary with different type
Problem:    Vim9: it is not possible to extend a dictionary with different
            item types.
Solution:   Add extendnew(). (closes #7666)
2021-01-12 20:23:40 +01:00
Bram Moolenaar
7cd24227c0 patch 8.2.2335: Vim9: "silent return" does not restore command modifiers
Problem:    Vim9: "silent return" does not restore command modifiers.
Solution:   Resture command modifiers before returning. (closes #7649)
2021-01-12 18:58:39 +01:00
Bram Moolenaar
a0122dcd1c patch 8.2.2334: Pascal-like filetypes not always detected
Problem:    Pascal-like filetypes not always detected.
Solution:   Improved Puppet, InstantFPC and Pascal detection. (Doug Kearns,
            closes #7662)
2021-01-12 17:42:24 +01:00
Bram Moolenaar
cb6cbf29e9 patch 8.2.2333: Vim9: warning for uninitialized variable
Problem:    Vim9: warning for uninitialized variable. (Tony Mechelynck)
Solution:   Initialize "res".
2021-01-12 17:17:01 +01:00
Bram Moolenaar
9567efa1b4 patch 8.2.2332: Vim9: missing :endif not reported when using :windo
Problem:    Vim9: missing :endif not reported when using :windo.
Solution:   Pass a getline function to do_cmdline(). (closes #7650)
2021-01-11 22:16:30 +01:00
Bram Moolenaar
082517570d patch 8.2.2331: Vim9: wrong error when modifying dict declared with :final
Problem:    Vim9: wrong error when modifying dict declared with :final.
Solution:   Do not check for writable variable when an index follows.
            (closes #7657)
2021-01-11 21:20:18 +01:00
295 changed files with 12326 additions and 3401 deletions

6
.codecov.yml Normal file
View File

@@ -0,0 +1,6 @@
coverage:
range: "80...100"
status:
project:
default:
threshold: 0.05%

6
.github/CODEOWNERS vendored
View File

@@ -31,6 +31,7 @@ runtime/compiler/dartdevc.vim @dkearns
runtime/compiler/dartdoc.vim @dkearns
runtime/compiler/dartfmt.vim @dkearns
runtime/compiler/eruby.vim @dkearns
runtime/compiler/fbc.vim @dkearns
runtime/compiler/gawk.vim @dkearns
runtime/compiler/gjs.vim @dkearns
runtime/compiler/haml.vim @tpope
@@ -50,6 +51,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,12 +68,14 @@ runtime/doc/pi_tar.txt @cecamp
runtime/doc/pi_vimball.txt @cecamp
runtime/doc/pi_zip.txt @cecamp
runtime/ftplugin/awk.vim @dkearns
runtime/ftplugin/basic.vim @dkearns
runtime/ftplugin/bst.vim @tpope
runtime/ftplugin/cfg.vim @chrisbra
runtime/ftplugin/css.vim @dkearns
runtime/ftplugin/cucumber.vim @tpope
runtime/ftplugin/eiffel.vim @dkearns
runtime/ftplugin/eruby.vim @tpope @dkearns
runtime/ftplugin/freebasic.vim @dkearns
runtime/ftplugin/git.vim @tpope
runtime/ftplugin/gitcommit.vim @tpope
runtime/ftplugin/gitconfig.vim @tpope
@@ -93,6 +97,7 @@ runtime/ftplugin/ruby.vim @tpope @dkearns
runtime/ftplugin/sass.vim @tpope
runtime/ftplugin/scss.vim @tpope
runtime/ftplugin/spec.vim @ignatenkobrain
runtime/ftplugin/tidy.vim @dkearns
runtime/ftplugin/tmux.vim @ericpruitt
runtime/ftplugin/typescript.vim @dkearns
runtime/ftplugin/typescriptreact.vim @dkearns
@@ -127,6 +132,7 @@ runtime/syntax/amiga.vim @cecamp
runtime/syntax/asm.vim @dkearns
runtime/syntax/asmh8300.vim @dkearns
runtime/syntax/awk.vim @dkearns
runtime/syntax/basic.vim @dkearns
runtime/syntax/bst.vim @tpope
runtime/syntax/cabal.vim @coot
runtime/syntax/cabalconfig.vim @coot

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

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

@@ -362,6 +362,10 @@ func dist#ft#FTinc()
setf aspvbs
elseif lines =~ "<?"
setf php
" Pascal supports // comments but they're vary rarely used for file
" headers so assume POV-Ray
elseif lines =~ '^\s*\%({\|(\*\)' || lines =~? s:ft_pascal_keywords
setf pascal
else
call dist#ft#FTasmsyntax()
if exists("b:asmsyntax")
@@ -408,6 +412,9 @@ func dist#ft#FTprogress_asm()
setf progress
endfunc
let s:ft_pascal_comments = '^\s*\%({\|(\*\|//\)'
let s:ft_pascal_keywords = '^\s*\%(program\|unit\|library\|uses\|begin\|procedure\|function\|const\|type\|var\)\>'
func dist#ft#FTprogress_pascal()
if exists("g:filetype_p")
exe "setf " . g:filetype_p
@@ -419,8 +426,7 @@ func dist#ft#FTprogress_pascal()
let lnum = 1
while lnum <= 10 && lnum < line('$')
let line = getline(lnum)
if line =~ '^\s*\(program\|unit\|procedure\|function\|const\|type\|var\)\>'
\ || line =~ '^\s*{' || line =~ '^\s*(\*'
if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords
setf pascal
return
elseif line !~ '^\s*$' || line =~ '^/\*'
@@ -433,6 +439,19 @@ func dist#ft#FTprogress_pascal()
setf progress
endfunc
func dist#ft#FTpp()
if exists("g:filetype_pp")
exe "setf " . g:filetype_pp
else
let line = getline(nextnonblank(1))
if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords
setf pascal
else
setf puppet
endif
endif
endfunc
func dist#ft#FTr()
let max = line("$") > 50 ? 50 : line("$")

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

27
runtime/compiler/fbc.vim Normal file
View File

@@ -0,0 +1,27 @@
" Vim compiler file
" Compiler: FreeBASIC Compiler
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2015 Jan 10
if exists("current_compiler")
finish
endif
let current_compiler = "fbc"
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=fbc
CompilerSet errorformat=%-G%.%#Too\ many\ errors\\,\ exiting,
\%f(%l)\ %tarning\ %n(%\\d%\\+):\ %m,
\%E%f(%l)\ error\ %n:\ %m,
\%-Z%p^,
\%-C%.%#,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save

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

@@ -1,7 +1,7 @@
" Vim compiler file
" Compiler: HTML Tidy
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2016 Apr 21
" Last Change: 2020 Sep 4
if exists("current_compiler")
finish
@@ -12,8 +12,15 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes\ %:S
let s:cpo_save = &cpo
set cpo&vim
" foo.html:8:1: Warning: inserting missing 'foobar' element
" foo.html:9:2: Error: <foobar> is not recognized!
CompilerSet errorformat=%f:%l:%c:\ %trror:%m,%f:%l:%c:\ %tarning:%m,%-G%.%#
CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes
CompilerSet errorformat=%f:%l:%c:\ %trror:\ %m,
\%f:%l:%c:\ %tarning:\ %m,
\%f:%l:%c:\ %tnfo:\ %m,
\%f:%l:%c:\ %m,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.2. Last change: 2020 Dec 19
*autocmd.txt* For Vim version 8.2. Last change: 2021 Jan 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -54,7 +54,8 @@ effects. Be careful not to destroy your text.
:au[tocmd] [group] {event} {pat} [++once] [++nested] {cmd}
Add {cmd} to the list of commands that Vim will
execute automatically on {event} for a file matching
{pat} |autocmd-patterns|.
{pat} |autocmd-patterns|.
Here {event} cannot be "*". *E1155*
Note: A quote character is seen as argument to the
:autocmd and won't start a comment.
Vim always adds the {cmd} after existing autocommands,

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 8.2. Last change: 2020 Nov 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`
@@ -1631,24 +1639,31 @@ default setting is "tcq". You can separate the option letters with commas for
readability.
letter meaning when present in 'formatoptions' ~
*fo-t*
t Auto-wrap text using textwidth
*fo-c*
c Auto-wrap comments using textwidth, inserting the current comment
leader automatically.
*fo-r*
r Automatically insert the current comment leader after hitting
<Enter> in Insert mode.
*fo-o*
o Automatically insert the current comment leader after hitting 'o' or
'O' in Normal mode.
*fo-q*
q Allow formatting of comments with "gq".
Note that formatting will not change blank lines or lines containing
only the comment leader. A new paragraph starts after such a line,
or when the comment leader changes.
*fo-w*
w Trailing white space indicates a paragraph continues in the next line.
A line that ends in a non-white character ends a paragraph.
*fo-a*
a Automatic formatting of paragraphs. Every time text is inserted or
deleted the paragraph will be reformatted. See |auto-format|.
When the 'c' flag is present this only happens for recognized
comments.
*fo-n*
n When formatting text, recognize numbered lists. This actually uses
the 'formatlistpat' option, thus any kind of list can be used. The
indent of the text after the number is used for the next line. The
@@ -1659,6 +1674,7 @@ n When formatting text, recognize numbered lists. This actually uses
1. the first item
wraps
2. the second item
< *fo-2*
2 When formatting text, use the indent of the second line of a paragraph
for the rest of the paragraph, instead of the indent of the first
line. This supports paragraphs in which the first line has a
@@ -1668,36 +1684,46 @@ n When formatting text, recognize numbered lists. This actually uses
second line of the same paragraph
third line.
< This also works inside comments, ignoring the comment leader.
*fo-v*
v Vi-compatible auto-wrapping in insert mode: Only break a line at a
blank that you have entered during the current insert command. (Note:
this is not 100% Vi compatible. Vi has some "unexpected features" or
bugs in this area. It uses the screen column instead of the line
column.)
*fo-b*
b Like 'v', but only auto-wrap if you enter a blank at or before
the wrap margin. If the line was longer than 'textwidth' when you
started the insert, or you do not enter a blank in the insert before
reaching 'textwidth', Vim does not perform auto-wrapping.
*fo-l*
l Long lines are not broken in insert mode: When a line was longer than
'textwidth' when the insert command started, Vim does not
automatically format it.
*fo-m*
m Also break at a multibyte character above 255. This is useful for
Asian text where every character is a word on its own.
*fo-M*
M When joining lines, don't insert a space before or after a multibyte
character. Overrules the 'B' flag.
*fo-B*
B When joining lines, don't insert a space between two multibyte
characters. Overruled by the 'M' flag.
*fo-1*
1 Don't break a line after a one-letter word. It's broken before it
instead (if possible).
*fo-]*
] Respect textwidth rigorously. With this flag set, no line can be
longer than textwidth, unless line-break-prohibition rules make this
impossible. Mainly for CJK scripts and works only if 'encoding' is
"utf-8".
*fo-j*
j Where it makes sense, remove a comment leader when joining lines. For
example, joining:
int i; // the index ~
// in the list ~
Becomes:
int i; // the index in the list ~
*fo-p*
p Don't break lines at single spaces that follow periods. This is
intended to complement 'joinspaces' and |cpo-J|, for prose with
sentences separated by two spaces. For example, with 'textwidth' set

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 8.2. Last change: 2020 Dec 26
*cmdline.txt* For Vim version 8.2. Last change: 2021 Jan 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1096,7 +1096,7 @@ Also see |`=|.
In the command-line window the command line can be edited just like editing
text in any window. It is a special kind of window, because you cannot leave
it in a normal way.
{not available when compiled without the |+cmdline_hist| feature}
{not available when compiled without the |+cmdwin| feature}
OPEN *c_CTRL-F* *q:* *q/* *q?*

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 @@
*eval.txt* For Vim version 8.2. Last change: 2021 Jan 10
*eval.txt* For Vim version 8.2. Last change: 2021 Mar 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -293,13 +293,13 @@ is not available it returns zero or the default value you specify: >
List concatenation ~
*list-concatenation*
Two lists can be concatenated with the "+" operator: >
:let longlist = mylist + [5, 6]
:let mylist += [7, 8]
To prepend or append an item turn the item into a list by putting [] around
it. To change a list in-place see |list-modification| below.
To prepend or append an item, turn the item into a list by putting [] around
it. To change a list in-place, refer to |list-modification| below.
Sublist ~
@@ -314,6 +314,9 @@ similar to -1. >
:let shortlist = mylist[2:2] " List with one item: [3]
:let otherlist = mylist[:] " make a copy of the List
Notice that the last index is inclusive. If you prefer using an exclusive
index use the |slice()| method.
If the first index is beyond the last item of the List or the second item is
before the first item, the result is an empty list. There is no error
message.
@@ -436,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
@@ -454,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
@@ -470,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*
@@ -1184,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!
@@ -1214,8 +1226,12 @@ 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.
If expr1a is omitted zero is used. If expr1b is omitted the length of the
string minus one is used.
@@ -2076,6 +2092,12 @@ v:null An empty String. Used to put "null" in JSON. See
That is so that eval() can parse the string back to the same
value. Read-only.
*v:numbermax* *numbermax-variable*
v:numbermax Maximum value of a number.
*v:numbermin* *numbermin-variable*
v:numbermin Minimum value of a number (negative)
*v:numbersize* *numbersize-variable*
v:numbersize Number of bits in a Number. This is normally 64, but on some
systems it may be 32.
@@ -2524,6 +2546,9 @@ expand({expr} [, {nosuf} [, {list}]])
expandcmd({expr}) String expand {expr} like with `:edit`
extend({expr1}, {expr2} [, {expr3}])
List/Dict insert items of {expr2} into {expr1}
extendnew({expr1}, {expr2} [, {expr3}])
List/Dict like |extend()| but creates a new
List or Dictionary
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
filereadable({file}) Number |TRUE| if {file} is a readable file
filewritable({file}) Number |TRUE| if {file} is a writable file
@@ -2534,6 +2559,8 @@ finddir({name} [, {path} [, {count}]])
findfile({name} [, {path} [, {count}]])
String find file {name} in {path}
flatten({list} [, {maxdepth}]) List flatten {list} up to {maxdepth} levels
flattennew({list} [, {maxdepth}])
List flatten a copy of {list}
float2nr({expr}) Number convert Float {expr} to a Number
floor({expr}) Float round {expr} down
fmod({expr1}, {expr2}) Float remainder of {expr1} / {expr2}
@@ -2545,6 +2572,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}])
@@ -2772,6 +2800,7 @@ pyxeval({expr}) any evaluate |python_x| expression
rand([{expr}]) Number get pseudo-random number
range({expr} [, {max} [, {stride}]])
List items from {expr} to {max}
readblob({fname}) Blob read a |Blob| from {fname}
readdir({dir} [, {expr} [, {dict}]])
List file names in {dir} selected by {expr}
readdirex({dir} [, {expr} [, {dict}]])
@@ -2880,6 +2909,8 @@ sign_unplacelist({list}) List unplace a list of signs
simplify({filename}) String simplify filename as much as possible
sin({expr}) Float sine of {expr}
sinh({expr}) Float hyperbolic sine of {expr}
slice({expr}, {start} [, {end}]) String, List or Blob
slice of a String, List or Blob
sort({list} [, {func} [, {dict}]])
List sort {list}, using {func} to compare
sound_clear() none stop playing all sounds
@@ -2902,10 +2933,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}
@@ -3013,7 +3045,8 @@ tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
trim({text} [, {mask} [, {dir}]])
String trim characters in {mask} from {text}
trunc({expr}) Float truncate Float {expr}
type({name}) Number type of variable {name}
type({expr}) Number type of value {expr}
typename({expr}) String representation of the type of {expr}
undofile({name}) String undo file name for {name}
undotree() List undo file tree
uniq({list} [, {func} [, {dict}]])
@@ -3114,6 +3147,7 @@ append({lnum}, {text}) *append()*
text line below line {lnum} in the current buffer.
Otherwise append {text} as one text line below line {lnum} in
the current buffer.
Any type of item is accepted and converted to a String.
{lnum} can be zero to insert a line before the first one.
Returns 1 for failure ({lnum} out of range or out of memory),
0 for success. Example: >
@@ -4071,8 +4105,9 @@ delete({fname} [, {flags}]) *delete()*
A symbolic link itself is deleted, not what it points to.
The result is a Number, which is 0 if the delete operation was
successful and -1 when the deletion failed or partly failed.
The result is a Number, which is 0/false if the delete
operation was successful and -1/true when the deletion failed
or partly failed.
Use |remove()| to delete an item from a |List|.
To delete a line from the buffer use |:delete| or
@@ -4520,6 +4555,13 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
mylist->extend(otherlist)
extendnew({expr1}, {expr2} [, {expr3}]) *extendnew()*
Like |extend()| but instead of adding items to {expr1} a new
List or Dictionary is created and returned. {expr1} remains
unchanged. Items can still be changed by {expr2}, if you
don't want that use |deepcopy()| first.
feedkeys({string} [, {mode}]) *feedkeys()*
Characters in {string} are queued for processing as if they
come from a mapping or were typed by the user.
@@ -4684,8 +4726,10 @@ flatten({list} [, {maxdepth}]) *flatten()*
Flatten {list} up to {maxdepth} levels. Without {maxdepth}
the result is a |List| without nesting, as if {maxdepth} is
a very large number.
The {list} is changed in place, make a copy first if you do
The {list} is changed in place, use |flattennew()| if you do
not want that.
In Vim9 script flatten() cannot be used, you must always use
|flattennew()|.
*E900*
{maxdepth} means how deep in nested lists changes are made.
{list} is not modified when {maxdepth} is 0.
@@ -4699,6 +4743,10 @@ flatten({list} [, {maxdepth}]) *flatten()*
:echo flatten([1, [2, [3, 4]], 5], 1)
< [1, 2, [3, 4], 5]
flattennew({list} [, {maxdepth}]) *flattennew()*
Like |flatten()| but first make a copy of {list}.
float2nr({expr}) *float2nr()*
Convert {expr} to a Number by omitting the part after the
decimal point.
@@ -4866,6 +4914,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
@@ -5248,6 +5311,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 "여보세요": >
@@ -5727,6 +5793,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")
...
@@ -5851,6 +5919,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()
@@ -5878,6 +5947,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()
@@ -5891,6 +5961,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()
@@ -6202,8 +6273,8 @@ has({feature} [, {check}])
has_key({dict}, {key}) *has_key()*
The result is a Number, which is 1 if |Dictionary| {dict} has
an entry with key {key}. Zero otherwise.
The result is a Number, which is TRUE if |Dictionary| {dict}
has an entry with key {key}. FALSE otherwise.
Can also be used as a |method|: >
mydict->has_key(key)
@@ -6246,16 +6317,16 @@ haslocaldir([{winnr} [, {tabnr}]]) *haslocaldir()*
GetWinnr()->haslocaldir()
hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()*
The result is a Number, which is 1 if there is a mapping that
contains {what} in somewhere in the rhs (what it is mapped to)
and this mapping exists in one of the modes indicated by
{mode}.
The result is a Number, which is TRUE if there is a mapping
that contains {what} in somewhere in the rhs (what it is
mapped to) and this mapping exists in one of the modes
indicated by {mode}.
When {abbr} is there and it is |TRUE| use abbreviations
instead of mappings. Don't forget to specify Insert and/or
Command-line mode.
Both the global mappings and the mappings local to the current
buffer are checked for a match.
If no matching mapping is found 0 is returned.
If no matching mapping is found FALSE is returned.
The following characters are recognized in {mode}:
n Normal mode
v Visual and Select mode
@@ -6291,8 +6362,8 @@ histadd({history}, {item}) *histadd()*
character is sufficient.
If {item} does already exist in the history, it will be
shifted to become the newest entry.
The result is a Number: 1 if the operation was successful,
otherwise 0 is returned.
The result is a Number: TRUE if the operation was successful,
otherwise FALSE is returned.
Example: >
:call histadd("input", strftime("%Y %b %d"))
@@ -6315,8 +6386,8 @@ histdel({history} [, {item}]) *histdel()*
an index, see |:history-indexing|. The respective entry will
be removed if it exists.
The result is a Number: 1 for a successful operation,
otherwise 0 is returned.
The result is TRUE for a successful operation, otherwise FALSE
is returned.
Examples:
Clear expression register history: >
@@ -6368,7 +6439,7 @@ histnr({history}) *histnr()*
GetHistory()->histnr()
<
hlexists({name}) *hlexists()*
The result is a Number, which is non-zero if a highlight group
The result is a Number, which is TRUE if a highlight group
called {name} exists. This is when the group has been
defined in some way. Not necessarily when highlighting has
been defined for it, it may also have been used for a syntax
@@ -6541,7 +6612,7 @@ inputrestore() *inputrestore()*
Restore typeahead that was saved with a previous |inputsave()|.
Should be called the same number of times inputsave() is
called. Calling it more often is harmless though.
Returns 1 when there is nothing to restore, 0 otherwise.
Returns TRUE when there is nothing to restore, FALSE otherwise.
inputsave() *inputsave()*
Preserve typeahead (also from mappings) and clear it, so that
@@ -6549,7 +6620,7 @@ inputsave() *inputsave()*
followed by a matching inputrestore() after the prompt. Can
be used several times, in which case there must be just as
many inputrestore() calls.
Returns 1 when out of memory, 0 otherwise.
Returns TRUE when out of memory, FALSE otherwise.
inputsecret({prompt} [, {text}]) *inputsecret()*
This function acts much like the |input()| function with but
@@ -7025,7 +7096,7 @@ listener_flush([{buf}]) *listener_flush()*
listener_remove({id}) *listener_remove()*
Remove a listener previously added with listener_add().
Returns zero when {id} could not be found, one when {id} was
Returns FALSE when {id} could not be found, TRUE when {id} was
removed.
Can also be used as a |method|: >
@@ -7395,7 +7466,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
@@ -7408,7 +7480,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
@@ -7417,8 +7489,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])
@@ -7708,8 +7779,8 @@ mkdir({name} [, {path} [, {prot}]])
flag is passed (since patch 8.0.1708). However, without the
"p" option the call will fail.
The function result is a Number, which is 1 if the call was
successful or 0 if the directory creation failed or partly
The function result is a Number, which is TRUE if the call was
successful or FALSE if the directory creation failed or partly
failed.
Not available on all systems. To check use: >
@@ -8254,6 +8325,14 @@ rand([{expr}]) *rand()* *random*
:echo rand(seed)
:echo rand(seed) % 16 " random number 0 - 15
<
readblob({fname}) *readblob()*
Read file {fname} in binary mode and return a |Blob|.
When the file can't be opened an error message is given and
the result is an empty |Blob|.
Also see |readfile()| and |writefile()|.
readdir({directory} [, {expr} [, {dict}]]) *readdir()*
Return a list with file and directory names in {directory}.
You can also use |glob()| if you don't need to do complicated
@@ -8368,6 +8447,7 @@ readdirex({directory} [, {expr} [, {dict}]]) *readdirex()*
Can also be used as a |method|: >
GetDirName()->readdirex()
<
*readfile()*
readfile({fname} [, {type} [, {max}]])
Read file {fname} and return a |List|, each line of the file
@@ -8379,8 +8459,6 @@ readfile({fname} [, {type} [, {max}]])
- When the last line ends in a NL an extra empty list item is
added.
- No CR characters are removed.
When {type} contains "B" a |Blob| is returned with the binary
data of the file unmodified.
Otherwise:
- CR characters that appear before a NL are removed.
- Whether the last line ends in a NL or not does not matter.
@@ -8398,6 +8476,9 @@ readfile({fname} [, {type} [, {max}]])
Note that without {max} the whole file is read into memory.
Also note that there is no recognition of encoding. Read a
file into a buffer if you need to.
Deprecated (use |readblob()| instead): When {type} contains
"B" a |Blob| is returned with the binary data of the file
unmodified.
When the file can't be opened an error message is given and
the result is an empty list.
Also see |writefile()|.
@@ -9175,6 +9256,7 @@ server2client({clientid}, {string}) *server2client()*
Send a reply string to {clientid}. The most recent {clientid}
that sent a string can be retrieved with expand("<client>").
{only available when compiled with the |+clientserver| feature}
Returns zero for success, -1 for failure.
Note:
This id has to be stored before the next command can be
received. I.e. before returning from the received command and
@@ -9312,8 +9394,8 @@ setcmdpos({pos}) *setcmdpos()*
before inserting the resulting text.
When the number is too big the cursor is put at the end of the
line. A number smaller than one has undefined results.
Returns 0 when successful, 1 when not editing the command
line.
Returns FALSE when successful, TRUE when not editing the
command line.
Can also be used as a |method|: >
GetPos()->setcmdpos()
@@ -9371,9 +9453,11 @@ setline({lnum}, {text}) *setline()*
{lnum} is used like with |getline()|.
When {lnum} is just below the last line the {text} will be
added below the last line.
{text} can be any type or a List of any type, each item is
converted to a String.
If this succeeds, 0 is returned. If this fails (most likely
because {lnum} is invalid) 1 is returned.
If this succeeds, FALSE is returned. If this fails (most likely
because {lnum} is invalid) TRUE is returned.
Example: >
:call setline(5, strftime("%c"))
@@ -9593,6 +9677,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|.
@@ -9840,6 +9925,18 @@ sinh({expr}) *sinh()*
{only available when compiled with the |+float| feature}
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|. 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.
Can also be used as a |method|: >
GetList()->slice(offset)
sort({list} [, {func} [, {dict}]]) *sort()* *E702*
Sort the items in {list} in-place. Returns {list}.
@@ -10190,23 +10287,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
@@ -11119,6 +11237,14 @@ type({expr}) The result is a Number representing the type of {expr}.
< Can also be used as a |method|: >
mylist->type()
typename({expr}) *typename()*
Return a string representation of the type of {expr}.
Example: >
echo typename([1, 2, 3])
list<number>
undofile({name}) *undofile()*
Return the name of the undo file that would be used for a file
with name {name} when writing. This uses the 'undodir'
@@ -11276,9 +11402,11 @@ win_execute({id}, {command} [, {silent}]) *win_execute()*
call win_execute(winid, 'set syntax=python')
< Doing the same with `setwinvar()` would not trigger
autocommands and not actually show syntax highlighting.
*E994*
Not all commands are allowed in popup windows.
When window {id} does not exist then no error is given.
When window {id} does not exist then no error is given and
an empty string is returned.
Can also be used as a |method|, the base is passed as the
second argument: >
@@ -11326,7 +11454,7 @@ win_gettype([{nr}]) *win_gettype()*
win_gotoid({expr}) *win_gotoid()*
Go to window with ID {expr}. This may also change the current
tabpage.
Return 1 if successful, 0 if the window cannot be found.
Return TRUE if successful, FALSE if the window cannot be found.
Can also be used as a |method|: >
GetWinid()->win_gotoid()
@@ -13021,7 +13149,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('$')
@@ -13051,7 +13184,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: >
@@ -13067,8 +13200,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: 2020 Sep 28
*filetype.txt* For Vim version 8.2. Last change: 2021 Mar 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -147,6 +147,7 @@ can be used to overrule the filetype used for certain extensions:
*.w g:filetype_w |ft-cweb-syntax|
*.i g:filetype_i |ft-progress-syntax|
*.p g:filetype_p |ft-pascal-syntax|
*.pp g:filetype_pp |ft-pascal-syntax|
*.sh g:bash_is_sh |ft-sh-syntax|
*.tex g:tex_flavor |ft-tex-plugin|
@@ -627,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

View File

@@ -8,7 +8,7 @@ Vim had built-in support for hangul, the Korean language, for users without
XIM (X Input Method). Since it didn't work well and was not maintained it was
removed in Vim 8.1.2327.
If you want this hangul input mehod you can go back to Vim 8.1.2326 or
If you want this hangul input method you can go back to Vim 8.1.2326 or
earlier. If you think this code is still useful and want to maintain it, make
a patch to add it back. However, making it work with UTF-8 encoding would be
best.

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: 2020 Oct 05
*index.txt* For Vim version 8.2. Last change: 2021 Feb 14
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
@@ -1590,6 +1591,8 @@ tag command action ~
|:sign| :sig[n] manipulate signs
|:silent| :sil[ent] run a command silently
|:sleep| :sl[eep] do nothing for a few seconds
|:sleep!| :sl[eep]! do nothing for a few seconds, without the
cursor visible
|:slast| :sla[st] split window and go to last file in the
argument list
|:smagic| :sm[agic] :substitute with 'magic'
@@ -1696,7 +1699,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

@@ -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 "fx",
because "z" is evaluated before "fx" 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 @@
*options.txt* For Vim version 8.2. Last change: 2021 Jan 08
*options.txt* For Vim version 8.2. Last change: 2021 Feb 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1568,7 +1568,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 +2681,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 +3235,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 +3247,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 +3262,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 +3272,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)
@@ -3273,7 +3285,7 @@ A jump table for the options with a short description can be found at |Q_op|.
See the 'endofline' option.
*'fkmap'* *'fk'* *'nofkmap'* *'nofk'*
'fkmap' 'fk' boolean (default off) *E198*
'fkmap' 'fk' boolean (default off)
global
{only available when compiled with the |+rightleft|
feature}
@@ -4846,7 +4858,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 +4889,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.
@@ -5221,7 +5239,7 @@ A jump table for the options with a short description can be found at |Q_op|.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
*'mouse'* *E538*
*'mouse'*
'mouse' string (default "", "a" for GUI and Win32,
set to "a" or "nvi" in |defaults.vim|)
global
@@ -6226,7 +6244,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 +6254,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 +6266,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,

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: 2020 Nov 07
*popup.txt* For Vim version 8.2. Last change: 2021 Feb 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -588,8 +588,6 @@ properties. It is in one of four forms:
If you want to create a new buffer yourself use |bufadd()| and pass the buffer
number to popup_create().
It is not possible to use the buffer of a terminal window. *E278* You CAN
create a hidden terminal buffer and use that one in a popup window.
The second argument of |popup_create()| is a dictionary with options:
line Screen line where to position the popup. Can use a
@@ -622,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:
@@ -694,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.
@@ -743,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 @@
*repeat.txt* For Vim version 8.2. Last change: 2021 Jan 02
*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.
:vim9script [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.
@@ -899,8 +901,9 @@ matches ".../plugin/explorer.vim", ".../plugin/iexplorer.vim", etc. >
matches ".../plugin/explorer.vim" and "explorer.vim" in any other directory.
The match for functions is done against the name as it's shown in the output
of ":function". For local functions this means that something like "<SNR>99_"
is prepended.
of ":function". However, for local functions the script-specific prefix such
as "<SNR>99_" is ignored to make it easier to match script-local functions
without knowing the ID of the script.
Note that functions are first loaded and later executed. When they are loaded
the "file" breakpoints are checked, when they are executed the "func"
@@ -955,10 +958,10 @@ OBSCURE
Profiling means that Vim measures the time that is spent on executing
functions and/or scripts. The |+profile| feature is required for this.
It is only included when Vim was compiled with "huge" features.
It is included when Vim was compiled with "huge" features.
You can also use the |reltime()| function to measure time. This only requires
the |+reltime| feature, which is present more often.
the |+reltime| feature, which is present in more builds.
For profiling syntax highlighting see |:syntime|.
@@ -1005,7 +1008,12 @@ For example, to profile the one_script.vim script file: >
You must always start with a ":profile start fname" command. The resulting
file is written when Vim exits. Here is an example of the output, with line
file is written when Vim exits. For example, to profile one specific
function: >
profile start /tmp/vimprofile
profile func MyFunc
Here is an example of the output, with line
numbers prepended for the explanation:
1 FUNCTION Test2() ~

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: 2020 Dec 17
*syntax.txt* For Vim version 8.2. Last change: 2021 Mar 06
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
@@ -2335,11 +2335,12 @@ http://papp.plan9.de.
PASCAL *pascal.vim* *ft-pascal-syntax*
Files matching "*.p" could be Progress or Pascal. If the automatic detection
doesn't work for you, or you don't edit Progress at all, use this in your
startup vimrc: >
Files matching "*.p" could be Progress or Pascal and those matching "*.pp"
could be Puppet or Pascal. If the automatic detection doesn't work for you,
or you only edit Pascal files, use this in your startup vimrc: >
:let filetype_p = "pascal"
:let filetype_p = "pascal"
:let filetype_pp = "pascal"
The Pascal syntax file has been extended to take into account some extensions
provided by Turbo Pascal, Free Pascal Compiler and GNU Pascal Compiler.
@@ -4675,7 +4676,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

@@ -1045,6 +1045,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
't_da' term.txt /*'t_da'*
't_db' term.txt /*'t_db'*
't_dl' term.txt /*'t_dl'*
't_fd' term.txt /*'t_fd'*
't_fe' term.txt /*'t_fe'*
't_fs' term.txt /*'t_fs'*
't_k1' term.txt /*'t_k1'*
't_k2' term.txt /*'t_k2'*
@@ -1290,6 +1292,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*
@@ -3112,9 +3115,11 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:sip change.txt /*:sip*
:sir change.txt /*:sir*
:sl various.txt /*:sl*
:sl! various.txt /*:sl!*
:sla windows.txt /*:sla*
:slast windows.txt /*:slast*
:sleep various.txt /*:sleep*
:sleep! various.txt /*:sleep!*
:sm change.txt /*:sm*
:smagic change.txt /*:smagic*
:smap map.txt /*:smap*
@@ -3186,6 +3191,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*
@@ -3397,7 +3403,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*
@@ -3939,6 +3947,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*
@@ -4028,7 +4037,6 @@ E194 message.txt /*E194*
E195 starting.txt /*E195*
E196 various.txt /*E196*
E197 mlang.txt /*E197*
E198 options.txt /*E198*
E199 cmdline.txt /*E199*
E20 motion.txt /*E20*
E200 autocmd.txt /*E200*
@@ -4114,7 +4122,6 @@ E274 eval.txt /*E274*
E275 textprop.txt /*E275*
E276 eval.txt /*E276*
E277 remote.txt /*E277*
E278 popup.txt /*E278*
E279 terminal.txt /*E279*
E28 syntax.txt /*E28*
E280 if_tcl.txt /*E280*
@@ -4180,7 +4187,6 @@ E337 gui.txt /*E337*
E338 editing.txt /*E338*
E339 message.txt /*E339*
E34 various.txt /*E34*
E340 vi_diff.txt /*E340*
E341 message.txt /*E341*
E342 message.txt /*E342*
E343 options.txt /*E343*
@@ -4388,7 +4394,6 @@ E534 options.txt /*E534*
E535 options.txt /*E535*
E536 options.txt /*E536*
E537 options.txt /*E537*
E538 options.txt /*E538*
E539 options.txt /*E539*
E54 pattern.txt /*E54*
E540 options.txt /*E540*
@@ -6351,6 +6356,7 @@ expression-commands eval.txt /*expression-commands*
expression-syntax eval.txt /*expression-syntax*
exrc starting.txt /*exrc*
extend() eval.txt /*extend()*
extendnew() eval.txt /*extendnew()*
extension-removal cmdline.txt /*extension-removal*
extensions-improvements todo.txt /*extensions-improvements*
f motion.txt /*f*
@@ -6415,6 +6421,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*
@@ -6430,7 +6437,26 @@ fname_new-variable eval.txt /*fname_new-variable*
fname_out-variable eval.txt /*fname_out-variable*
fnameescape() eval.txt /*fnameescape()*
fnamemodify() eval.txt /*fnamemodify()*
fo-1 change.txt /*fo-1*
fo-2 change.txt /*fo-2*
fo-B change.txt /*fo-B*
fo-M change.txt /*fo-M*
fo-] change.txt /*fo-]*
fo-a change.txt /*fo-a*
fo-b change.txt /*fo-b*
fo-c change.txt /*fo-c*
fo-j change.txt /*fo-j*
fo-l change.txt /*fo-l*
fo-m change.txt /*fo-m*
fo-n change.txt /*fo-n*
fo-o change.txt /*fo-o*
fo-p change.txt /*fo-p*
fo-q change.txt /*fo-q*
fo-r change.txt /*fo-r*
fo-t change.txt /*fo-t*
fo-table change.txt /*fo-table*
fo-v change.txt /*fo-v*
fo-w change.txt /*fo-w*
fold-behavior fold.txt /*fold-behavior*
fold-colors fold.txt /*fold-colors*
fold-commands fold.txt /*fold-commands*
@@ -6553,6 +6579,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*
@@ -6643,6 +6670,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*
@@ -7613,6 +7641,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*
@@ -7641,6 +7670,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*
@@ -8270,6 +8300,8 @@ null vim9.txt /*null*
null-variable eval.txt /*null-variable*
number_relativenumber options.txt /*number_relativenumber*
numbered-function eval.txt /*numbered-function*
numbermax-variable eval.txt /*numbermax-variable*
numbermin-variable eval.txt /*numbermin-variable*
numbersize-variable eval.txt /*numbersize-variable*
o insert.txt /*o*
o_CTRL-V motion.txt /*o_CTRL-V*
@@ -8680,6 +8712,7 @@ read-in-close-cb channel.txt /*read-in-close-cb*
read-messages insert.txt /*read-messages*
read-only-share editing.txt /*read-only-share*
read-stdin version5.txt /*read-stdin*
readblob() eval.txt /*readblob()*
readdir() eval.txt /*readdir()*
readdirex() eval.txt /*readdirex()*
readfile() eval.txt /*readfile()*
@@ -8945,6 +8978,7 @@ sinh() eval.txt /*sinh()*
skeleton autocmd.txt /*skeleton*
skip_defaults_vim starting.txt /*skip_defaults_vim*
slice eval.txt /*slice*
slice() eval.txt /*slice()*
slow-fast-terminal term.txt /*slow-fast-terminal*
slow-start starting.txt /*slow-start*
slow-terminal term.txt /*slow-terminal*
@@ -9340,6 +9374,8 @@ t_f6 version4.txt /*t_f6*
t_f7 version4.txt /*t_f7*
t_f8 version4.txt /*t_f8*
t_f9 version4.txt /*t_f9*
t_fd term.txt /*t_fd*
t_fe term.txt /*t_fe*
t_float-variable eval.txt /*t_float-variable*
t_fs term.txt /*t_fs*
t_func-variable eval.txt /*t_func-variable*
@@ -9714,6 +9750,7 @@ type-inference vim9.txt /*type-inference*
type-mistakes tips.txt /*type-mistakes*
typecorr-settings usr_41.txt /*typecorr-settings*
typecorr.txt usr_41.txt /*typecorr.txt*
typename() eval.txt /*typename()*
u undo.txt /*u*
uganda uganda.txt /*uganda*
uganda.txt uganda.txt /*uganda.txt*
@@ -9841,6 +9878,8 @@ v:mouse_win eval.txt /*v:mouse_win*
v:mouse_winid eval.txt /*v:mouse_winid*
v:none eval.txt /*v:none*
v:null eval.txt /*v:null*
v:numbermax eval.txt /*v:numbermax*
v:numbermin eval.txt /*v:numbermin*
v:numbersize eval.txt /*v:numbersize*
v:oldfiles eval.txt /*v:oldfiles*
v:operator eval.txt /*v:operator*
@@ -10083,6 +10122,7 @@ vim8 version8.txt /*vim8*
vim9 vim9.txt /*vim9*
vim9-classes vim9.txt /*vim9-classes*
vim9-const vim9.txt /*vim9-const*
vim9-curly vim9.txt /*vim9-curly*
vim9-declaration vim9.txt /*vim9-declaration*
vim9-declarations usr_46.txt /*vim9-declarations*
vim9-differences vim9.txt /*vim9-differences*
@@ -10090,6 +10130,7 @@ 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-mix vim9.txt /*vim9-mix*
vim9-namespace vim9.txt /*vim9-namespace*
vim9-rationale vim9.txt /*vim9-rationale*
vim9-reload vim9.txt /*vim9-reload*
@@ -10314,6 +10355,7 @@ xterm-command-server term.txt /*xterm-command-server*
xterm-copy-paste term.txt /*xterm-copy-paste*
xterm-cursor-keys term.txt /*xterm-cursor-keys*
xterm-end-home-keys term.txt /*xterm-end-home-keys*
xterm-focus-event term.txt /*xterm-focus-event*
xterm-function-keys term.txt /*xterm-function-keys*
xterm-modifier-keys term.txt /*xterm-modifier-keys*
xterm-mouse options.txt /*xterm-mouse*

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 @@
*term.txt* For Vim version 8.2. Last change: 2020 Dec 29
*term.txt* For Vim version 8.2. Last change: 2021 Jan 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -373,6 +373,10 @@ Added by Vim (there are no standard codes for these):
t_Ri restore icon text from stack *t_Ri* *'t_Ri'*
t_TE end of "raw" mode *t_TE* *'t_TE'*
t_TI put terminal into "raw" mode *t_TI* *'t_TI'*
t_fd disable focus-event tracking *t_fd* *'t_fd'*
|xterm-focus-event|
t_fe enable focus-event tracking *t_fe* *'t_fe'*
|xterm-focus-event|
Some codes have a start, middle and end part. The start and end are defined
by the termcap option, the middle part is text.
@@ -546,6 +550,16 @@ And run "xrdb -merge .Xresources" to make it effective. You can check the
value with the context menu (right mouse button while CTRL key is pressed),
there should be a tick at allow-window-ops.
*xterm-focus-event*
Some terminals including xterm support the focus event tracking feature.
If this feature is enabled by the 't_fe' sequence, special key sequences are
sent from the terminal to Vim every time the terminal gains or loses focus.
Vim fires focus events (|FocusGained|/|FocusLost|) by handling them accordingly.
Focus event tracking is disabled by a 't_fd' sequence when exiting "raw" mode.
If you would like to disable this feature, add the following to your .vimrc:
`set t_fd=`
`set t_fe=`
*termcap-colors*
Note about colors: The 't_Co' option tells Vim the number of colors available.
When it is non-zero, the 't_AB' and 't_AF' options are used to set the color.

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 Mar 10
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

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2021 Jan 11
*todo.txt* For Vim version 8.2. Last change: 2021 Mar 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,27 +38,26 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
no error for:
echo extend([0], ['a', true])
like it does for:
echo extend([0], ['a'])
At script level this does not give an error:
echo map([0], (_, v) => [])
Or:
var l: list<number> = [0]
echo map(l, (_, v) => [])
Vim9 - Make everything work:
- 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}".
- Does this work now: Implement using imported items at script level from
"import * as X" in
- import of item that isn't exported: error should mention missing "export"?
- no error for using :import in legacy script?
- Disallow :open ?
- Check: what if 'cpo' is intentionally changed in Vim9 script, does it get
restored at the end?
- 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:
let p = function('NoSuchFunc')
var p = function('NoSuchFunc')
- When indexing a string, should we include composing characters? #6563
string[0] - first character including its composing characters.
string[0 : 0] - same
If you don't want that use strcharpart().
Also, add optional arg to strcharpart() to include composing chars, to
make it consistent with strchars().
Add strcharlen(), like strchars() but like skipcc is always set
- 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
@@ -66,20 +65,16 @@ Vim9 - Make everything work:
def Filter(x: string, Cond: func(string): bool)
Filter(x, (v) => v =~ '^b')
- Make inline function work, to be used as a funcref:
let Ref = (arg: type): type => {
var Ref = (arg: type): type => {
statement
return expr
}
let Ref = (arg: type) => {
var Ref = (arg: type) => {
statement
statement
}
- Does this work already: can use func as reference:
def SomeFunc() ...
map(list, SomeFunc)
- For builtin functions using tv_get_string*() use check_for_string() to be
more strict about the argument type.
- Possible memory leaks in test_vim9_func
- 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
@@ -91,13 +86,11 @@ Vim9 - Make everything work:
- 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:
let ret: dict<string> = #{}
ret[i] = string(i)
- Appending to dict item doesn't work:
let d[i] ..= value
- Appending to dict item doesn't work in a :def function:
var d: dict<string> = {a: 'x'}
d['a'] ..= 'y'
d.a ..= 'y'
Test to be extended: Test_assign_dict_with_op()
- Using ".." at script level doesn't convert arguments to a string.
- Compile replacement of :s command: s/pat/\=expr/
- Compile redir to local variable: var_redir_start().
@@ -106,8 +99,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?
@@ -117,13 +108,21 @@ Vim9 - Make everything work:
- compile "skip" argument of searchpair()
- compile "expr" and "call" expression of a channel in channel_exe_cmd()?
- 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.
@@ -150,7 +149,6 @@ Also for Vim9:
- Make debugging work - at least per function. Need to recompile a function
to step through it line-by-line? Evaluate the stack and variables on the
stack?
- Make profiling work - Add ISN_PROFILE instructions after every line?
- List commands when 'verbose' is set or :verbose is used.
Further Vim9 improvements, possibly after launch:
@@ -178,6 +176,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
@@ -193,8 +192,12 @@ Popup windows:
- Figure out the size and position better if wrapping inserts indent
Text properties:
- :goto does not go to the right place when text properties are present.
(#5930)
- Popup attached to text property stays visible when text is no longer
visible. (#7736)
- 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)
@@ -205,8 +208,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
@@ -255,7 +256,6 @@ Terminal emulator window:
be redrawn.
- GUI: When using ":set go+=!" a system() call causes the hit-enter prompt.
(#3327)
- GUI: hang until key typed. (#3530)
- Allow for specifying the directory, with ++cwd={dir}.
- With a vertical split only one window is updated. (Linwei, 2018 Jun 2,
#2977)
@@ -277,7 +277,11 @@ Terminal emulator window:
- When 'encoding' is not utf-8, or the job is using another encoding, setup
conversions.
Error numbers available: E653
Include patch #6290: recognize shell directory change.
Valgrind reports memory leaks in test_options.
test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
Mapping with partial match not executed properly in GTK. (Ingo Karkat, #7082)
@@ -287,7 +291,10 @@ Have another look at the implementation.
Patch to implement the vimtutor with a plugin: #6414
Was originally written by Felipe Morales.
Patch to find Python dll using registry key. (#7540)
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.
@@ -299,6 +306,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
@@ -317,6 +326,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
@@ -382,10 +395,6 @@ When "+ register is set then "" points to it. If another Vim grabs the "+
register, then "" doesn't contain anything. Make it still follow "+.
(#6435)
Patch to fix drawing error with DirectX. (James Grant, #5688)
Causes flicker on resizing. Workaround from Ken Takata.
How about only setting the attribute when part of the Vim window is offscreen?
File marks merging has duplicates since 7.4.1925. (Ingo Karkat, #5733)
"make test_gui" crashed in submenu_change(). Fix and remove workaround in
@@ -397,6 +406,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)
@@ -479,12 +492,6 @@ Help for ":argadd fname" says that if "fname" is already in the argument list
that entry is used. But instead it's always added. (#6210)
Add flag AL_FIND_ADD, if there is one argument find it in the list.
Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
(#4087)
behavior of i_CTRl-R_CTRL-R differs from documentation. (Paul Desmond Parker,
#5771)
":bnext" in a help buffer is supposed to go to the next help buffer, but it
goes to any buffer, and then :bnext skips help buffers, since they are
unlisted. (#4478)
@@ -496,9 +503,6 @@ find them. (Max Kukartsev, #6218)
Enable 'termbidi' if $VTE_VERSION >= 5703 ?
Universal solution to detect if t_RS is working, using cursor position.
Koichi Iwamoto, #2126
Sound: support on Mac? Or does libcanberra work there?
Python 3.8 doesn't work. (Antonios Hadjigeorgalis, #5509)
@@ -511,15 +515,8 @@ support combining characters. (Charles Campbell) Also #4687
Output from assert_equalfile() doesn't give a hint about what's different.
Assuming the files are text, print the line with the difference.
Add "t" action to settagstack(): truncate and add new entries. (#5405)
When 'relativenumber' is set the line just below a diff change doesn't get
updated. (#6138)
Result of synID() sometimes wrong in help files. (#5252)
Status line is nut updated when splitting windows. (Marcin Szamotulski, #5496)
Problem showing a line if the number column width changes when using "o".
(Mateusz Morusiewicz, #4245)
@@ -532,9 +529,6 @@ with packages under "start". (xtal8, #1994)
Patch to add new motion ]( and ]{. (Yasuhiro Matsumoto, #5320)
Better: use the "z" prefix. or ]t) and [t(.
Modeless selection doesn't work in gvim. (#4783)
Caused by patch 8.1.1534.
Visual highlight not removed when 'display' is "lastline" and line doesn't
fit. (Kevin Lawler, #4457)
@@ -545,9 +539,6 @@ Does not build with MinGW out of the box:
- WINVER conflict, should use 0x0600 by default?
- INT_MAX not defined: need to include <limits.h> in vim.h
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
13, #2910) Can't reproduce?
Display messed up with matchparen, wrapping and scrolling. (#5638)
Screen update bug related to matchparen. (Chris Heath, 2017 Mar 4, #1532)
@@ -556,14 +547,6 @@ when "qq" is mapped and after the first "q" the mouse is moved outside of the
gvim window (with focus follows mouse), then the K_FOCUSLOST key is put in the
input buffer. (#5302)
xterm should be able to pass focus changes to Vim, so that Vim can check for
buffers that changed. Perhaps in misc.c, function selectwindow().
Xterm 224 supports it!
Patch to make FocusGained and FocusLost work in modern terminals. (Hayaki
Saito, 2013 Apr 24) Update 2016 Aug 12.
Also see issue #609.
We could add the enable/disable sequences to t_ti/t_te or t_ks/t_ke.
:buffer completion does not escape "+" properly and results in a regexp error.
(#5467)
@@ -582,16 +565,10 @@ Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
Updated 2016 Jun 10, #858 Update 2017 Mar 28: use <buffer>.
Better use ":bufgrep" ?
Errors found with random data:
heap-buffer-overflow in alist_add (#2472)
Improve fallback for menu translations, to avoid having to create lots of
files that source the actual file. E.g. menu_da_de -> menu_da
Include part of #3242?
When a terminal exit_cb closes the window, a following typed key is lost, if
it's in a mapping. (2018 Oct 6, #2302, #3522)
Patch to have text objects defined by arbitrary single characters. (Daniel
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
Added tests (James McCoy, 2016 Aug 3, #958). Still needs more work.
@@ -604,11 +581,6 @@ Williams, 2018 Oct 30)
'[ mark in wrong column after put. (#4776)
"exepath('bin/cmd')" does not work while ":!bin/cmd" does work.
(Daniel Hahler, #4710) and executable('bin/cmd') returns 1
Error drawing the number column when 'cursorline' is set. (#3893)
Problem with :tlmenu: Detach item added with all modes? Issue #3563.
Add an argument to expandcmd() to expand like ":next" does.
@@ -678,9 +650,6 @@ Should we include some part of pull request #4505, not increment changedtick
in some cases? E.g. for ":write" when the changed flag was already off, the
buffer didn't change at all.
Line numbers in profile are off when function was defined with ":execute".
(Daniel Hahler, #4511)
Session file contains absolute paths when "curdir" is removed form
'sessionoptions', making it impossible to have a session with a relative path.
(#4450)
@@ -743,9 +712,6 @@ a hint about how to fix it. (#4300)
Make balloon_show() work outside of 'balloonexpr'? Users expect it to work:
#2948. (related to #1512?)
On Win32 it stops showing, because showState is already ShS_SHOWING.
balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec
20, #2481)
Also see #2352, want better control over balloon, perhaps set the position.
Should also be possible to add highlighting, like in the status line?
balloonexpr() on MS-Windows GUI doesn't handle accented chars? (nivaemail,
@@ -771,12 +737,6 @@ Redo only remembers the last change. Could use "{count}g." to redo an older
change. How does the user know which change? At least have a way to list
them: ":repeats". Add to history, like search history and command line history.
Incsearch test fails when locale is "C". (Dominique Pelle, #3986)
Also run all tests with C locale?
"vat" doesn't work well on XML when the closing > is on another line.
#3927
Pasting foo} causes Vim to behave weird. (John Little, 2018 Jun 17)
Related to bracketed paste. I cannot reproduce it.
@@ -795,8 +755,6 @@ Some xterm responses are not properly handled: (Markus Gömmel, 2019 Apr 1)
Using CTRL-L to add a character to the search string that contains \v,
punctuation is repeated. (Smylers, 2018 Nov 17, #3621)
ml_get error: (Israel Chauca Fuentes, 2018 Oct 17, #3550).
Using single wide base character with double wide composing character gives
drawing errors. Fill up the base character? (Dominique, #4328)
@@ -831,19 +789,13 @@ 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())
gethostbyname() is old, use getaddrinfo() if available. (#3227)
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)
@@ -852,22 +804,15 @@ Problem with Visual yank when 'linebreak' and 'showbreak' are set.
Patch with tests, but it's not clear how it is supposed to work. (tommm, 2018
Nov 17) Asked about this, Dec 22. Christian will have a look.
Patch to fix that using "5gj" starting inside a closed fold does not work on
screen lines but on text lines. (Julius Hulsmann, #4095) Lacks a test.
home_replace() uses $HOME instead of "homedir". (Cesar Martins, 2018 Aug 9)
When the status line uses term_gettitle(), it does not get updated when the
terminal title changes. (Josh Triplett, 2018 Sep 9, #3418)
How would we know that the status line needs to be updated?
Adjust windows installer explanation of behavior. (scootergrisen, #3310)
Update for xim-input-style help (Tony Mechelynck, 2019 Jan 10).
Feedback from someone who uses this?
ml_get error. (Dominique Pelle, 2018 Sep 14, #3434)
Only output t_Cs when t_Ce is also set. do not use Cs and Ce termcap entries. (Daniel Hahler, 2018 Sep 25)
Add t_cS and t_cR for cursor color select and reset. Use Cs and Cr terminfo
values.
@@ -890,41 +835,22 @@ includes the first screen line. (2018 Aug 23, #3368)
Refactored HTML indent file. (Michael Lee, #1821)
Asked to write a test.
MS-Windows: .lnk file not resolved properly when 'encoding' is set.
(lkintact, 2018 Sep 22, #3473)
Merge checking for 'cursorline' and 'concealcursor', see neovim #9492.
Display error when a conceal match uses '\%>1l'. (#4854)
Add a windowID argument to placing a sign, so that it only shows up in one
window for the buffer.
Request to add sign_setlist() to make it faster to add a lot of signs, e.g.
when adding a sign for every quickfix entry. (#4557)
Win32 key codes are messy. Mike Williams tried to fix that, but now old
mappings no longer work. Create a new terminal for the better solution?
Compiler warnings (geeknik, 2017 Oct 26):
- signed integer overflow in do_sub() (#2249)
- signed integer overflow in get_address() (#2248)
- signed integer overflow in getdecchrs() (#2254)
- undefined left shift in get_string_tv() (#2250)
Win32 console: <F11> and <F12> typed in Insert mode don't result in normal
characters. (#3246)
'foldtext' is evaluated too often. (Daniel Hahler, #2773)
Add Native language protocol server (LSP) support. (Yegappan Lakshmanan, 2018
Oct 28)
ml_get error when using a Python script. (Yggdroot, 2017 Jun 1, #1737)
Lemonboy can reproduce (2017 Jun 5)
Also reproduced by Benjamin Doherty, 2018 Oct 4.
Simpler way: Ken Takata, Oct 6.
Add more testing of the GTK GUI.
- gtk_test_widget_click() can be used to simulate a click in a widget.
@@ -983,8 +909,6 @@ missing: --nofork, -A , -b, -h, etc.
":au * * command" should not be allowed, only use * for event when listing or
deleting autocmds, not when adding them.
Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
With 'foldmethod' "indent" and appending an empty line, what follows isn't
included in the existing fold. Deleting the empty line and undo fixes it.
(Oleg Koshovetc, 2018 Jul 15, #3214)
@@ -1006,9 +930,6 @@ Python indenting: alternative way to indent arguments:
http://orchistro.tistory.com/236
Should be supported with a flag.
Starting job with cwd option, when the directory does not exist, gives a
confusing error message. (Wang Shidong, 2018 Jan 2, #2519)
Add the debug command line history to viminfo.
Add Makefiles to the runtime/spell directory tree, since nobody uses Aap.
@@ -1029,9 +950,6 @@ With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
Using 'wildignore' also applies to literally entered file name. Also with
:drop (remote commands).
Inserting a line in a CompleteDone autocommand may confuse undo. (micbou,
2018 Jun 18, #3027)
Implement option_save() and option_restore():
option_restore({list}) *option_restore()*
Restore options previously saved by option_save().
@@ -1067,8 +985,6 @@ Also see #1689.
When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
highlighted. (van-de-bugger, 2018 Jan 23, #2576)
":file" does not show anything when 'shortmess' contains 'F'. (#3070)
No profile information for function that executes ":quit". (Daniel Hahler,
2017 Dec 26, #2501)
@@ -1079,9 +995,6 @@ Add script number to profile? (#3330 breaks tests).
A function defined locally and lambda's are not easily recognized.
Mention where they were defined somewhere.
Invalid range error when using BufWinLeave for closing terminal.
(Gabriel Barta, 2017 Nov 15, #2339)
ml_get errors with buggy script. (Dominique, 2017 Apr 30)
Error in emsg with buggy script. (Dominique, 2017 Apr 30)
@@ -1147,10 +1060,6 @@ line breaks. (Ken Takata, 2017 Aug 22)
The ":move" command does not honor closed folds. (Ryan Lue, #2351)
Patch to fix increment/decrement not working properly when 'virtualedit' is
set. (Hirohito Higashi, 2016 Aug 1, #923)
Was this fixed?
Cannot copy modeless selection when cursor is inside it. (lkintact, #2300)
Test_writefile_fails_conversion failure on Solaris because if different iconv
@@ -1190,9 +1099,6 @@ Patch from Christian Brabandt to preserve upper case marks when wiping out a
buffer. (2013 Dec 9)
Also fixes #2166?
Python: After "import vim" error messages only show the first line of the
stack trace. (Yggdroot, 2017 Jul 28, #1887)
Profile of a dict function is lost when the dict is deleted. Would it be
possible to collect this? (Daniel Hahler, #2350)
@@ -1203,8 +1109,6 @@ Patch to skip writing a temp file for diffing if the buffer is equal to the
existing file. (Akria Sheng, 2017 Jul 22)
Could also skip writing lines that are the same.
Patch with Files for Latvian language. (Vitolins, 2017 May 3, #1675)
MS-Windows: Opening same file in a second gvim hangs. (Sven Bruggemann, 2017
Jul 4)
@@ -1227,19 +1131,9 @@ Use gvimext.dll from the nightly build? (Issue #249)
Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May
8, #1690)
Bogus characters inserted when triggering indent while changing text.
(Vitor Antunes, 2016 Nov 22, #1269)
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)
Segmentation fault with complete(). (Lifepillar, 2017 Apr 29, #1668)
Check for "pat" to be NULL in search_for_exact_line()?
How did it get NULL? Comment by Christian, Apr 30.
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
@@ -1278,9 +1172,6 @@ Wrong diff highlighting with three files. (2016 Oct 20, #1186)
Also get E749 on exit.
Another example in #1309
When deleting a mark or register, leave a tombstone, so that it's also deleted
when writing viminfo (and the delete was the most recent action). #1339
Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15,
#1330)
@@ -1293,9 +1184,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)
@@ -1309,9 +1197,6 @@ Check for errors E704 and E705 only does VAR_FUNC, should also do VAR_PARTIAL.
(Nikolai Pavlov, 2017 Mar 13, #1557)
Make a function to check for function-like type?
Screen updated delayed when using CTRL-O u in Insert mode.
(Barlik, #1191) Perhaps because status message?
Implement named arguments for functions with optional arguments:
func Foo(start, count = 1, all = 1)
call Foo(12, all = 0)
@@ -1347,16 +1232,9 @@ Useful to restore it. Is there another solution?
Patch for wrong cursor position on wrapped line, involving breakindent.
(Ozaki Kiichi, 2016 Nov 25)
Does this also fix #1408 ?
'cursorline' and match interfere. (Ozaki Kiichi, 2017 Jun 23, #1792)
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)
@@ -1371,9 +1249,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)
@@ -1383,6 +1258,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)
@@ -1398,7 +1275,6 @@ is used. (Filipe Brandenburger, #7322)
gets redrawn in redraw_after_callback(). #6120
- Add a separate timeout for opening a socket. Currently it's fixed at 50
msec, which is too small for a remote connection. (tverniquet, #2130)
- Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
- Writing raw mode to a buffer should still handle NL characters as line
breaks. (Dmitry Zotikov, 2017 Aug 16)
- When out_cb executes :sleep, the close_cb may be invoked. (Daniel Hahler,
@@ -1475,9 +1351,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.
@@ -1514,11 +1387,6 @@ the system encoding (usually utf-8).
MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
Otherwise task flickers in taskbar.
Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925)
Have a way to get the call stack, in a function and from an exception.
#1125
Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
@@ -1578,10 +1446,6 @@ Mechelynck) Perhaps use exists("::tearoff") to check?
Use vim.vim syntax highlighting for help file examples, but without ":" in
'iskeyword' for syntax.
When command names are very long :command output is difficult to read. Use a
maximum for the column width? (#871)
Patcy by varmanishant, 2016 Jun 18, #876
Installation of .desktop files does not work everywhere.
It's now fixed, but the target directory probably isn't right.
Add configure check?
@@ -1598,12 +1462,6 @@ Especially useful when using 'linebreak'
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
directory exists. (Sergio Gallelli, 2013 Dec 29)
In debug mode one can inspect variables, but not the function parameters
(starting with a:). (Luc Hermitte, 2017 Jan 4, #1352)
If ":bd" also closes a Tab page then the " mark is not set. (Harm te Hennepe,
2016 Apr 25, #780)
Patch to avoid redrawing tabline when the popup menu is visible.
(Christian Brabandt, 2016 Jan 28)
@@ -1654,9 +1512,6 @@ Patch to add :mapgroup, put mappings in a group like augroup.
Value returned by virtcol() changes depending on how lines wrap. This is
inconsistent with the documentation.
Value of virtcol() for '[ and '] depend on multibyte character.
(Luchr, #277)
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.
@@ -1671,9 +1526,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)
@@ -1879,9 +1731,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
@@ -1926,10 +1775,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?
@@ -2390,10 +2235,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.
@@ -2539,6 +2380,7 @@ part of standard Vim. The "1 to "9 registers are not sufficient.
6 When yanking into the unnamed registers several times, somehow make the
previous contents also available (like it's done for deleting). What
register names to use? g"1, g"2, etc.?
Also do this for the small delete register "-.
After doing "su" $HOME can be the old user's home, thus ~root/file is not
correct. Don't use it in the swap file.
@@ -2783,10 +2625,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.
@@ -3295,15 +3133,11 @@ Quickfix/Location List:
window is cleared, to avoid going back to the list of errors buffer (would
have two windows with it). Can we just remove the jump list entries for
the quickfix buffer?
- Quickfix window height is not kept with a vertical split. (Lifepillar,
2018 Jun 10, #2998)
- When an item in the quickfix list has a file name that does not exist,
behave like the item was not a match for :cnext.
- When adding an item to a new quickfix list make ":cnext" jump to that
item. Make a difference being at the first item and not having used
:cnext at all. (Afanasiy Fet, 2017 Jan 3)
- This does not work: :set cscopequickfix=a-
(Linewi, 2015 Jul 12, #914)
- When opening quickfix window, disable spell checking?
- Patch for supporting count before CR in quickfix window. (AOYAMA Shotaro,
2007 Jan 1)
@@ -5085,6 +4919,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".
@@ -5182,6 +5033,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

@@ -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 08
*usr_41.txt* For Vim version 8.2. Last change: 2021 Feb 01
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
@@ -619,6 +620,8 @@ String manipulation: *string-functions*
submatch() get a specific match in ":s" and substitute()
strpart() get part of a string using byte index
strcharpart() get part of a string using char index
slice() take a slice of a string, using char index in
Vim9 script
strgetchar() get character from a string using char index
expand() expand special keywords
expandcmd() expand a command like done for `:edit`
@@ -640,6 +643,7 @@ List manipulation: *list-functions*
insert() insert an item somewhere in a List
add() append an item to a List
extend() append a List to a List
extendnew() make a new List and append items
remove() remove one or more items from a List
copy() make a shallow copy of a List
deepcopy() make a full copy of a List
@@ -647,6 +651,7 @@ List manipulation: *list-functions*
map() change each List item
mapnew() make a new List with changed items
reduce() reduce a List to a value
slice() take a slice of a List
sort() sort a List
reverse() reverse the order of a List
uniq() remove copies of repeated adjacent items
@@ -661,6 +666,7 @@ List manipulation: *list-functions*
count() count number of times a value appears in a List
repeat() repeat a List multiple times
flatten() flatten a List
flattennew() flatten a copy of a List
Dictionary manipulation: *dict-functions*
get() get an entry without an error for a wrong key
@@ -669,6 +675,7 @@ Dictionary manipulation: *dict-functions*
empty() check if Dictionary is empty
remove() remove an entry from a Dictionary
extend() add entries from one Dictionary to another
extendnew() make a new Dictionary and append items
filter() remove selected entries from a Dictionary
map() change each Dictionary entry
mapnew() make a new Dictionary with changed items
@@ -718,7 +725,8 @@ Other computation: *bitwise-function*
srand() initialize seed used by rand()
Variables: *var-functions*
type() type of a variable
type() type of a variable as a number
typename() type of a variable as text
islocked() check if a variable is locked
funcref() get a Funcref for a function reference
function() get a Funcref for a function name
@@ -817,6 +825,7 @@ System functions and manipulation of files:
setenv() set an environment variable
hostname() name of the system
readfile() read a file into a List of lines
readblob() read a file into a Blob
readdir() get a List of file names in a directory
readdirex() get a List of file information in a directory
writefile() write a List of lines or Blob into a file
@@ -875,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

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 8.2. Last change: 2020 Nov 16
*various.txt* For Vim version 8.2. Last change: 2021 Mar 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -345,8 +345,9 @@ N *+clientserver* Unix and Win32: Remote invocation |clientserver|
*+clipboard* |clipboard| support compiled-in
*+clipboard_working* |clipboard| support compiled-in and working
T *+cmdline_compl* command line completion |cmdline-completion|
S *+cmdline_hist* command line history |cmdline-history|
T *+cmdline_hist* command line history |cmdline-history|
N *+cmdline_info* |'showcmd'| and |'ruler'|
S *+cmdwin* |cmdline-window| support
T *+comments* |'comments'| support
B *+conceal* "conceal" support, see |conceal| |:syn-conceal| etc.
N *+cryptv* encryption support |encryption|
@@ -411,7 +412,7 @@ N *+mouse_sysmouse* Unix only: *BSD console mouse handling |sysmouse|
B *+mouse_sgr* Unix only: sgr mouse handling |sgr-mouse|
B *+mouse_urxvt* Unix only: urxvt mouse handling |urxvt-mouse|
N *+mouse_xterm* Unix only: xterm mouse handling |xterm-mouse|
N *+multi_byte* 16 and 32 bit characters |multibyte|
T *+multi_byte* Unicode support, 16 and 32 bit characters |multibyte|
*+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime|
N *+multi_lang* non-English language support |multi-lang|
m *+mzscheme* Mzscheme interface |mzscheme|
@@ -571,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
@@ -707,12 +708,12 @@ K Run a program to lookup the keyword under the
not more than one line.
[N]gs *gs* *:sl* *:sleep*
:[N]sl[eep] [N] [m] Do nothing for [N] seconds. When [m] is included,
:[N]sl[eep] [N][m] Do nothing for [N] seconds. When [m] is included,
sleep for [N] milliseconds. The count for "gs" always
uses seconds. The default is one second. >
:sleep "sleep for one second
:5sleep "sleep for five seconds
:sleep 100m "sleep for a hundred milliseconds
:sleep 100m "sleep for 100 milliseconds
10gs "sleep for ten seconds
< Can be interrupted with CTRL-C (CTRL-Break on
MS-Windows). "gs" stands for "goto sleep".
@@ -722,6 +723,9 @@ K Run a program to lookup the keyword under the
available when compiled with the |+netbeans_intg|
feature}
*:sl!* *:sleep!*
:[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
after the X server restarts, e.g. when running Vim for

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 Jan 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -9661,7 +9661,7 @@ Solution: Check for tcsetattr() to return an error, retry when it does.
Files: src/os_unix.c
Patch 6.2f.018
Problem: Mac OS X 10.2: OK is defined to zero in cursus.h while Vim uses
Problem: Mac OS X 10.2: OK is defined to zero in curses.h while Vim uses
one. Redefining it causes a warning message.
Solution: Undefine OK before defining it to one. (Taro Muraoka)
Files: src/vim.h

View File

@@ -16933,7 +16933,7 @@ Solution: Add #ifdefs.
Files: src/screen.c
Patch 8.0.0383 (after 8.0.0382)
Problem: Misplaced #ifdef. (Christ van Willigen)
Problem: Misplaced #ifdef. (Christ van Willegen)
Solution: Split assignment.
Files: src/screen.c
@@ -19612,7 +19612,7 @@ Files: Filelist
Patch 8.0.0815
Problem: Terminal window not correctly updated when 'statusline' invokes
":sleep". (NIkolay Pavlov)
":sleep". (Nikolay Pavlov)
Solution: Clear got_int. Repeat redrawing when needed.
Files: src/terminal.c

View File

@@ -1,4 +1,4 @@
*vi_diff.txt* For Vim version 8.2. Last change: 2020 Aug 15
*vi_diff.txt* For Vim version 8.2. Last change: 2021 Jan 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -73,7 +73,7 @@ edit the termcap entry and try again. Vim has the |terminal-options|.
Vim has only a few limits for the files that can be edited {Vi: can not handle
<Nul> characters and characters above 128, has limited line length, many other
limits}.
*E340*
Maximum line length 2147483647 characters. Longer lines are split.
Maximum number of lines 2147483647 lines.
Maximum file size 2147483647 bytes (2 Gbyte) when a long integer is

View File

@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 8.2. Last change: 2021 Jan 10
*vim9.txt* For Vim version 8.2. Last change: 2021 Mar 03
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.
@@ -272,8 +279,8 @@ 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.
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
@@ -300,14 +307,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.
@@ -334,7 +341,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()
@@ -403,10 +411,16 @@ Additionally, a lambda can contain statements in {}: >
}
NOT IMPLEMENTED YET
*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: >
({
key: value
})->method()
Automatic line continuation ~
@@ -487,6 +501,9 @@ Now "exit_cb: Func})" is actually a valid command: save any changes to the
file "_cb: Func})" and exit. To avoid this kind of mistake in Vim9 script
there must be white space between most command names and the argument.
However, the argument of a command that is a command won't be recognized. For
example, after "windo echo expr" a line break inside "expr" will not be seen.
Notes:
- "enddef" cannot be used at the start of a continuation line, it ends the
@@ -527,24 +544,31 @@ that using a literal key is much more common than using an expression, and
considering that JavaScript uses this syntax, using the {} form for dictionary
literals is considered a much more useful syntax. In Vim9 script the {} form
uses literal keys: >
let dict = {key: value}
var dict = {key: value}
This works for alphanumeric characters, underscore and dash. If you want to
use another character, use a single or double quoted string: >
let dict = {'key with space': value}
let dict = {"key\twith\ttabs": value}
let dict = {'': value} # empty key
var dict = {'key with space': value}
var dict = {"key\twith\ttabs": value}
var dict = {'': value} # empty key
In case the key needs to be an expression, square brackets can be used, just
like in JavaScript: >
let dict = {["key" .. nr]: value}
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 ~
@@ -552,6 +576,29 @@ Comparators ~
The 'ignorecase' option is not used for comparators that use strings.
For loop ~
Legacy Vim script has some tricks to make a for loop over a list handle
deleting items at the current or previous item. In Vim9 script it just uses
the index, if items are deleted then items in the list will be skipped.
Example legacy script: >
let l = [1, 2, 3, 4]
for i in l
echo i
call remove(l, index(l, i))
endfor
Would echo:
1
2
3
4
In compiled Vim9 script you get:
1
3
Generally, you should not change the list that is iterated over. Make a copy
first if needed.
White space ~
Vim9 script enforces proper use of white space. This is no longer allowed: >
@@ -576,15 +623,17 @@ the start and end: >
White space is not allowed:
- Between a function name and the "(": >
call Func (arg) # Error!
call Func
Func (arg) # Error!
Func
\ (arg) # Error!
call Func(arg) # OK
call Func(
\ arg) # OK
call Func(
\ arg # OK
\ )
Func
(arg) # Error!
Func(arg) # OK
Func(
arg) # OK
Func(
arg # OK
)
Conditions and expressions ~
@@ -648,12 +697,14 @@ 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()|.
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
@@ -670,21 +721,22 @@ same time tries to support the legacy Vim commands. Some compromises had to
be made. Here is a summary of what might be unexpected.
Ex command ranges need to be prefixed with a colon. >
-> # legacy Vim: shifts the previous line to the right
->func() # Vim9: method call in continuation line
:-> # Vim9: shifts the previous line to the right
-> legacy Vim: shifts the previous line to the right
->func() Vim9: method call in a continuation line
:-> Vim9: shifts the previous line to the right
%s/a/b # legacy Vim: substitute on all lines
%s/a/b legacy Vim: substitute on all lines
x = alongname
% another # Vim9: line continuation without a backslash
:%s/a/b # Vim9: substitute on all lines
'text'->func() # Vim9: method call
:'t # legacy Vim: jump to mark m
% another Vim9: modulo operator in a continuation line
:%s/a/b Vim9: substitute on all lines
't legacy Vim: jump to mark t
'text'->func() Vim9: method call
:'t Vim9: jump to mark t
Some Ex commands can be confused with assignments in Vim9 script: >
g:name = value # assignment
g:pattern:cmd # invalid command - ERROR
:g:pattern:cmd # :global command
g:name = value # assignment
g:pattern:cmd # invalid command - ERROR
:g:pattern:cmd # :global command
Functions defined with `:def` compile the whole function. Legacy functions
can bail out, and the following lines are not parsed: >
@@ -704,7 +756,7 @@ Vim9 functions are compiled as a whole: >
For a workaround, split it in two functions: >
func Maybe()
if has('feature')
call MaybyInner()
call MaybeInner()
endif
endfunc
if has('feature')
@@ -720,7 +772,7 @@ evaluates to false: >
endif
enddef
< *vim9-user-command*
Another side effect of compiling a function is that the precense of a user
Another side effect of compiling a function is that the presence of a user
command is checked at compile time. If the user command is defined later an
error will result. This works: >
command -nargs=1 MyCommand echom <q-args>
@@ -750,6 +802,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 adoptor of
Vim9 script: https://github.com/lacygoill/wiki/blob/master/vim/vim9.md
==============================================================================
@@ -793,6 +847,8 @@ 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 adoptor 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
@@ -811,6 +867,9 @@ prefix and they do not need to exist (they can be deleted any time).
Note that for command line completion of {func} you
can prepend "s:" to find script-local functions.
:disa[ssemble]! {func} Like `:disassemble` but with the instructions used for
profiling.
Limitations ~
Local variables will not be visible to string evaluation. For example: >
@@ -976,10 +1035,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.
==============================================================================
@@ -999,9 +1062,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
@@ -1019,7 +1082,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 ~
@@ -1033,7 +1119,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.
@@ -1090,7 +1176,7 @@ actually needed. A recommended mechanism:
1. In the plugin define user commands, functions and/or mappings that refer to
an autoload script. >
command -nargs=1 SearchForStuff call searchfor#Stuff(<f-args>)
command -nargs=1 SearchForStuff searchfor#Stuff(<f-args>)
< This goes in .../plugin/anyname.vim. "anyname.vim" can be freely chosen.
@@ -1183,12 +1269,12 @@ When compiling lines of Vim commands into instructions as much as possible
should be done at compile time. Postponing it to runtime makes the execution
slower and means mistakes are found only later. For example, when
encountering the "+" character and compiling this into a generic add
instruction, at execution time the instruction would have to inspect the type
of the arguments and decide what kind of addition to do. And when the
type is dictionary throw an error. If the types are known to be numbers then
an "add number" instruction can be used, which is faster. The error can be
given at compile time, no error handling is needed at runtime, since adding
two numbers cannot fail.
instruction, at runtime the instruction would have to inspect the type of the
arguments and decide what kind of addition to do. And when the type is
dictionary throw an error. If the types are known to be numbers then an "add
number" instruction can be used, which is faster. The error can be given at
compile time, no error handling is needed at runtime, since adding two numbers
cannot fail.
The syntax for types, using <type> for compound types, is similar to Java. It
is easy to understand and widely used. The type names are what were used in

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 Feb 06
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|.

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 Dec 24
" Last Change: 2021 Mar 12
" 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
@@ -589,6 +595,9 @@ au BufNewFile,BufRead *.fan,*.fwt setf fan
" Factor
au BufNewFile,BufRead *.factor setf factor
" Fennel
autocmd BufRead,BufNewFile *.fnl setf fennel
" Fetchmail RC file
au BufNewFile,BufRead .fetchmailrc setf fetchmail
@@ -1173,8 +1182,11 @@ au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp
" Password file
au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd
" Pascal (also *.p)
au BufNewFile,BufRead *.pas,*.pp setf pascal
" Pascal (also *.p, *.pp, *.inc)
au BufNewFile,BufRead *.pas setf pascal
" Pascal or Puppet manifest
au BufNewFile,BufRead *.pp call dist#ft#FTpp()
" Delphi or Lazarus program file
au BufNewFile,BufRead *.dpr,*.lpr setf pascal
@@ -1264,7 +1276,7 @@ au BufNewFile,BufRead *.pov setf pov
" Povray configuration
au BufNewFile,BufRead .povrayrc setf povini
" Povray, PHP or assembly
" Povray, Pascal, PHP or assembly
au BufNewFile,BufRead *.inc call dist#ft#FTinc()
" Printcap and Termcap
@@ -1273,13 +1285,19 @@ au BufNewFile,BufRead *printcap
au BufNewFile,BufRead *termcap
\ let b:ptcap_type = "term" | setf ptcap
" PCCTS / ANTRL
"au BufNewFile,BufRead *.g setf antrl
" PCCTS / ANTLR
"au BufNewFile,BufRead *.g setf antlr
au BufNewFile,BufRead *.g setf pccts
" PPWizard
au BufNewFile,BufRead *.it,*.ih setf ppwiz
" Puppet
au BufNewFile,BufRead Puppetfile setf ruby
" Embedded Puppet
au BufNewFile,BufRead *.epp setf epuppet
" Obj 3D file format
" TODO: is there a way to avoid MS-Windows Object files?
au BufNewFile,BufRead *.obj setf obj
@@ -1319,6 +1337,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
@@ -1376,6 +1397,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
@@ -1422,8 +1446,8 @@ au BufNewFile,BufRead *.rb,*.rbw setf ruby
" RubyGems
au BufNewFile,BufRead *.gemspec setf ruby
" Rust
au BufNewFile,BufRead *.rs setf rust
" RBS (Ruby Signature)
au BufNewFile,BufRead *.rbs setf rbs
" Rackup
au BufNewFile,BufRead *.ru setf ruby
@@ -1437,6 +1461,9 @@ au BufNewFile,BufRead *.builder,*.rxml,*.rjs setf ruby
" Rantfile and Rakefile is like Ruby
au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake setf ruby
" Rust
au BufNewFile,BufRead *.rs setf rust
" S-lang (or shader language, or SmallLisp)
au BufNewFile,BufRead *.sl setf slang
@@ -1473,6 +1500,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
@@ -1616,6 +1646,9 @@ au BufNewFile,BufRead *.mib,*.my setf mib
au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog
au BufNewFile,BufRead *.rules call dist#ft#FTRules()
" SPARQL queries
au BufNewFile,BufRead *.rq,*.sparql setf sparql
" Spec (Linux RPM)
au BufNewFile,BufRead *.spec setf spec
@@ -1726,8 +1759,13 @@ au BufNewFile,BufRead *.tli setf tli
" Telix Salt
au BufNewFile,BufRead *.slt setf tsalt
" Tera Term Language
au BufRead,BufNewFile *.ttl setf teraterm
" Tera Term Language or Turtle
au BufRead,BufNewFile *.ttl
\ if getline(1) =~ '^@\?\(prefix\|base\)' |
\ setf turtle |
\ else |
\ setf teraterm |
\ endif
" Terminfo
au BufNewFile,BufRead *.ti setf terminfo

View File

@@ -159,40 +159,41 @@ if exists("g:ada_abbrev")
endif
" Section: Commands, Mapping, Menus {{{1
"
call ada#Map_Popup (
\ 'Tag.List',
\ 'l',
\ 'call ada#List_Tag ()')
call ada#Map_Popup (
\'Tag.Jump',
\'j',
\'call ada#Jump_Tag ()')
call ada#Map_Menu (
\'Tag.Create File',
\':AdaTagFile',
\'call ada#Create_Tags (''file'')')
call ada#Map_Menu (
\'Tag.Create Dir',
\':AdaTagDir',
\'call ada#Create_Tags (''dir'')')
if !exists(':AdaTagFile')
call ada#Map_Popup (
\ 'Tag.List',
\ 'l',
\ 'call ada#List_Tag ()')
call ada#Map_Popup (
\'Tag.Jump',
\'j',
\'call ada#Jump_Tag ()')
call ada#Map_Menu (
\'Tag.Create File',
\':AdaTagFile',
\'call ada#Create_Tags (''file'')')
call ada#Map_Menu (
\'Tag.Create Dir',
\':AdaTagDir',
\'call ada#Create_Tags (''dir'')')
call ada#Map_Menu (
\'Highlight.Toggle Space Errors',
\ ':AdaSpaces',
\'call ada#Switch_Syntax_Option (''space_errors'')')
call ada#Map_Menu (
\'Highlight.Toggle Lines Errors',
\ ':AdaLines',
\'call ada#Switch_Syntax_Option (''line_errors'')')
call ada#Map_Menu (
\'Highlight.Toggle Rainbow Color',
\ ':AdaRainbow',
\'call ada#Switch_Syntax_Option (''rainbow_color'')')
call ada#Map_Menu (
\'Highlight.Toggle Standard Types',
\ ':AdaTypes',
\'call ada#Switch_Syntax_Option (''standard_types'')')
call ada#Map_Menu (
\'Highlight.Toggle Space Errors',
\ ':AdaSpaces',
\'call ada#Switch_Syntax_Option (''space_errors'')')
call ada#Map_Menu (
\'Highlight.Toggle Lines Errors',
\ ':AdaLines',
\'call ada#Switch_Syntax_Option (''line_errors'')')
call ada#Map_Menu (
\'Highlight.Toggle Rainbow Color',
\ ':AdaRainbow',
\'call ada#Switch_Syntax_Option (''rainbow_color'')')
call ada#Map_Menu (
\'Highlight.Toggle Standard Types',
\ ':AdaTypes',
\'call ada#Switch_Syntax_Option (''standard_types'')')
endif
" 1}}}
" Reset cpoptions

View File

@@ -0,0 +1,27 @@
" Vim filetype plugin file
" Language: BASIC
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2015 Jan 10
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=:REM,:'
setlocal commentstring='\ %s
setlocal formatoptions-=t formatoptions+=croql
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "BASIC Source Files (*.bas)\t*.bas\n" .
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl fo< com< cms< sua<" .
\ " | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Bazel (http://bazel.io)
" Maintainer: David Barnett (https://github.com/google/vim-ft-bzl)
" Last Change: 2015 Aug 11
" Last Change: 2021 Jan 19
""
" @section Introduction, intro
@@ -51,6 +51,8 @@ if get(g:, 'ft_bzl_fold', 0)
endif
if exists('*BzlFoldText')
let &cpo = s:save_cpo
unlet s:save_cpo
finish
endif

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

@@ -3,14 +3,14 @@
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-19
let s:cpo_save = &cpo
set cpo&vim
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
let b:undo_ftplugin = "setl com< cms< fo< inc< | unlet! b:matchwords"
setlocal comments=s1:/*,mb:*,ex:*/,:// commentstring=/*\ %s\ */

View File

@@ -0,0 +1,13 @@
" Vim filetype plugin file
" Language: FreeBasic
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2015 Jan 10
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
runtime! ftplugin/basic.vim
" vim: ts=8

View File

@@ -2,7 +2,7 @@
" Language: Hamster Script
" Version: 2.0.6.0
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
" Last Change: 2017 Mar 18
" Last Change: 2021 Jan 19
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -57,6 +57,9 @@ if exists("loaded_matchit")
endif
setlocal ignorecase
let &cpo = s:cpo_save
unlet s:cpo_save
setlocal cpo+=M " makes \%( match \)
" Disabled, 'cpo' is a global option.
" setlocal cpo+=M " makes \%( match \)

View File

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

View File

@@ -159,6 +159,8 @@ let b:undo_ftplugin = "setlocal efm< foldmethod< foldexpr<"
" - Only definitions below, executed once -------------------------------------
if exists("*OMLetFoldLevel")
let &cpoptions = s:cposet
unlet s:cposet
finish
endif
@@ -635,7 +637,7 @@ endfunction
nnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("normal")<CR>
xnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("visual")<CR>`<
let &cpoptions=s:cposet
let &cpoptions = s:cposet
unlet s:cposet
" vim:sw=2 fdm=indent

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

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

@@ -0,0 +1,32 @@
" Vim filetype plugin file
" Language: HMTL Tidy Configuration
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2020 Sep 4
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=:#,://
setlocal commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "HTML Tidy Files (tidyrc, .tidyrc, tidy.conf)\ttidyrc;.tidyrc;tidy.conf\n" .
\ "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
\ "XHTML Files (*.xhtml, *.xhtm)\t*.xhtml;*.xhtm\n" .
\ "XML Files (*.xml)\t*.xml\n" .
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl fo< com< cms<" .
\ " | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Jan 05
" Last Change: 2021 Feb 20
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -51,12 +51,12 @@ setlocal keywordprg=:help
if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>'
" Set 'comments' to format dashed lists in comments
setlocal com=sO:#\ -,mO:#\ \ ,eO:##,:#
" Comments start with a double quote in a legacy script;
" with # in a Vim9 script
setlocal commentstring=\"%s
else
setlocal com=sO:\"\ -,mO:\"\ \ ,:\"
" Comments starts with # in Vim9 script
setlocal commentstring=#%s
else
setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"
" Comments starts with a double quote in legacy script
setlocal commentstring=\"%s
endif
@@ -88,8 +88,13 @@ endif
" Let the matchit plugin know what items can be matched.
if exists("loaded_matchit")
let b:match_ignorecase = 0
" "func" can also be used as a type:
" var Ref: func
" or to list functions:
" func name
" require a parenthesis following, then there can be an "endfunc".
let b:match_words =
\ '\<\%(fu\%[nction]\|def\)\>)\@!:\<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

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

@@ -74,11 +74,15 @@ endif
if (b:fortran_fixed_source == 1)
setlocal indentexpr=FortranGetFixedIndent()
if exists("*FortranGetFixedIndent")
let &cpoptions = s:cposet
unlet s:cposet
finish
endif
else
setlocal indentexpr=FortranGetFreeIndent()
if exists("*FortranGetFreeIndent")
let &cpoptions = s:cposet
unlet s:cposet
finish
endif
endif
@@ -213,7 +217,7 @@ function FortranGetFixedIndent()
return ind
endfunction
let &cpoptions=s:cposet
let &cpoptions = s:cposet
unlet s:cposet
" vim:sw=2 tw=130

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

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

@@ -10,6 +10,26 @@ let cmd =
\ 'some '
\ 'string'
if 1
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

@@ -10,6 +10,26 @@ let cmd =
\ 'some '
\ 'string'
if 1
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

@@ -1,7 +1,7 @@
" Vim indent file
" Language: Vim script
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Jan 06
" Last Change: 2021 Feb 18
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -38,6 +38,9 @@ function GetVimIndentIntern()
" Find a non-blank line above the current line.
let lnum = prevnonblank(v:lnum - 1)
" The previous line, ignoring line continuation
let prev_text_end = lnum > 0 ? getline(lnum) : ''
" If the current line doesn't start with '\' or '"\ ' and below a line that
" starts with '\' or '"\ ', use the indent of the line above it.
let cur_text = getline(v:lnum)
@@ -51,6 +54,8 @@ function GetVimIndentIntern()
if lnum == 0
return 0
endif
" the start of the previous line, skipping over line continuation
let prev_text = getline(lnum)
let found_cont = 0
@@ -94,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()
@@ -147,13 +154,17 @@ function GetVimIndentIntern()
endif
" Below a line starting with "]" we must be below the end of a list.
if prev_text =~ '^\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 =~ '[{[]\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

@@ -2,16 +2,13 @@
" Language: YAML
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
" Last Update: Lukas Reineke
" Last Change: 2020 Jun 07
" Last Change: 2021 Jan 19
" Only load this indent file when no other was loaded.
if exists('b:did_indent')
finish
endif
let s:save_cpo = &cpo
set cpo&vim
let b:did_indent = 1
setlocal indentexpr=GetYAMLIndent(v:lnum)
@@ -25,6 +22,9 @@ if exists('*GetYAMLIndent')
finish
endif
let s:save_cpo = &cpo
set cpo&vim
function s:FindPrevLessIndentedLine(lnum, ...)
let prevlnum = prevnonblank(a:lnum-1)
let curindent = a:0 ? a:1 : indent(a:lnum)

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
@@ -182,6 +182,14 @@ if s:line1 =~# "^#!"
elseif s:name =~# 'clojure'
set ft=clojure
" Free Pascal
elseif s:name =~# 'instantfpc\>'
set ft=pascal
" Fennel
elseif s:name =~# 'fennel\>'
set ft=fennel
endif
unlet s:name

View File

@@ -1,14 +1,16 @@
" Vim syntax file
" Language: BASIC
" Maintainer: Allan Kelly <allan@fruitloaf.co.uk>
" Last Change: 2011 Dec 25 by Thilo Six
" Language: BASIC
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Allan Kelly <allan@fruitloaf.co.uk>
" Contributors: Thilo Six
" Last Change: 2015 Jan 10
" First version based on Micro$soft QBASIC circa 1989, as documented in
" 'Learn BASIC Now' by Halvorson&Rygmyr. Microsoft Press 1989.
" This syntax file not a complete implementation yet. Send suggestions to the
" maintainer.
" quit when a syntax file was already loaded
" Prelude {{{1
if exists("b:current_syntax")
finish
endif
@@ -16,7 +18,7 @@ endif
let s:cpo_save = &cpo
set cpo&vim
" A bunch of useful BASIC keywords
" Keywords {{{1
syn keyword basicStatement BEEP beep Beep BLOAD bload Bload BSAVE bsave Bsave
syn keyword basicStatement CALL call Call ABSOLUTE absolute Absolute
syn keyword basicStatement CHAIN chain Chain CHDIR chdir Chdir
@@ -116,32 +118,39 @@ syn keyword basicFunction RIGHT$ right$ Right$ RTRIM$ rtrim$ Rtrim$
syn keyword basicFunction SPACE$ space$ Space$ STR$ str$ Str$
syn keyword basicFunction STRING$ string$ String$ TIME$ time$ Time$
syn keyword basicFunction UCASE$ ucase$ Ucase$ VARPTR$ varptr$ Varptr$
syn keyword basicTodo contained TODO
"integer number, or floating point number without a dot.
" Numbers {{{1
" Integer number, or floating point number without a dot.
syn match basicNumber "\<\d\+\>"
"floating point number, with dot
" Floating point number, with dot
syn match basicNumber "\<\d\+\.\d*\>"
"floating point number, starting with a dot
" Floating point number, starting with a dot
syn match basicNumber "\.\d\+\>"
" String and Character contstants
syn match basicSpecial contained "\\\d\d\d\|\\."
syn region basicString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=basicSpecial
" String and Character constants {{{1
syn match basicSpecial "\\\d\d\d\|\\." contained
syn region basicString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=basicSpecial
syn region basicComment start="REM" end="$" contains=basicTodo
syn region basicComment start="^[ \t]*'" end="$" contains=basicTodo
" Line numbers {{{1
syn region basicLineNumber start="^\d" end="\s"
syn match basicTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1
" Data-type suffixes {{{1
syn match basicTypeSpecifier "[a-zA-Z0-9][$%&!#]"ms=s+1
" Used with OPEN statement
syn match basicFilenumber "#\d\+"
"syn sync ccomment basicComment
" Mathematical operators {{{1
" syn match basicMathsOperator "[<>+\*^/\\=-]"
syn match basicMathsOperator "-\|=\|[:<>+\*^/\\]\|AND\|OR"
syn match basicMathsOperator "-\|=\|[:<>+\*^/\\]\|AND\|OR"
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
" Comments {{{1
syn keyword basicTodo TODO FIXME XXX NOTE contained
syn region basicComment start="^\s*\zsREM\>" start="\%(:\s*\)\@<=REM\>" end="$" contains=basicTodo
syn region basicComment start="'" end="$" contains=basicTodo
"syn sync ccomment basicComment
" Default Highlighting {{{1
hi def link basicLabel Label
hi def link basicConditional Conditional
hi def link basicRepeat Repeat
@@ -150,17 +159,18 @@ hi def link basicNumber Number
hi def link basicError Error
hi def link basicStatement Statement
hi def link basicString String
hi def link basicComment Comment
hi def link basicSpecial Special
hi def link basicComment Comment
hi def link basicSpecial Special
hi def link basicTodo Todo
hi def link basicFunction Identifier
hi def link basicTypeSpecifier Type
hi def link basicFilenumber basicTypeSpecifier
hi def link basicFunction Identifier
hi def link basicTypeSpecifier Type
hi def link basicFilenumber basicTypeSpecifier
"hi basicMathsOperator term=bold cterm=bold gui=bold
" Postscript {{{1
let b:current_syntax = "basic"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 Aug 28
" Last Change: 2021 Jan 11
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -13,6 +13,9 @@ set cpo&vim
let s:ft = matchstr(&ft, '^\([^.]\)\+')
" check if this was included from cpp.vim
let s:in_cpp_family = exists("b:filetype_in_cpp_family")
" Optional embedded Autodoc parsing
" To enable it add: let g:c_autodoc = 1
" to your .vimrc
@@ -55,7 +58,7 @@ if !exists("c_no_cformat")
endif
" cCppString: same as cString, but ends at end of line
if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
if s:in_cpp_family && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
" ISO C++11
syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
@@ -87,7 +90,7 @@ syn match cSpecialCharacter display "L\='\\\o\{1,3}'"
syn match cSpecialCharacter display "'\\x\x\{1,2}'"
syn match cSpecialCharacter display "L'\\x\x\+'"
if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11"))
if (s:ft ==# "c" && !exists("c_no_c11")) || (s:in_cpp_family && !exists("cpp_no_cpp11"))
" ISO C11 or ISO C++ 11
if exists("c_no_cformat")
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
@@ -130,7 +133,7 @@ endif
" But avoid matching <::.
syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
if exists("c_no_curly_error")
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
if s:in_cpp_family && !exists("cpp_no_cpp11")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
@@ -144,7 +147,7 @@ if exists("c_no_curly_error")
syn match cErrInParen display contained "^[{}]\|^<%\|^%>"
endif
elseif exists("c_no_bracket_error")
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
if s:in_cpp_family && !exists("cpp_no_cpp11")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
@@ -158,7 +161,7 @@ elseif exists("c_no_bracket_error")
syn match cErrInParen display contained "[{}]\|<%\|%>"
endif
else
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11")
if s:in_cpp_family && !exists("cpp_no_cpp11")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
@@ -278,7 +281,7 @@ syn keyword cStorageClass static register auto volatile extern const
if exists("c_gnu")
syn keyword cStorageClass inline __attribute__
endif
if !exists("c_no_c99") && s:ft !=# 'cpp'
if !exists("c_no_c99") && !s:in_cpp_family
syn keyword cStorageClass inline restrict
endif
if !exists("c_no_c11")
@@ -420,7 +423,7 @@ endif
syn cluster cLabelGroup contains=cUserLabel
syn match cUserCont display "^\s*\zs\I\i*\s*:$" contains=@cLabelGroup
syn match cUserCont display ";\s*\zs\I\i*\s*:$" contains=@cLabelGroup
if s:ft ==# 'cpp'
if s:in_cpp_family
syn match cUserCont display "^\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
syn match cUserCont display ";\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
else

File diff suppressed because one or more lines are too long

View File

@@ -2,13 +2,16 @@
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
" Last Change: 2019 Dec 18
" Last Change: 2021 Jan 12
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
" inform C syntax that the file was included from cpp.vim
let b:filetype_in_cpp_family = 1
" Read the C syntax to start with
runtime! syntax/c.vim
unlet b:current_syntax

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

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

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'

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,8 +1,9 @@
" Vim syntax file
" Language: HMTL Tidy configuration file (/etc/tidyrc ~/.tidyrc)
" Language: HMTL Tidy Configuration
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2016 Apr 24
" Last Change: 2020 Sep 4
" Preamble {{{1
if exists("b:current_syntax")
finish
endif
@@ -12,10 +13,15 @@ set cpo&vim
syn iskeyword @,48-57,-,_
" Values {{{1
syn match tidyWordSeparator contained ",\|\s" nextgroup=tidyWord skipwhite skipnl
syn match tidyMuteIDSeparator contained ",\|\s" nextgroup=tidyMuteID skipwhite skipnl
syn case ignore
syn keyword tidyBoolean contained t[rue] f[alse] y[es] n[o] 1 0
syn keyword tidyAutoBoolean contained t[rue] f[alse] y[es] n[o] 1 0 auto
syn case match
syn keyword tidyCustomTags contained no blocklevel empty inline pre
syn keyword tidyDoctype contained html5 omit auto strict loose transitional user
syn keyword tidyEncoding contained raw ascii latin0 latin1 utf8 iso2022 mac win1252 ibm858 utf16le utf16be utf16 big5 shiftjis
syn keyword tidyNewline contained LF CRLF CR
@@ -24,36 +30,148 @@ syn keyword tidyRepeat contained keep-first keep-last
syn keyword tidySorter contained alpha none
syn region tidyString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline
syn region tidyString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ oneline
syn match tidyTags contained "\<\w\+\(\s*,\s*\w\+\)*\>"
" Tag and attribute lists
syn match tidyWord contained "\<\k\+\>:\@!" nextgroup=tidyWordSeparator skipwhite skipnl
syn keyword tidyBooleanOption add-xml-decl add-xml-pi add-xml-space
\ anchor-as-name ascii-chars assume-xml-procins bare break-before-br
\ clean coerce-endtags decorate-inferred-ul drop-empty-paras
\ drop-empty-elements drop-font-tags drop-proprietary-attributes
\ enclose-block-text enclose-text escape-cdata escape-scripts
\ fix-backslash fix-bad-comments fix-uri force-output gdoc gnu-emacs
\ hide-comments hide-endtags indent-attributes indent-cdata
\ indent-with-tabs input-xml join-classes join-styles keep-time
\ language literal-attributes logical-emphasis lower-literals markup
\ merge-emphasis ncr numeric-entities omit-optional-tags output-html
\ output-xhtml output-xml preserve-entities punctuation-wrap quiet
\ quote-ampersand quote-marks quote-nbsp raw replace-color show-info
\ show-warnings skip-nested split strict-tags-attributes tidy-mark
\ uppercase-attributes uppercase-tags word-2000 wrap-asp
\ wrap-attributes wrap-jste wrap-php wrap-script-literals
\ wrap-sections write-back
" Mute Message IDs {{{2
syn keyword tidyMuteID ADDED_MISSING_CHARSET ANCHOR_DUPLICATED
\ ANCHOR_NOT_UNIQUE APOS_UNDEFINED APPLET_MISSING_ALT AREA_MISSING_ALT
\ ASCII_REQUIRES_DESCRIPTION ASSOCIATE_LABELS_EXPLICITLY
\ ASSOCIATE_LABELS_EXPLICITLY_FOR ASSOCIATE_LABELS_EXPLICITLY_ID
\ ATTRIBUTE_IS_NOT_ALLOWED ATTRIBUTE_VALUE_REPLACED
\ ATTR_VALUE_NOT_LCASE AUDIO_MISSING_TEXT_AIFF AUDIO_MISSING_TEXT_AU
\ AUDIO_MISSING_TEXT_RA AUDIO_MISSING_TEXT_RM AUDIO_MISSING_TEXT_SND
\ AUDIO_MISSING_TEXT_WAV BACKSLASH_IN_URI BAD_ATTRIBUTE_VALUE
\ BAD_ATTRIBUTE_VALUE_REPLACED BAD_CDATA_CONTENT BAD_SUMMARY_HTML5
\ BAD_SURROGATE_LEAD BAD_SURROGATE_PAIR BAD_SURROGATE_TAIL
\ CANT_BE_NESTED COERCE_TO_ENDTAG COLOR_CONTRAST_ACTIVE_LINK
\ COLOR_CONTRAST_LINK COLOR_CONTRAST_TEXT COLOR_CONTRAST_VISITED_LINK
\ CONTENT_AFTER_BODY CUSTOM_TAG_DETECTED DATA_TABLE_MISSING_HEADERS
\ DATA_TABLE_MISSING_HEADERS_COLUMN DATA_TABLE_MISSING_HEADERS_ROW
\ DATA_TABLE_REQUIRE_MARKUP_COLUMN_HEADERS
\ DATA_TABLE_REQUIRE_MARKUP_ROW_HEADERS DISCARDING_UNEXPECTED
\ DOCTYPE_AFTER_TAGS DOCTYPE_MISSING DUPLICATE_FRAMESET
\ ELEMENT_NOT_EMPTY ELEMENT_VERS_MISMATCH_ERROR
\ ELEMENT_VERS_MISMATCH_WARN ENCODING_MISMATCH
\ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_APPLET
\ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_EMBED
\ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_OBJECT
\ ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_SCRIPT ESCAPED_ILLEGAL_URI
\ FILE_CANT_OPEN FILE_CANT_OPEN_CFG FILE_NOT_FILE FIXED_BACKSLASH
\ FOUND_STYLE_IN_BODY FRAME_MISSING_LONGDESC FRAME_MISSING_NOFRAMES
\ FRAME_MISSING_TITLE FRAME_SRC_INVALID FRAME_TITLE_INVALID_NULL
\ FRAME_TITLE_INVALID_SPACES HEADERS_IMPROPERLY_NESTED
\ HEADER_USED_FORMAT_TEXT ID_NAME_MISMATCH ILLEGAL_NESTING
\ ILLEGAL_URI_CODEPOINT ILLEGAL_URI_REFERENCE
\ IMAGE_MAP_SERVER_SIDE_REQUIRES_CONVERSION
\ IMG_ALT_SUSPICIOUS_FILENAME IMG_ALT_SUSPICIOUS_FILE_SIZE
\ IMG_ALT_SUSPICIOUS_PLACEHOLDER IMG_ALT_SUSPICIOUS_TOO_LONG
\ IMG_BUTTON_MISSING_ALT IMG_MAP_CLIENT_MISSING_TEXT_LINKS
\ IMG_MAP_SERVER_REQUIRES_TEXT_LINKS IMG_MISSING_ALT IMG_MISSING_DLINK
\ IMG_MISSING_LONGDESC IMG_MISSING_LONGDESC_DLINK
\ INFORMATION_NOT_CONVEYED_APPLET INFORMATION_NOT_CONVEYED_IMAGE
\ INFORMATION_NOT_CONVEYED_INPUT INFORMATION_NOT_CONVEYED_OBJECT
\ INFORMATION_NOT_CONVEYED_SCRIPT INSERTING_AUTO_ATTRIBUTE
\ INSERTING_TAG INVALID_ATTRIBUTE INVALID_NCR INVALID_SGML_CHARS
\ INVALID_UTF16 INVALID_UTF8 INVALID_XML_ID JOINING_ATTRIBUTE
\ LANGUAGE_INVALID LANGUAGE_NOT_IDENTIFIED
\ LAYOUT_TABLES_LINEARIZE_PROPERLY LAYOUT_TABLE_INVALID_MARKUP
\ LINK_TEXT_MISSING LINK_TEXT_NOT_MEANINGFUL
\ LINK_TEXT_NOT_MEANINGFUL_CLICK_HERE LINK_TEXT_TOO_LONG
\ LIST_USAGE_INVALID_LI LIST_USAGE_INVALID_OL LIST_USAGE_INVALID_UL
\ MALFORMED_COMMENT MALFORMED_COMMENT_DROPPING MALFORMED_COMMENT_EOS
\ MALFORMED_COMMENT_WARN MALFORMED_DOCTYPE METADATA_MISSING
\ METADATA_MISSING_REDIRECT_AUTOREFRESH MISMATCHED_ATTRIBUTE_ERROR
\ MISMATCHED_ATTRIBUTE_WARN MISSING_ATTRIBUTE MISSING_ATTR_VALUE
\ MISSING_DOCTYPE MISSING_ENDTAG_BEFORE MISSING_ENDTAG_FOR
\ MISSING_ENDTAG_OPTIONAL MISSING_IMAGEMAP MISSING_QUOTEMARK
\ MISSING_QUOTEMARK_OPEN MISSING_SEMICOLON MISSING_SEMICOLON_NCR
\ MISSING_STARTTAG MISSING_TITLE_ELEMENT MOVED_STYLE_TO_HEAD
\ MULTIMEDIA_REQUIRES_TEXT NESTED_EMPHASIS NESTED_QUOTATION
\ NEWLINE_IN_URI NEW_WINDOWS_REQUIRE_WARNING_BLANK
\ NEW_WINDOWS_REQUIRE_WARNING_NEW NOFRAMES_CONTENT
\ NOFRAMES_INVALID_CONTENT NOFRAMES_INVALID_LINK
\ NOFRAMES_INVALID_NO_VALUE NON_MATCHING_ENDTAG OBJECT_MISSING_ALT
\ OBSOLETE_ELEMENT OPTION_REMOVED OPTION_REMOVED_APPLIED
\ OPTION_REMOVED_UNAPPLIED POTENTIAL_HEADER_BOLD
\ POTENTIAL_HEADER_ITALICS POTENTIAL_HEADER_UNDERLINE
\ PREVIOUS_LOCATION PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_APPLET
\ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_EMBED
\ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_OBJECT
\ PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_SCRIPT PROPRIETARY_ATTRIBUTE
\ PROPRIETARY_ATTR_VALUE PROPRIETARY_ELEMENT REMOVED_HTML5
\ REMOVE_AUTO_REDIRECT REMOVE_AUTO_REFRESH REMOVE_BLINK_MARQUEE
\ REMOVE_FLICKER_ANIMATED_GIF REMOVE_FLICKER_APPLET
\ REMOVE_FLICKER_EMBED REMOVE_FLICKER_OBJECT REMOVE_FLICKER_SCRIPT
\ REPEATED_ATTRIBUTE REPLACE_DEPRECATED_HTML_APPLET
\ REPLACE_DEPRECATED_HTML_BASEFONT REPLACE_DEPRECATED_HTML_CENTER
\ REPLACE_DEPRECATED_HTML_DIR REPLACE_DEPRECATED_HTML_FONT
\ REPLACE_DEPRECATED_HTML_ISINDEX REPLACE_DEPRECATED_HTML_MENU
\ REPLACE_DEPRECATED_HTML_S REPLACE_DEPRECATED_HTML_STRIKE
\ REPLACE_DEPRECATED_HTML_U REPLACING_ELEMENT REPLACING_UNEX_ELEMENT
\ SCRIPT_MISSING_NOSCRIPT SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_CLICK
\ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_DOWN
\ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_MOVE
\ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_OUT
\ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_OVER
\ SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_UP SKIPOVER_ASCII_ART
\ SPACE_PRECEDING_XMLDECL STRING_ARGUMENT_BAD STRING_CONTENT_LOOKS
\ STRING_DOCTYPE_GIVEN STRING_MISSING_MALFORMED STRING_MUTING_TYPE
\ STRING_NO_SYSID STRING_UNKNOWN_OPTION
\ STYLESHEETS_REQUIRE_TESTING_LINK
\ STYLESHEETS_REQUIRE_TESTING_STYLE_ATTR
\ STYLESHEETS_REQUIRE_TESTING_STYLE_ELEMENT
\ STYLE_SHEET_CONTROL_PRESENTATION SUSPECTED_MISSING_QUOTE
\ TABLE_MAY_REQUIRE_HEADER_ABBR TABLE_MAY_REQUIRE_HEADER_ABBR_NULL
\ TABLE_MAY_REQUIRE_HEADER_ABBR_SPACES TABLE_MISSING_CAPTION
\ TABLE_MISSING_SUMMARY TABLE_SUMMARY_INVALID_NULL
\ TABLE_SUMMARY_INVALID_PLACEHOLDER TABLE_SUMMARY_INVALID_SPACES
\ TAG_NOT_ALLOWED_IN TEXT_EQUIVALENTS_REQUIRE_UPDATING_APPLET
\ TEXT_EQUIVALENTS_REQUIRE_UPDATING_OBJECT
\ TEXT_EQUIVALENTS_REQUIRE_UPDATING_SCRIPT TOO_MANY_ELEMENTS
\ TOO_MANY_ELEMENTS_IN TRIM_EMPTY_ELEMENT UNESCAPED_AMPERSAND
\ UNEXPECTED_ENDTAG UNEXPECTED_ENDTAG_ERR UNEXPECTED_ENDTAG_IN
\ UNEXPECTED_END_OF_FILE UNEXPECTED_END_OF_FILE_ATTR
\ UNEXPECTED_EQUALSIGN UNEXPECTED_GT UNEXPECTED_QUOTEMARK
\ UNKNOWN_ELEMENT UNKNOWN_ELEMENT_LOOKS_CUSTOM UNKNOWN_ENTITY
\ USING_BR_INPLACE_OF VENDOR_SPECIFIC_CHARS WHITE_IN_URI
\ XML_DECLARATION_DETECTED XML_ID_SYNTAX
\ contained nextgroup=tidyMuteIDSeparator skipwhite skipnl
" Options {{{1
syn keyword tidyCustomTagsOption custom-tags contained nextgroup=tidyCustomTagsDelimiter
syn match tidyCustomTagsDelimiter ":" nextgroup=tidyCustomTags contained skipwhite
syn keyword tidyBooleanOption add-meta-charset add-xml-decl
\ add-xml-pi add-xml-space anchor-as-name ascii-chars
\ assume-xml-procins bare break-before-br clean coerce-endtags
\ decorate-inferred-ul drop-empty-paras drop-empty-elements
\ drop-font-tags drop-proprietary-attributes enclose-block-text
\ enclose-text escape-cdata escape-scripts fix-backslash
\ fix-style-tags fix-uri force-output gdoc gnu-emacs hide-comments
\ hide-endtags indent-attributes indent-cdata indent-with-tabs
\ input-xml join-classes join-styles keep-tabs keep-time language
\ literal-attributes logical-emphasis lower-literals markup
\ merge-emphasis mute-id ncr numeric-entities omit-optional-tags
\ output-html output-xhtml output-xml preserve-entities
\ punctuation-wrap quiet quote-ampersand quote-marks quote-nbsp raw
\ replace-color show-filename show-info show-meta-change show-warnings
\ skip-nested split strict-tags-attributes tidy-mark
\ uppercase-attributes uppercase-tags warn-proprietary-attributes
\ word-2000 wrap-asp wrap-attributes wrap-jste wrap-php
\ wrap-script-literals wrap-sections write-back
\ contained nextgroup=tidyBooleanDelimiter
syn match tidyBooleanDelimiter ":" nextgroup=tidyBoolean contained skipwhite
syn keyword tidyAutoBooleanOption indent merge-divs merge-spans output-bom show-body-only vertical-space contained nextgroup=tidyAutoBooleanDelimiter
syn keyword tidyAutoBooleanOption fix-bad-comments indent merge-divs merge-spans output-bom show-body-only vertical-space contained nextgroup=tidyAutoBooleanDelimiter
syn match tidyAutoBooleanDelimiter ":" nextgroup=tidyAutoBoolean contained skipwhite
syn keyword tidyCSSSelectorOption css-prefix contained nextgroup=tidyCSSSelectorDelimiter
syn match tidyCSSSelectorDelimiter ":" nextgroup=tidyCSSSelector contained skipwhite
syn keyword tidyDoctypeOption doctype contained nextgroup=tidyDoctypeDelimiter
syn match tidyDoctypeDelimiter ":" nextgroup=tidyDoctype contained skipwhite
syn match tidyDoctypeDelimiter ":" nextgroup=tidyDoctype,tidyString contained skipwhite
syn keyword tidyEncodingOption char-encoding input-encoding output-encoding contained nextgroup=tidyEncodingDelimiter
syn match tidyEncodingDelimiter ":" nextgroup=tidyEncoding contained skipwhite
@@ -67,8 +185,11 @@ syn match tidyNameDelimiter ":" nextgroup=tidyName contained skipwhite
syn keyword tidyNewlineOption newline contained nextgroup=tidyNewlineDelimiter
syn match tidyNewlineDelimiter ":" nextgroup=tidyNewline contained skipwhite
syn keyword tidyAttributesOption priority-attributes contained nextgroup=tidyAttributesDelimiter
syn match tidyAttributesDelimiter ":" nextgroup=tidyWord contained skipwhite
syn keyword tidyTagsOption new-blocklevel-tags new-empty-tags new-inline-tags new-pre-tags contained nextgroup=tidyTagsDelimiter
syn match tidyTagsDelimiter ":" nextgroup=tidyTags contained skipwhite
syn match tidyTagsDelimiter ":" nextgroup=tidyWord contained skipwhite
syn keyword tidyRepeatOption repeated-attributes contained nextgroup=tidyRepeatDelimiter
syn match tidyRepeatDelimiter ":" nextgroup=tidyRepeat contained skipwhite
@@ -79,57 +200,77 @@ syn match tidySorterDelimiter ":" nextgroup=tidySorter contained skipwhite
syn keyword tidyStringOption alt-text error-file gnu-emacs-file output-file contained nextgroup=tidyStringDelimiter
syn match tidyStringDelimiter ":" nextgroup=tidyString contained skipwhite
syn keyword tidyMuteOption mute contained nextgroup=tidyMuteDelimiter
syn match tidyMuteDelimiter ":" nextgroup=tidyMuteID contained skipwhite
syn cluster tidyOptions contains=tidy.*Option
" Option line anchor {{{1
syn match tidyStart "^" nextgroup=@tidyOptions
" Long standing bug - option lines (except the first) with leading whitespace
" are silently ignored.
syn match tidyErrorStart '^\s\+\ze\S'
" Comments {{{1
syn match tidyComment "^\s*//.*$" contains=tidyTodo
syn match tidyComment "^\s*#.*$" contains=tidyTodo
syn keyword tidyTodo TODO NOTE FIXME XXX contained
" Default highlighting {{{1
hi def link tidyAttributesOption Identifier
hi def link tidyAutoBooleanOption Identifier
hi def link tidyBooleanOption Identifier
hi def link tidyCSSSelectorOption Identifier
hi def link tidyCustomTagsOption Identifier
hi def link tidyDoctypeOption Identifier
hi def link tidyEncodingOption Identifier
hi def link tidyIntegerOption Identifier
hi def link tidyMuteOption Identifier
hi def link tidyNameOption Identifier
hi def link tidyNewlineOption Identifier
hi def link tidyTagsOption Identifier
hi def link tidyRepeatOption Identifier
hi def link tidySorterOption Identifier
hi def link tidyStringOption Identifier
hi def link tidyTagsOption Identifier
hi def link tidyAttributesDelimiter Special
hi def link tidyAutoBooleanDelimiter Special
hi def link tidyBooleanDelimiter Special
hi def link tidyCSSSelectorDelimiter Special
hi def link tidyCustomTagsDelimiter Special
hi def link tidyDoctypeDelimiter Special
hi def link tidyEncodingDelimiter Special
hi def link tidyIntegerDelimiter Special
hi def link tidyMuteDelimiter Special
hi def link tidyNameDelimiter Special
hi def link tidyNewlineDelimiter Special
hi def link tidyTagsDelimiter Special
hi def link tidyRepeatDelimiter Special
hi def link tidySorterDelimiter Special
hi def link tidyStringDelimiter Special
hi def link tidyTagsDelimiter Special
hi def link tidyAutoBoolean Boolean
hi def link tidyBoolean Boolean
hi def link tidyCustomTags Constant
hi def link tidyDoctype Constant
hi def link tidyEncoding Constant
hi def link tidyMuteID Constant
hi def link tidyNewline Constant
hi def link tidyTags Constant
hi def link tidyNumber Number
hi def link tidyRepeat Constant
hi def link tidySorter Constant
hi def link tidyString String
hi def link tidyWord Constant
hi def link tidyComment Comment
hi def link tidyTodo Todo
hi def link tidyErrorStart Error
" Postscript {{{1
let b:current_syntax = "tidy"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8
" vim: ts=8 fdm=marker

View File

@@ -907,7 +907,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
5. <TAB> 을 눌러 ":edit" 명령어를 완성해 봅니다.
6. 이제 빈칸 하나를 추가한 뒤, 존재 파일 이름 앞 부분을 입력합니다: :edit FIL
6. 이제 빈칸 하나를 추가한 뒤, 존재하는 파일 이름 앞 부분을 입력합니다: :edit FIL
7. <TAB> 을 눌러 파일 이름을 완성 시킵니다.

View File

@@ -907,7 +907,7 @@ ce
5. <TAB> <20><> <20><><EFBFBD><EFBFBD> ":edit" <20><><EFBFBD>ɾ <20>ϼ<EFBFBD><CFBC><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD>.
6. <20><><EFBFBD><EFBFBD> <20><>ĭ <20>ϳ<EFBFBD><CFB3><EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD> <20><>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><> <20>κ<EFBFBD><CEBA><EFBFBD> <20>Է<EFBFBD><D4B7>մϴ<D5B4>: :edit FIL
6. <20><><EFBFBD><EFBFBD> <20><>ĭ <20>ϳ<EFBFBD><CFB3><EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD> <20><>, <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><> <20>κ<EFBFBD><CEBA><EFBFBD> <20>Է<EFBFBD><D4B7>մϴ<D5B4>: :edit FIL
7. <TAB> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20>ϼ<EFBFBD> <20><>ŵ<EFBFBD>ϴ<EFBFBD>.

View File

@@ -907,7 +907,7 @@ ce 는 단어를 치환하는 것 뿐만 아니라, 내용을 삽입할 수 있
5. <TAB> 을 눌러 ":edit" 명령어를 완성해 봅니다.
6. 이제 빈칸 하나를 추가한 뒤, 존재 파일 이름 앞 부분을 입력합니다: :edit FIL
6. 이제 빈칸 하나를 추가한 뒤, 존재하는 파일 이름 앞 부분을 입력합니다: :edit FIL
7. <TAB> 을 눌러 파일 이름을 완성 시킵니다.

View File

@@ -49,8 +49,8 @@ WINVER = 0x0501
endif
CXX := $(CROSS_COMPILE)g++
WINDRES := $(CROSS_COMPILE)windres
WINDRES_CXX = $(CXX)
WINDRES_FLAGS = --preprocessor="$(WINDRES_CXX) -E -xc" -DRC_INVOKED
# this used to have --preprocessor, but it's no longer supported
WINDRES_FLAGS =
LIBS := -luuid -lgdi32
RES := gvimext.res
DEFFILE = gvimext_ming.def

View File

@@ -39,13 +39,53 @@ version of Vim that is small and starts up quickly, see the Makefile for how
to disable the GUI and X11. If you don't have GUI libraries and/or X11, these
features will be disabled automatically.
To built Vim on Ubuntu from scratch on a clean system using git:
Install tools required to be able to get and build Vim:
% sudo apt install git
% sudo apt install make
% sudo apt install clang
Build Vim with default features:
% git clone https://github.com/vim/vim.git
% cd vim/src
% make
Run tests to check there are no problems:
% make test
Install Vim in /usr/local:
% sudo make install
Add X windows clipboard support (also needed for GUI):
% sudo apt install libxt-dev
% make reconfig
Add GUI support:
% sudo apt install libgtk-3-dev
% make reconfig
Add Python 3 support:
% sudo apt install libpython3-dev
Uncomment this line in Makefile:
"CONF_OPT_PYTHON3 = --enable-python3interp"
% make reconfig
Debugging:
% sudo apt install valgrind
Uncomment this line in Makefile:
CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -Wno-deprecated-declarations -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
% make reconfig
% make test_{test-name}
See output in testdir/valgrind.test_{test-name}
See the start of Makefile for more detailed instructions about how to compile
Vim.
If you need extra compiler and/or linker arguments, set $CFLAGS and/or $LIBS
before starting configure. Example:
env CFLAGS=-I/usr/local/include LIBS=-lm make
env CFLAGS=-I/usr/local/include LIBS=-lm make
This is only needed for things that configure doesn't offer a specific argument
for or figures out by itself. First try running configure without extra
@@ -94,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

@@ -220,7 +220,6 @@ WINDRES := $(CROSS_COMPILE)windres
else
WINDRES := windres
endif
WINDRES_CC = $(CC)
# Get the default ARCH.
ifndef ARCH
@@ -514,7 +513,8 @@ endif
CFLAGS = -I. -Iproto $(DEFINES) -pipe -march=$(ARCH) -Wall
CXXFLAGS = -std=gnu++11
WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
# This used to have --preprocessor, but it's no longer supported
WINDRES_FLAGS =
EXTRA_LIBS =
ifdef GETTEXT

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

@@ -2294,9 +2294,12 @@ run_message_test: $(MESSAGE_TEST_TARGET)
# Run the libvterm tests.
# This works only on GNU make, not on BSD make.
# Libtool requires "gcc".
test_libvterm:
@if $(MAKE) --version 2>/dev/null | grep -qs "GNU Make"; then \
cd libvterm; $(MAKE) -f Makefile test CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"; \
if test -x "/usr/bin/gcc"; then \
cd libvterm; $(MAKE) -f Makefile test CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"; \
fi \
fi
# Run individual OLD style test.

View File

@@ -17,12 +17,29 @@
#define AL_ADD 2
#define AL_DEL 3
// This flag is set whenever the argument list is being changed and calling a
// function that might trigger an autocommand.
static int arglist_locked = FALSE;
static int
check_arglist_locked(void)
{
if (arglist_locked)
{
emsg(_(e_cannot_change_arglist_recursively));
return FAIL;
}
return OK;
}
/*
* Clear an argument list: free all file names and reset it to zero entries.
*/
void
alist_clear(alist_T *al)
{
if (check_arglist_locked() == FAIL)
return;
while (--al->al_ga.ga_len >= 0)
vim_free(AARGLIST(al)[al->al_ga.ga_len].ae_fname);
ga_clear(&al->al_ga);
@@ -126,14 +143,9 @@ alist_set(
int fnum_len)
{
int i;
static int recursive = 0;
if (recursive)
{
emsg(_(e_au_recursive));
if (check_arglist_locked() == FAIL)
return;
}
++recursive;
alist_clear(al);
if (ga_grow(&al->al_ga, count) == OK)
@@ -152,7 +164,11 @@ alist_set(
// May set buffer name of a buffer previously used for the
// argument list, so that it's re-used by alist_add.
if (fnum_list != NULL && i < fnum_len)
{
arglist_locked = TRUE;
buf_set_name(fnum_list[i], files[i]);
arglist_locked = FALSE;
}
alist_add(al, files[i], use_curbuf ? 2 : 1);
ui_breakcheck();
@@ -163,8 +179,6 @@ alist_set(
FreeWild(count, files);
if (al == &global_alist)
arg_had_last = FALSE;
--recursive;
}
/*
@@ -179,6 +193,10 @@ alist_add(
{
if (fname == NULL) // don't add NULL file names
return;
if (check_arglist_locked() == FAIL)
return;
arglist_locked = TRUE;
#ifdef BACKSLASH_IN_FILENAME
slash_adjust(fname);
#endif
@@ -187,6 +205,8 @@ alist_add(
AARGLIST(al)[al->al_ga.ga_len].ae_fnum =
buflist_add(fname, BLN_LISTED | (set_fnum == 2 ? BLN_CURBUF : 0));
++al->al_ga.ga_len;
arglist_locked = FALSE;
}
#if defined(BACKSLASH_IN_FILENAME) || defined(PROTO)
@@ -295,10 +315,10 @@ get_arglist_exp(
return FAIL;
if (wig == TRUE)
i = expand_wildcards(ga.ga_len, (char_u **)ga.ga_data,
fcountp, fnamesp, EW_FILE|EW_NOTFOUND);
fcountp, fnamesp, EW_FILE|EW_NOTFOUND|EW_NOTWILD);
else
i = gen_expand_wildcards(ga.ga_len, (char_u **)ga.ga_data,
fcountp, fnamesp, EW_FILE|EW_NOTFOUND);
fcountp, fnamesp, EW_FILE|EW_NOTFOUND|EW_NOTWILD);
ga_clear(&ga);
return i;
@@ -334,7 +354,8 @@ alist_add_list(
int i;
int old_argcount = ARGCOUNT;
if (ga_grow(&ALIST(curwin)->al_ga, count) == OK)
if (check_arglist_locked() != FAIL
&& ga_grow(&ALIST(curwin)->al_ga, count) == OK)
{
if (after < 0)
after = 0;
@@ -343,6 +364,7 @@ alist_add_list(
if (after < ARGCOUNT)
mch_memmove(&(ARGLIST[after + count]), &(ARGLIST[after]),
(ARGCOUNT - after) * sizeof(aentry_T));
arglist_locked = TRUE;
for (i = 0; i < count; ++i)
{
int flags = BLN_LISTED | (will_edit ? BLN_CURBUF : 0);
@@ -350,6 +372,7 @@ alist_add_list(
ARGLIST[after + i].ae_fname = files[i];
ARGLIST[after + i].ae_fnum = buflist_add(files[i], flags);
}
arglist_locked = FALSE;
ALIST(curwin)->al_ga.ga_len += count;
if (old_argcount > 0 && curwin->w_arg_idx >= after)
curwin->w_arg_idx += count;
@@ -382,6 +405,9 @@ do_arglist(
int match;
int arg_escaped = TRUE;
if (check_arglist_locked() == FAIL)
return FAIL;
// Set default argument for ":argadd" command.
if (what == AL_ADD && *str == NUL)
{
@@ -531,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;
@@ -540,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);
@@ -776,6 +806,9 @@ ex_argdelete(exarg_T *eap)
int i;
int n;
if (check_arglist_locked() == FAIL)
return;
if (eap->addr_count > 0 || *eap->arg == NUL)
{
// ":argdel" works like ":.argdel"
@@ -884,6 +917,13 @@ do_arg_all(
win_T *new_curwin = NULL;
tabpage_T *new_curtab = NULL;
#ifdef FEAT_CMDWIN
if (cmdwin_type != 0)
{
emsg(_(e_cmdwin));
return;
}
#endif
if (ARGCOUNT <= 0)
{
// Don't give an error message. We don't want it when the ":all"

72
src/auto/configure vendored
View File

@@ -4482,7 +4482,7 @@ with_x_arg="$with_x"
if test -z "$CFLAGS"; then
CFLAGS="-O"
test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
fi
if test "$GCC" = yes; then
gccversion=`$CC -dumpversion`
@@ -4510,9 +4510,9 @@ if test x"$CLANG_VERSION_STRING" != x"" ; then
CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
$as_echo "$CLANG_VERSION" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
$as_echo_n "checking if clang supports -fno-strength-reduce... " >&6; }
if test "$CLANG_VERSION" -ge 500002075 ; then
if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
@@ -9262,6 +9262,7 @@ $as_echo "no GUI support" >&6; } ;;
$as_echo "yes/auto - automatic GUI support" >&6; }
gui_auto=yes
SKIP_GTK2=
SKIP_GTK3=
SKIP_GNOME=
SKIP_MOTIF=
SKIP_ATHENA=
@@ -9523,6 +9524,8 @@ $as_echo "gtk test disabled" >&6; }
fi
if test "x$PKG_CONFIG" != "xno"; then
save_skip_gtk3=$SKIP_GTK3
SKIP_GTK3=YES
if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
{
@@ -9561,6 +9564,8 @@ $as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
}
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
$as_echo_n "checking for GTK -dev package... " >&6; }
no_gtk=yes
fi
@@ -9664,6 +9669,8 @@ $as_echo "no" >&6; }
SKIP_MOTIF=YES
GUITYPE=GTK
else
SKIP_GTK3=$save_skip_gtk3
fi
fi
if test "x$GUITYPE" = "xGTK"; then
@@ -9776,6 +9783,8 @@ $as_echo "gtk test disabled" >&6; }
fi
if test "x$PKG_CONFIG" != "xno"; then
save_skip_gtk2=$SKIP_GTK2
SKIP_GTK2=YES
if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
{
@@ -9814,6 +9823,8 @@ $as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
}
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
$as_echo_n "checking for GTK -dev package... " >&6; }
no_gtk=yes
fi
@@ -9920,6 +9931,8 @@ $as_echo "no" >&6; }
$as_echo "#define USE_GTK3 1" >>confdefs.h
else
SKIP_GTK2=$save_skip_gtk2
fi
fi
fi
@@ -13905,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
@@ -13930,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]];'.

View File

@@ -956,11 +956,14 @@ do_autocmd(char_u *arg_in, int forceit)
last_group = AUGROUP_ERROR; // for listing the group name
if (*arg == '*' || *arg == NUL || *arg == '|')
{
for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
event = (event_T)((int)event + 1))
if (do_autocmd_event(event, pat,
once, nested, cmd, forceit, group) == FAIL)
break;
if (!forceit && *cmd != NUL)
emsg(_(e_cannot_define_autocommands_for_all_events));
else
for (event = (event_T)0; (int)event < (int)NUM_EVENTS;
event = (event_T)((int)event + 1))
if (do_autocmd_event(event, pat,
once, nested, cmd, forceit, group) == FAIL)
break;
}
else
{
@@ -1333,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;
@@ -1350,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);
@@ -1360,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
}
@@ -2163,12 +2176,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

@@ -492,8 +492,10 @@ can_unload_buffer(buf_T *buf)
* supposed to close the window but autocommands close all other windows.
*
* When "ignore_abort" is TRUE don't abort even when aborting() returns TRUE.
*
* Return TRUE when we got to the end and b_nwindows was decremented.
*/
void
int
close_buffer(
win_T *win, // if not NULL, set b_last_cursor
buf_T *buf,
@@ -540,7 +542,7 @@ close_buffer(
if (wipe_buf || unload_buf)
{
if (!can_unload_buffer(buf))
return;
return FALSE;
// Wiping out or unloading a terminal buffer kills the job.
free_terminal(buf);
@@ -571,7 +573,7 @@ close_buffer(
// Disallow deleting the buffer when it is locked (already being closed or
// halfway a command that relies on it). Unloading is allowed.
if ((del_buf || wipe_buf) && !can_unload_buffer(buf))
return;
return FALSE;
// check no autocommands closed the window
if (win != NULL && win_valid_any_tab(win))
@@ -593,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))
@@ -600,9 +603,10 @@ close_buffer(
// Autocommands deleted the buffer.
aucmd_abort:
emsg(_(e_auabort));
return;
return FALSE;
}
--buf->b_locked;
--buf->b_locked_split;
if (abort_if_last && one_window())
// Autocommands made this the only window.
goto aucmd_abort;
@@ -612,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;
@@ -625,7 +631,7 @@ aucmd_abort:
#ifdef FEAT_EVAL
// autocmds may abort script processing
if (!ignore_abort && aborting())
return;
return FALSE;
#endif
}
@@ -653,7 +659,7 @@ aucmd_abort:
// Return when a window is displaying the buffer or when it's not
// unloaded.
if (buf->b_nwindows > 0 || !unload_buf)
return;
return FALSE;
// Always remove the buffer when there is no file name.
if (buf->b_ffname == NULL)
@@ -683,11 +689,11 @@ aucmd_abort:
// Autocommands may have deleted the buffer.
if (!bufref_valid(&bufref))
return;
return FALSE;
#ifdef FEAT_EVAL
// autocmds may abort script processing
if (!ignore_abort && aborting())
return;
return FALSE;
#endif
/*
@@ -698,7 +704,7 @@ aucmd_abort:
* deleted buffer.
*/
if (buf == curbuf && !is_curbuf)
return;
return FALSE;
if (win_valid_any_tab(win) && win->w_buffer == buf)
win->w_buffer = NULL; // make sure we don't use the buffer now
@@ -755,6 +761,7 @@ aucmd_abort:
buf->b_p_bl = FALSE;
}
// NOTE: at this point "curbuf" may be invalid!
return TRUE;
}
/*
@@ -797,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)
{
@@ -823,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
@@ -1715,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)
@@ -2561,12 +2570,15 @@ buflist_findpat(
char_u *p;
int toggledollar;
if (pattern_end == pattern + 1 && (*pattern == '%' || *pattern == '#'))
// "%" is current file, "%%" or "#" is alternate file
if ((pattern_end == pattern + 1 && (*pattern == '%' || *pattern == '#'))
|| (in_vim9script() && pattern_end == pattern + 2
&& pattern[0] == '%' && pattern[1] == '%'))
{
if (*pattern == '%')
match = curbuf->b_fnum;
else
if (*pattern == '#' || pattern_end == pattern + 2)
match = curwin->w_alt_fnum;
else
match = curbuf->b_fnum;
#ifdef FEAT_DIFF
if (diffmode && !diff_mode_buf(buflist_findnr(match)))
match = -1;
@@ -4145,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.
@@ -4323,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++)
@@ -4342,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;
@@ -4537,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);
@@ -4734,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)
{
@@ -4853,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;
@@ -4885,7 +4895,7 @@ build_stl_str_hl(
while (++width < maxwidth)
{
s = s + STRLEN(s);
*s++ = fillchar;
MB_CHAR2BYTES(fillchar, s);
*s = NUL;
}
@@ -4908,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

@@ -1496,6 +1496,9 @@ buf_write(
#endif
#if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
mch_copy_sec(fname, backup);
#endif
#ifdef MSWIN
(void)mch_copy_file_attribute(fname, backup);
#endif
break;
}
@@ -1909,12 +1912,7 @@ restore_backup:
#if defined(MSWIN)
if (backup != NULL && overwriting && !append)
{
if (backup_copy)
(void)mch_copy_file_attribute(wfname, backup);
else
(void)mch_copy_file_attribute(backup, wfname);
}
(void)mch_copy_file_attribute(backup, wfname);
if (!overwriting && !append)
{

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; \
@@ -1153,7 +1153,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 +1248,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

View File

@@ -213,6 +213,7 @@
#undef HAVE_SYSCTL
#undef HAVE_SYSINFO
#undef HAVE_SYSINFO_MEM_UNIT
#undef HAVE_SYSINFO_UPTIME
#undef HAVE_TGETENT
#undef HAVE_TOWLOWER
#undef HAVE_TOWUPPER
@@ -496,3 +497,6 @@
/* Define to inline symbol or empty */
#undef inline
/* Define if _SC_SIGSTKSZ is available via sysconf() */
#undef HAVE_SYSCONF_SIGSTKSZ

View File

@@ -90,7 +90,7 @@ with_x_arg="$with_x"
dnl Set default value for CFLAGS if none is defined or it's empty
if test -z "$CFLAGS"; then
CFLAGS="-O"
test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
fi
if test "$GCC" = yes; then
dnl method that should work for nearly all versions
@@ -127,8 +127,9 @@ if test x"$CLANG_VERSION_STRING" != x"" ; then
dnl change the constant 500002075 below appropriately. To get the
dnl integer corresponding to a version number, refer to the
dnl definition of CLANG_VERSION above.
dnl Clang 11 reports "11", assume Clang 10 and later work like this.
AC_MSG_CHECKING(if clang supports -fno-strength-reduce)
if test "$CLANG_VERSION" -ge 500002075 ; then
if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
AC_MSG_RESULT(no)
CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
else
@@ -2447,6 +2448,7 @@ else
yes|""|auto) AC_MSG_RESULT(yes/auto - automatic GUI support)
gui_auto=yes
SKIP_GTK2=
SKIP_GTK3=
SKIP_GNOME=
SKIP_MOTIF=
SKIP_ATHENA=
@@ -2583,6 +2585,9 @@ AC_DEFUN(AM_PATH_GTK,
sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
}
else
dnl Put some text before the "no" to hint at installing the gtk-dev
dnl packages.
AC_MSG_CHECKING(for GTK -dev package)
no_gtk=yes
fi
@@ -2755,6 +2760,10 @@ if test -z "$SKIP_GTK2"; then
if test "x$PKG_CONFIG" != "xno"; then
dnl First try finding version 2.2.0 or later. The 2.0.x series has
dnl problems (bold fonts, --remote doesn't work).
dnl Disable checking for GTK3 here, otherwise it's found when GTK2 is not
dnl found.
save_skip_gtk3=$SKIP_GTK3
SKIP_GTK3=YES
AM_PATH_GTK(2.2.0,
[GUI_LIB_LOC="$GTK_LIBDIR"
GTK_LIBNAME="$GTK_LIBS"
@@ -2766,6 +2775,8 @@ if test -z "$SKIP_GTK2"; then
SKIP_MOTIF=YES
GUITYPE=GTK
AC_SUBST(GTK_LIBNAME)
else
SKIP_GTK3=$save_skip_gtk3
fi
fi
if test "x$GUITYPE" = "xGTK"; then
@@ -2801,6 +2812,8 @@ if test -z "$SKIP_GTK3"; then
fi
if test "x$PKG_CONFIG" != "xno"; then
save_skip_gtk2=$SKIP_GTK2
SKIP_GTK2=YES
AM_PATH_GTK(3.0.0,
[GUI_LIB_LOC="$GTK_LIBDIR"
GTK_LIBNAME="$GTK_LIBS"
@@ -2814,6 +2827,8 @@ if test -z "$SKIP_GTK3"; then
GUITYPE=GTK
AC_SUBST(GTK_LIBNAME)
AC_DEFINE(USE_GTK3)
else
SKIP_GTK2=$save_skip_gtk2
fi
fi
fi
@@ -4080,6 +4095,20 @@ AC_TRY_COMPILE(
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT),
AC_MSG_RESULT(no))
dnl struct sysinfo may have the uptime field or not
AC_MSG_CHECKING(for sysinfo.uptime)
AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/sysinfo.h>],
[ struct sysinfo sinfo;
long ut;
(void)sysinfo(&sinfo);
ut = sinfo.uptime;
],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_UPTIME),
AC_MSG_RESULT(no))
dnl sysconf() may exist but not support what we want to use
AC_MSG_CHECKING(for sysconf)
AC_TRY_COMPILE(
@@ -4090,6 +4119,15 @@ AC_TRY_COMPILE(
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCONF),
AC_MSG_RESULT(not usable))
dnl check if we have _SC_SIGSTKSZ via sysconf()
AC_MSG_CHECKING(for _SC_SIGSTKSZ via sysconf())
AC_TRY_COMPILE(
[#include <unistd.h>],
[ (void)sysconf(_SC_SIGSTKSZ);
],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSCONF_SIGSTKSZ),
AC_MSG_RESULT(not usable))
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([long])
AC_CHECK_SIZEOF([time_t])

View File

@@ -864,7 +864,7 @@ has_profiling(
*/
static linenr_T
debuggy_find(
int file, // TRUE for a file, FALSE for a function
int is_file, // TRUE for a file, FALSE for a function
char_u *fname, // file or function name
linenr_T after, // after this line number
garray_T *gap, // either &dbg_breakp or &prof_ga
@@ -873,20 +873,25 @@ debuggy_find(
struct debuggy *bp;
int i;
linenr_T lnum = 0;
char_u *name = fname;
char_u *name = NULL;
char_u *short_name = fname;
int prev_got_int;
// Return quickly when there are no breakpoints.
if (gap->ga_len == 0)
return (linenr_T)0;
// Replace K_SNR in function name with "<SNR>".
if (!file && fname[0] == K_SPECIAL)
// For a script-local function remove the prefix, so that
// "profile func Func" matches "Func" in any script. Otherwise it's very
// difficult to profile/debug a script-local function. It may match a
// function in the wrong script, but that is much better than not being
// able to profile/debug a function in a script with unknown ID.
// Also match a script-specific name.
if (!is_file && fname[0] == K_SPECIAL)
{
short_name = vim_strchr(fname, '_') + 1;
name = alloc(STRLEN(fname) + 3);
if (name == NULL)
name = fname;
else
if (name != NULL)
{
STRCPY(name, "<SNR>");
STRCPY(name + 5, fname + 3);
@@ -898,8 +903,8 @@ debuggy_find(
// Skip entries that are not useful or are for a line that is beyond
// an already found breakpoint.
bp = &DEBUGGY(gap, i);
if (((bp->dbg_type == DBG_FILE) == file &&
bp->dbg_type != DBG_EXPR && (
if (((bp->dbg_type == DBG_FILE) == is_file
&& bp->dbg_type != DBG_EXPR && (
#ifdef FEAT_PROFILE
gap == &prof_ga ||
#endif
@@ -910,7 +915,10 @@ debuggy_find(
// while matching should abort it.
prev_got_int = got_int;
got_int = FALSE;
if (vim_regexec_prog(&bp->dbg_prog, FALSE, name, (colnr_T)0))
if ((name != NULL
&& vim_regexec_prog(&bp->dbg_prog, FALSE, name, (colnr_T)0))
|| vim_regexec_prog(&bp->dbg_prog, FALSE,
short_name, (colnr_T)0))
{
lnum = bp->dbg_lnum;
if (fp != NULL)
@@ -932,9 +940,9 @@ debuggy_find(
{
if (bp->dbg_val == NULL)
{
debug_oldval = typval_tostring(NULL);
debug_oldval = typval_tostring(NULL, TRUE);
bp->dbg_val = tv;
debug_newval = typval_tostring(bp->dbg_val);
debug_newval = typval_tostring(bp->dbg_val, TRUE);
line = TRUE;
}
else
@@ -945,11 +953,11 @@ debuggy_find(
typval_T *v;
line = TRUE;
debug_oldval = typval_tostring(bp->dbg_val);
debug_oldval = typval_tostring(bp->dbg_val, TRUE);
// Need to evaluate again, typval_compare() overwrites
// "tv".
v = eval_expr(bp->dbg_name, NULL);
debug_newval = typval_tostring(v);
debug_newval = typval_tostring(v, TRUE);
free_tv(bp->dbg_val);
bp->dbg_val = v;
}
@@ -958,8 +966,8 @@ debuggy_find(
}
else if (bp->dbg_val != NULL)
{
debug_oldval = typval_tostring(bp->dbg_val);
debug_newval = typval_tostring(NULL);
debug_oldval = typval_tostring(bp->dbg_val, TRUE);
debug_newval = typval_tostring(NULL, TRUE);
free_tv(bp->dbg_val);
bp->dbg_val = NULL;
line = TRUE;

View File

@@ -945,7 +945,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
if (**arg != ':')
{
if (*skipwhite(*arg) == ':')
semsg(_(e_no_white_space_allowed_before_str), ":");
semsg(_(e_no_white_space_allowed_before_str_str), ":", *arg);
else
semsg(_(e_missing_dict_colon), *arg);
clear_tv(&tvkey);
@@ -953,11 +953,13 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
}
if (evaluate)
{
if (vim9script && check_for_string(&tvkey) == FAIL)
#ifdef FEAT_FLOAT
if (tvkey.v_type == VAR_FLOAT)
{
clear_tv(&tvkey);
goto failret;
tvkey.vval.v_string = typval_tostring(&tvkey, TRUE);
tvkey.v_type = VAR_STRING;
}
#endif
key = tv_get_string_buf_chk(&tvkey, buf);
if (key == NULL)
{
@@ -968,7 +970,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
}
if (vim9script && (*arg)[1] != NUL && !VIM_ISWHITE((*arg)[1]))
{
semsg(_(e_white_space_required_after_str), ":");
semsg(_(e_white_space_required_after_str_str), ":", *arg);
clear_tv(&tvkey);
goto failret;
}
@@ -1010,7 +1012,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
{
if (vim9script && (*arg)[1] != NUL && !VIM_ISWHITE((*arg)[1]))
{
semsg(_(e_white_space_required_after_str), ",");
semsg(_(e_white_space_required_after_str_str), ",", *arg);
goto failret;
}
*arg = skipwhite(*arg + 1);
@@ -1023,7 +1025,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
if (!had_comma)
{
if (**arg == ',')
semsg(_(e_no_white_space_allowed_before_str), ",");
semsg(_(e_no_white_space_allowed_before_str_str), ",", *arg);
else
semsg(_(e_missing_dict_comma), *arg);
goto failret;
@@ -1032,7 +1034,8 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
if (**arg != '}')
{
semsg(_(e_missing_dict_end), *arg);
if (evalarg != NULL)
semsg(_(e_missing_dict_end), *arg);
failret:
if (d != NULL)
dict_free(d);
@@ -1086,7 +1089,8 @@ dict_extend(dict_T *d1, dict_T *d2, char_u *action)
}
if (type != NULL
&& check_typval_type(type, &HI2DI(hi2)->di_tv, 0) == FAIL)
&& check_typval_arg_type(type, &HI2DI(hi2)->di_tv, 0)
== FAIL)
break;
if (di1 == NULL)

View File

@@ -36,6 +36,7 @@ static int diff_need_update = FALSE; // ex_diffupdate needs to be called
#define DIFF_HIDDEN_OFF 0x100 // diffoff when hidden
#define DIFF_INTERNAL 0x200 // use internal xdiff algorithm
#define DIFF_CLOSE_OFF 0x400 // diffoff when closing window
#define DIFF_FOLLOWWRAP 0x800 // follow the wrap option
#define ALL_WHITE_DIFF (DIFF_IWHITE | DIFF_IWHITEALL | DIFF_IWHITEEOL)
static int diff_flags = DIFF_INTERNAL | DIFF_FILLER | DIFF_CLOSE_OFF;
@@ -1454,9 +1455,12 @@ diff_win_options(
if (!wp->w_p_diff)
wp->w_p_crb_save = wp->w_p_crb;
wp->w_p_crb = TRUE;
if (!wp->w_p_diff)
wp->w_p_wrap_save = wp->w_p_wrap;
wp->w_p_wrap = FALSE;
if (!(diff_flags & DIFF_FOLLOWWRAP))
{
if (!wp->w_p_diff)
wp->w_p_wrap_save = wp->w_p_wrap;
wp->w_p_wrap = FALSE;
}
# ifdef FEAT_FOLDING
if (!wp->w_p_diff)
{
@@ -1517,8 +1521,11 @@ ex_diffoff(exarg_T *eap)
wp->w_p_scb = wp->w_p_scb_save;
if (wp->w_p_crb)
wp->w_p_crb = wp->w_p_crb_save;
if (!wp->w_p_wrap)
wp->w_p_wrap = wp->w_p_wrap_save;
if (!(diff_flags & DIFF_FOLLOWWRAP))
{
if (!wp->w_p_wrap)
wp->w_p_wrap = wp->w_p_wrap_save;
}
#ifdef FEAT_FOLDING
free_string_option(wp->w_p_fdm);
wp->w_p_fdm = vim_strsave(
@@ -2245,6 +2252,11 @@ diffopt_changed(void)
p += 8;
diff_flags_new |= DIFF_CLOSE_OFF;
}
else if (STRNCMP(p, "followwrap", 10) == 0)
{
p += 10;
diff_flags_new |= DIFF_FOLLOWWRAP;
}
else if (STRNCMP(p, "indent-heuristic", 16) == 0)
{
p += 16;

View File

@@ -248,9 +248,9 @@ win_line(
int c_final = NUL; // final char, mandatory if set
int extra_attr = 0; // attributes when n_extra != 0
static char_u *at_end_str = (char_u *)""; // used for p_extra when
// displaying lcs_eol at end-of-line
int lcs_eol_one = lcs_eol; // lcs_eol until it's been used
int lcs_prec_todo = lcs_prec; // lcs_prec until it's been used
// displaying eol at end-of-line
int lcs_eol_one = wp->w_lcs_chars.eol; // eol until it's been used
int lcs_prec_todo = wp->w_lcs_chars.prec; // prec until it's been used
// saved "extra" items for when draw_state becomes WL_LINE (again)
int saved_n_extra = 0;
@@ -339,6 +339,7 @@ win_line(
int change_end = -1; // last col of changed area
#endif
colnr_T trailcol = MAXCOL; // start of trailing spaces
colnr_T leadcol = 0; // start of leading spaces
#ifdef FEAT_LINEBREAK
int need_showbreak = FALSE; // overlong line, skipping first x
// chars
@@ -734,16 +735,33 @@ win_line(
if (wp->w_p_list)
{
if (lcs_space || lcs_trail || lcs_nbsp)
if (wp->w_lcs_chars.space
|| wp->w_lcs_chars.trail
|| wp->w_lcs_chars.lead
|| wp->w_lcs_chars.nbsp)
extra_check = TRUE;
// find start of trailing whitespace
if (lcs_trail)
if (wp->w_lcs_chars.trail)
{
trailcol = (colnr_T)STRLEN(ptr);
while (trailcol > (colnr_T)0 && VIM_ISWHITE(ptr[trailcol - 1]))
--trailcol;
trailcol += (colnr_T) (ptr - line);
}
// find end of leading whitespace
if (wp->w_lcs_chars.lead)
{
leadcol = 0;
while (VIM_ISWHITE(ptr[leadcol]))
++leadcol;
if (ptr[leadcol] == NUL)
// in a line full of spaces all of them are treated as trailing
leadcol = (colnr_T)0;
else
// keep track of the first column not filled with spaces
leadcol += (colnr_T) (ptr - line) + 1;
}
}
wcr_attr = get_wcr_attr(wp);
@@ -1013,12 +1031,11 @@ win_line(
// Draw the 'foldcolumn'. Allocate a buffer, "extra" may
// already be in use.
vim_free(p_extra_free);
p_extra_free = alloc(12 + 1);
p_extra_free = alloc(MAX_MCO * fdc + 1);
if (p_extra_free != NULL)
{
fill_foldcolumn(p_extra_free, wp, FALSE, lnum);
n_extra = fdc;
n_extra = (int)fill_foldcolumn(p_extra_free, wp,
FALSE, lnum);
p_extra_free[n_extra] = NUL;
p_extra = p_extra_free;
c_extra = NUL;
@@ -1403,7 +1420,12 @@ win_line(
// Add any text property that starts in this column.
while (text_prop_next < text_prop_count
&& bcol >= text_props[text_prop_next].tp_col - 1)
text_prop_idxs[text_props_active++] = text_prop_next++;
{
if (bcol <= text_props[text_prop_next].tp_col - 1
+ text_props[text_prop_next].tp_len)
text_prop_idxs[text_props_active++] = text_prop_next;
++text_prop_next;
}
text_prop_attr = 0;
text_prop_combine = FALSE;
@@ -1980,21 +2002,23 @@ win_line(
}
#endif
// 'list': Change char 160 to lcs_nbsp and space to lcs_space.
// But not when the character is followed by a composing
// character (use mb_l to check that).
// 'list': Change char 160 to 'nbsp' and space to 'space'
// setting in 'listchars'. But not when the character is
// followed by a composing character (use mb_l to check that).
if (wp->w_p_list
&& ((((c == 160 && mb_l == 1)
|| (mb_utf8
&& ((mb_c == 160 && mb_l == 2)
|| (mb_c == 0x202f && mb_l == 3))))
&& lcs_nbsp)
&& wp->w_lcs_chars.nbsp)
|| (c == ' '
&& mb_l == 1
&& lcs_space
&& wp->w_lcs_chars.space
&& ptr - line >= leadcol
&& ptr - line <= trailcol)))
{
c = (c == ' ') ? lcs_space : lcs_nbsp;
c = (c == ' ') ? wp->w_lcs_chars.space :
wp->w_lcs_chars.nbsp;
if (area_attr == 0 && search_attr == 0)
{
n_attr = 1;
@@ -2012,9 +2036,11 @@ win_line(
mb_utf8 = FALSE;
}
if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
if ((trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
|| (leadcol != 0 && ptr < line + leadcol && c == ' '))
{
c = lcs_trail;
c = (ptr > line + trailcol) ? wp->w_lcs_chars.trail
: wp->w_lcs_chars.lead;
if (!attr_pri)
{
n_attr = 1;
@@ -2039,7 +2065,7 @@ win_line(
// when getting a character from the file, we may have to
// turn it into something else on the way to putting it
// into "ScreenLines".
if (c == TAB && (!wp->w_p_list || lcs_tab1))
if (c == TAB && (!wp->w_p_list || wp->w_lcs_chars.tab1))
{
int tab_len = 0;
long vcol_adjusted = vcol; // removed showbreak length
@@ -2079,18 +2105,19 @@ win_line(
// there are characters to conceal
tab_len += vcol_off;
// boguscols before FIX_FOR_BOGUSCOLS macro from above
if (wp->w_p_list && lcs_tab1 && old_boguscols > 0
&& n_extra > tab_len)
if (wp->w_p_list && wp->w_lcs_chars.tab1
&& old_boguscols > 0
&& n_extra > tab_len)
tab_len += n_extra - tab_len;
#endif
// if n_extra > 0, it gives the number of chars, to
// use for a tab, else we need to calculate the width
// for a tab
len = (tab_len * mb_char2len(lcs_tab2));
len = (tab_len * mb_char2len(wp->w_lcs_chars.tab2));
if (n_extra > 0)
len += n_extra - tab_len;
c = lcs_tab1;
c = wp->w_lcs_chars.tab1;
p = alloc(len + 1);
vim_memset(p, ' ', len);
p[len] = NUL;
@@ -2098,7 +2125,7 @@ win_line(
p_extra_free = p;
for (i = 0; i < tab_len; i++)
{
int lcs = lcs_tab2;
int lcs = wp->w_lcs_chars.tab2;
if (*p == NUL)
{
@@ -2106,10 +2133,10 @@ win_line(
break;
}
// if lcs_tab3 is given, need to change the char
// if tab3 is given, need to change the char
// for tab
if (lcs_tab3 && i == tab_len - 1)
lcs = lcs_tab3;
if (wp->w_lcs_chars.tab3 && i == tab_len - 1)
lcs = wp->w_lcs_chars.tab3;
mb_char2bytes(lcs, p);
p += mb_char2len(lcs);
n_extra += mb_char2len(lcs)
@@ -2140,21 +2167,23 @@ win_line(
// correctly set further below (effectively reverts the
// FIX_FOR_BOGSUCOLS macro
if (n_extra == tab_len + vc_saved && wp->w_p_list
&& lcs_tab1)
&& wp->w_lcs_chars.tab1)
tab_len += vc_saved;
}
#endif
mb_utf8 = FALSE; // don't draw as UTF-8
if (wp->w_p_list)
{
c = (n_extra == 0 && lcs_tab3) ? lcs_tab3 : lcs_tab1;
c = (n_extra == 0 && wp->w_lcs_chars.tab3)
? wp->w_lcs_chars.tab3
: wp->w_lcs_chars.tab1;
#ifdef FEAT_LINEBREAK
if (wp->w_p_lbr)
c_extra = NUL; // using p_extra from above
else
#endif
c_extra = lcs_tab2;
c_final = lcs_tab3;
c_extra = wp->w_lcs_chars.tab2;
c_final = wp->w_lcs_chars.tab3;
n_attr = tab_len + 1;
extra_attr = hl_combine_attr(win_attr, HL_ATTR(HLF_8));
saved_attr2 = char_attr; // save current attr
@@ -2219,8 +2248,8 @@ win_line(
c_final = NUL;
}
}
if (wp->w_p_list && lcs_eol > 0)
c = lcs_eol;
if (wp->w_p_list && wp->w_lcs_chars.eol > 0)
c = wp->w_lcs_chars.eol;
else
c = ' ';
lcs_eol_one = -1;
@@ -2322,7 +2351,8 @@ win_line(
// don't do search HL for the rest of the line
if (line_attr != 0 && char_attr == search_attr
&& (did_line_attr > 1
|| (wp->w_p_list && lcs_eol > 0)))
|| (wp->w_p_list &&
wp->w_lcs_chars.eol > 0)))
char_attr = line_attr;
# ifdef FEAT_DIFF
if (diff_hlf == HLF_TXD)
@@ -2382,8 +2412,8 @@ win_line(
c = match_conc;
else if (syn_get_sub_char() != NUL)
c = syn_get_sub_char();
else if (lcs_conceal != NUL)
c = lcs_conceal;
else if (wp->w_lcs_chars.conceal != NUL)
c = wp->w_lcs_chars.conceal;
else
c = ' ';
@@ -2526,7 +2556,7 @@ win_line(
&& draw_state > WL_NR
&& c != NUL)
{
c = lcs_prec;
c = wp->w_lcs_chars.prec;
lcs_prec_todo = NUL;
if (has_mbyte && (*mb_char2cells)(mb_c) > 1)
{
@@ -2572,7 +2602,7 @@ win_line(
// highlight match at end of line. If it's beyond the last
// char on the screen, just overwrite that one (tricky!) Not
// needed when a '$' was displayed for 'list'.
if (lcs_eol == lcs_eol_one
if (wp->w_lcs_chars.eol == lcs_eol_one
&& ((area_attr != 0 && vcol == fromcol
&& (VIsual_mode != Ctrl_V
|| lnum == VIsual.lnum
@@ -2742,7 +2772,7 @@ win_line(
// Show "extends" character from 'listchars' if beyond the line end and
// 'list' is set.
if (lcs_ext != NUL
if (wp->w_lcs_chars.ext != NUL
&& wp->w_p_list
&& !wp->w_p_wrap
#ifdef FEAT_DIFF
@@ -2757,7 +2787,7 @@ win_line(
|| (wp->w_p_list && lcs_eol_one > 0)
|| (n_extra && (c_extra != NUL || *p_extra != NUL))))
{
c = lcs_ext;
c = wp->w_lcs_chars.ext;
char_attr = hl_combine_attr(win_attr, HL_ATTR(HLF_AT));
mb_c = c;
if (enc_utf8 && utf_char2len(c) > 1)
@@ -3014,7 +3044,8 @@ win_line(
#ifdef FEAT_DIFF
|| filler_todo > 0
#endif
|| (wp->w_p_list && lcs_eol != NUL && p_extra != at_end_str)
|| (wp->w_p_list && wp->w_lcs_chars.eol != NUL
&& p_extra != at_end_str)
|| (n_extra != 0 && (c_extra != NUL || *p_extra != NUL)))
)
{
@@ -3139,7 +3170,7 @@ win_line(
#endif
saved_char_attr = 0;
n_extra = 0;
lcs_prec_todo = lcs_prec;
lcs_prec_todo = wp->w_lcs_chars.prec;
#ifdef FEAT_LINEBREAK
# ifdef FEAT_DIFF
if (filler_todo <= 0)

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