Compare commits

...

368 Commits

Author SHA1 Message Date
5671f3f076 patch 8.2.3299: Vim9: exists() does not handle much at compile time
Problem:    Vim9: exists() does not handle much at compile time.
Solution:   Handle variable names. (closes #8688)
2021-08-05 22:48:11 +02:00
6f6d58c380 patch 8.2.3298: build failure with small features
Problem:    Build failure with small features.
Solution:   Add #ifdef.
2021-08-05 21:17:32 +02:00
63b9173693 patch 8.2.3297: cannot use all commands inside a {} block
Problem:    Cannot use all commands inside a {} block after :command and
            :autocmd.
Solution:   Do consider \n to separate commands. (closes #8620)
2021-08-05 20:40:03 +02:00
af647e76ca patch 8.2.3296: Vim9: cannot add a number to a float
Problem:    Vim9: cannot add a number to a float.
Solution:   Accept a number if the destination is a float. (closes #8703)
2021-08-05 19:01:17 +02:00
4f33bc20d7 patch 8.2.3295: 'cursorline' should not apply to 'breakindent'
Problem:    'cursorline' should not apply to 'breakindent'.
Solution:   Make 'cursorline' apply to 'breakindent' and 'showbreak'
            consistently. (closes #8684)
2021-08-05 17:57:02 +02:00
1b6acf02b7 patch 8.2.3294: Lua: memory leak when adding dict item fails
Problem:    Lua: memory leak when adding dict item fails.
Solution:   Free the typval and the dict item.
2021-08-05 16:47:08 +02:00
6a230c6b32 patch 8.2.3293: finding completions may cause an endless loop
Problem:    Finding completions may cause an endless loop.
Solution:   Use a better way to check coming back where the search started.
            (Andy Gozas, closes #8672, closes #8671)
2021-08-05 16:23:27 +02:00
bc67e5a0a4 patch 8.2.3292: underscore in very magic pattern causes a hang
Problem:    Underscore in very magic pattern causes a hang.  Pattern with \V
            are case sensitive. (Yutao Yuan)
Solution:   Adjust condition for magicness and advance pointer. (Christian
            Brabandt, closes #8707, closes #8704, closes #8705)
2021-08-05 15:24:59 +02:00
4a01159da2 patch 8.2.3291: Coverity warns for not checking return value
Problem:    Coverity warns for not checking return value.
Solution:   If dict_add() fails give an error message.
2021-08-05 15:11:08 +02:00
9fe17d473a patch 8.2.3290: Vim9: compiling dict may use pointer after free
Problem:    Vim9: compiling dict may use pointer after free and leak memory on
            failure.
Solution:   Pass a pointer to generate_PUSHS().  (Zdenek Dohnal, closes #8699)
2021-08-04 22:30:52 +02:00
f18e8a969a patch 8.2.3289: compiler warning for unused variable with small features
Problem:    Compiler warning for unused variable with small features.
Solution:   Rearrange #ifdefs.
2021-08-04 21:16:50 +02:00
9dc4bef897 patch 8.2.3288: cannot easily access namespace dictionaries from Lua
Problem:    Cannot easily access namespace dictionaries from Lua.
Solution:   Add vim.g, vim.b, etc. (Yegappan Lakshmanan, closes #8693,
            from NeoVim)
2021-08-04 21:12:52 +02:00
57942237c1 patch 8.2.3287: channel events not handled in BufEnter autocommand
Problem:    Channel events not handled in BufEnter autocommand.
Solution:   Decrement dont_parse_messages earlier. (Tim Pope, closes #8697)
2021-08-04 20:54:55 +02:00
d61f2f772a patch 8.2.3286: win_enter_ext() has too many boolean arguments
Problem:    win_enter_ext() has too many boolean arguments.
Solution:   use one flags argument with defined values.
2021-08-04 20:26:19 +02:00
dd097bdc13 patch 8.2.3285: scdoc filetype is not recognized
Problem:    Scdoc filetype is not recognized.
Solution:   Add filetype detection. (Gregory Anders, closes #8701)
2021-08-04 20:00:27 +02:00
80d7395dcf patch 8.2.3284: no error for insert() or remove() changing a locked blob
Problem:    No error for insert() or remove() changing a locked blob.
Solution:   Check a blob is not locked before changing it. (Sean Dewar,
            closes #8696)
2021-08-04 19:25:54 +02:00
0eec851942 patch 8.2.3283: Julia filetype is not recognized
Problem:    Julia filetype is not recognized
Solution:   Add filetype detection. (Christian Clason, closes #8700)
2021-08-04 17:03:59 +02:00
41a3485dd6 patch 8.2.3282: Vim9: error about using -complete without -nargs is confusing
Problem:    Vim9: error about using -complete without -nargs is confusing.
Solution:   Change the wording.
2021-08-04 16:09:24 +02:00
23e2e11515 patch 8.2.3281: Vim9: TODO items in tests can be taken care of
Problem:    Vim9: TODO items in tests can be taken care of.
Solution:   Update test for now working functionality. (closes #8694)
2021-08-03 21:16:18 +02:00
51ad850f5f patch 8.2.3280: 'virtualedit' local to buffer is not the best solution
Problem:    'virtualedit' local to buffer is not the best solution.
Solution:   Make it window-local. (Gary Johnson, closes #8685)
2021-08-03 18:33:08 +02:00
2c70711e3f patch 8.2.3279: Vim9: cannot use block in cmdline window
Problem:    Vim9: cannot use block in cmdline window.
Solution:   Add EX_CMDWIN to the CMD_block flags. (closes #8689)
2021-08-02 22:26:56 +02:00
7bf9a07bd7 patch 8.2.3278: Vim9: error when adding 1 to float
Problem:    Vim9: error when adding 1 to float.
Solution:   Accept t_number_bool. (closes #8687)
2021-08-02 21:55:15 +02:00
c3160727b9 patch 8.2.3277: Vim9: compiled has() does not work properly
Problem:    Vim9: compiled has() does not work properly.
Solution:   Fix check for has() vs exists().
2021-08-02 21:12:05 +02:00
bb7ee7abe1 patch 8.2.3276: Vim9: exists() can only be evaluated at runtime
Problem:    Vim9: exists() can only be evaluated at runtime.
Solution:   Evaluate at compile time for option name literals. (closes #8437)
2021-08-02 20:06:50 +02:00
35578168be patch 8.2.3275: optimizer can use hints about ga_grow() normally succeeding
Problem:    Optimizer can use hints about ga_grow() normally succeeding.
Solution:   Use GA_GROW_FAILS() and GA_GROW_OK() in several places. (Dominique
            Pellé, issue #8635)
2021-08-02 19:10:38 +02:00
952d9d827e patch 8.2.3274: macro for printf format check can be simplified
Problem:    Macro for printf format check can be simplified.
Solution:   Add ATTRIBUTE_FORMAT_PRINTF(). (Dominique Pellé, issue #8635)
2021-08-02 18:07:18 +02:00
1321257317 patch 8.2.3273: autocmd test fails
Problem:    Autocmd test fails.
Solution:   Require white space before the "{" that starts a block.
2021-08-01 22:01:30 +02:00
e041dde7bb patch 8.2.3272: cannot use id zero with prop_find()
Problem:    Cannot use id zero with prop_find(). (Naohiro Ono)
Solution:   Also accept id zero.
2021-08-01 21:30:12 +02:00
e4db17fb6e patch 8.2.3271: Vim9: cannot use :command or :au with block in :def function
Problem:    Vim9: cannot use :command or :au with a block in a :def function.
Solution:   Recognize the start of the block.
2021-08-01 21:19:43 +02:00
0d4d9ee9bb patch 8.2.3270: prop_find() finds property with ID -2
Problem:    prop_find() finds property with ID -2.
Solution:   Use a separate flag to indicate an ID was specified. (issue #8674)
2021-08-01 19:28:15 +02:00
f78da4f9d6 patch 8.2.3269: Vim9: wrong argument check for partial
Problem:    Vim9: wrong argument check for partial. (Naohiro Ono)
Solution:   Handle getting return type without arguments. Correct the minimal
            number of arguments for what is included in the partial.
            (closes #8667)
2021-08-01 15:40:31 +02:00
73b8b0ae3a patch 8.2.3268: cannot use a block with :autocmd like with :command
Problem:    Cannot use a block with :autocmd like with :command.
Solution:   Add support for a {} block after :autocmd. (closes #8620)
2021-08-01 14:52:32 +02:00
6db660bed9 patch 8.2.3267: Vim9: crash when disassembling using deleted script variable
Problem:    Vim9: crash when disassembling a function that uses a deleted
            script variable.
Solution:   Check the variable still exists. (closes #8683)
2021-08-01 14:08:54 +02:00
e97976baa7 patch 8.2.3266: Vim9: assignment with two indexes may check next line
Problem:    Vim9: assignment with two indexes may check next line.
Solution:   Limit the number of lines to avoid checking the next line when
            assiging to a LHS subscript. (closes #8660)
2021-08-01 13:17:17 +02:00
78ba933d18 patch 8.2.3265: smartcase does not work correctly in very magic pattern
Problem:    Smartcase does not work correctly in very magic pattern.
Solution:   Take the magicness into account when skipping over regexp items.
            (Christian Brabandt, closes #8682, closes #7845)
2021-08-01 12:44:37 +02:00
f24f51d030 patch 8.2.3264: Vim9: assign test fails
Problem:    Vim9: assign test fails.
Solution:   Add missing change.
2021-08-01 12:01:49 +02:00
f5d52c90e0 patch 8.2.3263: Vim9: "..=" does not accept same types as the ".." operator
Problem:    Vim9: "..=" does not accept same types as the ".." operator.
Solution:   Convert value to string like ".." does. (issue #8664)
2021-07-31 22:51:10 +02:00
9e0ee59019 patch 8.2.3262: build failure when ABORT_ON_INTERNAL_ERROR is defined
Problem:    Build failure when ABORT_ON_INTERNAL_ERROR is defined.
Solution:   Adjust how estack_len_before is used.
2021-07-31 22:17:28 +02:00
1780f08ba4 patch 8.2.3261: Vim9: when compiling repeat(123, N) return type is number
Problem:    Vim9: when compiling repeat(123, N) return type is number.
Solution:   Make return type a string. (closes #8664)
2021-07-31 22:03:59 +02:00
335c8c7b20 patch 8.2.3260: build failure with small features
Problem:    Build failure with small features.
Solution:   Add #ifdef.
2021-07-31 21:44:35 +02:00
620c959c6c patch 8.2.3259: when 'indentexpr' causes an error did_throw may hang
Problem:    When 'indentexpr' causes an error the did_throw flag may remain
            set.
Solution:   Reset did_throw and show the error. (closes #8677)
2021-07-31 21:32:31 +02:00
78db17c6f3 patch 8.2.3258: error messages have the wrong text
Problem:    Error messages have the wrong text.
Solution:   Adjust the error message.
2021-07-31 19:12:58 +02:00
8e3fc135e8 patch 8.2.3257: calling prop_find() with -1 for ID gives errornous error
Problem:    Calling prop_find() with -1 for ID gives errornous error. (Naohiro
            Ono)
Solution:   When passing -1 use -2. (closes #8674)
2021-07-31 18:33:57 +02:00
bf634a0a8b patch 8.2.3256: executable test may fail on new Ubuntu system
Problem:    Executable test may fail on new Ubuntu system.
Solution:   Consider /usr/bin/cat and /bin/cat the same.
2021-07-31 17:20:04 +02:00
b9115da4be patch 8.2.3255: ci" finds following string but ci< and others don't
Problem:    ci" finds following string but ci< and others don't.
Solution:   When not inside an object find the start. (Connor Lane Smit,
            closes #8670)
2021-07-31 13:31:42 +02:00
28d8421bfb patch 8.2.3254: win_gettype() does not recognize a quickfix window
Problem:    win_gettype() does not recognize a quickfix window.
Solution:   Add "quickfix" and "loclist". (Yegappan Lakshmanan, closes #8676)
2021-07-31 12:43:23 +02:00
890ee4e2be patch 8.2.3253: channel test fails randomly
Problem:    Channel test fails randomly.
Solution:   Add a sleep after sending the "echoerr" command. (Michael Soyka)
2021-07-30 21:56:10 +02:00
4a15504e91 patch 8.2.3252: duplicated code for adding buffer lines
Problem:    Duplicated code for adding buffer lines.
Solution:   Move code to a common function.  Also move map functions to map.c.
            (Yegappan Lakshmanan, closes #8665)
2021-07-30 21:32:45 +02:00
0f5575d0a7 patch 8.2.3251: listing builtin_gui as an available terminal is confusing
Problem:    Listing builtin_gui as an available terminal is confusing.
Solution:   Do not list builtin_gui. (Christian Brabandt, closes #8669,
            closes #8661)
2021-07-30 21:18:03 +02:00
1790be6cb6 patch 8.2.3250: MS-Windows: cannot build with libsodium
Problem:    MS-Windows: cannot build with libsodium.
Solution:   Change FEAT_SODIUM into HAVE_SODIUM. (Christian Brabandt,
            closes #8668, closes #8663)
2021-07-30 20:51:59 +02:00
60dc8274e9 patch 8.2.3249: Vim9: error for re-imported function with default argument
Problem:    Vim9: error for re-imported function with default argument.
Solution:   Do not check argument type if it is still unknown. (closes #8653)
2021-07-29 22:48:54 +02:00
921ba52926 patch 8.2.3248: Vim9: error message for wrong input uses wrong line number
Problem:    Vim9: error message for wrong input uses wrong line number.
Solution:   Use the line number of the start of the command. (issue #8653)
2021-07-29 22:25:05 +02:00
77ab4e28a2 patch 8.2.3247: using uninitialized memory when checking for crypt method
Problem:    Using uninitialized memory when checking for crypt method.
Solution:   Check the header length before using the salt and seed.
2021-07-29 21:23:50 +02:00
77111e2bfc patch 8.2.3246: memory use after free
Problem:    Memory use after free.
Solution:   When clearing a string option set the pointer to "empty_option".
2021-07-29 21:11:30 +02:00
131530a54d patch 8.2.3245: the crypt key may appear in a swap partition
Problem:    The crypt key may appear in a swap partition.
Solution:   When using xchaha20 use sodium_mlock(). (Christian Brabandt,
            closes #8657)
2021-07-29 20:37:49 +02:00
41114a2a27 patch 8.2.3244: Lua 5.3 print() with a long string crashes
Problem:    Lua 5.3 print() with a long string crashes.
Solution:   Use a growarray instead of a Lua buffer. (Yegappan Lakshmanan,
            closes #8655)
2021-07-29 20:22:14 +02:00
83cd0156e0 patch 8.2.3243: MS-Windows: "edit with multiple Vim" choice is less useful
Problem:    MS-Windows: the "edit with multiple Vim" choice is not that
            useful.
Solution:   Change it to "Edit with multiple tabs". (Michael Soyka,
            closes #8645)
2021-07-29 19:18:33 +02:00
0732932553 patch 8.2.3242: Vim9: valgrind reports leaks in builtin function test
Problem:    Vim9: valgrind reports leaks in builtin function test.
Solution:   Do not start a job.
2021-07-28 22:44:08 +02:00
6e850a6900 patch 8.2.3241: Vim9: memory leak when function reports an error
Problem:    Vim9: memory leak when function reports an error.
Solution:   Clear the return value.
2021-07-28 22:21:23 +02:00
2a4bd00cef patch 8.2.3240: Lua print() does not work properly
Problem:    Lua print() does not work properly.
Solution:   Put back lua_pop().
2021-07-28 21:48:59 +02:00
81530e3603 patch 8.2.3239: Vim9: no error using heredoc for a number variable
Problem:    Vim9: no error using heredoc for a number variable.
Solution:   Add a type check. (closes #8627)
2021-07-28 21:25:49 +02:00
d47c39775b patch 8.2.3238: Vim9: error message does not indicate the location
Problem:    Vim9: error message does not indicate the location.
Solution:   Add the relevant text. (issue #8634)
2021-07-28 20:52:13 +02:00
53f7fccc94 Update runtime files 2021-07-28 20:10:16 +02:00
327d3ee455 patch 8.2.3237: when a builtin function gives an error processing continues
Problem:    When a builtin function gives an error processing continues.
Solution:   In Vim9 script return FAIL in get_func_tv().
2021-07-28 19:34:14 +02:00
eaf3f36168 patch 8.2.3236: mode() does not indicate using CTRL-O in Select mode
Problem:    mode() does not indicate using CTRL-O in Select mode.
Solution:   Use "vs" and similar. (closes #8640)
2021-07-28 16:51:53 +02:00
6868634abd patch 8.2.3235: cannot use lambda in {} block in user command
Problem:    Cannot use lambda in {} block in user command. (Martin Tournoij)
Solution:   Do not go over the end of the lambda.
2021-07-28 15:54:54 +02:00
78e006b9b0 patch 8.2.3234: crash when printing long string with Lua
Problem:    Crash when printing long string with Lua.
Solution:   Remove lua_pop(). (Martin Tournoij, closes #8648)
2021-07-28 15:07:01 +02:00
e2390c7f32 patch 8.2.3233: prop_list() and prop_find() do not indicate the buffer
Problem:    prop_list() and prop_find() do not indicate the buffer for the
            used type.
Solution:   Add "type_bufnr" to the results. (closes #8647)
2021-07-28 13:30:16 +02:00
7e6a2a64f0 patch 8.2.3232: system() does not work without a second argument
Problem:    system() does not work without a second argument.
Solution:   Do not require a second argument. (Yegappan Lakshmanan,
            closes #8651, closes #8650)
2021-07-28 11:51:48 +02:00
9088784972 patch 8.2.3231: build failure with small features
Problem:    Build failure with small features.
Solution:   Adjust #ifdef.
2021-07-27 22:35:42 +02:00
f723701de0 patch 8.2.3230: Vim9: type error when function return type is not known yet
Problem:    Vim9: type error when function return type is not known yet.
Solution:   When return type is unknown, use "any". (closes #8644)
2021-07-27 22:21:44 +02:00
4490ec4e83 patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Problem:    Vim9: runtime and compile time type checks are not the same.
Solution:   Add more runtime type checks for builtin functions. (Yegappan
            Lakshmanan, closes #8646)
2021-07-27 22:00:44 +02:00
5d7c2df536 patch 8.2.3228: cannot use a simple block for the :command argument
Problem:    Cannot use a simple block for the :command argument. (Maarten
            Tournoij)
Solution:   Recognize a simple {} block. (issue #8623)
2021-07-27 21:17:32 +02:00
53ba05b090 patch 8.2.3227: 'virtualedit' can only be set globally
Problem:    'virtualedit' can only be set globally.
Solution:   Make 'virtualedit' global-local. (Gary Johnson, closes #8638)
2021-07-26 22:19:10 +02:00
29b857150c patch 8.2.3226: new digraph functions use old naming scheme
Problem:    New digraph functions use old naming scheme.
Solution:   Use the digraph_ prefix. (Hirohito Higashi, closes #8580)
2021-07-26 21:54:04 +02:00
ccb148ac63 patch 8.2.3225: incsearch highlighting is attempted halfway a mapping
Problem:    Incsearch highlighting is attempted halfway a mapping.
Solution:   Only do incsearch highlighting if keys were typed or there is no
            more typeahead.
2021-07-26 21:11:32 +02:00
678b207fb1 patch 8.2.3224: cannot call script-local function after :vim9cmd
Problem:    Cannot call script-local function after :vim9cmd. (Christian J.
            Robinson)
Solution:   Skip over "<SNR>123".
2021-07-26 21:10:11 +02:00
ff34bee3a2 patch 8.2.3223: Vim: using {} block in autoloade omnifunc fails
Problem:    Vim: using {} block in autoloade omnifunc fails.
Solution:   Allow using {} block when text is locked. (closes #8631)
2021-07-25 20:27:06 +02:00
3c77b6a1ce patch 8.2.3222: Vim9: cannot used loop variable later as lambda argument
Problem:    Vim9: cannot used loop variable later as lambda argument.
Solution:   When not in function context check the current block ID.
            (closes #8637)
2021-07-25 18:07:00 +02:00
a764e73d4f patch 8.2.3221: Vim9: argument types are not checked at compile time
Problem:    Vim9: argument types are not checked at compile time.
Solution:   Add several more type checks. (Yegappan Lakshmanan, closes #8632)
2021-07-25 15:57:32 +02:00
2ec28aec9d patch 8.2.3220: Test_term_setansicolors() fails in some configurations
Problem:    Test_term_setansicolors() fails in some configurations.
Solution:   Check available features. (Dominique Pellé, closes #8636)
2021-07-25 15:41:44 +02:00
7a4ca32175 patch 8.2.3219: :find searches non-existing directories
Problem:    :find searches non-existing directories.
Solution:   Check the path is not "..".  Update help. (Christian Brabandt,
            closes #8612, closes #8533)
2021-07-25 15:08:05 +02:00
8a4c812ede patch 8.2.3218: when using xchaha20 crypt undo file is not removed
Problem:    When using xchaha20 crypt undo file is not removed.
Solution:   Reset 'undofile' and delete the file. (Christian Brabandt,
            closes #8630, closes #8467)
2021-07-25 14:36:05 +02:00
3ed0d93796 patch 8.2.3217: build failure
Problem:    Build failure.
Solution:   Add missing changes.
2021-07-25 14:21:11 +02:00
2eb6fc3b52 patch 8.2.3216: Vim9: crash when using variable in a loop at script level
Problem:    Vim9: crash when using variable in a loop at script level.
Solution:   Do not clear the variable if a function was defined.
            Do not create a new entry in sn_var_vals every time.
            (closes #8628)
2021-07-25 14:13:53 +02:00
5bca906b30 patch 8.2.3215: Vim9: argument types are not checked at compile time
Problem:    Vim9: argument types are not checked at compile time.
Solution:   Add several more type checks. Sort the argument lists.
            (Yegappan Lakshmanan, closes #8626)
2021-07-24 21:33:26 +02:00
7d60384a00 patch 8.2.3214: MS-Windows: passing /D does not set the install location
Problem:    MS-Windows: passing /D does not set the install location.
Solution:   Adjust how the installer uses $VIM. Update the documentation.
            (Christian Brabandt, closes #8605)
2021-07-24 21:19:42 +02:00
9c9472ff49 patch 8.2.3213: NOCOMPOUNDSUGS entry in spell file not tested
Problem:    NOCOMPOUNDSUGS entry in spell file not tested.
Solution:   Add a test. (Dominique Pellé, closes #8624)
2021-07-24 20:51:13 +02:00
5a9e5845e1 patch 8.2.3212: Vim9: execution speed can be improved
Problem:    Vim9: execution speed can be improved.
Solution:   Use __builtin_expect() to have the compiler produce better code.
            (Dominique Pellé, closes #8613)
2021-07-24 19:32:12 +02:00
7973de35ba patch 8.2.3211: Vim9: argument types are not checked at compile time
Problem:    Vim9: argument types are not checked at compile time.
Solution:   Add several more type checks. Fix type check for matchaddpos().
            (Yegappan Lakshmanan, closes #8619)
2021-07-24 16:16:15 +02:00
dd0b287c1e patch 8.2.3210: Vim9: searchpair() sixth argument is compiled
Problem:    Vim9: searchpair() sixth argument is compiled. (Yegappan
            Lakshmanan)
Solution:   Only compile the fifth argument.
2021-07-24 15:44:30 +02:00
88421d6dc8 patch 8.2.3209: Vim9: lambda doesn't find block-local variable
Problem:    Vim9: lambda doesn't find block-local variable.
Solution:   Adjust how a script-local variable is found. (closes #8614)
2021-07-24 14:14:52 +02:00
1a3e5747b7 patch 8.2.3208: dynamic library load error does not mention why it failed
Problem:    Dynamic library load error does not mention why it failed.
Solution:   Add the error message. (Martin Tournoij, closes #8621)
2021-07-24 13:57:29 +02:00
5a234eb18e patch 8.2.3207: Vim9: crash when compiling string fails
Problem:    Vim9: crash when compiling string fails. (Yegappan Lakshmanan)
Solution:   Adjust the type stack length.
2021-07-24 13:18:48 +02:00
0ad871dc4d patch 8.2.3206: Vim9: argument types are not checked at compile time
Problem:    Vim9: argument types are not checked at compile time.
Solution:   Add several more type checks. (Yegappan Lakshmanan, closes #8611)
2021-07-23 20:37:56 +02:00
1b862c466b patch 8.2.3205: Coverity reports a null pointer dereference
Problem:    Coverity reports a null pointer dereference.
Solution:   Change the logic to avoid Coverity gets confused.
2021-07-23 19:30:19 +02:00
c9e7e344ed patch 8.2.3204: display garbled when 'cursorline' is set and lines wrap
Problem:    Display garbled when 'cursorline' is set and lines wrap. (Gabriel
            Dupras)
Solution:   Avoid inserting lines twice.
2021-07-22 21:33:03 +02:00
cd268017cf patch 8.2.3203: Vim9: compiled string expression causes type error
Problem:    Vim9: compiled string expression causes type error. (Yegappan
            Lakshmanan)
Solution:   Remove the string type from the stack.
2021-07-22 19:11:08 +02:00
5dd839ce20 patch 8.2.3202: Vim9: tests are only executed for legacy script
Problem:    Vim9: tests are only executed for legacy script.
Solution:   Run more tests also for Vim9 script.  Fix uncovered problems.
2021-07-22 18:48:53 +02:00
2b59df00d8 patch 8.2.3201: crash in test
Problem:    Crash in test.
Solution:   Initialize "where".
2021-07-22 15:14:25 +02:00
7a3fe3e180 patch 8.2.3200: Vim9: hard to guess where a type error is given
Problem:    Vim9: hard to guess where a type error is given.
Solution:   Add the function name where possible. (closes #8608)
2021-07-22 14:58:47 +02:00
a74901929e patch 8.2.3199: Vim9: execution speed can be improved
Problem:    Vim9: execution speed can be improved.
Solution:   Make the break counter static.
2021-07-22 12:26:14 +02:00
f674b358fc patch 8.2.3198: cannot use 'formatlistpat' for breakindent
Problem:    Cannot use 'formatlistpat' for breakindent.
Solution:   Use a negative list indent. (Maxim Kim, closes #8594)
2021-07-22 11:46:59 +02:00
d8e44476d8 patch 8.2.3197: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move a few more error messages to errors.h.
2021-07-21 22:20:33 +02:00
05bd9785fd patch 8.2.3196: Vim9: bool expression with numbers only fails at runtime
Problem:    Vim9: bool expression with numbers only fails at runtime.
Solution:   Check constant to be bool at compile time. (closes #8603)
2021-07-21 21:37:28 +02:00
c4c5642513 patch 8.2.3195: Vim9: unclear error when passing too many arguments to lambda
Problem:    Vim9: unclear error when passing too many arguments to lambda.
Solution:   Pass the expression itself instead of "[expression]".
            (closes #8604)
2021-07-21 20:38:46 +02:00
cd9172077b patch 8.2.3194: Vim9: argument types are not checked at compile time
Problem:    Vim9: argument types are not checked at compile time.
Solution:   Add several more type checks, simplify some. (Yegappan
            Lakshmanan, closes #8598)
2021-07-21 19:09:09 +02:00
189663bdac patch 8.2.3193: screenpos() is wrong when 'display' is "lastline"
Problem:    screenpos() is wrong when the last line is partially visible and
            'display' is "lastline".
Solution:   Also compute the position for a partially visible line.
            (closes #8599)
2021-07-21 18:04:56 +02:00
11d7e62f1d patch 8.2.3192: build failure with small version
Problem:    Build failure with small version (Tony Mechelynck).
Solution:   Remove stray #ifdef.
2021-07-20 22:29:19 +02:00
63cb6567f0 patch 8.2.3191: Vim9: not enough code is tested
Problem:    Vim9: not enough code is tested.
Solution:   Use CheckLegacyAndVim9Success() in more places.  Fix uncovered
            problems.
2021-07-20 22:21:59 +02:00
e29a27f6f8 patch 8.2.3190: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move error messages to errors.h and give them a clear name.
2021-07-20 21:07:36 +02:00
9fa5dabedc patch 8.2.3189: Vim9: error when using "try|"
Problem:    Vim9: error when using "try|".
Solution:   Allow for "|" right after a command.
2021-07-20 19:18:44 +02:00
83494b4ac6 patch 8.2.3188: Vim9: argument types are not checked at compile time
Problem:    Vim9: argument types are not checked at compile time.
Solution:   Add several more type checks, also at runtime. (Yegappan
            Lakshmanan, closes #8587)
2021-07-20 17:51:51 +02:00
9bb0dad0d8 patch 8.2.3187: Vim9: popup timer callback is not compiled
Problem:    Vim9: popup timer callback is not compiled.
Solution:   Compile the callback when creating the timer.
2021-07-19 22:19:29 +02:00
605793500b patch 8.2.3186: Vim9: not all failures for import tested
Problem:    Vim9: not all failures for import tested
Solution:   Test more import failures
2021-07-19 21:45:07 +02:00
ac2cd2b08f patch 8.2.3185: Vim9: start of inline function found in comment line
Problem:    Vim9: start of inline function found in comment line.
Solution:   Do not check for inline function in comment line. (closes #8589)
2021-07-19 21:04:23 +02:00
6106504e9e patch 8.2.3184: cannot add a digraph with a leading space
Problem:    Cannot add a digraph with a leading space.  It is not easy to list
            existing digraphs.
Solution:   Add setdigraph(), setdigraphlist(), getdigraph() and
            getdigraphlist(). (closes #8580)
2021-07-19 20:07:21 +02:00
98c2eaed27 patch 8.2.3183: duplicate error numbers
Problem:    Duplicate error numbers.
Solution:   Adjust the error numbers.
2021-07-19 10:38:49 +02:00
885971e2f5 patch 8.2.3182: Vim9: crash when using removing items from a constant list
Problem:    Vim9: crash when using removing items from a constant list.
            (Yegappan Lakshmanan)
Solution:   When a list was allocated with items copy them.
2021-07-18 22:25:29 +02:00
9ff9c7b974 patch 8.2.3181: Vim9: builtin function test fails without channel feature
Problem:    Vim9: builtin function test fails without channel feature.
Solution:   Add feature checks. (Dominique Pellé, closes #8586)  Make feature
            checks more consistent.
2021-07-18 21:44:37 +02:00
f6488547e3 patch 8.2.3180: Vim9: memory leak when concatenating to an imported string
Problem:    Vim9: memory leak when concatenating to an imported string.
Solution:   Clear the destination.
2021-07-18 21:24:50 +02:00
24e9316560 patch 8.2.3179: Vim9: cannot assign to an imported variable at script level
Problem:    Vim9: cannot assign to an imported variable at script level.
Solution:   Lookup imported items when assigning.
2021-07-18 20:40:33 +02:00
4db572eeb2 patch 8.2.3178: Vim9: the file name of an :import cannot be an expression
Problem:    Vim9: the file name of an :import cannot be an expression.
Solution:   Accept an expression that results in a string.  Do not support
            :import in a function.
2021-07-18 18:21:38 +02:00
ad2d4969e1 patch 8.2.3177: Vim9: can not use "for _ in expr" at script level
Problem:    Vim9: can not use "for _ in expr" at script level.
Solution:   Skip assignment if the loop variable is "_".
2021-07-18 17:08:50 +02:00
0c35752d04 patch 8.2.3176: Vim9: no type error for comparing number with string
Problem:    Vim9: no type error for comparing number with string.
Solution:   Add a runtime type check. (closes #8571)
2021-07-18 14:43:43 +02:00
c6ba2f9dde patch 8.2.3175: Vim9: using illegal pointer with nested lambdas.
Problem:    Vim9: using illegal pointer with inline function inside a lambda.
Solution:   Clear eval_tofree_cmdline when advancing to the next line.
            (closes #8578)
2021-07-18 13:42:29 +02:00
47bc9c3337 patch 8.2.3174: Vim9: "legacy undo" finds "undo" variable
Problem:    Vim9: "legacy undo" finds "undo" variable.
Solution:   Do not pass lookup function to find_ex_command(). (closes #8563)
2021-07-17 21:24:56 +02:00
a9a7c0c602 patch 8.2.3173: Vim9: argument types are not checked at compile time
Problem:    Vim9: argument types are not checked at compile time.
Solution:   Add more type checks. (Yegappan Lakshmanan, closes #8581)
2021-07-17 19:11:07 +02:00
20c370d9f2 patch 8.2.3172: MzScheme test fails
Problem:    MzScheme test fails. (Christian Brabandt)
Solution:   Correct function name.
2021-07-16 10:39:28 +02:00
f5f1b59d3b patch 8.2.3171: another illegal memory access in test
Problem:    Another illegal memory access in test.
Solution:   Check pointer is after the start of the line.
2021-07-15 23:44:54 +02:00
d8cee76b49 patch 8.2.3170: Illegal memory access in test
Problem:    Illegal memory access in test.
Solution:   Check pointer is not before the start of the line.
2021-07-15 23:15:59 +02:00
5245beb37c patch 8.2.3169: Vim9: cannot handle nested inline function
Problem:    Vim9: cannot handle nested inline function.
Solution:   Check for nested inline function. (closes #8575)
2021-07-15 22:03:50 +02:00
378697ac58 patch 8.2.3168: Vim9: type error for constant of type any
Problem:    Vim9: type error for constant of type any.
Solution:   Do add a runtime type check if a constant has type any.
            (closes #8570)
2021-07-15 19:23:18 +02:00
547f94f330 patch 8.2.3167: get E12 in a job callback when searching for tags
Problem:    Get E12 in a job callback when searching for tags. (Andy Stewart)
Solution:   Use the sandbox only for executing a command, not for searching.
            (closes #8511)
2021-07-15 18:14:56 +02:00
b5841b99e6 patch 8.2.3166: Vim9: nested autoload call error overruled by "Unknown error"
Problem:    Vim9: nested autoload call error overruled by "Unknown error".
Solution:   Check need_rethrow before giving an "Unknown error".
            (closes #8568)
2021-07-15 18:09:53 +02:00
9e60e899ee patch 8.2.3165: Vim9: in a || expression the error line number may be wrong
Problem:    Vim9: in a || expression the error line number may be wrong.
Solution:   Save and restore the line number when checking the type.
            (closes #8569)
2021-07-15 15:40:58 +02:00
0894e0d808 patch 8.2.3164: MS-Windows: reported version lacks patchlevel
Problem:    MS-Windows: reported version lacks patchlevel, causing some update
            tools to update too often. (Klaus Frank)
Solution:   Add the patchlevel to the version. (Christian Brabandt)
2021-07-15 14:14:30 +02:00
1557b16dad patch 8.2.3163: location list window may open a wrong file
Problem:    Location list window may open a wrong file.
Solution:   Also update the qf_ptr field. (Wei-Chung Wen, closes #8565,
            closes #8566)
2021-07-15 13:13:39 +02:00
1a71d31bf3 patch 8.2.3162: Vim9: argument types are not checked at compile time
Problem:    Vim9: argument types are not checked at compile time.
Solution:   Add more type checks. (Yegappan Lakshmanan, closes #8560)
2021-07-15 12:49:58 +02:00
c816a2c226 patch 8.2.3161: Vim9: no error when reltime() has invalid arguments
Problem:    Vim9: no error when reltime() has invalid arguments.
Solution:   Add an error. (closes #8562)
2021-07-14 21:00:41 +02:00
4a0b85ad01 patch 8.2.3160: 'breakindent' does not work well for bulleted lists
Problem:    'breakindent' does not work well for bulleted and numbered lists.
Solution:   Add the "list" entry to 'breakindentopt'. (Christian Brabandt,
            closes #8564, closes #1661)
2021-07-14 20:00:27 +02:00
5bea41dea3 patch 8.2.3159: cursor displayed in wrong position after deleting line
Problem:    Cursor displayed in wrong position after deleting line.
Solution:   When deleting lines do not approximate botline. (fixes #8559)
2021-07-13 22:21:44 +02:00
1840a7b4e3 patch 8.2.3158: strange error message when using islocked() with a number
Problem:    Strange error message when using islocked() with a number.
            (Yegappan Lakshmanan)
Solution:   Check that the name is empty.
2021-07-13 20:32:29 +02:00
16e26a3116 patch 8.2.3157: crypt test may fail on MS-Windows
Problem:    Crypt test may fail on MS-Windows.
Solution:   Ignore "[unix]" in the file message. (Christian Brabandt,
            closes #8561)
2021-07-13 19:09:12 +02:00
ee41052ccb patch 8.2.3156: Vim9: term_getansicolors() test fails without +termguicolors
Problem:    Vim9: term_getansicolors() test fails without +termguicolors.
Solution:   Add a check for the feature. (Dominique Pellé, closes #8555)
2021-07-12 22:15:24 +02:00
042414fa00 patch 8.2.3155: some option related code not covered by tests
Problem:    Some option related code not covered by tests.
Solution:   Add a few test cases. (Dominique Pellé, closes #8552)
2021-07-12 21:43:19 +02:00
841e498c5d patch 8.2.3154: Vim9: some type checks for builtin functions fail
Problem:    Vim9: some type checks for builtin functions fail.
Solution:   Correct the type checks. (Yegappan Lakshmanan, closes #8551,
            closes #8550)
2021-07-11 22:04:25 +02:00
7b7a118e74 patch 8.2.3153: URLs with a dash in the scheme are not recognized
Problem:    URLs with a dash in the scheme are not recognized.
Solution:   Allow for a scheme with a dash, but not at the start or end.
            (Tsuyoshi CHO, closes #8299)
2021-07-11 21:51:17 +02:00
11005b078d patch 8.2.3152: Vim9: accessing "s:" results in an error
Problem:    Vim9: accessing "s:" results in an error.
Solution:   Do not try to lookup a script variable for "s:". (closes #8549)
2021-07-11 20:59:00 +02:00
ffcfddc759 patch 8.2.3151: Vim9: profiling fails if nested function is also profiled
Problem:    Vim9: profiling fails if nested function is also profiled.
Solution:   Use the compile type from the outer function. (closes #8543)
2021-07-11 20:22:30 +02:00
c72bdd28ac patch 8.2.3150: Vim9: argument types are not checked at compile time
Problem:    Vim9: argument types are not checked at compile time.
Solution:   Add more type checks. (Yegappan Lakshmanan, closes #8545)
2021-07-11 19:44:18 +02:00
cc7eb2aa7a patch 8.2.3149: some plugins have a problem with the error check
Problem:    Some plugins have a problem with the error check for using
            :command with -complete but without -nargs.
Solution:   In legacy script only give a warning message.
2021-07-11 19:12:04 +02:00
5231224e11 patch 8.2.3148: Vim9: function arg type check does not handle base offset
Problem:    Vim9: function arg type check does not handle base offset.
Solution:   Take the base offset into account when checking builtin function
            argument types.
2021-07-11 18:23:19 +02:00
648594eaf7 patch 8.2.3147: Vim9: profiling does not work with a nested function
Problem:    Vim9: profiling does not work with a nested function.
Solution:   Also compile a nested function without profiling. (closes #8543)
            Handle that compiling may cause the table of compiled functions to
            change.
2021-07-11 17:55:01 +02:00
c03fe66ade patch 8.2.3146: Vim9: line number wrong for :execute argument
Problem:    Vim9: line number wrong for :execute argument.
Solution:   Use the line number of the :execute command itself. (closes #8537)
2021-07-11 16:52:45 +02:00
4ece152ad6 patch 8.2.3145: Vim9: profile test fails without profile feature
Problem:    Vim9: profile test fails without profile feature.
Solution:   Check the profile feature is present.
2021-07-11 16:31:51 +02:00
0f1227f7d5 patch 8.2.3144: Vim9: no error when using an invalid value for a line number
Problem:    Vim9: no error when using an invalid value for a line number.
Solution:   Give an error if the string value is not recognized.
            (closes #8536)
2021-07-11 16:01:58 +02:00
d9162550aa patch 8.2.3143: Vim9: wrong context if lambda called from profiled function
Problem:    Vim9: A lambda may be compiled with the wrong context if it is
            called from a profiled function.
Solution:   Compile the lambda with and without profiling. (closes #8543)
2021-07-11 15:26:13 +02:00
1aeddeb8bd patch 8.2.3142: Vim9: type check for has_key() argument is too strict
Problem:    Vim9: type check for has_key() argument is too strict.
Solution:   Also allow for a number key argument. (closes #8542)
2021-07-11 14:55:49 +02:00
de69a7353e patch 8.2.3141: no error when using :complete for :command without -nargs
Problem:    No error when using :complete for :command without -nargs.
Solution:   Give an error. (Martin Tournoij, closes #8544, closes #8541)
2021-07-11 14:28:25 +02:00
482d2f37a5 patch 8.2.3140: MS-Windows: ipv6 channel test is very flaky also without GUI
Problem:    MS-Windows: ipv6 channel test is very flaky also without the GUI.
Solution:   Skip the test also without the GUI.
2021-07-10 22:21:40 +02:00
a2438132a6 patch 8.2.3139: functions for string manipulation are spread out
Problem:    Functions for string manipulation are spread out.
Solution:   Move string related functions to a new source file. (Yegappan
            Lakshmanan, closes #8470)
2021-07-10 21:29:18 +02:00
31e21766d6 patch 8.2.3138: debugger test fails
Problem:    Debugger test fails.
Solution:   Adjust eval command.
2021-07-10 20:43:59 +02:00
c323527d67 patch 8.2.3137: Vim9: no error when a line only has a variable name
Problem:    Vim9: no error when a line only has a variable name.
Solution:   Give an error when an expression is evaluated without an effect.
            (closes #8538)
2021-07-10 19:42:03 +02:00
fe3418abe0 patch 8.2.3136: no test for E187 and "No swap file"
Problem:    No test for E187 and "No swap file".
Solution:   Add a test. (Dominique Pellé, closes #8540)
2021-07-10 17:59:48 +02:00
5b73992d8f patch 8.2.3135: Vim9: builtin function arguments not checked at compile time
Problem:    Vim9: builtin function arguments not checked at compile time.
Solution:   Add more type checks. (Yegappan Lakshmanan, closes #8539)
2021-07-10 13:15:41 +02:00
9da32e4d57 patch 8.2.3134: crash when using typename() on a function reference
Problem:    Crash when using typename() on a function reference. (Naohiro Ono)
Solution:   Initialize pointer to NULL. (closes #8531)
2021-07-09 19:53:57 +02:00
90fba5627b patch 8.2.3133: Vim9: memory leak when add() fails
Problem:    Vim9: memory leak when add() fails.
Solution:   Allocate listitem_T after type check.
2021-07-09 19:17:55 +02:00
6bcb18253a patch 8.2.3132: compiler warns for size_t to colnr_T conversion.
Problem:    Compiler warns for size_t to colnr_T conversion. (Randall W.
            Morris)
Solution:   Add a type cast.
2021-07-09 15:54:00 +02:00
981217c11f patch 8.2.3131: MS-Windows: ipv6 channel test is very flaky in the GUI
Problem:    MS-Windows: ipv6 channel test is very flaky in the GUI.
Solution:   Skip the test.
2021-07-08 22:20:50 +02:00
b885a7c72c patch 8.2.3130: Vim9: import test fails
Problem:    Vim9: import test fails.
Solution:   Rename directory back to "import", use "p" to avoid an error when
            the directory already exists.
2021-07-08 22:02:11 +02:00
c967d57aa9 patch 8.2.3129: Vim9: imported uninitialized list does not get type checked
Problem:    Vim9: imported uninitialized list does not get type checked.
Solution:   Get type from imported variable.
2021-07-08 21:38:50 +02:00
f055d45023 patch 8.2.3128: Vim9: uninitialzed list does not get type checked
Problem:    Vim9: uninitialzed list does not get type checked.
Solution:   Set the type when initializing the variable. (closes #8529)
2021-07-08 20:57:24 +02:00
f32f099761 patch 8.2.3127: Vim9: no error when adding number to list of string
Problem:    Vim9: no error when adding number to list of string.
Solution:   Check the value type. (closes #8529)
2021-07-08 20:53:40 +02:00
d4ab807d62 patch 8.2.3126: Vim9: for loop error reports wrong line number
Problem:    Vim9: for loop error reports wrong line number.
Solution:   Save and restore the line number when evaluating the expression.
            (closes #8514)
2021-07-08 19:22:12 +02:00
09f688c33a patch 8.2.3125: variables are set but not used
Problem:    Variables are set but not used.
Solution:   Move the declarations to the block where they are used.
            (closes #8527)
2021-07-08 18:05:00 +02:00
deb108ba0a patch 8.2.3124: Vim9: no error for white space between option and "=9"
Problem:    Vim9: no error for white space between option and "=9".
Solution:   Check for extraneous white space. (issue #8408)
2021-07-08 17:35:36 +02:00
1594f31345 patch 8.2.3123: Vim9: confusing error when using white space after option
Problem:    Vim9: confusing error when using white space after option, before
            one of "!&<".
Solution:   Give a specific error. (issue #8408)
2021-07-08 16:40:13 +02:00
30441bb3d5 patch 8.2.3122: with 'nowrap' cursor position is unexected in narrow window
Problem:    With 'nowrap' cursor position is unexected in narrow window.
            (Leonid V.  Fedorenchik)
Solution:   Put cursor on the last non-empty line. (closes #8525)
2021-07-08 13:19:31 +02:00
41fb723ee9 patch 8.2.3121: 'listchars' "exceeds" character appears in foldcolumn
Problem:    'listchars' "exceeds" character appears in foldcolumn. Window
            separator is missing. (Leonid V.  Fedorenchik)
Solution:   Only draw the "exceeds" character in the text area.  Break the
            loop when not drawing the text. (closes #8524)
2021-07-08 12:40:05 +02:00
db86472770 patch 8.2.3120: crypt with sodium test fails on MS-Windows
Problem:    Crypt with sodium test fails on MS-Windows.
Solution:   Make the tests pass. (closes #8428)
2021-07-08 11:37:50 +02:00
6a9e5c69cf patch 8.2.3119: compiler warning for unused argument
Problem:    Compiler warning for unused argument.
Solution:   Add UNUSED.
2021-07-07 22:13:08 +02:00
5ede5b231e patch 8.2.3118: Vim9: "any" type not handled correctly in for loop
Problem:    Vim9: "any" type not handled correctly in for loop.
Solution:   Change compile time check into runtime check. (closes #8516)
2021-07-07 21:55:25 +02:00
efc5db5215 patch 8.2.3117: Vim9: type not properly checked in for loop
Problem:    Vim9: type not properly checked in for loop.
Solution:   Have items() return a list of lists.  Add runtime type checks.
            (closes #8515)
2021-07-07 21:21:30 +02:00
90df4b9d42 Update runtime files 2021-07-07 20:26:08 +02:00
303215d60c patch 8.2.3116: Vim9: crash when debugging a function with line continuation
Problem:    Vim9: crash when debugging a function with line continuation.
Solution:   Check for a NULL pointer. (closes #8521)
2021-07-07 20:10:43 +02:00
b5098060f4 patch 8.2.3115: Coverity complains about free_wininfo() use
Problem:    Coverity complains about free_wininfo() use.
Solution:   Add a condition that "wip2" is not equal to "wip". (Neovim #14996)
2021-07-07 19:26:19 +02:00
599a6e5b36 patch 8.2.3114: Amiga-like systems: build error using stat()
Problem:    Amiga-like systems: build error using stat().
Solution:   Only build swapfile_process_running() on systems where it is
            actually used. (Ola Söder, closes #8519)
2021-07-06 20:15:46 +02:00
442b29c968 patch 8.2.3113: no error when for loop variable shadows script variable
Problem:    No error when for loop variable shadows script variable.
Solution:   Check for the error. (closes #8512)
2021-07-05 22:23:00 +02:00
5cb09620c1 patch 8.2.3112: in rare cases the cursor may be somewhere in a folded line
Problem:    With concealing enabled and indirectly closing a fold the cursor
            may be somewhere in a folded line when it is not on the first line
            of the fold.
Solution:   Check if he cursor is somewhere in the folded text.
2021-07-05 22:03:04 +02:00
404557e6a6 patch 8.2.3111: Vim9: confusing error with extra whitespace before colon
Problem:    Vim9: confusing error with extra whitespace before colon.
Solution:   Check for colon after white space. (closes #8513)
2021-07-05 21:41:48 +02:00
04db26b360 patch 8.2.3110: a pattern that matches the cursor position is complicated
Problem:    A pattern that matches the cursor position is bit complicated.
Solution:   Use a dot to indicate the cursor line and column. (Christian
            Brabandt, closes #8497, closes #8179)
2021-07-05 20:15:23 +02:00
f6d877975b patch 8.2.3109: check for $DISPLAY never fails
Problem:    Check for $DISPLAY never fails.
Solution:   Use eval().
2021-07-05 17:49:02 +02:00
d6fa7bd5b9 patch 8.2.3108: test for remote_foreground() fails
Problem:    Test for remote_foreground() fails. (Elimar Riesebieter)
Solution:   Check that $DISPLAY is set. (Christian Brabandt)
2021-07-05 14:10:04 +02:00
22f85d0459 patch 8.2.3107: Vim9: error for arguments while type didn't specify arguments
Problem:    Vim9: error for arguments while type didn't specify arguments.
Solution:   Do not update that type to check when no argument count is
            specified. (closes #8492)
2021-07-04 23:29:30 +02:00
6977dba04b patch 8.2.3106: Vim9: confusing line number reported for error
Problem:    Vim9: confusing line number reported for error.
Solution:   Use the start line number for the store instruction.
            (closes #8488)
2021-07-04 22:48:12 +02:00
97f227d9c9 patch 8.2.3105: Vim9: type of partial is wrong when it has arguments
Problem:    Vim9: type of partial is wrong when it has arguments.
Solution:   Subtract arguments from the count. (issue #8492)
2021-07-04 20:20:52 +02:00
b7480cd893 patch 8.2.3104: Vim9: unspecified function type causes type error
Problem:    Vim9: unspecified function type causes type error.
Solution:   Don't check type when min_argcount is negative. (issue #8492)
2021-07-04 18:28:15 +02:00
f33cae6050 patch 8.2.3103: swap test may fail on some systems
Problem:    Swap test may fail on some systems when jobs take longer to exit.
Solution:   Use different file names.
2021-07-04 17:36:54 +02:00
3777d6e32b patch 8.2.3102: test for crash fix does not fail without the fix
Problem:    Test for crash fix does not fail without the fix.
Solution:   Adjust the test sequence. (closes #8506)
2021-07-04 17:23:25 +02:00
26e88ec8e2 patch 8.2.3101: missing function prototype for vim_round()
Problem:    Missing function prototype for vim_round().
Solution:   Add the prototype
2021-07-04 17:21:04 +02:00
67b17a6fc6 patch 8.2.3101: missing function prototype for vim_round()
Problem:    Missing function prototype for vim_round().
Solution:   Add the prototype.
2021-07-04 16:50:55 +02:00
7a40ff00ed patch 8.2.3100: Vim9: no error when using type with unknown number of args
Problem:    Vim9: no error when using type with unknown number of arguments.
Solution:   Do not ignore argument count of -1. (closes #8492)
2021-07-04 15:54:08 +02:00
4197828dc6 patch 8.2.3099: Vim9: missing catch/finally not reported at script level
Problem:    Vim9: missing catch/finally not reported at script level.
Solution:   Give an error. (closes #8487)
2021-07-04 14:47:30 +02:00
999db2346b patch 8.2.3098: popup window test is flaky on MS-Windows with GUI
Problem:    Popup window test is flaky on MS-Windows with GUI.
Solution:   Skip the check in this situation.
2021-07-04 14:00:55 +02:00
1d97efce0c patch 8.2.3097: crash when using "quit" at recovery prompt
Problem:    Crash when using "quit" at recovery prompt and autocommands are
            triggered.
Solution:   Block autocommands when creating an empty buffer to use as the
            current buffer. (closes #8506)
2021-07-04 13:27:11 +02:00
6c72fd51a8 patch 8.2.3096: temp files remain after running tests
Problem:    Temp files remain after running tests.
Solution:   Delete the right files. (Dominique Pellé, closes #8509)
2021-07-04 12:30:06 +02:00
b17ab86e7b patch 8.2.3095: with 'virtualedit' set to "block" block selection is wrong
Problem:    With 'virtualedit' set to "block" block selection is wrong after
            using "$".  (Marco Trosi)
Solution:   Compute the longest selected line. (closes #8495)
2021-07-03 22:15:17 +02:00
c60e959cba patch 8.2.3094: Test_popup_atcursor_pos() fails without the conceal feature
Problem:    Test_popup_atcursor_pos() fails without the conceal feature.
Solution:   Add a check for the conceal feature. (Dominique Pellé,
            closes #8505)
2021-07-03 21:41:38 +02:00
fb773a3e0a patch 8.2.3093: tablabel_tooltip test fails with Athena
Problem:    tablabel_tooltip test fails with Athena. (Dominique Pellé)
Solution:   Skip the test when using Athena. (closes #8508)
2021-07-03 21:37:59 +02:00
74509239df patch 8.2.3092: Vim9: builtin function test fails without +channel feature
Problem:    Vim9: builtin function test fails without the +channel feature.
Solution:   Check the +channel feature is supported. (Dominique Pellé,
            closes #8507)
2021-07-03 19:27:37 +02:00
e28d9b3bd4 patch 8.2.3091: Vim9: default argument expr. cannot use previous argument
Problem:    Vim9: default argument expression cannot use previous argument
Solution:   Correct argument index. (closes #8496)
2021-07-03 18:56:53 +02:00
00aaa512d5 patch 8.2.3090: in rare cases the cursor may be somewhere in a folded line
Problem:    With concealing enabled and indirectly closing a fold the cursor
            may be somewhere in a folded line.
Solution:   Recompute the cursor position when the cursor line can be
            concealed. (closes #8480)
2021-07-03 18:04:11 +02:00
20cc528320 patch 8.2.3089: garbage collection has useless code
Problem:    Garbage collection has useless code.
Solution:   Bail out when aborting. (closes #8504)
2021-07-03 16:33:16 +02:00
9cee4a1c9c patch 8.2.3088: with 'virtualedit' set to "block" Visual highlight is wrong
Problem:    With 'virtualedit' set to "block" Visual highlight is wrong after
            using "$".  (Marco Trosi)
Solution:   Do not set w_old_cursor_lcol to MAXCOL. (closes #8495)
2021-07-03 15:08:37 +02:00
fcde67c99f patch 8.2.3087: Gemtext files are not recognized
Problem:    Gemtext files are not recognized.
Solution:   Recognize .gmi and .gemini files. (closes #8427)
2021-07-03 13:51:44 +02:00
6fc0161682 patch 8.2.3086: Vim9: breakpoint on "for" does not work
Problem:    Vim9: breakpoint on "for" does not work.
Solution:   Use the right line number in ISN_DEBUG. (closes #8486)
2021-07-03 13:36:31 +02:00
acbb4b5720 patch 8.2.3085: JSONC files are not recognized
Problem:    JSONC files are not recognized.
Solution:   Recognize .jsonc files. (Izhak Jakov, closes #8500)
2021-07-03 13:09:37 +02:00
a26f56f675 patch 8.2.3084: Vim9: builtin function argument types are not checked
Problem:    Vim9: builtin function argument types are not checked at compile
            time.
Solution:   Add argument types. (Yegappan Lakshmanan, closes #8503)
2021-07-03 11:58:12 +02:00
72463f883c patch 8.2.3083: crash when passing null string to charclass()
Problem:    Crash when passing null string to charclass().
Solution:   Bail out when string pointer is NULL. (Christian Brabandt,
            closes #8498, closes #8260)
2021-07-02 20:19:31 +02:00
b836f631db patch 8.2.3082: a channel command "echoerr" does not show anything
Problem:    A channel command "echoerr" does not show anything.
Solution:   Do not use silent errors when using an "echoerr" command.
            (closes #8494)
2021-07-01 22:11:28 +02:00
11a632d60b patch 8.2.3081: cannot catch errors in a channel command
Problem:    Cannot catch errors in a channel command.
Solution:   Instead of skipping the error make it silent. (closes #8477)
2021-06-30 22:01:02 +02:00
576cb75ceb patch 8.2.3080: recover test fails on 32bit systems
Problem:    Recover test fails on 32bit systems. (Ondřej Súkup)
Solution:   Detect 32/64 bit systems. (Yegappan Lakshmanan, closes #8485,
            closes #8479)
2021-06-30 21:30:10 +02:00
a3d1b29bd3 patch 8.2.3079: Powershell core not supported by default
Problem:    Powershell core not supported by default.
Solution:   Set option defaults for "pwsh". (Mike Williams, closes #8481)
2021-06-30 20:56:00 +02:00
834193afd7 patch 8.2.3078: Vim9: profile test fails
Problem:    Vim9: profile test fails.
Solution:   Make throw in :catch jump to :finally.
2021-06-30 20:39:15 +02:00
d3d8feeb89 patch 8.2.3077: Vim9: an error in a catch block is not reported
Problem:    Vim9: an error in a catch block is not reported.
Solution:   Put the "in catch" flag in the try stack. (closes #8478)
2021-06-30 19:54:43 +02:00
3f987b5917 patch 8.2.3076: Vim9: using try in catch block causes a hang
Problem:    Vim9: using try in catch block causes a hang.
Solution:   Save and restore the ec_in_catch flag. (closes #8478)
2021-06-30 12:02:24 +02:00
80b2ba3e96 patch 8.2.3075: xxd always reports an old version string
Problem:    Xxd always reports an old version string. (Åsmund Ervik)
Solution:   Update the version string with the last known change date.
            (Jürgen Weigert, closes #8475)
2021-06-29 20:36:25 +02:00
ea042677ab patch 8.2.3074: popup_atcursor() uses wrong position with concealing
Problem:    popup_atcursor() uses wrong position with concealing.
Solution:   Keep w_wcol in conceal_check_cursor_line(). (closes #8476)
2021-06-29 20:22:32 +02:00
4067bd3604 patch 8.2.3073: when cursor is move for block append wrong text is inserted
Problem:    When cursor is move for block append wrong text is inserted.
Solution:   Calculate an offset. (Christian Brabandt, closes #8433,
            closes #8288)
2021-06-29 18:54:35 +02:00
7d7bcc6ba0 patch 8.2.3072: "zy" does not work well when "virtualedit' is "block"
Problem:    The "zy" command does not work well when 'virtualedit' is set to
            "block". (Johann Höchtl)
Solution:   Make endspaces zero. (Christian Brabandt, closes #8468,
            closes #8448)
2021-06-28 21:54:27 +02:00
127950241e patch 8.2.3071: shell options are not set properly for PowerShell
Problem:    Shell options are not set properly for PowerShell.
Solution:   Use better option defaults. (Mike Willams, closes #8459)
2021-06-28 20:53:58 +02:00
ffec6dd16a patch 8.2.3070: not enough testing for shell use
Problem:    Not enough testing for shell use.
Solution:   Add a bit more testing. (Yegappan Lakshmanan, closes #8469)
2021-06-27 22:09:59 +02:00
108010aa47 patch 8.2.3069: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move some error messages to errors.h.  Use clearer names.
2021-06-27 22:03:33 +02:00
d887297ad0 patch 8.2.3068: Unicode tables are slightly outdated
Problem:    Unicode tables are slightly outdated.
Solution:   Update the tables for Unicode release 13. (Christian Brabandt
            closes #8430)
2021-06-27 21:30:14 +02:00
1d1ce613cd patch 8.2.3067: building fails with Athena
Problem:    Building fails with Athena. (Elimar Riesebieter)
Solution:   Adjust #ifdefs and add the 'drop_file' feature.
2021-06-27 19:02:52 +02:00
17d868b8b2 patch 8.2.3066: Vim9: debugging lambda does not work
Problem:    Vim9: debugging lambda does not work.
Solution:   Use the compile type of the function when compiling a lambda.
            (closes #8412)
2021-06-27 16:29:53 +02:00
577dc93da9 patch 8.2.3065: Vim9: error when sourcing script twice and reusing function
Problem:    Vim9: error when sourcing script twice and reusing a function
            name.
Solution:   Check if the function is dead. (closes #8463)
2021-06-27 15:35:40 +02:00
4d8f476176 Update runtime files 2021-06-27 15:18:56 +02:00
e65081d1b5 patch 8.2.3064: Vim9: in script cannot set item in uninitialized list
Problem:    Vim9: in script cannot set item in uninitialized list.
Solution:   When a list is NULL allocate an empty one. (closes #8461)
2021-06-27 15:04:05 +02:00
65aee0b714 patch 8.2.3063: crash when switching 'cryptmethod' to xchaha20 with undo file
Problem:    Crash when switching 'cryptmethod' to xchaha20 with an existing
            undo file. (Martin Tournoij)
Solution:   Disable reading undo file when decoding can't be done inplace.
            (issue #8467)
2021-06-27 14:08:24 +02:00
4cd5c52d64 patch 8.2.3062: internal error when adding several text properties
Problem:    Internal error when adding several text properties.
Solution:   Do not handle text properties when deleting a line for splitting a
            data block. (closes #8466)
2021-06-27 13:04:00 +02:00
054794c20f patch 8.2.3061: testing the shell option is incomplete and spread out
Problem:    Testing the shell option is incomplete and spread out.
Solution:   Move shell tests to one file and increase coverage. (Yegappan
            Lakshmanan, closes #8464)
2021-06-27 12:07:49 +02:00
98f9a5f4cb patch 8.2.3060: Vim9: cannot use ternary operator in parenthesis
Problem:    Vim9: cannot use ternary operator in parenthesis.
Solution:   Do not use "=~" for a default argument value.  (closes #8462)
2021-06-26 22:22:38 +02:00
e3ffaa6b7c patch 8.2.3059: Vim9: memory leak when using lambda
Problem:    Vim9: memory leak when using lambda.
Solution:   Do not store the default value strings when skipping.
2021-06-26 22:17:35 +02:00
015cf10311 patch 8.2.3058: Vim9: cannot use ternary operator in parenthesis
Problem:    Vim9: cannot use ternary operator in parenthesis.
Solution:   Do not use "==" for a default argument value.  (closes #8462)
2021-06-26 21:52:02 +02:00
307dec4567 patch 8.2.3057: Vim9: debugger test fails with normal features and +terminal
Problem:    Vim9: debugger test fails with normal features and +terminal.
            (Dominique Pellé)
Solution:   Adjust the INSTRUCTIONS macro. (closes #8460)
2021-06-26 21:21:03 +02:00
14ded11fca patch 8.2.3056: Vim9: using default value in lambda gives confusing error
Problem:    Vim9: using default value in lambda gives confusing error.
Solution:   Pass "default_args" on the first pass to get the arguments.
            (closes #8455)
2021-06-26 19:25:49 +02:00
3a3b10e87a patch 8.2.3055: strange error for assigning to "x.key" on non-dictionary
Problem:    Strange error for assigning to "x.key" on non-dictionary.
Solution:   Add a specific error message. (closes #8451)
2021-06-26 15:00:59 +02:00
4d5dfe2083 patch 8.2.3054: Vim9: unpack assignment using "_" after semicolon fails
Problem:    Vim9: unpack assignment using "_" after semicolon fails.
Solution:   Drop the expression result. (closes #8453)
2021-06-26 13:59:29 +02:00
13e45d14ba patch 8.2.3053: Vim9: cannot assign to @@ in :def function
Problem:    Vim9: cannot assign to @@ in :def function
Solution:   Handle '@' like '"'.
2021-06-26 13:28:35 +02:00
ce024c3e20 patch 8.2.3052: Vim9: "legacy call" does not work
Problem:    Vim9: "legacy call" does not work.
Solution:   Do not skip "call" after "legacy". (closes #8454)
2021-06-26 13:00:49 +02:00
444d878324 patch 8.2.3051: Vim9: for loop with one list variable does not work
Problem:    Vim9: for loop with one list variable does not work.
Solution:   Use a separate flag for unpacking a list. (closes #8452)
2021-06-26 12:40:56 +02:00
f3caeb63d6 patch 8.2.3050: cannot recognize elixir files
Problem:    Cannot recognize elixir files.
Solution:   Recognize Elixir-specific files.  Check if an .ex file is Euphoria
            or Elixir. (Austin Gatlin, closes #8401, closes #8446)
2021-06-26 12:02:55 +02:00
6582e230a0 patch 8.2.3049: JSON patch file not recognized
Problem:    JSON patch file not recognized.
Solution:   Recognize json-patch as json. (Kevin Locke, closes #8450)
2021-06-25 21:54:25 +02:00
22480d147f patch 8.2.3048: strange error for white space after ++ command
Problem:    Strange error for white space after ++ command.
Solution:   Check for white space explicitly. (closes #8440)
2021-06-25 21:31:09 +02:00
f3d30842dc patch 8.2.3047: increment and decrement don't allow for next command
Problem:    Increment and decrement don't allow for next command.
Solution:   Allow for comment and next command. (closes #8442)
2021-06-25 19:29:30 +02:00
b420ac9d20 patch 8.2.3046: Amiga MorphOS: Term mode is set using DOS packets
Problem:    Amiga MorphOS: Term mode is set using DOS packets.
Solution:   Use the same way of setting term mdoe on all next gen Amiga-like
            systems.  (Ola Söder, closes #8445)
2021-06-24 21:43:31 +02:00
98703d7f6c patch 8.2.3045: minor typos
Problem:    Minor typos.
Solution:   Fix the typos. (Christian Brabandt, closes #8441)
2021-06-24 19:55:27 +02:00
3a62b14077 patch 8.2.3044: Amiga MorphOS and AROS: process ID is not valid
Problem:    Amiga MorphOS and AROS: process ID is not valid.
Solution:   Use FindTask to return something which is unique to all processes.
            (Ola Söder, closes #8444)
2021-06-24 18:50:30 +02:00
d415d26913 patch 8.2.3043: Amiga: cannot get the shell size on MorphOS and AROS
Problem:    Amiga: cannot get the shell size on MorphOS and AROS.
Solution:   Use control sequences. (Ola Söder, closes #8438)
2021-06-23 22:05:27 +02:00
6738fd2000 patch 8.2.3042: swap file test fails
Problem:    Swap file test fails.
Solution:   Check for a very high process ID instead of one, which should be
            running.
2021-06-23 21:44:06 +02:00
44dea9da4b patch 8.2.3041: detecting if the process of a swap file is running fails
Problem:    Detecting if the process of a swap file is running fails if the
            process is owned by another user.
Solution:   Check for the ESRCH error. (closes #8436)
2021-06-23 21:13:20 +02:00
18d46587b9 patch 8.2.3040: GUI: dropping files not tested
Problem:    GUI: dropping files not tested.
Solution:   Add test_gui_drop_files() and tests. (Yegappan Lakshmanan,
            closes #8434)
2021-06-23 20:46:52 +02:00
8cec9273d2 patch 8.2.3039: Vim9: breakpoint at a comment line does not work
Problem:    Vim9: breakpoint at a comment line does not work.
Solution:   Add the comment line number to the debug instruction.
            (closes #8429)
2021-06-23 20:20:53 +02:00
cc65040986 patch 8.2.3038: Amiga built-in version string doesn't include build date
Problem:    Amiga built-in version string doesn't include build date.
Solution:   Add the build date if available. (Ola Söder, closes #8437)
2021-06-23 15:52:46 +02:00
8ce3ca8961 patch 8.2.3037: configure reports libcanberra when checking for libsodium
Problem:    Configure reports libcanberra when checking for libsodium.
Solution:   Adjust the message. (Ozaki Kiichi, closes #8435)
2021-06-23 15:41:52 +02:00
7237cab8f1 patch 8.2.3036: Vim9: builtin function arguments not checked at compile time
Problem:    Vim9: builtin function arguments not checked at compile time.
Solution:   Add more argument type specs. Check arguments to test_setmouse()
            and test_gui_mouse_event(). (Yegappan Lakshmanan, closes #8425)
2021-06-22 19:52:27 +02:00
831bdf8622 patch 8.2.3035: Vim9: crash when calling :def function with partial
Problem:    Vim9: crash when calling :def function with partial and return
            type is not set.
Solution:   When the return type is not set handle like the return type is
            unknown. (closes #8422)
2021-06-22 19:32:17 +02:00
ef7be8348f patch 8.2.3034: installing packages on github CI sometimes fails
Problem:    Installing packages on github CI sometimes fails.
Solution:   Update package information first. (Christian Brabandt,
            closes #8432)
2021-06-22 18:21:19 +02:00
419a40ac96 patch 8.2.3033: no error when using alpha delimiter with :global
Problem:    No error when using alpha delimiter with :global.
Solution:   Check the delimiter like with :substitute. (closes #8415)
2021-06-21 21:55:18 +02:00
226b28b961 patch 8.2.3032: build problems with MSVC, other crypt issues with libsodium
Problem:    Build problems with MSVC, other crypt issues with libsodium.
Solution:   Adjust MSVC makefile. Disable swap file only when 'key' is set.
            Adjust error message used when key is wrong.  Fix Coverity issues.
            (Christian Brabandt, closes #8420, closes #8411)
2021-06-21 21:08:08 +02:00
22f17a29cd patch 8.2.3031: no error if a function name starts with an underscore
Problem:    No error if a function name starts with an underscore. (Naohiro
            Ono)
Solution:   In Vim9 script disallow a function name starting with an
            underscore, as is mentioned in the help. (closes #8414)
2021-06-21 20:48:58 +02:00
cb54bc6562 patch 8.2.3030: Coverity reports a memory leak
Problem:    Coverity reports a memory leak.
Solution:   Fix the leak and a few typos. (Dominique Pellé, closes #8418)
2021-06-21 20:15:37 +02:00
035bd1c99f patch 8.2.3029: Vim9: crash when using operator and list unpack assignment
Problem:    Vim9: crash when using operator and list unpack assignment.
            (Naohiro Ono)
Solution:   Get variable value before operation. (closes #8416)
2021-06-21 19:44:11 +02:00
f1e7449d56 patch 8.2.3028: GUI mouse events not tested
Problem:    GUI mouse events not tested.
Solution:   Add test_gui_mouse_event().  Add mouse tests. Also add a few
            viminfo tests. (Yegappan Lakshmanan, closes #8407)
2021-06-21 18:44:26 +02:00
2ac4b2536a patch 8.2.3027: Vim9: breakpoint in compiled function not always checked
Problem:    Vim9: breakpoint in compiled function not always checked.
Solution:   Check for breakpoint when calling compiled function from compiled
            function.
2021-06-20 20:09:42 +02:00
4f8f54280f patch 8.2.3026: Vim9: cannot set breakpoint in compiled function
Problem:    Vim9: cannot set breakpoint in compiled function.
Solution:   Check for breakpoint when calling a function.
2021-06-20 19:28:14 +02:00
0d5e1ec37f patch 8.2.3025: not enough tests for quickfix end_col and end_lnum
Problem:    Not enough tests for quickfix end_col and end_lnum.
Solution:   Add a few more test cases. (Shane-XB-Qian, closes #8409)
2021-06-20 16:31:00 +02:00
2fb1b89d72 patch 8.2.3024: execute() function test fails
Problem:    execute() function test fails.
Solution:   Adjust test for different error.
2021-06-20 15:03:15 +02:00
ca81f0e834 patch 8.2.3023: Vim9: arguments for execute() not checked at compile time
Problem:    Vim9: arguments for execute() not checked at compile time.
Solution:   Add a function to check the argument types.
2021-06-20 14:41:01 +02:00
f573c6e1ed patch 8.2.3022: available encryption methods are not strong enough
Problem:    Available encryption methods are not strong enough.
Solution:   Add initial support for xchaha20. (Christian Brabandt,
            closes #8394)
2021-06-20 14:02:16 +02:00
208f0b48b2 patch 8.2.3021: spaces allowed between option name and "!", "?", etc.
Problem:    Spaces allowed between option name and "!", "?", etc.
Solution:   Disallow spaces in Vim9 script, it was not documented.
            (closes #8408)
2021-06-20 12:40:08 +02:00
2fb7495686 patch 8.2.3020: unreachable code
Problem:    Unreachable code.
Solution:   Remove the code. (closes #8406)
2021-06-19 21:38:25 +02:00
6864efa596 patch 8.2.3019: location list only has the start position.
Problem:    Location list only has the start position.
Solution:   Make it possible to add an end position. (Shane-XB-Qian,
            closes #8393)
2021-06-19 20:45:20 +02:00
ad52f96a2d patch 8.2.3018: 'quickfixtextfunc' formatting is lost when switching buffers
Problem:    Formatting using quickfixtextfunc is lost when updating location
            lists for different buffers.  (Yorick Peterse)
Solution:   Use the right window for the locaiton list. (Yegappan Lakshmanan,
            closes #8400, closes #8403)
2021-06-19 18:22:53 +02:00
59b50c3bee patch 8.2.3017: Vim9: debugger shows too many lines
Problem:    Vim9: debugger shows too many lines.
Solution:   Truncate at a comment, "enddef", etc. (closes #8392)
2021-06-17 22:27:48 +02:00
fae55a9cb0 patch 8.2.3016: confusing error when expression is followed by comma
Problem:    Confusing error when expression is followed by comma.
Solution:   Give a different error for trailing text. (closes #8395)
2021-06-17 22:08:30 +02:00
74f4a965bc patch 8.2.3015: Vim9: Assigning to @# requires a string
Problem:    Vim9: Assigning to @# requires a string. (Naohiro Ono)
Solution:   Accent a number or a string. (closes #8396)
2021-06-17 21:03:07 +02:00
6e9695525e patch 8.2.3014: Coverity warns for freeing static string
Problem:    Coverity warns for freeing static string.
Solution:   Do not assign static string to pointer. (Dominique Pellé,
            closes #8397)
2021-06-17 13:53:41 +02:00
4cea536bdf patch 8.2.3013: Vim: when debugging only first line of command is displayed
Problem:    Vim: when debugging only the first line of a command using line
            continuation is displayed.
Solution:   Find the next command and concatenate lines until that one.
            (closes #8392)
2021-06-16 22:24:40 +02:00
29f0dc3689 patch 8.2.3012: when 'rightleft' is set the line number is drawn reversed
Problem:    When 'rightleft' is set the line number is sometimes drawn
            reversed.
Solution:   Adjust how space is handled. (Christian Brabandt, closes #8389,
            closes #8391)
2021-06-16 19:28:34 +02:00
6bc30b05e6 patch 8.2.3011: Vim9: cannot get argument values during debugging
Problem:    Vim9: cannot get argument values during debugging.
Solution:   Lookup names in the list of arguments.  Put debug instruction
            halfway for command.
2021-06-16 19:19:55 +02:00
41a7f82dea patch 8.2.3010: not enough testing for viminfo code
Problem:    Not enough testing for viminfo code.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #8390)
2021-06-16 15:53:17 +02:00
b90ac5e96e patch 8.2.3009: startup test may hang
Problem:    Startup test may hang.
Solution:   Do not run the test in the GUI.
2021-06-16 10:59:36 +02:00
55b6b60b69 patch 8.2.3008: startup test may hang
Problem:    Startup test may hang.
Solution:   Add quit command in the script.
2021-06-15 23:05:59 +02:00
61a417b7c1 patch 8.2.3007: Vim9: test for void value fails
Problem:    Vim9: test for void value fails.
Solution:   Adjust expected error.  Do not make a copy of void.
2021-06-15 22:54:28 +02:00
a97c36310f patch 8.2.3006: crash when echoing a value very early
Problem:    Crash when echoing a value very early. (Naruhiko Nishino)
Solution:   Do not use a NUL to truncate the message, make a copy.
            (closes #8388)
2021-06-15 22:39:11 +02:00
f57b43c230 patch 8.2.3005: Vim9: using a void value does not give a proper error message
Problem:    Vim9: using a void value does not give a proper error message.
Solution:   Give a clear error message. (clodes #8387)
2021-06-15 22:13:27 +02:00
8ac681a280 patch 8.2.3004: Vim9: error for missing colon given while skipping
Problem:    Vim9: error for missing colon given while skipping.
Solution:   Do not give the error when skipping. (closes #8385)
2021-06-15 20:06:34 +02:00
968a5b62ff patch 8.2.3003: Vim9: closure compiled with wrong compile type
Problem:    Vim9: closure compiled with wrong compile type.
Solution:   Use COMPILE_TYPE() when calling a function. (closes #8384)
2021-06-15 19:32:40 +02:00
affd0bc626 patch 8.2.3002: Vim doesn't abort on a fatal Tcl error
Problem:    Vim doesn't abort on a fatal Tcl error.
Solution:   Change emsg() to iemsg(). (Dominique Pellé, closes #8383)
2021-06-15 19:09:43 +02:00
caf1a2f296 patch 8.2.3001: Vim9: memory leak when compilation fails
Problem:    Vim9: memory leak when compilation fails.
Solution:   Free the list of variable names.
2021-06-15 11:27:21 +02:00
3b814af7e1 patch 8.2.3000: Vim9: warning for uninitialized variable
Problem:    Vim9: warning for uninitialized variable.
Solution:   Add initialization. (John Marriott)
2021-06-15 10:22:17 +02:00
47f6db9089 patch 8.2.2999: balloon sometimes does not hide with GTK 3
Problem:    Balloon sometimes does not hide with GTK 3.
Solution:   Also listen to GDK_LEAVE_NOTIFY. (Johannes Stezenbach)
2021-06-14 22:08:46 +02:00
1b0a9dd413 patch 8.2.2998: Vim9: disassemble test fails
Problem:    Vim9: disassemble test fails.
Solution:   Add missing call to lookup_debug_var().
2021-06-14 21:32:21 +02:00
26d711645c patch 8.2.2997: Vim9: disassemble test fails
Problem:    Vim9: disassemble test fails.
Solution:   Adjust expected output.
2021-06-14 21:08:56 +02:00
b69c6fb7b4 patch 8.2.2996: Vim9: when debugging cannot inspect local variables
Problem:    Vim9: when debugging cannot inspect local variables.
Solution:   Make local variables available when debugging.
2021-06-14 20:40:37 +02:00
90478f35a8 patch 8.2.2995: linker errors with dynamic Python 3.10
Problem:    Linker errors with dynamic Python 3.10.
Solution:   Add a couple of library entries. (Zdenek Dohnal, closes #8381,
            closes #8356)
2021-06-14 15:08:30 +02:00
2d6d718dde patch 8.2.2994: various code is not fully tested
Problem:    Various code is not fully tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #8378)
2021-06-13 21:52:48 +02:00
5ffefbb35a patch 8.2.2993: 'fileencodings' default value should depend on 'encoding'
Problem:    'fileencodings' default value should depend on 'encoding'. (Gary
            Johnson)
Solution:   When 'encoding' is "utf-8" use a different default value for
            'fileencodings'.
2021-06-13 20:27:36 +02:00
2346a63784 Update runtime files 2021-06-13 19:02:49 +02:00
4ee9d8e04d patch 8.2.2992: Vim9: completion for :disassemble is incomplete
Problem:    Vim9: completion for :disassemble is incomplete.
Solution:   Recognize the "debug" and "profile" arguments.
2021-06-13 18:38:48 +02:00
e70e12b32f patch 8.2.2991: Vim9: no completion for :vim9 and :legacy
Problem:    Vim9: no completion for :vim9 and :legacy.
Solution:   Expand argument as a command. (closes #8377)
2021-06-13 17:20:08 +02:00
2e66b0d137 patch 8.2.2990: Jupyter Notebook files are not recognized
Problem:    Jupyter Notebook files are not recognized.
Solution:   Recognize *.ipynb. (closes #8375)
2021-06-13 17:03:06 +02:00
c2dec4cac4 patch 8.2.2989: Vim9: memory leak when debugging a :def function
Problem:    Vim9: memory leak when debugging a :def function.
Solution:   Free the debug instructions.
2021-06-13 15:39:00 +02:00
c3a27bbd53 patch 8.2.2988: Vim9: debugger test fails
Problem:    Vim9: debugger test fails.
Solution:   Get the debugger instructions when needed.
2021-06-13 15:16:01 +02:00
6d1792d408 patch 8.2.2987: build failure with normal features
Problem:    Build failure with normal features.
Solution:   Remove #define.
2021-06-13 14:33:20 +02:00
d9f31c13d2 patch 8.2.2986: build failure without the profile feature
Problem:    Build failure without the profile feature.
Solution:   Add #ifdef.
2021-06-13 14:15:29 +02:00
e99d422bbd patch 8.2.2985: Vim9: a compiled function cannot be debugged
Problem:    Vim9: a compiled function cannot be debugged.
Solution:   Add initial debugging support.
2021-06-13 14:01:26 +02:00
e6174fd58d patch 8.2.2984: Vim9: test fails because of missing return statement
Problem:    Vim9: Test fails because of missing return statement.
Solution:   When type is unknown set type to void.
2021-06-12 18:30:56 +02:00
4a27aefe3b Add links to discussion forums. 2021-06-12 16:12:16 +02:00
a993153538 patch 8.2.2983: Vim9: an inline function requires specifying the return type
Problem:    Vim9: an inline function requires specifying the return type.
Solution:   Make the return type optional.
2021-06-12 15:58:16 +02:00
7423577180 patch 8.2.2982: Vim9: future commands are not reserved yet
Problem:    Vim9: future commands are not reserved yet.
Solution:   Add commands to be implemented later.  Make "this" a reserved
            name.
2021-06-12 14:53:05 +02:00
6654ca702c patch 8.2.2981: recovery test is not run on big-endian systems
Problem:    Recovery test is not run on big-endian systems.
Solution:   Make it work on big-endian systems. (James McCoy, closes #8368)
2021-06-12 14:05:41 +02:00
0b71955552 patch 8.2.2980: popup window test is a bit flaky
Problem:    Popup window test is a bit flaky.
Solution:   Add a redraw command.
2021-06-12 13:59:03 +02:00
5958549760 patch 8.2.2979: not all options code is covered by tests
Problem:    Not all options code is covered by tests.
Solution:   Add more tests for options. (Yegappan Lakshmanan, closes #8369)
2021-06-12 13:46:41 +02:00
744aecf877 patch 8.2.2978: warning for uninitialized variable
Problem:    Warning for uninitialized variable.
Solution:   Set return value to FAIL.
2021-06-12 12:33:48 +02:00
22db0d549f patch 8.2.2977: crash when using a null function reference
Problem:    Crash when using a null function reference. (Naohiro Ono)
Solution:   Check for an invalid function name. (closes #8367)
2021-06-12 12:16:55 +02:00
8de901e1f1 patch 8.2.2976: build failure without the +eval feature
Problem:    Build failure without the +eval feature.
Solution:   Add #ifdefs.
2021-06-11 22:21:24 +02:00
f0a4069e3d patch 8.2.2975: Vim9: can only use an autoload function name as a string
Problem:    Vim9: can only use an autoload function name as a string.
Solution:   Load the autoload script when encountered. (closes #8124)
2021-06-11 22:05:47 +02:00
4f13527598 patch 8.2.2974: Greek spell checking uses wrong case folding
Problem:    Greek spell checking uses wrong case folding.
Solution:   Fold capital sigma depending on whether it is at the end of a
            word or not. (closes #299)
2021-06-11 19:07:40 +02:00
3044324e8d patch 8.2.2973: fix for recovery and diff mode not tested
Problem:    Fix for recovery and diff mode not tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #8352)
2021-06-10 21:52:15 +02:00
7b4f76c030 patch 8.2.2972: "%bd" tries to delete popup window buffers, which fails
Problem:    "%bd" tries to delete popup window buffers, which fails. (Ralf
            Schandl)
Solution:   Do not try to delete a popup window buffer. (closes #8349)
2021-06-10 21:07:48 +02:00
544a38e44d patch 8.2.2971: cannot yank a block without trailing spaces
Problem:    Cannot yank a block without trailing spaces.
Solution:   Add the "zy" command. (Christian Brabandt, closes #8292)
2021-06-10 19:39:11 +02:00
31e299c08f patch 8.2.2970: Python configure check uses deprecated command
Problem:    Python configure check uses deprecated command.
Solution:   Use sysconfig instead of distutils if possible. (Zdenek Dohnal,
            closes #8354)
2021-06-10 18:50:55 +02:00
a42e6e0082 patch 8.2.2969: subtracting from number option fails when result is zero
Problem:    Subtracting from number option fails when result is zero. (Ingo
            Karkat)
Solution:   Reset the string value when using the numeric value.
            (closes #8351)
2021-06-10 18:43:25 +02:00
54656015d3 patch 8.2.2968: Vim9: memory leak
Problem:    Vim9: memory leak
Solution:   Unreference pt_outer of partial.
2021-06-09 20:50:46 +02:00
c04f2a4cd4 patch 8.2.2967: Vim9: crash when using two levels of partials
Problem:    Vim9: crash when using two levels of partials.
Solution:   Add outer_ref_T and use it in the execution context.
2021-06-09 19:30:03 +02:00
e3f50ad640 patch 8.2.2966: ml_get errors after recovering a file
Problem:    ml_get errors after recovering a file. (Yegappan Lakshmanan)
Solution:   Fix the cursor position after deleting lines.
2021-06-09 12:33:40 +02:00
b55d618f19 patch 8.2.2965: Vim9: crash when calling function that failed to compile
Problem:    Vim9: crash when calling function that failed to compile.
Solution:   Fail when trying to call the function. (closes #8344)
2021-06-08 22:01:53 +02:00
a733042b12 patch 8.2.2964: Vim9: hang when using space after ->
Problem:    Vim9: hang when using space after ->. (Naohiro Ono)
Solution:   Skip over white space to find the function name. (closes #8341)
2021-06-08 20:46:45 +02:00
445f11d5bc patch 8.2.2963: GUI: mouse move may start Visual mode with a popup visible
Problem:    GUI: mouse move may start Visual mode with a popup visible.
Solution:   Add special code for mouse move. (closes #8318)
2021-06-08 20:13:31 +02:00
dc73b4b75d patch 8.2.2962: MS-Windows command line arguments have wrong encoding
Problem:    MS-Windows command line arguments have wrong encoding.
Solution:   Always use utf-8 in get_cmd_argsW(). (Ken Takata, closes #8347)
2021-06-08 18:32:36 +02:00
c41badb748 patch 8.2.2961: keys typed during a :normal command are discarded
Problem:    Keys typed during a :normal command are discarded.
Solution:   Concatenate saved typeahead and typed kesy. (closes #8340)
2021-06-07 22:04:52 +02:00
8cf02e5cf8 patch 8.2.2960: swap file recovery not sufficiently tested
Problem:    Swap file recovery not sufficiently tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #8339)
2021-06-07 20:41:22 +02:00
2f9c209ba0 patch 8.2.2959: sound_playfile() is not tested on MS-Windows
Problem:    sound_playfile() is not tested on MS-Windows.
Solution:   Make it work and enable the test. (Dominique Pellé, closes #8338)
2021-06-07 20:28:45 +02:00
f7a023e580 patch 8.2.2958: function list test fails
Problem:    Function list test fails.
Solution:   Add newly added function to the list.  Fix typo.
2021-06-07 18:50:01 +02:00
3a7503c34c patch 8.2.2957: using getchar() in Vim9 script is problematic
Problem:    Using getchar() in Vim9 script is problematic.
Solution:   Add getcharstr(). (closes #8343)
2021-06-07 18:29:17 +02:00
f05d2fc539 patch 8.2.2956: Vim9: need to plan for future additions
Problem:    Vim9: need to plan for future additions.
Solution:   Reserve commands for future use: :type, :class, :enum.
2021-06-06 22:02:16 +02:00
e729ce294f patch 8.2.2955: Vim9: using filter in compiled command does not work
Problem:    Vim9: using filter in compiled command does not work.
Solution:   Generate EXEC including the command modifier.
2021-06-06 21:38:09 +02:00
6db7b6375a patch 8.2.2954: short file name extension for Scala not recognized
Problem:    Short file name extension for Scala not recognized.
Solution:   Recognize *.sc. (closes #8337)
2021-06-06 20:15:53 +02:00
518df27ebe patch 8.2.2953: Vim9: leaking memory when using heredoc script
Problem:    Vim9: leaking memory when using heredoc script.
Solution:   Free the first line.
2021-06-06 17:34:13 +02:00
99285550a9 patch 8.2.2952: recover test fails on big endian systems
Problem:    Recover test fails on big endian systems.
Solution:   Disable the failing test on big endian systems. (Yegappan
            Lakshmanan, closes #8335)
2021-06-06 17:12:46 +02:00
2067733b5c patch 8.2.2951: Vim9: cannot use heredoc for :python, :lua, etc.
Problem:    Vim9: cannot use heredoc in :def function for :python, :lua, etc.
Solution:   Concatenate the heredoc lines and pass them in the ISN_EXEC_SPLIT
            instruction.
2021-06-06 17:02:53 +02:00
c64ed2b714 patch 8.2.2950: sound code not fully tested
Problem:    Sound code not fully tested.
Solution:   Add more sound tests. (Dominique Pellé, closes #8332)
2021-06-06 15:07:09 +02:00
3cfa5b16b0 patch 8.2.2949: tests failing because no error for float to string conversion
Problem:    Tests failing because there is no error for float to string
            conversion.
Solution:   Change the check for failure to check for correct result.  Make
            some conversions strict in Vim9 script.
2021-06-06 14:14:39 +02:00
7a2217bedd patch 8.2.2948: substitute() accepts a number but not a float expression
Problem:    Substitute() accepts a number but not a float expression.
Solution:   Also accept a float. (closes #8331)
2021-06-06 12:33:49 +02:00
f5bfa8faa7 patch 8.2.2947: build failure without the channel feature
Problem:    Build failure without the channel feature.
Solution:   Add back #ifdef. (John Marriott)
2021-06-06 12:07:54 +02:00
2752360646 patch 8.2.2946: Vim9: substitute expression cannot be a List
Problem:    Vim9: substitute expression cannot be a List in a :def function.
Solution:   Use typval2string(). (closes #8330)
2021-06-05 21:36:19 +02:00
59b262362f patch 8.2.2945: some buffer related code is not tested
Problem:    Some buffer related code is not tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #8320)
2021-06-05 20:59:22 +02:00
1328bde9d4 patch 8.2.2944: Vim9: no error when using job or channel as a string
Problem:    Vim9: no error when using job or channel as a string.
Solution:   Be more strict about conversion to string. (closes #8312)
2021-06-05 20:51:38 +02:00
c6d71532dd patch 8.2.2943: Vim9: check for argument count ignores default values
Problem:    Vim9: check for argument count ignores default values.
Solution:   Take default argument values into account.
2021-06-05 18:49:38 +02:00
8da6d6db34 patch 8.2.2942: Vim9: error when calling function with too few arguments
Problem:    Vim9: internal error when calling function with too few arguments
Solution:   Check for argument count to be too few. (closes #8325)
2021-06-05 18:15:09 +02:00
b288ba9f1d patch 8.2.2941: Vim9: using does not handle a list of strings
Problem:    Vim9: using  does not handle a list of strings.
Solution:   Convert a list to a string and escape each item. (closes #8310)
2021-06-05 17:10:55 +02:00
4f2417ffee patch 8.2.2940: MS-Windows: cannot see the size when resizing
Problem:    MS-Windows: cannot see the size of the text area when resizing the
            gvim window.
Solution:   Show a tooltip with the text size. (Ken Takata, closes #8326)
2021-06-05 16:25:32 +02:00
84e9ade826 patch 8.2.2939: GTK: righthand scrollbar does not show with split window
Problem:    GTK: righthand scrollbar does not show with split window.
Solution:   Adjust padding when two scrollbars are used. (Matt Wozniski,
            closes #8324)
2021-06-05 16:07:37 +02:00
21492743e8 patch 8.2.2938: after using motion force from feedkeys() it sticks
Problem:    After using motion force from feedkeys() it may not be reset.
Solution:   Clear motion_force in clearop(). (closes #8323)
2021-06-04 21:57:57 +02:00
370 changed files with 27511 additions and 7520 deletions

3
.github/CODEOWNERS vendored
View File

@ -51,6 +51,7 @@ runtime/compiler/sass.vim @tpope
runtime/compiler/se.vim @dkearns
runtime/compiler/shellcheck.vim @dkearns
runtime/compiler/sml.vim @dkearns
runtime/compiler/spectral.vim @romainl
runtime/compiler/stylelint.vim @dkearns
runtime/compiler/tcl.vim @dkearns
runtime/compiler/tidy.vim @dkearns
@ -59,6 +60,7 @@ runtime/compiler/tsc.vim @dkearns
runtime/compiler/typedoc.vim @dkearns
runtime/compiler/xmllint.vim @dkearns
runtime/compiler/xo.vim @dkearns
runtime/compiler/yamllint.vim @romainl
runtime/compiler/zsh.vim @dkearns
runtime/doc/pi_getscript.txt @cecamp
runtime/doc/pi_logipat.txt @cecamp
@ -236,3 +238,4 @@ src/libvterm/ @leonerd
src/po/de.po @chrisbra
src/po/eo.po @dpelle
src/po/fr.po @dpelle
src/xxd/ @jnweiger

View File

@ -56,7 +56,7 @@ jobs:
- name: Install packages
run: |
sudo apt-get install -y \
sudo apt update && sudo apt install -y \
autoconf \
lcov \
gettext \
@ -71,7 +71,8 @@ jobs:
cscope \
libgtk2.0-dev \
desktop-file-utils \
libtool-bin
libtool-bin \
libsodium-dev
- name: Install clang-11
if: matrix.compiler == 'clang'
@ -365,7 +366,7 @@ jobs:
features: NORMAL
steps:
- name: Initalize
- name: Initialize
id: init
shell: bash
run: |

View File

@ -134,6 +134,7 @@ SRC_ALL = \
src/spell.h \
src/spellfile.c \
src/spellsuggest.c \
src/strings.c \
src/structs.h \
src/syntax.c \
src/tag.c \
@ -296,6 +297,7 @@ SRC_ALL = \
src/proto/spell.pro \
src/proto/spellfile.pro \
src/proto/spellsuggest.pro \
src/proto/strings.pro \
src/proto/syntax.pro \
src/proto/tag.pro \
src/proto/term.pro \

View File

@ -4,6 +4,12 @@
<sub>For translations of this README see the end.</sub>
If you find a bug or want to discuss the best way to add a new feature, please
open an [issue](https://github.com/vim/vim/issues).
If you have a question or want to discuss the best way to do something with
Vim, you can use [StackExchange](https://vi.stackexchange.com/)
or one of the [Maillists](https://www.vim.org/community.php).
## What is Vim? ##

View File

@ -45,14 +45,16 @@ full code is below):
| Vim old | 5.018541 |
| Python | 0.369598 |
| Lua | 0.078817 |
| LuaJit | 0.004245 |
| Vim new | 0.073595 |
That looks very promising! It's just one example, but it shows how much
we can gain, and also that Vim script can be faster than builtin
interfaces.
In practice the script would not do something useless as counting but change
the text. For example, reindent all the lines:
LuaJit is much faster at Lua-only instructions. In practice the script would
not do something useless as counting but change the text. For example,
reindent all the lines:
``` vim
let totallen = 0
@ -64,13 +66,17 @@ the text. For example, reindent all the lines:
| how | time in sec |
| --------| -------- |
| Vim old | 0.853752 |
| Python | 0.304584 |
| Lua | 0.286573 |
| Vim new | 0.190276 |
| Vim old | 0.578598 |
| Python | 0.152040 |
| Lua | 0.164917 |
| LuaJit | 0.128400 |
| Vim new | 0.079692 |
[These times were measured on a different system by Dominique Pelle]
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.
Using LuaJIT is only a little bit faster than plain Lua here, clearly the call
back to the Vim code is costly.
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

@ -74,7 +74,7 @@ Unpack the images:
cd nsis
unzip icons.zip
To build then, enter:
Then build gvim.exe:
cd nsis
makensis gvim.nsi

View File

@ -126,10 +126,11 @@ RequestExecutionLevel highest
# This adds '\Vim' to the user choice automagically. The actual value is
# obtained below with CheckOldVim.
!ifdef WIN64
InstallDir "$PROGRAMFILES64\Vim"
!define DEFAULT_INSTDIR "$PROGRAMFILES64\Vim"
!else
InstallDir "$PROGRAMFILES\Vim"
!define DEFAULT_INSTDIR "$PROGRAMFILES\Vim"
!endif
InstallDir ${DEFAULT_INSTDIR}
# Types of installs we can perform:
InstType $(str_type_typical)
@ -710,8 +711,13 @@ Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
!endif
# Check $VIM
ReadEnvStr $INSTDIR "VIM"
${If} $INSTDIR == ${DEFAULT_INSTDIR}
# Check $VIM
ReadEnvStr $3 "VIM"
${If} $3 != ""
StrCpy $INSTDIR $3
${EndIf}
${EndIf}
call CheckOldVim
Pop $3
@ -721,20 +727,11 @@ Function .onInit
SectionSetInstTypes ${id_section_old_ver} 0
SectionSetText ${id_section_old_ver} ""
${Else}
${If} $INSTDIR == ""
${If} $INSTDIR == ${DEFAULT_INSTDIR}
StrCpy $INSTDIR $3
${EndIf}
${EndIf}
# If did not find a path: use the default dir.
${If} $INSTDIR == ""
!ifdef WIN64
StrCpy $INSTDIR "$PROGRAMFILES64\Vim"
!else
StrCpy $INSTDIR "$PROGRAMFILES\Vim"
!endif
${EndIf}
${If} ${RunningX64}
SetRegView 64
${EndIf}

View File

@ -172,6 +172,17 @@ func dist#ft#FTent()
setf dtd
endfunc
func dist#ft#ExCheck()
let lines = getline(1, min([line("$"), 100]))
if exists('g:filetype_euphoria')
exe 'setf ' . g:filetype_euphoria
elseif match(lines, '^--\|^ifdef\>\|^include\>') > -1
setf euphoria3
else
setf elixir
endif
endfunc
func dist#ft#EuphoriaCheck()
if exists('g:filetype_euphoria')
exe 'setf ' . g:filetype_euphoria

View File

@ -3,7 +3,7 @@
" Maintainer: Mark Guzman <segfault@hasno.info>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2019 Feb 25
" Last Change: 2020 Apr 12
" ----------------------------------------------------------------------------
"
" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
@ -501,13 +501,8 @@ class VimRubyCompletion
return if rails_base == nil
$:.push rails_base unless $:.index( rails_base )
rails_config = rails_base + "config/"
rails_lib = rails_base + "lib/"
$:.push rails_config unless $:.index( rails_config )
$:.push rails_lib unless $:.index( rails_lib )
bootfile = rails_config + "boot.rb"
envfile = rails_config + "environment.rb"
bootfile = rails_base + "config/boot.rb"
envfile = rails_base + "config/environment.rb"
if File.exists?( bootfile ) && File.exists?( envfile )
begin
require bootfile

View File

@ -0,0 +1,17 @@
" Vim compiler file
" Compiler: Spectral for YAML
" Maintainer: Romain Lafourcade <romainlafourcade@gmail.com>
" Last Change: 2021 July 21
if exists("current_compiler")
finish
endif
let current_compiler = "spectral"
if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif
CompilerSet makeprg=spectral\ lint\ %\ -f\ text
CompilerSet errorformat=%f:%l:%c\ %t%.%\\{-}\ %m

View File

@ -0,0 +1,16 @@
" Vim compiler file
" Compiler: Yamllint for YAML
" Maintainer: Romain Lafourcade <romainlafourcade@gmail.com>
" Last Change: 2021 July 21
if exists("current_compiler")
finish
endif
let current_compiler = "yamllint"
if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif
CompilerSet makeprg=yamllint\ -f\ parsable

View File

@ -1,4 +1,4 @@
*arabic.txt* For Vim version 8.2. Last change: 2019 May 05
*arabic.txt* For Vim version 8.2. Last change: 2021 Jun 22
VIM REFERENCE MANUAL by Nadim Shaikli
@ -176,6 +176,13 @@ o Enable Arabic settings [short-cut]
and its support is preferred due to its level of offerings.
'arabic' when 'termbidi' is enabled only sets the keymap.
For vertical window isolation while setting 'termbidi' an LTR
vertical separator like "l" or "𝖨" may be used. It may also be
hidden by changing its color to the foreground color: >
:set fillchars=vert:l
:hi VertSplit ctermbg=White
< Note that this is a workaround, not a proper solution.
If, on the other hand, you'd like to be verbose and explicit and
are opting not to use the 'arabic' short-cut command, here's what
is needed (i.e. if you use ':set arabic' you can skip this section) -

View File

@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.2. Last change: 2021 May 29
*autocmd.txt* For Vim version 8.2. Last change: 2021 Jul 27
VIM REFERENCE MANUAL by Bram Moolenaar
@ -54,7 +54,7 @@ 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.
@ -76,6 +76,12 @@ and in a `:def` function) then {cmd} will be executed as in Vim9
script. Thus this depends on where the autocmd is defined, not where it is
triggered.
{cmd} can use a block, like with `:command`, see |:command-repl|. Example: >
au BufReadPost *.xml {
setlocal matchpairs+=<:>
/<start
}
Note: The ":autocmd" command can only be followed by another command when the
'|' appears before {cmd}. This works: >
:augroup mine | au! BufRead | augroup END
@ -679,8 +685,11 @@ CursorHoldI Just like CursorHold, but in Insert mode.
CursorMoved After the cursor was moved in Normal or Visual
mode. Also when the text of the cursor line
has been changed, e.g., with "x", "rx" or "p".
Not triggered when there is typeahead or when
an operator is pending.
Not triggered when there is typeahead, while
executing commands in a script file, when
an operator is pending or when moving to
another window while remaining at the same
cursor position.
For an example see |match-parens|.
Note: This can not be skipped with
`:noautocmd`.

View File

@ -1,4 +1,4 @@
*change.txt* For Vim version 8.2. Last change: 2021 Mar 01
*change.txt* For Vim version 8.2. Last change: 2021 Jun 23
VIM REFERENCE MANUAL by Bram Moolenaar
@ -780,12 +780,15 @@ For compatibility with Vi these two exceptions are allowed:
"\/{string}/" and "\?{string}?" do the same as "//{string}/r".
"\&{string}&" does the same as "//{string}/".
*pattern-delimiter* *E146*
Instead of the '/' which surrounds the pattern and replacement string, you
can use any other single-byte character, but not an alphanumeric character,
'\', '"' or '|'. This is useful if you want to include a '/' in the search
pattern or replacement string. Example: >
Instead of the '/' which surrounds the pattern and replacement string, you can
use another single-byte character. This is useful if you want to include a
'/' in the search pattern or replacement string. Example: >
:s+/+//+
You can use most characters, but not an alphanumeric character, '\', '"' or
'|'. In Vim9 script you should not use '#' because it may be recognized as
the start of a comment.
For the definition of a pattern, see |pattern|. In Visual block mode, use
|/\%V| in the pattern to have the substitute work in the block only.
Otherwise it works on whole lines anyway.
@ -1042,6 +1045,10 @@ inside of strings can change! Also see 'softtabstop' option. >
cursor to the end of line (which is more logical,
but not Vi-compatible) use ":map Y y$".
*zy*
["x]zy{motion} Yank {motion} text [into register x]. Only differs
from `y` when selecting a block of text, see |v_zy|.
*v_y*
{Visual}["x]y Yank the highlighted text [into register x] (for
{Visual} see |Visual-mode|).
@ -1050,6 +1057,12 @@ inside of strings can change! Also see 'softtabstop' option. >
{Visual}["x]Y Yank the highlighted lines [into register x] (for
{Visual} see |Visual-mode|).
*v_zy*
{Visual}["x]zy Yank the highlighted text [into register x]. Trailing
whitespace at the end of each line of a selected block
won't be yanked. Especially useful in combination
with `zp`. (for {Visual} see |Visual-mode|)
*:y* *:yank* *E850*
:[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the
"* or "+ registers is possible only when the
@ -1129,7 +1142,8 @@ inside of strings can change! Also see 'softtabstop' option. >
["x]zp or *zp* *zP*
["x]zP Like "p" and "P", except without adding trailing spaces
when pasting a block. Thus the inserted text will not
always be a rectangle.
always be a rectangle. Especially useful in
combination with |v_zy|.
You can use these commands to copy text from one place to another. Do this
by first getting the text into a register with a yank, delete or change

View File

@ -852,7 +852,7 @@ available.
job_getchannel({job}) *job_getchannel()*
Get the channel handle that {job} is using.
To check if the job has no channel: >
if string(job_getchannel()) == 'channel fail'
if string(job_getchannel(job)) == 'channel fail'
<
Can also be used as a |method|: >
GetJob()->job_getchannel()

View File

@ -1,4 +1,4 @@
*digraph.txt* For Vim version 8.2. Last change: 2020 Jul 16
*digraph.txt* For Vim version 8.2. Last change: 2021 Jul 19
VIM REFERENCE MANUAL by Bram Moolenaar
@ -38,6 +38,9 @@ An alternative is using the 'keymap' option.
< Avoid defining a digraph with '_' (underscore) as the
first character, it has a special meaning in the
future.
NOTE: This command cannot add a digraph that starts
with a white space. If you want to add such digraph,
you can use |digraph_set()| instead.
Vim is normally compiled with the |+digraphs| feature. If the feature is
disabled, the ":digraph" command will display an error message.

View File

@ -1,4 +1,4 @@
*editing.txt* For Vim version 8.2. Last change: 2021 May 27
*editing.txt* For Vim version 8.2. Last change: 2021 Jul 25
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1469,8 +1469,11 @@ be readable again. If you use a wrong key, it will be a mess.
:X Prompt for an encryption key. The typing is done without showing the
actual text, so that someone looking at the display won't see it.
The typed key is stored in the 'key' option, which is used to encrypt
the file when it is written. The file will remain unchanged until you
write it. See also |-x|.
the file when it is written.
The file will remain unchanged until you write it. Note that commands
such as `:xit` and `ZZ` will NOT write the file unless there are other
changes.
See also |-x|.
The value of the 'key' options is used when text is written. When the option
is not empty, the written file will be encrypted, using the value as the
@ -1749,6 +1752,12 @@ There are three different types of searching:
/u/user_x/work/include
/u/user_x/include
< Note: If your 'path' setting includes an non-existing directory, Vim will
skip the non-existing directory, but continues searching in the parent of
the non-existing directory if upwards searching is used. E.g. when
searching "../include" and that doesn't exist, and upward searching is
used, also searches in "..".
3) Combined up/downward search:
If Vim's current path is /u/user_x/work/release and you do >
set path=**;/u/user_x

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.2. Last change: 2021 May 07
*eval.txt* For Vim version 8.2. Last change: 2021 Jul 28
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1588,7 +1588,17 @@ The lambda expression is also useful for Channel, Job and timer: >
Handler called
Handler called
Note how execute() is used to execute an Ex command. That's ugly though.
Note that it is possible to cause memory to be used and not freed if the
closure is referenced by the context it depends on: >
function Function()
let x = 0
let F = {-> x}
endfunction
The closure uses "x" from the function scope, and "F" in that same scope
refers to the closure. This cycle results in the memory not being freed.
Recommendation: don't do this.
Notice how execute() is used to execute an Ex command. That's ugly though.
In Vim9 script you can use a command block, see |inline-function|.
Lambda expressions have internal names like '<lambda>42'. If you get an error
@ -1963,7 +1973,8 @@ v:fcs_choice What should happen after a |FileChangedShell| event was
Vim behaves like it is empty, there is no warning message.
*v:fname* *fname-variable*
v:fname The file name set by 'includeexpr'. Empty otherwise.
v:fname When evaluating 'includeexpr': the file name that was
detected. Empty otherwise.
*v:fname_in* *fname_in-variable*
v:fname_in The name of the input file. Valid while evaluating:
@ -2102,7 +2113,7 @@ v:null An empty String. Used to put "null" in JSON. See
v:numbermax Maximum value of a number.
*v:numbermin* *numbermin-variable*
v:numbermin Minimum value of a number (negative)
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
@ -2508,7 +2519,7 @@ char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
charclass({string}) Number character class of {string}
charcol({expr}) Number column number of cursor or mark
charidx({string}, {idx} [, {countcc}])
Number char index of byte {idx} in {string}
Number char index of byte {idx} in {string}
chdir({dir}) String change current working directory
cindent({lnum}) Number C indent for line {lnum}
clearmatches([{win}]) none clear all matches
@ -2529,7 +2540,7 @@ cscope_connection([{num}, {dbpath} [, {prepend}]])
cursor({lnum}, {col} [, {off}])
Number move cursor to {lnum}, {col}, {off}
cursor({list}) Number move cursor to position in {list}
debugbreak({pid}) Number interrupt process being debugged
debugbreak({pid}) Number interrupt process being debugged
deepcopy({expr} [, {noref}]) any make a full copy of {expr}
delete({fname} [, {flags}]) Number delete the file or directory {fname}
deletebufline({expr}, {first} [, {last}])
@ -2537,6 +2548,10 @@ deletebufline({expr}, {first} [, {last}])
did_filetype() Number |TRUE| if FileType autocmd event used
diff_filler({lnum}) Number diff filler lines about {lnum}
diff_hlID({lnum}, {col}) Number diff highlighting at {lnum}/{col}
digraph_get({chars}) String get the digraph of {chars}
digraph_getlist([{listall}]) List get all |digraph|s
digraph_set({chars}, {digraph}) Boolean register |digraph|
digraph_setlist({digraphlist}) Boolean register multiple |digraph|s
echoraw({expr}) none output {expr} as-is
empty({expr}) Number |TRUE| if {expr} is empty
environ() Dict return environment variables
@ -2594,10 +2609,12 @@ getbufline({expr}, {lnum} [, {end}])
getbufvar({expr}, {varname} [, {def}])
any variable {varname} in buffer {expr}
getchangelist([{expr}]) List list of change list items
getchar([expr]) Number get one character from the user
getchar([expr]) Number or String
get one character from the user
getcharmod() Number modifiers for the last typed character
getcharpos({expr}) List position of cursor, mark, etc.
getcharsearch() Dict last character search
getcharstr([expr]) String get one character from the user
getcmdline() String return the current command-line
getcmdpos() Number return cursor position in command-line
getcmdtype() String return current command-line type
@ -3020,6 +3037,10 @@ test_feedinput({string}) none add key sequence to input buffer
test_garbagecollect_now() none free memory right now for testing
test_garbagecollect_soon() none free memory soon for testing
test_getvalue({string}) any get value of an internal variable
test_gui_drop_files({list}, {row}, {col}, {mods})
none drop a list of files in a window
test_gui_mouse_event({button}, {row}, {col}, {repeated}, {mods})
none add a mouse event to the input buffer
test_ignore_error({expr}) none ignore a specific error
test_null_blob() Blob null value for testing
test_null_channel() Channel null value for testing
@ -3156,6 +3177,7 @@ append({lnum}, {text}) *append()*
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.
{lnum} is used like with |getline()|.
Returns 1 for failure ({lnum} out of range or out of memory),
0 for success. Example: >
:let failed = append(line('$'), "# THE END")
@ -3425,8 +3447,9 @@ bufloaded({expr}) *bufloaded()*
let loaded = 'somename'->bufloaded()
bufname([{expr}]) *bufname()*
The result is the name of a buffer, as it is displayed by the
":ls" command.
The result is the name of a buffer. Mostly as it is displayed
by the `:ls` command, but not using special names such as
"[No Name]".
If {expr} is omitted the current buffer is used.
If {expr} is a Number, that buffer number's name is given.
Number zero is the alternate buffer for the current window.
@ -3461,7 +3484,7 @@ bufname([{expr}]) *bufname()*
*bufnr()*
bufnr([{expr} [, {create}]])
The result is the number of a buffer, as it is displayed by
the ":ls" command. For the use of {expr}, see |bufname()|
the `:ls` command. For the use of {expr}, see |bufname()|
above.
If the buffer doesn't exist, -1 is returned. Or, if the
@ -3656,10 +3679,10 @@ charidx({string}, {idx} [, {countcc}])
The index of the first character is zero.
If there are no multibyte characters the returned value is
equal to {idx}.
When {countcc} is omitted or zero, then composing characters
are not counted separately, their byte length is added to the
preceding base character.
When {countcc} is set to 1, then composing characters are
When {countcc} is omitted or |FALSE|, then composing characters
are not counted separately, their byte length is
added to the preceding base character.
When {countcc} is |TRUE|, then composing characters are
counted as separate characters.
Returns -1 if the arguments are invalid or if {idx} is greater
than the index of the last byte in {string}. An error is
@ -3831,7 +3854,9 @@ complete_info([{what}])
See |complete-items|.
selected Selected item index. First index is zero.
Index is -1 if no item is selected (showing
typed text only)
typed text only, or the last completion after
no item is selected when using the <Up> or
<Down> keys)
inserted Inserted string. [NOT IMPLEMENT YET]
*complete_info_mode*
@ -4046,6 +4071,7 @@ cursor({list})
|setcursorcharpos()|.
Does not change the jumplist.
{lnum} is used like with |getline()|.
If {lnum} is greater than the number of lines in the buffer,
the cursor will be positioned at the last line in the buffer.
If {lnum} is zero, the cursor will stay in the current line.
@ -4177,6 +4203,107 @@ diff_hlID({lnum}, {col}) *diff_hlID()*
Can also be used as a |method|: >
GetLnum()->diff_hlID(col)
<
digraph_get({chars}) *digraph_get()* *E1214*
Return the digraph of {chars}. This should be a string with
exactly two characters. If {chars} are not just two
characters, or the digraph of {chars} does not exist, an error
is given and an empty string is returned.
The character will be converted from Unicode to 'encoding'
when needed. This does require the conversion to be
available, it might fail.
Also see |digraph_getlist()|.
Examples: >
" Get a built-in digraph
:echo digraph_get('00') " Returns '∞'
" Get a user-defined digraph
:call digraph_set('aa', 'あ')
:echo digraph_get('aa') " Returns 'あ'
<
Can also be used as a |method|: >
GetChars()->digraph_get()
<
This function works only when compiled with the |+digraphs|
feature. If this feature is disabled, this function will
display an error message.
digraph_getlist([{listall}]) *digraph_getlist()*
Return a list of digraphs. If the {listall} argument is given
and it is TRUE, return all digraphs, including the default
digraphs. Otherwise, return only user-defined digraphs.
The characters will be converted from Unicode to 'encoding'
when needed. This does require the conservation to be
available, it might fail.
Also see |digraph_get()|.
Examples: >
" Get user-defined digraphs
:echo digraph_getlist()
" Get all the digraphs, including default digraphs
:echo digraph_getlist(1)
<
Can also be used as a |method|: >
GetNumber()->digraph_getlist()
<
This function works only when compiled with the |+digraphs|
feature. If this feature is disabled, this function will
display an error message.
digraph_set({chars}, {digraph}) *digraph_set()* *E1205*
Add digraph {chars} to the list. {chars} must be a string
with two characters. {digraph} is a string with one utf-8
encoded character. Be careful, composing characters are NOT
ignored. This function is similar to |:digraphs| command, but
useful to add digraphs start with a white space.
The function result is v:true if |digraph| is registered. If
this fails an error message is given and v:false is returned.
If you want to define multiple digraphs at once, you can use
|digraph_setlist()|.
Example: >
call digraph_set(' ', 'あ')
<
Can be used as a |method|: >
GetString()->digraph_set('あ')
<
This function works only when compiled with the |+digraphs|
feature. If this feature is disabled, this function will
display an error message.
digraph_setlist({digraphlist}) *digraph_setlist()*
Similar to |digraph_set()| but this function can add multiple
digraphs at once. {digraphlist} is a list composed of lists,
where each list contains two strings with {chars} and
{digraph} as in |digraph_set()|.
Example: >
call digraph_setlist([['aa', 'あ'], ['ii', 'い']])
<
It is similar to the following: >
for [chars, digraph] in [['aa', 'あ'], ['ii', 'い']]
call digraph_set(chars, digraph)
endfor
< Except that the function returns after the first error,
following digraphs will not be added.
Can be used as a |method|: >
GetList()->digraph_setlist()
<
This function works only when compiled with the |+digraphs|
feature. If this feature is disabled, this function will
display an error message.
echoraw({expr}) *echoraw()*
@ -4315,6 +4442,8 @@ exepath({expr}) *exepath()*
*exists()*
exists({expr}) The result is a Number, which is |TRUE| if {expr} is defined,
zero otherwise.
Note: In a compiled |:def| function local variables and
arguments are not visible to `exists()`.
For checking for a supported feature use |has()|.
For checking if a file exists use |filereadable()|.
@ -4337,9 +4466,11 @@ exists({expr}) The result is a Number, which is |TRUE| if {expr} is defined,
varname internal variable (see
|internal-variables|). Also works
for |curly-braces-names|, |Dictionary|
entries, |List| items, etc. Beware
that evaluating an index may cause an
error message for an invalid
entries, |List| items, etc.
Does not work for local variables in a
compiled `:def` function.
Beware that evaluating an index may
cause an error message for an invalid
expression. E.g.: >
:let l = [1, 2, 3]
:echo exists("l[5]")
@ -4652,15 +4783,18 @@ filewritable({file}) *filewritable()*
filter({expr1}, {expr2}) *filter()*
{expr1} must be a |List| or a |Dictionary|.
{expr1} must be a |List|, |Blob| or |Dictionary|.
For each item in {expr1} evaluate {expr2} and when the result
is zero remove the item from the |List| or |Dictionary|.
is zero remove the item from the |List| or |Dictionary|. For a
|Blob| each byte is removed.
{expr2} must be a |string| or |Funcref|.
If {expr2} is a |string|, inside {expr2} |v:val| has the value
of the current item. For a |Dictionary| |v:key| has the key
of the current item and for a |List| |v:key| has the index of
the current item.
the current item. For a |Blob| |v:key| has the index of the
current byte.
Examples: >
call filter(mylist, 'v:val !~ "OLD"')
< Removes the items where "OLD" appears. >
@ -4691,11 +4825,11 @@ filter({expr1}, {expr2}) *filter()*
|Dictionary| to remain unmodified make a copy first: >
:let l = filter(copy(mylist), 'v:val =~ "KEEP"')
< Returns {expr1}, the |List| or |Dictionary| that was filtered.
When an error is encountered while evaluating {expr2} no
further items in {expr1} are processed. When {expr2} is a
Funcref errors inside a function are ignored, unless it was
defined with the "abort" flag.
< Returns {expr1}, the |List| , |Blob| or |Dictionary| that was
filtered. When an error is encountered while evaluating
{expr2} no further items in {expr1} are processed. When
{expr2} is a Funcref errors inside a function are ignored,
unless it was defined with the "abort" flag.
Can also be used as a |method|: >
mylist->filter(expr2)
@ -4856,6 +4990,8 @@ foldclosed({lnum}) *foldclosed()*
The result is a Number. If the line {lnum} is in a closed
fold, the result is the number of the first line in that fold.
If the line {lnum} is not in a closed fold, -1 is returned.
{lnum} is used like with |getline()|. Thus "." is the current
line, "'m" mark m, etc.
Can also be used as a |method|: >
GetLnum()->foldclosed()
@ -4864,6 +5000,8 @@ foldclosedend({lnum}) *foldclosedend()*
The result is a Number. If the line {lnum} is in a closed
fold, the result is the number of the last line in that fold.
If the line {lnum} is not in a closed fold, -1 is returned.
{lnum} is used like with |getline()|. Thus "." is the current
line, "'m" mark m, etc.
Can also be used as a |method|: >
GetLnum()->foldclosedend()
@ -4877,6 +5015,8 @@ foldlevel({lnum}) *foldlevel()*
returned for lines where folds are still to be updated and the
foldlevel is unknown. As a special case the level of the
previous line is usually available.
{lnum} is used like with |getline()|. Thus "." is the current
line, "'m" mark m, etc.
Can also be used as a |method|: >
GetLnum()->foldlevel()
@ -4949,7 +5089,7 @@ funcref({name} [, {arglist}] [, {dict}])
Can also be used as a |method|: >
GetFuncname()->funcref([arg])
<
*function()* *E700* *E922* *E923*
*function()* *partial* *E700* *E922* *E923*
function({name} [, {arglist}] [, {dict}])
Return a |Funcref| variable that refers to function {name}.
{name} can be the name of a user defined function or an
@ -5232,6 +5372,7 @@ getchar([expr]) *getchar()*
Return zero otherwise.
If [expr] is 1, only check if a character is available, it is
not consumed. Return zero if no character available.
If you prefer always getting a string use |getcharstr()|.
Without [expr] and when [expr] is 0 a whole character or
special key is returned. If it is a single character, the
@ -5357,6 +5498,20 @@ getcharsearch() *getcharsearch()*
:nnoremap <expr> , getcharsearch().forward ? ',' : ';'
< Also see |setcharsearch()|.
getcharstr([expr]) *getcharstr()*
Get a single character from the user or input stream as a
string.
If [expr] is omitted, wait until a character is available.
If [expr] is 0 or false, only get a character when one is
available. Return an empty string otherwise.
If [expr] is 1 or true, only check if a character is
available, it is not consumed. Return an empty string
if no character is available.
Otherwise this works like |getchar()|, except that a number
result is converted to a string.
getcmdline() *getcmdline()*
Return the current command-line. Only works when the command
line is being edited, thus requires use of |c_CTRL-\_e| or
@ -5483,8 +5638,8 @@ getcurpos([{winid}])
Can also be used as a |method|: >
GetWinid()->getcurpos()
< *getcursorcharpos()*
<
*getcursorcharpos()*
getcursorcharpos([{winid}])
Same as |getcurpos()| but the column number in the returned
List is a character index instead of a byte index.
@ -5493,8 +5648,8 @@ getcursorcharpos([{winid}])
With the cursor on '보' in line 3 with text "여보세요": >
getcursorcharpos() returns [0, 3, 2, 0, 3]
getcurpos() returns [0, 3, 4, 0, 3]
< Can also be used as a |method|: >
<
Can also be used as a |method|: >
GetWinid()->getcursorcharpos()
< *getcwd()*
@ -5533,7 +5688,7 @@ getcwd([{winnr} [, {tabnr}]])
< Can also be used as a |method|: >
GetWinnr()->getcwd()
<
getenv({name}) *getenv()*
Return the value of environment variable {name}.
When the variable does not exist |v:null| is returned. That
@ -5719,11 +5874,11 @@ getmarklist([{expr}]) *getmarklist()*
see |bufname()|.
Each item in the returned List is a |Dict| with the following:
name - name of the mark prefixed by "'"
pos - a |List| with the position of the mark:
mark name of the mark prefixed by "'"
pos a |List| with the position of the mark:
[bufnum, lnum, col, off]
Refer to |getpos()| for more information.
file - file name
Refer to |getpos()| for more information.
file file name
Refer to |getpos()| for getting information about a specific
mark.
@ -5737,6 +5892,8 @@ getmatches([{win}]) *getmatches()*
|getmatches()| is useful in combination with |setmatches()|,
as |setmatches()| can restore a list of matches saved by
|getmatches()|.
If {win} is specified, use the window with this number or
window ID instead of the current window.
Example: >
:echo getmatches()
< [{'group': 'MyGroup1', 'pattern': 'TODO',
@ -5774,7 +5931,7 @@ getmousepos() *getmousepos()*
are zero.
When the position is after the text then "column" is the
length of the text in bytes.
length of the text in bytes plus one.
If the mouse is over a popup window then that window is used.
@ -5805,7 +5962,7 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
'> is a large number.
The column number in the returned List is the byte position
within the line. To get the character position in the line,
use |getcharpos()|
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: >
@ -5824,7 +5981,10 @@ getqflist([{what}]) *getqflist()*
bufname() to get the name
module module name
lnum line number in the buffer (first line is 1)
end_lnum
end of line number if the item is multiline
col column number (first column is 1)
end_col end of column number if the item has range
vcol |TRUE|: "col" is visual column
|FALSE|: "col" is byte index
nr error number
@ -5834,8 +5994,10 @@ getqflist([{what}]) *getqflist()*
valid |TRUE|: recognized error message
When there is no error list or it's empty, an empty list is
returned. Quickfix list entries with non-existing buffer
number are returned with "bufnr" set to zero.
returned. Quickfix list entries with a non-existing buffer
number are returned with "bufnr" set to zero (Note: some
functions accept buffer number zero for the alternate buffer,
you may need to explicitly check for zero).
Useful application: Find pattern matches in multiple files and
do something with them: >
@ -5979,12 +6141,12 @@ getregtype([{regname}]) *getregtype()*
Can also be used as a |method|: >
GetRegname()->getregtype()
gettabinfo([{arg}]) *gettabinfo()*
If {arg} is not specified, then information about all the tab
pages is returned as a |List|. Each List item is a |Dictionary|.
Otherwise, {arg} specifies the tab page number and information
about that one is returned. If the tab page does not exist an
empty List is returned.
gettabinfo([{tabnr}]) *gettabinfo()*
If {tabnr} is not specified, then information about all the
tab pages is returned as a |List|. Each List item is a
|Dictionary|. Otherwise, {tabnr} specifies the tab page
number and information about that one is returned. If the tab
page does not exist an empty List is returned.
Each List item is a |Dictionary| with the following entries:
tabnr tab page number.
@ -6037,11 +6199,11 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
< Can also be used as a |method|: >
GetTabnr()->gettabwinvar(winnr, varname)
gettagstack([{nr}]) *gettagstack()*
The result is a Dict, which is the tag stack of window {nr}.
{nr} can be the window number or the |window-ID|.
When {nr} is not specified, the current window is used.
When window {nr} doesn't exist, an empty Dict is returned.
gettagstack([{winnr}]) *gettagstack()*
The result is a Dict, which is the tag stack of window {winnr}.
{winnr} can be the window number or the |window-ID|.
When {winnr} is not specified, the current window is used.
When window {winnr} doesn't exist, an empty Dict is returned.
The returned dictionary contains the following entries:
curidx Current index in the stack. When at
@ -6988,9 +7150,9 @@ line2byte({lnum}) *line2byte()*
below the last line: >
line2byte(line("$") + 1)
< This is the buffer size plus one. If 'fileencoding' is empty
it is the file size plus one.
When {lnum} is invalid, or the |+byte_offset| feature has been
disabled at compile time, -1 is returned.
it is the file size plus one. {lnum} is used like with
|getline()|. When {lnum} is invalid, or the |+byte_offset|
feature has been disabled at compile time, -1 is returned.
Also see |byte2line()|, |go| and |:goto|.
Can also be used as a |method|: >
@ -7163,6 +7325,8 @@ luaeval({expr} [, {expr}]) *luaeval()*
as-is.
Other objects are returned as zero without any errors.
See |lua-luaeval| for more details.
Note that in a `:def` function local variables are not visible
to {expr}.
Can also be used as a |method|: >
GetExpr()->luaeval()
@ -7182,7 +7346,8 @@ map({expr1}, {expr2}) *map()*
If {expr2} is a |string|, inside {expr2} |v:val| has the value
of the current item. For a |Dictionary| |v:key| has the key
of the current item and for a |List| |v:key| has the index of
the current item.
the current item. For a |Blob| |v:key| has the index of the
current byte.
Example: >
:call map(mylist, '"> " . v:val . " <"')
< This puts "> " before and " <" after each item in "mylist".
@ -7620,7 +7785,7 @@ matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()*
Same as |matchfuzzy()|, but returns the list of matched
strings, the list of character positions where characters
in {str} matches and a list of matching scores. You can
use |byteidx()|to convert a character position to a byte
use |byteidx()| to convert a character position to a byte
position.
If {str} matches multiple times in a string, then only the
@ -7828,6 +7993,10 @@ mode([expr]) Return a string that indicates the current mode.
s Select by character
S Select by line
CTRL-S Select blockwise
vs Visual by character using |v_CTRL-O| from
Select mode
Vs Visual by line using |v_CTRL-O| from Select mode
CTRL-Vs Visual blockwise using |v_CTRL-O| from Select mode
i Insert
ic Insert mode completion |compl-generic|
ix Insert mode |i_CTRL-X| completion
@ -7869,6 +8038,9 @@ mzeval({expr}) *mzeval()*
:echo mzeval("l")
:echo mzeval("h")
<
Note that in a `:def` function local variables are not visible
to {expr}.
Can also be used as a |method|: >
GetExpr()->mzeval()
<
@ -7880,6 +8052,7 @@ nextnonblank({lnum}) *nextnonblank()*
if getline(nextnonblank(1)) =~ "Java"
< When {lnum} is invalid or there is no non-blank line at or
below it, zero is returned.
{lnum} is used like with |getline()|.
See also |prevnonblank()|.
Can also be used as a |method|: >
@ -7941,6 +8114,9 @@ perleval({expr}) *perleval()*
:echo perleval('[1 .. 4]')
< [1, 2, 3, 4]
Note that in a `:def` function local variables are not visible
to {expr}.
Can also be used as a |method|: >
GetExpr()->perleval()
@ -7972,6 +8148,7 @@ prevnonblank({lnum}) *prevnonblank()*
let ind = indent(prevnonblank(v:lnum - 1))
< When {lnum} is invalid or there is no non-blank line at or
above it, zero is returned.
{lnum} is used like with |getline()|.
Also see |nextnonblank()|.
Can also be used as a |method|: >
@ -8185,6 +8362,8 @@ prompt_getprompt({buf}) *prompt_getprompt()*
Can also be used as a |method|: >
GetBuffer()->prompt_getprompt()
< {only available when compiled with the |+channel| feature}
prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
Set prompt callback for buffer {buf} to {expr}. When {expr}
@ -8218,6 +8397,7 @@ prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
< Can also be used as a |method|: >
GetBuffer()->prompt_setcallback(callback)
< {only available when compiled with the |+channel| feature}
prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
Set a callback for buffer {buf} to {expr}. When {expr} is an
@ -8231,6 +8411,8 @@ prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
Can also be used as a |method|: >
GetBuffer()->prompt_setinterrupt(callback)
< {only available when compiled with the |+channel| feature}
prompt_setprompt({buf}, {text}) *prompt_setprompt()*
Set prompt for buffer {buf} to {text}. You most likely want
{text} to end in a space.
@ -8241,6 +8423,8 @@ prompt_setprompt({buf}, {text}) *prompt_setprompt()*
Can also be used as a |method|: >
GetBuffer()->prompt_setprompt('command: ')
< {only available when compiled with the |+channel| feature}
prop_ functions are documented here: |text-prop-functions|
pum_getpos() *pum_getpos()*
@ -8272,6 +8456,8 @@ py3eval({expr}) *py3eval()*
Lists are represented as Vim |List| type.
Dictionaries are represented as Vim |Dictionary| type with
keys converted to strings.
Note that in a `:def` function local variables are not visible
to {expr}.
Can also be used as a |method|: >
GetExpr()->py3eval()
@ -8287,6 +8473,8 @@ pyeval({expr}) *pyeval()*
Lists are represented as Vim |List| type.
Dictionaries are represented as Vim |Dictionary| type,
non-string keys result in error.
Note that in a `:def` function local variables are not visible
to {expr}.
Can also be used as a |method|: >
GetExpr()->pyeval()
@ -8546,7 +8734,8 @@ reltime([{start} [, {end}]]) *reltime()*
and {end}.
The {start} and {end} arguments must be values returned by
reltime().
reltime(). If there is an error zero is returned in legacy
script, in Vim9 script an error is given.
Can also be used as a |method|: >
GetStart()->reltime()
@ -8561,6 +8750,8 @@ reltimefloat({time}) *reltimefloat()*
let seconds = reltimefloat(reltime(start))
< See the note of reltimestr() about overhead.
Also see |profiling|.
If there is an error 0.0 is returned in legacy script, in Vim9
script an error is given.
Can also be used as a |method|: >
reltime(start)->reltimefloat()
@ -8580,6 +8771,8 @@ reltimestr({time}) *reltimestr()*
can use split() to remove it. >
echo split(reltimestr(reltime(start)))[0]
< Also see |profiling|.
If there is an error an empty string is returned in legacy
script, in Vim9 script an error is given.
Can also be used as a |method|: >
reltime(start)->reltimestr()
@ -8813,6 +9006,8 @@ rubyeval({expr}) *rubyeval()*
Hashes are represented as Vim |Dictionary| type.
Other objects are represented as strings resulted from their
"Object#to_s" method.
Note that in a `:def` function local variables are not visible
to {expr}.
Can also be used as a |method|: >
GetRubyExpr()->rubyeval()
@ -8880,6 +9075,10 @@ screenpos({winid}, {lnum}, {col}) *screenpos()*
The "curscol" value is where the cursor would be placed. For
a Tab it would be the same as "endcol", while for a double
width character it would be the same as "col".
The |conceal| feature is ignored here, the column numbers are
as if 'conceallevel' is zero. You can set the cursor to the
right position and use |screencol()| to get the value with
|conceal| taken into account.
Can also be used as a |method|: >
GetWinid()->screenpos(lnum, col)
@ -9434,6 +9633,7 @@ setcursorcharpos({list})
Can also be used as a |method|: >
GetCursorPos()->setcursorcharpos()
setenv({name}, {val}) *setenv()*
Set environment variable {name} to {val}.
When {val} is |v:null| the environment variable is deleted.
@ -9844,6 +10044,10 @@ sha256({string}) *sha256()*
shellescape({string} [, {special}]) *shellescape()*
Escape {string} for use as a shell command argument.
When the 'shell' contains powershell (MS-Windows) or pwsh
(MS-Windows, Linux, and MacOS) then it will enclose {string}
in single quotes and will double up all internal single
quotes.
On MS-Windows, when 'shellslash' is not set, it will enclose
{string} in double quotes and double all double quotes within
{string}.
@ -9944,7 +10148,7 @@ sinh({expr}) *sinh()*
{only available when compiled with the |+float| feature}
slice({expr}, {start} [, {end}]) *slice()*
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
@ -10680,7 +10884,7 @@ synID({lnum}, {col}, {trans}) *synID()*
line. 'synmaxcol' applies, in a longer line zero is returned.
Note that when the position is after the last character,
that's where the cursor can be in Insert mode, synID() returns
zero.
zero. {lnum} is used like with |getline()|.
When {trans} is |TRUE|, transparent items are reduced to the
item that they reveal. This is useful when wanting to know
@ -10748,7 +10952,7 @@ synconcealed({lnum}, {col}) *synconcealed()*
The result is a |List| with currently three items:
1. The first item in the list is 0 if the character at the
position {lnum} and {col} is not part of a concealable
region, 1 if it is.
region, 1 if it is. {lnum} is used like with |getline()|.
2. The second item in the list is a string. If the first item
is 1, the second item contains the text which will be
displayed in place of the concealed text, depending on the
@ -10772,8 +10976,9 @@ synconcealed({lnum}, {col}) *synconcealed()*
synstack({lnum}, {col}) *synstack()*
Return a |List|, which is the stack of syntax items at the
position {lnum} and {col} in the current window. Each item in
the List is an ID like what |synID()| returns.
position {lnum} and {col} in the current window. {lnum} is
used like with |getline()|. Each item in the List is an ID
like what |synID()| returns.
The first item in the List is the outer region, following are
items contained in that one. The last one is what |synID()|
returns, unless not the whole item is highlighted or it is a
@ -11006,7 +11211,8 @@ tempname() *tempname()* *temp-file-name*
:exe "redir > " . tmpfile
< For Unix, the file will be in a private directory |tempfile|.
For MS-Windows forward slashes are used when the 'shellslash'
option is set or when 'shellcmdflag' starts with '-'.
option is set, or when 'shellcmdflag' starts with '-' and
'shell' does not contain powershell or pwsh.
term_ functions are documented here: |terminal-function-details|
@ -11455,10 +11661,12 @@ win_gettype([{nr}]) *win_gettype()*
Return the type of the window:
"autocmd" autocommand window. Temporary window
used to execute autocommands.
"popup" popup window |popup|
"preview" preview window |preview-window|
"command" command-line window |cmdwin|
(empty) normal window
"loclist" |location-list-window|
"popup" popup window |popup|
"preview" preview window |preview-window|
"quickfix" |quickfix-window|
"unknown" window {nr} not found
When {nr} is omitted return the type of the current window.
@ -11499,7 +11707,7 @@ win_screenpos({nr}) *win_screenpos()*
[1, 1], unless there is a tabline, then it is [2, 1].
{nr} can be the window number or the |window-ID|. Use zero
for the current window.
Return [0, 0] if the window cannot be found in the current
Returns [0, 0] if the window cannot be found in the current
tabpage.
Can also be used as a |method|: >
@ -11846,6 +12054,7 @@ diff Compiled with |vimdiff| and 'diff' support.
digraphs Compiled with support for digraphs.
directx Compiled with support for DirectX and 'renderoptions'.
dnd Compiled with support for the "~ register |quote_~|.
drop_file Compiled with |drop_file| support.
ebcdic Compiled on a machine with ebcdic character set.
emacs_tags Compiled with support for Emacs tags.
eval Compiled with expression evaluation support. Always
@ -11951,6 +12160,7 @@ scrollbind Compiled with 'scrollbind' support. (always true)
showcmd Compiled with 'showcmd' support.
signs Compiled with |:sign| support.
smartindent Compiled with 'smartindent' support.
sodium Compiled with libsodium for better crypt support
sound Compiled with sound support, e.g. `sound_playevent()`
spell Compiled with spell checking support |spell|.
startuptime Compiled with |--startuptime| support.
@ -14215,7 +14425,7 @@ displayed.
*except-several-errors*
When several errors appear in a single command, the first error message is
usually the most specific one and therefor converted to the error exception.
usually the most specific one and therefore converted to the error exception.
Example: >
echo novar
causes >

View File

@ -632,7 +632,7 @@ For fish, add to the config file
MARKDOWN *ft-markdown-plugin*
To enable folding use this: >
let g:markdown_folding = 1
let g:markdown_folding = 1
<
PDF *ft-pdf-plugin*

View File

@ -1,4 +1,4 @@
*fold.txt* For Vim version 8.2. Last change: 2019 Jun 02
*fold.txt* For Vim version 8.2. Last change: 2021 Jul 13
VIM REFERENCE MANUAL by Bram Moolenaar
@ -541,6 +541,8 @@ nest, the nested fold is one character right of the fold it's contained in.
A closed fold is indicated with a '+'.
These characters can be changed with the 'fillchars' option.
Where the fold column is too narrow to display all nested folds, digits are
shown to indicate the nesting level.

View File

@ -1,4 +1,4 @@
*ps1.txt* A Windows PowerShell syntax plugin for Vim
*ft_ps1.txt* A Windows PowerShell syntax plugin for Vim
Author: Peter Provost <https://www.github.com/PProvost>
License: Apache 2.0

View File

@ -1,4 +1,4 @@
*vim-raku.txt* The Raku programming language filetype
*ft_raku.txt* The Raku programming language filetype
*vim-raku*
@ -45,7 +45,7 @@ Numbers, subscripts and superscripts are available with 's' and 'S':
1s ₁ 1S ¹ ~
2s ₂ 9S ⁹ ~
But some don´t come defined by default. Those are digraph definitions you can
But some don't come defined by default. Those are digraph definitions you can
add in your ~/.vimrc file. >
exec 'digraph \\ '.char2nr('')
exec 'digraph \< '.char2nr('≼')

View File

@ -1,4 +1,4 @@
*gui.txt* For Vim version 8.2. Last change: 2021 May 01
*gui.txt* For Vim version 8.2. Last change: 2021 Jun 27
VIM REFERENCE MANUAL by Bram Moolenaar
@ -411,7 +411,8 @@ Mouse mapping with modifiers does not work for modeless selection.
3.7 Drag and drop *drag-n-drop*
You can drag and drop one or more files into the Vim window, where they will
be opened as if a |:drop| command was used.
be opened as if a |:drop| command was used. You can check if this is
supported with the *drop_file* feature: `has('drop_file')`.
If you hold down Shift while doing this, Vim changes to the first dropped
file's directory. If you hold Ctrl Vim will always split a new window for the

View File

@ -132,7 +132,7 @@ Advanced editing ~
|windows.txt| commands for using multiple windows and buffers
|tabpage.txt| commands for using multiple tab pages
|spell.txt| spell checking
|diff.txt| working with two to four versions of the same file
|diff.txt| working with two to eight versions of the same file
|autocmd.txt| automatically executing commands on an event
|eval.txt| expression evaluation, conditional commands
|channel.txt| Jobs, Channels, inter-process communication
@ -145,6 +145,7 @@ Special issues ~
|term.txt| using different terminals and mice
|terminal.txt| Terminal window support
|popup.txt| popup window support
|vim9.txt| using Vim9 script
Programming language support ~
|indent.txt| automatic indenting for C and other languages
@ -153,6 +154,8 @@ Programming language support ~
|filetype.txt| settings done specifically for a type of file
|quickfix.txt| commands for a quick edit-compile-fix cycle
|ft_ada.txt| Ada (the programming language) support
|ft_ps1.txt| Filetype plugin for Windows PowerShell
|ft_raku.txt| Filetype plugin for Raku
|ft_rust.txt| Filetype plugin for Rust
|ft_sql.txt| about the SQL filetype plugin

View File

@ -211,6 +211,38 @@ Vim evaluation and command execution, and others.
vim.lua_version The Lua version Vim was compiled with, in the
form {major}.{minor}.{patch}, e.g. "5.1.4".
*lua-vim-variables*
The Vim editor global dictionaries |g:| |w:| |b:| |t:| |v:| can be accessed
from Lua conveniently and idiomatically by referencing the `vim.*` Lua tables
described below. In this way you can easily read and modify global Vimscript
variables from Lua.
Example: >
vim.g.foo = 5 -- Set the g:foo Vimscript variable.
print(vim.g.foo) -- Get and print the g:foo Vimscript variable.
vim.g.foo = nil -- Delete (:unlet) the Vimscript variable.
vim.g *vim.g*
Global (|g:|) editor variables.
Key with no value returns `nil`.
vim.b *vim.b*
Buffer-scoped (|b:|) variables for the current buffer.
Invalid or unset key returns `nil`.
vim.w *vim.w*
Window-scoped (|w:|) variables for the current window.
Invalid or unset key returns `nil`.
vim.t *vim.t*
Tabpage-scoped (|t:|) variables for the current tabpage.
Invalid or unset key returns `nil`.
vim.v *vim.v*
|v:| variables.
Invalid or unset key returns `nil`.
==============================================================================
3. List userdata *lua-list*

View File

@ -1,4 +1,4 @@
*index.txt* For Vim version 8.2. Last change: 2021 May 27
*index.txt* For Vim version 8.2. Last change: 2021 Jun 19
VIM REFERENCE MANUAL by Bram Moolenaar
@ -878,6 +878,7 @@ tag char note action in Normal mode ~
|zv| zv open enough folds to view the cursor line
|zw| zw permanently mark word as incorrectly spelled
|zx| zx re-apply 'foldlevel' and do "zv"
|zy| zy yank without trailing spaces
|zz| zz redraw, cursor line at center of window
|z<Left>| z<Left> same as "zh"
|z<Right>| z<Right> same as "zl"
@ -1311,6 +1312,7 @@ tag command action ~
|:endtry| :endt[ry] end previous :try
|:endwhile| :endw[hile] end previous :while
|:enew| :ene[w] edit a new, unnamed buffer
|:eval| :ev[al] evaluate an expression and discard the result
|:ex| :ex same as ":edit"
|:execute| :exe[cute] execute result of expressions
|:exit| :exi[t] same as ":xit"

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 8.2. Last change: 2020 Oct 16
*insert.txt* For Vim version 8.2. Last change: 2021 Jul 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1073,7 +1073,8 @@ On the second invocation the arguments are:
The function must return a List with the matching words. These matches
usually include the "a:base" text. When there are no matches return an empty
List.
List. Note that the cursor may have moved since the first invocation, the
text may have been changed.
In order to return more information than the matching words, return a Dict
that contains the List. The Dict can have these items:

View File

@ -1,4 +1,4 @@
*map.txt* For Vim version 8.2. Last change: 2021 May 16
*map.txt* For Vim version 8.2. Last change: 2021 Aug 01
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1571,6 +1571,20 @@ feature. Use the full name for new scripts.
Replacement text ~
*:command-repl*
The {repl} argument is normally one long string, possibly with "|" separated
commands. A special case is when the argument is "{", then the following
lines, up to a line starting with "}" are used and |Vim9| syntax applies.
Example: >
:command MyCommand {
echo 'hello'
g:calledMyCommand = true
}
< *E1231*
There must be white space before the "{". No nesting is supported, inline
functions cannot be used. Commands where a "|" may appear in the argument,
such as commands with an expression argument, cannot be followed by a "|" and
another command.
The replacement text {repl} for a user defined command is scanned for special
escape sequences, using <...> notation. Escape sequences are replaced with

View File

@ -1,4 +1,4 @@
*motion.txt* For Vim version 8.2. Last change: 2021 Mar 28
*motion.txt* For Vim version 8.2. Last change: 2021 Jun 13
VIM REFERENCE MANUAL by Bram Moolenaar
@ -59,9 +59,14 @@ or change text. The following operators are available:
|<| < shift left
|zf| zf define a fold
|g@| g@ call function set with the 'operatorfunc' option
*motion-count-multiplied*
If the motion includes a count and the operator also had a count before it,
the two counts are multiplied. For example: "2d3w" deletes six words.
*operator-doubled*
When doubling the operator it operates on a line. When using a count, before
or after the first character, that many lines are operated upon. Thus `3dd`
deletes three lines. A count before and after the first character is
multiplied, thus `2y3y` yanks six lines.
After applying the operator the cursor is mostly left at the start of the text
that was operated upon. For example, "yfe" doesn't move the cursor, but "yFe"
@ -195,9 +200,9 @@ l or *l*
*$* *<End>* *<kEnd>*
$ or <End> To the end of the line. When a count is given also go
[count - 1] lines downward, or as far is possible.
|inclusive| motion. If a count of 2 of larger is
|inclusive| motion. If a count of 2 or larger is
given and the cursor is on the last line, that is an
error an the cursor doesn't move.
error and the cursor doesn't move.
In Visual mode the cursor goes to just after the last
character in the line.
When 'virtualedit' is active, "$" may move the cursor

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2021 May 16
*options.txt* For Vim version 8.2. Last change: 2021 Jul 22
VIM REFERENCE MANUAL by Bram Moolenaar
@ -1326,7 +1326,12 @@ A jump table for the options with a short description can be found at |Q_op|.
continuation (positive).
sbr Display the 'showbreak' value before applying the
additional indent.
The default value for min is 20 and shift is 0.
list:{n} Adds an additional indent for lines that match a
numbered or bulleted list (using the
'formatlistpat' setting).
list:-1 Uses the length of a match with 'formatlistpat'
for indentation.
The default value for min is 20, shift and list is 0.
*'browsedir'* *'bsdir'*
'browsedir' 'bsdir' string (default: "last")
@ -2384,6 +2389,23 @@ A jump table for the options with a short description can be found at |Q_op|.
you write the file the encrypted bytes will be
different. The whole undo file is encrypted, not just
the pieces of text.
*E1193* *E1194* *E1195* *E1196*
*E1197* *E1198* *E1199* *E1200* *E1201*
xchacha20 XChaCha20 Cipher with Poly1305 Message Authentication
Code. Medium strong till strong encryption.
Encryption is provided by the libsodium library, it
requires Vim to be built with |+sodium|
It adds a seed and a message authentication code (MAC)
to the file. This needs at least a Vim 8.2.3022 to
read the encrypted file.
Encryption of swap files is not supported, therefore
no swap file will be used when xchacha20 encryption is
enabled.
Encryption of undo files is not yet supported,
therefore no undo file will currently be written.
CURRENTLY EXPERIMENTAL: Files written with this method
might have to be read back with the same version of
Vim if the binary format changes later.
You should use "blowfish2", also to re-encrypt older files.
@ -5595,19 +5617,21 @@ A jump table for the options with a short description can be found at |Q_op|.
- abbreviations are disabled
- 'autoindent' is reset
- 'expandtab' is reset
- 'formatoptions' is used like it is empty
- 'hkmap' is reset
- 'revins' is reset
- 'ruler' is reset
- 'showmatch' is reset
- 'smartindent' is reset
- 'smarttab' is reset
- 'softtabstop' is set to 0
- 'textwidth' is set to 0
- 'wrapmargin' is set to 0
- 'varsofttabstop' is made empty
These options keep their value, but their effect is disabled:
- 'cindent'
- 'formatoptions' is used like it is empty
- 'indentexpr'
- 'lisp'
- 'smartindent'
NOTE: When you start editing another file while the 'paste' option is
on, settings from the modelines or autocommands may change the
settings again, causing trouble when pasting text. You might want to
@ -6575,23 +6599,25 @@ A jump table for the options with a short description can be found at |Q_op|.
*'shellcmdflag'* *'shcf'*
'shellcmdflag' 'shcf' string (default: "-c";
Win32, when 'shell' does not contain "sh"
Win32, when 'shell' contains "powershell":
"-Command", or when it does not contain "sh"
somewhere: "/c")
global
Flag passed to the shell to execute "!" and ":!" commands; e.g.,
"bash.exe -c ls" or "cmd.exe /c dir". For MS-Windows, the default is
set according to the value of 'shell', to reduce the need to set this
option by the user.
"bash.exe -c ls", "powershell.exe -Command dir", or "cmd.exe /c dir".
For MS-Windows, the default is set according to the value of 'shell',
to reduce the need to set this option by the user.
On Unix it can have more than one flag. Each white space separated
part is passed as an argument to the shell command.
See |option-backslash| about including spaces and backslashes.
Also see |dos-shell| for MS-Windows.
Also see |dos-shell| and |dos-powershell| for MS-Windows.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'shellpipe'* *'sp'*
'shellpipe' 'sp' string (default ">", ">%s 2>&1", "| tee", "|& tee" or
"2>&1| tee")
'shellpipe' 'sp' string (default ">", ">%s 2>&1", "| tee", "|& tee"
"2>&1| tee", or
"2>&1 | Out-File -Encoding default")
global
{not available when compiled without the |+quickfix|
feature}
@ -6601,9 +6627,10 @@ A jump table for the options with a short description can be found at |Q_op|.
The name of the temporary file can be represented by "%s" if necessary
(the file name is appended automatically if no %s appears in the value
of this option).
For the Amiga the default is ">". For MS-Windows the default is
">%s 2>&1". The output is directly saved in a file and not echoed to
the screen.
For the Amiga the default is ">". For MS-Windows using powershell the
default is "2>&1 | Out-File -Encoding default", otherwise the default
is ">%s 2>&1". The output is directly saved in a file and not echoed
to the screen.
For Unix the default is "| tee". The stdout of the compiler is saved
in a file and echoed to the screen. If the 'shell' option is "csh" or
"tcsh" after initializations, the default becomes "|& tee". If the
@ -6611,6 +6638,8 @@ A jump table for the options with a short description can be found at |Q_op|.
"bash", "fish", "ash" or "dash" the default becomes "2>&1| tee". This
means that stderr is also included. Before using the 'shell' option a
path is removed, thus "/bin/sh" uses "sh".
For Unix and MS-Windows, when the 'shell' option is "pwsh" the default
becomes ">%s 2>&1" and the output is not echoed to the screen.
The initialization of this option is done after reading the ".vimrc"
and the other initializations, so that when the 'shell' option is set
there, the 'shellpipe' option changes automatically, unless it was
@ -6626,8 +6655,7 @@ A jump table for the options with a short description can be found at |Q_op|.
security reasons.
*'shellquote'* *'shq'*
'shellquote' 'shq' string (default: ""; Win32, when 'shell'
contains "sh" somewhere: "\"")
'shellquote' 'shq' string (default: "")
global
Quoting character(s), put around the command passed to the shell, for
the "!" and ":!" commands. The redirection is kept outside of the
@ -6635,14 +6663,13 @@ A jump table for the options with a short description can be found at |Q_op|.
probably not useful to set both options.
This is an empty string by default. Only known to be useful for
third-party shells on MS-Windows-like systems, such as the MKS Korn
Shell or bash, where it should be "\"". The default is adjusted
according the value of 'shell', to reduce the need to set this option
by the user. See |dos-shell|.
Shell or bash, where it should be "\"". See |dos-shell|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'shellredir'* *'srr'*
'shellredir' 'srr' string (default ">", ">&" or ">%s 2>&1")
'shellredir' 'srr' string (default ">", ">&", ">%s 2>&1", or
"2>&1 | Out-File -Encoding default")
global
String to be used to put the output of a filter command in a temporary
file. See also |:!|. See |option-backslash| about including spaces
@ -6653,10 +6680,12 @@ A jump table for the options with a short description can be found at |Q_op|.
The default is ">". For Unix, if the 'shell' option is "csh" or
"tcsh" during initializations, the default becomes ">&". If the
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
"bash" or "fish", the default becomes ">%s 2>&1". This means that
stderr is also included. For Win32, the Unix checks are done and
additionally "cmd" is checked for, which makes the default ">%s 2>&1".
Also, the same names with ".exe" appended are checked for.
"bash", "fish", or "pwsh", the default becomes ">%s 2>&1". This means
that stderr is also included. For Win32, the Unix checks are done and
additionally "cmd" is checked for, which makes the default ">%s 2>&1",
and "powershell" is checked for which makes the default
"2>&1 | Out-File -Encoding default" (see |dos-powershell|). Also, the
same names with ".exe" appended are checked for.
The initialization of this option is done after reading the ".vimrc"
and the other initializations, so that when the 'shell' option is set
there, the 'shellredir' option changes automatically unless it was
@ -6671,9 +6700,9 @@ A jump table for the options with a short description can be found at |Q_op|.
global
{only for MS-Windows}
When set, a forward slash is used when expanding file names. This is
useful when a Unix-like shell is used instead of cmd.exe. Backward
slashes can still be typed, but they are changed to forward slashes by
Vim.
useful when a Unix-like shell is used instead of cmd.exe, pwsh.exe, or
powershell.exe. Backward slashes can still be typed, but they are
changed to forward slashes by Vim.
Note that setting or resetting this option has no effect for some
existing file names, thus this option needs to be set before opening
any file for best results. This might change in the future.
@ -6727,6 +6756,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'shellxquote'* *'sxq'*
'shellxquote' 'sxq' string (default: "";
for Win32, when 'shell' is cmd.exe: "("
for Win32, when 'shell' is
powershell.exe: "\""
for Win32, when 'shell' contains "sh"
somewhere: "\""
for Unix, when using system(): "\"")
@ -6739,11 +6770,12 @@ A jump table for the options with a short description can be found at |Q_op|.
then ')"' is appended.
When the value is '(' then also see 'shellxescape'.
This is an empty string by default on most systems, but is known to be
useful for on Win32 version, either for cmd.exe which automatically
strips off the first and last quote on a command, or 3rd-party shells
such as the MKS Korn Shell or bash, where it should be "\"". The
default is adjusted according the value of 'shell', to reduce the need
to set this option by the user. See |dos-shell|.
useful for on Win32 version, either for cmd.exe, powershell.exe, or
pwsh.exe which automatically strips off the first and last quote on a
command, or 3rd-party shells such as the MKS Korn Shell or bash, where
it should be "\"". The default is adjusted according the value of
'shell', to reduce the need to set this option by the user. See
|dos-shell|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@ -8611,12 +8643,16 @@ A jump table for the options with a short description can be found at |Q_op|.
*'virtualedit'* *'ve'*
'virtualedit' 've' string (default "")
global
global or local to window |global-local|
A comma separated list of these words:
block Allow virtual editing in Visual block mode.
insert Allow virtual editing in Insert mode.
all Allow virtual editing in all modes.
onemore Allow the cursor to move just past the end of the line
none When used as the local value, do not allow virtual
editing even when the global value is set. When used
as the global value, "none" is the same as "".
NONE Alternative spelling of "none".
Virtual editing means that the cursor can be positioned where there is
no actual character. This can be halfway into a tab or beyond the end
@ -8633,6 +8669,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The `g$` command will move to the end of the screen line.
It doesn't make sense to combine "all" with "onemore", but you will
not get a warning for it.
When combined with other words, "none" is ignored.
NOTE: This option is set to "" when 'compatible' is set.
*'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep*

View File

@ -17,6 +17,7 @@ versions of Vim. Also see |os_win32.txt| and |os_msdos.txt|.
7. Interrupting |dos-CTRL-Break|
8. Temp files |dos-temp-files|
9. Shell option default |dos-shell|
10. PowerShell |dos-powershell|
==============================================================================
1. File locations *dos-locations*
@ -297,8 +298,86 @@ For Win32 as:
<shell> -c "command name >file"
For DOS 32 bit, DJGPP does this internally somehow.
When starting up, Vim checks for the presence of "sh" anywhere in the 'shell'
option. If it is present, Vim sets the 'shellcmdflag' and 'shellquote' or
'shellxquote' options will be set as described above.
When starting up, if Vim does not recognise a standard Windows shell it checks
for the presence of "sh" anywhere in the 'shell' option. If it is present,
Vim sets the 'shellcmdflag' and 'shellquote' or 'shellxquote' options will be
set as described above.
==============================================================================
10. PowerShell *dos-powershell* *dos-pwsh*
Vim supports PowerShell Desktop and PowerShell Core. PowerShell Desktop is
the version of PowerShell that is installed with Windows, while PowerShell
Core is a separate downloadable version that works cross-platform. To see
which version you are using then enter the following in a PowerShell prompt -
$PSVersionTable.PSEdition
If 'shell' includes "powershell" in the filename at startup then VIM sets
'shellcmdflag', 'shellxquote', 'shellpipe', and 'shellredir' options to the
following values:
'shellcmdflag' -Command
'shellxquote' "
'shellpipe' 2>&1 | Out-File -Encoding default
'shellredir' 2>&1 | Out-File -Encoding default
If 'shell' includes "pwsh" in the filename at startup then VIM sets
'shellcmdflag', 'shellxquote', 'shellpipe', and 'shellredir' options to the
following values:
'shellcmdflag' -c
'shellxquote' "
'shellpipe' >%s 2>&1
'shellredir' >%s 2>&1
If you find that PowerShell commands are taking a long time to run then try
with "-NoProfile" at the beginning of the 'shellcmdflag'. Note this will
prevent any PowerShell environment setup by the profile from taking place.
If you have problems running PowerShell scripts through the 'shell' then try
with "-ExecutionPolicy RemoteSigned -Command" at the beginning of
'shellcmdflag'. See online Windows documentation for more information on
PowerShell Execution Policy settings.
See |option-backslash| about including spaces in 'shellcmdflag' when using
multiple flags.
The 'shellpipe' and 'shellredir' option values re-encode the UTF-16le output
from PowerShell Desktop to your currently configured console codepage. The
output can be forced into a different encoding by changing "default" to one of
the following:
unicode - UTF-16le (default output from PowerShell 5.1)
bigendianunicode - UTF-16
utf8 - UTF-8
utf7 - UTF-7 (no BOM)
utf32 - UTF-32
ascii - 7-bit ASCII character set
default - System's active code page (typically ANSI)
oem - System's current OEM code page
Note The abovce multi-byte Unicode encodings include a leading BOM unless
otherwise indicated.
By default PowerShell Core's output is UTF-8 encoded without a BOM. If you
want to force the output of PowerShell Core into a different encoding then set
'shellredir' and 'shellpipe' to "2>&1 | Out-File -Encoding encoding" where
encoding is one of the following:
ascii - 7-bit ASCII character set
bigendianunicode - UTF-16be
bigendianutf32 - UTF-32be
oem - System's current OEM code page
unicode - UTF-16le
utf7 - UTF-7
utf8 - UTF-8
utf8BOM - UTF-8, with BOM
utf8NoBOM - UTF-8, no BOM (default output from PowerShell Core)
utf32 - UTF-32
Since PowerShell Core 6.2, the Encoding parameter also supports specifying a
numeric ID of a registered code page (-Encoding 1251) or string names of
registered code pages (-Encoding "windows-1251"). The .NET documentation for
Encoding.CodePage has more information
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -767,12 +767,12 @@ GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
Version 8.2
- make all changes needed for clean compile build of v8.2 on VMS on all platforms
- fix the call mkdir bug (vicente_polo@yahoo.es)
- fix the call mkdir bug (vicente_polo@yahoo.es)
- test on VSI OpenVMS Alpha and Itanium platforms
- added LUA support
- added XPM support - Motif GUI with toolbar on all platforms
- XPM v3.4.11 libraries for IA64, AXP and VAX are added
- start integrating the new test scripts
- XPM v3.4.11 libraries for IA64, AXP and VAX are added
- start integrating the new test scripts
Version 8.1
- make necessary changes to build v8.1 on VMS

View File

@ -18,7 +18,8 @@ The 32 bit version also runs on 64 bit MS-Windows systems.
4. Using the mouse |win32-mouse|
5. Running under Windows 95 |win32-win95|
6. Running under Windows 3.1 |win32-win3.1|
7. Win32 mini FAQ |win32-faq|
7. Installation package |win32-installer|
8. Win32 mini FAQ |win32-faq|
Additionally, there are a number of common Win32 and DOS items:
File locations |dos-locations|
@ -30,6 +31,7 @@ File formats |dos-file-formats|
Interrupting |dos-CTRL-Break|
Temp files |dos-temp-files|
Shell option default |dos-shell|
PowerShell defaults |dos-powershell|
Win32 GUI |gui-w32|
@ -174,7 +176,29 @@ There was a special version of gvim that runs under Windows 3.1 and 3.11.
Support was removed in patch 7.4.1364.
==============================================================================
7. Win32 mini FAQ *win32-faq*
7. Installation package *win32-installer*
A simple installer for windows is available at http://www.vim.org/download.php
(stable version) and nightly builds are also available at
https://github.com/vim/vim-win32-installer/releases/
The nightly builds include 32bit and 64bit builds, have most features enabled
and usually also contain an extra cryptographic signed installer, so Windows
will not complain.
To use the installer, simply run the exe file. The following switches are
also supported: >
gvim_<version>.exe /S -> silent install without any dialogues
gvim_<version>.exe /D=C:\vim -> Install into directory c:\vim
-> /D must be the last argument
gvim_<version>.exe /S /D=c:\vim -> silent install into c:\vim
<
The default installation directory can alternatively be given by setting the
$VIM environment variable.
==============================================================================
8. Win32 mini FAQ *win32-faq*
Q. How do I change the font?
A. In the GUI version, you can use the 'guifont' option. Example: >

View File

@ -1,4 +1,4 @@
*pattern.txt* For Vim version 8.2. Last change: 2021 May 02
*pattern.txt* For Vim version 8.2. Last change: 2021 Jul 16
VIM REFERENCE MANUAL by Bram Moolenaar
@ -929,13 +929,20 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
\%23l Matches in a specific line.
\%<23l Matches above a specific line (lower line number).
\%>23l Matches below a specific line (higher line number).
\%.l Matches at the cursor line.
\%<.l Matches above the cursor line.
\%>.l Matches below the cursor line.
These three can be used to match specific lines in a buffer. The "23"
can be any line number. The first line is 1.
WARNING: When inserting or deleting lines Vim does not automatically
update the matches. This means Syntax highlighting quickly becomes
wrong.
wrong. Also when referring to the cursor position (".") and
the cursor moves the display isn't updated for this change. An update
is done when using the |CTRL-L| command (the whole screen is updated).
Example, to highlight the line where the cursor currently is: >
:exe '/\%' . line(".") . 'l.*'
:exe '/\%' . line(".") . 'l'
< Alternatively use: >
/\%.l
< When 'hlsearch' is set and you move the cursor around and make changes
this will clearly show when the match is updated or not.
@ -943,15 +950,23 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
\%23c Matches in a specific column.
\%<23c Matches before a specific column.
\%>23c Matches after a specific column.
\%.c Matches at the cursor column.
\%<.c Matches before the cursor column.
\%>.c Matches after the cursor column.
These three can be used to match specific columns in a buffer or
string. The "23" can be any column number. The first column is 1.
Actually, the column is the byte number (thus it's not exactly right
for multibyte characters).
WARNING: When inserting or deleting text Vim does not automatically
update the matches. This means Syntax highlighting quickly becomes
wrong.
wrong. Also when referring to the cursor position (".") and
the cursor moves the display isn't updated for this change. An update
is done when using the |CTRL-L| command (the whole screen is updated).
Example, to highlight the column where the cursor currently is: >
:exe '/\%' . col(".") . 'c'
< Alternatively use: >
/\%.c
< When 'hlsearch' is set and you move the cursor around and make changes
this will clearly show when the match is updated or not.
Example for matching a single byte in column 44: >
@ -962,6 +977,9 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
\%23v Matches in a specific virtual column.
\%<23v Matches before a specific virtual column.
\%>23v Matches after a specific virtual column.
\%.v Matches at the current virtual column.
\%<.v Matches before the current virtual column.
\%>.v Matches after the current virtual column.
These three can be used to match specific virtual columns in a buffer
or string. When not matching with a buffer in a window, the option
values of the current window are used (e.g., 'tabstop').
@ -971,13 +989,18 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
one screen character.
WARNING: When inserting or deleting text Vim does not automatically
update highlighted matches. This means Syntax highlighting quickly
becomes wrong.
becomes wrong. Also when referring to the cursor position (".") and
the cursor moves the display isn't updated for this change. An update
is done when using the |CTRL-L| command (the whole screen is updated).
Example, to highlight all the characters after virtual column 72: >
/\%>72v.*
< When 'hlsearch' is set and you move the cursor around and make changes
this will clearly show when the match is updated or not.
To match the text up to column 17: >
/^.*\%17v
< To match all characters after the current virtual column (where the
cursor is): >
/\%>.v.*
< Column 17 is not included, because this is a |/zero-width| match. To
include the column use: >
/^.*\%17v.
@ -1217,7 +1240,7 @@ x A single character, with no special meaning, matches itself
\%d123 Matches the character specified with a decimal number. Must be
followed by a non-digit.
\%o40 Matches the character specified with an octal number up to 0377.
\%o40 Matches the character specified with an octal number up to 0o377.
Numbers below 0o40 must be followed by a non-octal digit or a
non-digit.
\%x2a Matches the character specified with up to two hexadecimal characters.
@ -1449,7 +1472,8 @@ criteria:
- The number of characters (distance) between two consecutive matching
characters.
- Matches at the beginning of a word
- Matches after a camel case character or a path separator or a hyphen.
- Matches at a camel case character (e.g. Case in CamelCase)
- Matches after a path separator or a hyphen.
- The number of unmatched characters in a string.
The matching string with the highest score is returned first.

View File

@ -3809,7 +3809,7 @@ netrw:
Decho.vim is provided as a "vimball"; see |vimball-intro|. You
should edit the Decho.vba.gz file and source it in: >
vim Decho.vba.gz
vim Decho.vba.gz
:so %
:q
<

View File

@ -1,4 +1,4 @@
*repeat.txt* For Vim version 8.2. Last change: 2021 May 08
*repeat.txt* For Vim version 8.2. Last change: 2021 Jun 27
VIM REFERENCE MANUAL by Bram Moolenaar
@ -279,7 +279,9 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
ftdetect scripts are loaded, only the matching
directories are added to 'runtimepath'. This is
useful in your .vimrc. The plugins will then be
loaded during initialization, see |load-plugins|.
loaded during initialization, see |load-plugins| (note
that the loading order will be reversed, because each
directory is inserted before others).
Note that for ftdetect scripts to be loaded
you will need to write `filetype plugin indent on`
AFTER all `packadd!` commands.
@ -372,7 +374,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
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
first sourced. The number is used for the script ID
@ -842,6 +844,16 @@ About the additional commands in debug mode:
is reset (because it's not clear what you want to repeat).
- When you want to use the Ex command with the same name, prepend a colon:
":cont", ":next", ":finish" (or shorter).
*vim9-debug*
When debugging a compiled :def function, "step" will stop before every
executed line, not every single instruction. Thus it works mostly like a not
compiled function. Access to local variables is limited you can use: >
echo varname
But not much else.
When executing a command that is not a specific bytecode instruction but
executed like a normal Ex command, "step" will stop once in the compiled
context, where local variables can be inspected, and once just before
executing the command.
The backtrace shows the hierarchy of function calls, e.g.:
>bt ~

View File

@ -1,4 +1,4 @@
*rileft.txt* For Vim version 8.2. Last change: 2019 May 05
*rileft.txt* For Vim version 8.2. Last change: 2021 Jun 13
VIM REFERENCE MANUAL by Avner Lottem
@ -75,7 +75,7 @@ o Invocations
o Typing backwards *ins-reverse*
----------------
In lieu of using full-fledged the 'rightleft' option, one can opt for
In lieu of using the full-fledged 'rightleft' option, one can opt for
reverse insertion. When the 'revins' (reverse insert) option is set,
inserting happens backwards. This can be used to type right-to-left
text. When inserting characters the cursor is not moved and the text

View File

@ -1,4 +1,4 @@
*sponsor.txt* For Vim version 8.2. Last change: 2008 Jun 21
*sponsor.txt* For Vim version 8.2. Last change: 2021 Jul 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -11,9 +11,8 @@ Fixing bugs and adding new features takes a lot of time and effort. To show
your appreciation for the work and motivate Bram and others to continue
working on Vim please send a donation.
Since Bram is back to a paid job the money will now be used to help children
in Uganda. See |uganda|. But at the same time donations increase Bram's
motivation to keep working on Vim!
Since Bram does not need the money it will be used to help children in Uganda,
see |uganda|. Donations increase Bram's motivation to keep working on Vim!
For the most recent information about sponsoring look on the Vim web site:
@ -74,19 +73,6 @@ Other methods See |iccf-donations|.
amount you transferred if you want to vote for features and
show others you are a registered Vim user or sponsor.
Cash Small amounts can be sent with ordinary mail. Put something
around the money, so that it's not noticeable from the
outside. Mention your e-mail address if you want to vote for
features and show others you are a registered Vim user or
sponsor.
You can use this permanent address:
Bram Moolenaar
Finsterruetihof 1
8134 Adliswil
Switzerland
QUESTIONS AND ANSWERS *sponsor-faq* *register-faq*

View File

@ -1,4 +1,4 @@
*syntax.txt* For Vim version 8.2. Last change: 2021 May 30
*syntax.txt* For Vim version 8.2. Last change: 2021 Jul 02
VIM REFERENCE MANUAL by Bram Moolenaar
@ -923,7 +923,7 @@ For Visual Basic use: >
BAAN *baan.vim* *baan-syntax*
The baan.vim gives syntax support for BaanC of release BaanIV upto SSA ERP LN
The baan.vim gives syntax support for BaanC of release BaanIV up to SSA ERP LN
for both 3 GL and 4 GL programming. Large number of standard defines/constants
are supported.
@ -1420,11 +1420,17 @@ To select syntax highlighting file for Euphoria, as well as for
auto-detecting the *.e and *.E file extensions as Euphoria file type,
add the following line to your startup file: >
:let filetype_euphoria="euphoria3"
:let g:filetype_euphoria = "euphoria3"
or
< or >
:let filetype_euphoria="euphoria4"
:let g:filetype_euphoria = "euphoria4"
Elixir and Euphoria share the *.ex file extension. If the filetype is
specifically set as Euphoria with the g:filetype_euphoria variable, or the
file is determined to be Euphoria based on keywords in the file, then the
filetype will be set as Euphoria. Otherwise, the filetype will default to
Elixir.
ERLANG *erlang.vim* *ft-erlang-syntax*
@ -1442,6 +1448,22 @@ To enable highlighting some special atoms, put this in your vimrc: >
:let g:erlang_highlight_special_atoms = 1
ELIXIR *elixir.vim* *ft-elixir-syntax*
Elixir is a dynamic, functional language for building scalable and maintainable
applications.
The following file extensions are auto-detected as Elixir file types:
*.ex, *.exs, *.eex, *.leex, *.lock
Elixir and Euphoria share the *.ex file extension. If the filetype is
specifically set as Euphoria with the g:filetype_euphoria variable, or the
file is determined to be Euphoria based on keywords in the file, then the
filetype will be set as Euphoria. Otherwise, the filetype will default to
Elixir.
FLEXWIKI *flexwiki.vim* *ft-flexwiki-syntax*
FlexWiki is an ASP.NET-based wiki package available at http://www.flexwiki.com
@ -3430,8 +3452,8 @@ syntax highlighting script handles this with the following logic:
Tex: Match Check Control~
Sometimes one actually wants mismatched parentheses, square braces,
and or curly braces; for example, \text{(1,10] is a range from but
not including 1 to and including 10}. This wish, of course, conflicts
and or curly braces; for example, \text{(1,10]} is a range from but
not including 1 to and including 10. This wish, of course, conflicts
with the desire to provide delimiter mismatch detection. To
accommodate these conflicting goals, syntax/tex.vim provides >
g:tex_matchcheck = '[({[]'
@ -4084,7 +4106,7 @@ match in the same position overrules an earlier one). The "transparent"
argument makes the "myVim" match use the same highlighting as "myString". But
it does not contain anything. If the "contains=NONE" argument would be left
out, then "myVim" would use the contains argument from myString and allow
"myWord" to be contained, which will be highlighted as a Constant. This
"myWord" to be contained, which will be highlighted as a Comment. This
happens because a contained match doesn't match inside itself in the same
position, thus the "myVim" match doesn't overrule the "myWord" match here.
@ -4970,8 +4992,8 @@ ctermul={color-nr} *highlight-ctermul*
*tmux*
When using tmux you may want to use this in the tmux config: >
# tmux colors
set -g default-terminal "xterm-256color"
set -ag terminal-overrides ",xterm-256color:Tc"
set -s default-terminal "tmux-256color"
set -as terminal-overrides ",*-256color:Tc"
< More info at:
https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-a-256-colour-terminal
https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-rgb-colour

View File

@ -1384,6 +1384,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
+scrollbind various.txt /*+scrollbind*
+signs various.txt /*+signs*
+smartindent various.txt /*+smartindent*
+sodium various.txt /*+sodium*
+sound various.txt /*+sound*
+spell various.txt /*+spell*
+startuptime various.txt /*+startuptime*
@ -1959,7 +1960,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:& change.txt /*:&*
:&& change.txt /*:&&*
:' cmdline.txt /*:'*
:++ vim9.txt /*:++*
:, cmdline.txt /*:,*
:-- vim9.txt /*:--*
:. cmdline.txt /*:.*
:/ cmdline.txt /*:\/*
:0file editing.txt /*:0file*
@ -3964,9 +3967,20 @@ E118 eval.txt /*E118*
E1187 starting.txt /*E1187*
E1188 cmdline.txt /*E1188*
E119 eval.txt /*E119*
E1193 options.txt /*E1193*
E1194 options.txt /*E1194*
E1195 options.txt /*E1195*
E1196 options.txt /*E1196*
E1197 options.txt /*E1197*
E1198 options.txt /*E1198*
E1199 options.txt /*E1199*
E12 message.txt /*E12*
E120 eval.txt /*E120*
E1200 options.txt /*E1200*
E1201 options.txt /*E1201*
E1205 eval.txt /*E1205*
E121 eval.txt /*E121*
E1214 eval.txt /*E1214*
E122 eval.txt /*E122*
E123 eval.txt /*E123*
E124 eval.txt /*E124*
@ -6149,6 +6163,10 @@ digraph-encoding digraph.txt /*digraph-encoding*
digraph-table digraph.txt /*digraph-table*
digraph-table-mbyte digraph.txt /*digraph-table-mbyte*
digraph.txt digraph.txt /*digraph.txt*
digraph_get() eval.txt /*digraph_get()*
digraph_getlist() eval.txt /*digraph_getlist()*
digraph_set() eval.txt /*digraph_set()*
digraph_setlist() eval.txt /*digraph_setlist()*
digraphs digraph.txt /*digraphs*
digraphs-changed version6.txt /*digraphs-changed*
digraphs-default digraph.txt /*digraphs-default*
@ -6178,6 +6196,8 @@ dos-backslash os_dos.txt /*dos-backslash*
dos-colors os_dos.txt /*dos-colors*
dos-file-formats os_dos.txt /*dos-file-formats*
dos-locations os_dos.txt /*dos-locations*
dos-powershell os_dos.txt /*dos-powershell*
dos-pwsh os_dos.txt /*dos-pwsh*
dos-shell os_dos.txt /*dos-shell*
dos-standard-mappings os_dos.txt /*dos-standard-mappings*
dos-temp-files os_dos.txt /*dos-temp-files*
@ -6190,6 +6210,7 @@ dp diff.txt /*dp*
drag-n-drop gui.txt /*drag-n-drop*
drag-n-drop-win32 gui_w32.txt /*drag-n-drop-win32*
drag-status-line term.txt /*drag-status-line*
drop_file gui.txt /*drop_file*
dtd.vim syntax.txt /*dtd.vim*
dtd2vim insert.txt /*dtd2vim*
dying-variable eval.txt /*dying-variable*
@ -6210,6 +6231,7 @@ efm-%> quickfix.txt /*efm-%>*
efm-entries quickfix.txt /*efm-entries*
efm-ignore quickfix.txt /*efm-ignore*
eiffel.vim syntax.txt /*eiffel.vim*
elixir.vim syntax.txt /*elixir.vim*
emacs-keys tips.txt /*emacs-keys*
emacs-tags tagsrch.txt /*emacs-tags*
emacs_tags tagsrch.txt /*emacs_tags*
@ -6559,6 +6581,7 @@ ft-docbkxml-syntax syntax.txt /*ft-docbkxml-syntax*
ft-dosbatch-syntax syntax.txt /*ft-dosbatch-syntax*
ft-dtd-syntax syntax.txt /*ft-dtd-syntax*
ft-eiffel-syntax syntax.txt /*ft-eiffel-syntax*
ft-elixir-syntax syntax.txt /*ft-elixir-syntax*
ft-erlang-syntax syntax.txt /*ft-erlang-syntax*
ft-euphoria-syntax syntax.txt /*ft-euphoria-syntax*
ft-flexwiki-syntax syntax.txt /*ft-flexwiki-syntax*
@ -6674,6 +6697,8 @@ ft-yaml-syntax syntax.txt /*ft-yaml-syntax*
ft-zimbu-plugin filetype.txt /*ft-zimbu-plugin*
ft-zsh-syntax syntax.txt /*ft-zsh-syntax*
ft_ada.txt ft_ada.txt /*ft_ada.txt*
ft_ps1.txt ft_ps1.txt /*ft_ps1.txt*
ft_raku.txt ft_raku.txt /*ft_raku.txt*
ft_rust.txt ft_rust.txt /*ft_rust.txt*
ft_sql.txt ft_sql.txt /*ft_sql.txt*
ftdetect filetype.txt /*ftdetect*
@ -7000,6 +7025,7 @@ getchar() eval.txt /*getchar()*
getcharmod() eval.txt /*getcharmod()*
getcharpos() eval.txt /*getcharpos()*
getcharsearch() eval.txt /*getcharsearch()*
getcharstr() eval.txt /*getcharstr()*
getcmdline() eval.txt /*getcmdline()*
getcmdpos() eval.txt /*getcmdpos()*
getcmdtype() eval.txt /*getcmdtype()*
@ -7901,6 +7927,7 @@ moo.vim syntax.txt /*moo.vim*
more-compatible version5.txt /*more-compatible*
more-prompt message.txt /*more-prompt*
more-variables eval.txt /*more-variables*
motion-count-multiplied motion.txt /*motion-count-multiplied*
motion.txt motion.txt /*motion.txt*
mouse-mode-table term.txt /*mouse-mode-table*
mouse-overview term.txt /*mouse-overview*
@ -8348,6 +8375,7 @@ omni-sql-completion ft_sql.txt /*omni-sql-completion*
online-help helphelp.txt /*online-help*
opening-window windows.txt /*opening-window*
operator motion.txt /*operator*
operator-doubled motion.txt /*operator-doubled*
operator-pending-index index.txt /*operator-pending-index*
operator-variable eval.txt /*operator-variable*
option-backslash options.txt /*option-backslash*
@ -8401,6 +8429,7 @@ page_up intro.txt /*page_up*
pager message.txt /*pager*
papp.vim syntax.txt /*papp.vim*
paragraph motion.txt /*paragraph*
partial eval.txt /*partial*
pascal.vim syntax.txt /*pascal.vim*
patches-8 version8.txt /*patches-8*
patches-8.1 version8.txt /*patches-8.1*
@ -8598,7 +8627,6 @@ ps1-compiler ft_ps1.txt /*ps1-compiler*
ps1-folding ft_ps1.txt /*ps1-folding*
ps1-keyword ft_ps1.txt /*ps1-keyword*
ps1-syntax ft_ps1.txt /*ps1-syntax*
ps1.txt ft_ps1.txt /*ps1.txt*
psql ft_sql.txt /*psql*
ptcap.vim syntax.txt /*ptcap.vim*
pterm-mouse options.txt /*pterm-mouse*
@ -9673,6 +9701,8 @@ test_feedinput() testing.txt /*test_feedinput()*
test_garbagecollect_now() testing.txt /*test_garbagecollect_now()*
test_garbagecollect_soon() testing.txt /*test_garbagecollect_soon()*
test_getvalue() testing.txt /*test_getvalue()*
test_gui_drop_files() testing.txt /*test_gui_drop_files()*
test_gui_mouse_event() testing.txt /*test_gui_mouse_event()*
test_ignore_error() testing.txt /*test_ignore_error()*
test_null_blob() testing.txt /*test_null_blob()*
test_null_channel() testing.txt /*test_null_channel()*
@ -10066,6 +10096,7 @@ v_u change.txt /*v_u*
v_v visual.txt /*v_v*
v_x change.txt /*v_x*
v_y change.txt /*v_y*
v_zy change.txt /*v_zy*
v_~ change.txt /*v_~*
vab motion.txt /*vab*
val-variable eval.txt /*val-variable*
@ -10135,13 +10166,13 @@ vim-8.2 version8.txt /*vim-8.2*
vim-additions vi_diff.txt /*vim-additions*
vim-announce intro.txt /*vim-announce*
vim-arguments starting.txt /*vim-arguments*
vim-changelog version8.txt /*vim-changelog*
vim-default-editor gui_w32.txt /*vim-default-editor*
vim-dev intro.txt /*vim-dev*
vim-mac intro.txt /*vim-mac*
vim-modes intro.txt /*vim-modes*
vim-modes-intro intro.txt /*vim-modes-intro*
vim-raku ft_raku.txt /*vim-raku*
vim-raku.txt ft_raku.txt /*vim-raku.txt*
vim-script-intro usr_41.txt /*vim-script-intro*
vim-use intro.txt /*vim-use*
vim-variable eval.txt /*vim-variable*
@ -10152,6 +10183,7 @@ vim9 vim9.txt /*vim9*
vim9-classes vim9.txt /*vim9-classes*
vim9-const vim9.txt /*vim9-const*
vim9-curly vim9.txt /*vim9-curly*
vim9-debug repeat.txt /*vim9-debug*
vim9-declaration vim9.txt /*vim9-declaration*
vim9-declarations usr_46.txt /*vim9-declarations*
vim9-differences vim9.txt /*vim9-differences*
@ -10280,6 +10312,7 @@ win32-faq os_win32.txt /*win32-faq*
win32-gettext mlang.txt /*win32-gettext*
win32-gui gui_w32.txt /*win32-gui*
win32-hidden-menus gui.txt /*win32-hidden-menus*
win32-installer os_win32.txt /*win32-installer*
win32-mouse os_win32.txt /*win32-mouse*
win32-open-with-menu gui_w32.txt /*win32-open-with-menu*
win32-popup-menu gui_w32.txt /*win32-popup-menu*
@ -10435,6 +10468,7 @@ zOS-PuTTY os_390.txt /*zOS-PuTTY*
zOS-has-ebcdic os_390.txt /*zOS-has-ebcdic*
zOS-limitations os_390.txt /*zOS-limitations*
zOS-open-source os_390.txt /*zOS-open-source*
zP change.txt /*zP*
zR fold.txt /*zR*
zW spell.txt /*zW*
zX fold.txt /*zX*
@ -10462,6 +10496,7 @@ zl scroll.txt /*zl*
zm fold.txt /*zm*
zn fold.txt /*zn*
zo fold.txt /*zo*
zp change.txt /*zp*
zr fold.txt /*zr*
zs scroll.txt /*zs*
zsh.vim syntax.txt /*zsh.vim*
@ -10473,6 +10508,7 @@ zuw spell.txt /*zuw*
zv fold.txt /*zv*
zw spell.txt /*zw*
zx fold.txt /*zx*
zy change.txt /*zy*
zz scroll.txt /*zz*
{ motion.txt /*{*
{Visual} intro.txt /*{Visual}*

View File

@ -373,10 +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|
t_fd disable focus-event tracking *t_fd* *'t_fd'*
|xterm-focus-event|
Some codes have a start, middle and end part. The start and end are defined
by the termcap option, the middle part is text.

View File

@ -1,4 +1,4 @@
*testing.txt* For Vim version 8.2. Last change: 2021 Apr 02
*testing.txt* For Vim version 8.2. Last change: 2021 Jul 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -78,6 +78,46 @@ test_getvalue({name}) *test_getvalue()*
Can also be used as a |method|: >
GetName()->test_getvalue()
<
*test_gui_drop_files()*
test_gui_drop_files({list}, {row}, {col}, {mods})
Drop one or more files in {list} in the window at {row}, {col}.
This function only works when the GUI is running and the
|drag-n-drop| feature is present.
The supported values for {mods} are:
0x4 Shift
0x8 Alt
0x10 Ctrl
The files are added to the argument list and the first file in
{list} is edited in the window. See |drag-n-drop| for more
information.
*test_gui_mouse_event()*
test_gui_mouse_event({button}, {row}, {col}, {multiclick}, {modifiers})
Inject a mouse button click event. This function only works
when the GUI is running.
The supported values for {button} are:
0 right mouse button
1 middle mouse button
2 left mouse button
3 mouse button release
4 scroll wheel down
5 scroll wheel up
6 scroll wheel left
7 scroll wheel right
{row} and {col} specify the location of the mouse click. The
first row of the Vim window is 1 and the last row is 'lines'.
The maximum value of {col} is 'columns'.
To inject a multiclick event, set {multiclick} to 1.
The supported values for {modifiers} are:
4 shift is pressed
8 alt is pressed
16 ctrl is pressed
After injecting the mouse event you probably should call
|feedkeys()| to have them processed, e.g.: >
call feedkeys("y", 'Lx!')
test_ignore_error({expr}) *test_ignore_error()*
Ignore any error containing {expr}. A normal message is given

View File

@ -211,6 +211,8 @@ prop_list({lnum} [, {props}]) *prop_list()*
id property ID
type name of the property type, omitted if
the type was deleted
type_bufnr buffer number for which this type was defined;
0 if the type is global
start when TRUE property starts in this line
end when TRUE property ends in this line

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2021 May 28
*todo.txt* For Vim version 8.2. Last change: 2021 Jul 26
VIM REFERENCE MANUAL by Bram Moolenaar
@ -38,57 +38,34 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
Geen memory leak?
Crash using outer var from nested lambda:
vim9script
def F(text: string): func(string): func(string): string
return (arg: string): func(string): string => ((sep: string): string => {
return text .. ' ' .. arg
})
enddef
echo F('hello')(' ')('there')
Try out callgrind with kcachegrind.
Vim9 - Make everything work:
- function returning nothing should return void instead of zero
- compile "expr" and "call" expression of a channel in channel_exe_cmd()?
- Need some solution for dict function. Can we implement part of classes?
- A lambda without {} does not require a return type, using { return x } does.
That's unexpected, since the arguments are not required to have a type.
alt 1: not require a return type, figure it out from the common type of all
the return statements found
alt 2: also require argument types
- 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
- Check TODO items in vim9compile.c and vim9execute.c
- use CheckLegacyAndVim9Success(lines) in many more places
This doesn't work - Test_list_assign():
var l = [0]
l[:] = [1, 2]
- For builtin functions using tv_get_string*() use check_for_string() to be
more strict about the argument type (not a bool).
done: balloon_()
- Check many more builtin function arguments at compile time.
map() could check that the return type of the function argument matches
the type of the list or dict member. (#8092)
- Allow for using an autoload function name without quotes. It is then loaded
(and compiled) right away. #8124
- Test more expressions in legacy and Vim9 script, using
CheckLegacyAndVim9Success()
Same for other functions, such as searchpair().
- Test try/catch and throw better, also nested.
Test that return inside try/finally jumps to finally and then returns.
- Test that a function defined inside a :def function is local to that
function, g: functions can be defined and script-local functions cannot be
defined.
- 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?
- Reserve command for future use: :type, :class, :enum
- Unexpected error message when using "var x: any | x.key = 9", because "x" is
given the type number. Can we use VAR_ANY?
Once Vim9 is stable:
- Add the "vim9script" feature, can use has('vim9script')
- Change the help to prefer Vim9 syntax where appropriate
- 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
@ -100,13 +77,12 @@ Further Vim9 improvements, possibly after launch:
Give an error if compilation fails. (#7625)
Use the location where the option was set for deciding whether it's to be
evaluated in Vim9 script context.
- implement :type, import type declaration.
- implement enum, import enum.
- Future work: See |vim9-classes|
- implement :type, "import type"
- implement enum, "import enum".
- implement class and interface: See |vim9-classes|
- For range: make table of first ASCII character with flag to quickly check if
it can be a Vim9 command. E.g. "+" can, but "." can't.
- compile get_lambda_tv() in popup_add_timeout()
- inline call to map() and filter()
- Inline call to map() and filter(), better type checking.
- Make accessing varargs faster: arg[expr]
EVAL expr
LOADVARARG (varargs idx)
@ -241,10 +217,13 @@ Terminal emulator window:
Include patch #6290: recognize shell directory change.
MS-Windows GUI: default 'encoding' to "utf-8" ? (#8221)
Add #ifdef MSWIN before enc_locale() in set_init_1().
Or just always for MS-Windows? Conversion to 'termencoding' should always
work?
When using 'cryptmethod' xchaha20 the undo file is not encrypted.
Need to handle extra bytes.
Test_communicate_ipv6(): is flaky on many systems
Fails in line 64 of Ch_communicate, no exception is thrown.
Rename getdigraphlist -> digraph_getlist() etc.
Valgrind reports memory leaks in test_options.
Valgrind reports overlapping memcpy in
@ -269,10 +248,16 @@ Memory leaks in test_channel? (or is it because of fork())
initialization to figure out the default value from 'shell'. Add a test for
this.
MS-Windows: did path modifier :p:8 stop working? #8600
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)
Problem that a previous silent ":throw" causes a following try/catch not to
work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)
Also see #8487 for an example.
Patch for Template string: #4634
Have another look at the implementation.
@ -292,6 +277,9 @@ Remove SPACE_IN_FILENAME ? It is only used for completion.
Searching for \%'> does not find anything when using line Visual selection.
Probably because it's using MAXCOL. #8238
Make "g>" and "g<" in Visual mode move the text right or left.
Also for a block selection. #8558
Add optional argument to virtcol() that specifies "start", "cursor" or "end"
to tell which value from getvvcol() should be used. (#7964)
Value returned by virtcol() changes depending on how lines wrap. This is
@ -300,10 +288,15 @@ inconsistent with the documentation.
Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598)
Scroll doesn't work correctly, why?
glob() and globfile() do not always honor 'wildignorecase'. #8350
globpath() does not use 'wildignorecase' at all?
":find" incorrectly searches parent directory of path (#8533)
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
with 'termguicolors'. #1740
Patch for blockwise paste reporting changes: #6660.
Patch for blockwise paste reporting changes: #6660. Asked for a PR.
Patch to make fillchars global-local. (#5206)
@ -312,6 +305,9 @@ Missing filetype test for bashrc, PKGBUILD, etc.
Add an option to not fetch terminal codes in xterm, to avoid flicker when t_Co
changes.
MS-Windows: instead of "edit with multiple Vims" use "Edit with Vim in
multiple tabs". #8404
When using ":bwipe!" also get rid of references to be buffer, e.g. in the
jumplist and alternate file.
@ -344,6 +340,12 @@ Should also work without any group:
:echo matchstr('aaa bbb', '.\{-1,}\>\|.*')
aaa bbb (should be aaa)
Should add a match/str/list/pos method that also returns the test and position
of submatches. #8355
Syntax highlight for a region does not work with a "nextgroup" if the start
match is empty. #8449
Check out PR #543 (Roland Puntaier).
Patch for multibyte characters in langmap and applying a mapping on them.
(Christian Brabandt, 2015 Jun 12, update July 25)
@ -368,6 +370,7 @@ The buffer list and windows are locked, no changes possible
Add a ModeChanged autocommand that has an argument indicating the old and new
mode, as what's returned from mode(). Also used for switching Terminal mode.
#8360, #7863, #7363
Matchparen doesn't remove highlight after undo. (#7054)
Is OK when syntax HL is active.
@ -380,6 +383,10 @@ work.
Using "au!" after "filetype on" is a bit slow. Can the matching of
autocommands be made faster? (#7056)
Append in Visual block mode inserts the wrong character.
Test_visual_block_mode() already has the proper check, which is commented out.
(#8288)
Add the <=> (spaceship) operator and "cond ?< expr ?= expr ?> expr"
replace this:
let left = GetLeftFunc()
@ -1428,9 +1435,6 @@ Appveyor build with self-installing executable, includes getting most
interfaces: https://github.com/k-takata/vim/tree/chrisbra-appveyor-build
result: https://ci.appveyor.com/project/k-takata/vim/history
Problem that a previous silent ":throw" causes a following try/catch not to
work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)
Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
Patch to make tests pass with EBCDIC. (Owen Leibman, 2016 Apr 10)
@ -2263,9 +2267,6 @@ Win32: Improved Makefile for MSVC. (Leonardo Valeri Manera, 2010 Aug 18)
Win32: Expanding 'path' runs into a maximum size limit. (bgold12, 2009 Nov 15)
Win32: Patch for enabling quick edit mode in console. (Craig Barkhouse, 2010
Sep 1)
Win32: Patch for using .png files for icons. (Charles Peacech, 2012 Feb 5)
Putting a Visual block while 'visualedit' is "all" does not leave the cursor
@ -3081,7 +3082,7 @@ Awaiting updated patches:
7 When 'rightleft' is set, the search pattern should be displayed right
to left as well? See patch of Dec 26. (Nadim Shaikli)
8 Option to lock all used memory so that it doesn't get swapped to disk
(uncrypted). Patch by Jason Holt, 2003 May 23. Uses mlock.
(unencrypted). Patch by Jason Holt, 2003 May 23. Uses mlock.
7 Add ! register, for shell commands. (patch from Grenie)
8 In the gzip plugin, also recognize *.gz.orig, *.gz.bak, etc. Like it's
done for filetype detection. Patch from Walter Briscoe, 2003 Jul 1.

View File

@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 8.2. Last change: 2021 Apr 19
*usr_41.txt* For Vim version 8.2. Last change: 2021 Jul 19
VIM USER MANUAL - by Bram Moolenaar
@ -952,6 +952,7 @@ Interactive: *interactive-functions*
browsedir() put up a directory requester
confirm() let the user make a choice
getchar() get a character from the user
getcharstr() get a character from the user as a string
getcharmod() get modifiers for the last typed character
getmousepos() get last known mouse position
echoraw() output characters as-is
@ -993,6 +994,10 @@ Window size and position: *window-size-functions*
winrestview() restore saved view of current window
Mappings and Menus: *mapping-functions*
digraph_get() get |digraph|
digraph_getlist() get all |digraph|s
digraph_set() register |digraph|
digraph_setlist() register multiple |digraph|s
hasmapto() check if a mapping exists
mapcheck() check if a matching mapping exists
maparg() get rhs of a mapping
@ -1020,6 +1025,8 @@ Testing: *test-functions*
test_garbagecollect_now() free memory right now
test_garbagecollect_soon() set a flag to free memory soon
test_getvalue() get value of an internal variable
test_gui_drop_files() drop file(s) in a window
test_gui_mouse_event() add a GUI mouse event to the input buffer
test_ignore_error() ignore a specific error message
test_null_blob() return a null Blob
test_null_channel() return a null Channel

View File

@ -444,6 +444,7 @@ m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
T *+scrollbind* |'scrollbind'|
B *+signs* |:sign|
N *+smartindent* |'smartindent'|
B *+sodium* compiled with libsodium for better encryption support
B *+sound* |sound_playevent()|, |sound_playfile()| functions, etc.
N *+spell* spell checking support, see |spell|
N *+startuptime* |--startuptime| argument
@ -724,7 +725,7 @@ K Run a program to lookup the keyword under the
feature}
*:sl!* *:sleep!*
:[N]sl[eep]! [N] [m] Same as above, but hide the cursor.
:[N]sl[eep]! [N][m] Same as above, but hide the cursor.
*:xrestore* *:xr*
:xr[estore] [display] Reinitializes the connection to the X11 server. Useful

View File

@ -2696,7 +2696,7 @@ Multi-byte:
double-wide character.
- Overstrike mode for the cmdline replaced only the first byte of a multibyte
character.
- The cursor in Replace mode (also in the cmdline) was to small on a
- The cursor in Replace mode (also in the cmdline) was too small on a
double-wide character.
- When a multibyte character contained a 0x80 byte, it didn't work (was using
a CSI byte instead). (Muraoka Taro)
@ -3546,7 +3546,7 @@ Added Simplified Chinese translation of the tutor. (Mendel L Chan)
Added Russian keymap for yawerty keyboard.
Added an explanation of using the vimrc file in the tutor.
Changed tutor.vim to get the right encoding for the Taiwainese tutor.
Changed tutor.vim to get the right encoding for the Taiwanese tutor.
Added Russian tutor. (Andrey Kiselev)
Added Polish tutor. (Mikolaj Machowski)
@ -5465,7 +5465,7 @@ Files: src/fileio.c
Patch 6.0.267
Problem: UTF-8: Although 'isprint' says a character is printable,
utf_char2cells() still considers it unprintable.
Solution: Use vim_isprintc() for characters upto 0x100. (Yasuhiro Matsumoto)
Solution: Use vim_isprintc() for characters up to 0x100. (Yasuhiro Matsumoto)
Files: src/mbyte.c
Patch 6.0.268 (extra) (depends on patch 6.0.255)

View File

@ -1,4 +1,4 @@
*version7.txt* For Vim version 8.2. Last change: 2021 May 13
*version7.txt* For Vim version 8.2. Last change: 2021 May 17
VIM REFERENCE MANUAL by Bram Moolenaar
@ -16225,7 +16225,7 @@ Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok,
Patch 7.3.1018
Problem: New regexp engine wastes memory.
Solution: Allocate prog with actual number of states, not estimated maximum
number of sates.
number of states.
Files: src/regexp_nfa.c
Patch 7.3.1019

View File

@ -1,4 +1,4 @@
*version8.txt* For Vim version 8.2. Last change: 2021 May 13
*version8.txt* For Vim version 8.2. Last change: 2021 Jul 24
VIM REFERENCE MANUAL by Bram Moolenaar
@ -41,6 +41,10 @@ See |vi_diff.txt| for an overview of differences between Vi and Vim 8.0.
See |version4.txt|, |version5.txt|, |version6.txt| and |version7.txt| for
differences between other versions.
*vim-changelog*
You can find an overview of the most important changes (according to Martin
Tournoij) on this site: https://www.arp242.net/vimlog/
==============================================================================
NEW FEATURES *new-8*
@ -12980,7 +12984,7 @@ Files: src/evalfunc.c, src/testdir/test_cmdline.vim
Patch 7.4.2113
Problem: Test for undo is flaky.
Solution: Turn it into a new style test. Use test_settime() to avoid
flakyness.
flakiness.
Files: src/Makefile, src/undo.c, src/testdir/test61.in,
src/testdir/test61.ok, src/testdir/test_undo.vim,
src/testdir/test_undolevels.vim, src/testdir/Make_all.mak,
@ -30906,7 +30910,7 @@ Files: src/eval.c, src/testdir/test_assert.vim
Patch 8.1.0820
Problem: Test for sending large data over channel sometimes fails.
Solution: Handle that the job may have finished early. Also fix that file
changed test doesn't work in the GUI and reduce flakyness. (Ozaki
changed test doesn't work in the GUI and reduce flakiness. (Ozaki
Kiichi, closes #3861)
Files: src/testdir/test_channel.vim, src/testdir/test_filechanged.vim
@ -35504,7 +35508,7 @@ Files: Filelist, src/testdir/Make_all.mak, src/testdir/check.vim,
src/testdir/test_xxd.vim
Patch 8.1.1545
Problem: When the screen is to small there is no message about that.
Problem: When the screen is too small there is no message about that.
(Daniel Hahler)
Solution: Do not use :cquit. (closes #4534)
Files: src/testdir/runtest.vim
@ -39253,7 +39257,7 @@ Files: src/option.c
Patch 8.1.2117
Problem: CursorLine highlight used while 'cursorline' is off.
Solution: Check 'cursorline' is set. (cloes #5017)
Solution: Check 'cursorline' is set. (closes #5017)
Files: src/drawline.c, src/testdir/test_cursorline.vim
Patch 8.1.2118
@ -41104,7 +41108,7 @@ Files: src/buffer.c, src/testdir/test_popupwin.vim
Patch 8.1.2419
Problem: With a long file name the hit-enter prompt appears. (J. Lewis
Muir)
Solution: When checking for text to wrap don't do this when outputing a CR.
Solution: When checking for text to wrap don't do this when outputting a CR.
Files: src/message.c, src/testdir/test_display.vim,
src/testdir/dumps/Test_long_file_name_1.dump

View File

@ -186,7 +186,7 @@ behave mostly like Vi, even though a .vimrc file exists.
.TP
\-d
Start in diff mode.
There should be two, three or four file name arguments.
There should between two to eight file name arguments.
.B Vim
will open all the files and show differences between them.
Works like vimdiff(1).

View File

@ -135,9 +135,9 @@ OPTIONS
Vim behave mostly like Vi, even though a .vimrc file ex
ists.
-d Start in diff mode. There should be two, three or four
file name arguments. Vim will open all the files and show
differences between them. Works like vimdiff(1).
-d Start in diff mode. There should between two to eight file
name arguments. Vim will open all the files and show dif
ferences between them. Works like vimdiff(1).
-d {device} Open {device} for use as a terminal. Only on the Amiga.
Example: "-d con:20/30/600/150".

View File

@ -1,4 +1,4 @@
*vim9.txt* For Vim version 8.2. Last change: 2021 May 26
*vim9.txt* For Vim version 8.2. Last change: 2021 Jul 28
VIM REFERENCE MANUAL by Bram Moolenaar
@ -169,6 +169,14 @@ created yet. In this case you can call `execute()` to invoke it at runtime. >
used for the command or inside a `:try` block), does not get a range passed
cannot be a "dict" function, and can always be a closure.
Later classes will be added, which replaces the "dict function" mechanism.
For now you will need to pass the dictionary explicitly: >
def DictFunc(d: dict<any>, arg: string)
echo d[arg]
enddef
var d = {item: 'value', func: DictFunc}
d.func(d, 'item')
The argument types and return type need to be specified. The "any" type can
be used, type checking will then be done at runtime, like with legacy
functions.
@ -313,6 +321,25 @@ used: >
}
echo temp # Error!
This is especially useful in a user command: >
command -range Rename {
| var save = @a
| @a = 'some expression'
| echo 'do something with ' .. @a
| @a = save
|}
And with autocommands: >
au BufWritePre *.go {
| var save = winsaveview()
| silent! exe ':%! some formatting command'
| winrestview(save)
|}
Although using a :def function probably works better.
Declaring a variable with a type but without an initializer will initialize to
zero, false or empty.
@ -324,6 +351,9 @@ with `:unlet`.
`:lockvar` does not work on local variables. Use `:const` and `:final`
instead.
The `exists()` function does not work on local variables or arguments. These
are visible at compile time only, not at runtime.
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.
@ -418,6 +448,12 @@ line starts with `substitute(` this will use the function. Prepend a colon to
use the command instead: >
:substitute(pattern (replacement (
If the expression starts with "!" this is interpreted as a shell command, not
negation of a condition. Thus this is a shell command: >
!shellCommand->something
Put the expression in parenthesis to use the "!" for negation: >
(!expression)->Method()
Note that while variables need to be defined before they can be used,
functions can be called before being defined. This is required to allow
for cyclic dependencies between functions. It is slightly less efficient,
@ -434,7 +470,8 @@ The function must already have been defined. >
var Funcref = MyFunction
When using `function()` the resulting type is "func", a function with any
number of arguments and any return type. The function can be defined later.
number of arguments and any return type (including void). The function can be
defined later.
Lambda using => instead of -> ~
@ -445,11 +482,12 @@ it is the start of a lambda or a dictionary, which is now more complicated
because of the use of argument types.
To avoid these problems Vim9 script uses a different syntax for a lambda,
which is similar to Javascript: >
which is similar to JavaScript: >
var Lambda = (arg) => expression
No line break is allowed in the arguments of a lambda up to and including the
"=>". This is OK: >
"=>" (so that Vim can tell the difference between an expression in parentheses
and lambda arguments). This is OK: >
filter(list, (k, v) =>
v > 0)
This does not work: >
@ -522,7 +560,7 @@ And when a dict spans multiple lines: >
one: 1,
two: 2,
}
Function call: >
With a function call: >
var result = Func(
arg1,
arg2
@ -555,10 +593,36 @@ at the start of the line indicates line continuation: >
| echo 'match'
| endif
< *E1050*
Note that this means that in heredoc the first line cannot be a bar: >
var lines =<< trim END
| this doesn't work
END
Either use an empty line at the start or do not use heredoc. Or temporarily
add the "C" flag to 'cpoptions': >
set cpo+=C
var lines =<< trim END
| this doesn't work
END
set cpo-=C
If the heredoc is inside a function 'cpoptions' must be set before :def and
restored after the :enddef.
In places where line continuation with a backslash is still needed, such as
splitting up a long Ex command, comments can start with '#\ ': >
syn region Text
\ start='foo'
#\ comment
\ end='bar'
Like with legacy script '"\ ' is used. This is also needed when line
continuation is used without a backslash and a line starts with a bar: >
au CursorHold * echom 'BEFORE bar'
#\ some comment
| echom 'AFTER bar'
<
*E1050*
To make it possible for the operator at the start of the line to be
recognized, it is required to put a colon before a range. This will add
"start" and print: >
recognized, it is required to put a colon before a range. This example will
add "start" and print: >
var result = start
+ print
Like this: >
@ -610,6 +674,9 @@ Notes:
< This does not work: >
echo [1, 2]
[3, 4]
- In some cases it is difficult for Vim to parse a command, especially when
commands are used as an argument to another command, such as `windo`. In
those cases the line continuation with a backslash has to be used.
White space ~
@ -648,6 +715,9 @@ White space is not allowed:
arg # OK
)
White space space is not allowed in a `:set` command between the option name
and a following "&", "!", "<", "=", "+=", "-=" or "^=".
No curly braces expansion ~
@ -904,6 +974,16 @@ The 'gdefault' option value is not used.
You may also find this wiki useful. It was written by an early adopter of
Vim9 script: https://github.com/lacygoill/wiki/blob/master/vim/vim9.md
*:++* *:--*
The ++ and -- commands have been added. They are very similar to adding or
subtracting one: >
++var
var += 1
--var
var -= 1
Using ++var or --var in an expression is not supported yet.
==============================================================================
3. New style functions *fast-functions*
@ -966,9 +1046,14 @@ prefix if they do not exist at the time of compiling.
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
:disa[ssemble] profile {func}
Like `:disassemble` but with the instructions used for
profiling.
:disa[ssemble] debug {func}
Like `:disassemble` but with the instructions used for
debugging.
Limitations ~
Local variables will not be visible to string evaluation. For example: >
@ -991,26 +1076,36 @@ For these the backtick expansion can be used. Example: >
g/pattern/s/^/`=newText`/
enddef
Or a script variable can be used: >
var newText = 'blah'
def Replace()
g/pattern/s/^/\=newText/
enddef
Closures defined in a loop will share the same context. For example: >
var flist: list<func>
for i in range(10)
for i in range(5)
var inloop = i
flist[i] = () => inloop
endfor
echo range(5)->map((i, _) => flist[i]())
# Result: [4, 4, 4, 4, 4]
The "inloop" variable will exist only once, all closures put in the list refer
to the same instance, which in the end will have the value 9. This is
efficient. If you do want a separate context for each closure call a function
to define it: >
def GetFunc(i: number): func
var inloop = i
return () => inloop
to the same instance, which in the end will have the value 4. This is
efficient, also when looping many times. If you do want a separate context
for each closure call a function to define it: >
def GetClosure(i: number): func
var infunc = i
return () => infunc
enddef
var flist: list<func>
for i in range(10)
flist[i] = GetFunc(i)
for i in range(5)
flist[i] = GetClosure(i)
endfor
echo range(5)->map((i, _) => flist[i]())
# Result: [0, 1, 2, 3, 4]
==============================================================================
@ -1036,10 +1131,8 @@ The following builtin types are supported:
Not supported yet:
tuple<a: {type}, b: {type}, ...>
These types can be used in declarations, but no value will have this type:
{type}|{type} {not implemented yet}
void
any
These types can be used in declarations, but no simple value will actually
have the "void" type.
There is no array type, use list<{type}> instead. For a list constant an
efficient implementation is used that avoids allocating lot of small pieces of
@ -1048,8 +1141,16 @@ memory.
A partial and function can be declared in more or less specific ways:
func any kind of function reference, no type
checking for arguments or return value
func: void any number and type of arguments, no return
value
func: {type} any number and type of arguments with specific
return type
func() function with no argument, does not return a
value
func(): void same
func(): {type} function with no argument and return type
func({type}) function with argument type, does not return
a value
func({type}): {type} function with argument type and return type
@ -1138,6 +1239,18 @@ dictionary. If there is a mix of types, the "any" type is used. >
['a', 'b', 'c'] list<string>
[1, 'x', 3] list<any>
The common type of function references, if they do not all have the same
number of arguments, uses "(...)" to indicate the number of arguments is not
specified. For example: >
def Foo(x: bool)
enddef
def Bar(x: bool, y: bool)
enddef
var funclist = [Foo, Bar]
echo funclist->typename()
Results in:
list<func(...)>
For script-local variables in Vim9 script the type is checked, also when the
variable was declared in a legacy function.
@ -1154,16 +1267,24 @@ In Vim9 script this has been made stricter. In most places it works just as
before, if the value used matches the expected type. There will sometimes be
an error, thus breaking backwards compatibility. For example:
- Using a number other than 0 or 1 where a boolean is expected. *E1023*
- Using a string value when setting a number options.
- Using a string value when setting a number option.
- 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 Vim9 script: >
map([1, 2, 3], (i, v) => 'item ' .. i)
vim9 echo map([1, 2, 3], (i, v) => 'item ' .. i)
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.
Instead use |mapnew(): >
vim9 echo mapnew([1, 2, 3], (i, v) => 'item ' .. i)
['item 0', 'item 1', 'item 2']
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: >
var mylist = [1, 2.0, '3']
# typename(mylist) == "list<any>"
map(mylist, (i, v) => 'item ' .. i)
# typename(mylist) == "list<string>", no error
Same for |extend()|, use |extendnew()| instead, and for |flatten()|, use
|flattennew()| instead.
@ -1240,9 +1361,10 @@ Exporting an item can be written as: >
export const someValue = ...
export def MyFunc() ...
export class MyClass ...
export interface MyClass ...
As this suggests, only constants, variables, `:def` functions and classes can
be exported. {not implemented yet: export class}
be exported. {not implemented yet: class, interface}
*E1042*
`:export` can only be used in Vim9 script, at the script level.
@ -1273,6 +1395,9 @@ script file to avoid confusion.
`:import` can also be used in legacy Vim script. The imported items still
become script-local, even when the "s:" prefix is not given.
`:import` can not be used in a function. Imported items are intended to exist
at the script level and only imported once.
The script name after `import` can be:
- A relative path, starting "." or "..". This finds a file relative to the
location of the script file itself. This is useful to split up a large
@ -1282,6 +1407,8 @@ The script name after `import` can be:
- A path not being relative or absolute. This will be found in the
"import" subdirectories of 'runtimepath' entries. The name will usually be
longer and unique, to avoid loading the wrong file.
Note that "after/import" is not used, unless it is explicitly added in
'runtimepath'.
Once a vim9 script file has been imported, the result is cached and used the
next time the same script is imported. It will not be read again.
@ -1342,27 +1469,46 @@ implementing classes is going to be a lot of work, it is left for the future.
For now we'll just make sure classes can be added later.
Thoughts:
- `class` / `endclass`, everything in one file
- Class names are always CamelCase
- Single constructor
- `class` / `endclass`, the whole class must be in one file
- Class names are always CamelCase (to avoid a name clash with builtin types)
- A single constructor called "constructor"
- Single inheritance with `class ThisClass extends BaseClass`
- `abstract class`
- `interface` (Abstract class without any implementation)
- `abstract class` (class with incomplete implementation)
- `interface` / `endinterface` (abstract class without any implementation)
- `class SomeClass implements SomeInterface`
- Generics for class: `class <Tkey, Tentry>`
- Generics for function: `def <Tkey> GetLast(key: Tkey)`
Again, much of this is from TypeScript.
Again, much of this is from TypeScript with a slightly different syntax.
Some things that look like good additions:
- Use a class as an interface (like Dart)
- Extend a class with methods, using an import (like Dart)
- Mixins
- For testing: Mock mechanism
An important class that will be provided is "Promise". Since Vim is single
threaded, connecting asynchronous operations is a natural way of allowing
plugins to do their work without blocking the user. It's a uniform way to
invoke callbacks and handle timeouts and errors.
Some examples: >
abstract class Person
static const prefix = 'xxx'
var name: string
def constructor(name: string)
this.name = name
enddef
def display(): void
echo name
enddef
abstract def find(string): Person
endclass
==============================================================================
9. Rationale *vim9-rationale*

View File

@ -1,17 +1,17 @@
.TH VIMDIFF 1 "2001 March 30"
.SH NAME
vimdiff \- edit two, three or four versions of a file with Vim and show differences
vimdiff \- edit between two and eight versions of a file with Vim and show differences
.SH SYNOPSIS
.br
.B vimdiff
[options] file1 file2 [file3 [file4]]
[options] file1 file2 [file3 [file4 [file5 [file6 [file7 [file8]]]]]]
.PP
.B gvimdiff
.SH DESCRIPTION
.B Vimdiff
starts
.B Vim
on two (or three or four) files.
on two up to eight files.
Each file gets its own window.
The differences between the files are highlighted.
This is a nice way to inspect changes and to move changes from one version

View File

@ -1,27 +1,28 @@
VIMDIFF(1) VIMDIFF(1)
VIMDIFF(1) General Commands Manual VIMDIFF(1)
NAME
vimdiff - edit two, three or four versions of a file with Vim and show
differences
vimdiff - edit between two and eight versions of a file with Vim and
show differences
SYNOPSIS
vimdiff [options] file1 file2 [file3 [file4]]
vimdiff [options] file1 file2 [file3 [file4 [file5 [file6 [file7
[file8]]]]]]
gvimdiff
DESCRIPTION
Vimdiff starts Vim on two (or three or four) files. Each file gets its
own window. The differences between the files are highlighted. This
is a nice way to inspect changes and to move changes from one version
to another version of the same file.
Vimdiff starts Vim on two up to eight files. Each file gets its own
window. The differences between the files are highlighted. This is a
nice way to inspect changes and to move changes from one version to an
other version of the same file.
See vim(1) for details about Vim itself.
When started as gvimdiff the GUI will be started, if available.
In each window the 'diff' option will be set, which causes the differ-
In each window the 'diff' option will be set, which causes the differ
ences to be highlighted.
The 'wrap' and 'scrollbind' options are set to make the text look good.
The 'foldmethod' option is set to "diff", which puts ranges of lines

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Apr 17
" Last Change: 2021 Jul 03
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@ -393,7 +393,7 @@ au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf
" Configure scripts
au BufNewFile,BufRead configure.in,configure.ac setf config
" CUDA Cumpute Unified Device Architecture
" CUDA Compute Unified Device Architecture
au BufNewFile,BufRead *.cu,*.cuh setf cuda
" Dockerfile; Podman uses the same syntax with name Containerfile
@ -408,8 +408,15 @@ au BufNewFile,BufRead *enlightenment/*.cfg setf c
" Eterm
au BufNewFile,BufRead *Eterm/*.cfg setf eterm
" Elixir or Euphoria
au BufNewFile,BufRead *.ex call dist#ft#ExCheck()
" Elixir
au BufRead,BufNewFile mix.lock,*.exs setf elixir
au BufRead,BufNewFile *.eex,*.leex setf eelixir
" Euphoria 3 or 4
au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call dist#ft#EuphoriaCheck()
au BufNewFile,BufRead *.eu,*.ew,*.exu,*.exw call dist#ft#EuphoriaCheck()
if has("fname_case")
au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call dist#ft#EuphoriaCheck()
endif
@ -643,6 +650,9 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
" Gedcom
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
" Gemtext
au BufNewFile,BufRead *.gmi,*.gemini setf gemtext
" Gift (Moodle)
autocmd BufRead,BufNewFile *.gift setf gift
@ -855,6 +865,18 @@ au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
" JSON
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
" JSON Patch (RFC 6902)
au BufNewFile,BufRead *.json-patch setf json
" Jupyter Notebook is also json
au BufNewFile,BufRead *.ipynb setf json
" JSONC
au BufNewFile,BufRead *.jsonc setf jsonc
" Julia
au BufNewFile,BufRead *.jl setf julia
" Kixtart
au BufNewFile,BufRead *.kix setf kix
@ -1496,7 +1518,7 @@ au BufNewFile,BufRead *.sass setf sass
au BufNewFile,BufRead *.sa setf sather
" Scala
au BufNewFile,BufRead *.scala setf scala
au BufNewFile,BufRead *.scala,*.sc setf scala
" SBT - Scala Build Tool
au BufNewFile,BufRead *.sbt setf sbt
@ -1504,6 +1526,9 @@ au BufNewFile,BufRead *.sbt setf sbt
" Scilab
au BufNewFile,BufRead *.sci,*.sce setf scilab
" scdoc
au BufNewFile,BufRead *.scd setf scdoc
" SCSS
au BufNewFile,BufRead *.scss setf scss

View File

@ -3,7 +3,7 @@
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2019 Jan 06
" Last Change: 2020 Jun 28
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@ -118,7 +118,7 @@ endif
" TODO: comments=
setlocal commentstring=<%#%s%>
let b:undo_ftplugin = "setl cms< "
let b:undo_ftplugin = "setl cms< " .
\ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
let &cpo = s:save_cpo

View File

@ -0,0 +1,27 @@
" Vim filetype plugin
" Language: JSONC (JSON with Comments)
" Original Author: Izhak Jakov <izhak724@gmail.com>
" Acknowledgement: Based off of vim-jsonc maintained by Kevin Locke <kevin@kevinlocke.name>
" https://github.com/kevinoid/vim-jsonc
" License: MIT
" Last Change: 2021-07-01
runtime! ftplugin/json.vim
if exists('b:did_ftplugin_jsonc')
finish
else
let b:did_ftplugin_jsonc = 1
endif
" A list of commands that undo buffer local changes made below.
let s:undo_ftplugin = []
" Set comment (formatting) related options. {{{1
setlocal commentstring=//%s comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
call add(s:undo_ftplugin, 'commentstring< comments<')
" Let Vim know how to disable the plug-in.
call map(s:undo_ftplugin, "'execute ' . string(v:val)")
let b:undo_ftplugin = join(s:undo_ftplugin, ' | ')
unlet s:undo_ftplugin

View File

@ -3,7 +3,7 @@
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2019 Nov 06
" Last Change: 2020 Feb 13
if (exists("b:did_ftplugin"))
finish
@ -112,7 +112,7 @@ else
if !exists('g:ruby_default_path')
if has("ruby") && has("win32")
ruby ::VIM::command( 'let g:ruby_default_path = split("%s",",")' % $:.join(%q{,}) )
elseif executable('ruby')
elseif executable('ruby') && !empty($HOME)
let g:ruby_default_path = s:query_path($HOME)
else
let g:ruby_default_path = map(split($RUBYLIB,':'), 'v:val ==# "." ? "" : v:val')

View File

@ -5,6 +5,7 @@
Name[de]=GVim
Name[eo]=GVim
Name[fr]=GVim
Name[it]=GVim
Name[ru]=GVim
Name[sr]=GVim
Name[tr]=GVim
@ -13,6 +14,7 @@ Name=GVim
GenericName[de]=Texteditor
GenericName[eo]=Tekstoredaktilo
GenericName[fr]=Éditeur de texte
GenericName[it]=Editor di testi
GenericName[ja]=テキストエディタ
GenericName[ru]=Текстовый редактор
GenericName[sr]=Едитор текст
@ -22,6 +24,7 @@ GenericName=Text Editor
Comment[de]=Textdateien bearbeiten
Comment[eo]=Redakti tekstajn dosierojn
Comment[fr]=Éditer des fichiers texte
Comment[it]=Edita file di testo
Comment[ja]=テキストファイルを編集します
Comment[ru]=Редактирование текстовых файлов
Comment[sr]=Уређујте текст фајлове
@ -60,7 +63,6 @@ Comment[hr]=Uređivanje tekstualne datoteke
Comment[hu]=Szövegfájlok szerkesztése
Comment[id]=Edit file teks
Comment[is]=Vinna með textaskrár
Comment[it]=Modifica file di testo
Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
Comment[ko]=텍스트 파일을 편집합니다
Comment[lt]=Redaguoti tekstines bylas
@ -102,6 +104,7 @@ Type=Application
Keywords[de]=Text;Editor;
Keywords[eo]=Teksto;redaktilo;
Keywords[fr]=Texte;éditeur;
Keywords[it]=Testo;editor;
Keywords[ja]=テキスト;エディタ;
Keywords[ru]=текст;текстовый редактор;
Keywords[sr]=Текст;едитор;
@ -111,7 +114,9 @@ Keywords=Text;editor;
Icon[de]=gvim
Icon[eo]=gvim
Icon[fr]=gvim
Icon[it]=gvim
Icon[ru]=gvim
Icon[sr]=gvim
Icon=gvim
Categories=Utility;TextEditor;
StartupNotify=true

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: Bazel (http://bazel.io)
" Maintainer: David Barnett (https://github.com/google/vim-ft-bzl)
" Last Change: 2017 Jun 13
" Last Change: 2021 Jul 08
if exists('b:did_indent')
finish
@ -41,30 +41,41 @@ function GetBzlIndent(lnum) abort
if exists('g:pyindent_open_paren')
let l:pyindent_open_paren = g:pyindent_open_paren
endif
let g:pyindent_nested_paren = 'shiftwidth() * 2'
let g:pyindent_open_paren = 'shiftwidth() * 2'
let g:pyindent_nested_paren = 'shiftwidth()'
let g:pyindent_open_paren = 'shiftwidth()'
endif
let l:indent = -1
" Indent inside parens.
" Align with the open paren unless it is at the end of the line.
" E.g.
" open_paren_not_at_EOL(100,
" (200,
" 300),
" 400)
" open_paren_at_EOL(
" 100, 200, 300, 400)
call cursor(a:lnum, 1)
let [l:par_line, l:par_col] = searchpairpos('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" .
\ " synIDattr(synID(line('.'), col('.'), 1), 'name')" .
\ " =~ '\\(Comment\\|String\\)$'")
if l:par_line > 0
call cursor(l:par_line, 1)
if l:par_col != col('$') - 1
let l:indent = l:par_col
" Indent inside parens.
if searchpair('(\|{\|\[', '', ')\|}\|\]', 'W',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" .
\ " synIDattr(synID(line('.'), col('.'), 1), 'name')" .
\ " =~ '\\(Comment\\|String\\)$'") && line('.') == a:lnum
" If cursor is at close parens, match indent with open parens.
" E.g.
" foo(
" )
let l:indent = indent(l:par_line)
else
" Align with the open paren unless it is at the end of the line.
" E.g.
" open_paren_not_at_EOL(100,
" (200,
" 300),
" 400)
" open_paren_at_EOL(
" 100, 200, 300, 400)
call cursor(l:par_line, 1)
if l:par_col != col('$') - 1
let l:indent = l:par_col
endif
endif
endif

View File

@ -1,7 +1,7 @@
" Vim indent script for HTML
" Maintainer: Bram Moolenaar
" Original Author: Andy Wokula <anwoku@yahoo.de>
" Last Change: 2021 Jan 26
" Last Change: 2021 Jun 13
" Version: 1.0 "{{{
" Description: HTML indent script with cached state for faster indenting on a
" range of lines.
@ -62,7 +62,7 @@ let s:tagname = '\w\+\(-\w\+\)*'
" Prefer using buffer-local settings over global settings, so that there can
" be defaults for all HTML files and exceptions for specific types of HTML
" files.
func! HtmlIndent_CheckUserSettings()
func HtmlIndent_CheckUserSettings()
"{{{
let inctags = ''
if exists("b:html_indent_inctags")
@ -178,7 +178,7 @@ let s:endtags = [0,0,0,0,0,0,0] " long enough for the highest index
"}}}
" Add a list of tag names for a pair of <tag> </tag> to "tags".
func! s:AddITags(tags, taglist)
func s:AddITags(tags, taglist)
"{{{
for itag in a:taglist
let a:tags[itag] = 1
@ -187,7 +187,7 @@ func! s:AddITags(tags, taglist)
endfunc "}}}
" Take a list of tag name pairs that are not to be used as tag pairs.
func! s:RemoveITags(tags, taglist)
func s:RemoveITags(tags, taglist)
"{{{
for itag in a:taglist
let a:tags[itag] = 1
@ -196,7 +196,7 @@ func! s:RemoveITags(tags, taglist)
endfunc "}}}
" Add a block tag, that is a tag with a different kind of indenting.
func! s:AddBlockTag(tag, id, ...)
func s:AddBlockTag(tag, id, ...)
"{{{
if !(a:id >= 2 && a:id < len(s:endtags))
echoerr 'AddBlockTag ' . a:id
@ -255,7 +255,7 @@ call s:AddBlockTag('<!--[', 6, '![endif]-->')
" Return non-zero when "tagname" is an opening tag, not being a block tag, for
" which there should be a closing tag. Can be used by scripts that include
" HTML indenting.
func! HtmlIndent_IsOpenTag(tagname)
func HtmlIndent_IsOpenTag(tagname)
"{{{
if get(s:indent_tags, a:tagname) == 1
return 1
@ -264,7 +264,7 @@ func! HtmlIndent_IsOpenTag(tagname)
endfunc "}}}
" Get the value for "tagname", taking care of buffer-local tags.
func! s:get_tag(tagname)
func s:get_tag(tagname)
"{{{
let i = get(s:indent_tags, a:tagname)
if (i == 1 || i == -1) && get(b:hi_removed_tags, a:tagname) != 0
@ -277,7 +277,7 @@ func! s:get_tag(tagname)
endfunc "}}}
" Count the number of start and end tags in "text".
func! s:CountITags(text)
func s:CountITags(text)
"{{{
" Store the result in s:curind and s:nextrel.
let s:curind = 0 " relative indent steps for current line [unit &sw]:
@ -289,7 +289,7 @@ func! s:CountITags(text)
endfunc "}}}
" Count the number of start and end tags in text.
func! s:CountTagsAndState(text)
func s:CountTagsAndState(text)
"{{{
" Store the result in s:curind and s:nextrel. Update b:hi_newstate.block.
let s:curind = 0 " relative indent steps for current line [unit &sw]:
@ -304,7 +304,7 @@ func! s:CountTagsAndState(text)
endfunc "}}}
" Used by s:CountITags() and s:CountTagsAndState().
func! s:CheckTag(itag)
func s:CheckTag(itag)
"{{{
" Returns an empty string or "SCRIPT".
" a:itag can be "tag" or "/tag" or "<!--" or "-->"
@ -338,7 +338,7 @@ func! s:CheckTag(itag)
endfunc "}}}
" Used by s:CheckTag(). Returns an empty string or "SCRIPT".
func! s:CheckBlockTag(blocktag, ind)
func s:CheckBlockTag(blocktag, ind)
"{{{
if a:ind > 0
" a block starts here
@ -366,7 +366,7 @@ func! s:CheckBlockTag(blocktag, ind)
endfunc "}}}
" Used by s:CheckTag().
func! s:CheckCustomTag(ctag)
func s:CheckCustomTag(ctag)
"{{{
" Returns 1 if ctag is the tag for a custom element, 0 otherwise.
" a:ctag can be "tag" or "/tag" or "<!--" or "-->"
@ -396,7 +396,7 @@ func! s:CheckCustomTag(ctag)
endfunc "}}}
" Return the <script> type: either "javascript" or ""
func! s:GetScriptType(str)
func s:GetScriptType(str)
"{{{
if a:str == "" || a:str =~ "java"
return "javascript"
@ -407,7 +407,7 @@ endfunc "}}}
" Look back in the file, starting at a:lnum - 1, to compute a state for the
" start of line a:lnum. Return the new state.
func! s:FreshState(lnum)
func s:FreshState(lnum)
"{{{
" A state is to know ALL relevant details about the
" lines 1..a:lnum-1, initial calculating (here!) can be slow, but updating is
@ -568,24 +568,29 @@ func! s:FreshState(lnum)
endfunc "}}}
" Indent inside a <pre> block: Keep indent as-is.
func! s:Alien2()
func s:Alien2()
"{{{
return -1
endfunc "}}}
" Return the indent inside a <script> block for javascript.
func! s:Alien3()
func s:Alien3()
"{{{
let lnum = prevnonblank(v:lnum - 1)
while lnum > 1 && getline(lnum) =~ '^\s*/[/*]'
" Skip over comments to avoid that cindent() aligns with the <script> tag
let lnum = prevnonblank(lnum - 1)
endwhile
if lnum < b:hi_indent.blocklnr
" indent for <script> itself
return b:hi_indent.blocktagind
endif
if lnum == b:hi_indent.blocklnr
" indent for the first line after <script>
return eval(b:hi_js1indent)
endif
if b:hi_indent.scripttype == "javascript"
" indent for further lines
return eval(b:hi_js1indent) + GetJavascriptIndent()
else
return -1
@ -593,7 +598,7 @@ func! s:Alien3()
endfunc "}}}
" Return the indent inside a <style> block.
func! s:Alien4()
func s:Alien4()
"{{{
if prevnonblank(v:lnum-1) == b:hi_indent.blocklnr
" indent for first content line
@ -603,7 +608,7 @@ func! s:Alien4()
endfunc "}}}
" Indending inside a <style> block. Returns the indent.
func! s:CSSIndent()
func s:CSSIndent()
"{{{
" This handles standard CSS and also Closure stylesheets where special lines
" start with @.
@ -720,13 +725,13 @@ endfunc "}}}
" tag: blah
" tag: blah &&
" tag: blah ||
func! s:CssUnfinished(text)
func s:CssUnfinished(text)
"{{{
return a:text =~ '\(||\|&&\|:\|\k\)\s*$'
endfunc "}}}
" Search back for the first unfinished line above "lnum".
func! s:CssFirstUnfinished(lnum, min_lnum)
func s:CssFirstUnfinished(lnum, min_lnum)
"{{{
let align_lnum = a:lnum
while align_lnum > a:min_lnum && s:CssUnfinished(getline(align_lnum - 1))
@ -736,7 +741,7 @@ func! s:CssFirstUnfinished(lnum, min_lnum)
endfunc "}}}
" Find the non-empty line at or before "lnum" that is not a comment.
func! s:CssPrevNonComment(lnum, stopline)
func s:CssPrevNonComment(lnum, stopline)
"{{{
" caller starts from a line a:lnum + 1 that is not a comment
let lnum = prevnonblank(a:lnum)
@ -761,7 +766,7 @@ func! s:CssPrevNonComment(lnum, stopline)
endfunc "}}}
" Check the number of {} and () in line "lnum". Return a dict with the counts.
func! HtmlIndent_CountBraces(lnum)
func HtmlIndent_CountBraces(lnum)
"{{{
let brs = substitute(getline(a:lnum), '[''"].\{-}[''"]\|/\*.\{-}\*/\|/\*.*$\|[^{}()]', '', 'g')
let c_open = 0
@ -794,7 +799,7 @@ func! HtmlIndent_CountBraces(lnum)
endfunc "}}}
" Return the indent for a comment: <!-- -->
func! s:Alien5()
func s:Alien5()
"{{{
let curtext = getline(v:lnum)
if curtext =~ '^\s*\zs-->'
@ -826,7 +831,7 @@ func! s:Alien5()
endfunc "}}}
" Return the indent for conditional comment: <!--[ ![endif]-->
func! s:Alien6()
func s:Alien6()
"{{{
let curtext = getline(v:lnum)
if curtext =~ '\s*\zs<!\[endif\]-->'
@ -840,7 +845,7 @@ func! s:Alien6()
endfunc "}}}
" When the "lnum" line ends in ">" find the line containing the matching "<".
func! HtmlIndent_FindTagStart(lnum)
func HtmlIndent_FindTagStart(lnum)
"{{{
" Avoids using the indent of a continuation line.
" Moves the cursor.
@ -863,7 +868,7 @@ func! HtmlIndent_FindTagStart(lnum)
endfunc "}}}
" Find the unclosed start tag from the current cursor position.
func! HtmlIndent_FindStartTag()
func HtmlIndent_FindStartTag()
"{{{
" The cursor must be on or before a closing tag.
" If found, positions the cursor at the match and returns the line number.
@ -877,7 +882,7 @@ func! HtmlIndent_FindStartTag()
endfunc "}}}
" Moves the cursor from a "<" to the matching ">".
func! HtmlIndent_FindTagEnd()
func HtmlIndent_FindTagEnd()
"{{{
" Call this with the cursor on the "<" of a start tag.
" This will move the cursor to the ">" of the matching end tag or, when it's
@ -897,7 +902,7 @@ func! HtmlIndent_FindTagEnd()
endfunc "}}}
" Indenting inside a start tag. Return the correct indent or -1 if unknown.
func! s:InsideTag(foundHtmlString)
func s:InsideTag(foundHtmlString)
"{{{
if a:foundHtmlString
" Inside an attribute string.
@ -958,7 +963,7 @@ func! s:InsideTag(foundHtmlString)
endfunc "}}}
" THE MAIN INDENT FUNCTION. Return the amount of indent for v:lnum.
func! HtmlIndent()
func HtmlIndent()
"{{{
if prevnonblank(v:lnum - 1) < 1
" First non-blank line has no indent.

189
runtime/indent/jsonc.vim Normal file
View File

@ -0,0 +1,189 @@
" Vim indent file
" Language: JSONC (JSON with Comments)
" Original Author: Izhak Jakov <izhak724@gmail.com>
" Acknowledgement: Based off of vim-json maintained by Eli Parra <eli@elzr.com>
" https://github.com/elzr/vim-json
" Last Change: 2021-07-01
" 0. Initialization {{{1
" =================
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal nosmartindent
" Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetJSONCIndent()
setlocal indentkeys=0{,0},0),0[,0],!^F,o,O,e
" Only define the function once.
if exists("*GetJSONCIndent")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
" 1. Variables {{{1
" ============
let s:line_term = '\s*\%(\%(\/\/\).*\)\=$'
" Regex that defines blocks.
let s:block_regex = '\%({\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=' . s:line_term
" 2. Auxiliary Functions {{{1
" ======================
" Check if the character at lnum:col is inside a string.
function s:IsInString(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') == 'jsonString'
endfunction
" Find line above 'lnum' that isn't empty, or in a string.
function s:PrevNonBlankNonString(lnum)
let lnum = prevnonblank(a:lnum)
while lnum > 0
" If the line isn't empty or in a string, end search.
let line = getline(lnum)
if !(s:IsInString(lnum, 1) && s:IsInString(lnum, strlen(line)))
break
endif
let lnum = prevnonblank(lnum - 1)
endwhile
return lnum
endfunction
" Check if line 'lnum' has more opening brackets than closing ones.
function s:LineHasOpeningBrackets(lnum)
let open_0 = 0
let open_2 = 0
let open_4 = 0
let line = getline(a:lnum)
let pos = match(line, '[][(){}]', 0)
while pos != -1
let idx = stridx('(){}[]', line[pos])
if idx % 2 == 0
let open_{idx} = open_{idx} + 1
else
let open_{idx - 1} = open_{idx - 1} - 1
endif
let pos = match(line, '[][(){}]', pos + 1)
endwhile
return (open_0 > 0) . (open_2 > 0) . (open_4 > 0)
endfunction
function s:Match(lnum, regex)
let col = match(getline(a:lnum), a:regex) + 1
return col > 0 && !s:IsInString(a:lnum, col) ? col : 0
endfunction
" 3. GetJSONCIndent Function {{{1
" =========================
function GetJSONCIndent()
if !exists("s:inside_comment")
let s:inside_comment = 0
endif
" 3.1. Setup {{{2
" ----------
" Set up variables for restoring position in file. Could use v:lnum here.
let vcol = col('.')
" 3.2. Work on the current line {{{2
" -----------------------------
" Get the current line.
let line = getline(v:lnum)
let ind = -1
if s:inside_comment == 0
" TODO iterate through all the matches in a line
let col = matchend(line, '\/\*')
if col > 0 && !s:IsInString(v:lnum, col)
let s:inside_comment = 1
endif
endif
" If we're in the middle of a comment
if s:inside_comment == 1
let col = matchend(line, '\*\/')
if col > 0 && !s:IsInString(v:lnum, col)
let s:inside_comment = 0
endif
return ind
endif
if line =~ '^\s*//'
return ind
endif
" If we got a closing bracket on an empty line, find its match and indent
" according to it.
let col = matchend(line, '^\s*[]}]')
if col > 0 && !s:IsInString(v:lnum, col)
call cursor(v:lnum, col)
let bs = strpart('{}[]', stridx('}]', line[col - 1]) * 2, 2)
let pairstart = escape(bs[0], '[')
let pairend = escape(bs[1], ']')
let pairline = searchpair(pairstart, '', pairend, 'bW')
if pairline > 0
let ind = indent(pairline)
else
let ind = virtcol('.') - 1
endif
return ind
endif
" If we are in a multi-line string, don't do anything to it.
if s:IsInString(v:lnum, matchend(line, '^\s*') + 1)
return indent('.')
endif
" 3.3. Work on the previous line. {{{2
" -------------------------------
let lnum = prevnonblank(v:lnum - 1)
if lnum == 0
return 0
endif
" Set up variables for current line.
let line = getline(lnum)
let ind = indent(lnum)
" If the previous line ended with a block opening, add a level of indent.
" if s:Match(lnum, s:block_regex)
" return indent(lnum) + shiftwidth()
" endif
" If the previous line contained an opening bracket, and we are still in it,
" add indent depending on the bracket type.
if line =~ '[[({]'
let counts = s:LineHasOpeningBrackets(lnum)
if counts[0] == '1' || counts[1] == '1' || counts[2] == '1'
return ind + shiftwidth()
else
call cursor(v:lnum, vcol)
end
endif
" }}}2
return ind
endfunction
" }}}1
let &cpo = s:cpo_save
unlet s:cpo_save
" vim:set sw=2 sts=2 ts=8 noet:

View File

@ -2,7 +2,7 @@
" Language: Pascal
" Maintainer: Neil Carter <n.carter@swansea.ac.uk>
" Created: 2004 Jul 13
" Last Change: 2017 Jun 13
" Last Change: 2021 Jul 01
"
" This is version 2.0, a complete rewrite.
"
@ -20,6 +20,8 @@ setlocal indentkeys+==end;,==const,==type,==var,==begin,==repeat,==until,==for
setlocal indentkeys+==program,==function,==procedure,==object,==private
setlocal indentkeys+==record,==if,==else,==case
let b:undo_indent = "setl indentkeys< indentexpr<"
if exists("*GetPascalIndent")
finish
endif

View File

@ -4,6 +4,7 @@
" 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: 2021 Feb 03
" 0. Initialization {{{1
" =================

View File

@ -15,7 +15,7 @@ text comment
</tag1>
<!--
text comment
end coment -->
end comment -->
</tag0>
<!-- END_INDENT -->

View File

@ -15,7 +15,7 @@
</tag1>
<!--
text comment
end coment -->
end comment -->
</tag0>
<!-- END_INDENT -->

View File

@ -22,7 +22,7 @@ map F "hy2l
map C "fp
map e "fy2l
map E "hp
map F "hy2l
map F "hy2l
" initialisations:
" KM cleanup buffer

View File

@ -4,7 +4,7 @@ For instructions on installing this file, type
`:help matchit-install`
inside Vim.
For Vim version 8.1. Last change: 2020 Mar 01
For Vim version 8.1. Last change: 2021 May 17
VIM REFERENCE MANUAL by Benji Fisher et al
@ -320,7 +320,7 @@ should work (and have the same effect as "foobar:barfoo:endfoobar"), although
this has not been thoroughly tested.
You can use |zero-width| patterns such as |\@<=| and |\zs|. (The latter has
not been thouroughly tested in matchit.vim.) For example, if the keyword "if"
not been thoroughly tested in matchit.vim.) For example, if the keyword "if"
must occur at the start of the line, with optional white space, you might use
the pattern "\(^\s*\)\@<=if" so that the cursor will end on the "i" instead of
at the start of the line. For another example, if HTML had only one tag then

View File

@ -9,7 +9,7 @@
SPELLDIR = ..
FILES = tet_ID.aff tet_ID.dic
# I don't hava a Tetum locale, use the Dutch one instead.
# I don't have a Tetum locale, use the Dutch one instead.
all: $SPELLDIR/tet.latin1.spl $SPELLDIR/tet.utf-8.spl ../README_tet.txt
$SPELLDIR/tet.latin1.spl : $FILES

View File

@ -293,7 +293,7 @@ syn region eighthComment start="\zs\\" end="$" contains=eighthTodo
" Define the default highlighting.
if !exists("did_eighth_syntax_inits")
let did_eighth_syntax_inits=1
" The default methods for highlighting. Can be overriden later.
" The default methods for highlighting. Can be overridden later.
hi def link eighthTodo Todo
hi def link eighthOperators Operator
hi def link eighthMath Number

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: APT config file
" Maintainer: Yann Amar <quidame@poivron.org>
" Last Change: 2015 Dec 22
" Last Change: 2021 Jul 12
" quit when a syntax file was already loaded
if !exists("main_syntax")
@ -396,10 +396,13 @@ syn cluster aptconfSynaptic_ contains=aptconfSynaptic,
" }}}
" Unattended Upgrade: {{{
syn keyword aptconfUnattendedUpgrade contained
\ AutoFixInterruptedDpkg Automatic-Reboot Automatic-Reboot-Time
\ Automatic-Reboot-WithUsers InstallOnShutdown Mail MailOnlyOnError
\ MinimalSteps Origins-Pattern Package-Blacklist
\ Remove-Unused-Dependencies
\ Allow-APT-Mark-Fallback Allow-downgrade AutoFixInterruptedDpkg
\ Automatic-Reboot Automatic-Reboot-Time Automatic-Reboot-WithUsers
\ Debug InstallOnShutdown Mail MailOnlyOnError MailReport MinimalSteps
\ OnlyOnACPower Origins-Pattern Package-Blacklist
\ Remove-New-Unused-Dependencies Remove-Unused-Dependencies
\ Remove-Unused-Kernel-Packages Skip-Updates-On-Metered-Connections
\ SyslogEnable SyslogFacility Verbose
syn cluster aptconfUnattendedUpgrade_ contains=aptconfUnattendedUpgrade
" }}}

View File

@ -1,58 +1,109 @@
" Vim syntax file
" Language: Go
" Maintainer: David Barnett (https://github.com/google/vim-ft-go)
" Last Change: 2014 Aug 16
" Options:
" There are some options for customizing the highlighting; the recommended
" settings are the default values, but you can write:
" let OPTION_NAME = 0
" in your ~/.vimrc file to disable particular options. You can also write:
" let OPTION_NAME = 1
" to enable particular options. At present, all options default to on.
" Copyright 2009 The Go Authors. All rights reserved.
" Use of this source code is governed by a BSD-style
" license that can be found in the LICENSE file.
"
" - g:go_highlight_array_whitespace_error
" Highlights white space after "[]".
" - g:go_highlight_chan_whitespace_error
" Highlights white space around the communications operator that don't
" follow the standard style.
" - g:go_highlight_extra_types
" Highlights commonly used library types (io.Reader, etc.).
" - g:go_highlight_space_tab_error
" Highlights instances of tabs following spaces.
" - g:go_highlight_trailing_whitespace_error
" Highlights trailing white space.
" go.vim: Vim syntax file for Go.
" Language: Go
" Maintainer: Billie Cleek <bhcleek@gmail.com>
" Latest Revision: 2021-06-26
" License: BSD-style. See LICENSE file in source repository.
" Repository: https://github.com/fatih/vim-go
" Quit when a (custom) syntax file was already loaded
if exists('b:current_syntax')
if exists("b:current_syntax")
finish
endif
if !exists('g:go_highlight_array_whitespace_error')
let g:go_highlight_array_whitespace_error = 1
endif
if !exists('g:go_highlight_chan_whitespace_error')
let g:go_highlight_chan_whitespace_error = 1
endif
if !exists('g:go_highlight_extra_types')
let g:go_highlight_extra_types = 1
endif
if !exists('g:go_highlight_space_tab_error')
let g:go_highlight_space_tab_error = 1
endif
if !exists('g:go_highlight_trailing_whitespace_error')
let g:go_highlight_trailing_whitespace_error = 1
endif
let s:keepcpo = &cpo
set cpo&vim
function! s:FoldEnable(...) abort
if a:0 > 0
return index(s:FoldEnable(), a:1) > -1
endif
return get(g:, 'go_fold_enable', ['block', 'import', 'varconst', 'package_comment'])
endfunction
function! s:HighlightArrayWhitespaceError() abort
return get(g:, 'go_highlight_array_whitespace_error', 0)
endfunction
function! s:HighlightChanWhitespaceError() abort
return get(g:, 'go_highlight_chan_whitespace_error', 0)
endfunction
function! s:HighlightExtraTypes() abort
return get(g:, 'go_highlight_extra_types', 0)
endfunction
function! s:HighlightSpaceTabError() abort
return get(g:, 'go_highlight_space_tab_error', 0)
endfunction
function! s:HighlightTrailingWhitespaceError() abort
return get(g:, 'go_highlight_trailing_whitespace_error', 0)
endfunction
function! s:HighlightOperators() abort
return get(g:, 'go_highlight_operators', 0)
endfunction
function! s:HighlightFunctions() abort
return get(g:, 'go_highlight_functions', 0)
endfunction
function! s:HighlightFunctionParameters() abort
return get(g:, 'go_highlight_function_parameters', 0)
endfunction
function! s:HighlightFunctionCalls() abort
return get(g:, 'go_highlight_function_calls', 0)
endfunction
function! s:HighlightFields() abort
return get(g:, 'go_highlight_fields', 0)
endfunction
function! s:HighlightTypes() abort
return get(g:, 'go_highlight_types', 0)
endfunction
function! s:HighlightBuildConstraints() abort
return get(g:, 'go_highlight_build_constraints', 0)
endfunction
function! s:HighlightStringSpellcheck() abort
return get(g:, 'go_highlight_string_spellcheck', 1)
endfunction
function! s:HighlightFormatStrings() abort
return get(g:, 'go_highlight_format_strings', 1)
endfunction
function! s:HighlightGenerateTags() abort
return get(g:, 'go_highlight_generate_tags', 0)
endfunction
function! s:HighlightVariableAssignments() abort
return get(g:, 'go_highlight_variable_assignments', 0)
endfunction
function! s:HighlightVariableDeclarations() abort
return get(g:, 'go_highlight_variable_declarations', 0)
endfunction
syn case match
syn keyword goDirective package import
syn keyword goDeclaration var const type
syn keyword goDeclType struct interface
syn keyword goPackage package
syn keyword goImport import contained
syn keyword goVar var contained
syn keyword goConst const contained
hi def link goDirective Statement
hi def link goPackage Statement
hi def link goImport Statement
hi def link goVar Keyword
hi def link goConst Keyword
hi def link goDeclaration Keyword
hi def link goDeclType Keyword
" Keywords within functions
syn keyword goStatement defer go goto return break continue fallthrough
@ -78,28 +129,38 @@ hi def link goUnsignedInts Type
hi def link goFloats Type
hi def link goComplexes Type
" Treat func specially: it's a declaration at the start of a line, but a type
" elsewhere. Order matters here.
syn match goType /\<func\>/
syn match goDeclaration /^func\>/
" Predefined functions and values
syn keyword goBuiltins append cap close complex copy delete imag len
syn keyword goBuiltins make new panic print println real recover
syn keyword goConstants iota true false nil
syn keyword goBuiltins append cap close complex copy delete imag len
syn keyword goBuiltins make new panic print println real recover
syn keyword goBoolean true false
syn keyword goPredefinedIdentifiers nil iota
hi def link goBuiltins Keyword
hi def link goConstants Keyword
hi def link goBuiltins Identifier
hi def link goBoolean Boolean
hi def link goPredefinedIdentifiers goBoolean
" Comments; their contents
syn keyword goTodo contained TODO FIXME XXX BUG
syn cluster goCommentGroup contains=goTodo
syn region goComment start="/\*" end="\*/" contains=@goCommentGroup,@Spell
syn region goComment start="//" end="$" contains=@goCommentGroup,@Spell
syn region goComment start="//" end="$" contains=goGenerate,@goCommentGroup,@Spell
if s:FoldEnable('comment')
syn region goComment start="/\*" end="\*/" contains=@goCommentGroup,@Spell fold
syn match goComment "\v(^\s*//.*\n)+" contains=goGenerate,@goCommentGroup,@Spell fold
else
syn region goComment start="/\*" end="\*/" contains=@goCommentGroup,@Spell
endif
hi def link goComment Comment
hi def link goTodo Todo
if s:HighlightGenerateTags()
syn match goGenerateVariables contained /\%(\$GOARCH\|\$GOOS\|\$GOFILE\|\$GOLINE\|\$GOPACKAGE\|\$DOLLAR\)\>/
syn region goGenerate start="^\s*//go:generate" end="$" contains=goGenerateVariables
hi def link goGenerate PreProc
hi def link goGenerateVariables Special
endif
" Go escapes
syn match goEscapeOctal display contained "\\[0-7]\{3}"
syn match goEscapeC display contained +\\[abfnrtv\\'"]+
@ -118,8 +179,30 @@ hi def link goEscapeError Error
" Strings and their contents
syn cluster goStringGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU,goEscapeError
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup
syn region goRawString start=+`+ end=+`+
if s:HighlightStringSpellcheck()
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup,@Spell
syn region goRawString start=+`+ end=+`+ contains=@Spell
else
syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup
syn region goRawString start=+`+ end=+`+
endif
if s:HighlightFormatStrings()
" [n] notation is valid for specifying explicit argument indexes
" 1. Match a literal % not preceded by a %.
" 2. Match any number of -, #, 0, space, or +
" 3. Match * or [n]* or any number or nothing before a .
" 4. Match * or [n]* or any number or nothing after a .
" 5. Match [n] or nothing before a verb
" 6. Match a formatting verb
syn match goFormatSpecifier /\
\%([^%]\%(%%\)*\)\
\@<=%[-#0 +]*\
\%(\%(\%(\[\d\+\]\)\=\*\)\|\d\+\)\=\
\%(\.\%(\%(\%(\[\d\+\]\)\=\*\)\|\d\+\)\=\)\=\
\%(\[\d\+\]\)\=[vTtbcdoqxXUeEfFgGspw]/ contained containedin=goString,goRawString
hi def link goFormatSpecifier goSpecialString
endif
hi def link goString String
hi def link goRawString String
@ -131,71 +214,263 @@ syn region goCharacter start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=
hi def link goCharacter Character
" Regions
syn region goBlock start="{" end="}" transparent fold
syn region goParen start='(' end=')' transparent
if s:FoldEnable('block')
syn region goBlock start="{" end="}" transparent fold
else
syn region goBlock start="{" end="}" transparent
endif
" import
if s:FoldEnable('import')
syn region goImport start='import (' end=')' transparent fold contains=goImport,goString,goComment
else
syn region goImport start='import (' end=')' transparent contains=goImport,goString,goComment
endif
" var, const
if s:FoldEnable('varconst')
syn region goVar start='var (' end='^\s*)$' transparent fold
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
syn region goConst start='const (' end='^\s*)$' transparent fold
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
else
syn region goVar start='var (' end='^\s*)$' transparent
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
syn region goConst start='const (' end='^\s*)$' transparent
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator
endif
" Single-line var, const, and import.
syn match goSingleDecl /\%(import\|var\|const\) [^(]\@=/ contains=goImport,goVar,goConst
" Integers
syn match goDecimalInt "\<\d\+\([Ee]\d\+\)\?\>"
syn match goHexadecimalInt "\<0x\x\+\>"
syn match goOctalInt "\<0\o\+\>"
syn match goOctalError "\<0\o*[89]\d*\>"
syn match goDecimalInt "\<-\=\(0\|[1-9]_\?\(\d\|\d\+_\?\d\+\)*\)\%([Ee][-+]\=\d\+\)\=\>"
syn match goDecimalError "\<-\=\(_\(\d\+_*\)\+\|\([1-9]\d*_*\)\+__\(\d\+_*\)\+\|\([1-9]\d*_*\)\+_\+\)\%([Ee][-+]\=\d\+\)\=\>"
syn match goHexadecimalInt "\<-\=0[xX]_\?\(\x\+_\?\)\+\>"
syn match goHexadecimalError "\<-\=0[xX]_\?\(\x\+_\?\)*\(\([^ \t0-9A-Fa-f_)]\|__\)\S*\|_\)\>"
syn match goOctalInt "\<-\=0[oO]\?_\?\(\o\+_\?\)\+\>"
syn match goOctalError "\<-\=0[0-7oO_]*\(\([^ \t0-7oOxX_/)\]\}\:]\|[oO]\{2,\}\|__\)\S*\|_\|[oOxX]\)\>"
syn match goBinaryInt "\<-\=0[bB]_\?\([01]\+_\?\)\+\>"
syn match goBinaryError "\<-\=0[bB]_\?[01_]*\([^ \t01_)]\S*\|__\S*\|_\)\>"
hi def link goDecimalInt Integer
hi def link goDecimalError Error
hi def link goHexadecimalInt Integer
hi def link goHexadecimalError Error
hi def link goOctalInt Integer
hi def link goOctalError Error
hi def link goBinaryInt Integer
hi def link goBinaryError Error
hi def link Integer Number
" Floating point
syn match goFloat "\<\d\+\.\d*\([Ee][-+]\d\+\)\?\>"
syn match goFloat "\<\.\d\+\([Ee][-+]\d\+\)\?\>"
syn match goFloat "\<\d\+[Ee][-+]\d\+\>"
syn match goFloat "\<-\=\d\+\.\d*\%([Ee][-+]\=\d\+\)\=\>"
syn match goFloat "\<-\=\.\d\+\%([Ee][-+]\=\d\+\)\=\>"
hi def link goFloat Float
" Imaginary literals
syn match goImaginary "\<\d\+i\>"
syn match goImaginary "\<\d\+\.\d*\([Ee][-+]\d\+\)\?i\>"
syn match goImaginary "\<\.\d\+\([Ee][-+]\d\+\)\?i\>"
syn match goImaginary "\<\d\+[Ee][-+]\d\+i\>"
syn match goImaginary "\<-\=\d\+i\>"
syn match goImaginary "\<-\=\d\+[Ee][-+]\=\d\+i\>"
syn match goImaginaryFloat "\<-\=\d\+\.\d*\%([Ee][-+]\=\d\+\)\=i\>"
syn match goImaginaryFloat "\<-\=\.\d\+\%([Ee][-+]\=\d\+\)\=i\>"
hi def link goImaginary Number
hi def link goImaginaryFloat Float
" Spaces after "[]"
if go_highlight_array_whitespace_error != 0
syn match goSpaceError display "\(\[\]\)\@<=\s\+"
if s:HighlightArrayWhitespaceError()
syn match goSpaceError display "\%(\[\]\)\@<=\s\+"
endif
" Spacing errors around the 'chan' keyword
if go_highlight_chan_whitespace_error != 0
if s:HighlightChanWhitespaceError()
" receive-only annotation on chan type
syn match goSpaceError display "\(<-\)\@<=\s\+\(chan\>\)\@="
"
" \(\<chan\>\)\@<!<- (only pick arrow when it doesn't come after a chan)
" this prevents picking up 'chan<- chan<-' but not '<- chan'
syn match goSpaceError display "\%(\%(\<chan\>\)\@<!<-\)\@<=\s\+\%(\<chan\>\)\@="
" send-only annotation on chan type
syn match goSpaceError display "\(\<chan\)\@<=\s\+\(<-\)\@="
"
" \(<-\)\@<!\<chan\> (only pick chan when it doesn't come after an arrow)
" this prevents picking up '<-chan <-chan' but not 'chan <-'
syn match goSpaceError display "\%(\%(<-\)\@<!\<chan\>\)\@<=\s\+\%(<-\)\@="
" value-ignoring receives in a few contexts
syn match goSpaceError display "\(\(^\|[={(,;]\)\s*<-\)\@<=\s\+"
syn match goSpaceError display "\%(\%(^\|[={(,;]\)\s*<-\)\@<=\s\+"
endif
" Extra types commonly seen
if go_highlight_extra_types != 0
syn match goExtraType /\<bytes\.\(Buffer\)\>/
syn match goExtraType /\<io\.\(Reader\|Writer\|ReadWriter\|ReadWriteCloser\)\>/
syn match goExtraType /\<reflect\.\(Kind\|Type\|Value\)\>/
if s:HighlightExtraTypes()
syn match goExtraType /\<bytes\.\%(Buffer\)\>/
syn match goExtraType /\<context\.\%(Context\)\>/
syn match goExtraType /\<io\.\%(Reader\|ReadSeeker\|ReadWriter\|ReadCloser\|ReadWriteCloser\|Writer\|WriteCloser\|Seeker\)\>/
syn match goExtraType /\<reflect\.\%(Kind\|Type\|Value\)\>/
syn match goExtraType /\<unsafe\.Pointer\>/
endif
" Space-tab error
if go_highlight_space_tab_error != 0
if s:HighlightSpaceTabError()
syn match goSpaceError display " \+\t"me=e-1
endif
" Trailing white space error
if go_highlight_trailing_whitespace_error != 0
if s:HighlightTrailingWhitespaceError()
syn match goSpaceError display excludenl "\s\+$"
endif
hi def link goExtraType Type
hi def link goSpaceError Error
" included from: https://github.com/athom/more-colorful.vim/blob/master/after/syntax/go.vim
"
" Comments; their contents
syn keyword goTodo contained NOTE
hi def link goTodo Todo
syn match goVarArgs /\.\.\./
" Operators;
if s:HighlightOperators()
" match single-char operators: - + % < > ! & | ^ * =
" and corresponding two-char operators: -= += %= <= >= != &= |= ^= *= ==
syn match goOperator /[-+%<>!&|^*=]=\?/
" match / and /=
syn match goOperator /\/\%(=\|\ze[^/*]\)/
" match two-char operators: << >> &^
" and corresponding three-char operators: <<= >>= &^=
syn match goOperator /\%(<<\|>>\|&^\)=\?/
" match remaining two-char operators: := && || <- ++ --
syn match goOperator /:=\|||\|<-\|++\|--/
" match ...
hi def link goPointerOperator goOperator
hi def link goVarArgs goOperator
endif
hi def link goOperator Operator
" Functions;
if s:HighlightFunctions() || s:HighlightFunctionParameters()
syn match goDeclaration /\<func\>/ nextgroup=goReceiver,goFunction,goSimpleParams skipwhite skipnl
syn match goReceiverVar /\w\+\ze\s\+\%(\w\|\*\)/ nextgroup=goPointerOperator,goReceiverType skipwhite skipnl contained
syn match goPointerOperator /\*/ nextgroup=goReceiverType contained skipwhite skipnl
syn match goFunction /\w\+/ nextgroup=goSimpleParams contained skipwhite skipnl
syn match goReceiverType /\w\+/ contained
if s:HighlightFunctionParameters()
syn match goSimpleParams /(\%(\w\|\_s\|[*\.\[\],\{\}<>-]\)*)/ contained contains=goParamName,goType nextgroup=goFunctionReturn skipwhite skipnl
syn match goFunctionReturn /(\%(\w\|\_s\|[*\.\[\],\{\}<>-]\)*)/ contained contains=goParamName,goType skipwhite skipnl
syn match goParamName /\w\+\%(\s*,\s*\w\+\)*\ze\s\+\%(\w\|\.\|\*\|\[\)/ contained nextgroup=goParamType skipwhite skipnl
syn match goParamType /\%([^,)]\|\_s\)\+,\?/ contained nextgroup=goParamName skipwhite skipnl
\ contains=goVarArgs,goType,goSignedInts,goUnsignedInts,goFloats,goComplexes,goDeclType,goBlock
hi def link goReceiverVar goParamName
hi def link goParamName Identifier
endif
syn match goReceiver /(\s*\w\+\%(\s\+\*\?\s*\w\+\)\?\s*)\ze\s*\w/ contained nextgroup=goFunction contains=goReceiverVar skipwhite skipnl
else
syn keyword goDeclaration func
endif
hi def link goFunction Function
" Function calls;
if s:HighlightFunctionCalls()
syn match goFunctionCall /\w\+\ze(/ contains=goBuiltins,goDeclaration
endif
hi def link goFunctionCall Type
" Fields;
if s:HighlightFields()
" 1. Match a sequence of word characters coming after a '.'
" 2. Require the following but dont match it: ( \@= see :h E59)
" - The symbols: / - + * % OR
" - The symbols: [] {} <> ) OR
" - The symbols: \n \r space OR
" - The symbols: , : .
" 3. Have the start of highlight (hs) be the start of matched
" pattern (s) offsetted one to the right (+1) (see :h E401)
syn match goField /\.\w\+\
\%(\%([\/\-\+*%]\)\|\
\%([\[\]{}<\>\)]\)\|\
\%([\!=\^|&]\)\|\
\%([\n\r\ ]\)\|\
\%([,\:.]\)\)\@=/hs=s+1
endif
hi def link goField Identifier
" Structs & Interfaces;
if s:HighlightTypes()
syn match goTypeConstructor /\<\w\+{\@=/
syn match goTypeDecl /\<type\>/ nextgroup=goTypeName skipwhite skipnl
syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl
syn match goDeclType /\<\%(interface\|struct\)\>/ skipwhite skipnl
hi def link goReceiverType Type
else
syn keyword goDeclType struct interface
syn keyword goDeclaration type
endif
hi def link goTypeConstructor Type
hi def link goTypeName Type
hi def link goTypeDecl Keyword
hi def link goDeclType Keyword
" Variable Assignments
if s:HighlightVariableAssignments()
syn match goVarAssign /\v[_.[:alnum:]]+(,\s*[_.[:alnum:]]+)*\ze(\s*([-^+|^\/%&]|\*|\<\<|\>\>|\&\^)?\=[^=])/
hi def link goVarAssign Special
endif
" Variable Declarations
if s:HighlightVariableDeclarations()
syn match goVarDefs /\v\w+(,\s*\w+)*\ze(\s*:\=)/
hi def link goVarDefs Special
endif
" Build Constraints
if s:HighlightBuildConstraints()
syn match goBuildKeyword display contained "+build"
" Highlight the known values of GOOS, GOARCH, and other +build options.
syn keyword goBuildDirectives contained
\ android darwin dragonfly freebsd linux nacl netbsd openbsd plan9
\ solaris windows 386 amd64 amd64p32 arm armbe arm64 arm64be ppc64
\ ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc
\ s390 s390x sparc sparc64 cgo ignore race
" Other words in the build directive are build tags not listed above, so
" avoid highlighting them as comments by using a matchgroup just for the
" start of the comment.
" The rs=s+2 option lets the \s*+build portion be part of the inner region
" instead of the matchgroup so it will be highlighted as a goBuildKeyword.
syn region goBuildComment matchgroup=goBuildCommentStart
\ start="//\s*+build\s"rs=s+2 end="$"
\ contains=goBuildKeyword,goBuildDirectives
hi def link goBuildCommentStart Comment
hi def link goBuildDirectives Type
hi def link goBuildKeyword PreProc
endif
if s:HighlightBuildConstraints() || s:FoldEnable('package_comment')
" One or more line comments that are followed immediately by a "package"
" declaration are treated like package documentation, so these must be
" matched as comments to avoid looking like working build constraints.
" The he, me, and re options let the "package" itself be highlighted by
" the usual rules.
exe 'syn region goPackageComment start=/\v(\/\/.*\n)+\s*package/'
\ . ' end=/\v\n\s*package/he=e-7,me=e-7,re=e-7'
\ . ' contains=@goCommentGroup,@Spell'
\ . (s:FoldEnable('package_comment') ? ' fold' : '')
exe 'syn region goPackageComment start=/\v^\s*\/\*.*\n(.*\n)*\s*\*\/\npackage/'
\ . ' end=/\v\*\/\n\s*package/he=e-7,me=e-7,re=e-7'
\ . ' contains=@goCommentGroup,@Spell'
\ . (s:FoldEnable('package_comment') ? ' fold' : '')
hi def link goPackageComment Comment
endif
" :GoCoverage commands
hi def link goCoverageNormalText Comment
" Search backwards for a global declaration to start processing the syntax.
"syn sync match goSync grouphere NONE /^\(const\|var\|type\|func\)\>/
@ -203,6 +478,9 @@ hi def link goSpaceError Error
" following as a more expensive/less precise workaround.
syn sync minlines=500
let b:current_syntax = 'go'
let b:current_syntax = "go"
let &cpo = s:keepcpo
unlet s:keepcpo
" vim: sw=2 sts=2 et

85
runtime/syntax/gvpr.vim Normal file
View File

@ -0,0 +1,85 @@
" Vim syntax file
" Language: Graphviz program
" Maintainer: Matthew Fernandez <matthew.fernandez@gmail.com>
" Last Change: Tue, 28 Jul 2020 17:20:44 -0700
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn keyword gvArg ARGC ARGV
syn keyword gvBeg BEGIN BEG_G N E END END_G
syn keyword gvFunc
\ graph fstsubg isDirect isStrict isSubg nEdges nNodes nxtsubg subg
\ degreeOf fstnode indegreeOf isNode isSubnode node nxtnode nxtnode_sg
\ outDegreeOf subnode
\ edge edge_sg fstedge fstedge_sg fstin fstin_sg fstout fstout_sg isEdge
\ isEdge_sg isSubedge nxtedge nxtedge_sg nxtin nxtin_sg nxtout nxtout_sg opp
\ subedge
\ freadG fwriteG readG write[] writeG
\ aget aset clone cloneG compOf copy[] copyA delete[] fstAttr getDflt hasAttr
\ induce isAttr isIn kindOf lock[] nxtAttr setDflt
\ canon gsub html index ishtml length llOf match[] rindex split[] sprintf
\ sscanf strcmp sub substr tokens tolower toupper urOf xOf yOf
\ closeF openF print[] printf scanf readL
\ atan2 cos exp log MAX MIN pow sin[] sqrt
\ in[] unset
\ colorx exit[] rand srand system
syn keyword gvCons
\ NULL TV_bfs TV_dfs TV_en TV_flat TV_fwd TV_ne TV_prepostdfs TV_prepostfwd
\ TV_prepostrev TV_postdfs TV_postfwd tv_postrev TV_rev
syn keyword gvType char double float int long unsigned void
\ string
\ edge_t graph_t node_t obj_t
syn match gvVar
\ "\$\(\(F\|G\|NG\|O\|T\|tgtname\|tvedge\|tvnext\|tvroot\|tvtype\)\>\)\?\(\<\)\@!"
syn keyword gvWord break continue else for forr if return switch while
" numbers adapted from c.vim's cNumbers and friends
syn match gvNums transparent "\<\d\|\.\d" contains=gvNumber,gvFloat,gvOctal
syn match gvNumber contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
syn match gvNumber contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
syn match gvOctal contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=gvOctalZero
syn match gvOctalZero contained "\<0"
syn match gvFloat contained "\d\+f"
syn match gvFloat contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
syn match gvFloat contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
syn match gvFloat contained "\d\+e[-+]\=\d\+[fl]\=\>"
syn region gvString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gvFormat,gvSpecial extend
syn region gvString start="'" skip="\\\\\|\\'" end="'" contains=gvFormat,gvSpecial extend
" adapted from c.vim's cFormat for c_no_c99
syn match gvFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
syn match gvSpecial "\\." contained
syn region gvCComment start="//" skip="\\$" end="$" keepend
syn region gvCPPComment start="#" skip="\\$" end="$" keepend
syn region gvCXXComment start="/\*" end="\*/" fold
hi def link gvArg Identifier
hi def link gvBeg Keyword
hi def link gvFloat Number
hi def link gvFunc Identifier
hi def link gvCons Number
hi def link gvNumber Number
hi def link gvType Type
hi def link gvVar Statement
hi def link gvWord Keyword
hi def link gvString String
hi def link gvFormat Special
hi def link gvSpecial Special
hi def link gvCComment Comment
hi def link gvCPPComment Comment
hi def link gvCXXComment Comment
let b:current_syntax = "gvpr"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: Vim help file
" Maintainer: Bram Moolenaar (Bram@vim.org)
" Last Change: 2020 Jul 28
" Last Change: 2021 Jun 13
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@ -76,6 +76,7 @@ syn match helpSpecial "\[line]"
syn match helpSpecial "\[count]"
syn match helpSpecial "\[offset]"
syn match helpSpecial "\[cmd]"
syn match helpNormal "vim9\[cmd]"
syn match helpSpecial "\[num]"
syn match helpSpecial "\[+num]"
syn match helpSpecial "\[-num]"

44
runtime/syntax/jsonc.vim Normal file
View File

@ -0,0 +1,44 @@
" Vim syntax file
" Language: JSONC (JSON with Comments)
" Original Author: Izhak Jakov <izhak724@gmail.com>
" Acknowledgement: Based off of vim-jsonc maintained by Kevin Locke <kevin@kevinlocke.name>
" https://github.com/kevinoid/vim-jsonc
" License: MIT
" Last Change: 2021-07-01
" Ensure syntax is loaded once, unless nested inside another (main) syntax
" For description of main_syntax, see https://stackoverflow.com/q/16164549
if !exists('g:main_syntax')
if exists('b:current_syntax') && b:current_syntax ==# 'jsonc'
finish
endif
let g:main_syntax = 'jsonc'
endif
" Based on vim-json syntax
runtime! syntax/json.vim
" Remove syntax group for comments treated as errors
if !exists("g:vim_json_warnings") || g:vim_json_warnings
syn clear jsonCommentError
endif
syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze\(\_s*\/\/.*\_s*\)*[}\]]/ contains=jsonString
syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze\_s*\/\*\_.*\*\/\_s*[}\]]/ contains=jsonString
syn match jsonTrailingCommaError /\(,\)\+\ze\(\_s*\/\/.*\_s*\)*[}\]]/
syn match jsonTrailingCommaError /\(,\)\+\ze\_s*\/\*\_.*\*\/\_s*[}\]]/
" Define syntax matching comments and their contents
syn keyword jsonCommentTodo FIXME NOTE TBD TODO XXX
syn region jsonLineComment start=+\/\/+ end=+$+ contains=@Spell,jsonCommentTodo keepend
syn region jsonComment start='/\*' end='\*/' contains=@Spell,jsonCommentTodo fold
" Link comment syntax comment to highlighting
hi! def link jsonLineComment Comment
hi! def link jsonComment Comment
" Set/Unset syntax to avoid duplicate inclusion and correctly handle nesting
let b:current_syntax = 'jsonc'
if g:main_syntax ==# 'jsonc'
unlet g:main_syntax
endif

View File

@ -3,7 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainers: Xavier Crégut <xavier.cregut@enseeiht.fr>
" Mario Eusebio <bio@dq.fct.unl.pt>
" Last Change: 2021 Apr 23
" Last Change: 2021 May 20
" Contributors: Tim Chase <tchase@csc.com>,
" Stas Grabois <stsi@vtrails.com>,

View File

@ -3,7 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2019 Jul 13
" Last Change: 2021 Jun 06
" ----------------------------------------------------------------------------
"
" Previous Maintainer: Mirko Nasato
@ -66,7 +66,7 @@ endfunction
com! -nargs=* SynFold call s:run_syntax_fold(<q-args>)
" Not-Top Cluster {{{1
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyParentheses
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyParentheses,@Spell
" Whitespace Errors {{{1
if exists("ruby_space_errors")
@ -92,7 +92,7 @@ if exists("ruby_operators") || exists("ruby_pseudo_operators")
syn match rubyBooleanOperator "\%(\w\|[^\x00-\x7F]\)\@1<!!\|&&\|||"
syn match rubyRangeOperator "\.\.\.\="
syn match rubyAssignmentOperator "=>\@!\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|||=\||=\|%=\|+=\|>>=\|<<=\|\^="
syn match rubyAssignmentOperator "=>\@!" containedin=rubyBlockParameterList " TODO: this is inelegant
syn match rubyAssignmentOperator "=>\@!" contained containedin=rubyBlockParameterList " TODO: this is inelegant
syn match rubyEqualityOperator "===\|==\|!=\|!\~\|=\~"
syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\%(\w\|[^\x00-\x7F]\)[?!]\=\|[]})]\)\@2<=\[" end="]" contains=ALLBUT,@rubyNotTop
@ -134,10 +134,10 @@ syn match rubyCurlyBraceEscape "\\[{}]" contained display
syn match rubyAngleBracketEscape "\\[<>]" contained display
syn match rubySquareBracketEscape "\\[[\]]" contained display
syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained
syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained
syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained
syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained
syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" end=")" transparent contained
syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" end="}" transparent contained
syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" end=">" transparent contained
syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" end="\]" transparent contained
syn cluster rubySingleCharEscape contains=rubyBackslashEscape,rubyQuoteEscape,rubySpaceEscape,rubyParenthesisEscape,rubyCurlyBraceEscape,rubyAngleBracketEscape,rubySquareBracketEscape
syn cluster rubyNestedBrackets contains=rubyNested.\+
@ -193,7 +193,7 @@ SynFold ':' syn region rubySymbol matchgroup=rubySymbolDelimiter start="[]})\"':
syn match rubyCapitalizedMethod "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@="
syn region rubyParentheses start="(" end=")" contains=ALLBUT,@rubyNotTop containedin=rubyBlockParameterList
syn region rubyParentheses start="(" end=")" contains=ALLBUT,@rubyNotTop contained containedin=rubyBlockParameterList
syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\_s*\)\@32<=|" end="|" contains=ALLBUT,@rubyNotTop,@rubyProperOperator
if exists('ruby_global_variable_error')
@ -332,7 +332,7 @@ SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([
syn match rubyAliasDeclaration "[^[:space:];#.()]\+" contained contains=rubySymbol,@rubyGlobalVariable nextgroup=rubyAliasDeclaration2 skipwhite
syn match rubyAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=rubySymbol,@rubyGlobalVariable
syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyConstant,rubyBoolean,rubyPseudoVariable,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable
syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyClassName,rubyScopeOperator nextgroup=rubySuperClassOperator skipwhite skipnl
syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyClassName,rubyScopeOperator nextgroup=rubySuperClassOperator skipwhite
syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyModuleName,rubyScopeOperator
syn match rubyMethodName "\<\%([_[:alpha:]]\|[^\x00-\x7F]\)\%([_[:alnum:]]\|[^\x00-\x7F]\)*[?!=]\=\%([[:alnum:]_.:?!=]\|[^\x00-\x7F]\)\@!" contained containedin=rubyMethodDeclaration
@ -462,7 +462,7 @@ endif
syn match rubyDefinedOperator "\%#=1\<defined?" display
" 1.9-style Hash Keys and Keyword Parameters {{{1
syn match rubySymbol "\%([{(|,]\_s*\)\@<=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]\=::\@!"he=e-1
syn match rubySymbol "\%(\w\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]\=::\@!"he=e-1 contained containedin=rubyBlockParameterList,rubyCurlyBlock
syn match rubySymbol "[]})\"':]\@1<!\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="he=e-1
syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="hs=s+1,he=e-1

View File

@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 8.2 script
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" Last Change: May 20, 2021
" Version: 8.2-03
" Last Change: June 20, 2021
" Version: 8.2-06
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
" Automatically generated keyword lists: {{{1
@ -10,7 +10,7 @@
if exists("b:current_syntax")
finish
endif
let s:keepcpo= &cpo
let s:keepcpo = &cpo
set cpo&vim
" vimTodo: contains common special-notices for comments {{{2
@ -19,12 +19,12 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
syn keyword vimCommand contained a ar[gs] argl[ocal] ba[ll] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoc[onsole] em[enu] endw[hile] export filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] sts[elect] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] v vie[w] vmapc[lear] wa[ll] winp[os] wundo xme xr[estore]
syn keyword vimCommand contained a ar[gs] argl[ocal] ba[ll] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoc[onsole] em[enu] endw[hile] export filt[er] fo[ld] fu[nction] gvim helpt[ags] iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] sts[elect] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] v vie[w] viu[sage] wa[ll] winp[os] wundo xme xr[estore]
syn keyword vimCommand contained ab arga[dd] argu[ment] bad[d] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delep dell diffg[et] dig[raphs] do dsp[lit] echoe[rr] en[dif] ene[w] exu[sage] fin[d] foldc[lose] g h[elp] hi if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes[sages] mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] substitutepattern sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] var vim9[cmd] vne[w] wh[ile] wn[ext] wv[iminfo] xmenu xunme
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] balt bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] deletel delm[arks] diffo[ff] dir doau e[dit] echom[sg] enddef eval f[ile] fina[lly] foldd[oopen] go[to] ha[rdcopy] hid[e] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] substituterepeat sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type unl ve[rsion] vim9s[cript] vs[plit] win[size] wp[revious] x[it] xnoreme xunmenu
syn keyword vimCommand contained abo[veleft] argdo au bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletep delp diffp[atch] disa[ssemble] doaut ea echon endf[unction] ex files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] sun[hide] sy tN[ext] tabe[dit] tabnew tc[l] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unlo[ckvar] verb[ose] vim[grep] wN[ext] winc[md] wq xa[ll] xnoremenu xwininfo
syn keyword vimCommand contained addd arge[dit] bN[ext] bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletl dep diffpu[t] dj[ump] dp earlier el[se] endfo[r] exi[t] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] leg[acy] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp stj[ump] sunme syn ta[g] tabf[ind] tabo[nly] tcd tf[irst] tln tmapc[lear] try una[bbreviate] uns[ilent] vert[ical] vimgrepa[dd] w[rite] windo wqa[ll] xmapc[lear] xprop y[ank]
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec elsei[f] endt[ry] exp filetype fix[del] for gui helpg[rep] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stopi[nsert] sunmenu sync tab tabfir[st] tabp[revious] tch[dir] th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] up[date] vi[sual] viu[sage]
syn keyword vimCommand contained abo[veleft] argdo au bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletep delp diffp[atch] disa[ssemble] doaut ea echon endf[unction] ex files fini[sh] folddoc[losed] gr[ep] helpc[lose] his[tory] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] sun[hide] sy tN[ext] tabe[dit] tabnew tc[d] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unlo[ckvar] verb[ose] vim[grep] wN[ext] winc[md] wq xa[ll] xnoremenu xwininfo
syn keyword vimCommand contained addd arge[dit] bN[ext] bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletl dep diffpu[t] dj[ump] dp earlier el[se] endfo[r] exi[t] filet fir[st] foldo[pen] grepa[dd] helpf[ind] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] leg[acy] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp stj[ump] sunme syn ta[g] tabf[ind] tabo[nly] tch[dir] tf[irst] tln tmapc[lear] try una[bbreviate] uns[ilent] vert[ical] vimgrepa[dd] w[rite] windo wqa[ll] xmapc[lear] xprop y[ank]
syn keyword vimCommand contained al[l] argg[lobal] b[uffer] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec elsei[f] endt[ry] exp filetype fix[del] for gui helpg[rep] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stopi[nsert] sunmenu sync tab tabfir[st] tabp[revious] tcl th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] up[date] vi[sual]
syn match vimCommand contained "\<z[-+^.=]\=\>"
syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Winbar XMLent XMLns
@ -78,12 +78,12 @@ syn match vimHLGroup contained "Conceal"
syn case match
" Function Names {{{2
syn keyword vimFuncName contained abs argc assert_equal assert_match atan browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy echoraw eventhandler exp feedkeys findfile fmod foldlevel funcref getbufline getcharpos getcmdwintype getenv getftype getmarklist getqflist gettabvar getwinpos glob2regpat hasmapto hlexists index inputsave isdirectory job_getchannel job_stop json_encode line listener_flush luaeval mapset matchdelete matchstr mkdir or popup_clear popup_filter_yesno popup_hide popup_notification prevnonblank prompt_setprompt prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_ignore_error test_null_job test_override test_srand_seed timer_start tr undofile visualmode win_execute winheight winnr win_splitmove
syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete empty executable expand filereadable flatten fnameescape foldtext function getbufvar getcharsearch getcompletion getfontname getimstatus getmatches getreg gettabwinvar getwinposx globpath histadd hlID input inputsecret isinf job_info join keys line2byte listener_remove map match matchend matchstrpos mode pathshorten popup_close popup_findinfo popup_list popup_setoptions printf prop_add prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_null_blob test_null_list test_refcount test_unknown timer_stop trim undotree wildmenumode win_findbuf win_id2tabwin winrestcmd winwidth
syn keyword vimFuncName contained add arglistid assert_exception assert_notequal balloon_gettext bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline environ execute expandcmd filewritable flattennew fnamemodify foldtextresult garbagecollect getchangelist getcmdline getcurpos getfperm getjumplist getmousepos getreginfo gettagstack getwinposy has histdel hostname inputdialog insert islocked job_setoptions js_decode len lispindent localtime maparg matchadd matchfuzzy max mzeval perleval popup_create popup_findpreview popup_locate popup_settext prompt_getprompt prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_null_channel test_null_partial test_scrollbar test_void timer_stopall trunc uniq winbufnr win_getid win_id2win winrestview wordcount
syn keyword vimFuncName contained and argv assert_fails assert_notmatch balloon_show buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype escape exepath extend filter float2nr foldclosed foreground get getchar getcmdpos getcursorcharpos getfsize getline getpid getregtype gettext getwinvar has_key histget iconv inputlist interrupt isnan job_start js_encode libcall list2str log mapcheck matchaddpos matchfuzzypos menu_info nextnonblank popup_atcursor popup_dialog popup_getoptions popup_menu popup_show prompt_setcallback prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_dict test_null_string test_setmouse timer_info tolower type values wincol win_gettype winlayout winsaveview writefile
syn keyword vimFuncName contained append asin assert_false assert_report balloon_split bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler eval exists extendnew finddir floor foldclosedend fullcommand getbufinfo getcharmod getcmdtype getcwd getftime getloclist getpos gettabinfo getwininfo glob haslocaldir histnr indent inputrestore invert items job_status json_decode libcallnr listener_add log10 mapnew matcharg matchlist min nr2char popup_beval popup_filter_menu popup_getpos popup_move pow prompt_setinterrupt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_function test_option_not_set test_settime timer_pause toupper typename virtcol windowsversion win_gotoid winline win_screenpos xor
syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID
syn keyword vimFuncName contained abs argc assert_equal assert_match atan browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy echoraw executable expand filereadable flatten fnameescape foldtext function getbufvar getcharsearch getcmdwintype getenv getftype getmarklist getqflist gettabvar getwinpos glob2regpat hasmapto hlexists index inputsave isdirectory job_getchannel job_stop json_encode line listener_flush luaeval mapset matchdelete matchstr mkdir or popup_clear popup_filter_yesno popup_hide popup_notification prevnonblank prompt_setprompt prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_ignore_error test_null_job test_override test_srand_seed timer_start tr undofile visualmode win_execute winheight winnr win_splitmove
syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete empty execute expandcmd filewritable flattennew fnamemodify foldtextresult garbagecollect getchangelist getcharstr getcompletion getfontname getimstatus getmatches getreg gettabwinvar getwinposx globpath histadd hlID input inputsecret isinf job_info join keys line2byte listener_remove map match matchend matchstrpos mode pathshorten popup_close popup_findinfo popup_list popup_setoptions printf prop_add prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_null_blob test_null_list test_refcount test_unknown timer_stop trim undotree wildmenumode win_findbuf win_id2tabwin winrestcmd winwidth
syn keyword vimFuncName contained add arglistid assert_exception assert_notequal balloon_gettext bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline environ exepath extend filter float2nr foldclosed foreground get getchar getcmdline getcurpos getfperm getjumplist getmousepos getreginfo gettagstack getwinposy has histdel hostname inputdialog insert islocked job_setoptions js_decode len lispindent localtime maparg matchadd matchfuzzy max mzeval perleval popup_create popup_findpreview popup_locate popup_settext prompt_getprompt prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_null_channel test_null_partial test_scrollbar test_void timer_stopall trunc uniq winbufnr win_getid win_id2win winrestview wordcount
syn keyword vimFuncName contained and argv assert_fails assert_notmatch balloon_show buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype escape exists extendnew finddir floor foldclosedend fullcommand getbufinfo getcharmod getcmdpos getcursorcharpos getfsize getline getpid getregtype gettext getwinvar has_key histget iconv inputlist interrupt isnan job_start js_encode libcall list2str log mapcheck matchaddpos matchfuzzypos menu_info nextnonblank popup_atcursor popup_dialog popup_getoptions popup_menu popup_show prompt_setcallback prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_dict test_null_string test_setmouse timer_info tolower type values wincol win_gettype winlayout winsaveview writefile
syn keyword vimFuncName contained append asin assert_false assert_report balloon_split bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler eval exp feedkeys findfile fmod foldlevel funcref getbufline getcharpos getcmdtype getcwd getftime getloclist getpos gettabinfo getwininfo glob haslocaldir histnr indent inputrestore invert items job_status json_decode libcallnr listener_add log10 mapnew matcharg matchlist min nr2char popup_beval popup_filter_menu popup_getpos popup_move pow prompt_setinterrupt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_function test_option_not_set test_settime timer_pause toupper typename virtcol windowsversion win_gotoid winline win_screenpos xor
syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID eventhandler
"--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
@ -227,7 +227,7 @@ syn keyword vimAugroupKey contained aug[roup]
" Operators: {{{2
" =========
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue,vim9Comment
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimType,vimRegister,vimContinue,vim9Comment
syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "||\|&&\|[-+.!]" skipwhite nextgroup=vimString,vimSpecFile
@ -241,12 +241,13 @@ endif
" =========
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimEnvvar,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
syn match vimFunction "\<\(fu\%[nction]\|def\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
syn match vimFunction "\<\(fu\%[nction]\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
syn match vimFunction "\<def!\=\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
else
syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
endif
syn match vimFuncVar contained "a:\(\K\k*\|\d\+\)"
syn match vimFuncSID contained "\c<sid>\|\<s:"
@ -256,6 +257,9 @@ syn match vimFuncBlank contained "\s\+"
syn keyword vimPattern contained start skip end
" vimTypes : new for vim9
syn match vimType ":\s*\zs\<\(bool\|number\|float\|string\|blob\|list<\|dict<\|job\|channel\|func\)\>"
" Special Filenames, Modifiers, Extension Removal: {{{2
" ===============================================
syn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod,vimSubst
@ -384,7 +388,7 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
" Set command and associated set-options (vimOptions) with comment {{{2
syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" oneline keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vim9Comment,vimSetString,vimSetMod
syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\.\n\@!" end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vim9Comment,vimSetString,vimSetMod
syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]"me=e-1 end="$" contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar
syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
syn match vimSetSep contained "[,:]"
@ -419,7 +423,7 @@ syn case match
" Maps: {{{2
" ====
syn match vimMap "\<map\>!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs
syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] tno[remap] tm[ap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] tno[remap] tm[ap] vm[ap] vmapc[lear] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
syn keyword vimMap mapc[lear] smapc[lear]
syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] tunma[p] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs
@ -1002,6 +1006,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimSyntax vimCommand
hi def link vimSynType vimSpecial
hi def link vimTodo Todo
hi def link vimType Type
hi def link vimUnmap vimMap
hi def link vimUserAttrbCmpltFunc Special
hi def link vimUserAttrbCmplt vimSpecial

View File

@ -19,7 +19,7 @@ Name of tags file to create. (default is 'tags')
.IP "\fB-s <shell>\fP"
The name of the shell used by the script(s). By default,
\fBshtags\fP tries to work out which is the appropriate shell for each
file individually by looking at the first line of each file. This wont
file individually by looking at the first line of each file. This won't
work however, if the script starts as a bourne shell script and tries
to be clever about starting the shell it really wants.
.b

View File

@ -195,6 +195,13 @@ func! BuildWidthTable(pattern, tableName)
let end = -1
let ranges = []
let dataidx = 0
" Account for indentation differences between ambiguous and doublewidth
" table in mbyte.c
if a:pattern == 'A'
let spc = ' '
else
let spc = "\t"
endif
for p in s:widthprops
if p[1][0] =~ a:pattern
if p[0] =~ '\.\.'
@ -229,7 +236,7 @@ func! BuildWidthTable(pattern, tableName)
else
if start >= 0
" produce previous range
call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
call add(ranges, printf("%s{0x%04x, 0x%04x},", spc, start, end))
if a:pattern == 'A'
call add(s:ambitable, [start, end])
else
@ -243,7 +250,7 @@ func! BuildWidthTable(pattern, tableName)
endif
endfor
if start >= 0
call add(ranges, printf("\t{0x%04x, 0x%04x},", start, end))
call add(ranges, printf("%s{0x%04x, 0x%04x},", spc, start, end))
if a:pattern == 'A'
call add(s:ambitable, [start, end])
else
@ -254,11 +261,20 @@ func! BuildWidthTable(pattern, tableName)
" New buffer to put the result in.
new
exe "file " . a:tableName
call setline(1, " static struct interval " . a:tableName . "[] =")
call setline(2, " {")
if a:pattern == 'A'
call setline(1, "static struct interval " . a:tableName . "[] =")
call setline(2, "{")
else
call setline(1, " static struct interval " . a:tableName . "[] =")
call setline(2, " {")
endif
call append('$', ranges)
call setline('$', getline('$')[:-2]) " remove last comma
call setline(line('$') + 1, " };")
if a:pattern == 'A'
call setline(line('$') + 1, "};")
else
call setline(line('$') + 1, " };")
endif
wincmd p
endfunc

View File

@ -509,7 +509,7 @@ SendEventProc(
/*
* Didn't recognize this thing. Just skip through the next
* null character and try again.
* Also, throw away commands that we cant process anyway.
* Also, throw away commands that we can't process anyway.
*/
while (*p != 0)

View File

@ -5,6 +5,7 @@
Name[de]=Vim
Name[eo]=Vim
Name[fr]=Vim
Name[it]=Vim
Name[ru]=Vim
Name[sr]=Vim
Name[tr]=Vim
@ -13,6 +14,7 @@ Name=Vim
GenericName[de]=Texteditor
GenericName[eo]=Tekstoredaktilo
GenericName[fr]=Éditeur de texte
GenericName[it]=Editor di testi
GenericName[ja]=テキストエディタ
GenericName[ru]=Текстовый редактор
GenericName[sr]=Едитор текст
@ -22,6 +24,7 @@ GenericName=Text Editor
Comment[de]=Textdateien bearbeiten
Comment[eo]=Redakti tekstajn dosierojn
Comment[fr]=Éditer des fichiers texte
Comment[it]=Edita file di testo
Comment[ja]=テキストファイルを編集します
Comment[ru]=Редактирование текстовых файлов
Comment[sr]=Уређујте текст фајлове
@ -60,7 +63,6 @@ Comment[hr]=Uređivanje tekstualne datoteke
Comment[hu]=Szövegfájlok szerkesztése
Comment[id]=Edit file teks
Comment[is]=Vinna með textaskrár
Comment[it]=Modifica file di testo
Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
Comment[ko]=텍스트 파일을 편집합니다
Comment[lt]=Redaguoti tekstines bylas
@ -102,6 +104,7 @@ Type=Application
Keywords[de]=Text;Editor;
Keywords[eo]=Teksto;redaktilo;
Keywords[fr]=Texte;éditeur;
Keywords[it]=Testo;editor;
Keywords[ja]=テキスト;エディタ;
Keywords[ru]=текст;текстовый редактор;
Keywords[sr]=Текст;едитор;
@ -111,7 +114,9 @@ Keywords=Text;editor;
Icon[de]=gvim
Icon[eo]=gvim
Icon[fr]=gvim
Icon[it]=gvim
Icon[ru]=gvim
Icon[sr]=gvim
Icon=gvim
Categories=Utility;TextEditor;
StartupNotify=false

View File

@ -35,6 +35,15 @@ UINT cbFiles = 0;
* enough */
#define BUFSIZE 1100
// The "Edit with Vim" shell extension provides these choices when
// a new instance of Gvim is selected:
// - use tabpages
// - enable diff mode
// - none of the above
#define EDIT_WITH_VIM_USE_TABPAGES (2)
#define EDIT_WITH_VIM_IN_DIFF_MODE (1)
#define EDIT_WITH_VIM_NO_OPTIONS (0)
//
// Get the name of the Gvim executable to use, with the path.
// When "runtime" is non-zero, we were called to find the runtime directory.
@ -613,7 +622,7 @@ STDMETHODIMP CShellExt::QueryContextMenu(HMENU hMenu,
if (cbFiles > 1)
{
mii.wID = idCmd++;
mii.dwTypeData = _("Edit with &multiple Vims");
mii.dwTypeData = _("Edit with Vim using &tabpages");
mii.cch = lstrlen(mii.dwTypeData);
InsertMenuItem(hMenu, indexMenu++, TRUE, &mii);
@ -726,6 +735,7 @@ STDMETHODIMP CShellExt::QueryContextMenu(HMENU hMenu,
STDMETHODIMP CShellExt::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi)
{
HRESULT hr = E_INVALIDARG;
int gvimExtraOptions;
// If HIWORD(lpcmi->lpVerb) then we have been called programmatically
// and lpVerb is a command that should be invoked. Otherwise, the shell
@ -750,29 +760,28 @@ STDMETHODIMP CShellExt::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi)
switch (idCmd)
{
case 0:
hr = InvokeGvim(lpcmi->hwnd,
lpcmi->lpDirectory,
lpcmi->lpVerb,
lpcmi->lpParameters,
lpcmi->nShow);
gvimExtraOptions = EDIT_WITH_VIM_USE_TABPAGES;
break;
case 1:
hr = InvokeSingleGvim(lpcmi->hwnd,
lpcmi->lpDirectory,
lpcmi->lpVerb,
lpcmi->lpParameters,
lpcmi->nShow,
0);
gvimExtraOptions = EDIT_WITH_VIM_NO_OPTIONS;
break;
case 2:
hr = InvokeSingleGvim(lpcmi->hwnd,
lpcmi->lpDirectory,
lpcmi->lpVerb,
lpcmi->lpParameters,
lpcmi->nShow,
1);
gvimExtraOptions = EDIT_WITH_VIM_IN_DIFF_MODE;
break;
default:
// If execution reaches this point we likely have an
// inconsistency between the code that setup the menus
// and this code that determines what the user
// selected. This should be detected and fixed during
// development.
return E_FAIL;
}
hr = InvokeSingleGvim(lpcmi->hwnd,
lpcmi->lpDirectory,
lpcmi->lpVerb,
lpcmi->lpParameters,
lpcmi->nShow,
gvimExtraOptions);
}
}
return hr;
@ -873,82 +882,13 @@ searchpath(char *name)
return (char *)"";
}
STDMETHODIMP CShellExt::InvokeGvim(HWND hParent,
LPCSTR /* pszWorkingDir */,
LPCSTR /* pszCmd */,
LPCSTR /* pszParam */,
int /* iShowCmd */)
{
wchar_t m_szFileUserClickedOn[BUFSIZE];
wchar_t cmdStrW[BUFSIZE];
UINT i;
for (i = 0; i < cbFiles; i++)
{
DragQueryFileW((HDROP)medium.hGlobal,
i,
m_szFileUserClickedOn,
sizeof(m_szFileUserClickedOn));
getGvimInvocationW(cmdStrW);
wcscat(cmdStrW, L" \"");
if ((wcslen(cmdStrW) + wcslen(m_szFileUserClickedOn) + 2) < BUFSIZE)
{
wcscat(cmdStrW, m_szFileUserClickedOn);
wcscat(cmdStrW, L"\"");
STARTUPINFOW si;
PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
// Start the child process.
if (!CreateProcessW(NULL, // No module name (use command line).
cmdStrW, // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi) // Pointer to PROCESS_INFORMATION structure.
)
{
MessageBox(
hParent,
_("Error creating process: Check if gvim is in your path!"),
_("gvimext.dll error"),
MB_OK);
}
else
{
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
}
}
else
{
MessageBox(
hParent,
_("Path length too long!"),
_("gvimext.dll error"),
MB_OK);
}
}
return NOERROR;
}
STDMETHODIMP CShellExt::InvokeSingleGvim(HWND hParent,
LPCSTR /* pszWorkingDir */,
LPCSTR /* pszCmd */,
LPCSTR /* pszParam */,
int /* iShowCmd */,
int useDiff)
int gvimExtraOptions)
{
wchar_t m_szFileUserClickedOn[BUFSIZE];
wchar_t *cmdStrW;
@ -962,8 +902,10 @@ STDMETHODIMP CShellExt::InvokeSingleGvim(HWND hParent,
return E_FAIL;
getGvimInvocationW(cmdStrW);
if (useDiff)
if (gvimExtraOptions == EDIT_WITH_VIM_IN_DIFF_MODE)
wcscat(cmdStrW, L" -d");
else if (gvimExtraOptions == EDIT_WITH_VIM_USE_TABPAGES)
wcscat(cmdStrW, L" -p");
for (i = 0; i < cbFiles; i++)
{
DragQueryFileW((HDROP)medium.hGlobal,

View File

@ -129,18 +129,12 @@ protected:
int iShowCmd,
int idHWnd);
STDMETHODIMP InvokeGvim(HWND hParent,
LPCSTR pszWorkingDir,
LPCSTR pszCmd,
LPCSTR pszParam,
int iShowCmd);
STDMETHODIMP InvokeSingleGvim(HWND hParent,
LPCSTR pszWorkingDir,
LPCSTR pszCmd,
LPCSTR pszParam,
int iShowCmd,
int useDiff);
int gvimExtraOptions);
public:
int m_cntOfHWnd;

View File

@ -284,7 +284,8 @@ open the window from the start menu, MSYS2 64 bit / MSYS2 MSYS.
Execute:
$ pacman -Syu
And restart MSYS2 console (select "MSYS2 MSYS" icon from the Start Menu).
And restart MSYS2 console (select "MSYS2 MSYS 32-Bit" icon from the Start
Menu for building 32 bit Vim, otherwise select "MSYS2 MinGW 64-Bit").
Then execute:
$ pacman -Su
@ -321,6 +322,9 @@ MSYS2 has its own git package, and you can also install it via pacman:
$ pacman -S git
For enabling libsodium support, you also need to install the package
$ pacman -S mingw-w64-x86_64-libsodium
2.3. Keep the build environment up-to-date

View File

@ -162,6 +162,7 @@ SRC += \
spell.c \
spellfile.c \
spellsuggest.c \
strings.c \
syntax.c \
tag.c \
term.c \

View File

@ -41,6 +41,9 @@ DEBUG=no
# set to yes to measure code coverage
COVERAGE=no
# better encryption support using libsodium
#SODIUM=yes
# set to SIZE for size, SPEED for speed, MAXSPEED for maximum optimization
OPTIMIZE=MAXSPEED
@ -517,6 +520,10 @@ CXXFLAGS = -std=gnu++11
WINDRES_FLAGS =
EXTRA_LIBS =
ifdef SODIUM
DEFINES += -DHAVE_SODIUM
endif
ifdef GETTEXT
DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
GETTEXTINCLUDE = $(GETTEXT)/include
@ -660,6 +667,10 @@ DEFINES += -DFEAT_DIRECTX_COLOR_EMOJI
endif
endif
ifeq ($(SODIUM),yes)
SODIUMLIB = -lsodium
endif
# Only allow XPM for a GUI build.
ifeq (yes, $(GUI))
@ -798,6 +809,7 @@ OBJ = \
$(OUTDIR)/spell.o \
$(OUTDIR)/spellfile.o \
$(OUTDIR)/spellsuggest.o \
$(OUTDIR)/strings.o \
$(OUTDIR)/syntax.o \
$(OUTDIR)/tag.o \
$(OUTDIR)/term.o \
@ -1064,7 +1076,7 @@ $(EXEOBJC): | $(OUTDIR)
ifeq ($(VIMDLL),yes)
$(TARGET): $(OBJ)
$(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid -lgdi32 $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
$(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid -lgdi32 $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB) $(SODIUMLIB)
$(GVIMEXE): $(EXEOBJG) $(VIMDLLBASE).dll
$(CC) -L. $(EXELFLAGS) -mwindows -o $@ $(EXEOBJG) -l$(VIMDLLBASE)
@ -1073,7 +1085,7 @@ $(VIMEXE): $(EXEOBJC) $(VIMDLLBASE).dll
$(CC) -L. $(EXELFLAGS) -o $@ $(EXEOBJC) -l$(VIMDLLBASE)
else
$(TARGET): $(OBJ)
$(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB)
$(LINK) $(CFLAGS) $(LFLAGS) -o $@ $(OBJ) $(LIB) -lole32 -luuid $(LUA_LIB) $(MZSCHEME_LIBDIR) $(MZSCHEME_LIB) $(PYTHONLIB) $(PYTHON3LIB) $(RUBYLIB) $(SODIUMLIB)
endif
upx: exes

View File

@ -41,6 +41,13 @@
#
# Sound support: SOUND=yes (default is yes)
#
# Sodium support: SODIUM=[Path to Sodium directory]
# Dynamic built with libsodium
# You need to install the msvc package from
# https://download.libsodium.org/libsodium/releases/
# and package the libsodium.dll with Vim
#
#
# DLL support (EXPERIMENTAL): VIMDLL=yes (default is no)
# Creates vim{32,64}.dll, and stub gvim.exe and vim.exe.
# The shared codes between the GUI and the console are built into
@ -372,6 +379,26 @@ SOUND = no
! endif
!endif
!ifndef SODIUM
SODIUM = no
!endif
!if "$(SODIUM)" != "no"
! if "$(CPU)" == "AMD64"
SOD_LIB = $(SODIUM)\x64\Release\v140\dynamic
! elseif "$(CPU)" == "i386"
SOD_LIB = $(SODIUM)\Win32\Release\v140\dynamic
! else
SODIUM = no
! endif
!endif
!if "$(SODIUM)" != "no"
SOD_INC = /I "$(SODIUM)\include"
SOD_DEFS = -DHAVE_SODIUM
SOD_LIB = $(SOD_LIB)\libsodium.lib
!endif
!ifndef NETBEANS
NETBEANS = $(GUI)
!endif
@ -491,7 +518,7 @@ CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
CFLAGS = -c /W3 /GF /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
$(CSCOPE_DEFS) $(TERM_DEFS) $(SOUND_DEFS) $(NETBEANS_DEFS) $(CHANNEL_DEFS) \
$(NBDEBUG_DEFS) $(XPM_DEFS) \
$(NBDEBUG_DEFS) $(XPM_DEFS) $(SOD_DEFS) $(SOD_INC) \
$(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
#>>>>> end of choices
@ -792,6 +819,7 @@ OBJ = \
$(OUTDIR)\spell.obj \
$(OUTDIR)\spellfile.obj \
$(OUTDIR)\spellsuggest.obj \
$(OUTDIR)\strings.obj \
$(OUTDIR)\syntax.obj \
$(OUTDIR)\tag.obj \
$(OUTDIR)\term.obj \
@ -1282,7 +1310,7 @@ conflags = $(conflags) /map /mapinfo:lines
LINKARGS1 = $(linkdebug) $(conflags)
LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) user32.lib \
$(LUA_LIB) $(MZSCHEME_LIB) $(PERL_LIB) $(PYTHON_LIB) $(PYTHON3_LIB) $(RUBY_LIB) \
$(TCL_LIB) $(SOUND_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(LINK_PDB)
$(TCL_LIB) $(SOUND_LIB) $(NETBEANS_LIB) $(XPM_LIB) $(SOD_LIB) $(LINK_PDB)
# Report link time code generation progress if used.
!ifdef NODEBUG
@ -1765,6 +1793,8 @@ $(OUTDIR)/spellfile.obj: $(OUTDIR) spellfile.c $(INCL)
$(OUTDIR)/spellsuggest.obj: $(OUTDIR) spellsuggest.c $(INCL)
$(OUTDIR)/strings.obj: $(OUTDIR) strings.c $(INCL)
$(OUTDIR)/syntax.obj: $(OUTDIR) syntax.c $(INCL)
$(OUTDIR)/tag.obj: $(OUTDIR) tag.c $(INCL)
@ -1985,6 +2015,7 @@ proto.h: \
proto/spell.pro \
proto/spellfile.pro \
proto/spellsuggest.pro \
proto/strings.pro \
proto/syntax.pro \
proto/tag.pro \
proto/term.pro \

View File

@ -393,6 +393,7 @@ SRC = \
spell.c \
spellfile.c \
spellsuggest.c \
strings.c \
syntax.c \
tag.c \
term.c \
@ -512,6 +513,7 @@ OBJ = \
spell.obj \
spellfile.obj \
spellsuggest.obj \
strings.obj \
syntax.obj \
tag.obj \
term.obj \
@ -1048,6 +1050,10 @@ spellsuggest.obj : spellsuggest.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h errors.h globals.h
strings.obj : strings.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h option.h structs.h \
regexp.h gui.h beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
proto.h errors.h globals.h
syntax.obj : syntax.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \

View File

@ -1677,6 +1677,7 @@ BASIC_SRC = \
spell.c \
spellfile.c \
spellsuggest.c \
strings.c \
syntax.c \
tag.c \
term.c \
@ -1828,6 +1829,7 @@ OBJ_COMMON = \
objects/spell.o \
objects/spellfile.o \
objects/spellsuggest.o \
objects/strings.o \
objects/syntax.o \
objects/tag.o \
objects/term.o \
@ -2011,6 +2013,7 @@ PRO_AUTO = \
spell.pro \
spellfile.pro \
spellsuggest.pro \
strings.pro \
syntax.pro \
tag.pro \
term.pro \
@ -3516,6 +3519,9 @@ objects/spellfile.o: spellfile.c
objects/spellsuggest.o: spellsuggest.c
$(CCC) -o $@ spellsuggest.c
objects/strings.o: strings.c
$(CCC) -o $@ strings.c
objects/syntax.o: syntax.c
$(CCC) -o $@ syntax.c
@ -4049,6 +4055,10 @@ objects/spellsuggest.o: spellsuggest.c vim.h protodef.h auto/config.h feature.h
os_unix.h auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h errors.h globals.h
objects/strings.o: strings.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h errors.h globals.h
objects/syntax.o: syntax.c vim.h protodef.h auto/config.h feature.h os_unix.h \
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \

View File

@ -80,6 +80,7 @@ sign.c | signs
spell.c | spell checking core
spellfile.c | spell file handling
spellsuggest.c | spell correction suggestions
strings.c | string manipulation functions
syntax.c | syntax and other highlighting
tag.c | tags
term.c | terminal handling, termcap codes

View File

@ -213,7 +213,7 @@ Troubleshooting
Cause: You can't delete an item you once added to the add-ins
list box.
Explanation: M$ just didn't put a 'delete' button in the dialog box.
Unfortunately there is no DEL key accellerator as well...
Unfortunately there is no DEL key accelerator as well...
Workaround: You can't kill it, but you can knock it out:
1. Uncheck the check box in front of 'Vim Developer Studio
Add-in'.

View File

@ -148,7 +148,7 @@ alist_set(
return;
alist_clear(al);
if (ga_grow(&al->al_ga, count) == OK)
if (GA_GROW_OK(&al->al_ga, count))
{
for (i = 0; i < count; ++i)
{
@ -355,7 +355,7 @@ alist_add_list(
int old_argcount = ARGCOUNT;
if (check_arglist_locked() != FAIL
&& ga_grow(&ALIST(curwin)->al_ga, count) == OK)
&& GA_GROW_OK(&ALIST(curwin)->al_ga, count))
{
if (after < 0)
after = 0;
@ -599,7 +599,7 @@ ex_args(exarg_T *eap)
garray_T *gap = &curwin->w_alist->al_ga;
// ":argslocal": make a local copy of the global argument list.
if (ga_grow(gap, GARGCOUNT) == OK)
if (GA_GROW_OK(gap, GARGCOUNT))
for (i = 0; i < GARGCOUNT; ++i)
if (GARGLIST[i].ae_fname != NULL)
{
@ -832,7 +832,7 @@ ex_argdelete(exarg_T *eap)
{
// Don't give an error for ":%argdel" if the list is empty.
if (eap->line1 != 1 || eap->line2 != 0)
emsg(_(e_invrange));
emsg(_(e_invalid_range));
}
else
{
@ -920,7 +920,7 @@ do_arg_all(
#ifdef FEAT_CMDWIN
if (cmdwin_type != 0)
{
emsg(_(e_cmdwin));
emsg(_(e_invalid_in_cmdline_window));
return;
}
#endif
@ -1271,6 +1271,9 @@ f_argc(typval_T *argvars, typval_T *rettv)
{
win_T *wp;
if (in_vim9script() && check_for_opt_number_arg(argvars, 0) == FAIL)
return;
if (argvars[0].v_type == VAR_UNKNOWN)
// use the current window
rettv->vval.v_number = ARGCOUNT;
@ -1306,6 +1309,12 @@ f_arglistid(typval_T *argvars, typval_T *rettv)
{
win_T *wp;
if (in_vim9script()
&& (check_for_opt_number_arg(argvars, 0) == FAIL
|| (argvars[0].v_type != VAR_UNKNOWN
&& check_for_opt_number_arg(argvars, 1) == FAIL)))
return;
rettv->vval.v_number = -1;
wp = find_tabwin(&argvars[0], &argvars[1], NULL);
if (wp != NULL)
@ -1336,6 +1345,12 @@ f_argv(typval_T *argvars, typval_T *rettv)
aentry_T *arglist = NULL;
int argcount = -1;
if (in_vim9script()
&& (check_for_opt_number_arg(argvars, 0) == FAIL
|| (argvars[0].v_type != VAR_UNKNOWN
&& check_for_opt_number_arg(argvars, 1) == FAIL)))
return;
if (argvars[0].v_type != VAR_UNKNOWN)
{
if (argvars[1].v_type == VAR_UNKNOWN)

71
src/auto/configure vendored
View File

@ -839,6 +839,7 @@ with_motif_lib
with_tlib
enable_largefile
enable_canberra
enable_libsodium
enable_acl
enable_gpm
enable_sysmouse
@ -1513,6 +1514,7 @@ Optional Features:
--disable-desktop-database-update update disabled
--disable-largefile omit support for large files
--disable-canberra Do not use libcanberra.
--disable-libsodium Do not use libsodium.
--disable-acl No check for ACL support.
--disable-gpm Don't use gpm (Linux mouse daemon).
--disable-sysmouse Don't use sysmouse (mouse in *BSD console).
@ -6755,7 +6757,10 @@ else
vi_cv_path_python3_conf=
config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
if test "x$d" = "x"; then
d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
fi
if test -d "$d" && test -f "$d/config.c"; then
vi_cv_path_python3_conf="$d"
else
@ -13002,6 +13007,70 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
$as_echo_n "checking --enable-libsodium argument... " >&6; }
# Check whether --enable-libsodium was given.
if test "${enable_libsodium+set}" = set; then :
enableval=$enable_libsodium;
else
enable_libsodium="maybe"
fi
if test "$enable_libsodium" = "maybe"; then
if test "$features" = "big" -o "$features" = "huge"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
$as_echo "Defaulting to yes" >&6; }
enable_libsodium="yes"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
$as_echo "Defaulting to no" >&6; }
enable_libsodium="no"
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
$as_echo "$enable_libsodium" >&6; }
fi
if test "$enable_libsodium" = "yes"; then
if test "x$PKG_CONFIG" != "xno"; then
libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
fi
if test "x$libsodium_lib" = "x"; then
libsodium_lib=-lsodium
libsodium_cflags=
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
$as_echo_n "checking for libsodium... " >&6; }
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $libsodium_cflags"
LIBS="$LIBS $libsodium_lib"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
# include <sodium.h>
int
main ()
{
printf("%d", sodium_init());
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; $as_echo "#define HAVE_SODIUM 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
$as_echo "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
$as_echo_n "checking for st_blksize... " >&6; }

View File

@ -258,7 +258,7 @@ static int au_need_clean = FALSE; // need to delete marked patterns
static char_u *event_nr2name(event_T event);
static int au_get_grouparg(char_u **argp);
static int do_autocmd_event(event_T event, char_u *pat, int once, int nested, char_u *cmd, int forceit, int group);
static int do_autocmd_event(event_T event, char_u *pat, int once, int nested, char_u *cmd, int forceit, int group, int flags);
static int apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io, int force, int group, buf_T *buf, exarg_T *eap);
static void auto_next_pat(AutoPatCmd *apc, int stop_at_last);
static int au_find_group(char_u *name);
@ -615,7 +615,7 @@ free_all_autocmds(void)
for (current_augroup = -1; current_augroup < augroups.ga_len;
++current_augroup)
do_autocmd((char_u *)"", TRUE);
do_autocmd(NULL, (char_u *)"", TRUE);
for (i = 0; i < augroups.ga_len; ++i)
{
@ -823,20 +823,23 @@ au_event_restore(char_u *old_ei)
* :autocmd * *.c show all autocommands for *.c files.
*
* Mostly a {group} argument can optionally appear before <event>.
* "eap" can be NULL.
*/
void
do_autocmd(char_u *arg_in, int forceit)
do_autocmd(exarg_T *eap, char_u *arg_in, int forceit)
{
char_u *arg = arg_in;
char_u *pat;
char_u *envpat = NULL;
char_u *cmd;
int cmd_need_free = FALSE;
event_T event;
int need_free = FALSE;
char_u *tofree = NULL;
int nested = FALSE;
int once = FALSE;
int group;
int i;
int flags = 0;
if (*arg == '|')
{
@ -935,10 +938,14 @@ do_autocmd(char_u *arg_in, int forceit)
*/
if (*cmd != NUL)
{
if (eap != NULL)
// Read a {} block if it follows.
cmd = may_get_cmd_block(eap, cmd, &tofree, &flags);
cmd = expand_sfile(cmd);
if (cmd == NULL) // some error
return;
need_free = TRUE;
cmd_need_free = TRUE;
}
}
@ -962,19 +969,20 @@ do_autocmd(char_u *arg_in, int forceit)
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)
once, nested, cmd, forceit, group, flags) == FAIL)
break;
}
else
{
while (*arg && *arg != '|' && !VIM_ISWHITE(*arg))
if (do_autocmd_event(event_name2nr(arg, &arg), pat,
once, nested, cmd, forceit, group) == FAIL)
once, nested, cmd, forceit, group, flags) == FAIL)
break;
}
if (need_free)
if (cmd_need_free)
vim_free(cmd);
vim_free(tofree);
vim_free(envpat);
}
@ -1024,7 +1032,8 @@ do_autocmd_event(
int nested,
char_u *cmd,
int forceit,
int group)
int group,
int flags)
{
AutoPat *ap;
AutoPat **prev_ap;
@ -1251,6 +1260,8 @@ do_autocmd_event(
return FAIL;
ac->cmd = vim_strsave(cmd);
ac->script_ctx = current_sctx;
if (flags & UC_VIM9)
ac->script_ctx.sc_version = SCRIPT_VERSION_VIM9;
#ifdef FEAT_EVAL
ac->script_ctx.sc_lnum += SOURCING_LNUM;
#endif

View File

@ -412,15 +412,19 @@ blob_set_range(blob_T *dest, long n1, long n2, typval_T *src)
* "remove({blob})" function
*/
void
blob_remove(typval_T *argvars, typval_T *rettv)
blob_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg)
{
blob_T *b = argvars[0].vval.v_blob;
int error = FALSE;
long idx = (long)tv_get_number_chk(&argvars[1], &error);
long idx;
long end;
if (b != NULL && value_check_lock(b->bv_lock, arg_errmsg, TRUE))
return;
idx = (long)tv_get_number_chk(&argvars[1], &error);
if (!error)
{
blob_T *b = argvars[0].vval.v_blob;
int len = blob_len(b);
char_u *p;

View File

@ -596,7 +596,8 @@ crypt_blowfish_encode(
cryptstate_T *state,
char_u *from,
size_t len,
char_u *to)
char_u *to,
int last UNUSED)
{
bf_state_T *bfs = state->method_state;
size_t i;
@ -619,7 +620,8 @@ crypt_blowfish_decode(
cryptstate_T *state,
char_u *from,
size_t len,
char_u *to)
char_u *to,
int last UNUSED)
{
bf_state_T *bfs = state->method_state;
size_t i;
@ -680,5 +682,4 @@ blowfish_self_test(void)
}
return OK;
}
#endif // FEAT_CRYPT

View File

@ -1130,7 +1130,12 @@ handle_swap_exists(bufref_T *old_curbuf)
close_buffer(curwin, curbuf, DOBUF_UNLOAD, FALSE, FALSE);
if (old_curbuf == NULL || !bufref_valid(old_curbuf)
|| old_curbuf->br_buf == curbuf)
{
// Block autocommands here because curwin->w_buffer is NULL.
block_autocmds();
buf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED);
unblock_autocmds();
}
else
buf = old_curbuf->br_buf;
if (buf != NULL)
@ -1180,122 +1185,6 @@ handle_swap_exists(bufref_T *old_curbuf)
swap_exists_action = SEA_NONE;
}
/*
* do_bufdel() - delete or unload buffer(s)
*
* addr_count == 0: ":bdel" - delete current buffer
* addr_count == 1: ":N bdel" or ":bdel N [N ..]" - first delete
* buffer "end_bnr", then any other arguments.
* addr_count == 2: ":N,N bdel" - delete buffers in range
*
* command can be DOBUF_UNLOAD (":bunload"), DOBUF_WIPE (":bwipeout") or
* DOBUF_DEL (":bdel")
*
* Returns error message or NULL
*/
char *
do_bufdel(
int command,
char_u *arg, // pointer to extra arguments
int addr_count,
int start_bnr, // first buffer number in a range
int end_bnr, // buffer nr or last buffer nr in a range
int forceit)
{
int do_current = 0; // delete current buffer?
int deleted = 0; // number of buffers deleted
char *errormsg = NULL; // return value
int bnr; // buffer number
char_u *p;
if (addr_count == 0)
{
(void)do_buffer(command, DOBUF_CURRENT, FORWARD, 0, forceit);
}
else
{
if (addr_count == 2)
{
if (*arg) // both range and argument is not allowed
return ex_errmsg(e_trailing_arg, arg);
bnr = start_bnr;
}
else // addr_count == 1
bnr = end_bnr;
for ( ;!got_int; ui_breakcheck())
{
/*
* delete the current buffer last, otherwise when the
* current buffer is deleted, the next buffer becomes
* the current one and will be loaded, which may then
* also be deleted, etc.
*/
if (bnr == curbuf->b_fnum)
do_current = bnr;
else if (do_buffer(command, DOBUF_FIRST, FORWARD, (int)bnr,
forceit) == OK)
++deleted;
/*
* find next buffer number to delete/unload
*/
if (addr_count == 2)
{
if (++bnr > end_bnr)
break;
}
else // addr_count == 1
{
arg = skipwhite(arg);
if (*arg == NUL)
break;
if (!VIM_ISDIGIT(*arg))
{
p = skiptowhite_esc(arg);
bnr = buflist_findpat(arg, p,
command == DOBUF_WIPE || command == DOBUF_WIPE_REUSE,
FALSE, FALSE);
if (bnr < 0) // failed
break;
arg = p;
}
else
bnr = getdigits(&arg);
}
}
if (!got_int && do_current && do_buffer(command, DOBUF_FIRST,
FORWARD, do_current, forceit) == OK)
++deleted;
if (deleted == 0)
{
if (command == DOBUF_UNLOAD)
STRCPY(IObuff, _("E515: No buffers were unloaded"));
else if (command == DOBUF_DEL)
STRCPY(IObuff, _("E516: No buffers were deleted"));
else
STRCPY(IObuff, _("E517: No buffers were wiped out"));
errormsg = (char *)IObuff;
}
else if (deleted >= p_report)
{
if (command == DOBUF_UNLOAD)
smsg(NGETTEXT("%d buffer unloaded",
"%d buffers unloaded", deleted), deleted);
else if (command == DOBUF_DEL)
smsg(NGETTEXT("%d buffer deleted",
"%d buffers deleted", deleted), deleted);
else
smsg(NGETTEXT("%d buffer wiped out",
"%d buffers wiped out", deleted), deleted);
}
}
return errormsg;
}
/*
* Make the current buffer empty.
* Used when it is wiped out and it's the last buffer.
@ -1354,13 +1243,13 @@ empty_curbuf(
*
* Return FAIL or OK.
*/
int
do_buffer(
static int
do_buffer_ext(
int action,
int start,
int dir, // FORWARD or BACKWARD
int count, // buffer number or number of buffers
int forceit) // TRUE for :...!
int flags) // DOBUF_FORCEIT etc.
{
buf_T *buf;
buf_T *bp;
@ -1446,6 +1335,14 @@ do_buffer(
emsg(_("E88: Cannot go before first buffer"));
return FAIL;
}
#ifdef FEAT_PROP_POPUP
if ((flags & DOBUF_NOPOPUP) && bt_popup(buf)
# ifdef FEAT_TERMINAL
&& !bt_terminal(buf)
#endif
)
return OK;
#endif
#ifdef FEAT_GUI
need_mouse_correct = TRUE;
@ -1470,7 +1367,7 @@ do_buffer(
&& buf->b_ml.ml_mfp == NULL && !buf->b_p_bl)
return FAIL;
if (!forceit && bufIsChanged(buf))
if ((flags & DOBUF_FORCEIT) == 0 && bufIsChanged(buf))
{
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
if ((p_confirm || (cmdmod.cmod_flags & CMOD_CONFIRM)) && p_write)
@ -1506,7 +1403,7 @@ do_buffer(
if (bp->b_p_bl && bp != buf)
break;
if (bp == NULL && buf == curbuf)
return empty_curbuf(TRUE, forceit, action);
return empty_curbuf(TRUE, (flags & DOBUF_FORCEIT), action);
/*
* If the deleted buffer is the current one, close the current window
@ -1633,7 +1530,7 @@ do_buffer(
{
// Autocommands must have wiped out all other buffers. Only option
// now is to make the current buffer empty.
return empty_curbuf(FALSE, forceit, action);
return empty_curbuf(FALSE, (flags & DOBUF_FORCEIT), action);
}
/*
@ -1660,7 +1557,7 @@ do_buffer(
/*
* Check if the current buffer may be abandoned.
*/
if (action == DOBUF_GOTO && !can_abandon(curbuf, forceit))
if (action == DOBUF_GOTO && !can_abandon(curbuf, (flags & DOBUF_FORCEIT)))
{
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
if ((p_confirm || (cmdmod.cmod_flags & CMOD_CONFIRM)) && p_write)
@ -1695,6 +1592,134 @@ do_buffer(
return OK;
}
int
do_buffer(
int action,
int start,
int dir, // FORWARD or BACKWARD
int count, // buffer number or number of buffers
int forceit) // TRUE when using !
{
return do_buffer_ext(action, start, dir, count,
forceit ? DOBUF_FORCEIT : 0);
}
/*
* do_bufdel() - delete or unload buffer(s)
*
* addr_count == 0: ":bdel" - delete current buffer
* addr_count == 1: ":N bdel" or ":bdel N [N ..]" - first delete
* buffer "end_bnr", then any other arguments.
* addr_count == 2: ":N,N bdel" - delete buffers in range
*
* command can be DOBUF_UNLOAD (":bunload"), DOBUF_WIPE (":bwipeout") or
* DOBUF_DEL (":bdel")
*
* Returns error message or NULL
*/
char *
do_bufdel(
int command,
char_u *arg, // pointer to extra arguments
int addr_count,
int start_bnr, // first buffer number in a range
int end_bnr, // buffer nr or last buffer nr in a range
int forceit)
{
int do_current = 0; // delete current buffer?
int deleted = 0; // number of buffers deleted
char *errormsg = NULL; // return value
int bnr; // buffer number
char_u *p;
if (addr_count == 0)
{
(void)do_buffer(command, DOBUF_CURRENT, FORWARD, 0, forceit);
}
else
{
if (addr_count == 2)
{
if (*arg) // both range and argument is not allowed
return ex_errmsg(e_trailing_arg, arg);
bnr = start_bnr;
}
else // addr_count == 1
bnr = end_bnr;
for ( ;!got_int; ui_breakcheck())
{
/*
* Delete the current buffer last, otherwise when the
* current buffer is deleted, the next buffer becomes
* the current one and will be loaded, which may then
* also be deleted, etc.
*/
if (bnr == curbuf->b_fnum)
do_current = bnr;
else if (do_buffer_ext(command, DOBUF_FIRST, FORWARD, (int)bnr,
DOBUF_NOPOPUP | (forceit ? DOBUF_FORCEIT : 0)) == OK)
++deleted;
/*
* find next buffer number to delete/unload
*/
if (addr_count == 2)
{
if (++bnr > end_bnr)
break;
}
else // addr_count == 1
{
arg = skipwhite(arg);
if (*arg == NUL)
break;
if (!VIM_ISDIGIT(*arg))
{
p = skiptowhite_esc(arg);
bnr = buflist_findpat(arg, p,
command == DOBUF_WIPE || command == DOBUF_WIPE_REUSE,
FALSE, FALSE);
if (bnr < 0) // failed
break;
arg = p;
}
else
bnr = getdigits(&arg);
}
}
if (!got_int && do_current && do_buffer(command, DOBUF_FIRST,
FORWARD, do_current, forceit) == OK)
++deleted;
if (deleted == 0)
{
if (command == DOBUF_UNLOAD)
STRCPY(IObuff, _("E515: No buffers were unloaded"));
else if (command == DOBUF_DEL)
STRCPY(IObuff, _("E516: No buffers were deleted"));
else
STRCPY(IObuff, _("E517: No buffers were wiped out"));
errormsg = (char *)IObuff;
}
else if (deleted >= p_report)
{
if (command == DOBUF_UNLOAD)
smsg(NGETTEXT("%d buffer unloaded",
"%d buffers unloaded", deleted), deleted);
else if (command == DOBUF_DEL)
smsg(NGETTEXT("%d buffer deleted",
"%d buffers deleted", deleted), deleted);
else
smsg(NGETTEXT("%d buffer wiped out",
"%d buffers wiped out", deleted), deleted);
}
}
return errormsg;
}
/*
* Set current buffer to "buf". Executes autocommands and closes current
* buffer. "action" tells how to close the current buffer:
@ -1917,7 +1942,7 @@ no_write_message(void)
emsg(_("E948: Job still running (add ! to end the job)"));
else
#endif
emsg(_("E37: No write since last change (add ! to override)"));
emsg(_(e_no_write_since_last_change_add_bang_to_override));
}
void
@ -1928,7 +1953,7 @@ no_write_message_nobang(buf_T *buf UNUSED)
emsg(_("E948: Job still running"));
else
#endif
emsg(_("E37: No write since last change"));
emsg(_(e_no_write_since_last_change));
}
/*
@ -2281,6 +2306,10 @@ free_buf_options(
clear_string_option(&buf->b_p_fex);
#endif
#ifdef FEAT_CRYPT
# ifdef FEAT_SODIUM
if (buf->b_p_key != NULL && (crypt_get_method_nr(buf) == CRYPT_M_SOD))
sodium_munlock(buf->b_p_key, STRLEN(buf->b_p_key));
# endif
clear_string_option(&buf->b_p_key);
#endif
clear_string_option(&buf->b_p_kp);
@ -2387,7 +2416,7 @@ buflist_getfile(
if (buf == NULL)
{
if ((options & GETF_ALT) && n == 0)
emsg(_(e_noalt));
emsg(_(e_no_alternate_file));
else
semsg(_("E92: Buffer %d not found"), n);
return FAIL;
@ -3496,7 +3525,7 @@ getaltfname(
if (buflist_name_nr(0, &fname, &dummy) == FAIL)
{
if (errmsg)
emsg(_(e_noalt));
emsg(_(e_no_alternate_file));
return NULL;
}
return fname;

View File

@ -30,6 +30,7 @@ struct bw_info
int bw_flags; // FIO_ flags
#ifdef FEAT_CRYPT
buf_T *bw_buffer; // buffer being written
int bw_finish; // finish encrypting
#endif
char_u bw_rest[CONV_RESTLEN]; // not converted bytes
int bw_restlen; // nr of bytes in bw_rest[]
@ -493,14 +494,16 @@ buf_write_bytes(struct bw_info *ip)
if (crypt_works_inplace(ip->bw_buffer->b_cryptstate))
{
# endif
crypt_encode_inplace(ip->bw_buffer->b_cryptstate, buf, len);
crypt_encode_inplace(ip->bw_buffer->b_cryptstate, buf, len,
ip->bw_finish);
# ifdef CRYPT_NOT_INPLACE
}
else
{
char_u *outbuf;
len = crypt_encode_alloc(curbuf->b_cryptstate, buf, len, &outbuf);
len = crypt_encode_alloc(curbuf->b_cryptstate, buf, len, &outbuf,
ip->bw_finish);
if (len == 0)
return OK; // Crypt layer is buffering, will flush later.
wlen = write_eintr(ip->bw_fd, outbuf, len);
@ -724,6 +727,7 @@ buf_write(
#endif
#ifdef FEAT_CRYPT
write_info.bw_buffer = buf;
write_info.bw_finish = FALSE;
#endif
// After writing a file changedtick changes but we don't want to display
@ -1982,8 +1986,25 @@ restore_backup:
&& overwriting
&& !append
&& !filtering
# ifdef CRYPT_NOT_INPLACE
// writing undo file requires
// crypt_encode_inplace()
&& (buf->b_cryptstate == NULL
|| crypt_works_inplace(buf->b_cryptstate))
# endif
&& reset_changed
&& !checking_conversion);
# ifdef CRYPT_NOT_INPLACE
// remove undo file if encrypting it is not possible
if (buf->b_p_udf
&& overwriting
&& !append
&& !filtering
&& !checking_conversion
&& buf->b_cryptstate != NULL
&& !crypt_works_inplace(buf->b_cryptstate))
u_undofile_reset_and_delete(buf);
# endif
if (write_undo_file)
// Prepare for computing the hash value of the text.
sha256_start(&sha_ctx);
@ -2015,6 +2036,13 @@ restore_backup:
++s;
if (++len != bufsize)
continue;
#ifdef FEAT_CRYPT
if (write_info.bw_fd > 0 && lnum == end
&& (write_info.bw_flags & FIO_ENCRYPTED)
&& *buf->b_p_key != NUL && !filtering
&& *ptr == NUL)
write_info.bw_finish = TRUE;
#endif
if (buf_write_bytes(&write_info) == FAIL)
{
end = 0; // write error: break loop
@ -2118,6 +2146,12 @@ restore_backup:
if (len > 0 && end > 0)
{
write_info.bw_len = len;
#ifdef FEAT_CRYPT
if (write_info.bw_fd > 0 && lnum >= end
&& (write_info.bw_flags & FIO_ENCRYPTED)
&& *buf->b_p_key != NUL && !filtering)
write_info.bw_finish = TRUE;
#endif
if (buf_write_bytes(&write_info) == FAIL)
end = 0; // write error
nchars += len;

View File

@ -241,6 +241,9 @@ f_listener_add(typval_T *argvars, typval_T *rettv)
listener_T *lnr;
buf_T *buf = curbuf;
if (in_vim9script() && check_for_opt_buffer_arg(argvars, 1) == FAIL)
return;
callback = get_callback(&argvars[0]);
if (callback.cb_name == NULL)
return;
@ -278,6 +281,9 @@ f_listener_flush(typval_T *argvars, typval_T *rettv UNUSED)
{
buf_T *buf = curbuf;
if (in_vim9script() && check_for_opt_buffer_arg(argvars, 0) == FAIL)
return;
if (argvars[0].v_type != VAR_UNKNOWN)
{
buf = get_buf_arg(&argvars[0]);
@ -296,9 +302,13 @@ f_listener_remove(typval_T *argvars, typval_T *rettv)
listener_T *lnr;
listener_T *next;
listener_T *prev;
int id = tv_get_number(argvars);
int id;
buf_T *buf;
if (in_vim9script() && check_for_number_arg(argvars, 0) == FAIL)
return;
id = tv_get_number(argvars);
FOR_ALL_BUFFERS(buf)
{
prev = NULL;
@ -563,9 +573,12 @@ changed_common(
changed_cline_bef_curs_win(wp);
if (wp->w_botline >= lnum)
{
// Assume that botline doesn't change (inserted lines make
// other lines scroll down below botline).
approximate_botline_win(wp);
if (xtra < 0)
invalidate_botline_win(wp);
else
// Assume that botline doesn't change (inserted lines make
// other lines scroll down below botline).
approximate_botline_win(wp);
}
// Check if any w_lines[] entries have become invalid.
@ -1251,7 +1264,7 @@ del_bytes(
// fixpos is TRUE, we don't want to end up positioned at the NUL,
// unless "restart_edit" is set or 'virtualedit' contains "onemore".
if (col > 0 && fixpos && restart_edit == 0
&& (ve_flags & VE_ONEMORE) == 0)
&& (get_ve_flags() & VE_ONEMORE) == 0)
{
--curwin->w_cursor.col;
curwin->w_cursor.coladd = 0;

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