Compare commits

...

608 Commits

Author SHA1 Message Date
3787f26c2e patch 8.2.4324: Vim9: script-local function name can start with "_"
Problem:    Vim9: script-local function name can start with "_".
Solution:   Check for leading capital after "s:".  Correct error message.
2022-02-07 21:54:01 +00:00
f681cfb90b patch 8.2.4323: Vim9: nested function name can start with "_"
Problem:    Vim9: nested function name can start with "_".
Solution:   Use same rule for function name for nested functions.
            (closes #9713)
2022-02-07 20:30:57 +00:00
7aca5ca676 patch 8.2.4322: Vim9: crash when using funcref with closure
Problem:    Vim9: crash when using funcref with closure.
Solution:   Keep a reference to the funcref that has the outer context.
            (closes #9716)
2022-02-07 19:56:43 +00:00
92368aad61 patch 8.2.4321: Vim9: crash when using a funcref to a closure
Problem:    Vim9: crash when using a funcref to a closure.
Solution:   Copy pt_outer to the new partial. (closes #9714)
2022-02-07 17:50:39 +00:00
28f1a51bde patch 8.2.4320: Athena and Motif: when maximized scrollbar position is wrong
Problem:    Athena and Motif: when maximized scrollbar position is wrong.
Solution:   Implement the scrollbar padding functions. (closes #9712)
2022-02-07 15:57:50 +00:00
4e713bafc0 patch 8.2.4319: :put does not work properly in compiled function
Problem:    :put does not work properly in compiled function. (John Beckett)
Solution:   Adjust the direction when using line zero.
2022-02-07 15:31:37 +00:00
54969f4ef5 patch 8.2.4318: various comment and indent mistakes, returning wrong zero
Problem:    Various comment and indent mistakes, returning wrong zero.
Solution:   Fix the mistakes.  Return NULL instead of FAIL.
2022-02-07 13:56:44 +00:00
63ff72aab9 patch 8.2.4317: MS-Windows: Vim exits when Python 3 initialisation fails
Problem:    MS-Windows: Vim exits when Python 3 initialisation fails.
Solution:   Hook into the exit() function to recover from the failure.
            (Ken Takata, closes #9710)
2022-02-07 13:54:01 +00:00
b247e0622e patch 8.2.4316: __CYGWIN32__ is not defined on 64 bit systems
Problem:    __CYGWIN32__ is not defined on 64 bit systems.
Solution:   Update #ifdefs. (Ken Takata, closes #9709)
2022-02-07 10:45:23 +00:00
6bf821e8ab patch 8.2.4315: put in Visual mode not fully tested
Problem:    Put in Visual mode not fully tested.
Solution:   Add a few more test cases. (closes #9708)
2022-02-07 10:33:20 +00:00
8cbf249917 patch 8.2.4314: test fails where lines are skipped
Problem:    Test fails where lines are skipped.
Solution:   Only give an error when not skipping commands.
2022-02-06 20:28:13 +00:00
5f4ef5f5e5 patch 8.2.4313: Vim9: cannot change type of list after making a slice
Problem:    Vim9: cannot change type of list after making a slice.
Solution:   Adjust the declared member type. (closes #9696)
2022-02-06 18:36:53 +00:00
107f7325f6 patch 8.2.4312: no error for using :vim9script in a :def function
Problem:    No error for using :vim9script in a :def function.
Solution:   Give an error when compiling.
2022-02-06 17:30:41 +00:00
160afdb185 patch 8.2.4311: Vim9: changing script variable type not caught compile time
Problem:    Vim9: changing script variable type not caught at compile time.
Solution:   Set the declared type.
2022-02-06 17:17:02 +00:00
2626d6a71c patch 8.2.4310: Vim9: constant list and dict get a declaration type
Problem:    Vim9: constant list and dict get a declaration type other than
            "any".
Solution:   A constant list and dict have a declared member type "any".
            (closes #9701)
2022-02-06 15:49:35 +00:00
fe1bfc9b26 patch 8.2.4309: Vim9: crash when using a partial in the wrong context
Problem:    Vim9: crash when using a partial in the wrong context.
Solution:   Don't use an NULL outer pointer. (closes #9706)
2022-02-06 13:55:03 +00:00
8164f6ea3c patch 8.2.4308: Vim9: cannot list autoload function
Problem:    Vim9: cannot list autoload function.
Solution:   Don't give an error for using # when listing a function.
            (closes #9703)
2022-02-06 13:08:41 +00:00
0c1550d9e9 patch 8.2.4307: a few more messages should not be translated
Problem:    A few more messages should not be translated.
Solution:   Remove _().
2022-02-06 11:41:57 +00:00
500761b1cf patch 8.2.4306: no test for fixed perl filetype check
Problem:    No test for fixed perl filetype check.
Solution:   Add a test. Sort test functions.
2022-02-05 20:23:59 +00:00
e5b7897585 patch 8.2.4305: tex filetype detection fails
Problem:    Tex filetype detection fails.
Solution:   Check value to be positive. (closes #9704)
2022-02-05 19:50:34 +00:00
00eb99528e patch 8.2.4304: Vim9: slice() makes a copy but doesn't change the type
Problem:    Vim9: slice() makes a copy but doesn't change the type.
Solution:   Change the declared type like copy(). (closes #9696)
2022-02-05 19:23:18 +00:00
cd53eed2c5 patch 8.2.4303: a few messages should not be translated
Problem:    A few messages should not be translated.
Solution:   Remove _(). (Dominique Pellé, closes #9702)
2022-02-05 18:53:06 +00:00
82e46e5d31 patch 8.2.4302: Vim9: return type of getline() is too strict
Problem:    Vim9: return type of getline() is too strict.
Solution:   Make the declared type list<any>.  Also do this for other
            functions returning a list of a specific type.
2022-02-05 18:12:34 +00:00
e0c2b2ceaa patch 8.2.4301: Vim9: type error for copy of dict
Problem:    Vim9: type error for copy of dict.
Solution:   Do not use dict<any> but no type. (closes #9696)
2022-02-05 14:05:51 +00:00
4fa1346bf4 patch 8.2.4300: cannot build tiny version
Problem:    Cannot build tiny version. (Tony Mechelynck)
Solution:   Add #ifdef.
2022-02-05 12:39:24 +00:00
46f3080e5c patch 8.2.4299: SafeState autocommand interferes with debugging
Problem:    SafeState autocommand interferes with debugging.
Solution:   Do not trigger SafeState while debugging. (closes #9697)
2022-02-05 12:10:52 +00:00
fc88df42f1 patch 8.2.4298: divide by zero with huge tabstop value
Problem:    Divide by zero with huge tabstop value.
Solution:   Reject tabstop value that overflows to zero.
2022-02-05 11:13:05 +00:00
21ebb0899e patch 8.2.4297: Vim9: not all code covered by tests
Problem:    Vim9: not all code covered by tests.
Solution:   Add a couple more tests.
2022-02-04 21:58:58 +00:00
83d0cec956 patch 8.2.4296: Vim9: not all code covered by tests
Problem:    Vim9: not all code covered by tests.
Solution:   Add a few more tests for corner cases.  Fix hang when single quote
            is missing.
2022-02-04 21:17:58 +00:00
3e79c97c18 Update runtime files; use compiled functions 2022-02-04 19:48:06 +00:00
a2baa73d1d Update runtime files. 2022-02-04 16:09:54 +00:00
46950b225f patch 8.2.4295: Vim9: concatenating two lists may result in wrong type
Problem:    Vim9: concatenating two lists may result in wrong type.
Solution:   Remove the type instead of using list<any>. (closes #9692)
2022-02-04 11:36:51 +00:00
972db23279 patch 8.2.4294: MS-Windows: #ifdefs for Cygwin are too complicated
Problem:    MS-Windows: #ifdefs for Cygwin are too complicated.
Solution:   Simplify the conditions. (Ken Takata, closes #9693)
2022-02-04 10:45:38 +00:00
7676c15879 patch 8.2.4293: Vim9: when copying a list it gets type list<any>
Problem:    Vim9: when copying a list it gets type list<any> even when the
            original list did not have a type.
Solution:   Only set the type when the original list has a type. (closes #9692)
2022-02-03 21:47:34 +00:00
02a977ea5e patch 8.2.4292: test fails
Problem:    Test fails.
Solution:   Adjust the expected error number.
2022-02-03 21:29:39 +00:00
5658ca343f patch 8.2.4291: error number used twice
Problem:    Error number used twice.
Solution:   Renumber of of the errors.
2022-02-03 20:09:19 +00:00
a8ec4916ca patch 8.2.4290: MS-Windows: using type casts for timer IDs
Problem:    MS-Windows: using type casts for timer IDs.
Solution:   Remove type casts and use the right type. (Ken Takata,
            closes #9690)  Remove old debug comments.  Rename variables and
            functions.
2022-02-03 14:32:33 +00:00
5411910c77 patch 8.2.4289: warnings reported by MSVC
Problem:    Warnings reported by MSVC.
Solution:   Rename variables and other fixes. (Ken Takata, closes #9689)
2022-02-03 13:33:03 +00:00
6e1d31e9e3 patch 8.2.4288: preprocessor indents are inconsistent
Problem:    Preprocessor indents are inconsistent.
Solution:   Fix preprocessor indents. (Ken Takata, closes #9691)
2022-02-03 13:05:32 +00:00
2d3ac2e030 patch 8.2.4287: cannot assign empty list with type to variable with list type
Problem:    Cannot assign empty list with any list type to variable with
            specific list type.
Solution:   Use unknown list type for empty list if the specified type is any.
2022-02-03 12:34:05 +00:00
381692b6f1 patch 8.2.4286: Vim9: strict type checking after copy() and deepcopy()
Problem:    Vim9: strict type checking after copy() and deepcopy().
Solution:   Allow type to change after making a copy. (closes #9644)
2022-02-02 20:01:27 +00:00
a1c5195180 patch 8.2.4285: Vim9: type of item in for loop not checked properly
Problem:    Vim9: type of item in for loop not checked properly.
Solution:   Adjust the type checking. (closes #9683)
2022-02-02 16:20:26 +00:00
ab8f7c50cf patch 8.2.4284: old mac resources files are no longer used
Problem:    Old mac resources files are no longer used.
Solution:   Delete the unused files. (Ozaki Kiichi, closes #9688)
2022-02-02 15:19:38 +00:00
73257149d7 patch 8.2.4283: using a variable for the return value is not needed
Problem:    Using a variable for the return value is not needed.
Solution:   Return the value directly. (closes #9687)
2022-02-02 13:16:37 +00:00
adbb1bf21d patch 8.2.4282: restricted mode requires the -Z command line option
Problem:    Restricted mode requires the -Z command line option.
Solution:   Use restricted mode when $SHELL ends in "nologin" or "false".
            (closes #9681)
2022-02-01 17:26:12 +00:00
9b4a80a665 patch 8.2.4281: using freed memory with :lopen and :bwipe
Problem:    Using freed memory with :lopen and :bwipe.
Solution:   Do not use a wiped out buffer.
2022-02-01 13:54:17 +00:00
eb4a9ba293 patch 8.2.4280: list-dict test crashes
Problem:    list-dict test crashes.
Solution:   Check declared type for add().
2022-02-01 12:47:07 +00:00
8133018f50 patch 8.2.4279: Vim9: cannot change item type with map() after range()
Problem:    Vim9: cannot change item type with map() after range().
Solution:   Split the return type in current type and declared type.
            (closes #9665)
2022-02-01 12:11:58 +00:00
4e3b318230 patch 8.2.4278: build with Athena GUI fails
Problem:    Build with Athena GUI fails. (Elimar Riesebieter)
Solution:   Add #ifdef.
2022-02-01 10:16:00 +00:00
68854a82fd patch 8.2.4277: Vim9: an import does not shadow a command modifier
Problem:    Vim9: an import does not shadow a command modifier.
Solution:   Do not accept a command modifier followed by a dot.
2022-01-31 18:59:13 +00:00
9e0208f51c patch 8.2.4276: separate test function for the GUI scrollbar
Problem:    Separate test function for the GUI scrollbar.
Solution:   Use test_gui_event(). (Yegappan Lakshmanan, closes #9674)
2022-01-31 17:40:55 +00:00
223a950a85 patch 8.2.4275: cannot use an autoload function from a package under start
Problem:    Cannot use an autoload function from a package under start.
Solution:   Also look in the "start" package directory. (Bjorn Linse,
            closes #7193)
2022-01-31 17:26:05 +00:00
c570e9cf68 patch 8.2.4274: Basic and form filetype detection is incomplete
Problem:    Basic and form filetype detection is incomplete.
Solution:   Add a separate function for .frm files. (Doug Kearns, closes #9675)
2022-01-31 17:09:14 +00:00
c4573eb12d Update runtime files 2022-01-31 15:40:56 +00:00
424bcae1fb patch 8.2.4273: the EBCDIC support is outdated
Problem:    The EBCDIC support is outdated.
Solution:   Remove the EBCDIC support.
2022-01-31 14:59:41 +00:00
eb6c276595 patch 8.2.4272: Vim9 expr test fails without the channel feature
Problem:    Vim9 expr test fails without the channel feature. (Dominique
            Pellé)
Solution:   Remove "g:" before "CheckFeature". (closes #9671)
2022-01-31 13:36:36 +00:00
1f47a287ee patch 8.2.4271: MS-Windows: cannot build with Ruby 3.1.0
Problem:    MS-Windows: cannot build with Ruby 3.1.0.
Solution:   Adjust the DLL name and include directory. (Ken Takata,
            closes #9666)
2022-01-31 13:25:36 +00:00
672776dbe8 patch 8.2.4270: generating nv_cmdidxs.h requires building Vim twice
Problem:    Generating nv_cmdidxs.h requires building Vim twice.
Solution:   Move the table into a separate file and use a separate executable
            to extract the command characters. (Ozaki Kiichi, closes #9669)
2022-01-31 12:27:18 +00:00
48a604845e patch 8.2.4269: Coverity warns for using a NULL pointer
Problem:    Coverity warns for using a NULL pointer.
Solution:   Check for "name" to not be NULL.
2022-01-31 11:44:48 +00:00
44d1f89c24 patch 8.2.4268: CI log output is long
Problem:    CI log output is long.
Solution:   Group output in sections. (Ozaki Kiichi, closes #9670)
2022-01-31 11:38:53 +00:00
4c93aff20f patch 8.2.4267: unused entry in keymap enum
Problem:    Unused entry in keymap enum.
Solution:   Remove the entry.
2022-01-31 11:29:51 +00:00
5703310e64 patch 8.2.4266: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable.
Solution:   Initialize saved_did_emsg.
2022-01-30 19:37:52 +00:00
6a05807092 patch 8.2.4265: autoload tests fails
Problem:    Autoload tests fails.
Solution:   Use export instead of name with #.
2022-01-30 18:56:35 +00:00
d8fe6d34bb patch 8.2.4264: Vim9: can use old style autoload function name
Problem:    Vim9: can use old style autoload function name.
Solution:   Give an error for old style autoload function name.
2022-01-30 18:40:44 +00:00
ec3637cbaf patch 8.2.4263: no test for the GUI find/replace dialog
Problem:    No test for the GUI find/replace dialog.
Solution:   Add a test function and a test. (Yegappan Lakshmanan,
            closes #9662)
2022-01-30 18:01:24 +00:00
44a4d947bb patch 8.2.4262: some search tests fail
Problem:    Some search tests fail.
Solution:   Use a better way to reject searching for the Visual area.
2022-01-30 17:17:41 +00:00
679d66c2d2 patch 8.2.4261: accessing invalid memory in a regular expression
Problem:    Accessing invalid memory when a regular expression checks the
            Visual area while matching in a string.
Solution:   Do not try matching the Visual area in a string.
2022-01-30 16:42:56 +00:00
848faddb87 patch 8.2.4260: Vim9: can still use a global function without g:
Problem:    Vim9: can still use a global function without g: at the script
            level.
Solution:   Also check for g: at the script level. (issue #9637)
2022-01-30 15:28:30 +00:00
06011e1a55 patch 8.2.4259: number of test functions for GUI events is growing
Problem:    Number of test functions for GUI events is growing.
Solution:   Use one function with a dictionary. (Yegappan Lakshmanan,
            closes #9660)
2022-01-30 12:37:29 +00:00
6970e1e36a patch 8.2.4258: Coverity warns for array overrun
Problem:    Coverity warns for array overrun.
Solution:   Restrict depth to MAXWLEN - 1.
2022-01-30 12:10:39 +00:00
f10911e5db Update runtime files 2022-01-29 22:20:48 +00:00
62aec93bfd patch 8.2.4257: Vim9: finding global function without g: prefix inconsistent
Problem:    Vim9: finding global function without g: prefix but not finding
            global variable is inconsistent.
Solution:   Require using g: for a global function.  Change the vim9.vim
            script into a Vim9 script with exports.  Fix that import in legacy
            script does not work.
2022-01-29 21:45:34 +00:00
135e15251e patch 8.2.4256: MS-Windows: compiler warnings when compiled with /W4
Problem:    MS-Windows: compiler warnings when compiled with /W4.
Solution:   Small adjustments to the code. (Ken Takata, closes #9659)
2022-01-29 15:27:58 +00:00
d5cec1f1f0 patch 8.2.4255: theoretical computation overflow
Problem:    Theoretical computation overflow.
Solution:   Perform multiplication in a wider type. (closes #9657)
2022-01-29 15:19:23 +00:00
f12b7815f6 patch 8.2.4254: using short instead of int
Problem:    Using short instead of int.
Solution:   Use int. (closes #9658)
2022-01-29 15:12:39 +00:00
37f47958b8 patch 8.2.4253: using freed memory when substitute with function call
Problem:    Using freed memory when substitute uses a recursive function call.
Solution:   Make a copy of the substitute text.
2022-01-29 14:21:51 +00:00
4dc0dd8699 patch 8.2.4252: generating the normal command table at runtime is inefficient
Problem:    Generating the normal command table at runtime is inefficient.
Solution:   Generate the table with a Vim script and put it in a header file.
            (Yegappan Lakshmanan, closes #9648)
2022-01-29 13:06:40 +00:00
97c554d514 patch 8.2.4251: vala files are not recognized
Problem:    Vala files are not recognized.
Solution:   Add the *.vala pattern. (closes #9654)
2022-01-29 12:45:47 +00:00
24714a1916 patch 8.2.4250: channel out callback test is flaky on Mac
Problem:    Channel out callback test is flaky on Mac.
Solution:   Assign high priority to the test process. (Ozaki Kiichi,
            closes #9653)
2022-01-29 12:10:43 +00:00
585ee07cfe patch 8.2.4249: the timeout limit for spell suggestions is always 5000
Problem:    The timeout limit for spell suggestions is always 5000 milli
            seconds.
Solution:   Add the "timeout" entry to 'spellsuggest'.
2022-01-29 11:22:17 +00:00
a0c4e2f2d7 patch 8.2.4248: no proper test for moving the window separator
Problem:    No proper test for moving the window separator.
Solution:   Add a test.  Add comment in code. (closes #9656)
2022-01-29 10:59:53 +00:00
06f15416bb patch 8.2.4247: stack corruption when looking for spell suggestions
Problem:    Stack corruption when looking for spell suggestions.
Solution:   Prevent the depth increased too much.  Add a five second time
            limit to finding suggestions.
2022-01-29 10:51:59 +00:00
e96eea7b6a patch 8.2.4246: one error message not in errors.h
Problem:    One error message not in errors.h. (Antonio Colombo)
Solution:   Move the message and rename.
2022-01-28 21:00:51 +00:00
652dee4486 patch 8.2.4245: ":retab 0" may cause illegal memory access
Problem:    ":retab 0" may cause illegal memory access.
Solution:   Limit the value of 'tabstop' to 10000.
2022-01-28 20:47:49 +00:00
14cbf77845 patch 8.2.4244: MS-Windows: warning from MSVC on debug build
Problem:    MS-Windows: warning from MSVC on debug build.
Solution:   Adjust "/opt"o options.  Remove unused variables.  Make variables
            uppercase for consistency. (Ken Takata, closes #9647)
2022-01-28 18:54:13 +00:00
57ff2b7068 patch 8.2.4243: Lua tests fail with Lua 5.4.4
Problem:    Lua tests fail with Lua 5.4.4.
Solution:   Check messages like before Lua 5.4.3. (Jakub Kulík, closes #9652)
2022-01-28 17:20:03 +00:00
fb55207ed1 patch 8.2.4242: put in Visual mode cannot be repeated
Problem:    Put in Visual mode cannot be repeated.
Solution:   Use "P" to put without yanking the deleted text into the unnamed
            register. (Shougo Matsushita, closes #9591)
2022-01-28 16:01:13 +00:00
420fabcd4f patch 8.2.4241: some type casts are redundant
Problem:    Some type casts are redundant.
Solution:   Remove the type casts. (closes #9643)
2022-01-28 15:28:04 +00:00
fb80862e49 patch 8.2.4240: error for using flatten() in Vim9 script is unclear
Problem:    Error for using flatten() in Vim9 script is unclear.
Solution:   Add a remark to use flattennew().
2022-01-28 15:01:47 +00:00
ddd815ba2a patch 8.2.4239: build fails with unusual configuration
Problem:    Build fails with unusual configuration.
Solution:   Adjust #ifdef. (closes #9651)
2022-01-28 14:39:58 +00:00
bd8168c770 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Problem:    *.tf file could be fileytpe "tf" or "terraform".
Solution:   Detect the type from the file contents. (closes #9642)
2022-01-28 14:15:09 +00:00
fbf4f1ca15 patch 8.2.4237: record buffer wrong if character in Select mode was not typed
Problem:    Record buffer wrong if character in Select mode was not typed.
Solution:   Only delete the tail from the record buffer if the character was
            typed. (closes #9650)
2022-01-28 12:50:43 +00:00
166788c657 patch 8.2.4236: accessing freed memory
Problem:    Accessing freed memory.
Solution:   Set the bh_curr pointer to NULL.
2022-01-27 21:56:40 +00:00
37cf413e3e patch 8.2.4235: invalid check for NULL pointer
Problem:    Invalid check for NULL pointer.
Solution:   Remove the check.
2022-01-27 20:47:03 +00:00
b3d83980d2 patch 8.2.4234: test_garbagecollect_now() does not check v:testing
Problem:    test_garbagecollect_now() does not check v:testing as documented.
Solution:   Give an error if v:testing is not set.
2022-01-27 19:59:47 +00:00
a4bc2dd7cc patch 8.2.4233: crash when recording and using Select mode
Problem:    Crash when recording and using Select mode.
Solution:   When deleting the last recorded character check there is something
            to delete.
2022-01-27 19:27:16 +00:00
98cd30383a patch 8.2.4232: some compilers don't like a goto label without statement
Problem:    Some compilers don't like a goto label without statement.
Solution:   Return instead of using a goto.
2022-01-27 17:37:41 +00:00
35c807df1f patch 8.2.4231: Vim9: map() gives type error when type was not declared
Problem:    Vim9: map() gives type error when type was not declared.
Solution:   Only check the type when it was declared, like extend() does.
            (closes #9635)
2022-01-27 16:36:29 +00:00
94373c48e7 patch 8.2.4230: MS-Windows: set_guifontwide() is included but won't work
Problem:    MS-Windows: set_guifontwide() is included but won't work.
Solution:   Include set_guifontwide() only for X11. (Ken Takata, closes #9640)
2022-01-27 15:04:22 +00:00
745b938a48 patch 8.2.4229: possible crash when invoking timer callback fails
Problem:    Possible crash when invoking timer callback fails.
Solution:   Initialize the typval.  Give an error for an empty callback.
            (closes #9636)
2022-01-27 13:55:35 +00:00
b0ad2d92fd patch 8.2.4228: no tests for clicking in the GUI tabline
Problem:    No tests for clicking in the GUI tabline.
Solution:   Add test functions to generate the events.  Add tests using the
            functions. (Yegappan Lakshmanan, closes #9638)
2022-01-27 13:16:59 +00:00
e939f5ebba patch 8.2.4227: Vim9: using "lockvar!" in :def function does not work
Problem:    Vim9: using "lockvar!" in :def function does not work.
Solution:   Add "!" instead of "-1". (closes #9634)
2022-01-26 21:32:59 +00:00
fc4c44836a patch 8.2.4226: filter-map test fails
Problem:    Filter-map test fails.
Solution:   Only reject number argument in Vim9 script.
2022-01-26 21:17:04 +00:00
70c43d84be patch 8.2.4225: Vim9: depth argument of :lockvar not parsed in :def function
Problem:    Vim9: depth argument of :lockvar not parsed in :def function.
Solution:   Parse the optional depth argument. (closes #9629)
            Fix that locking doesn't work for a non-materialize list.
2022-01-26 21:01:15 +00:00
1080c48ec8 patch 8.2.4224: Vim9: no error when using a number for map() second argument
Problem:    Vim9: no error when using a number for map() second argument
Solution:   Disallow number to string conversion. (closes #9630)
2022-01-26 18:26:21 +00:00
1a804528ab patch 8.2.4223: long/int compiler warnings; function arguments swapped
Problem:    Long/int compiler warnings; function arguments swapped.
Solution:   Add type casts.  Swap arguments. (Ken Takata, closes #9632)
2022-01-26 16:45:20 +00:00
47d1666d60 patch 8.2.4222: MS-Windows: clumsy way to suppress progress on CI
Problem:    MS-Windows: clumsy way to suppress progress on CI.
Solution:   Check for "$CI" in the Makefile itself. (Ken Takata, closes #9631)
2022-01-26 16:20:21 +00:00
a827bf3ea8 patch 8.2.4221: some functions in normal.c are very long
Problem:    Some functions in normal.c are very long.
Solution:   Move code to separate functions. (Yegappan Lakshmanan,
            closes #9628)
2022-01-26 12:14:15 +00:00
250155ae31 patch 8.2.4220: MS-Windows: some old compiler support remains
Problem:    MS-Windows: some old compiler support remains.
Solution:   Remove obsolete compiler support. (Ken Takata, closes #9627)
2022-01-26 11:16:52 +00:00
44db8213d3 patch 8.2.4219: reading before the start of the line
Problem:    Reading before the start of the line.
Solution:   Check boundary before trying to read the character.
2022-01-25 21:26:17 +00:00
806d037671 patch 8.2.4218: illegal memory access with bracketed paste in Ex mode
Problem:    Illegal memory access with bracketed paste in Ex mode.
Solution:   Reserve space for the trailing NUL.
2022-01-25 20:45:16 +00:00
8d02ce1ed7 patch 8.2.4217: illegal memory access when undo makes Visual area invalid
Problem:    Illegal memory access when undo makes Visual area invalid.
Solution:   Correct the Visual area after undo.
2022-01-25 18:24:00 +00:00
06b77229ca patch 8.2.4216: Vim9: cannot use a function from an autoload import directly
Problem:    Vim9: cannot use a function from an autoload import directly.
Solution:   Add the AUTOLOAD instruction to figure out at runtime.
            (closes #9620)
2022-01-25 15:51:56 +00:00
dc5490e2cb patch 8.2.4215: illegal memory access when copying lines in Visual mode
Problem:    Illegal memory access when copying lines in Visual mode.
Solution:   Adjust the Visual position after copying lines.
2022-01-25 13:52:53 +00:00
85b6747abc patch 8.2.4214: illegal memory access with large 'tabstop' in Ex mode
Problem:    Illegal memory access with large 'tabstop' in Ex mode.
Solution:   Allocate enough memory.
2022-01-25 11:55:02 +00:00
76687d2717 patch 8.2.4213: too much code for supporting old MSVC versions
Problem:    Too much code for supporting old MSVC versions.
Solution:   Remove MSVC 2003 support. (Ken Takata, closes #9623)
2022-01-25 10:31:37 +00:00
1450112eef patch 8.2.4212: window title test still fails in some configurations
Problem:    Window title test still fails in some configurations.
Solution:   Explicitly set the 'title' option.
2022-01-24 22:32:28 +00:00
3a8ad5918b patch 8.2.4211: window title test still fails in some configurations
Problem:    Window title test still fails in some configurations.
Solution:   Use WaitForAssert().
2022-01-24 22:18:24 +00:00
a6c09a7c20 patch 8.2.4210: window title test fails in some configurations
Problem:    Window title test fails in some configurations.
Solution:   Only run the test if the title can be obtained.
2022-01-24 22:02:15 +00:00
3e93a2b075 patch 8.2.4209: partial in 'opfunc' cannot use an imported function
Problem:    partial in 'opfunc' cannot use an imported function.
Solution:   Also expand the function name in a partial. (closes #9614)
2022-01-24 21:28:01 +00:00
dff97e65eb patch 8.2.4208: using setbufvar() may change the window title
Problem:    Using setbufvar() may change the window title.
Solution:   Do not redraw when creating the autocommand window. (closes #9613)
2022-01-24 20:00:55 +00:00
50e0525445 patch 8.2.4207: recursion test fails with MSVC
Problem:    Recursion test fails with MSVC.
Solution:   Use a smaller limit for MSVC.
2022-01-24 18:36:39 +00:00
fe6fb267e6 patch 8.2.4206: condition with many "(" causes a crash
Problem:    Condition with many "(" causes a crash.
Solution:   Limit recursion to 1000.
2022-01-24 18:16:12 +00:00
4663435074 patch 8.2.4205: the normal_cmd() function is too long
Problem:    The normal_cmd() function is too long.
Solution:   Move parts to separate functions. (Yegappan Lakshmanan,
            closes #9608)
2022-01-24 16:30:30 +00:00
7924a17791 patch 8.2.4204: screenpos() has non-zero row for invisible text
Problem:    screenpos() has non-zero row for invisible text.
Solution:   Only add the window row when the text is visible. (closes #9618)
2022-01-24 16:15:15 +00:00
502d8ae3e8 patch 8.2.4203: entering a character with CTRL-V may include modifiers
Problem:    Entering a character with CTRL-V may include modifiers.
Solution:   Reset "mod_mask" when entering a character with digits after
            CTRL-V. (closes #9610)
2022-01-24 15:27:50 +00:00
acc4b5648b patch 8.2.4202: Vim9: cannot export function that exists globally
Problem:    Vim9: cannot export function that exists globally.
Solution:   When checking if a function already exists only check for
            script-local functions. (closes #9615)
2022-01-24 13:54:45 +00:00
8e4af851fd patch 8.2.4201: when using the GUI CTRL-Z does not stop gvim
Problem:    When using the GUI CTRL-Z does not stop gvim.
Solution:   When using the GUI set SIGTSTP to SIG_DFL. (Andrew Maltsev,
            closes #9570)
2022-01-24 12:20:45 +00:00
7e765a39b7 patch 8.2.4200: some tests do not clean up properly
Problem:    Some tests do not clean up properly.
Solution:   Delete created files. (Yegappan Lakshmanan, closes #9611)
2022-01-24 11:40:37 +00:00
c351dc1e0c patch 8.2.4199: MS-Windows: Support for MSVC 2003 is not useful
Problem:    MS-Windows: Support for MSVC 2003 is not useful.
Solution:   Remove the exceptions for MSVC 2003. (Ken Takata, closes #9616)
2022-01-24 11:24:08 +00:00
058ee7c569 patch 8.2.4198: Vim9: the switch for executing instructions is too long
Problem:    Vim9: the switch for executing instructions is too long.
Solution:   Move some code to separate functions.
2022-01-23 20:00:42 +00:00
2a7aa83458 patch 8.2.4197: cannot use an import in the "expr" part of 'spellsuggest'
Problem:    Cannot use an import in the "expr" part of 'spellsuggest'.
Solution:   Set the script context when evaluating "expr" of 'spellsuggest'.
2022-01-23 17:59:06 +00:00
428058ab32 patch 8.2.4196: various file types not recognized
Problem:    Various file types not recognized.
Solution:   Add patterns to recognize more file types (closes #9607)
2022-01-23 17:09:05 +00:00
79a6e25b79 patch 8.2.4195: resizing terminal may cause to behave like CTRL-Z
Problem:    Resizing terminal may cause to behave like CTRL-Z.
Solution:   Set "got_tstp" only when in_mch_suspend is set. (Dorian Bivolaru,
            closes #9602, closes #9586)
2022-01-23 16:41:14 +00:00
abe628e1bd patch 8.2.4194: MS-Windows: code for calculating font size is duplicated
Problem:    MS-Windows: code for calculating font size is duplicated.
Solution:   Move the code to a function. (Ken Takata, closes #9603)
2022-01-23 16:25:17 +00:00
f4e88f2152 patch 8.2.4193: cannot use an import in 'charconvert'
Problem:    Cannot use an import in 'charconvert'.
Solution:   Set the script context when evaluating 'charconvert'.  Also expand
            script-local functions in 'charconvert'.
2022-01-23 14:17:28 +00:00
7ef4a2fe37 patch 8.2.4192: cannot use an import in 'printexpr'
Problem:    Cannot use an import in 'printexpr'.
Solution:   Set the script context when evaluating 'printexpr'.
2022-01-23 13:44:35 +00:00
e15ebeffb3 patch 8.2.4191: json5 files are not recognized
Problem:    json5 files are not recognized.
Solution:   Add a pattern for json5 files. (closes #9601)
2022-01-23 13:05:39 +00:00
206919191f patch 8.2.4190: all conceal tests are skipped without the screendumps feature
Problem:    All conceal tests are skipped without the screendumps feature.
Solution:   Only skip the tests that use screendumps. (closes #9599)
2022-01-23 12:42:55 +00:00
d1c58999c8 patch 8.2.4189: MS-Windows: code for "old look" is obsolete
Problem:    MS-Windows: code for "old look" is obsolete.
Solution:   Delete obsolete code.  Use "MS Shell Dlg" font. (Ken Takata,
            closes #9596)
2022-01-23 12:31:57 +00:00
6f4754b9f7 Update runtime files 2022-01-23 12:07:04 +00:00
bcfa11b7df patch 8.2.4188: not all gitconfig files are recognized
Problem:    Not all gitconfig files are recognized.
Solution:   Add a few more patterns. (Tim Pope, closes #9597)
2022-01-23 11:28:16 +00:00
ff5cbe8133 patch 8.2.4187: gnuplot file not recognized
Problem:    Gnuplot file not recognized.
Solution:   Recognize ".gnuplot". (closes #9588)
2022-01-23 11:19:37 +00:00
36c2add7f8 patch 8.2.4186: cannot use an import in 'patchexpr'
Problem:    Cannot use an import in 'patchexpr'.
Solution:   Set the script context when evaluating 'patchexpr'.  Do not
            require 'patchexpr' to return a bool, it was ignored anyway.
2022-01-22 20:55:30 +00:00
28e60cc088 patch 8.2.4185: cannot use an import in 'indentexpr'
Problem:    Cannot use an import in 'indentexpr'.
Solution:   Set the script context when evaluating 'indentexpr'
2022-01-22 20:32:00 +00:00
47bcc5f4c8 patch 8.2.4184: cannot use an import in 'includeexpr'
Problem:    Cannot use an import in 'includeexpr'.
Solution:   Set the script context when evaluating 'includeexpr'
2022-01-22 20:19:22 +00:00
3ba685eeef patch 8.2.4183: cannot use an import in 'formatexpr'
Problem:    Cannot use an import in 'formatexpr'.
Solution:   Set the script context when evaluating 'formatexpr'.
2022-01-22 19:17:31 +00:00
39b8944539 patch 8.2.4182: memory leak when evaluating 'diffexpr'
Problem:    Memory leak when evaluating 'diffexpr'.
Solution:   Use free_tv() instead of clear_tv().
2022-01-22 18:21:36 +00:00
7b29f6a394 patch 8.2.4181: Vim9: cannot use an import in 'diffexpr'
Problem:    Vim9: cannot use an import in 'diffexpr'.
Solution:   Set the script context when evaluating 'diffexpr'.  Do not require
            'diffexpr' to return a bool, it was ignored anyway.
2022-01-22 17:58:13 +00:00
5600a709f4 patch 8.2.4180: 'balloonexpr' is evaluated in the current script context
Problem:    'balloonexpr' is evaluated in the current script context.
Solution:   Use the script context where the option was set.
2022-01-22 15:09:36 +00:00
9530b580a7 patch 8.2.4179: 'foldtext' is evaluated in the current script context
Problem:    'foldtext' is evaluated in the current script context.
Solution:   Use the script context where the option was set.
2022-01-22 13:39:08 +00:00
0bfa84916d patch 8.2.4178: Vim9: invalid error for return type of lambda when debugging
Problem:    Vim9: invalid error for return type of lambda when debugging.
Solution:   Do not check the return type of a lambda. (closes #9589)
2022-01-22 12:27:04 +00:00
b697dc295d patch 8.2.4177: Vim9: autoload script not loaded after "vim9script noclear"
Problem:    Vim9: autoload script not loaded after "vim9script noclear".
Solution:   Check IMP_FLAGS_AUTOLOAD properly.
2022-01-22 11:27:29 +00:00
3d8e25a6d2 patch 8.2.4176: Vim9: cannot use imported function with call()
Problem:    Vim9: cannot use imported function with call().
Solution:   Translate the function name. (closes #9590)
2022-01-22 11:00:02 +00:00
0bd663a380 patch 8.2.4175: MS-Windows: runtime check for multi-line balloon is obsolete
Problem:    MS-Windows: runtime check for multi-line balloon is obsolete.
Solution:   Remove the obsolete code. (Ken Takata, closes #9592)
2022-01-22 10:24:47 +00:00
19e69a6330 patch 8.2.4174: Vim9: can use an autoload name in normal script
Problem:    Vim9: can use an autoload name in normal script.
Solution:   Disallow using an autoload name.
2022-01-21 20:37:05 +00:00
e70dd11ef4 patch 8.2.4173: cannot use an import in 'foldexpr'
Problem:    Cannot use an import in 'foldexpr'.
Solution:   Set the script context to where 'foldexpr' was set. (closes #9584)
            Fix that the script context was not set for all buffers.
2022-01-21 16:31:11 +00:00
6517f14165 patch 8.2.4172: filetype detection for BASIC is not optimal
Problem:    Filetype detection for BASIC is not optimal.
Solution:   Improve BASIC filetype detection. (Doug Kearns)
2022-01-21 14:55:13 +00:00
f0e7e6365e patch 8.2.4171: cannot invoke option function using autoload import
Problem:    Cannot invoke option function using autoload import.
Solution:   Expand the import to an autoload function name. (closes #9578)
2022-01-21 13:29:56 +00:00
b7057bdd09 patch 8.2.4170: MS-Windows: still using old message API calls
Problem:    MS-Windows: still using old message API calls.
Solution:   Call the "W" functions directly. (Ken Takata, closes #9582)
2022-01-21 11:37:07 +00:00
45f9cfbdc7 patch 8.2.4169: MS-Windows: unnessary casts and other minor things
Problem:    MS-Windows: unnessary casts and other minor things.
Solution:   Clean up the MS-Windows code. (Ken Takata, closes #9583)
2022-01-21 11:11:00 +00:00
e6a4200ff4 patch 8.2.4168: disallowing empty function name breaks existing plugins
Problem:    Disallowing empty function name breaks existing plugins.
Solution:   Allow empty function name in legacy script.
2022-01-21 10:32:58 +00:00
dd5893be34 patch 8.2.4167: Vim9: error message for old style import
Problem:    Vim9: error message for old style import.
Solution:   Use another error message.  Add a test.
2022-01-20 21:32:54 +00:00
e615db0604 patch 8.2.4166: undo synced when switching buffer in another window
Problem:    Undo synced when switching buffer in another window.
Solution:   Do not sync undo when not needed. (closes #9575)
2022-01-20 21:00:54 +00:00
05386ca1d4 patch 8.2.4165: the nv_g_cmd() function is too long
Problem:    The nv_g_cmd() function is too long.
Solution:   Move code to separate functions. (Yegappan Lakshmanan,
            closes #9576)
2022-01-20 20:18:27 +00:00
6f0ddbf00d patch 8.2.4164: error in legacy code for function shadowing variable
Problem:    Error in legacy code for function shadowing variable.
Solution:   Only give the error in Vim9 script.
2022-01-20 19:56:49 +00:00
2017d6f3b1 patch 8.2.4163: no error for omitting function name after autoload prefix
Problem:    No error for omitting function name after autoload prefix.
Solution:   Check for missing function name. (issue #9577)
2022-01-20 19:38:46 +00:00
9c7cae66bc patch 8.2.4162: Vim9: no error for redefining function with export
Problem:    Vim9: no error for redefining function with export.
Solution:   Check for existing function with/without prefix. (closes #9577)
2022-01-20 19:10:25 +00:00
21f0d6cbca patch 8.2.4161: Vim9: warning for missing white space after imported variable
Problem:    Vim9: warning for missing white space after imported variable.
Solution:   Do not skip white space. (closes #9567)
2022-01-20 17:35:49 +00:00
4ede01f188 patch 8.2.4160: cannot change the register used for Select mode delete
Problem:    Cannot change the register used for Select mode delete.
Solution:   Make CTRL-R set the register to be used when deleting text for
            Select mode. (Shougo Matsushita, closes #9531)
2022-01-20 15:26:03 +00:00
92000e2e71 patch 8.2.4159: MS-Windows: _WndProc() is very long
Problem:    MS-Windows: _WndProc() is very long.
Solution:   Move code to separate functions. (Ken Takata, closes #9573)
2022-01-20 15:10:57 +00:00
14b8d6ac6b patch 8.2.4158: MS-Windows: memory leak in :browse
Problem:    MS-Windows: memory leak in :browse.
Solution:   Free stuff before returning. (Ken Takata, closes #9574)
2022-01-20 15:05:22 +00:00
ae1bd87fe8 patch 8.2.4157: terminal test fails because Windows sets the title
Problem:    Terminal test fails because Windows sets the title.
Solution:   Add the "vterm_title" testing override and use it in the test.
            (Ozaki Kiichi, closes #9556)
2022-01-20 14:57:29 +00:00
726f7f91fd patch 8.2.4156: fileinfo message overwrites echo'ed message
Problem:    Fileinfo message overwrites echo'ed message.
Solution:   Reset need_fileinfo when displaying a message. (Rob Pilling,
            closes #9569)
2022-01-20 14:44:38 +00:00
7e93577a95 patch 8.2.4155: translating strftime() argument results in check error
Problem:    Translating strftime() argument results in check error.
Solution:   Add gettext comment.
2022-01-20 14:25:57 +00:00
05b2761548 patch 8.2.4154: ml_get error when exchanging windows in Visual mode
Problem:    ml_get error when exchanging windows in Visual mode.
Solution:   Correct end of Visual area when entering another buffer.
2022-01-20 13:32:50 +00:00
4ac893f321 patch 8.2.4153: MS-Windows: Global IME is no longer supported
Problem:    MS-Windows: Global IME is no longer supported.
Solution:   Remove the Global IME implementation. (Ken Takata, closes #9562)
2022-01-20 12:44:28 +00:00
fc6ccebea6 patch 8.2.4152: block insert with double wide character fails
Problem:    Block insert with double wide character fails.
Solution:   Adjust the expected output.
2022-01-20 12:22:35 +00:00
57df9e8a9f patch 8.2.4151: reading beyond the end of a line
Problem:    Reading beyond the end of a line.
Solution:   For block insert only use the offset for correcting the length.
2022-01-20 12:10:48 +00:00
8aa0e6c60d patch 8.2.4150: Coverity warns for using pointer after free
Problem:    Coverity warns for using pointer after free.
Solution:   Swap statements, even though using the pointer is no problem.
2022-01-20 11:27:58 +00:00
ca34db3bde patch 8.2.4149: test override not restored, autocommand left behind
Problem:    Test override not restored, autocommand left behind.
Solution:   Correct restoring test override.  Delete autocommand afterwards.
2022-01-20 11:17:18 +00:00
f61c89d2e6 patch 8.2.4148: deleting any mapping may cause <ScritpCmd> to fail
Problem:    Deleting any mapping may cause <ScritpCmd> to not set the script
            context.
Solution:   Only reset last_used_map if it is the deleted mapping.
            (closes #9568)
2022-01-19 22:51:48 +00:00
bed34f0a8a patch 8.2.4147: E464 does not always include the offending command
Problem:    E464 does not always include the offending command.
Solution:   Add another error message with "%s". (closes #9564)
2022-01-19 20:48:37 +00:00
f67c717e34 patch 8.2.4146: Vim9: shadowed function can be used in compiled function
Problem:    Vim9: shadowed function can be used in compiled function but not
            at script level.
Solution:   Also give an error in a compiled function. (closes #9563)
2022-01-19 17:23:05 +00:00
937610bc9f patch 8.2.4145: confusing error when using name of import for a function
Problem:    Confusing error when using name of import for a function.
Solution:   Pass a flag to trans_function_name().
2022-01-19 17:21:29 +00:00
1a8825d7a3 patch 8.2.4144: cannot load libsodium dynamically
Problem:    Cannot load libsodium dynamically.
Solution:   Support dynamic loading on MS-Windows. (Ken Takata, closes #9554)
2022-01-19 13:32:57 +00:00
b0b2b73dca patch 8.2.4143: MS-Windows: IME support for Win9x is obsolete
Problem:    MS-Windows: IME support for Win9x is obsolete.
Solution:   Remove the Win9x code. (Ken Takata, closes #9559)
2022-01-19 12:59:21 +00:00
b4868eddd9 patch 8.2.4142: build failure with normal features without persistent undo
Problem:    Build failure with normal features without persistent undo.
Solution:   Adjust #ifdef. (closes #9557)
2022-01-19 11:24:40 +00:00
17dd519633 patch 8.2.4141: Vim9 builtin functions test fails
Problem:    Vim9 builtin functions test fails.
Solution:   Add "scriptversion" item to maparg() result.
2022-01-18 21:42:37 +00:00
a9528b39a6 patch 8.2.4140: maparg() does not indicate the type of script
Problem:    maparg() does not indicate the type of script where it was defined.
Solution:   Add "scriptversion".
2022-01-18 20:51:35 +00:00
94075b2b0e patch 8.2.4139: using freed memory in expression abbreviation
Problem:    Using freed memory if an expression abbreviation deletes the
            abbreviation.
Solution:   Do not access the pointer after evaluating the expression.
2022-01-18 20:30:39 +00:00
ef7aadbe36 patch 8.2.4138: Vim9: no error for return with argument when invalid
Problem:    Vim9: no error for return with argument when the function does not
            return anything.
Solution:   Give an error for the invalid argument. (issue #9497)
2022-01-18 18:46:07 +00:00
d02dce2bb5 patch 8.2.4137: Vim9: calling import with and without method is inconsistent
Problem:    Vim9: calling import with and without method is inconsistent.
Solution:   Set a flag that a parenthsis follows to compile_load_scriptvar().
            Add some more tests.  Improve error message.
2022-01-18 17:43:04 +00:00
fd218c8a36 patch 8.2.4136: Vim9: the "autoload" argument of ":vim9script" is not useful
Problem:    Vim9: the "autoload" argument of ":vim9script" is not useful.
Solution:   Remove the argument. (closes #9555)
2022-01-18 16:26:24 +00:00
6079da7cfb patch 8.2.4135: Vim9: ":scriptnames" shows unloaded imported autoload script
Problem:    Vim9: ":scriptnames" shows unloaded imported autoload script.
Solution:   Mark the unloaded script with "A". (closes #9552)
2022-01-18 14:16:59 +00:00
113b8dc111 patch 8.2.4134: MS-Windows: test for import with absolute path fails
Problem:    MS-Windows: test for import with absolute path fails.
Solution:   Handle path starting with slash as an absolute path.
2022-01-18 13:43:58 +00:00
840f16202e patch 8.2.4133: output of ":scriptnames" goes into the message history
Problem:    output of ":scriptnames" goes into the message history, while this
            des not happen for other commands, such as ":ls".
Solution:   Use msg_outtrans() instead of smsg(). (closes #9551)
2022-01-18 13:34:05 +00:00
1836d61578 patch 8.2.4132: Vim9: wrong error message when autoload script can't be found
Problem:    Vim9: wrong error message when autoload script can't be found.
Solution:   Correct check for using autoload with wrong name.
2022-01-18 13:14:47 +00:00
cbbc48f64b patch 8.2.4131: Vim9: calling function in autoload import does not work
Problem:    Vim9: calling function in autoload import does not work in a :def
            function.
Solution:   When a variable is not found and a PCALL follows use a funcref.
            (closes #9550)
2022-01-18 12:58:28 +00:00
31dcc8de46 patch 8.2.4130: MS-Windows: MSVC build may have libraries duplicated
Problem:    MS-Windows: MSVC build may have libraries duplicated.
Solution:   Improve the MSVC Makefile. (Ken Takata, closes #9547)
2022-01-18 11:34:57 +00:00
1247126956 patch 8.2.4129: building with +sound but without +eval fails
Problem:    Building with +sound but without +eval fails. (Dominique Pellé)
Solution:   Disable canberra in tiny and small build. (closes #9548)
2022-01-18 11:11:25 +00:00
64283d5e1f patch 8.2.4128: crash when method cannot be found
Problem:    Crash when method cannot be found. (Christian J. Robinson)
Solution:   Don't mix up pointer names.
2022-01-18 10:37:29 +00:00
78f60322f7 patch 8.2.4127: build failure without the +eval feature
Problem:    Build failure without the +eval feature.
Solution:   Add #ifdef.
2022-01-17 22:16:33 +00:00
afa76e1cf2 patch 8.2.4126: crash on exit when built with dynamic Tcl
Problem:    Crash on exit when built with dynamic Tcl and EXITFREE is defined.
            (Dominique Pellé)
Solution:   Only call Tcl_Finalize() when initialized. (closes #9546)
2022-01-17 21:34:38 +00:00
b3d9ceed2b patch 8.2.4125: completion tests fail
Problem:    Completion tests fail.
Solution:   Disable error messages while dereferencing the function name.
2022-01-17 21:13:28 +00:00
6389baa669 patch 8.2.4124: Vim9: method in compiled function may not see script item
Problem:    Vim9: method in compiled function may not see script item.
Solution:   Make sure not to skip to the next line. (closes #9496)
2022-01-17 20:50:40 +00:00
15d1635e50 patch 8.2.4123: complete function cannot be import.Name
Problem:    Complete function cannot be import.Name.
Solution:   Dereference the function name if needed.  Also: do not see
            "import.Name" as a builtin function. (closes #9541)
2022-01-17 20:09:08 +00:00
3f3597be3f patch 8.2.4122: ":command Cmd" does not show custom completion argument
Problem:    ":command Cmd" does not show custom completion argument.
Solution:   Show the completion argument when using ":verbose".
2022-01-17 19:06:56 +00:00
262898ae43 patch 8.2.4121: Visual test fails on MS-Windows
Problem:    Visual test fails on MS-Windows.
Solution:   Set 'isprint' so that the character used is not printable.
2022-01-17 17:52:22 +00:00
9f8c304c8a patch 8.2.4120: block insert goes over the end of the line
Problem:    Block insert goes over the end of the line.
Solution:   Handle invalid byte better.  Fix inserting the wrong text.
2022-01-17 17:30:21 +00:00
e8741a73e2 patch 8.2.4119: build failure when disabling the channel feature
Problem:    Build failure when disabling the channel feature.
Solution:   Adjust #ifdef. (Dominique Pellé, closes #9545)
2022-01-17 11:23:45 +00:00
0023f82a76 patch 8.2.4118: using UNUSED for argument that is used
Problem:    Using UNUSED for argument that is used.
Solution:   Remove UNUSED.
2022-01-16 21:54:19 +00:00
47036b6bd7 patch 8.2.4117: Vim9: wrong white space error after using imported item
Problem:    Vim9: wrong white space error after using imported item.
Solution:   Don't skip over white space. (closes #9544)
2022-01-16 21:18:53 +00:00
c73499351a patch 8.2.4116: Vim9: cannot use a method with a complex expression in :def
Problem:    Vim9: cannot use a method with a complex expression in a :def
            function.
Solution:   Implement compiling the expression.
2022-01-16 20:59:39 +00:00
c665dabdf4 patch 8.2.4115: cannot use a method with a complex expression
Problem:    Cannot use a method with a complex expression.
Solution:   Evaluate the expression after "->" and use the result.
2022-01-16 19:38:07 +00:00
c84287d6d8 patch 8.2.4114: Vim9: type checking for a funcref does not work for method
Problem:    Vim9: type checking for a funcref does not work for when it is
            used in a method.
Solution:   Pass the base to where the type is checked.
2022-01-16 18:06:21 +00:00
dc98776f89 patch 8.2.4113: typo on DOCMD_RANGEOK results in not recognizing command
Problem:    Typo on DOCMD_RANGEOK results in not recognizing command.
Solution:   Correct the typo. (closes #9539)
2022-01-16 15:52:35 +00:00
d9b74a2a41 patch 8.2.4112: function not deleted at end of test
Problem:    Function not deleted at end of test.
Solution:   Delete the function.
2022-01-16 15:00:08 +00:00
d648c01f2f patch 8.2.4111: potential proglem when map is deleted while executing
Problem:    Potential proglem when map is deleted while executing.
Solution:   Reset last used map pointer when deleting a mapping.
2022-01-16 14:58:34 +00:00
8f9956994d patch 8.2.4110: Coverity warns for using NULL pointer
Problem:    Coverity warns for using NULL pointer.
Solution:   Check "evalarg" is not NULL.  Skip errors when "verbose" is false.
2022-01-16 14:51:30 +00:00
fd31be29b8 Update runtime files 2022-01-16 14:46:06 +00:00
c81e9bf4f0 patch 8.2.4109: MS-Windows: high dpi support is outdated
Problem:    MS-Windows: high dpi support is outdated.
Solution:   Improve High DPI support by using PerMonitorV2. (closes #9525,
            closes #3102)
2022-01-16 14:15:49 +00:00
f6ebc82004 patch 8.2.4108: going over the end of the w_lines array
Problem:    Going over the end of the w_lines array.
Solution:   Check not going over the end and limit to Rows. (issue #9540)
2022-01-16 13:58:33 +00:00
a9725221ac patch 8.2.4107: script context not restored after using <ScriptCmd>
Problem:    Script context not restored after using <ScriptCmd>.
Solution:   Also restore context when not in a script. (closes #9536)
            Add the 'c' flag to feedkeys() to be able to test this.
2022-01-16 13:30:33 +00:00
fa1a457059 patch 8.2.4106: going over the end of the w_lines array
Problem:    Going over the end of the w_lines array.
Solution:   Break out of the loop when "idx" is too big. (issue #9540)
2022-01-16 11:42:20 +00:00
b5988e3656 patch 8.2.4105: translation related comment in the wrong place
Problem:    Translation related comment in the wrong place.
Solution:   Move it back with the text. (Ken Takata, closes #9537)
2022-01-16 11:25:26 +00:00
bfac409d0b patch 8.2.4104: Vim9: lower casing the autoload prefix causes problems
Problem:    Vim9: lower casing the autoload prefix causes problems.
Solution:   Always store the prefix with case preserved.
2022-01-16 11:12:12 +00:00
38ecd97226 patch 8.2.4103: Vim9: variable declared in for loop not initialzed
Problem:    Vim9: variable declared in for loop not initialzed.
Solution:   Always initialze the variable. (closes #9535)
2022-01-15 21:44:44 +00:00
857c8bb1bb patch 8.2.4102: Vim9: import cannot be used after method
Problem:    Vim9: import cannot be used after method.
Solution:   Recognize an imported function name. (closes #9496)
2022-01-15 21:08:19 +00:00
d4e2f50901 patch 8.2.4101: warning for unused argument in tiny version
Problem:    Warning for unused argument in tiny version.
Solution:   Add "UNUSED".
2022-01-15 18:48:32 +00:00
04b871da80 patch 8.2.4100: early return when getting the 'formatlistpat' value
Problem:    Early return when getting the 'formatlistpat' value.
Solution:   Remove the first line. (Christian Brabandt)
2022-01-15 18:31:43 +00:00
e32c3c462c patch 8.2.4099: Vim9: cannot use Vim9 syntax in mapping
Problem:    Vim9: cannot use Vim9 syntax in mapping.
Solution:   Add <ScriptCmd> to use the script context for a command.
2022-01-15 18:26:04 +00:00
069613c9e8 patch 8.2.4098: typing "interrupt" at debug prompt may keep exception around
Problem:    Typing "interrupt" at debug prompt may keep exception around,
            causing function calls to fail.
Solution:   Discard any exception at the toplevel. (closes #9532)
2022-01-15 15:23:44 +00:00
f60a63485e patch 8.2.4097: wrong number in error message on 32 bit system
Problem:    Wrong number in error message on 32 bit system. (John Paul Adrian
            Glaubitz)
Solution:   Add type cast. (closes #9527)
2022-01-15 14:16:37 +00:00
1050476ead patch 8.2.4096: Linux CI: unnecessarily installing packages
Problem:    Linux CI: unnecessarily installing packages
Solution:   Only install packages for huge build.  (Ozaki Kiichi,
            closes #9530)
2022-01-15 13:37:14 +00:00
e3ce17a3ca patch 8.2.4095: sed script not recognized by the first line
Problem:    Sed script not recognized by the first line.
Solution:   Recognize a sed script starting with "#n". (Doug Kearns)
2022-01-15 12:27:09 +00:00
e1833bfd01 patch 8.2.4094: 'virtualedit' is window-local but using buffer-local enum
Problem:    'virtualedit' is window-local but using buffer-local enum.
Solution:   Use window-local enum. (closes #9529)
2022-01-15 10:52:16 +00:00
c53b467473 patch 8.2.4093: cached breakindent values not initialized properly
Problem:    Cached breakindent values not initialized properly.
Solution:   Initialize and cache formatlistpat. (Christian Brabandt,
            closes #9526, closes #9512)
2022-01-15 10:01:05 +00:00
ece07639f4 patch 8.2.4092: MacOS CI: unnecessarily doing "Install packages"
Problem:    MacOS CI: unnecessarily doing "Install packages".
Solution:   Only do "Install packages" for huge build.  (Ozaki Kiichi,
            closes #9521)
2022-01-14 21:28:59 +00:00
0f112052ac patch 8.2.4091: virtcol is recomputed for statusline unnecessarily
Problem:    Virtcol is recomputed for statusline unnecessarily.
Solution:   Just use "w_virtcol". (closes #9523)
2022-01-14 20:11:38 +00:00
26ebf1f036 patch 8.2.4090: after restoring a session buffer order can be quite different
Problem:    After restoring a session buffer order can be quite different.
Solution:   Create buffers first. (Evgeni Chasnovski, closes #9520)
2022-01-14 13:19:43 +00:00
7bfa6d698e patch 8.2.4089: terminal test for current directory fails on FreeBSD
Problem:    Terminal test for current directory fails on FreeBSD.
Solution:   Skip the test.
2022-01-14 12:06:47 +00:00
c0a1d370fa patch 8.2.4088: xxd cannot output everything in one line
Problem:    Xxd cannot output everything in one line.
Solution:   Make zero columns mean infinite columns. (Erik Auerswald,
            closes #9524)
2022-01-14 11:58:48 +00:00
3e4fa3d7d3 patch 8.2.4087: cannot test items from an autoload script easily
Problem:    Cannot test items from an autoload script easily.
Solution:   Add the "autoload" value for test_override().
2022-01-13 22:05:09 +00:00
d9d2fd0aa3 patch 8.2.4086: "cctx" argument of find_func_even_dead() is unused
Problem:    "cctx" argument of find_func_even_dead() is unused.
Solution:   Remove the argument.
2022-01-13 21:15:21 +00:00
c43e6235c7 patch 8.2.4085: Vim9: no test for using import in legacy script
Problem:    Vim9: no test for using import in legacy script.
Solution:   Add a test.
2022-01-13 20:51:56 +00:00
130f65d46b patch 8.2.4084: memory leak when looking for autoload prefixed variable
Problem:    Memory leak when looking for autoload prefixed variable.
Solution:   Free the concatenated string.
2022-01-13 20:39:41 +00:00
0e3e7ba05f patch 8.2.4083: Vim9: no test for "vim9script autoload' using script variable
Problem:    Vim9: no test for "vim9script autoload' and using script variable
            in the same script.
Solution:   Add a simple test.  Fix uncovered problem.
2022-01-13 20:18:56 +00:00
3049fcf0a1 patch 8.2.4082: check for autoload file name and prefix fails
Problem:    Check for autoload file name and prefix fails. (Christian J.
            Robinson)
Solution:   Only lower case the prefix on systems where the file name is not
            case sensitive.
2022-01-13 19:25:50 +00:00
4050305bfd patch 8.2.4081: CodeQL reports problem in if_cscope causing it to fail
Problem:    CodeQL reports problem in if_cscope causing it to fail.
Solution:   Use execvp() instead of execl().  Merge the header file into the
            source file. (Ozaki Kiichi, closes #9519)
2022-01-13 18:09:11 +00:00
a00e622a29 patch 8.2.4080: not sufficient test coverage for xxd
Problem:    Not sufficient test coverage for xxd.
Solution:   Add a few more test cases. (Erki Auerswald, closes #9515)
2022-01-13 17:42:28 +00:00
33b25d1317 patch 8.2.4079: MS-Windows: "gvim --version" didn't work with VIMDLL
Problem:    MS-Windows: "gvim --version" didn't work when build with VIMDLL.
Solution:   Adjust #ifdef. (Ken Takata, closes #9517)
2022-01-13 16:06:45 +00:00
ced2b38a56 patch 8.2.4078: terminal test for current directory not used on FreeBSD
Problem:    Terminal test for current directory not used on FreeBSD.
Solution:   Make it work on FreeBSD. (Ozaki Kiichi, closes #9516) Add
            TermWait() inside Run_shell_in_terminal() as a generic solution.
2022-01-13 15:25:32 +00:00
8d9e470aa9 patch 8.2.4077: not all Libsensors files are recognized
Problem:    Not all Libsensors files are recognized.
Solution:   Add "sensors.d/*" pattern. (Doug Kearns)
2022-01-13 14:49:10 +00:00
71930f174d patch 8.2.4076: memory leak in autoload import
Problem:    Memory leak in autoload import.
Solution:   Do not overwrite the autoload prefix.
2022-01-13 13:47:43 +00:00
78a70533c3 patch 8.2.4075: test failures
Problem:    Test failures.
Solution:   Change check for NULL pointer.
2022-01-13 13:24:34 +00:00
de05bb2573 patch 8.2.4074: going over the end of NameBuff
Problem:    Going over the end of NameBuff.
Solution:   Check length when appending a space.
2022-01-13 13:08:14 +00:00
54598066ca patch 8.2.4073: Coverity warns for using NULL pointer
Problem:    Coverity warns for using NULL pointer.
Solution:   Bail out when running out of memory. Check for running over end of
            a string.
2022-01-13 12:05:09 +00:00
d041f4208b patch 8.2.4072: Vim9: compiling function fails when autoload is not loaded
Problem:    Vim9: compiling function fails when autoload script is not loaded
            yet.
Solution:   Depend on runtime loading.
2022-01-12 19:54:00 +00:00
53c296112e patch 8.2.4071: Vim9: no detection of return in try/endtry
Problem:    Vim9: no detection of return in try/endtry. (Dominique Pellé)
Solution:   Check if any of the blocks inside try/endtry did not end in
            return.
2022-01-12 16:18:18 +00:00
f5d639a8af patch 8.2.4070: using uninitialized memory when reading empty file
Problem:    Using uninitialized memory when reading empty file.
Solution:   Check for empty file before checking for NL. (Dominique Pellé,
            closes #9511)
2022-01-12 15:24:40 +00:00
5d9826973d patch 8.2.4069: Vim9: import test fails on MS-Windows
Problem:    Vim9: import test fails on MS-Windows.
Solution:   Ignore case.  Adjust test to avoid name that only differs in case.
2022-01-12 15:15:27 +00:00
f479cac084 patch 8.2.4068: Vim9: import test fails
Problem:    Vim9: import test fails.
Solution:   Add missing change.
2022-01-12 12:54:55 +00:00
f111cdfae6 patch 8.2.4067: Vim9: cannot call imported function with :call
Problem:    Vim9: cannot call imported function with :call. (Drew Vogel)
Solution:   Translate the function name. (closes #9510)
2022-01-12 12:48:17 +00:00
17d36cbcd3 patch 8.2.4066: Vim9: imported autoload script loaded again
Problem:    Vim9: imported autoload script loaded again.
Solution:   Do not create a new imported_T every time.
2022-01-12 11:46:40 +00:00
3cf21b3051 patch 8.2.4065: computation overflow with large cound for :yank
Problem:    Computation overflow with large cound for :yank.
Solution:   Avoid an overflow.
2022-01-11 19:34:16 +00:00
2284f6cca3 patch 8.2.4064: foam files are not detected
Problem:    Foam files are not detected.
Solution:   Detect the foam filetype by the path and file contents. (Mohammed
            Elwardi Fadeli, closes #9501)
2022-01-11 18:14:23 +00:00
b8822442d7 patch 8.2.4063: Vim9: exported function in autoload script not found
Problem:    Vim9: exported function in autoload script not found. (Yegappan
            Lakshmanan)
Solution:   Use the autoload prefix to search for the function.
2022-01-11 15:24:05 +00:00
0bbca540f7 patch 8.2.4062: match highlighting of tab too short
Problem:    Match highlighting of tab too short.
Solution:   Do not stop match highlighting if on a Tab. (Christian Brabandt,
            closes #9507, closes #9500)
2022-01-11 13:14:54 +00:00
0d47ad4027 patch 8.2.4061: codecov bash script is deprecated
Problem:    Codecov bash script is deprecated.
Solution:   Use the codecov action. (Ozaki Kiichi, closes #9505)
2022-01-11 13:05:26 +00:00
d6f27c66cc patch 8.2.4060: win_execute() slow on systems where getcwd()/chdir() is slow
Problem:    win_execute() is slow on systems where getcwd() or chdir() is
            slow. (Rick Howe)
Solution:   Avoid using getcwd() and chdir() if no local directory is used and
            'acd' is not set. (closes #9504)
2022-01-11 12:37:20 +00:00
19db9e6ba7 patch 8.2.4059: Vim9: an expression of a map cannot access script-local items
Problem:    Vim9: an expression of a map cannot access script-local items.
            (Maxim Kim)
Solution:   Use the script ID of where the map was defined.
2022-01-11 11:58:19 +00:00
762838218f patch 8.2.4058: Vim9: import test failure in wrong line
Problem:    Vim9: import test failure in wrong line.
Solution:   Adjust line number.
2022-01-10 21:39:03 +00:00
160aa86a9d patch 8.2.4057: Vim9: not fully implementing the autoload mechanism
Problem:    Vim9: not fully implementing the autoload mechanism.
Solution:   Allow for exporting a legacy function.  Improve test coverage.
2022-01-10 21:29:57 +00:00
6990b78f25 patch 8.2.4056: Vim9: memory leak when exporting function in autoload script
Problem:    Vim9: memory leak when exporting function in autoload script.
Solution:   Fee the name if replacing it.
2022-01-10 19:21:06 +00:00
5e6b9882fe patch 8.2.4055: Vim9: line break in expression causes v:errmsg to be fillec
Problem:    Vim9: line break in expression causes v:errmsg to be filled.
            (Yegappan Lakshmanan)
Solution:   Do not give an error when skipping over an expression.
2022-01-10 18:50:52 +00:00
577bd85d55 patch 8.2.4054: Vim9 script test fails
Problem:    Vim9 script test fails.
Solution:   Add missing change.
2022-01-10 18:42:52 +00:00
fe2ef0b2cd patch 8.2.4053: Vim9: autoload mechanism doesn't fully work yet
Problem:    Vim9: autoload mechanism doesn't fully work yet.
Solution:   Define functions and variables with their autoload name, add the
            prefix when calling a function, find the variable in the table of
            script variables.
2022-01-10 18:08:00 +00:00
ee63031b57 patch 8.2.4052: not easy to resize a window from a plugin
Problem:    Not easy to resize a window from a plugin.
Solution:   Add win_move_separator() and win_move_statusline() functions.
            (Daniel Steinberg, closes #9486)
2022-01-10 13:36:34 +00:00
b06cfcf5a3 patch 8.2.4051: compiler complains about possibly uninitialized variable
Problem:    Compiler complains about possibly uninitialized variable.
Solution:   Add code to avoid a compiler warning. (John Marriott)
2022-01-10 11:26:33 +00:00
dc4451df61 patch 8.2.4050: Vim9: need to prefix every item in an autoload script
Problem:    Vim9: need to prefix every item in an autoload script.
Solution:   First step in supporting "vim9script autoload" and "import
            autoload".
2022-01-09 21:36:37 +00:00
5f25c38550 patch 8.2.4049: Vim9: reading before the start of the line with "$"
Problem:    Vim9: reading before the start of the line with "$" by itself.
Solution:   Do not subtract one when reporting the error.
2022-01-09 13:36:28 +00:00
c14f667626 patch 8.2.4048: gcc complains about use of "%p" in printf
Problem:    gcc complains about use of "%p" in printf.
Solution:   Add (void *) typecast. (Dominique Pellé, closes #9494)
2022-01-09 12:57:48 +00:00
f85a424c83 patch 8.2.4047: depending on the build features error messages are unused
Problem:    Depending on the build features error messages are unused.
Solution:   Add #ifdefs. (Dominique Pellé, closes #9493)
2022-01-09 12:49:31 +00:00
2f0936cb9a Update runtime files 2022-01-08 21:51:59 +00:00
b2810f123c patch 8.2.4046: some error messages not in the right place
Problem:    Some error messages not in the right place.
Solution:   Adjust the errors file.  Fix typo.
2022-01-08 21:38:52 +00:00
782b43d894 patch 8.2.4045: some global functions are only used in one file
Problem:    Some global functions are only used in one file.
Solution:   Make the functions static. (Yegappan Lakshmanan, closes #9492)
2022-01-08 18:43:40 +00:00
7c24dfddc2 patch 8.2.4044: Vim9: no error when importing the same script twice
Problem:    Vim9: no error when importing the same script twice.
Solution:   Give an error, unless it is a reload.
2022-01-08 17:03:55 +00:00
04935fb17e patch 8.2.4043: using int for second argument of ga_init2()
Problem:    Using int for second argument of ga_init2().
Solution:   Remove unnessary type cast (int) when using sizeof().
2022-01-08 16:19:22 +00:00
1433672568 patch 8.2.4042: Vim9: build error
Problem:    Vim9: build error.
Solution:   Use grow array instead of character pointer.
2022-01-08 16:02:59 +00:00
aa9b3cacd5 patch 8.2.4041: using unitialized pointer
Problem:    Using unitialized pointer.
Solution:   Store "ht" when variable is in another script.
2022-01-08 15:44:22 +00:00
9f1a39a5d1 patch 8.2.4040: keeping track of allocated lines is too complicated
Problem:    Keeping track of allocated lines in user functions is too
            complicated.
Solution:   Instead of freeing individual lines keep them all until the end.
2022-01-08 15:39:39 +00:00
67ffb41786 patch 8.2.4039: the xdiff library is linked in even when not used
Problem:    The xdiff library is linked in even when not used.
Solution:   Use configure to decide whether xdiff object files are included.
2022-01-08 13:36:57 +00:00
748b308eeb patch 8.2.4038: various code not used when features are disabled
Problem:    Various code not used when features are disabled.
Solution:   Add #ifdefs. (Dominique Pellé, closes #9491)
2022-01-08 12:41:16 +00:00
370791465e patch 8.2.4037: Insert mode completion is insufficiently tested
Problem:    Insert mode completion is insufficiently tested.
Solution:   Add more tests.  Fix uncovered memory leak. (Yegappan Lakshmanan,
            closes #9489)
2022-01-08 10:38:48 +00:00
d844862bce patch 8.2.4036: Vim9: script test file is getting too long
Problem:    Vim9: script test file is getting too long.
Solution:   Split the import/export functionality to a separate file.
2022-01-07 21:39:52 +00:00
48d0ac775c patch 8.2.4035: timer triggered at the debug prompt may cause trouble
Problem:    Timer triggered at the debug prompt may cause trouble.
Solution:   Do not trigger any timer at the debug prompt. (closes #9481)
2022-01-07 20:40:08 +00:00
62a099cc6d patch 8.2.4034: Coverity warns for possibly using a NULL pointer
Problem:    Coverity warns for possibly using a NULL pointer.
Solution:   Check v_partial is not NULL.
2022-01-07 20:18:16 +00:00
a4c96252b1 patch 8.2.4033: running filetype tests leaves directory behind
Problem:    Running filetype tests leaves directory behind.
Solution:   Delete the top directory. (closes #9483)
2022-01-07 20:07:46 +00:00
e12406526a patch 8.2.4032: ATTRIBUTE_NORETURN is not needed
Problem:    ATTRIBUTE_NORETURN is not needed.
Solution:   Use NORETURN(). (Ozaki Kiichi, closes #9487)
2022-01-07 20:01:07 +00:00
d1f34e64f0 patch 8.2.4031: crash in xterm with only two lines
Problem:    Crash in xterm with only two lines. (Dominique Pellé)
Solution:   Only perform xterm compatibility test if possible. (closes #9488)
2022-01-07 19:24:20 +00:00
71f21938bc patch 8.2.4030: a script local funcref is not found from a mapping
Problem:    A script local funcref is not found from a mapping.
Solution:   When looking for a function, also find a script-local funcref.
            (closes #9485)
2022-01-07 18:20:55 +00:00
b2d85e3784 patch 8.2.4029: debugging NFA regexp my crash, cached indent may be wrong
Problem:    Debugging NFA regexp my crash, cached indent may be wrong.
Solution:   Fix some debug warnings in the NFA regexp code.  Make sure log_fd
            is set when used.  Fix breakindent and indent caching. (Christian
            Brabandt, closes #9482)
2022-01-07 16:55:32 +00:00
cb1956d6f2 patch 8.2.4028: ml_get error with :doautoall and Visual area
Problem:    ml_get error with :doautoall and Visual area. (Sean Dewar)
Solution:   Disable Visual mode while executing autocommands.
2022-01-07 15:45:18 +00:00
2b04d5f1ef patch 8.2.4027: import test fails on MS-Windows
Problem:    Import test fails on MS-Windows.
Solution:   Use a different directory name.
2022-01-07 14:39:56 +00:00
e664a32701 patch 8.2.4026: ml_get error with specific win_execute() command
Problem:    ml_get error with specific win_execute() command. (Sean Dewar)
Solution:   Check cursor and Visual area are OK.
2022-01-07 14:08:03 +00:00
834d41853e patch 8.2.4025: error for import not ending in .vim does not work for .vimrc
Problem:    Error for import not ending in .vim does not work for .vimrc.
Solution:   Check that .vim is the end. (closes #9484)
2022-01-07 13:38:24 +00:00
32884ad753 patch 8.2.4024: confusing error message if imported name is used directly
Problem:    Confusing error message if imported name is used directly.
Solution:   Give a better error message.
2022-01-07 12:45:29 +00:00
a909c48bec patch 8.2.4023: using uninitialized variable
Problem:    Using uninitialized variable.
Solution:   Initialize "ufunc" also when an item is not exported.
2022-01-06 22:07:57 +00:00
11de43d2d4 patch 8.2.4022: two error messages in the wrong file
Problem:    Two error messages in the wrong file.
Solution:   Use the error message from errors.h.
2022-01-06 21:41:11 +00:00
2ef01d929d patch 8.2.4021: missing part of the :import changes
Problem:    Missing part of the :import changes.
Solution:   Add changes in vim9cmds.c.
2022-01-06 21:38:11 +00:00
84c62d59a3 patch 8.2.4020: debugger test fails
Problem:    Debugger test fails.
Solution:   Fix import statement.
2022-01-06 21:31:19 +00:00
d5f400c607 patch 8.2.4019: Vim9: import mechanism is too complicated
Problem:    Vim9: import mechanism is too complicated.
Solution:   Do not use the Javascript mechanism but a much simpler one.
2022-01-06 21:10:28 +00:00
18f4740f04 patch 8.2.4018: ml_get error when win_execute redraws with Visual selection
Problem:    ml_get error when win_execute redraws with Visual selection.
Solution:   Disable Visual area temporarily. (closes #9479)
2022-01-06 13:24:51 +00:00
a33737b6d8 patch 8.2.4017: gcc warns for misleading indent in Athena menu code
Problem:    Gcc warns for misleading indent in Athena menu code.
Solution:   Add curlies around the two statements. (Dominique Pellé,
            closes #9480)
2022-01-06 12:35:31 +00:00
58493cfae2 patch 8.2.4016: Vim9: incorrect error for argument that is shadowing var
Problem:    Vim9: incorrect error for argument that is shadowing var.
Solution:   Ignore variable that is not in block where the function was
            defined.
2022-01-06 12:23:30 +00:00
269dc63618 patch 8.2.4015: build failure with tiny features
Problem:    Build failure with tiny features. (Tony Mechelynck)
Solution:   Adjust #ifdefs.
2022-01-06 11:43:21 +00:00
c689f8c3d9 patch 8.2.4014: git and gitcommit file types not properly recognized
Problem:    Git and gitcommit file types not properly recognized.
Solution:   Adjust filetype detection. (Tim Pope, closes #9477)
2022-01-05 20:56:38 +00:00
e60b3c47d7 patch 8.2.4013: build failure without the spell feature
Problem:    Build failure without the spell feature.
Solution:   Adjust #ifdefs.
2022-01-05 20:40:34 +00:00
d82a47dd04 patch 8.2.4012: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move the last error messages to errors.h.
2022-01-05 20:24:39 +00:00
bb8cac56d9 patch 8.2.4011: test fails because of changed error number
Problem:    Test fails because of changed error number.
Solution:   Restore old duplicate error message.
2022-01-05 18:16:53 +00:00
9d00e4a814 patch 8.2.4010: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
2022-01-05 17:49:15 +00:00
d3a117814d patch 8.2.4009: reading one byte beyond the end of the line
Problem:    Reading one byte beyond the end of the line.
Solution:   Check for NUL byte first.
2022-01-05 16:50:40 +00:00
677658ae49 patch 8.2.4008: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
2022-01-05 16:09:06 +00:00
8e7d9db32b patch 8.2.4007: session does not restore help buffer properly
Problem:    Session does not restore help buffer properly when "options' is
            missing from 'sessionoptions'.
Solution:   Use a ":help" command to create the help window. (closes #9475,
            closes #9458, closes #9472)
2022-01-05 14:01:30 +00:00
c653e4a2bd patch 8.2.4006: Vim9: crash when declaring variable on the command line
Problem:    Vim9: crash when declaring variable on the command line.
Solution:   Use a temporary type list. (closes #9474)
2022-01-05 10:16:30 +00:00
a6f7929e62 patch 8.2.4005: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
2022-01-04 21:30:47 +00:00
548911ee14 patch 8.2.4004: old compiler complains about struct init with variable
Problem:    Old compiler complains about struct init with variable.
Solution:   Set the struct member later. (John Marriott)
2022-01-04 20:05:04 +00:00
d88be5be80 patch 8.2.4003: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
2022-01-04 19:57:55 +00:00
6cac77016b patch 8.2.4002: first char typed in Select mode can be wrong
Problem:    First char typed in Select mode can be wrong.
Solution:   Escape special bytes in the input buffer. (closes #9469)
2022-01-04 18:01:21 +00:00
d94fbfc74a patch 8.2.4001: insert complete code uses global variables
Problem:    Insert complete code uses global variables.
Solution:   Make variables local to the file and use accessor functions.
            (Yegappan Lakshmanan, closes #9470)
2022-01-04 17:01:44 +00:00
fcd1635a46 patch 8.2.4000: Coverity warns for checking for NULL pointer after using it
Problem:    Coverity warns for checking for NULL pointer after using it.
Solution:   Remove check for NULL.
2022-01-04 16:44:56 +00:00
c024ed9233 patch 8.2.3999: redundant check for NUL byte
Problem:    Redundant check for NUL byte.
Solution:   Remove the check for a NUL byte. (closes #9471)
2022-01-04 16:22:52 +00:00
48824e952f patch 8.2.3998: asan error for adding zero to NULL
Problem:    Asan error for adding zero to NULL.
Solution:   Do not compute pointer if there are no entries.
2022-01-04 16:05:48 +00:00
10d6f18b2f patch 8.2.3997: Vim9: not enough testing for extend() and map()
Problem:    Vim9: not enough testing for extend() and map().
Solution:   Add more test cases.  Fix uncovered problems.  Remove unused type
            fields.
2022-01-04 15:54:38 +00:00
078a46161e patch 8.2.3996: Vim9: type checking lacks information about declared type
Problem:    Vim9: type checking for list and dict lacks information about
            declared type.
Solution:   Add dv_decl_type and lv_decl_type.  Refactor the type stack to
            store two types in each entry.
2022-01-04 15:17:03 +00:00
9acf2d8be9 patch 8.2.3995: not all sshconfig files are detected as such
Problem:    Not all sshconfig files are detected as such.
Solution:   Adjust the patterns used for sshconfig detection. (David Auer,
            closes #9322)
2022-01-03 17:32:46 +00:00
ad8f248585 patch 8.2.3994: Vim9: extend() complains about type when it was not declared
Problem:    Vim9: extend() complains about the type even when it was not
            declared.
Solution:   Only check the list or dict type when it was declared.
2022-01-03 16:52:28 +00:00
c88e977862 patch 8.2.3993: when recording a change in Select mode char appears twice
Problem:    When recording a change in Select mode the first typed character
            appears twice.
Solution:   When putting the character back into typeahead remove it from
            recorded characters. (closes #9462)
2022-01-03 13:47:50 +00:00
0e2508d9e6 patch 8.2.3992: wrong local-additions in the help with language mix
Problem:    Wrong local-additions in the help with language mix.
Solution:   Adjust how the local additions list is generated. (Hirohito
            Higashi, closes #9464)
2022-01-03 12:53:24 +00:00
114dbda785 patch 8.2.3991: Vim9: error when extending dict<any>
Problem:    Vim9: error when extending dict<any> with another type that it was
            initialized with.
Solution:   Also set the type for dict<any> if the initializer has a more
            specific type. (closes #9461)
2022-01-03 12:28:03 +00:00
5c75eed758 patch 8.2.3990: testing wrong operator
Problem:    Testing wrong operator.
Solution:   Test "g@" instead of "r_". (Naohiro Ono, closes #9463)
2022-01-03 11:15:47 +00:00
e982586f8e patch 8.2.3989: some insert completion code is not tested
Problem:    Some insert completion code is not tested.
Solution:   Add a few tests.  Refactor thesaurus completion. (Yegappan
            Lakshmanan, closes #9460)
2022-01-03 11:03:48 +00:00
475d9521ba patch 8.2.3988: tiny build fails
Problem:    Tiny build fails.
Solution:   Fix misplaced #ifdef.
2022-01-02 21:46:29 +00:00
1d423ef75f patch 8.2.3987: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
2022-01-02 21:26:16 +00:00
b09feaa86e patch 8.2.3986: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
2022-01-02 20:20:45 +00:00
ac78dd4a35 patch 8.2.3985: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
2022-01-02 19:25:26 +00:00
3d0da09bb2 patch 8.2.3984: debugger test fails
Problem:    Debugger test fails.
Solution:   Adjust the test for modified debugging of a for loop.
2022-01-02 17:28:57 +00:00
eaaac014a0 patch 8.2.3983: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
2022-01-02 17:00:40 +00:00
8bfa0eb863 patch 8.2.3982: some lines of code not covered by tests
Problem:    Some lines of code not covered by tests.
Solution:   Add a few more test cases. (Dominique Pellé, closes #9453)
2022-01-02 16:16:33 +00:00
2b4ecc2c31 patch 8.2.3981: Vim9: debugging a for loop doesn't stop before it starts
Problem:    Vim9: debugging a for loop doesn't stop before it starts.
Solution:   Keep the DEBUG instruction before the expression is evaluated.
            (closes #9456)
2022-01-02 14:08:18 +00:00
b3bd1d39e6 patch 8.2.3980: if 'operatorfunc' invokes an operator Visual mode is changed
Problem:    If 'operatorfunc' invokes an operator the remembered Visual mode
            may be changed. (Naohiro Ono)
Solution:   Save and restore the information for redoing the Visual area.
            (closes #9455)
2022-01-02 13:05:45 +00:00
a6feb163f0 patch 8.2.3979: Vim9: the feature is not mentioned in the right places
Problem:    Vim9: the feature is not mentioned in the right places.
Solution:   Add +vim9script to the help and :version output.
2022-01-02 12:06:33 +00:00
6b1a99dfe3 patch 8.2.3978: build error when using dynamycally loaded Python 3
Problem:    Build error when using dynamycally loaded Python 3.
Solution:   Adjust #ifdef.
2022-01-02 01:04:09 +00:00
9a846fbaa5 patch 8.2.3977: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
2022-01-01 21:59:18 +00:00
b34689010a patch 8.2.3976: FEARG_LAST is never used
Problem:    FEARG_LAST is never used. (Dominique Pellé)
Solution:   Remove FEARG_LAST and the related code.
2022-01-01 19:42:16 +00:00
cbadefe25a patch 8.2.3975: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
2022-01-01 19:33:50 +00:00
1f4a3457a3 patch 8.2.3974: Vim9: LISTAPPEND instruction does not check for a locked list
Problem:    Vim9: LISTAPPEND instruction does not check for a locked list.
Solution:   Check whether the list is locked. (closes #9452)
2022-01-01 18:29:21 +00:00
0f7a5e758c patch 8.2.3973: tiny build fails
Problem:    Tiny build fails.
Solution:   Adjust #ifdefs
2022-01-01 16:31:48 +00:00
3a846e6bca patch 8.2.3972: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move the last errors from globals.h to errors.h.
2022-01-01 16:21:00 +00:00
0699b040e6 patch 8.2.3971: build fails
Problem:    Build fails.
Solution:   Use the right error message name.
2022-01-01 16:01:23 +00:00
74409f6279 patch 8.2.3970: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
2022-01-01 15:58:22 +00:00
56200eed62 patch 8.2.3969: value of MAXCOL not available in Vim script
Problem:    Value of MAXCOL not available in Vim script.
Solution:   Add v:maxcol. (Naohiro Ono, closes #9451)
2022-01-01 14:59:44 +00:00
e70cec9760 patch 8.2.3968: build failure
Problem:    Build failure.
Solution:   Add missing changes.
2022-01-01 14:25:55 +00:00
460ae5dfca patch 8.2.3967: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
2022-01-01 14:19:49 +00:00
b37a65e4bf patch 8.2.3966: when using feedkeys() abbreviations may be blocked
Problem:    When using feedkeys() abbreviations may be blocked.
Solution:   Reset tb_no_abbr_cnt when running out of characters.
            (closes #9448)
2022-01-01 12:42:56 +00:00
b79ee0c299 patch 8.2.3965: Vim9: no easy way to check if Vim9 script is supported
Problem:    Vim9: no easy way to check if Vim9 script is supported.
Solution:   Add has('vim9script').
2022-01-01 12:17:00 +00:00
654b729c4c patch 8.2.3964: some common lisp and scheme files not recognized
Problem:    Some common lisp and scheme files not recognized.
Solution:   Recognize *.asd as lisp and *.sld as scheme. (Alex Vear,
            closes #9447)
2022-01-01 11:38:42 +00:00
096ca73dac patch 8.2.3963: build failure with tiny and small features
Problem:    Build failure with tiny and small features. (Tony Mechelynck)
Solution:   Adjust #ifdefs.
2022-01-01 00:55:28 +00:00
d0819d11ec patch 8.2.3962: build fails for missing error message
Problem:    Build fails for missing error message.
Solution:   Add changes in missed file.
2021-12-31 23:15:53 +00:00
436b5adc97 patch 8.2.3961: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
2021-12-31 22:49:24 +00:00
f1474d801b patch 8.2.3960: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
2021-12-31 19:59:55 +00:00
6d0570117a patch 8.2.3959: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
2021-12-31 18:49:43 +00:00
ef089f50f9 patch 8.2.3958: build failure compiling xxd with "-std=c2x"
Problem:    Build failure compiling xxd with "-std=c2x".
Solution:   define _XOPEN_SOURCE. (Yegappan Lakshmanan, closes #9444)
2021-12-31 17:33:47 +00:00
1a9922243a patch 8.2.3957: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
2021-12-31 17:25:48 +00:00
4b1478093e patch 8.2.3956: duplicate assignment
Problem:    Duplicate assignment.
Solution:   Remove the second assignment. (closes #9442)
2021-12-31 15:21:53 +00:00
eb822a280c patch 8.2.3955: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
2021-12-31 15:09:27 +00:00
9a015111a5 patch 8.2.3954: Vim9: no error for shadowing if script var is declared later
Problem:    Vim9: no error for shadowing if script var is declared later.
Solution:   Check argument names when compiling a function.
2021-12-31 14:06:45 +00:00
6ad84ab3e4 patch 8.2.3953: insert completion code is too complicated
Problem:    Insert completion code is too complicated.
Solution:   More refactoring.  Move function arguments into a struct.
            (Yegappan Lakshmanan, closes #9437)
2021-12-31 12:59:53 +00:00
1fa3de1ce8 patch 8.2.3952: first line not redrawn when adding lines to an empty buffer
Problem:    First line not redrawn when adding lines to an empty buffer.
Solution:   Adjust the argument to appended_lines(). (closes #9439,
            closes #9438)
2021-12-31 12:19:22 +00:00
04fb916684 Update runtime files 2021-12-30 20:24:12 +00:00
d293981d2b patch 8.2.3951: Vim9: memory leak when text after a nested function
Problem:    Vim9: memory leak when text after a nested function.
Solution:   Free the function if text is found after "enddef".
2021-12-30 17:09:05 +00:00
94f3192b03 patch 8.2.3950: going beyond the end of the line with /\%V
Problem:    Going beyond the end of the line with /\%V.
Solution:   Check for valid column in getvcol().
2021-12-30 15:29:18 +00:00
4c13e5e676 patch 8.2.3949: using freed memory with /\%V
Problem:    Using freed memory with /\%V.
Solution:   Get the line again after getvvcol().
2021-12-30 14:49:43 +00:00
cfe3af284a patch 8.2.3948: Vim9: failure with partial with unknown argument count
Problem:    Vim9: failure with partial with unknown argument count.
Solution:   Do not copy argument types if there aren't any.
2021-12-30 13:59:20 +00:00
f38aad85cf patch 8.2.3947: unnecessary check for NULL pointer
Problem:    Unnecessary check for NULL pointer.
Solution:   Remove the check. (closes #9434)
2021-12-30 13:45:57 +00:00
1c67f3a977 patch 8.2.3946: when an internal error makes Vim exit the error is not seen
Problem:    When an internal error makes Vim exit the error is not seen.
Solution:   Add the error to the test output.
2021-12-30 13:32:09 +00:00
13789bf103 patch 8.2.3945: Vim9: partial variable argument types are wrong
Problem:    Vim9: partial variable argument types are wrong, leading to a
            crash.
Solution:   When adjusting the argument count also adjust the argument types.
            (closes #9433)
2021-12-30 13:29:00 +00:00
5d2e007ccb patch 8.2.3944: insert mode completion functions are too long
Problem:    Insert mode completion functions are too long.
Solution:   Split up into multiple functions. (Yegappan Lakshmanan,
            closes #9431)
2021-12-30 11:40:53 +00:00
491669701c patch 8.2.3943: compiler warning from gcc for uninitialized variable
Problem:    Compiler warning from gcc for uninitialized variable.
Solution:   Initialize variable. (closes #9429)
2021-12-30 10:51:45 +00:00
8e7cc6b920 patch 8.2.3942: Coverity reports a possible memory leak
Problem:    Coverity reports a possible memory leak.
Solution:   Free the array if allocation fails.
2021-12-30 10:32:25 +00:00
ab16ad33ba patch 8.2.3941: SIGTSTP is not handled
Problem:    SIGTSTP is not handled.
Solution:   Handle SIGTSTP like pressing CTRL-Z. (closes #9422)
2021-12-29 19:41:47 +00:00
94fb8274ca patch 8.2.3940: match highlight disappears when doing incsearch for ":s/pat"
Problem:    Match highlight disappears when doing incsearch for ":s/pat".
Solution:   Only use line limit for incsearch highlighting. (closes #9425)
2021-12-29 19:22:44 +00:00
5a664fe57f patch 8.2.3939: MS-Windows: fnamemodify('', ':p') does not work
Problem:    MS-Windows: fnamemodify('', ':p') does not work.
Solution:   Do not consider an empty string a full path. (Yegappan Lakshmanan,
            closes #9428, closes #9427)
2021-12-29 18:16:21 +00:00
ba26367fea patch 8.2.3938: line comment start is also found in a string
Problem:    Line comment start is also found in a string.
Solution:   Skip line comments in a string.
2021-12-29 18:09:13 +00:00
edc6f10390 patch 8.2.3937: Insert mode completion function is too long
Problem:    Insert mode completion function is too long.
Solution:   Refactor into multiple functions. (Yegappan Lakshmanan,
            closes #9423)
2021-12-29 17:38:46 +00:00
ccc1644f95 patch 8.2.3936: no proper test for maintaining change mark in diff mode
Problem:    No proper test for maintaining change mark in diff mode.
Solution:   Run the test with internal and external diff. (Sean Dewar,
            closes #9424)
2021-12-29 16:44:48 +00:00
5d20fbf2e7 patch 8.2.3935: CTRL-U in Insert mode does not fix the indent
Problem:    CTRL-U in Insert mode does not fix the indent.
Solution:   Fix the indent when 'cindent' is set.
2021-12-29 16:05:31 +00:00
5ea5f37372 patch 8.2.3934: repeating line comment is undesired for "O" command
Problem:    Repeating line comment is undesired for "O" command.
Solution:   Do not copy line comment leader for "O". (closes #9426)
2021-12-29 15:15:47 +00:00
3d0abad5bf patch 8.2.3933: after ":cd" fails ":cd -" is incorrect
Problem:    After ":cd" fails ":cd -" is incorrect.
Solution:   Set the previous directory only after successfully changing
            directory. (Richard Doty, closes #9419, closes #8983)
2021-12-29 14:39:08 +00:00
264d3ddac0 patch 8.2.3932: C line comment not formatted properly
Problem:    C line comment not formatted properly.
Solution:   If a line comment follows after "#if" the next line is not the end
            of a paragraph.
2021-12-29 14:09:32 +00:00
febb78fa17 patch 8.2.3931: Coverity reports a memory leak
Problem:    Coverity reports a memory leak.
Solution:   Free memory in case of failure.
2021-12-29 11:59:53 +00:00
c97f9a55bd patch 8.2.3930: getcmdline() argument has a misleading type
Problem:    getcmdline() argument has a misleading type.
Solution:   Use the correct type, even though the value is not used.
2021-12-28 20:59:56 +00:00
10c75c4a09 patch 8.2.3929: using unititialized variable
Problem:    Using unititialized variable.
Solution:   Set the option flags to zero for a terminal option.
2021-12-28 20:53:30 +00:00
11ceb7d949 patch 8.2.3928: heredoc test fails
Problem:    Heredoc test fails.
Solution:   Correct order of function arguments.
2021-12-28 20:49:56 +00:00
8c697e3698 patch 8.2.3927: Vim9: double free when using lambda
Problem:    Vim9: double free when using lambda.
Solution:   Don't free both cmdline and line_to_free.
2021-12-28 20:18:50 +00:00
92f246e4f9 patch 8.2.3926: build failure without the 'autochdir' option
Problem:    Build failure without the 'autochdir' option. (John Marriott)
Solution:   Add #ifdefs.
2021-12-28 20:03:43 +00:00
06f6095623 patch 8.2.3925: diff mode confused by NUL bytes
Problem:    Diff mode confused by NUL bytes.
Solution:   Handle NUL bytes differently. (Christian Brabandt, closes #9421,
            closes #9418)
2021-12-28 18:30:05 +00:00
7473a84cf9 patch 8.2.3924: Vim9: no error if something follows :enddef
Problem:    Vim9: no error if something follows :enddef in a nested function.
Solution:   Give an error.  Move common code to a function.
2021-12-28 17:55:26 +00:00
4bf1006cae patch 8.2.3923: Vim9: double free with split argument list in nested function
Problem:    Vim9: double free if a nested function has a line break in the
            argument list.
Solution:   Set cmdlinep when freeing the previous line.
2021-12-28 17:23:12 +00:00
8bb3fe4d4d patch 8.2.3922: cannot build with dynamic Ruby 3.1
Problem:    Cannot build with dynamic Ruby 3.1.
Solution:   Add "_EXTRA" variables for CI.  Add missing functions. (Ozaki
            Kiichi, closes #9420)
2021-12-28 15:51:45 +00:00
d9da86e94e patch 8.2.3921: the way xdiff is used is inefficient
Problem:    The way xdiff is used is inefficient.
Solution:   Use hunk_func instead of the out_line callback. (Lewis Russell,
            closes #9344)
2021-12-28 13:54:41 +00:00
90c317f224 patch 8.2.3920: restoring directory after using another window is inefficient
Problem:    Restoring directory after using another window is inefficient.
Solution:   Only restore the directory for win_execute().  Apply 'autochdir'
            only when needed.
2021-12-28 13:15:05 +00:00
8b6256f6ec patch 8.2.3919: Vim9: wrong argument for append() results in two errors
Problem:    Vim9: wrong argument for append() results in two errors.
Solution:   Check did_emsg.  Also for setline().  Adjust the help for
            appendbufline().
2021-12-28 11:24:49 +00:00
be4e223ead patch 8.2.3918: function list test fails
Problem:    Function list test fails.
Solution:   Adjust the test for the new location of the function list.
2021-12-27 21:42:57 +00:00
a4d131d110 Update runtime files 2021-12-27 21:33:07 +00:00
1cae5a0a03 patch 8.2.3917: the eval.txt help file is way too big
Problem:    The eval.txt help file is way too big.
Solution:   Move the builtin function details to a separate file.
2021-12-27 21:28:34 +00:00
8dac2acd6a patch 8.2.3916: no error for passing an invalid line number to append()
Problem:    No error for passing an invalid line number to append().
Solution:   In Vim9 script check for a non-negative number. (closes #9417)
2021-12-27 20:57:06 +00:00
4b28ba3245 patch 8.2.3915: illegal memory access when completing with invalid bytes
Problem:    illegal memory access when completing with invalid bytes.
Solution:   Avoid going over the end of the completion text.
2021-12-27 19:28:37 +00:00
af4a61a85d patch 8.2.3914: various spelling mistakes in comments
Problem:    Various spelling mistakes in comments.
Solution:   Fix the mistakes. (Dominique Pellé, closes #9416)
2021-12-27 17:21:41 +00:00
5da36052a4 patch 8.2.3913: help for expressions does not mention Vim9 syntax
Problem:    Help for expressions does not mention Vim9 syntax.
Solution:   Add the rules for Vim9 to the expression help.  Rename functions
            to match the help.
2021-12-27 15:39:57 +00:00
bf7ff61af4 patch 8.2.3912: the ins_complete() function is much too long
Problem:    The ins_complete() function is much too long.
Solution:   Split it up into multiple functions. (Yegappan Lakshmanan,
            closes #9414)
2021-12-27 12:52:07 +00:00
ef8f04b1d1 patch 8.2.3911: Vim9: type check for filter() does not accept unknown
Problem:    Vim9: type check for filter() does not accept unknown.
Solution:   Also accept unknown for the return type. (closes #9413)
2021-12-27 12:29:19 +00:00
23018f2d4b patch 8.2.3910: when compare function of sort() fails it does not abort
Problem:    When the compare function of sort() produces and error then sort()
            does not abort.
Solution:   Check if did_emsg was incremented.
2021-12-27 11:54:37 +00:00
bbdd3fb804 patch 8.2.3909: Containerfile using prefix name not recognized
Problem:    Containerfile using prefix name not recognized.
Solution:   Recognize Containerfile.*.
2021-12-27 10:35:52 +00:00
27708e6c7b patch 8.2.3908: cannot use a script-local function for 'foldtext'
Problem:    Cannot use a script-local function for 'foldtext'.
Solution:   Expand "s:" and "<SID>". (Yegappan Lakshmanan, closes #9411)
2021-12-26 21:54:43 +00:00
c553a21e18 patch 8.2.3907: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move error messages to errors.h.  Avoid duplicates.
2021-12-26 20:20:34 +00:00
1f318c6eac patch 8.2.3906: Vim9 help still contains "under development" warnings
Problem:    Vim9 help still contains "under development" warnings.
Solution:   Remove the explicit warning.
2021-12-26 18:09:31 +00:00
c88ac94a0b patch 8.2.3905: Dockerfile using prefix name not recognized
Problem:    Dockerfile using prefix name not recognized.
Solution:   Recognize Dockerfile.*. (closes #9410)
2021-12-26 17:31:35 +00:00
7319981f21 patch 8.2.3904: Vim9: skip expression type is not checked at compile time
Problem:    Vim9: skip expression type is not checked at compile time.
Solution:   Add argument type checks.
2021-12-26 17:18:14 +00:00
71c41255f6 patch 8.2.3903: "gM" does not count tabs as expected
Problem:    "gM" does not count tabs as expected.
Solution:   Use linetabsize() instead of mb_string2cells(). (closes #9409)
2021-12-26 15:00:07 +00:00
9c23f9bb5f patch 8.2.3902: Vim9: double free with nested :def function
Problem:    Vim9: double free with nested :def function.
Solution:   Pass "line_to_free" from compile_def_function() and make sure
            cmdlinep is valid.
2021-12-26 14:23:22 +00:00
71eb3ad579 patch 8.2.3901: Vim9: Cannot set 'cpo' in main .vimrc if using Vim9 script
Problem:    Vim9: Cannot set 'cpo' in main .vimrc if using Vim9 script.
Solution:   Do not restore 'cpo' at the end of the main .vimrc.
2021-12-26 12:07:30 +00:00
8bb65f230d patch 8.2.3900: it is not easy to use a script-local function for an option
Problem:    It is not easy to use a script-local function for an option.
Solution:   recognize s: and <SID> at the start of the expression. (Yegappan
            Lakshmanan, closes #9401)
2021-12-26 10:51:39 +00:00
ec86520f94 patch 8.2.3899: Vim9: test for map() on string fails
Problem:    Vim9: test for map() on string fails.
Solution:   Expect string return type.
2021-12-25 22:10:42 +00:00
fb9dcb080b patch 8.2.3898: Vim9: not sufficient testing for variable initialization
Problem:    Vim9: not sufficient testing for variable initialization.
Solution:   Add another test case.
2021-12-25 22:00:49 +00:00
1802405d71 patch 8.2.3897: Vim9: second argument of map() and filter() not checked
Problem:    Vim9: the second argument of map() and filter() is not checked at
            compile time.
Solution:   Add more specific type check for the second argument.
2021-12-25 21:43:28 +00:00
db8e5c21b9 patch 8.2.3896: Vim9: no test for nested function not available later
Problem:    Vim9: no test for nested function not available later.
Solution:   Add a test.
2021-12-25 19:58:22 +00:00
ae1068afde patch 8.2.3895: Vim9: confusing error when using function() with a number
Problem:    Vim9: confusing error when using function() with a number.
Solution:   Check for a function or string argument.
2021-12-25 19:43:44 +00:00
223d0a6bc8 patch 8.2.3894: Vim9: no proper type check for first argument of call()
Problem:    Vim9: no proper type check for first argument of call().
Solution:   Add specific type check.
2021-12-25 19:29:21 +00:00
5cd647935d patch 8.2.3893: Vim9: many local variables are initialized with an instruction
Problem:    Vim9: many local variables are initialized with an instruction.
Solution:   Initialize local variables to zero to avoid the instructions.
2021-12-25 18:23:24 +00:00
35cfd793aa patch 8.2.3892: when modifyOtherKeys is used CTRL-C is not recognized
Problem:    When modifyOtherKeys is used CTRL-C is not recognized.
Solution:   Check for uppercase C as well, fix minimum length.
2021-12-25 15:13:18 +00:00
7f4a628efe patch 8.2.3891: github CI: workflows may overlap
Problem:    Github CI: workflows may overlap.
Solution:   Cancel previous workflows when starting a new one. (Yegappan
            Lakshmanan, closes #9400)
2021-12-25 11:20:30 +00:00
d787e40fdb patch 8.2.3890: Vim9: type check for using v: variables is basic
Problem:    Vim9: type check for using v: variables is basic.
Solution:   Specify a more precise type.
2021-12-24 21:36:12 +00:00
e7f4abd38b patch 8.2.3889: duplicate code for translating script-local function name
Problem:    Duplicate code for translating script-local function name.
Solution:   Move the code to get_scriptlocal_funcname(). (Yegappan Lakshmanan,
            closes #9393)
2021-12-24 20:47:38 +00:00
73a024209c patch 8.2.3888: the argument list may contain duplicates
Problem:    The argument list may contain duplicates.
Solution:   Add the :argdedeupe command. (Nir Lichtman, closes #6235)
2021-12-24 20:28:03 +00:00
806da5176e patch 8.2.3887: E1135 is used for two different errors
Problem:    E1135 is used for two different errors.
Solution:   Renumber one error.
2021-12-24 19:54:52 +00:00
b6db146762 patch 8.2.3886: can define autocmd for every event by using "au!"
Problem:    Can define autocmd for every event by using "au!".
Solution:   Check if a command is present also for "au!".
2021-12-24 19:24:47 +00:00
679140c56b patch 8.2.3885: arglist test fails
Problem:    Arglist test fails.
Solution:   Adjust for locking the arglist for ":all".
2021-12-24 18:58:46 +00:00
6f98371532 patch 8.2.3884: crash when clearing the argument list while using it
Problem:    Crash when clearing the argument list while using it.
Solution:   Lock the argument list for ":all".
2021-12-24 18:11:27 +00:00
5937c7505f patch 8.2.3883: crash when switching to other regexp engine fails
Problem:    Crash when switching to other regexp engine fails.
Solution:   Check for regprog being NULL.
2021-12-24 16:46:14 +00:00
fa3b72348d Update runtime files 2021-12-24 13:18:38 +00:00
d3f00f54bf patch 8.2.3882: more duplicated code in f_getreginfo()
Problem:    More duplicated code in f_getreginfo().
Solution:   Also use getreg_get_regname(). (closes #9398)
2021-12-24 12:02:43 +00:00
6073f13f55 patch 8.2.3881: QNX: crash when compiled with GUI but using terminal
Problem:    QNX: crash when compiled with GUI but using terminal.
Solution:   Check the gui.in_use flag. (Hirohito Higashi, closes #9391)
2021-12-24 11:57:06 +00:00
70a120b72b patch 8.2.3880: Solution filter files are not recognized
Problem:    Solution filter files are not recognized.
Solution:   Add pattern *.slnf and use json. (Doug Kearns)
2021-12-24 11:33:56 +00:00
51e64b2789 patch 8.2.3879: getreg() and getregtype() contain dead code
Problem:    getreg() and getregtype() contain dead code.
Solution:   Remove the needless check. (closes #9392)  Also refactor to put
            common code in a shared function.
2021-12-24 10:48:30 +00:00
310091d20f patch 8.2.3878: Vim9: debugger tries to read more lines than there are
Problem:    Vim9: debugger tries to read more lines than there are.
Solution:   Check the number of lines. (closes #9394)
2021-12-23 21:14:37 +00:00
28fbbeac70 patch 8.2.3877: function does not abort after a type error in compare
Problem:    Function does not abort after a type error in compare
Solution:   Check getting number fails. (closes #9384)
2021-12-22 21:40:33 +00:00
f2f0bddf30 patch 8.2.3876: 'cindent' does not recognize inline namespace
Problem:    'cindent' does not recognize inline namespace.
Solution:   Skip over "inline" to find "namespace". (closes #9383)
2021-12-22 20:55:30 +00:00
b4168fd917 patch 8.2.3875: gcc complains about buffer overrun
Problem:    gcc complains about buffer overrun.
Solution:   Use mch_memmove() instead of STRCPY(). (John Marriott)
2021-12-22 20:29:09 +00:00
a80aad7174 patch 8.2.3874: cannot highlight the number column for a sign
Problem:    Cannot highlight the number column for a sign.
Solution:   Add the "numhl" argument. (James McCoy, closes #9381)
2021-12-22 19:45:28 +00:00
82b3b4c6cf patch 8.2.3873: go.mod files are not recognized
Problem:    go.mod files are not recognized.
Solution:   Check for the file name. (closes #9380)
2021-12-22 19:19:08 +00:00
080182216e patch 8.2.3872: Vim9: finddir() and uniq() return types can be more specific
Problem:    Vim9: finddir() and uniq() return types can be more specific.
Solution:   Adjust the return type.
2021-12-22 18:45:37 +00:00
f973eeb491 patch 8.2.3871: list.c contains code for dict and blob
Problem:    List.c contains code for dict and blob.
Solution:   Refactor to put code where it belongs. (Yegappan Lakshmanan,
            closes #9386)
2021-12-22 18:19:26 +00:00
1aeccdb464 patch 8.2.3870: MS-Windows: wrong dir when using right-click context menu
Problem:    MS-Windows: wrong working directory when opening two files with
            right-click context menu. (Gabriel Dupras)
Solution:   Use the working directory and pass it on to the process creation.
            (Nir Lichtman, closes #9382, closes #8874)
2021-12-22 15:21:15 +00:00
fa46ead31a patch 8.2.3869: Vim9: type checking for "any" is inconsistent
Problem:    Vim9: type checking for "any" is inconsistent.
Solution:   Always use a runtime type check for using "any" for a more
            specific type.
2021-12-22 13:18:39 +00:00
1b5f7a6202 patch 8.2.3868: Vim9: function test fails
Problem:    Vim9: function test fails.
Solution:   Add missing changes.  Add test for earlier patch.
2021-12-21 13:30:42 +00:00
d92813a598 patch 8.2.3867: implementation of some list functions too complicated
Problem:    Implementation of some list functions too complicated.
Solution:   Refactor do_sort_uniq(), f_count() and extend() (Yegappan
            Lakshmanan, closes #9378)
2021-12-21 13:19:42 +00:00
59618fed4c patch 8.2.3866: Vim9: type checking global variables is inconsistent
Problem:    Vim9: type checking global variables is inconsistent.
Solution:   Use the "unknown" type in more places.
2021-12-21 12:32:17 +00:00
0d807107b6 patch 8.2.3865: Vim9: compiler complains about using "try" as a struct member
Problem:    Vim9: compiler complains about using "try" as a struct member.
Solution:   Rename "try" to "tryref".
2021-12-21 09:42:09 +00:00
6f79e614b2 patch 8.2.3864: cannot disable requesting key codes from xterm
Problem:    Cannot disable requesting key codes from xterm.
Solution:   Add the 'xtermcodes' option, default on.
2021-12-21 09:12:23 +00:00
8d95d7091d patch 8.2.3863: various build flags accidentally enabled
Problem:    Various build flags accidentally enabled.
Solution:   Revert several lines in Makefile.
2021-12-20 22:12:53 +00:00
dab17a0689 patch 8.2.3862: crash on exit with EXITFREE and using win_execute()
Problem:    Crash on exit with EXITFREE and using win_execute().
Solution:   Also save and restore tp_topframe. (issue #9374)
2021-12-20 21:35:59 +00:00
39713d3acb patch 8.2.3861: list of distributed files is outdated
Problem:    List of distributed files is outdated.
Solution:   Add new files.
2021-12-20 15:53:13 +00:00
dc7c366f3a patch 8.2.3860: Vim9: codecov struggles with the file size
Problem:    Vim9: codecov struggles with the file size.
Solution:   Split vim9compile.c into four files.
2021-12-20 15:04:29 +00:00
a99fb23842 patch 8.2.3859: Vim9: some code lines not tested
Problem:    Vim9: some code lines not tested.
Solution:   Add a few specific tests.
2021-12-20 12:25:03 +00:00
003312b1d2 patch 8.2.3858: Vim9: not enough tests
Problem:    Vim9: not enough tests.
Solution:   Add tests for :try/:catch and :redir. Add missing type check.
2021-12-20 10:55:35 +00:00
2f9f4ccfc8 patch 8.2.3857: Vim9: inconsistent error for using function()
Problem:    Vim9: inconsistent error for using function().
Solution:   Use a runtime type check for the result of function().
            (closes #8492)
2021-12-20 09:36:27 +00:00
fea43e44c0 patch 8.2.3856: Vim9: not enough tests
Problem:    Vim9: not enough tests.
Solution:   Run more expression tests also with Vim9. Fix an uncovered
            problem.
2021-12-19 21:34:05 +00:00
bc404bfb32 patch 8.2.3855: illegal memory access when displaying a blob
Problem:    Illegal memory access when displaying a blob.
Solution:   Append a NUL at the end. (Yegappan Lakshmanan, closes #9372)
2021-12-19 19:19:31 +00:00
86b3ab4fa0 patch 8.2.3854: Vim9: inconsistent arguments for test functions
Problem:    Vim9: inconsistent arguments for test functions.
Solution:   When :def function and script have different arguments use a list
            with two items instead of a separate function.
2021-12-19 18:33:23 +00:00
700e6b1662 patch 8.2.3853: Vim9: not enough tests
Problem:    Vim9: not enough tests.
Solution:   Run more existing tests for Vim9 script.
2021-12-19 17:27:06 +00:00
f47c5a8e2d patch 8.2.3852: Vim9: not enough tests
Problem:    Vim9: not enough tests.
Solution:   Also run existing tests for Vim9 script.  Make errors more
            consistent.
2021-12-19 15:17:21 +00:00
265f811f5a patch 8.2.3851: Vim9: overhead when comparing string, dict or function
Problem:    Vim9: overhead when comparing string, dict or function.
Solution:   Call the intented compare function directly.  Refactor to avoid
            duplicated code.
2021-12-19 12:33:05 +00:00
2de5371a75 patch 8.2.3850: illegal memory access when displaying a partial
Problem:    Illegal memory access when displaying a partial.
Solution:   Terminate the string with a NUL. (closes #9371)
2021-12-19 11:06:35 +00:00
389b72196e patch 8.2.3849: functions implementing reduce and map are too long
Problem:    Functions implementing reduce and map are too long.
Solution:   Use a function for each type of value.  Add a few more test cases
            and add to the help. (Yegappan Lakshmanan, closes #9370)
2021-12-19 10:35:15 +00:00
0ccb5842f5 patch 8.2.3848: cannot use reduce() for a string
Problem:    Cannot use reduce() for a string.
Solution:   Make reduce() work with a string. (Naruhiko Nishino, closes #9366)
2021-12-18 18:33:46 +00:00
605ec91e5a patch 8.2.3847: illegal memory access when using a lambda with an error
Problem:    Illegal memory access when using a lambda with an error.
Solution:   Avoid skipping over the NUL after a string.
2021-12-18 16:54:31 +00:00
60618c8f1a patch 8.2.3846: no error when using control character for 'lcs' or 'fcs'
Problem:    No error when using control character for 'lcs' or 'fcs'.
Solution:   Use char2cells() to check the width. (closes #9369)
2021-12-18 15:32:46 +00:00
0dc4d8eaec patch 8.2.3845: Vim9: test fails when the channel feature is missing
Problem:    Vim9: test fails when the channel feature is missing.
Solution:   Check for the channel feature. (Dominique Pellé, closes #9368)
2021-12-18 12:40:52 +00:00
44a8977de4 patch 8.2.3844: Vim9: no type error if assigning func(number) to func(string)
Problem:    Vim9: no type error if assigning a value with type func(number) to
            a variable of type func(string).
Solution:   Use check_type_maybe(): return MAYBE if a runtime type check is
            useful.  (issue #8492)
2021-12-18 12:31:33 +00:00
647ab4cede patch 8.2.3843: dep3patch files are not recognized
Problem:    Dep3patch files are not recognized.
Solution:   Recognize dep3patch files by their location and content. (James
            McCoy, closes #9367)
2021-12-17 20:52:57 +00:00
422085f1c8 patch 8.2.3842: Vim9: can change locked list and list items
Problem:    Vim9: can change locked list and list items.
Solution:   Check that a list and list item isn't locked.
2021-12-17 20:36:15 +00:00
71b7685092 patch 8.2.3841: Vim9: outdated TODO items, disabled tests that work
Problem:    Vim9: outdated TODO items, disabled tests that work.
Solution:   Remove TODO items, run tests that work now.  Check that a dict
            item isn't locked.
2021-12-17 20:15:38 +00:00
ddc80aff57 patch 8.2.3840: useless test for negative index in check functions
Problem:    Useless test for negative index in check functions.
Solution:   Remove the test for negative index. (Naruhiko Nishino,
            closes #9364)
2021-12-17 18:01:31 +00:00
354b23a9f8 patch 8.2.3839: using \z() with \z1 not tested for syntax highlighting
Problem:    Using \z() with \z1 not tested for syntax highlighting.
Solution:   Add a test. (Dominique Pellé, closes #9365)
2021-12-17 17:32:29 +00:00
db1a410b61 patch 8.2.3838: cannot use script-local function for setting *func options
Problem:    Cannot use script-local function for setting *func options.
Solution:   Use the script context. (Yegappan Lakshmanan, closes #9362)
2021-12-17 16:21:20 +00:00
d2ff705af3 patch 8.2.3837: QNX: crash when compiled with GUI but using terminal
Problem:    QNX: crash when compiled with GUI but using terminal.
Solution:   Check gui.in_use is set. (Hirohito Higashi, closes #9363)
2021-12-17 16:00:04 +00:00
02929a372e patch 8.2.3836: Vim9: comment after expression not skipped to find NL
Problem:    Vim9: comment after expression not skipped to find NL.
Solution:   After evaluating an expression look for a newline after a #
            comment.
2021-12-17 14:46:12 +00:00
259f443a93 patch 8.2.3835: the inline-function example does not work
Problem:    The inline-function example does not work.
Solution:   Drop ":let".  Add EX_EXPR_ARG to CMD_var. (issue #9352)
2021-12-17 12:45:22 +00:00
deda6441e4 patch 8.2.3834: Test_out_cb often fails on Mac
Problem:    Test_out_cb often fails on Mac.
Solution:   Increase the timeout with every retry.
2021-12-17 11:44:33 +00:00
c3f91c0648 patch 8.2.3833: error from term_start() not caught by try/catch
Problem:    Error from term_start() not caught by try/catch.
Solution:   save and restore did_emsg when applying autocommands. (Ozaki
            Kiichi, closes #9361)
2021-12-17 09:44:33 +00:00
994a0a298b patch 8.2.3832: test fails because of changed error message
Problem:    Test fails because of changed error message.
Solution:   Adjust the expected error message.
2021-12-16 21:11:26 +00:00
23e72369ff patch 8.2.3831: opfunc test fails when missing feature changes function name
Problem:    Opfunc test fails when missing feature changes function name.
            (Dominique Pellé)
Solution:   Check the relevant screen line instead of using a screendump.
            (closes #9360)
2021-12-16 21:07:35 +00:00
e124204c4f patch 8.2.3830: error messages are spread out
Problem:    Error messages are spread out.
Solution:   Move more error messages to errors.h.
2021-12-16 20:56:57 +00:00
94c785d235 patch 8.2.3829: no error when setting a func option to script-local function
Problem:    No error when setting a func option to a script-local function.
Solution:   Give an error if the name starts with "s:". (closes #9358)
2021-12-16 19:45:47 +00:00
8103527da7 patch 8.2.3828: when opening a terminal from a timer first typed char is lost
Problem:    when opening a terminal from a timer the first typed character
            is lost. (Virginia Senioria)
Solution:   When opening a terminal while waiting for a character put K_IGNORE
            in the input buffer.
2021-12-16 18:02:07 +00:00
f79cbf6512 patch 8.2.3827: huntr badge does not really fit in the list
Problem:    Huntr badge does not really fit in the list.
Solution:   Move the link to Huntr to the issue template.
2021-12-16 16:14:11 +00:00
b15cf44c1d patch 8.2.3826: Vim9: using "g:Func" as funcref doesn't work in :def function
Problem:    Vim9: using "g:Func" as a funcref does not work in a :def
            function.
Solution:   Include "g:" in the function name. (closes #9336)
2021-12-16 15:49:43 +00:00
52797bae17 patch 8.2.3825: various comments could be improved
Problem:    Various comments could be improved.
Solution:   Improve the comments.
2021-12-16 14:45:13 +00:00
0e6adf8a29 Update runtime files 2021-12-16 14:41:10 +00:00
6df0f2759d patch 8.2.3824: no ASAN support for MSVC
Problem:    No ASAN support for MSVC.
Solution:   Add ASAN support and fix a coupld of uncovered problems. (Yegappan
            Lakshmanan, closes #9357)
2021-12-16 13:06:10 +00:00
6ecf58b0d7 patch 8.2.3823: test for visual replace is in wrong function
Problem:    Test for visual replace is in wrong function.
Solution:   Move it to another function.
2021-12-16 10:05:41 +00:00
2d877599ee patch 8.2.3822: leaking memory in map() and filter(), no string in Vim9
Problem:    Leaking memory in map() and filter(), cannot use a string argument
            in Vim9 script.
Solution:   Fix the leak, adjust the argument check, also run the tests as
            Vim9 script. (Yegappan Lakshmanan, closes #9354)
2021-12-16 08:21:09 +00:00
19569ca6d8 patch 8.2.3821: ASAN test run fails
Problem:    ASAN test run fails.
Solution:   Use asan_symbolize-13 instead of asan_symbolize-11.
2021-12-15 21:29:19 +00:00
8ee6028de3 patch 8.2.3820: "vrc" does not replace composing characters
Problem:    "vrc" does not replace composing characters, while "rc" does.
Solution:   Check the byte length including composing characters.
            (closes #9351)
2021-12-15 21:08:50 +00:00
427f065a88 patch 8.2.3819: test fails because error message changed
Problem:    Test fails because error message changed.
Solution:   Update screendumps.
2021-12-15 19:46:59 +00:00
c479ce032f patch 8.2.3818: cannot filter or map characters in a string
Problem:    Cannot filter or map characters in a string.
Solution:   Make filter() and map() work on a string. (Naruhiko Nishino,
            closes #9327)
2021-12-15 19:14:54 +00:00
f87dac04c3 patch 8.2.3817: Vim9: Not using NL as command end does not work for :autocmd
Problem:    Vim9: Not using NL as command end does not work for :autocmd.
Solution:   Only ignore NL for commands with an expression argument.
2021-12-15 17:53:40 +00:00
1821d1498c patch 8.2.3816: compiler warning for posible loss of data on MS-Windows
Problem:    Compiler warning for posible loss of data on MS-Windows.
Solution:   Add type cast. (Mike Williams, closes #9349)
2021-12-15 16:38:33 +00:00
ce7eada12e patch 8.2.3815: Vim9: cannot have a multi-line dict inside a block
Problem:    Vim9: cannot have a multi-line dict inside a block.
Solution:   Do not split the command at a line break, handle NL characters
            as white space.
2021-12-15 15:41:44 +00:00
cfabad9bcf patch 8.2.3814: .csx files and .sln files are not recognized
Problem:    .csx files and .sln files are not recognized.
Solution:   Add filetype patterns. (Doug Kearns)
2021-12-15 13:30:43 +00:00
a5d78d1f11 patch 8.2.3813: confusing error when using :cc without error list
Problem:    confusing error when using :cc without error list. (Gary Johnson)
Solution:   Give the "no errors" error.
2021-12-15 12:28:22 +00:00
57bc2333b1 patch 8.2.3812: Vim9: leaking memory in numbered function test
Problem:    Vim9: leaking memory in numbered function test.
Solution:   Skip "g:" when checking for numbered function.  Clean up after
            errors properly.
2021-12-15 12:06:43 +00:00
7c0fb80030 patch 8.2.3811: the opfunc error test fails on a slow machine
Problem:    The opfunc error test fails on a slow machine.
Solution:   Use WaitForAssert().
2021-12-14 20:26:53 +00:00
b334137acf patch 8.2.3810: Vim9: expr4 test fails on MS-Windows
Problem:    Vim9: expr4 test fails on MS-Windows.
Solution:   Do not give an error for a missing function name when skipping.
2021-12-14 18:57:45 +00:00
7509ad8b0f patch 8.2.3809: Vim9: crash when garbage collecting a nested partial
Problem:    Vim9: crash when garbage collecting a nested partial. (Virginia
            Senioria)
Solution:   Set references in all the funcstacks. (closes #9348)
2021-12-14 18:14:37 +00:00
919c12c19a patch 8.2.3808: Vim9: obsolete TODO items
Problem:    Vim9: obsolete TODO items
Solution:   Remove the comments.
2021-12-14 14:29:16 +00:00
f8a79fc346 patch 8.2.3807: Vim9: can call import with star directly
Problem:    Vim9: can call import with star directly.
Solution:   Check that the import used star.
2021-12-14 12:06:16 +00:00
c2958585f6 patch 8.2.3806: terminal focus test fails sometimes
Problem:    Terminal focus test fails sometimes.
Solution:   Run the test function before others.
2021-12-14 11:16:31 +00:00
8176be1598 patch 8.2.3805: i3config files are not recognized
Problem:    i3config files are not recognized.
Solution:   Add patterns to match i3config files. (Quentin Hibon,
            closes #7969)
2021-12-14 09:34:41 +00:00
6206877c51 patch 8.2.3804: script context not set when copying 'swf' and 'ts'
Problem:    Script context not set when copying 'swf' and 'ts'.
Solution:   Use COPY_OPT_SCTX with the right argument. (closes #9347)
2021-12-14 09:01:38 +00:00
829c8e87e2 patch 8.2.3803: GUI: crash with 'writedelay' set using a terminal window
Problem:    Crash when 'writedelay' is set and using a terminal window to
            execute a shell command.
Solution:   Check that "tl_vterm" isn't NULL. (closes #9346)
2021-12-14 08:41:38 +00:00
0407d27034 patch 8.2.3802: terminal in two windows test fails on some systems
Problem:    Terminal in two windows test fails on some systems.
Solution:   Wait a bit between commands.
2021-12-13 22:17:44 +00:00
3194e5bf87 patch 8.2.3801: if a terminal shows in two windows, only one is redrawn
Problem:    If a terminal shows in two windows, only one is redrawn.
Solution:   Reset the dirty row range only after redrawing all windows.
            (closes #9341)
2021-12-13 21:59:09 +00:00
6840a0ffe8 patch 8.2.3800: when cross compiling the output of "uname" cannot be set
Problem:    When cross compiling the output of "uname" cannot be set. (Ben
            Reeves)
Solution:   Use cache variables. (closes #9338)
2021-12-13 20:37:59 +00:00
80d60910ff patch 8.2.3799: edit test hangs or fails
Problem:    Edit test hangs or fails.
Solution:   Do not rethrow an exception when inside try/catch.
2021-12-13 19:14:52 +00:00
3b309f11db patch 8.2.3798: a :def callback function postpones an error message
Problem:    A :def callback function postpones an error message.
Solution:   Display the error after calling the function. (closes #9340)
2021-12-13 18:19:55 +00:00
1e78deb077 patch 8.2.3797: no good reason to limit the message history in tiny version
Problem:    No good reason to limit the message history in the tiny version.
Solution:   Always use 200.
2021-12-13 14:40:53 +00:00
851f86b951 patch 8.2.3796: the funcexe_T struct members are not named consistently
Problem:    The funcexe_T struct members are not named consistently.
Solution:   Prefix "fe_" to all the members.
2021-12-13 14:26:44 +00:00
739f13a55b patch 8.2.3795: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate the jumplist feature.
2021-12-13 13:12:53 +00:00
33b968dc60 patch 8.2.3794: Vim9: cannot find script-local func using "s:"
Problem:    Vim9: cannot find script-local func using "s:". (Yegappan
            Lakshmanan)
Solution:   Skip the "s:".
2021-12-13 11:31:04 +00:00
ef082e12df patch 8.2.3793: using "g:Func" as a funcref does not work in script context
Problem:    Using "g:Func" as a funcref does not work in script context
            because "g:" is dropped.
Solution:   Keep "g:" in the name.  Also add parenthesis to avoid confusing
            operator prececence. (closes #9336)
2021-12-12 21:02:03 +00:00
04ef1fb13d patch 8.2.3792: setting *func options insufficiently tested
Problem:    Setting *func options insufficiently tested.
Solution:   Impove tests. (Yegappan Lakshmanan, closes #9337)
2021-12-12 20:08:05 +00:00
d2439e0443 patch 8.2.3791: build error with +cindent but without +smartindent
Problem:    Build error with +cindent but without +smartindent.
Solution:   Move declaration of "do_cindent". (John Marriott)
2021-12-12 19:10:44 +00:00
3bb79dc191 patch 8.2.3790: test for term_gettitle() fails in some environments
Problem:    Test for term_gettitle() fails in some environments.
Solution:   Make the digits after "VIM" optional. (Kenta Sato, closes #9334)
2021-12-12 18:50:19 +00:00
fa9a8e0fd1 patch 8.2.3789: Test_window_minimal_size can fail on a slow machine
Problem:    Test_window_minimal_size can fail on a slow machine.
Solution:   Do not rely on timers firing at the expected time. (Ozaki Kiichi,
            closes #9335)
2021-12-12 16:42:09 +00:00
6ae8fae869 patch 8.2.3788: lambda for option that is a function may be freed
Problem:    Lambda for option that is a function may be garbage collected.
Solution:   Set a reference in the funcref. (Yegappan Lakshmanan,
            closes #9330)
2021-12-12 16:26:44 +00:00
6e371ecb27 patch 8.2.3787: no proper formatting of a C line comment after a statement
Problem:    No proper formatting of a C line comment after a statement.
Solution:   Find the start of the line comment, insert the comment leader and
            indent the comment properly.
2021-12-12 14:16:39 +00:00
9a4ec5a626 Use text area for environment in the bug template. 2021-12-12 11:44:11 +00:00
4e30b5c3bc Update issue template. 2021-12-12 11:34:22 +00:00
4f16e9de98 patch 8.2.3786: test fails because of using Vim9 syntax in legacy function
Problem:    Test fails because of using Vim9 syntax in legacy function.
Solution:   Add "call".
2021-12-11 18:46:29 +00:00
48c0196378 patch 8.2.3785: running CI on MacOS with gcc is not useful
Problem:    Running CI on MacOS with gcc is not useful.
Solution:   Only use clang. (Ozaki Kiichi, closes #9326)  Also build with
            normal features.
2021-12-11 17:34:19 +00:00
7b1463bca3 patch 8.2.3784: the help for options is outdated
Problem:    The help for options is outdated.
Solution:   Include all the recent changes.
2021-12-11 17:24:39 +00:00
2ef9156b42 patch 8.2.3783: confusing error for using a variable as a function
Problem:    Confusing error for using a variable as a function.
Solution:   If a function is not found but there is a variable, give a more
            useful error. (issue #9310)
2021-12-11 16:14:07 +00:00
052ff291d7 patch 8.2.3782: Vim9: no error if a function shadows a script variable
Problem:    Vim9: no error if a function shadows a script variable.
Solution:   Check the function doesn't shadow a variable. (closes #9310)
2021-12-11 13:54:46 +00:00
a416861c64 patch 8.2.3781: the option window script is outdated
Problem:    The option window script is outdated.
Solution:   Add several changes.
2021-12-11 12:33:52 +00:00
29f3a45915 patch 8.2.3780: ":cd" works differently on MS-Windows
Problem:    ":cd" works differently on MS-Windows.
Solution:   Add the 'cdhome' option. (closes #9324)
2021-12-11 12:28:08 +00:00
205f29c3e9 patch 8.2.3779: using freed memory when defining a user command recursively
Problem:    Using freed memory when defining a user command from a user
            command.
Solution:   Do not use the command pointer after executing the command.
            (closes #9318)
2021-12-10 21:46:09 +00:00
9537e37b11 patch 8.2.3778: lambda debug test fails in some configurations
Problem:    Lambda debug test fails in some configurations.
Solution:   Check feature in a legacy function.
2021-12-10 21:05:53 +00:00
1daedc8381 patch 8.2.3777: spell file write error not checked
Problem:    Spell file write error not checked.
Solution:   Check writing the prefix conditions. (Bjorn Linse, closes #9323)
2021-12-10 20:39:17 +00:00
f8e9eb8e17 patch 8.2.3776: when a tags file line is long a tag may not be found
Problem:    When a tags file line is long a tag may not be found.
Solution:   When increasing the buffer size read the same line again.
2021-12-10 20:15:15 +00:00
9fffef9f35 patch 8.2.3775: Vim9: lambda compiled without outer context when debugging
Problem:    Vim9: lambda compiled without outer context when debugging.
Solution:   When compiling a lambda for debugging also compile it without.
            (closes #9302)
2021-12-10 16:55:58 +00:00
b711814cb6 patch 8.2.3774: test for command line height fails
Problem:    Test for command line height fails.
Solution:   Use another way to handle window size change.
2021-12-10 13:40:08 +00:00
8a7374f8c4 patch 8.2.3773: wrong window size when a modeline changes 'columns'
Problem:    Wrong window size when a modeline changes 'columns' and there is
            more than one tabpage. (Michael Soyka)
Solution:   Adjust the frames of all tabpages. (closes #9315)
2021-12-10 12:11:09 +00:00
ff39a650b2 patch 8.2.3772: timer info test fails on slow machine
Problem:    Timer info test fails on slow machine.
Solution:   Use WaitForAssert().
2021-12-10 10:57:08 +00:00
dd297bc11d patch 8.2.3771: Vim9: accessing freed memory when checking type
Problem:    Vim9: accessing freed memory when checking type.
Solution:   Make a copy of a function type.
2021-12-10 10:37:38 +00:00
dee78e1ce8 patch 8.2.3770: new compiler warnings from clang-12 and clang-13
Problem:    New compiler warnings from clang-12 and clang-13.
Solution:   Adjust CI and suppress some warnings. (Ozaki Kiichi, closes #9314)
2021-12-09 21:08:01 +00:00
4c8c634365 patch 8.2.3769: zig files are not recognized
Problem:    Zig files are not recognized.
Solution:   Add *.zig. (Gregory Anders, closes #9313)
2021-12-09 20:54:21 +00:00
95b2dd0c00 patch 8.2.3768: timer_info() has the wrong repeat value in a timer callback
Problem:    timer_info() has the wrong repeat value in a timer callback.
Solution:   Do not add one to the repeat value when in the callback.
            (closes #9294)
2021-12-09 18:42:57 +00:00
e8a92b6166 patch 8.2.3767: crash when using NULL partial
Problem:    Crash when using NULL partial.
Solution:   Check for NULL.
2021-12-09 17:44:01 +00:00
c4ec338fb8 patch 8.2.3766: converting a funcref to a string leaves out "g:"
Problem:    Converting a funcref to a string leaves out "g:", causing the
            meaning of the name depending on the context.
Solution:   Prepend "g:" for a global function.
2021-12-09 16:40:18 +00:00
dcb53be441 patch 8.2.3765: Vim9: cannot use a lambda for 'opfunc' and others
Problem:    Vim9: cannot use a lambda for 'opfunc' and others.
Solution:   Convert the lambda to a string.
2021-12-09 14:23:43 +00:00
d0fb907253 patch 8.2.3764: cannot see any text when window was made zero lines
Problem:    Cannot see any text when window was made zero lines or zero
            columns.
Solution:   Ensure there is at least one line and column. (fixes #9307)
2021-12-09 11:57:22 +00:00
e50507126f patch 8.2.3763: when editing the cmdline a callback may cause a scroll up
Problem:    When editing the command line a FocusLost callback may cause the
            screen to scroll up.
Solution:   Do not redraw at the last line but at the same place where the
            command line was before. (closes #9295)
2021-12-09 10:51:05 +00:00
56150da687 patch 8.2.3762: if quickfix buffer is wiped out getqflist() still returns it
Problem:    If the quickfix buffer is wiped out getqflist() still returns its
            number.
Solution:   Use zero if the buffer is no longer present. (Yegappan Lakshmanan,
            closes #9306)
2021-12-09 09:27:06 +00:00
a48d4e44a2 patch 8.2.3761: focus change is not passed on to a terminal window
Problem:    Focus change is not passed on to a terminal window.
Solution:   If the current window is a terminal and focus events are enabled
            send a focus event escape sequence to the terminal.
2021-12-08 22:13:38 +00:00
48873aebc0 patch 8.2.3760: not automatically handling gnome terminal mouse like xterm
Problem:    Not automatically handling gnome terminal mouse like xterm.
Solution:   Default 'ttymouse' to "xterm" and recognize Focus events.
            (issue #9296)
2021-12-08 21:00:24 +00:00
78a61068cf patch 8.2.3759: quickfix buffer becomes hidden while still in a window
Problem:    Quickfix buffer becomes hidden while still in a window.
Solution:   Check if the closed window is the last window showing the quickfix
            buffer. (Yegappan Lakshmanan, closes #9303, closes #9300)
2021-12-08 20:03:31 +00:00
2172bff364 patch 8.2.3758: options that take a function insufficiently tested
Problem:    Options that take a function insufficiently tested.
Solution:   Add additional tests and enhance existing tests. (Yegappan
            Lakshmanan, closes #9298)
2021-12-08 10:46:21 +00:00
f7f7aaf8aa patch 8.2.3757: an overlong highlight group name is silently truncated
Problem:    An overlong highlight group name is silently truncated.
Solution:   Give an error if the name is too long. (closes #9289)
2021-12-07 21:29:20 +00:00
4dc24eb5ad patch 8.2.3756: might crash when callback is not valid
Problem:    might crash when callback is not valid.
Solution:   Check for valid callback. (Yegappan Lakshmanan, closes #9293)
2021-12-07 12:23:57 +00:00
92c33eb273 patch 8.2.3755: Coverity warns for using a buffer in another scope
Problem:    Coverity warns for using a buffer in another scope.
Solution:   Declare the buffer in a common scope.
2021-12-07 11:03:39 +00:00
ecabb51107 patch 8.2.3754: undesired changing of the indent of the first formatted line
Problem:    Undesired changing of the indent of the first formatted line.
Solution:   Do not indent the first formatted line.
2021-12-06 19:51:01 +00:00
3e55a973b5 Add Huntr badge. 2021-12-06 15:13:31 +00:00
2336c376d5 patch 8.2.3753: Vim9: function unreferenced while called is never deleted
Problem:    Vim9: function unreferenced while called is never deleted.
Solution:   Delete a function when no longer referenced.
2021-12-06 15:06:54 +00:00
8603be338a patch 8.2.3752: build error when using Photon GUI
Problem:    Build error when using Photon GUI.
Solution:   Adjust #ifdef. (closes #9288)
2021-12-06 11:24:09 +00:00
6409553b6e patch 8.2.3751: cannot assign a lambda to an option that takes a function
Problem:    Cannot assign a lambda to an option that takes a function.
Solution:   Automatically convert the lambda to a string. (Yegappan
            Lakshmanan, closes #9286)
2021-12-06 11:03:55 +00:00
40bcec1bac patch 8.2.3750: error messages are everywhere
Problem:    Error messages are everywhere.
Solution:   Move more error messages to errors.h and adjust the names.
2021-12-05 22:19:27 +00:00
4700398e38 Update runtime files 2021-12-05 21:54:04 +00:00
12f3c1b77f patch 8.2.3749: error messages are everywhere
Problem:    Error messages are everywhere.
Solution:   Move more error messages to errors.h and adjust the names.
2021-12-05 21:46:34 +00:00
e5710a02cb patch 8.2.3748: giving an error for an empty sign argument breaks a plugin
Problem:    Giving an error for an empty sign argument breaks a plugin.
Solution:   Do not give an error.
2021-12-05 19:10:04 +00:00
0bac5fc5e1 patch 8.2.3747: cannot remove highlight from an existing sign
Problem:    Cannot remove highlight from an existing sign. (James McCoy)
Solution:   Only reject empty argument for a new sign.
2021-12-05 17:45:49 +00:00
c7d5fc8622 patch 8.2.3746: cannot disassemble function starting with "debug" or "profile"
Problem:    Cannot disassemble function starting with "debug" or "profile".
Solution:   Check for white space following. (closes #9273)
2021-12-05 17:20:24 +00:00
f661cee847 patch 8.2.3745: autochdir test fails without the +channel feature
Problem:    Autochdir test fails without the +channel feature.
Solution:   Remove the ch_logfile() call. (Dominique Pellé, closes #9281)
2021-12-05 13:40:01 +00:00
f645ee47c8 patch 8.2.3744: E854 is not tested; some spelling suggestions are not tested
Problem:    E854 is not tested; some spelling suggestions are not tested.
Solution:   Add a couple of tests. (Dominique Pellé, closes #9279)
2021-12-05 13:21:18 +00:00
5e18ccc60b patch 8.2.3743: ":sign" can add a highlight group without a name
Problem:    ":sign" can add a highlight group without a name.
Solution:   Give an error if the group name is missing. (closes #9280)
2021-12-05 13:02:50 +00:00
f589fd3e10 patch 8.2.3742: dec mouse test fails without gnome terminfo entry
Problem:    Dec mouse test fails without gnome terminfo entry.
Solution:   Check if there is a gnome entry. Also fix 'acd' test on
            MS-Windows. (Dominique Pellé, closes #9282)
2021-12-05 12:39:21 +00:00
e031fe90cf patch 8.2.3741: using freed memory in open command
Problem:    Using freed memory in open command.
Solution:   Make a copy of the current line.
2021-12-05 12:06:24 +00:00
c7269f8627 patch 8.2.3740: memory left allocated on exit when using Tcl
Problem:    Memory left allocated on exit when using Tcl.
Solution:   Call Tcl_Finalize().
2021-12-05 11:36:23 +00:00
dea4a61637 patch 8.2.3739: in wrong directory when using win_execute() with 'acd' set
Problem:    In wrong directory when using win_execute() with 'acd' set.
Solution:   Restore the directory when returning to the window. (closes #9276)
2021-12-04 22:03:34 +00:00
23bdef2571 patch 8.2.3738: screen is cleared when a FocusLost autocommand triggers
Problem:    Screen is cleared when a FocusLost autocommand triggers.
Solution:   Do not redraw when at the hit-enter or more prompt. (closes #9274)
2021-12-04 17:20:27 +00:00
8dea145e39 patch 8.2.3737: test fails without the 'autochdir' option
Problem:    Test fails without the 'autochdir' option.
Solution:   Check that the option is available. (Dominique Pellé, closes #9272)
2021-12-04 15:12:40 +00:00
853a7692d1 patch 8.2.3736: test fails without the channel feature
Problem:    Test fails without the channel feature. (Dominique Pellé)
Solution:   Source the check.vim script. (closes #9277)
2021-12-04 15:00:23 +00:00
7645da568c patch 8.2.3735: cannot use a lambda for 'imactivatefunc'
Problem:    Cannot use a lambda for 'imactivatefunc'.
Solution:   Add lambda support for 'imactivatefunc' and 'imstatusfunc'.
            (Yegappan Lakshmanan, closes #9275)
2021-12-04 14:02:30 +00:00
01a4dcbcee patch 8.2.3734: Vim9: crash when no pattern match found
Problem:    Vim9: crash when no pattern match found.
Solution:   Check for error.
2021-12-04 13:15:10 +00:00
b579f6ebbf patch 8.2.3733: Vim9: using "legacy" before range does not work
Problem:    Vim9: using "legacy" before range does not work.
Solution:   Skip over range before parsing command. (closes #9270)
2021-12-04 11:57:00 +00:00
cd2f8f0e00 patch 8.2.3732: "set! termcap" test fails
Problem:    "set! termcap" test fails.
Solution:   Account for keys without a t_xx entry.
2021-12-03 21:18:14 +00:00
500 changed files with 100927 additions and 71378 deletions

9
.github/CODEOWNERS vendored
View File

@ -9,6 +9,7 @@
# So if a pull request only touches javascript files, only these owners
# will be requested to review.
runtime/autoload/freebasic.vim @dkearns
runtime/autoload/getscript.vim @cecamp
runtime/autoload/netrw.vim @cecamp
runtime/autoload/netrwFileHandlers.vim @cecamp
@ -89,6 +90,7 @@ runtime/ftplugin/gitsendemail.vim @tpope
runtime/ftplugin/gprof.vim @dpelle
runtime/ftplugin/haml.vim @tpope
runtime/ftplugin/hgcommit.vim @k-takata
runtime/ftplugin/i3config.vim @hiqua
runtime/ftplugin/indent.vim @dkearns
runtime/ftplugin/javascript.vim @dkearns
runtime/ftplugin/javascriptreact.vim @dkearns
@ -110,10 +112,12 @@ runtime/ftplugin/pbtxt.vim @lakshayg
runtime/ftplugin/pdf.vim @tpope
runtime/ftplugin/ps1.vim @heaths
runtime/ftplugin/ps1xml.vim @heaths
runtime/ftplugin/qb64.vim @dkearns
runtime/ftplugin/routeros.vim @zainin
runtime/ftplugin/ruby.vim @tpope @dkearns
runtime/ftplugin/sass.vim @tpope
runtime/ftplugin/scss.vim @tpope
runtime/ftplugin/solution.vim @dkearns
runtime/ftplugin/spec.vim @ignatenkobrain
runtime/ftplugin/systemverilog.vim @Kocha
runtime/ftplugin/tcsh.vim @dkearns
@ -124,6 +128,7 @@ runtime/ftplugin/typescript.vim @dkearns
runtime/ftplugin/typescriptreact.vim @dkearns
runtime/ftplugin/xml.vim @chrisbra
runtime/ftplugin/zsh.vim @chrisbra
runtime/indent/basic.vim @dkearns
runtime/indent/bst.vim @tpope
runtime/indent/cdl.vim @dkearns
runtime/indent/clojure.vim @axvr
@ -138,6 +143,7 @@ runtime/indent/elm.vim @andys8
runtime/indent/eruby.vim @tpope @dkearns
runtime/indent/eterm.vim @dkearns
runtime/indent/framescript.vim @dkearns
runtime/indent/freebasic.vim @dkearns
runtime/indent/gitconfig.vim @tpope
runtime/indent/haml.vim @tpope
runtime/indent/idlang.vim @dkearns
@ -152,6 +158,7 @@ runtime/indent/occam.vim @dkearns
runtime/indent/postscr.vim @dkearns
runtime/indent/prolog.vim @dkearns
runtime/indent/ps1.vim @heaths
runtime/indent/qb64.vim @dkearns
runtime/indent/readline.vim @dkearns
runtime/indent/ruby.vim @AndrewRadev @dkearns
runtime/indent/sass.vim @tpope
@ -208,6 +215,7 @@ runtime/syntax/groff.vim @jmarshall
runtime/syntax/haml.vim @tpope
runtime/syntax/haskell.vim @coot
runtime/syntax/hgcommit.vim @k-takata
runtime/syntax/i3config.vim @hiqua
runtime/syntax/indent.vim @dkearns
runtime/syntax/kconfig.vim @chrisbra
runtime/syntax/less.vim @genoma
@ -236,6 +244,7 @@ runtime/syntax/prolog.vim @XVilka
runtime/syntax/ps1.vim @heaths
runtime/syntax/ps1xml.vim @heaths
runtime/syntax/psl.vim @danielkho
runtime/syntax/qb64.vim @dkearns
runtime/syntax/rc.vim @chrisbra
runtime/syntax/routeros.vim @zainin
runtime/syntax/rpcgen.vim @cecamp

View File

@ -8,6 +8,11 @@ body:
attributes:
value: |
Thanks for reporting issues of Vim!
If you want to report a security issue, instead of reporting it here
you can alternatively disclose it on
[huntr.dev](https://huntr.dev/bounties/disclose/?utm_campaign=vim%2Fvim&utm_medium=social&utm_source=github&target=https%3A%2F%2Fgithub.com%2Fvim%2Fvim).
They have rewards in the form of money, swag and CVEs.
To make it easier for us to help you please enter detailed information below.
- type: textarea
@ -26,18 +31,23 @@ body:
placeholder: A clear and concise description of what you expected to happen.
validations:
required: true
- type: input
attributes:
label: Operating system
description: >
Your operating system name, version and desktop environment.
validations:
required: true
- type: input
attributes:
label: Version of Vim
description: >
The name of your development environment, version. [e.g. GNOME Terminal (v0.0.0000)]
Including patch level, use ":version" to see it [e.g. 8.2.1234]
validations:
required: true
- type: textarea
attributes:
label: Environment
description: >
OS [e.g. Ubuntu 21.10], terminal [e.g. GNOME Terminal 3.38.1], value of $TERM, shell [e.g. bash 5.1.8]; anything that might matter
placeholder: |
Operating system:
Terminal:
Value of $TERM:
Shell:
validations:
required: true
- type: textarea

View File

@ -5,6 +5,13 @@ on:
branches: ['**']
pull_request:
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for
# pull requests or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
linux:
runs-on: ubuntu-18.04
@ -57,34 +64,41 @@ jobs:
- name: Install packages
run: |
sudo apt update && sudo apt install -y \
autoconf \
lcov \
PKGS=( \
gettext \
libcanberra-dev \
libperl-dev \
python-dev \
python3-dev \
liblua5.3-dev \
lua5.3 \
ruby-dev \
tcl-dev \
cscope \
libgtk2.0-dev \
desktop-file-utils \
libtool-bin \
libsodium-dev
)
if ${{ matrix.features == 'huge' }}; then
PKGS+=( \
autoconf \
lcov \
libcanberra-dev \
libperl-dev \
python-dev \
python3-dev \
liblua5.3-dev \
lua5.3 \
ruby-dev \
tcl-dev \
cscope \
libsodium-dev \
)
fi
sudo apt update && sudo apt install -y "${PKGS[@]}"
- name: Install clang-11
- name: Install clang-13
if: matrix.compiler == 'clang'
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
. /etc/lsb-release
sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-11 main"
sudo apt-get install -y clang-11 llvm-11
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-11 100
sudo update-alternatives --set clang /usr/bin/clang-11
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-11 100
sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-13 main"
sudo apt-get install -y clang-13 llvm-13
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 100
sudo update-alternatives --set clang /usr/bin/clang-13
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-13 100
sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-13 100
- name: Set up environment
run: |
@ -112,7 +126,6 @@ jobs:
;;
esac
CFLAGS=""
if ${{ matrix.coverage == true }}; then
CFLAGS="$CFLAGS --coverage -DUSE_GCOV_FLUSH"
echo "LDFLAGS=--coverage"
@ -188,6 +201,10 @@ jobs:
# Append various warning flags to CFLAGS.
sed -i -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
sed -i -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
if [[ ${CC} = clang ]]; then
# Suppress some warnings produced by clang 12 and later.
sed -i -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
fi
- name: Build
if: (!contains(matrix.extra, 'unittests'))
@ -207,51 +224,57 @@ jobs:
do_test() { sg audio "sg $(id -gn) '$*'"; }
do_test make ${SHADOWOPT} ${TEST}
# - name: Coveralls
# if: matrix.coverage && success() && github.event_name != 'pull_request'
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
# COVERALLS_PARALLEL: true
# TRAVIS_JOB_ID: ${{ github.run_id }}
# run: |
# sudo apt-get install -y python3-setuptools python3-wheel
# sudo -H pip3 install pip -U
# # needed for https support for coveralls building cffi only works with gcc, not with clang
# CC=gcc pip3 install --user cpp-coveralls pyopenssl ndg-httpsclient pyasn1
# ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8
# - name: Coveralls
# if: matrix.coverage && success() && github.event_name != 'pull_request'
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
# COVERALLS_PARALLEL: true
# TRAVIS_JOB_ID: ${{ github.run_id }}
# run: |
# sudo apt-get install -y python3-setuptools python3-wheel
# sudo -H pip3 install pip -U
# # needed for https support for coveralls building cffi only works with gcc, not with clang
# CC=gcc pip3 install --user cpp-coveralls pyopenssl ndg-httpsclient pyasn1
# ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8
- name: Codecov
- name: Generate gcov files
if: matrix.coverage && success()
run: |
cd "${SRCDIR}"
bash <(curl -s https://codecov.io/bash) -F "${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}"
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
- name: Codecov
if: matrix.coverage && success()
uses: codecov/codecov-action@v2
with:
flags: ${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
- name: ASan logs
if: contains(matrix.extra, 'asan') && !cancelled()
run: |
for f in $(grep -lR '#[[:digit:]]* *0x[[:digit:]a-fA-F]*' "${LOG_DIR}"); do
asan_symbolize-11 -l "$f"
asan_symbolize -l "$f"
false # in order to fail a job
done
# coveralls:
# runs-on: ubuntu-18.04
# coveralls:
# runs-on: ubuntu-18.04
#
# needs: linux
# if: always() && github.event_name != 'pull_request'
# needs: linux
# if: always() && github.event_name != 'pull_request'
#
# steps:
# - name: Parallel finished
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
# run: |
# curl -k "https://coveralls.io/webhook?repo_token=${COVERALLS_REPO_TOKEN}" -d "payload[build_num]=${GITHUB_RUN_ID}&payload[status]=done"
# steps:
# - name: Parallel finished
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
# run: |
# curl -k "https://coveralls.io/webhook?repo_token=${COVERALLS_REPO_TOKEN}" -d "payload[build_num]=${GITHUB_RUN_ID}&payload[status]=done"
macos:
runs-on: macos-latest
env:
CC: ${{ matrix.compiler }}
CC: clang
TEST: test
SRCDIR: ./src
LEAK_CFLAGS: -DEXITFREE
@ -260,13 +283,13 @@ jobs:
strategy:
fail-fast: false
matrix:
features: [tiny, huge]
compiler: [clang, gcc]
features: [tiny, normal, huge]
steps:
- uses: actions/checkout@v2
- name: Install packages
if: matrix.features == 'huge'
env:
HOMEBREW_NO_AUTO_UPDATE: 1
run: |
@ -282,6 +305,8 @@ jobs:
echo "TEST=testtiny"
echo "CONFOPT=--disable-gui"
;;
normal)
;;
huge)
echo "CONFOPT=--enable-perlinterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
;;
@ -296,6 +321,10 @@ jobs:
sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
# On macOS, the entity of gcc is clang.
sed -i.bak -f ci/config.mk.clang.sed ${SRCDIR}/auto/config.mk
# Suppress some warnings produced by clang 12 and later.
if clang --version | grep -qs 'Apple clang version \(1[3-9]\|[2-9]\)\.'; then
sed -i.bak -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
fi
- name: Build
env:
@ -443,17 +472,15 @@ jobs:
run: |
call "%VCVARSALL%" ${{ matrix.vcarch }}
cd src
:: Filter out the progress bar from the build log
sed -e "s/@<<$/@<< | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
if "${{ matrix.features }}"=="HUGE" (
nmake -nologo -f Make_mvc2.mak ^
nmake -nologo -f Make_mvc.mak ^
FEATURES=${{ matrix.features }} ^
GUI=yes IME=yes ICONV=yes VIMDLL=yes ^
DYNAMIC_LUA=yes LUA=%LUA_DIR% ^
DYNAMIC_PYTHON=yes PYTHON=%PYTHON_DIR% ^
DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR%
) else (
nmake -nologo -f Make_mvc2.mak ^
nmake -nologo -f Make_mvc.mak ^
FEATURES=${{ matrix.features }} ^
GUI=yes IME=yes ICONV=yes VIMDLL=yes
)
@ -503,16 +530,18 @@ jobs:
call "%VCVARSALL%" ${{ matrix.vcarch }}
cd src
echo.
echo %COL_GREEN%vim version:%COL_RESET%
echo ::group::%COL_GREEN%Vim version:%COL_RESET%
.\vim --version || exit 1
echo ::endgroup::
echo %COL_GREEN%Start testing vim in background.%COL_RESET%
start cmd /c "cd ..\src2\testdir & nmake -nologo -f Make_dos.mak VIMPROG=..\..\src\vim > nul & echo done>done.txt"
echo %COL_GREEN%Test gvim:%COL_RESET%
echo ::group::%COL_GREEN%Test gvim:%COL_RESET%
cd testdir
nmake -nologo -f Make_dos.mak VIMPROG=..\gvim || exit 1
cd ..
echo ::endgroup::
echo %COL_GREEN%Wait for vim tests to finish.%COL_RESET%
cd ..\src2\testdir
@ -525,10 +554,11 @@ jobs:
set timeout=1
:exitloop
echo %COL_GREEN%Test results of vim:%COL_RESET%
echo ::group::%COL_GREEN%Test results of vim:%COL_RESET%
if exist messages type messages
nmake -nologo -f Make_dos.mak report VIMPROG=..\..\src\vim || exit 1
if "%timeout%"=="1" (
echo %COL_RED%Timed out.%COL_RESET%
exit 1
)
echo ::endgroup::

View File

@ -14,6 +14,13 @@ on:
schedule:
- cron: '0 18 * * 1'
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for
# pull requests or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze

View File

@ -8,6 +8,7 @@ SRC_ALL = \
.gitattributes \
.github/CODEOWNERS \
.github/ISSUE_TEMPLATE/bug_report.yml \
.github/ISSUE_TEMPLATE/feature_request.md \
.github/workflows/ci.yml \
.github/workflows/codeql-analysis.yml \
.github/workflows/coverity.yml \
@ -112,6 +113,8 @@ SRC_ALL = \
src/nbdebug.h \
src/netbeans.c \
src/normal.c \
src/nv_cmdidxs.h \
src/nv_cmds.h \
src/ops.c \
src/option.c \
src/option.h \
@ -159,8 +162,11 @@ SRC_ALL = \
src/version.h \
src/vim.h \
src/vim9.h \
src/vim9cmds.c \
src/vim9compile.c \
src/vim9execute.c \
src/vim9expr.c \
src/vim9instr.c \
src/vim9script.c \
src/vim9type.c \
src/viminfo.c \
@ -318,8 +324,11 @@ SRC_ALL = \
src/proto/usercmd.pro \
src/proto/userfunc.pro \
src/proto/version.pro \
src/proto/vim9cmds.pro \
src/proto/vim9compile.pro \
src/proto/vim9execute.pro \
src/proto/vim9expr.pro \
src/proto/vim9instr.pro \
src/proto/vim9script.pro \
src/proto/vim9type.pro \
src/proto/viminfo.pro \
@ -436,6 +445,8 @@ SRC_UNIX = \
src/configure \
src/configure.ac \
src/create_cmdidxs.vim \
src/create_nvcmdidxs.c \
src/create_nvcmdidxs.vim \
src/gui_at_fs.c \
src/gui_at_sb.c \
src/gui_at_sb.h \
@ -490,7 +501,6 @@ SRC_UNIX = \
SRC_DOS_UNIX = \
src/gui_xim.c \
src/if_cscope.c \
src/if_cscope.h \
src/if_lua.c \
src/if_mzsch.c \
src/if_mzsch.h \
@ -537,18 +547,14 @@ SRC_DOS = \
tools/rename.bat \
src/bigvim.bat \
src/bigvim64.bat \
src/msvcsetup.bat \
src/msvc2008.bat \
src/msvc2010.bat \
src/msvc2015.bat \
src/msys32.bat \
src/msys64.bat \
src/dimm.idl \
src/dlldata.c \
src/dosinst.c \
src/dosinst.h \
src/glbl_ime.cpp \
src/glbl_ime.h \
src/gui_dwrite.cpp \
src/gui_dwrite.h \
src/gui_w32.c \
@ -657,10 +663,7 @@ SRC_HAIKU = \
# source files for the Mac (also in the extra archive)
SRC_MAC = \
src/INSTALLmac.txt \
src/dehqx.py \
src/os_mac_rsrc/*.icns \
src/os_mac.h \
src/os_mac.rsr.hqx \
src/os_mac_conv.c \
src/os_macosx.m \
src/proto/os_mac_conv.pro \
@ -698,7 +701,6 @@ SRC_EXTRA = \
$(SRC_QNX) \
$(SRC_VMS) \
README_os390.txt \
src/infplist.xml \
src/link.390 \
src/os_vms_fix.com \
src/toolbar.phi \

View File

@ -5,11 +5,9 @@ setlocal ENABLEDELAYEDEXPANSION
cd %APPVEYOR_BUILD_FOLDER%
cd src
:: Filter out the progress bar from the build log
sed -e "s/@<<$/@<< | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
echo "Building MSVC 64bit console Version"
nmake -f Make_mvc2.mak CPU=AMD64 ^
nmake -f Make_mvc.mak CPU=AMD64 ^
OLE=no GUI=no IME=yes ICONV=yes DEBUG=no ^
FEATURES=%FEATURE%
if not exist vim.exe (
@ -21,13 +19,13 @@ if not exist vim.exe (
:: GUI needs to be last, so that testing works
echo "Building MSVC 64bit GUI Version"
if "%FEATURE%" == "HUGE" (
nmake -f Make_mvc2.mak CPU=AMD64 ^
nmake -f Make_mvc.mak CPU=AMD64 ^
OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no POSTSCRIPT=yes ^
PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 ^
PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 ^
FEATURES=%FEATURE%
) ELSE (
nmake -f Make_mvc2.mak CPU=AMD64 ^
nmake -f Make_mvc.mak CPU=AMD64 ^
OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no ^
FEATURES=%FEATURE%
)

View File

@ -0,0 +1,3 @@
# Clang 12 (or Apple clang 13) and later makes a warning '-Wcompound-token-split-by-macro' enable by default.
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=compound-token-split-by-macro/
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=compound-token-split-by-macro/

View File

@ -1,2 +1,2 @@
/^CFLAGS[[:blank:]]*=/s/$/ -Wno-error=missing-field-initializers/
/^RUBY_CFLAGS[[:blank:]]*=/s/$/ -Wno-error=unknown-attributes -Wno-error=ignored-attributes/
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unknown-attributes -Wno-error=ignored-attributes/

View File

@ -1,2 +1,3 @@
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Werror/
/^PERL_CFLAGS[[:blank:]]*=/s/$/ -Wno-error=unused-function/
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function/
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter/

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
" Vim filetype plugin file
" Language: FreeBASIC
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Mar 16
" Dialects can be one of fb, qb, fblite, or deprecated
" Precedence is forcelang > #lang > lang
function! freebasic#GetDialect() abort
if exists("g:freebasic_forcelang")
return g:freebasic_forcelang
endif
if exists("g:freebasic_lang")
let dialect = g:freebasic_lang
else
let dialect = "fb"
endif
" override with #lang directive or metacommand
let skip = "has('syntax_items') && synIDattr(synID(line('.'), col('.'), 1), 'name') =~ 'Comment$'"
let pat = '\c^\s*\%(#\s*lang\s\+\|''\s*$lang\s*:\s*\)"\([^"]*\)"'
let save_cursor = getcurpos()
call cursor(1, 1)
let lnum = search(pat, 'n', '', '', skip)
call setpos('.', save_cursor)
if lnum
let word = matchlist(getline(lnum), pat)[1]
if word =~? '\%(fb\|deprecated\|fblite\|qb\)'
let dialect = word
else
echomsg "freebasic#GetDialect: Invalid lang, found '" .. word .. "' at line " .. lnum .. " " .. getline(lnum)
endif
endif
return dialect
endfunction
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:

View File

@ -16,6 +16,7 @@ include ../../src/auto/config.mk
DOCS = \
arabic.txt \
autocmd.txt \
builtin.txt \
change.txt \
channel.txt \
cmdline.txt \
@ -161,6 +162,7 @@ DOCS = \
HTMLS = \
arabic.html \
autocmd.html \
builtin.html \
change.html \
channel.html \
cmdline.html \

View File

@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.2. Last change: 2021 Nov 20
*autocmd.txt* For Vim version 8.2. Last change: 2022 Jan 21
VIM REFERENCE MANUAL by Bram Moolenaar
@ -51,10 +51,10 @@ effects. Be careful not to destroy your text.
2. Defining autocommands *autocmd-define*
*:au* *:autocmd*
:au[tocmd] [group] {event} {pat} [++once] [++nested] {cmd}
:au[tocmd] [group] {event} {aupat} [++once] [++nested] {cmd}
Add {cmd} to the list of commands that Vim will
execute automatically on {event} for a file matching
{pat} |autocmd-patterns|.
{aupat} |autocmd-patterns|.
Here {event} cannot be "*". *E1155*
Note: A quote character is seen as argument to the
:autocmd and won't start a comment.
@ -145,19 +145,19 @@ prompt. When one command outputs two messages this can happen anyway.
==============================================================================
3. Removing autocommands *autocmd-remove*
:au[tocmd]! [group] {event} {pat} [++once] [++nested] {cmd}
:au[tocmd]! [group] {event} {aupat} [++once] [++nested] {cmd}
Remove all autocommands associated with {event} and
{pat}, and add the command {cmd}.
{aupat}, and add the command {cmd}.
See |autocmd-once| for [++once].
See |autocmd-nested| for [++nested].
:au[tocmd]! [group] {event} {pat}
:au[tocmd]! [group] {event} {aupat}
Remove all autocommands associated with {event} and
{pat}.
{aupat}.
:au[tocmd]! [group] * {pat}
Remove all autocommands associated with {pat} for all
events.
:au[tocmd]! [group] * {aupat}
Remove all autocommands associated with {aupat} for
all events.
:au[tocmd]! [group] {event}
Remove ALL autocommands for {event}.
@ -177,12 +177,12 @@ with ":augroup"); otherwise, Vim uses the group defined with [group].
==============================================================================
4. Listing autocommands *autocmd-list*
:au[tocmd] [group] {event} {pat}
:au[tocmd] [group] {event} {aupat}
Show the autocommands associated with {event} and
{pat}.
{aupat}.
:au[tocmd] [group] * {pat}
Show the autocommands associated with {pat} for all
:au[tocmd] [group] * {aupat}
Show the autocommands associated with {aupat} for all
events.
:au[tocmd] [group] {event}
@ -1211,7 +1211,7 @@ TextYankPost After text has been yanked or deleted in the
Not triggered when |quote_| is used nor when
called recursively.
It is not allowed to change the buffer text,
see |textlock|.
see |textlock|. *E1064*
{only when compiled with the +eval feature}
*User*
@ -1279,8 +1279,8 @@ VimResume When the Vim instance is resumed after being
:autocmd VimResume * checktime
< *VimSuspend*
VimSuspend When the Vim instance is suspended. Only when
CTRL-Z was typed inside Vim, not when the
SIGSTOP or SIGTSTP signal was sent to Vim.
CTRL-Z was typed inside Vim, or when the SIGTSTP
signal was sent to Vim, but not for SIGSTOP.
*WinClosed*
WinClosed After closing a window. The pattern is
matched against the |window-ID|. Both
@ -1311,16 +1311,16 @@ WinNew When a new window was created. Not done for
Before a WinEnter event.
==============================================================================
6. Patterns *autocmd-patterns* *{pat}*
6. Patterns *autocmd-patterns* *{aupat}*
The {pat} argument can be a comma separated list. This works as if the
command was given with each pattern separately. Thus this command: >
The {aupat} argument of `:autocmd` can be a comma separated list. This works as
if the command was given with each pattern separately. Thus this command: >
:autocmd BufRead *.txt,*.info set et
Is equivalent to: >
:autocmd BufRead *.txt set et
:autocmd BufRead *.info set et
The file pattern {pat} is tested for a match against the file name in one of
The file pattern {aupat} is tested for a match against the file name in one of
two ways:
1. When there is no '/' in the pattern, Vim checks for a match against only
the tail part of the file name (without its leading directory path).

10171
runtime/doc/builtin.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
*change.txt* For Vim version 8.2. Last change: 2021 Jun 23
*change.txt* For Vim version 8.2. Last change: 2022 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -259,6 +259,9 @@ Or use "caw" (see |aw|).
line.
Adding [!] toggles 'autoindent' for the time this
command is executed.
This command is not supported in |Vim9| script,
because it is too easily confused with a variable
name.
==============================================================================
3. Simple changes *simple-change*
@ -779,7 +782,7 @@ This deletes "TESTING" from all lines, but only one per line.
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*
*pattern-delimiter* *E146* *E1241* *E1242*
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: >
@ -1073,7 +1076,7 @@ inside of strings can change! Also see 'softtabstop' option. >
in [range] (default: current line |cmdline-ranges|),
[into register x].
*p* *put* *E353*
*p* *put* *E353* *E1240*
["x]p Put the text [from register x] after the cursor
[count] times.
@ -1173,10 +1176,13 @@ register. With blockwise selection it also depends on the size of the block
and whether the corners are on an existing character. (Implementation detail:
it actually works by first putting the register after the selection and then
deleting the selection.)
The previously selected text is put in the unnamed register. If you want to
put the same text into a Visual selection several times you need to use
With 'p' the previously selected text is put in the unnamed register. This is
useful if you want to put that text somewhere else. But you cannot repeat the
same change.
With 'P' the unnamed register is not changed, you can repeat the same change.
But the deleted text cannot be used. If you do need it you can use 'p' with
another register. E.g., yank the text to copy, Visually select the text to
replace and use "0p . You can repeat this as many times as you like, the
replace and use "0p . You can repeat this as many times as you like, and the
unnamed register will be changed each time.
When you use a blockwise Visual mode command and yank only a single line into
@ -1374,6 +1380,9 @@ The next three commands always work on whole lines.
*:t*
:t Synonym for copy.
This command is not supported in |Vim9| script,
because it is too easily confused with a variable
name.
:[range]m[ove] {address} *:m* *:mo* *:move* *E134*
Move the lines given by [range] to below the line
@ -1671,7 +1680,8 @@ r Automatically insert the current comment leader after hitting
<Enter> in Insert mode.
*fo-o*
o Automatically insert the current comment leader after hitting 'o' or
'O' in Normal mode.
'O' in Normal mode. In case comment is unwanted in a specific place
use CTRL-U to quickly delete it. |i_CTRL-U|
*fo-q*
q Allow formatting of comments with "gq".
Note that formatting will not change blank lines or lines containing

View File

@ -1,4 +1,4 @@
*channel.txt* For Vim version 8.2. Last change: 2020 Oct 17
*channel.txt* For Vim version 8.2. Last change: 2021 Nov 28
VIM REFERENCE MANUAL by Bram Moolenaar
@ -101,7 +101,7 @@ Instead of giving a callback with every send call, it can also be specified
when opening the channel: >
call ch_close(channel)
let channel = ch_open('localhost:8765', {'callback': "MyHandler"})
call ch_sendexpr(channel, 'hello!')
call ch_sendexpr(channel, 'hello channel!')
When trying out channels it's useful to see what is going on. You can tell
Vim to write lines in log file: >
@ -132,8 +132,9 @@ When using an IPv6 address, enclose it within square brackets. E.g.,
"raw" - Use raw messages
*channel-callback* *E921*
"callback" A function that is called when a message is received that is
not handled otherwise. It gets two arguments: the channel
and the received message. Example: >
not handled otherwise (e.g. a JSON message with ID zero). It
gets two arguments: the channel and the received message.
Example: >
func Handle(channel, msg)
echo 'Received: ' . a:msg
endfunc

View File

@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 8.2. Last change: 2021 Nov 22
*cmdline.txt* For Vim version 8.2. Last change: 2022 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -705,6 +705,15 @@ Some Ex commands accept a line range in front of them. This is noted as
The basics are explained in section |10.3| of the user manual.
In |Vim9| script a range needs to be prefixed with a colon to avoid ambiguity
with continuation lines. For example, "+" can be used for a range but is also
a continuation of an expression: >
var result = start
+ print
If the "+" is a range then it must be prefixed with a colon: >
var result = start
:+ print
<
*:,* *:;*
When separated with ';' the cursor position will be set to that line
before interpreting the next line specifier. This doesn't happen for ','.
@ -721,7 +730,7 @@ If more line specifiers are given than required for the command, the first
one(s) will be ignored.
Line numbers may be specified with: *:range* *{address}*
{number} an absolute line number
{number} an absolute line number *E1247*
. the current line *:.*
$ the last line in the file *:$*
% equal to 1,$ (the entire file) *:%*
@ -739,7 +748,8 @@ Line numbers may be specified with: *:range* *{address}*
Each may be followed (several times) by '+' or '-' and an optional number.
This number is added or subtracted from the preceding line number. If the
number is omitted, 1 is used.
number is omitted, 1 is used. If there is nothing before the '+' or '-' then
the current line is used.
The "/" and "?" after {pattern} are required to separate the pattern from
anything that follows.
@ -769,7 +779,7 @@ Some commands allow for a count after the command. This count is used as the
number of lines to be used, starting with the line given in the last line
specifier (the default is the cursor line). The commands that accept a count
are the ones that use a range but do not have a file name argument (because
a file name can also be a number).
a file name can also be a number). The count cannot be negative.
Examples: >
:s/x/X/g 5 substitute 'x' by 'X' in the current line and four
@ -919,9 +929,11 @@ Note: these are typed literally, they are not special keys!
*:<amatch>* *<amatch>*
<amatch> When executing autocommands, is replaced with the match for
which this autocommand was executed. *E497*
It differs from <afile> only when the file name isn't used
to match with (for FileType, Syntax and SpellFileMissing
It differs from <afile> when the file name isn't used to
match with (for FileType, Syntax and SpellFileMissing
events).
When the match is with a file name, it is expanded to the
full path.
*:<sfile>* *<sfile>*
<sfile> When executing a ":source" command, is replaced with the
file name of the sourced file. *E498*
@ -938,6 +950,7 @@ Note: these are typed literally, they are not special keys!
and "script {file-name}[{lnum}]" for a script line, and
".." in between items. E.g.:
"function {function-name1}[{lnum}]..{function-name2}[{lnum}]"
If there is no call stack you get error *E489* .
*:<slnum>* *<slnum>*
<slnum> When executing a ":source" command, is replaced with the
line number. *E842*

View File

@ -1,4 +1,4 @@
*diff.txt* For Vim version 8.2. Last change: 2021 May 24
*diff.txt* For Vim version 8.2. Last change: 2022 Jan 22
VIM REFERENCE MANUAL by Bram Moolenaar
@ -335,8 +335,9 @@ After setting this variable, reload the syntax script: >
FINDING THE DIFFERENCES *diff-diffexpr*
The 'diffexpr' option can be set to use something else than the standard
"diff" program to compare two files and find the differences. *E959*
The 'diffexpr' option can be set to use something else than the internal diff
support or the standard "diff" program to compare two files and find the
differences. *E959*
When 'diffexpr' is empty, Vim uses this command to find the differences
between file1 and file2: >
@ -369,7 +370,7 @@ format mentioned. These variables are set to the file names used:
v:fname_in original file
v:fname_new new version of the same file
v:fname_out resulting diff file
v:fname_out where to write the resulting diff file
Additionally, 'diffexpr' should take care of "icase" and "iwhite" in the
'diffopt' option. 'diffexpr' cannot change the value of 'lines' and
@ -398,6 +399,13 @@ mode, so that a CTRL-Z doesn't end the text on DOS.
The `redraw!` command may not be needed, depending on whether executing a
shell command shows something on the display or not.
If the 'diffexpr' expression starts with s: or |<SID>|, then it is replaced
with the script ID (|local-function|). Example: >
set diffexpr=s:MyDiffExpr()
set diffexpr=<SID>SomeDiffExpr()
Otherwise, the expression is evaluated in the context of the script where the
option was set, thus script-local items are available.
*E810* *E97*
Vim will do a test if the diff output looks alright. If it doesn't, you will
get an error message. Possible causes:
@ -449,4 +457,12 @@ evaluating 'patchexpr'. This hopefully avoids that files in the current
directory are accidentally patched. Vim will also delete files starting with
v:fname_in and ending in ".rej" and ".orig".
If the 'patchexpr' expression starts with s: or |<SID>|, then it is replaced
with the script ID (|local-function|). Example: >
set patchexpr=s:MyPatchExpr()
set patchexpr=<SID>SomePatchExpr()
Otherwise, the expression is evaluated in the context of the script where the
option was set, thus script-local items are available.
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -1,4 +1,4 @@
*editing.txt* For Vim version 8.2. Last change: 2021 Oct 16
*editing.txt* For Vim version 8.2. Last change: 2022 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -433,7 +433,7 @@ This also works for most other systems, with the restriction that the
backticks must be around the whole item. It is not possible to have text
directly before the first or just after the last backtick.
*`=*
*`=* *E1083*
You can have the backticks expanded as a Vim expression, instead of as an
external command, by putting an equal sign right after the first backtick,
e.g.: >
@ -633,7 +633,7 @@ list of the current window.
Also see |++opt| and |+cmd|.
:[count]arga[dd] {name} .. *:arga* *:argadd* *E479*
:[count]arga[dd]
:[count]arga[dd] *E1156*
Add the {name}s to the argument list. When {name} is
omitted add the current buffer name to the argument
list.
@ -650,12 +650,19 @@ list of the current window.
And after the last one:
:+2argadd y a b c x y
There is no check for duplicates, it is possible to
add a file to the argument list twice.
The currently edited file is not changed.
add a file to the argument list twice. You can use
|:argdedupe| to fix it afterwards: >
:argadd *.txt | argdedupe
< The currently edited file is not changed.
Note: you can also use this method: >
:args ## x
< This will add the "x" item and sort the new list.
:argded[upe] *:argded* *:argdedupe*
Remove duplicate filenames from the argument list.
If your current file is a duplicate, your current file
will change to the original file index.
:argd[elete] {pattern} .. *:argd* *:argdelete* *E480* *E610*
Delete files from the argument list that match the
{pattern}s. {pattern} is used like a file pattern,
@ -883,7 +890,7 @@ Note: When the 'write' option is off, you are not able to write any file.
*:w* *:write*
*E502* *E503* *E504* *E505*
*E512* *E514* *E667* *E796* *E949*
*E512* *E514* *E667* *E949*
:w[rite] [++opt] Write the whole buffer to the current file. This is
the normal way to save changes to a file. It fails
when the 'readonly' option is set or when there is
@ -1140,6 +1147,9 @@ The names can be in upper- or lowercase.
made.
When 'hidden' is set and there are more windows, the
current buffer becomes hidden, after writing the file.
This command is not supported in |Vim9| script,
because it is too easily confused with a variable
name.
*:exi* *:exit*
:[range]exi[t][!] [++opt] [file]
@ -1298,11 +1308,12 @@ Changing directory fails when the current buffer is modified, the '.' flag is
present in 'cpoptions' and "!" is not used in the command.
*:cd* *E747* *E472*
:cd[!] On non-Unix systems: Print the current directory
name. On Unix systems: Change the current directory
to the home directory. Use |:pwd| to print the
current directory on all systems.
On Unix systems: clear any window-local directory.
:cd[!] On non-Unix systems when 'cdhome' is off: Print the
current directory name.
Otherwise: Change the current directory to the home
directory. Clear any window-local directory.
Use |:pwd| to print the current directory on all
systems.
:cd[!] {path} Change the current directory to {path}.
If {path} is relative, it is searched for in the
@ -1377,7 +1388,8 @@ becomes the current directory for that window. Windows where the |:lcd|
command has not been used stick to the global or tab-local current directory.
When jumping to another window the current directory is changed to the last
specified local current directory. If none was specified, the global or
tab-local current directory is used.
tab-local current directory is used. When creating a new window it inherits
the local directory of the current window.
When a |:tcd| command has been used for a tab page, the specified directory
becomes the current directory for the current tab page and the current window.
@ -1759,11 +1771,9 @@ 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 "..".
< Note: If your 'path' setting includes a non-existing directory, Vim will
skip the non-existing directory, and also does not search in the parent of
the non-existing directory if upwards searching is used.
3) Combined up/downward search:
If Vim's current path is /u/user_x/work/release and you do >

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
*filetype.txt* For Vim version 8.2. Last change: 2021 Sep 22
*filetype.txt* For Vim version 8.2. Last change: 2022 Jan 21
VIM REFERENCE MANUAL by Bram Moolenaar
@ -133,15 +133,17 @@ shell script: "#!/bin/csh".
argument was used.
*filetype-overrule*
When the same extension is used for two filetypes, Vim tries to guess what
kind of file it is. This doesn't always work. A number of global variables
can be used to overrule the filetype used for certain extensions:
When the same extension is used for multiple filetypes, Vim tries to guess
what kind of file it is. This doesn't always work. A number of global
variables can be used to overrule the filetype used for certain extensions:
file name variable ~
*.asa g:filetype_asa |ft-aspvbs-syntax| |ft-aspperl-syntax|
*.asm g:asmsyntax |ft-asm-syntax|
*.asp g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax|
*.fs g:filetype_fs |ft-forth-syntax|
*.bas g:filetype_bas |ft-basic-syntax|
*.frm g:filetype_frm |ft-form-syntax|
*.fs g:filetype_fs |ft-forth-syntax|
*.i g:filetype_i |ft-progress-syntax|
*.inc g:filetype_inc
*.m g:filetype_m |ft-mathematica-syntax|
@ -358,12 +360,12 @@ define yourself. There are a few ways to avoid this:
You need to define your own mapping before the plugin is loaded (before
editing a file of that type). The plugin will then skip installing the
default mapping.
*no_mail_maps*
*no_mail_maps* *g:no_mail_maps*
3. Disable defining mappings for a specific filetype by setting a variable,
which contains the name of the filetype. For the "mail" filetype this
would be: >
:let no_mail_maps = 1
< *no_plugin_maps*
< *no_plugin_maps* *g:no_plugin_maps*
4. Disable defining mappings for all filetypes by setting a variable: >
:let no_plugin_maps = 1
<
@ -539,14 +541,6 @@ Options:
For further discussion of fortran_have_tabs and the method used for the
detection of source format see |ft-fortran-syntax|.
GPROF *ft-gprof-plugin*
The gprof filetype plugin defines a mapping <C-]> to jump from a function
entry in the gprof flat profile or from a function entry in the call graph
to the details of that function in the call graph.
The mapping can be disabled with: >
let g:no_gprof_maps = 1
GIT COMMIT *ft-gitcommit-plugin*

View File

@ -1,4 +1,4 @@
*fold.txt* For Vim version 8.2. Last change: 2021 Jul 13
*fold.txt* For Vim version 8.2. Last change: 2022 Jan 22
VIM REFERENCE MANUAL by Bram Moolenaar
@ -121,6 +121,11 @@ method can be very slow!
Try to avoid the "=", "a" and "s" return values, since Vim often has to search
backwards for a line for which the fold level is defined. This can be slow.
If the 'foldexpr' expression starts with s: or |<SID>|, then it is replaced
with the script ID (|local-function|). Examples: >
set foldexpr=s:MyFoldExpr()
set foldexpr=<SID>SomeFoldExpr()
<
An example of using "a1" and "s1": For a multi-line C comment, a line
containing "/*" would return "a1" to start a fold, and a line containing "*/"
would return "s1" to end the fold after that line: >
@ -506,7 +511,10 @@ Note the use of backslashes to avoid some characters to be interpreted by the
:endfunction
Evaluating 'foldtext' is done in the |sandbox|. The current window is set to
the window that displays the line. Errors are ignored.
the window that displays the line. The context is set to the script where the
option was last set.
Errors are ignored. For debugging set the 'debug' option to "throw".
The default value is |foldtext()|. This returns a reasonable text for most
types of folding. If you don't like it, you can specify your own 'foldtext'
@ -524,6 +532,11 @@ The resulting line is truncated to fit in the window, it never wraps.
When there is room after the text, it is filled with the character specified
by 'fillchars'.
If the 'foldtext' expression starts with s: or |<SID>|, then it is replaced
with the script ID (|local-function|). Examples: >
set foldtext=s:MyFoldText()
set foldtext=<SID>SomeFoldText()
<
Note that backslashes need to be used for characters that the ":set" command
handles differently: Space, backslash and double-quote. |option-backslash|

View File

@ -1,4 +1,4 @@
*help.txt* For Vim version 8.2. Last change: 2020 Aug 15
*help.txt* For Vim version 8.2. Last change: 2021 Dec 27
VIM - main help file
k
@ -136,6 +136,7 @@ Advanced editing ~
|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
|builtin.txt| builtin functions
|channel.txt| Jobs, Channels, inter-process communication
|fold.txt| hide (fold) ranges of lines

View File

@ -1,4 +1,4 @@
*helphelp.txt* For Vim version 8.2. Last change: 2021 Nov 18
*helphelp.txt* For Vim version 8.2. Last change: 2022 Jan 08
VIM REFERENCE MANUAL by Bram Moolenaar
@ -163,7 +163,7 @@ If you would like to open the help in the current window, see this tip:
The initial height of the help window can be set with the 'helpheight' option
(default 20).
*help-buffer-options*
When the help buffer is created, several local options are set to make sure
the help text is displayed as it was intended:
'iskeyword' nearly all ASCII chars except ' ', '*', '"' and '|'
@ -224,7 +224,7 @@ command: >
dialog. {only when compiled with |+GUI_GTK|}
*:helpt* *:helptags*
*E154* *E150* *E151* *E152* *E153* *E670*
*E150* *E151* *E152* *E153* *E154* *E670*
:helpt[ags] [++t] {dir}
Generate the help tags file(s) for directory {dir}.
When {dir} is ALL then all "doc" directories in

View File

@ -1,4 +1,4 @@
*if_cscop.txt* For Vim version 8.2. Last change: 2019 May 05
*if_cscop.txt* For Vim version 8.2. Last change: 2022 Jan 08
VIM REFERENCE MANUAL by Andy Kahn
@ -89,7 +89,7 @@ suggested use.)
==============================================================================
2. Cscope related commands *cscope-commands*
*:cscope* *:cs* *:scs* *:scscope* *E259* *E262* *E561* *E560*
*:cscope* *:cs* *:scs* *:scscope* *E259* *E262* *E560* *E561*
All cscope commands are accessed through suboptions to the cscope commands.
`:cscope` or `:cs` is the main command
`:scscope` or `:scs` does the same and splits the window

View File

@ -1,4 +1,4 @@
*if_perl.txt* For Vim version 8.2. Last change: 2019 Dec 07
*if_perl.txt* For Vim version 8.2. Last change: 2022 Jan 28
VIM REFERENCE MANUAL by Sven Verdoolaege
@ -103,8 +103,7 @@ Here are some things you can try: >
:perldo $_ = reverse($_);1
:perl VIM::Msg("hello")
:perl $line = $curbuf->Get(42)
<
*E299*
< *E299*
Executing Perl commands in the |sandbox| is limited. ":perldo" will not be
possible at all. ":perl" will be evaluated in the Safe environment, if
possible.

View File

@ -1,4 +1,4 @@
*if_tcl.txt* For Vim version 8.2. Last change: 2021 May 27
*if_tcl.txt* For Vim version 8.2. Last change: 2022 Jan 08
VIM REFERENCE MANUAL by Ingo Wilken
@ -16,9 +16,9 @@ The Tcl Interface to Vim *tcl* *Tcl* *TCL*
8. Examples |tcl-examples|
9. Dynamic loading |tcl-dynamic|
*E280*
{only available when Vim was compiled with the |+tcl| feature}
*E280*
WARNING: There are probably still some bugs. Please send bug reports,
comments, ideas etc to <Ingo.Wilken@informatik.uni-oldenburg.de>

View File

@ -1,4 +1,4 @@
*indent.txt* For Vim version 8.2. Last change: 2019 Dec 07
*indent.txt* For Vim version 8.2. Last change: 2022 Jan 31
VIM REFERENCE MANUAL by Bram Moolenaar
@ -778,6 +778,15 @@ You can set the indent for the first line after <script> and <style>
"auto" auto indent (same indent as the blocktag)
"inc" auto indent + one indent step
You can set the indent for attributes after an open <tag line: >
:let g:html_indent_attribute = 1
<
VALUE MEANING ~
1 auto indent, one indent step more than <tag
2 auto indent, two indent steps (default)
> 2 auto indent, more indent steps
Many tags increase the indent for what follows per default (see "Add Indent
Tags" in the script). You can add further tags with: >
@ -879,7 +888,7 @@ For example, with N = 1, this will give:
*PHP_outdentphpescape*
To indent PHP escape tags as the surrounding non-PHP code (only affects the
PHP escape tags): >
:let g:PHP_outdentphpescape = 0
:let g:PHP_outdentphpescape = 0
-------------
*PHP_removeCRwhenUnix*
@ -1206,7 +1215,7 @@ comments will be indented according to the correctly indented code.
VIM *ft-vim-indent*
*g:vim_indent_cont*
For indenting Vim scripts there is one variable that specifies the amount of
indent for a continuation line, a line that starts with a backslash: >

View File

@ -1,4 +1,4 @@
*index.txt* For Vim version 8.2. Last change: 2021 Aug 31
*index.txt* For Vim version 8.2. Last change: 2022 Jan 28
VIM REFERENCE MANUAL by Bram Moolenaar
@ -937,7 +937,9 @@ tag command note action in Visual mode ~
before the highlighted area
|v_J| J 2 join the highlighted lines
|v_K| K run 'keywordprg' on the highlighted area
|v_O| O Move horizontally to other corner of area.
|v_O| O move horizontally to other corner of area
|v_P| P replace highlighted area with register
contents; unnamed register is unchanged
Q does not start Ex mode
|v_R| R 2 delete the highlighted lines and start
insert
@ -1000,6 +1002,8 @@ tag command note action in Visual mode ~
|v_i{| i{ same as iB
|v_i}| i} same as iB
|v_o| o move cursor to other corner of area
|v_p| p replace highlighted area with register
contents; deleted text in unnamed register
|v_r| r 2 replace highlighted area with a character
|v_s| s 2 delete highlighted area and start insert
|v_u| u 2 make highlighted area lowercase
@ -1166,6 +1170,7 @@ tag command action ~
be remapped
|:args| :ar[gs] print the argument list
|:argadd| :arga[dd] add items to the argument list
:argdedupe :argdedupe remove duplicates from the argument list
|:argdelete| :argd[elete] delete items from the argument list
|:argedit| :arge[dit] add item to the argument list and edit it
|:argdo| :argdo do a command on all items in the argument list

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 8.2. Last change: 2021 Oct 24
*insert.txt* For Vim version 8.2. Last change: 2021 Dec 29
VIM REFERENCE MANUAL by Bram Moolenaar
@ -84,6 +84,8 @@ CTRL-U Delete all entered characters before the cursor in the current
line. If there are no newly entered characters and
'backspace' is not empty, delete all characters before the
cursor in the current line.
If C-indenting is enabled the indent will be adjusted if the
line becomes blank.
See |i_backspacing| about joining lines.
*i_CTRL-I* *i_<Tab>* *i_Tab*
<Tab> or CTRL-I Insert a tab. If the 'expandtab' option is on, the
@ -848,7 +850,7 @@ space is preferred). Maximum line length is 510 bytes.
For an example, imagine the 'thesaurus' file has a line like this: >
angry furious mad enraged
<Placing the cursor after the letters "ang" and typing CTRL-X CTRL-T would
Placing the cursor after the letters "ang" and typing CTRL-X CTRL-T would
complete the word "angry"; subsequent presses would change the word to
"furious", "mad" etc.
@ -860,7 +862,7 @@ https://github.com/vim/vim/issues/629#issuecomment-443293282
Unpack thesaurus_pkg.zip, put the thesaurus.txt file somewhere, e.g.
~/.vim/thesaurus/english.txt, and the 'thesaurus' option to this file name.
Completing keywords with 'thesaurusfunc' *compl-thesaurusfunc*
If the 'thesaurusfunc' option is set, then the user specified function is
@ -1945,6 +1947,9 @@ When 'autoindent' is on, the indent for a new line is obtained from the
previous line. When 'smartindent' or 'cindent' is on, the indent for a line
is automatically adjusted for C programs.
'formatoptions' can be set to copy the comment leader when opening a new
line.
'textwidth' can be set to the maximum width for a line. When a line becomes
too long when appending characters a line break is automatically inserted.
@ -1958,6 +1963,9 @@ too long when appending characters a line break is automatically inserted.
inserted after the current line.
Adding [!] toggles 'autoindent' for the time this
command is executed.
This command is not supported in |Vim9| script,
because it is too easily confused with a variable
name.
*:i* *:in* *:insert*
:{range}i[nsert][!] Insert several lines of text above the specified
@ -1965,6 +1973,9 @@ too long when appending characters a line break is automatically inserted.
inserted before the current line.
Adding [!] toggles 'autoindent' for the time this
command is executed.
This command is not supported in |Vim9| script,
because it is too easily confused with a variable
name.
These two commands will keep on asking for lines, until you type a line
containing only a ".". Watch out for lines starting with a backslash, see

View File

@ -1,4 +1,4 @@
*map.txt* For Vim version 8.2. Last change: 2021 Nov 20
*map.txt* For Vim version 8.2. Last change: 2022 Jan 23
VIM REFERENCE MANUAL by Bram Moolenaar
@ -6,7 +6,7 @@
Key mapping, abbreviations and user-defined commands.
This subject is introduced in sections |05.3|, |24.7| and |40.1| of the user
This subject is introduced in sections |05.4|, |24.7| and |40.1| of the user
manual.
1. Key mapping |key-mapping|
@ -97,8 +97,7 @@ modes.
map command applies. The mapping may remain defined
for other modes where it applies.
It also works when {lhs} matches the {rhs} of a
mapping. This is for when when an abbreviation
applied.
mapping. This is for when an abbreviation applied.
Note: Trailing spaces are included in the {lhs}. This
unmap does NOT work: >
:map @@ foo
@ -173,7 +172,7 @@ type "a", then "bar" will get inserted.
"<unique>" can be used in any order. They must appear right after the
command, before any other arguments.
*:map-local* *:map-<buffer>* *E224* *E225*
*:map-local* *:map-<buffer>* *:map-buffer* *E224* *E225*
If the first argument to one of these commands is "<buffer>" the mapping will
be effective in the current buffer only. Example: >
:map <buffer> ,w /[.,;]<CR>
@ -232,7 +231,7 @@ Note: ":map <script>" and ":noremap <script>" do the same thing. The
"<script>" overrules the command name. Using ":noremap <script>" is
preferred, because it's clearer that remapping is (mostly) disabled.
*:map-<unique>* *E226* *E227*
*:map-<unique>* *:map-unique* *E226* *E227*
If the first argument to one of these commands is "<unique>" and it is used to
define a new mapping or abbreviation, the command will fail if the mapping or
abbreviation already exists. Example: >
@ -271,7 +270,7 @@ input. Example: >
endfunc
nnoremap <expr> <F3> <SID>OpenPopup()
Also, keep in mind that the expression may be evaluated when looking for
Keep in mind that the expression may be evaluated when looking for
typeahead, before the previous command has been executed. For example: >
func StoreColumn()
let g:column = col('.')
@ -285,6 +284,10 @@ This can be solved by inserting <Ignore> before the character that is
expression-mapped: >
nmap ! f!<Ignore>x
When defining a mapping in a |Vim9| script, the expression will be evaluated
in the context of that script. This means that script-local items can be
accessed in the expression.
Be very careful about side effects! The expression is evaluated while
obtaining characters, you may very well make the command dysfunctional.
For this reason the following is blocked:
@ -343,9 +346,24 @@ Example of using <Cmd> halfway Insert mode: >
Unlike <expr> mappings, there are no special restrictions on the <Cmd>
command: it is executed as if an (unrestricted) |autocommand| was invoked.
*<ScriptCmd>*
<ScriptCmd> is like <Cmd> but sets the context to the script the mapping was
defined in, for the duration of the command execution. This is especially
useful for |Vim9| script. It also works to access an import, which is useful
in a plugin using an autoload script: >
vim9script
import autoload 'implementation.vim' as impl
nnoremap <F4> <ScriptCmd>impl.DoTheWork()<CR>
No matter where <F4> is typed, the "impl" import will be found in the script
context of where the mapping was defined. And since it's an autoload import,
the "implementation.vim" script will only be loaded once <F4> is typed, not
when the mapping is defined.
Note:
- Because <Cmd> avoids mode-changes it does not trigger |CmdlineEnter| and
|CmdlineLeave| events, because no user interaction is expected.
- Because <Cmd> and <ScriptCmd> avoid mode-changes it does not trigger
|CmdlineEnter| and |CmdlineLeave| events, because no user interaction is
expected.
- For the same reason, |keycodes| like <C-R><C-W> are interpreted as plain,
unmapped keys.
- The command is not echo'ed, no need for <silent>.
@ -356,13 +374,14 @@ Note:
- In Select mode, |:map| and |:vmap| command mappings are executed in
Visual mode. Use |:smap| to handle Select mode differently.
*E1135* *E1136*
<Cmd> commands must terminate, that is, they must be followed by <CR> in the
{rhs} of the mapping definition. |Command-line| mode is never entered.
*E1255* *E1136*
<Cmd> and <ScriptCmd> commands must terminate, that is, they must be followed
by <CR> in the {rhs} of the mapping definition. |Command-line| mode is never
entered.
*E1137*
<Cmd> commands can have only normal characters and cannot contain special
characters like function keys.
<Cmd> and <ScriptCmd> commands can have only normal characters and cannot
contain special characters like function keys.
1.3 MAPPING AND MODES *:map-modes*
@ -962,8 +981,7 @@ g@{motion} Call the function set by the 'operatorfunc' option.
"line" {motion} was |linewise|
"char" {motion} was |characterwise|
"block" {motion} was |blockwise-visual|
Although "block" would rarely appear, since it can
only result from Visual mode where "g@" is not useful.
The type can be forced, see |forced-motion|.
{not available when compiled without the |+eval|
feature}
@ -974,28 +992,56 @@ Here is an example that counts the number of spaces with <F4>: >
" doubling <F4> works on a line
nnoremap <expr> <F4><F4> CountSpaces() .. '_'
function CountSpaces(type = '') abort
function CountSpaces(context = {}, type = '') abort
if a:type == ''
set opfunc=CountSpaces
let context = #{
\ dot_command: v:false,
\ extend_block: '',
\ virtualedit: [&l:virtualedit, &g:virtualedit],
\ }
let &operatorfunc = function('CountSpaces', [context])
set virtualedit=block
return 'g@'
endif
endif
let sel_save = &selection
let reg_save = getreginfo('"')
let cb_save = &clipboard
let visual_marks_save = [getpos("'<"), getpos("'>")]
let save = #{
\ clipboard: &clipboard,
\ selection: &selection,
\ virtualedit: [&l:virtualedit, &g:virtualedit],
\ register: getreginfo('"'),
\ visual_marks: [getpos("'<"), getpos("'>")],
\ }
try
set clipboard= selection=inclusive
let commands = #{line: "'[V']y", char: "`[v`]y", block: "`[\<c-v>`]y"}
silent exe 'noautocmd keepjumps normal! ' .. get(commands, a:type, '')
echom getreg('"')->count(' ')
set clipboard= selection=inclusive virtualedit=
let commands = #{
\ line: "'[V']",
\ char: "`[v`]",
\ block: "`[\<C-V>`]",
\ }[a:type]
let [_, _, col, off] = getpos("']")
if off != 0
let vcol = getline("'[")->strpart(0, col + off)->strdisplaywidth()
if vcol >= [line("'["), '$']->virtcol() - 1
let a:context.extend_block = '$'
else
let a:context.extend_block = vcol .. '|'
endif
endif
if a:context.extend_block != ''
let commands ..= 'oO' .. a:context.extend_block
endif
let commands ..= 'y'
execute 'silent noautocmd keepjumps normal! ' .. commands
echomsg getreg('"')->count(' ')
finally
call setreg('"', reg_save)
call setpos("'<", visual_marks_save[0])
call setpos("'>", visual_marks_save[1])
let &clipboard = cb_save
let &selection = sel_save
call setreg('"', save.register)
call setpos("'<", save.visual_marks[0])
call setpos("'>", save.visual_marks[1])
let &clipboard = save.clipboard
let &selection = save.selection
let [&l:virtualedit, &g:virtualedit] = get(a:context.dot_command ? save : a:context, 'virtualedit')
let a:context.dot_command = v:true
endtry
endfunction
@ -1365,7 +1411,7 @@ scripts.
*:command-verbose*
When 'verbose' is non-zero, listing a command will also display where it was
last defined. Example: >
last defined and any completion argument. Example: >
:verbose command TOhtml
< Name Args Range Complete Definition ~
@ -1484,6 +1530,8 @@ completion can be enabled:
-complete=custom,{func} custom completion, defined via {func}
-complete=customlist,{func} custom completion, defined via {func}
If you specify completion while there is nothing to complete (-nargs=0, the
default) then you get error *E1208* .
Note: That some completion methods might expand environment variables.

View File

@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 8.2. Last change: 2021 Oct 04
*mbyte.txt* For Vim version 8.2. Last change: 2022 Jan 20
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@ -862,8 +862,8 @@ Use the RPM or port for your system.
window specific to the input method.
USING XIM *multibyte-input* *E284* *E286* *E287* *E288*
*E285* *E289*
USING XIM *multibyte-input* *E284* *E285* *E286* *E287*
*E288* *E289*
Note that Display and Input are independent. It is possible to see your
language even though you have no input method for it. But when your Display
@ -955,32 +955,11 @@ replace mode.
The options 'iminsert', 'imsearch' and 'imcmdline' can be used to choose
the different input methods or disable them temporarily.
WHAT IS IME
IME is a part of East asian version Windows. That helps you to input
multibyte character. English and other language version Windows does not
have any IME. (Also there is no need usually.) But there is one that
called Microsoft Global IME. Global IME is a part of Internet Explorer
4.0 or above. You can get more information about Global IME, at below
URL.
WHAT IS GLOBAL IME *global-ime*
Global IME makes capability to input Chinese, Japanese, and Korean text
into Vim buffer on any language version of Windows 98, Windows 95, and
Windows NT 4.0.
On Windows 2000 and XP it should work as well (without downloading). On
Windows 2000 Professional, Global IME is built in, and the Input Locales
can be added through Control Panel/Regional Options/Input Locales.
Please see below URL for detail of Global IME. You can also find various
language version of Global IME at same place.
- Global IME detailed information.
http://search.microsoft.com/results.aspx?q=global+ime
- Active Input Method Manager (Global IME)
On Windows 9x and Windows NT 4.0 there was *global-ime* , but this is no
longer supported. You can still find documentation for Active Input Method
Manager (Global IME) here:
http://msdn.microsoft.com/en-us/library/aa741221(v=VS.85).aspx
Support for Global IME is an experimental feature.
NOTE: For IME to work you must make sure the input locales of your language
are added to your system. The exact location of this depends on the version
of Windows you use. For example, on my Windows 2000 box:

View File

@ -1,4 +1,4 @@
*message.txt* For Vim version 8.2. Last change: 2021 Jul 31
*message.txt* For Vim version 8.2. Last change: 2022 Jan 26
VIM REFERENCE MANUAL by Bram Moolenaar
@ -29,8 +29,7 @@ depends on the 'shortmess' option.
Clear messages, keeping only the {count} most
recent ones.
The number of remembered messages is fixed at 20 for the tiny version and 200
for other versions.
The number of remembered messages is fixed at 200.
*g<*
The "g<" command can be used to see the last page of previous command output.
@ -47,13 +46,13 @@ maintains the messages or the translations. You can use this to contact the
maintainer when you spot a mistake.
If you want to find help on a specific (error) message, use the ID at the
start of the message. For example, to get help on the message: >
start of the message. For example, to get help on the message:
E72: Close error on swap file
E72: Close error on swap file ~
or (translated): >
or (translated):
E72: Errore durante chiusura swap file
E72: Errore durante chiusura swap file ~
Use: >
@ -63,6 +62,8 @@ If you are lazy, it also works without the shift key: >
:help e72
The number in this ID has no meaning.
==============================================================================
2. Error messages *error-messages* *errors*
@ -77,116 +78,116 @@ See `:messages` above.
LIST OF MESSAGES
*E222* *E228* *E232* *E293* *E298* *E304* *E317*
*E318* *E356* *E438* *E439* *E440* *E316* *E320* *E322*
*E323* *E341* *E473* *E570* *E685* *E292* >
Add to read buffer
makemap: Illegal mode
Cannot create BalloonEval with both message and callback
Hangul automata ERROR
block was not locked
Didn't get block nr {N}?
ml_upd_block0(): Didn't get block 0??
pointer block id wrong {N}
Updated too many blocks?
get_varp ERROR
u_undo: line numbers wrong
undo list corrupt
undo line missing
ml_get: cannot find line {N}
cannot find line {N}
line number out of range: {N} past the end
line count wrong in block {N}
Internal error
Internal error: {function}
fatal error in cs_manage_matches
Invalid count for del_bytes(): {N}
*E323* *E341* *E473* *E570* *E685* *E292*
Add to read buffer ~
makemap: Illegal mode ~
Cannot create BalloonEval with both message and callback ~
block was not locked ~
Didn't get block nr {N}? ~
ml_upd_block0(): Didn't get block 0?? ~
pointer block id wrong {N} ~
Updated too many blocks? ~
get_varp ERROR ~
u_undo: line numbers wrong ~
undo list corrupt ~
undo line missing ~
ml_get: cannot find line {N} in buffer {nr} {name} ~
line number out of range: {N} past the end ~
line count wrong in block {N} ~
Internal error: lalloc(0, ) ~
Internal error: {function} ~
Internal error in regexp ~
fatal error in cs_manage_matches ~
Invalid count for del_bytes(): {N} ~
This is an internal error. If you can reproduce it, please send in a bug
report. |bugs|
>
ATTENTION
Found a swap file by the name ...
ATTENTION ~
Found a swap file by the name ... ~
See |ATTENTION|.
*E92* >
Buffer {N} not found
*E92*
Buffer {N} not found ~
The buffer you requested does not exist. This can also happen when you have
wiped out a buffer which contains a mark or is referenced in another way.
|:bwipeout|
*E95* >
Buffer with this name already exists
*E95*
Buffer with this name already exists ~
You cannot have two buffers with the same name.
You cannot have two buffers with exactly the same name. This includes the
path leading to the file.
*E72* >
Close error on swap file
*E72*
Close error on swap file ~
The |swap-file|, that is used to keep a copy of the edited text, could not be
closed properly. Mostly harmless.
*E169* >
Command too recursive
*E169*
Command too recursive ~
This happens when an Ex command executes an Ex command that executes an Ex
command, etc. The limit is 200 or the value of 'maxfuncdepth', whatever is
larger. When it's more there probably is an endless loop. Probably a
|:execute| or |:source| command is involved.
*E254* >
Cannot allocate color {name}
*E254*
Cannot allocate color {name} ~
The color name {name} is unknown. See |gui-colors| for a list of colors that
are available on most systems.
*E1244* >
Bad color string: {str}
*E1244*
Bad color string: {str} ~
The provided color did not conform to the pattern #rrggbb
*E458* >
Cannot allocate colormap entry, some colors may be incorrect
*E458*
Cannot allocate colormap entry, some colors may be incorrect ~
This means that there are not enough colors available for Vim. It will still
run, but some of the colors will not appear in the specified color. Try
stopping other applications that use many colors, or start them after starting
gvim.
Browsers are known to consume a lot of colors. You can avoid this with
netscape by telling it to use its own colormap: >
netscape -install
Or tell it to limit to a certain number of colors (64 should work well): >
netscape -ncols 64
This can also be done with a line in your Xdefaults file: >
Netscape*installColormap: Yes
or >
Netscape*maxImageColors: 64
<
*E79* >
Cannot expand wildcards
netscape by telling it to use its own colormap:
netscape -install ~
Or tell it to limit to a certain number of colors (64 should work well):
netscape -ncols 64 ~
This can also be done with a line in your Xdefaults file:
Netscape*installColormap: Yes ~
or
Netscape*maxImageColors: 64 ~
*E79*
Cannot expand wildcards ~
A filename contains a strange combination of characters, which causes Vim to
attempt expanding wildcards but this fails. This does NOT mean that no
matching file names could be found, but that the pattern was illegal.
*E459* >
Cannot go back to previous directory
*E459*
Cannot go back to previous directory ~
While expanding a file name, Vim failed to go back to the previously used
directory. All file names being used may be invalid now! You need to have
execute permission on the current directory.
*E190* *E212* >
Cannot open "{filename}" for writing
Can't open file for writing
*E190* *E212*
Cannot open "{filename}" for writing ~
Can't open file for writing ~
For some reason the file you are writing to cannot be created or overwritten.
The reason could be that you do not have permission to write in the directory
or the file name is not valid.
*E166* >
Can't open linked file for writing
*E166*
Can't open linked file for writing ~
You are trying to write to a file which can't be overwritten, and the file is
a link (either a hard link or a symbolic link). Writing might still be
@ -197,20 +198,20 @@ place. If you really want to write the file under this name, you have to
manually delete the link or the file, or change the permissions so that Vim
can overwrite.
*E46* >
Cannot change read-only variable "{name}"
*E46*
Cannot change read-only variable "{name}" ~
You are trying to assign a value to an argument of a function |a:var| or a Vim
internal variable |v:var| which is read-only.
*E90* >
Cannot unload last buffer
*E90*
Cannot unload last buffer ~
Vim always requires one buffer to be loaded, otherwise there would be nothing
to display in the window.
*E40* >
Can't open errorfile <filename>
*E40*
Can't open errorfile <filename> ~
When using the ":make" or ":grep" commands: The file used to save the error
messages or grep output cannot be opened. This can have several causes:
@ -222,8 +223,8 @@ messages or grep output cannot be opened. This can have several causes:
- The 'grepprg' or 'makeprg' could not be executed. This cannot always be
detected (especially on MS-Windows). Check your $PATH.
>
Can't open file C:\TEMP\VIoD243.TMP
Can't open file C:\TEMP\VIoD243.TMP ~
On MS-Windows, this message appears when the output of an external command was
to be read, but the command didn't run successfully. This can be caused by
@ -231,21 +232,21 @@ many things. Check the 'shell', 'shellquote', 'shellxquote', 'shellslash' and
related options. It might also be that the external command was not found,
there is no different error message for that.
*E12* >
Command not allowed from exrc/vimrc in current dir or tag search
*E12*
Command not allowed from exrc/vimrc in current dir or tag search ~
Some commands are not allowed for security reasons. These commands mostly
come from a .exrc or .vimrc file in the current directory, or from a tags
file. Also see 'secure'.
*E74* >
Command too complex
*E74*
Command too complex ~
A mapping resulted in a very long command string. Could be caused by a
mapping that indirectly calls itself.
>
CONVERSION ERROR
CONVERSION ERROR ~
When writing a file and the text "CONVERSION ERROR" appears, this means that
some bits were lost when converting text from the internally used UTF-8 to the
@ -257,51 +258,51 @@ If there is a backup file, when 'writebackup' or 'backup' is set, it will not
be deleted, so you can move it back into place if you want to discard the
changes.
*E302* >
Could not rename swap file
*E302*
Could not rename swap file ~
When the file name changes, Vim tries to rename the |swap-file| as well.
This failed and the old swap file is now still used. Mostly harmless.
*E43* *E44* >
Damaged match string
Corrupted regexp program
*E43* *E44*
Damaged match string ~
Corrupted regexp program ~
Something inside Vim went wrong and resulted in a corrupted regexp. If you
know how to reproduce this problem, please report it. |bugs|
*E208* *E209* *E210* >
Error writing to "{filename}"
Error closing "{filename}"
Error reading "{filename}"
*E208* *E209* *E210*
Error writing to "{filename}" ~
Error closing "{filename}" ~
Error reading "{filename}" ~
This occurs when Vim is trying to rename a file, but a simple change of file
name doesn't work. Then the file will be copied, but somehow this failed.
The result may be that both the original file and the destination file exist
and the destination file may be incomplete.
>
Vim: Error reading input, exiting...
Vim: Error reading input, exiting... ~
This occurs when Vim cannot read typed characters while input is required.
Vim got stuck, the only thing it can do is exit. This can happen when both
stdin and stderr are redirected and executing a script that doesn't exit Vim.
*E47* >
Error while reading errorfile
*E47*
Error while reading errorfile ~
Reading the error file was not possible. This is NOT caused by an error
message that was not recognized.
*E80* >
Error while writing
*E80*
Error while writing ~
Writing a file was not completed successfully. The file is probably
incomplete.
*E13* *E189* >
File exists (add ! to override)
"{filename}" exists (add ! to override)
*E13* *E189*
File exists (add ! to override) ~
"{filename}" exists (add ! to override) ~
You are protected from accidentally overwriting a file. When you want to
write anyway, use the same command, but add a "!" just after the command.
@ -310,8 +311,8 @@ Example: >
changes to: >
:w! /tmp/test
<
*E768* >
Swap file exists: {filename} (:silent! overrides)
*E768*
Swap file exists: {filename} (:silent! overrides) ~
You are protected from overwriting a file that is being edited by Vim. This
happens when you use ":w! filename" and a swapfile is found.
@ -323,115 +324,115 @@ happens when you use ":w! filename" and a swapfile is found.
< The special command is needed, since you already added the ! for overwriting
an existing file.
*E139* >
File is loaded in another buffer
*E139*
File is loaded in another buffer ~
You are trying to write a file under a name which is also used in another
buffer. This would result in two versions of the same file.
*E142* >
File not written: Writing is disabled by 'write' option
*E142*
File not written: Writing is disabled by 'write' option ~
The 'write' option is off. This makes all commands that try to write a file
generate this message. This could be caused by a |-m| commandline argument.
You can switch the 'write' option on with ":set write".
*E25* >
GUI cannot be used: Not enabled at compile time
*E25*
GUI cannot be used: Not enabled at compile time ~
You are running a version of Vim that doesn't include the GUI code. Therefore
"gvim" and ":gui" don't work.
*E49* >
Invalid scroll size
*E49*
Invalid scroll size ~
This is caused by setting an invalid value for the 'scroll', 'scrolljump' or
'scrolloff' options.
*E17* >
"{filename}" is a directory
*E17*
"{filename}" is a directory ~
You tried to write a file with the name of a directory. This is not possible.
You probably need to append a file name.
*E19* >
Mark has invalid line number
*E19*
Mark has invalid line number ~
You are using a mark that has a line number that doesn't exist. This can
happen when you have a mark in another file, and some other program has
deleted lines from it.
*E219* *E220* >
Missing {.
Missing }.
*E219* *E220*
Missing {. ~
Missing }. ~
Using a {} construct in a file name, but there is a { without a matching } or
the other way around. It should be used like this: {foo,bar}. This matches
"foo" and "bar".
*E315* >
ml_get: invalid lnum: {number}
*E315*
ml_get: invalid lnum: {number} ~
This is an internal Vim error. Please try to find out how it can be
reproduced, and submit a bug report |bugreport.vim|.
*E173* >
{number} more files to edit
*E173*
{number} more files to edit ~
You are trying to exit, while the last item in the argument list has not been
edited. This protects you from accidentally exiting when you still have more
files to work on. See |argument-list|. If you do want to exit, just do it
again and it will work.
*E23* *E194* >
No alternate file
No alternate file name to substitute for '#'
*E23* *E194*
No alternate file ~
No alternate file name to substitute for '#' ~
The alternate file is not defined yet. See |alternate-file|.
*E32* >
No file name
*E32*
No file name ~
The current buffer has no name. To write it, use ":w fname". Or give the
buffer a name with ":file fname".
*E141* >
No file name for buffer {number}
*E141*
No file name for buffer {number} ~
One of the buffers that was changed does not have a file name. Therefore it
cannot be written. You need to give the buffer a file name: >
:buffer {number}
:file {filename}
<
*E33* >
No previous substitute regular expression
*E33*
No previous substitute regular expression ~
When using the '~' character in a pattern, it is replaced with the previously
used pattern in a ":substitute" command. This fails when no such command has
been used yet. See |/~|. This also happens when using ":s/pat/%/", where the
"%" stands for the previous substitute string.
*E35* >
No previous regular expression
*E35*
No previous regular expression ~
When using an empty search pattern, the previous search pattern is used. But
that is not possible if there was no previous search.
*E24* >
No such abbreviation
*E24*
No such abbreviation ~
You have used an ":unabbreviate" command with an argument which is not an
existing abbreviation. All variations of this command give the same message:
":cunabbrev", ":iunabbrev", etc. Check for trailing white space.
>
/dev/dsp: No such file or directory
/dev/dsp: No such file or directory ~
Only given for GTK GUI with Gnome support. Gnome tries to use the audio
device and it isn't present. You can ignore this error.
*E31* >
No such mapping
*E31*
No such mapping ~
You have used an ":unmap" command with an argument which is not an existing
mapping. All variations of this command give the same message: ":cunmap",
@ -440,9 +441,9 @@ mapping. All variations of this command give the same message: ":cunmap",
- If the mapping is buffer-local you need to use ":unmap <buffer>".
|:map-<buffer>|
*E37* *E89* >
No write since last change (add ! to override)
No write since last change for buffer {N} (add ! to override)
*E37* *E89*
No write since last change (add ! to override) ~
No write since last change for buffer {N} (add ! to override) ~
You are trying to |abandon| a file that has changes. Vim protects you from
losing your work. You can either write the changed file with ":w", or, if you
@ -452,8 +453,8 @@ adding a '!' character just after the command you used. Example: >
changes to: >
:e! other_file
<
*E162* >
No write since last change for buffer "{name}"
*E162*
No write since last change for buffer "{name}" ~
This appears when you try to exit Vim while some buffers are changed. You
will either have to write the changed buffer (with |:w|), or use a command to
@ -461,23 +462,23 @@ abandon the buffer forcefully, e.g., with ":qa!". Careful, make sure you
don't throw away changes you really want to keep. You might have forgotten
about a buffer, especially when 'hidden' is set.
>
[No write since last change]
[No write since last change] ~
This appears when executing a shell command while at least one buffer was
changed. To avoid the message reset the 'warn' option.
*E38* >
Null argument
*E38*
Null argument ~
Something inside Vim went wrong and resulted in a NULL pointer. If you know
how to reproduce this problem, please report it. |bugs|
*E41* *E82* *E83* *E342* >
Out of memory!
Out of memory! (allocating {number} bytes)
Cannot allocate any buffer, exiting...
Cannot allocate buffer, using other one...
*E41* *E82* *E83* *E342*
Out of memory! ~
Out of memory! (allocating {number} bytes) ~
Cannot allocate any buffer, exiting... ~
Cannot allocate buffer, using other one... ~
Oh, oh. You must have been doing something complicated, or some other program
is consuming your memory. Be careful! Vim is not completely prepared for an
@ -495,16 +496,16 @@ in memory, you can reduce that with these options:
helps for a change that affects all lines.
- 'undoreload' Set to zero to disable.
*E339* >
Pattern too long
*E339*
Pattern too long ~
This happens on systems with 16 bit ints: The compiled regexp pattern is
longer than about 65000 characters. Try using a shorter pattern.
It also happens when the offset of a rule doesn't fit in the space available.
Try simplifying the pattern.
*E45* >
'readonly' option is set (add ! to override)
*E45*
'readonly' option is set (add ! to override) ~
You are trying to write a file that was marked as read-only. To write the
file anyway, either reset the 'readonly' option, or add a '!' character just
@ -513,18 +514,18 @@ after the command you used. Example: >
changes to: >
:w!
<
*E294* *E295* *E301* >
Read error in swap file
Seek error in swap file read
Oops, lost the swap file!!!
*E294* *E295* *E301*
Read error in swap file ~
Seek error in swap file read ~
Oops, lost the swap file!!! ~
Vim tried to read text from the |swap-file|, but something went wrong. The
text in the related buffer may now be corrupted! Check carefully before you
write a buffer. You may want to write it in another file and check for
differences.
*E192* >
Recursive use of :normal too deep
*E192*
Recursive use of :normal too deep ~
You are using a ":normal" command, whose argument again uses a ":normal"
command in a recursive way. This is restricted to 'maxmapdepth' levels. This
@ -532,16 +533,16 @@ example illustrates how to get this message: >
:map gq :normal gq<CR>
If you type "gq", it will execute this mapping, which will call "gq" again.
*E22* >
Scripts nested too deep
*E22*
Scripts nested too deep ~
Scripts can be read with the "-s" command-line argument and with the ":source"
command. The script can then again read another script. This can continue
for about 14 levels. When more nesting is done, Vim assumes that there is a
recursive loop somewhere and stops with this error message.
Scripts can be read with the "-s" command-line argument and with the
`:source!` command. The script can then again read another script. This can
continue for about 14 levels. When more nesting is done, Vim assumes that
there is a recursive loop and stops with this error message.
*E319* >
Sorry, the command is not available in this version
*E319*
Sorry, the command is not available in this version ~
You have used a command that is not present in the version of Vim you are
using. When compiling Vim, many different features can be enabled or
@ -549,8 +550,8 @@ disabled. This depends on how big Vim has chosen to be and the operating
system. See |+feature-list| for when which feature is available. The
|:version| command shows which feature Vim was compiled with.
*E300* >
Swap file already exists (symlink attack?)
*E300*
Swap file already exists (symlink attack?) ~
This message appears when Vim is trying to open a swap file and finds it
already exists or finds a symbolic link in its place. This shouldn't happen,
@ -559,8 +560,8 @@ opened the same file at exactly the same moment (very unlikely) or someone is
attempting a symlink attack (could happen when editing a file in /tmp or when
'directory' starts with "/tmp", which is a bad choice).
*E432* >
Tags file not sorted: {file name}
*E432*
Tags file not sorted: {file name} ~
Vim (and Vi) expect tags files to be sorted in ASCII order. Binary searching
can then be used, which is a lot faster than a linear search. If your tags
@ -569,21 +570,21 @@ This message is only given when Vim detects a problem when searching for a
tag. Sometimes this message is not given, even though the tags file is not
properly sorted.
*E424* >
Too many different highlighting attributes in use
*E424*
Too many different highlighting attributes in use ~
Vim can only handle about 223 different kinds of highlighting. If you run
into this limit, you have used too many |:highlight| commands with different
arguments. A ":highlight link" is not counted.
*E77* >
Too many file names
*E77*
Too many file names ~
When expanding file names, more than one match was found. Only one match is
allowed for the command that was used.
*E303* >
Unable to open swap file for "{filename}", recovery impossible
*E303*
Unable to open swap file for "{filename}", recovery impossible ~
Vim was not able to create a swap file. You can still edit the file, but if
Vim unexpectedly exits the changes will be lost. And Vim may consume a lot of
@ -591,25 +592,25 @@ memory when editing a big file. You may want to change the 'directory' option
to avoid this error. This error is not given when 'directory' is empty. See
|swap-file|.
*E140* >
Use ! to write partial buffer
*E140*
Use ! to write partial buffer ~
When using a range to write part of a buffer, it is unusual to overwrite the
original file. It is probably a mistake (e.g., when Visual mode was active
when using ":w"), therefore Vim requires using a ! after the command, e.g.:
":3,10w!".
>
Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type
VirtualBinding
Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type ~
VirtualBinding ~
Messages like this appear when starting up. This is not a Vim problem, your
X11 configuration is wrong. You can find a hint on how to solve this here:
http://groups.yahoo.com/group/solarisonintel/message/12179.
[this URL is no longer valid]
*W10* >
Warning: Changing a readonly file
*W10*
Warning: Changing a readonly file ~
The file is read-only and you are making a change to it anyway. You can use
the |FileChangedRO| autocommand event to avoid this message (the autocommand
@ -617,15 +618,15 @@ must reset the 'readonly' option). See 'modifiable' to completely disallow
making changes to a file.
This message is only given for the first change after 'readonly' has been set.
*W13* >
Warning: File "{filename}" has been created after editing started
*W13*
Warning: File "{filename}" has been created after editing started ~
You are editing a file in Vim when it didn't exist, but it does exist now.
You will have to decide if you want to keep the version in Vim or the newly
created file. This message is not given when 'buftype' is not empty.
*W11* >
Warning: File "{filename}" has changed since editing started
*W11*
Warning: File "{filename}" has changed since editing started ~
The file which you have started editing has got another timestamp and the
contents changed (more precisely: When reading the file again with the current
@ -648,15 +649,15 @@ starts. It can be fixed in one of these ways:
If you get W11 all the time, you may need to disable "Acronis Active
Protection" or register Vim as a trusted service/application.
*W12* >
Warning: File "{filename}" has changed and the buffer was changed in Vim as well
*W12*
Warning: File "{filename}" has changed and the buffer was changed in Vim as well ~
Like the above, and the buffer for the file was changed in this Vim as well.
You will have to decide if you want to keep the version in this Vim or the one
on disk. This message is not given when 'buftype' is not empty.
*W16* >
Warning: Mode of file "{filename}" has changed since editing started
*W16*
Warning: Mode of file "{filename}" has changed since editing started ~
When the timestamp for a buffer was changed and the contents are still the
same but the mode (permissions) have changed. This usually occurs when
@ -664,37 +665,37 @@ checking out a file from a version control system, which causes the read-only
bit to be reset. It should be safe to reload the file. Set 'autoread' to
automatically reload the file.
*E211* >
File "{filename}" no longer available
*E211*
File "{filename}" no longer available ~
The file which you have started editing has disappeared, or is no longer
accessible. Make sure you write the buffer somewhere to avoid losing
changes. This message is not given when 'buftype' is not empty.
*W14* >
Warning: List of file names overflow
*W14*
Warning: List of file names overflow ~
You must be using an awful lot of buffers. It's now possible that two buffers
have the same number, which causes various problems. You might want to exit
Vim and restart it.
*E931* >
Buffer cannot be registered
*E931*
Buffer cannot be registered ~
Out of memory or a duplicate buffer number. May happen after W14. Looking up
a buffer will not always work, better restart Vim.
*E296* *E297* >
Seek error in swap file write
Write error in swap file
*E296* *E297*
Seek error in swap file write ~
Write error in swap file ~
This mostly happens when the disk is full. Vim could not write text into the
|swap-file|. It's not directly harmful, but when Vim unexpectedly exits some
text may be lost without recovery being possible. Vim might run out of memory
when this problem persists.
*connection-refused* >
Xlib: connection to "<machine-name:0.0" refused by server
*connection-refused*
Xlib: connection to "<machine-name:0.0" refused by server ~
This happens when Vim tries to connect to the X server, but the X server does
not allow a connection. The connection to the X server is needed to be able
@ -702,54 +703,56 @@ to restore the title and for the xterm clipboard support. Unfortunately this
error message cannot be avoided, except by disabling the |+xterm_clipboard|
and |+X11| features.
*E10* >
\\ should be followed by /, ? or &
*E10*
\\ should be followed by /, ? or & ~
A command line started with a backslash or the range of a command contained a
backslash in a wrong place. This is often caused by command-line continuation
being disabled. Remove the 'C' flag from the 'cpoptions' option to enable it.
Or use ":set nocp".
*E471* >
Argument required
*E471*
Argument required ~
This happens when an Ex command with mandatory argument(s) was executed, but
no argument has been specified.
*E474* *E475* *E983* >
Invalid argument
Invalid argument: {arg}
Duplicate argument: {arg}
*E474* *E475* *E983*
Invalid argument ~
Invalid argument: {arg} ~
Duplicate argument: {arg} ~
An Ex command or function has been executed, but an invalid argument has been
specified.
*E488* >
Trailing characters
*E488*
Trailing characters ~
Trailing characters: {text} ~
An argument has been added to an Ex command that does not permit one.
Or the argument has invalid characters and has not been recognized.
*E477* *E478* >
No ! allowed
Don't panic!
*E477* *E478*
No ! allowed ~
Don't panic! ~
You have added a "!" after an Ex command that doesn't permit one.
*E481* >
No range allowed
*E481*
No range allowed ~
A range was specified for an Ex command that doesn't permit one. See
|cmdline-ranges|.
*E482* *E483* >
Can't create file {filename}
Can't get temp file name
*E482* *E483*
Can't create file {filename} ~
Can't get temp file name ~
Vim cannot create a temporary file.
*E484* *E485* >
Can't open file {filename}
Can't read file {filename}
*E484* *E485*
Can't open file {filename} ~
Can't read file {filename} ~
Vim cannot read a temporary file. Especially on Windows, this can be caused
by wrong escaping of special characters for cmd.exe; the approach was
@ -757,8 +760,8 @@ changed with patch 7.3.443. Try using |shellescape()| for all shell arguments
given to |system()|, or explicitly add escaping with ^. Also see
'shellxquote' and 'shellxescape'.
*E464* >
Ambiguous use of user-defined command
*E464*
Ambiguous use of user-defined command ~
There are two user-defined commands with a common name prefix, and you used
Command-line completion to execute one of them. |user-cmd-ambiguous|
@ -767,23 +770,22 @@ Example: >
:command MyCommand2 echo "two"
:MyCommand
<
*E492* >
Not an editor command
*E492*
Not an editor command ~
You tried to execute a command that is neither an Ex command nor
a user-defined command.
*E943* >
Command table needs to be updated, run 'make cmdidxs'
*E943*
Command table needs to be updated, run 'make cmdidxs' ~
This can only happen when changing the source code, when adding a command in
src/ex_cmds.h. The lookup table then needs to be updated, by running: >
make cmdidxs
<
*E928* *E889* *E839* >
E928: String required
E889: Number required
E839: Bool required
*E928* *E889*
E928: String required ~
E889: Number required ~
These happen when a value or expression is used that does not have the
expected type.
@ -796,7 +798,7 @@ This is an (incomplete) overview of various messages that Vim gives:
*hit-enter* *press-enter* *hit-return*
*press-return* *hit-enter-prompt*
Press ENTER or type command to continue
Press ENTER or type command to continue ~
This message is given when there is something on the screen for you to read,
and the screen is about to be redrawn:
@ -840,9 +842,9 @@ Also see 'mouse'. The hit-enter message is highlighted with the |hl-Question|
group.
*more-prompt* *pager* >
-- More --
-- More -- SPACE/d/j: screen/page/line down, b/u/k: up, q: quit
*more-prompt* *pager*
-- More -- ~
-- More -- SPACE/d/j: screen/page/line down, b/u/k: up, q: quit ~
This message is given when the screen is filled with messages. It is only
given when the 'more' option is on. It is highlighted with the |hl-MoreMsg|

View File

@ -1,4 +1,4 @@
*motion.txt* For Vim version 8.2. Last change: 2021 Jun 13
*motion.txt* For Vim version 8.2. Last change: 2021 Dec 27
VIM REFERENCE MANUAL by Bram Moolenaar
@ -386,6 +386,8 @@ w [count] words forward. |exclusive| motion.
<C-Right> or *<C-Right>* *W*
W [count] WORDS forward. |exclusive| motion.
If <C-Right> does not work, check out
|arrow_modifiers|.
*e*
e Forward to the end of word [count] |inclusive|.
@ -400,6 +402,8 @@ b [count] words backward. |exclusive| motion.
<C-Left> or *<C-Left>* *B*
B [count] WORDS backward. |exclusive| motion.
If <C-Left> does not work, check out
|arrow_modifiers|.
*ge*
ge Backward to the end of word [count] |inclusive|.
@ -784,6 +788,9 @@ m< or m> Set the |'<| or |'>| mark. Useful to change what the
*:k*
:[range]k{a-zA-Z'} Same as :mark, but the space before the mark name can
be omitted.
This command is not supported in |Vim9| script,
because it is too easily confused with a variable
name.
*'* *'a* *`* *`a*
'{a-z} `{a-z} Jump to the mark {a-z} in the current buffer.
@ -1034,12 +1041,10 @@ commands that start editing a new file.
*CTRL-O*
CTRL-O Go to [count] Older cursor position in jump list
(not a motion command).
{not available without the |+jumplist| feature}
<Tab> or *CTRL-I* *<Tab>*
CTRL-I Go to [count] newer cursor position in jump list
(not a motion command).
{not available without the |+jumplist| feature}
NOTE: In the GUI and in a terminal supporting
|modifyOtherKeys|, CTRL-I can be mapped separately
@ -1049,18 +1054,15 @@ CTRL-I Go to [count] newer cursor position in jump list
*:ju* *:jumps*
:ju[mps] Print the jump list (not a motion command).
{not available without the |+jumplist| feature}
*:cle* *:clearjumps*
:cle[arjumps] Clear the jump list of the current window.
{not available without the |+jumplist| feature}
*jumplist*
Jumps are remembered in a jump list. With the CTRL-O and CTRL-I command you
can go to cursor positions before older jumps, and back again. Thus you can
move up and down the list. There is a separate jump list for each window.
The maximum number of entries is fixed at 100.
{not available without the |+jumplist| feature}
For example, after three jump commands you have this jump list:
@ -1137,13 +1139,11 @@ g; Go to [count] older position in change list.
positions go to the oldest change.
If there is no older change an error message is given.
(not a motion command)
{not available without the |+jumplist| feature}
*g,* *E663*
g, Go to [count] newer cursor position in change list.
Just like |g;| but in the opposite direction.
(not a motion command)
{not available without the |+jumplist| feature}
When using a count you jump as far back or forward as possible. Thus you can
use "999g;" to go to the first change for which the position is still

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2021 Nov 24
*options.txt* For Vim version 8.2. Last change: 2022 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -35,6 +35,8 @@ achieve special effects. These options come in three forms:
internally and can't be changed. Changing the terminal
codes in the GUI is not useful either...
:se[t]! termcap Idem, but don't use multiple columns.
*E518* *E519*
:se[t] {option}? Show value of {option}.
@ -168,7 +170,7 @@ When a key code is not set, it's like it does not exist. Trying to get its
value will result in an error: >
:set t_kb=
:set t_kb
E846: Key code not set: t_kb
< E846: Key code not set: t_kb ~
The t_xx options cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@ -367,14 +369,15 @@ value to the local value, it doesn't switch back to using the global value
This will make the local value of 'path' empty, so that the global value is
used. Thus it does the same as: >
:setlocal path=
Note: In the future more global options can be made global-local. Using
Note: In the future more global options can be made |global-local|. Using
":setlocal" on a global option might work differently then.
*option-value-function*
Some options ('completefunc', 'imactivatefunc', 'imstatusfunc', 'omnifunc',
'operatorfunc', 'quickfixtextfunc', 'tagfunc' and 'thesaurusfunc') are set to
a function name or a function reference or a lambda function. Examples:
a function name or a function reference or a lambda function. When using a
lambda it will be converted to the name, e.g. "<lambda>123". Examples:
>
set opfunc=MyOpFunc
set opfunc=function('MyOpFunc')
@ -382,13 +385,17 @@ a function name or a function reference or a lambda function. Examples:
set opfunc={a\ ->\ MyOpFunc(a)}
" set using a funcref variable
let Fn = function('MyTagFunc')
let &tagfunc = string(Fn)
let &tagfunc = Fn
" set using a lambda expression
let &tagfunc = "{t -> MyTagFunc(t)}"
let &tagfunc = {t -> MyTagFunc(t)}
" set using a variable with lambda expression
let L = {a, b, c -> MyTagFunc(a, b , c)}
let &tagfunc = string(L)
<
let &tagfunc = L
In Vim9 script, in a compiled function, you can use a lambda, but a
closured does not work, because the function will be called without the
context of where it was defined.
Setting the filetype
@ -793,6 +800,7 @@ A jump table for the options with a short description can be found at |Q_op|.
need proper setting-up, so whenever the shell's pwd changes an OSC 7
escape sequence will be emitted. For example, on Linux, you can source
/etc/profile.d/vte.sh in your shell profile if you use bash or zsh.
When the parsing of the OSC sequence fails you get *E1179* .
*'arabic'* *'arab'* *'noarabic'* *'noarab'*
'arabic' 'arab' boolean (default off)
@ -869,9 +877,12 @@ A jump table for the options with a short description can be found at |Q_op|.
'autowrite' 'aw' boolean (default off)
global
Write the contents of the file, if it has been modified, on each
:next, :rewind, :last, :first, :previous, :stop, :suspend, :tag, :!,
:make, CTRL-] and CTRL-^ command; and when a :buffer, CTRL-O, CTRL-I,
'{A-Z0-9}, or `{A-Z0-9} command takes one to another file.
`:next`, `:rewind`, `:last`, `:first`, `:previous`, `:stop`,
`:suspend`, `:tag`, `:!`, `:make`, CTRL-] and CTRL-^ command; and when
a `:buffer`, CTRL-O, CTRL-I, '{A-Z0-9}, or `{A-Z0-9} command takes one
to another file.
A buffer is not written if it becomes hidden, e.g. when 'bufhidden' is
set to "hide" and `:next` is used.
Note that for some commands the 'autowrite' option is not used, see
'autowriteall' for that.
Some buffers will not be written, specifically when 'buftype' is
@ -1215,6 +1226,13 @@ A jump table for the options with a short description can be found at |Q_op|.
Vim does not try to send a message to an external debugger (Netbeans
or Sun Workshop).
If the expression starts with s: or |<SID>|, then it is replaced with
the script ID (|local-function|). Example: >
set bexpr=s:MyBalloonExpr()
set bexpr=<SID>SomeBalloonExpr()
< Otherwise, the expression is evaluated in the context of the script
where the option was set, thus script-local items are available.
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|.
This option cannot be set in a modeline when 'modelineexpr' is off.
@ -1355,6 +1373,7 @@ A jump table for the options with a short description can be found at |Q_op|.
text should normally be narrower. This prevents
text indented almost to the right window border
occupying lot of vertical space when broken.
(default: 20)
shift:{n} After applying 'breakindent', the wrapped line's
beginning will be shifted by the given number of
characters. It permits dynamic French paragraph
@ -1483,6 +1502,15 @@ A jump table for the options with a short description can be found at |Q_op|.
case mapping, the current locale is not effective.
This probably only matters for Turkish.
*'cdhome'* *'cdh'*
'cdhome' 'cdh' boolean (default: off)
global
When on, |:cd|, |:tcd| and |:lcd| without an argument changes the
current working directory to the |$HOME| directory like in Unix.
When off, those commands just print the current directory name.
On Unix this option has no effect.
NOTE: This option is reset when 'compatible' is set.
*'cdpath'* *'cd'* *E344* *E346*
'cdpath' 'cd' string (default: equivalent to $CDPATH or ",,")
global
@ -1531,8 +1559,8 @@ A jump table for the options with a short description can be found at |Q_op|.
preferred, because it is much faster.
'charconvert' is not used when reading stdin |--|, because there is no
file to convert from. You will have to save the text in a file first.
The expression must return zero or an empty string for success,
non-zero for failure.
The expression must return zero, false or an empty string for success,
non-zero or true for failure.
The possible encoding names encountered are in 'encoding'.
Additionally, names given in 'fileencodings' and 'fileencoding' are
used.
@ -1556,9 +1584,18 @@ A jump table for the options with a short description can be found at |Q_op|.
Note that v:fname_in and v:fname_out will never be the same.
Note that v:charconvert_from and v:charconvert_to may be different
from 'encoding'. Vim internally uses UTF-8 instead of UCS-2 or UCS-4.
Encryption is not done by Vim when using 'charconvert'. If you want
to encrypt the file after conversion, 'charconvert' should take care
of this.
If the 'charconvert' expression starts with s: or |<SID>|, then it is
replaced with the script ID (|local-function|). Example: >
set charconvert=s:MyConvert()
set charconvert=<SID>SomeConvert()
< Otherwise the expression is evaluated in the context of the script
where the option was set, thus script-local items are available.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
@ -1824,6 +1861,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'balloonexpr' + "" text to show in evaluation balloon
'breakindent' + off don't indent when wrapping lines
'cedit' - {unchanged} {set vim default only on resetting 'cp'}
'cdhome' + off ":cd" don't chdir to home on non-Unix
'cindent' + off no C code indentation
'compatible' - {unchanged} {set vim default only on resetting 'cp'}
'copyindent' + off don't copy indent structure
@ -2108,8 +2146,18 @@ A jump table for the options with a short description can be found at |Q_op|.
Commas can be added for readability.
To avoid problems with flags that are added in the future, use the
"+=" and "-=" feature of ":set" |add-option-flags|.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
NOTE: In a |Vim9| script, when `vim9script` is encountered, the value
is saved, 'cpoptions' is set to the Vim default, and the saved value
is restored at the end of the script. Changes to the value of
'cpoptions' will be applied to the saved value, but keep in mind that
removing a flag that is not present when 'cpoptions' is changed has no
effect. In the |.vimrc| file the value is not restored, thus using
`vim9script` in the |.vimrc| file results in using the Vim default.
NOTE: This option is set to the POSIX default value at startup when
the Vi default value would be used and the $VIM_POSIX environment
variable exists |posix|. This means Vim tries to behave like the
@ -2429,7 +2477,7 @@ 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*
*E1193* *E1194* *E1195* *E1196* *E1230*
*E1197* *E1198* *E1199* *E1200* *E1201*
xchacha20 XChaCha20 Cipher with Poly1305 Message Authentication
Code. Medium strong till strong encryption.
@ -3403,7 +3451,9 @@ A jump table for the options with a short description can be found at |Q_op|.
{not available when compiled without the |+folding|
or |+eval| features}
The expression used for when 'foldmethod' is "expr". It is evaluated
for each line to obtain its fold level. See |fold-expr|.
for each line to obtain its fold level. The context is set to the
script where 'foldexpr' was set, script-local items can be accessed.
See |fold-expr| for the usage.
The expression will be evaluated in the |sandbox| if set from a
modeline, see |sandbox-option|.
@ -3537,7 +3587,9 @@ A jump table for the options with a short description can be found at |Q_op|.
{not available when compiled without the |+folding|
feature}
An expression which is used to specify the text displayed for a closed
fold. See |fold-foldtext|.
fold. The context is set to the script where 'foldexpr' was set,
script-local items can be accessed. See |fold-foldtext| for the
usage.
The expression will be evaluated in the |sandbox| if set from a
modeline, see |sandbox-option|.
@ -3576,6 +3628,13 @@ A jump table for the options with a short description can be found at |Q_op|.
When the expression evaluates to non-zero Vim will fall back to using
the internal format mechanism.
If the expression starts with s: or |<SID>|, then it is replaced with
the script ID (|local-function|). Example: >
set formatexpr=s:MyFormatExpr()
set formatexpr=<SID>SomeFormatExpr()
< Otherwise, the expression is evaluated in the context of the script
where the option was set, thus script-local items are available.
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|. That stops the option from working,
since changing the buffer text is not allowed.
@ -4242,7 +4301,9 @@ A jump table for the options with a short description can be found at |Q_op|.
'imactivatefunc' 'imaf' string (default "")
global
This option specifies a function that will be called to
activate or deactivate the Input Method.
activate or deactivate the Input Method. The value can be the name of
a function, a |lambda| or a |Funcref|. See |option-value-function| for
more information.
It is not used in the MS-Windows GUI version.
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|.
@ -4352,6 +4413,8 @@ A jump table for the options with a short description can be found at |Q_op|.
global
This option specifies a function that is called to obtain the status
of Input Method. It must return a positive number when IME is active.
The value can be the name of a function, a |lambda| or a |Funcref|.
See |option-value-function| for more information.
It is not used in the MS-Windows GUI version.
Example: >
@ -4414,6 +4477,13 @@ A jump table for the options with a short description can be found at |Q_op|.
found. Allows doing "gf" on the name after an 'include' statement.
Also used for |<cfile>|.
If the expression starts with s: or |<SID>|, then it is replaced with
the script ID (|local-function|). Example: >
set includeexpr=s:MyIncludeExpr(v:fname)
set includeexpr=<SID>SomeIncludeExpr(v:fname)
< Otherwise, the expression is evaluated in the context of the script
where the option was set, thus script-local items are available.
The expression will be evaluated in the |sandbox| when set from a
modeline, see |sandbox-option|.
This option cannot be set in a modeline when 'modelineexpr' is off.
@ -4487,6 +4557,14 @@ A jump table for the options with a short description can be found at |Q_op|.
The expression is evaluated with |v:lnum| set to the line number for
which the indent is to be computed. The cursor is also in this line
when the expression is evaluated (but it may be moved around).
If the expression starts with s: or |<SID>|, then it is replaced with
the script ID (|local-function|). Example: >
set indentexpr=s:MyIndentExpr()
set indentexpr=<SID>SomeIndentExpr()
< Otherwise, the expression is evaluated in the context of the script
where the option was set, thus script-local items are available.
The expression must return the number of spaces worth of indent. It
can return "-1" to keep the current indent (this means 'autoindent' is
used for the indent).
@ -5577,8 +5655,8 @@ A jump table for the options with a short description can be found at |Q_op|.
number.
When a long, wrapped line doesn't start with the first character, '-'
characters are put before the number.
See |hl-LineNr| and |hl-CursorLineNr| for the highlighting used for
the number.
For highlighting see |hl-LineNr|, and |hl-CursorLineNr|, and the
|:sign-define| "numhl" argument.
*number_relativenumber*
The 'relativenumber' option changes the displayed number to be
relative to the cursor. Together with 'number' there are these
@ -5630,7 +5708,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'opendevice'* *'odev'* *'noopendevice'* *'noodev'*
'opendevice' 'odev' boolean (default off)
global
{only for MS-Windows}
{only for MS-Windows} *E796*
Enable reading and writing from devices. This may get Vim stuck on a
device that can be opened but doesn't actually do the I/O. Therefore
it is off by default.
@ -6630,6 +6708,8 @@ A jump table for the options with a short description can be found at |Q_op|.
Don't include both "curdir" and "sesdir".
When neither "curdir" nor "sesdir" is included, file names are stored
with absolute paths.
If you leave out "options" many things won't work well after restoring
the session.
"slash" and "unix" are useful on Windows when sharing session files
with Unix. The Unix version of Vim cannot source dos format scripts,
but the Windows version of Vim can source unix format scripts.
@ -6644,6 +6724,9 @@ A jump table for the options with a short description can be found at |Q_op|.
See |option-backslash| about including spaces and backslashes.
Environment variables are expanded |:set_env|.
In |restricted-mode| shell commands will not be possible. This mode
is used if the value of $SHELL ends in "false" or "nologin".
If the name of the shell contains a space, you need to enclose it in
quotes and escape the space. Example with quotes: >
:set shell=\"c:\program\ files\unix\sh.exe\"\ -f
@ -7293,6 +7376,12 @@ A jump table for the options with a short description can be found at |Q_op|.
suggestions is never more than the value of 'lines'
minus two.
timeout:{millisec} Limit the time searching for suggestions to
{millisec} milli seconds. Applies to the following
methods. When omitted the limit is 5000. When
negative there is no limit. {only works when built
with the +reltime feature}
file:{filename} Read file {filename}, which must have two columns,
separated by a slash. The first column contains the
bad word, the second column the suggested good word.
@ -7701,10 +7790,11 @@ A jump table for the options with a short description can be found at |Q_op|.
'tabstop' 'ts' number (default 8)
local to buffer
Number of spaces that a <Tab> in the file counts for. Also see
|:retab| command, and 'softtabstop' option.
the |:retab| command, and the 'softtabstop' option.
Note: Setting 'tabstop' to any other value than 8 can make your file
appear wrong in many places (e.g., when printing it).
appear wrong in many places, e.g., when printing it.
The value must be more than 0 and less than 10000.
There are four main ways to use tabs in Vim:
1. Always keep 'tabstop' at 8, set 'softtabstop' and 'shiftwidth' to 4
@ -8072,7 +8162,7 @@ A jump table for the options with a short description can be found at |Q_op|.
another default. Backticks cannot be used in this option for security
reasons.
*'thesaurusfunc'* *tsrfu'*
*'thesaurusfunc'* *'tsrfu'*
'thesaurusfunc' 'tsrfu' string (default: empty)
global or local to buffer |global-local|
{not available when compiled without the |+eval|
@ -9182,4 +9272,16 @@ A jump table for the options with a short description can be found at |Q_op|.
screen. When non-zero, characters are sent to the terminal one by
one. For debugging purposes.
*'xtermcodes'* *'noxtermcodes'*
'xtermcodes' boolean (default on)
global
When detecting xterm patchlevel 141 or higher with the termresponse
mechanism and this option is set, Vim will request the actual terminal
key codes and number of colors from the terminal. This takes care of
various configuration options of the terminal that cannot be obtained
from the termlib/terminfo entry, see |xterm-codes|.
A side effect may be that t_Co changes and Vim will redraw the
display.
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -342,12 +342,12 @@ 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
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)
unicode - UTF-16LE (default output from PowerShell 5.1)
bigendianunicode - UTF-16
utf8 - UTF-8
utf7 - UTF-7 (no BOM)
@ -356,7 +356,7 @@ the following:
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
Note The above 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
@ -365,10 +365,10 @@ want to force the output of PowerShell Core into a different encoding then set
encoding is one of the following:
ascii - 7-bit ASCII character set
bigendianunicode - UTF-16be
bigendianutf32 - UTF-32be
bigendianunicode - UTF-16BE
bigendianutf32 - UTF-32BE
oem - System's current OEM code page
unicode - UTF-16le
unicode - UTF-16LE
utf7 - UTF-7
utf8 - UTF-8
utf8BOM - UTF-8, with BOM

View File

@ -1,4 +1,4 @@
*pattern.txt* For Vim version 8.2. Last change: 2021 Jul 16
*pattern.txt* For Vim version 8.2. Last change: 2022 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -315,7 +315,7 @@ the pattern.
==============================================================================
2. The definition of a pattern *search-pattern* *pattern* *[pattern]*
*regular-expression* *regexp* *Pattern*
*E76* *E383* *E476*
*E383* *E476*
For starters, read chapter 27 of the user manual |usr_27.txt|.
@ -925,13 +925,13 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
becomes invalid. Vim doesn't automatically update the matches.
Similar to moving the cursor for "\%#" |/\%#|.
*/\%l* */\%>l* */\%<l* *E951*
*/\%l* */\%>l* */\%<l* *E951* *E1204*
\%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.
\%.l Matches at the cursor line.
\%<.l Matches above the cursor line.
\%>.l Matches below the cursor line.
These six 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
@ -950,9 +950,9 @@ $ 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.
\%.c Matches at the cursor column.
\%<.c Matches before the cursor column.
\%>.c Matches after the cursor column.
These six 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
@ -976,9 +976,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.
\%.v Matches at the current virtual column.
\%<.v Matches before the current virtual column.
\%>.v Matches after the current virtual column.
These six 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').
@ -1070,6 +1070,8 @@ match ASCII characters, as indicated by the range.
\(\) A pattern enclosed by escaped parentheses. */\(* */\(\)* */\)*
E.g., "\(^a\)" matches 'a' at the start of a line.
There can only be ten of these. You can use "\%(" to add more, but
not counting it as a sub-expression.
*E51* *E54* *E55* *E872* *E873*
\1 Matches the same string that was matched by */\1* *E65*
@ -1092,7 +1094,7 @@ x A single character, with no special meaning, matches itself
\x A backslash followed by a single character, with no special meaning,
is reserved for future expansions
[] (with 'nomagic': \[]) */[]* */\[]* */\_[]* */collection*
[] (with 'nomagic': \[]) */[]* */\[]* */\_[]* */collection* *E76*
\_[]
A collection. This is a sequence of characters enclosed in square
brackets. It matches any single character in the collection.
@ -1488,5 +1490,4 @@ the matching positions and the fuzzy match scores.
The "f" flag of `:vimgrep` enables fuzzy matching.
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -1,4 +1,4 @@
*popup.txt* For Vim version 8.2. Last change: 2021 Aug 15
*popup.txt* For Vim version 8.2. Last change: 2022 Jan 08
VIM REFERENCE MANUAL by Bram Moolenaar
@ -54,7 +54,7 @@ A popup window has a window-ID like other windows, but behaves differently.
The size can be up to the whole Vim window and it overlaps other windows.
Popup windows can also overlap each other. The "zindex" property specifies
what goes on top of what.
*E366*
The popup window contains a buffer, and that buffer is always associated with
the popup window. The window cannot be in Normal, Visual or Insert mode, it
does not get keyboard focus. You can use functions like `setbufline()` to
@ -262,7 +262,7 @@ popup_close({id} [, {result}]) *popup_close()*
popup_create({what}, {options}) *popup_create()*
Open a popup window showing {what}, which is either:
Open a popup window showing {what}, which is either: *E450*
- a buffer number
- a string
- a list of strings

View File

@ -1,4 +1,4 @@
*print.txt* For Vim version 8.2. Last change: 2021 Oct 04
*print.txt* For Vim version 8.2. Last change: 2022 Jan 23
VIM REFERENCE MANUAL by Bram Moolenaar
@ -174,6 +174,13 @@ an error message. In that case Vim will delete the file. In the default
value for non-MS-Windows a trick is used: Adding "v:shell_error" will result
in a non-zero number when the system() call fails.
If the expression starts with s: or |<SID>|, then it is replaced with the
script ID (|local-function|). Example: >
set printexpr=s:MyPrintFile()
set printexpr=<SID>SomePrintFile()
Otherwise, the expression is evaluated in the context of the script where the
option was set, thus script-local items are available.
This option cannot be set from a |modeline| or in the |sandbox|, for security
reasons.

View File

@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 8.2. Last change: 2021 May 22
*quickfix.txt* For Vim version 8.2. Last change: 2022 Jan 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -244,7 +244,7 @@ processing a quickfix or location list command, it will be aborted.
[!] is not used. It works like ":qall!" |:qall|,
except that Vim returns a non-zero exit code.
*:cf* *:cfile*
*:cf* *:cfi* *:cfile*
:cf[ile][!] [errorfile] Read the error file and jump to the first error.
This is done automatically when Vim is started with
the -q option. You can use this command when you
@ -856,9 +856,9 @@ lists. They set one of the existing error lists as the current one.
*:chistory* *:chi*
:[count]chi[story] Show the list of error lists. The current list is
marked with ">". The output looks like:
error list 1 of 3; 43 errors ~
> error list 2 of 3; 0 errors ~
error list 3 of 3; 15 errors ~
error list 1 of 3; 43 errors :make ~
> error list 2 of 3; 0 errors :helpgrep tag ~
error list 3 of 3; 15 errors :grep ex_help *.c ~
When [count] is given, then the count'th quickfix
list is made the current list. Example: >

View File

@ -1,4 +1,4 @@
*quickref.txt* For Vim version 8.2. Last change: 2021 Oct 17
*quickref.txt* For Vim version 8.2. Last change: 2021 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@ -635,6 +635,7 @@ Short explanation of each option: *option-list*
'buflisted' 'bl' whether the buffer shows up in the buffer list
'buftype' 'bt' special type of buffer
'casemap' 'cmp' specifies how case of letters is changed
'cdhome' 'cdh' change directory to the home directory by ":cd"
'cdpath' 'cd' list of directories searched with ":cd"
'cedit' key used to open the command-line window
'charconvert' 'ccv' expression for character encoding conversion
@ -1009,6 +1010,7 @@ Short explanation of each option: *option-list*
'writeany' 'wa' write to file with no need for "!" override
'writebackup' 'wb' make a backup before overwriting a file
'writedelay' 'wd' delay this many msec for each char (for debug)
'xtermcodes' request terminal codes from an xterm
------------------------------------------------------------------------------
*Q_ur* Undo/Redo commands

View File

@ -1,4 +1,4 @@
*remote.txt* For Vim version 8.2. Last change: 2019 May 05
*remote.txt* For Vim version 8.2. Last change: 2021 Dec 27
VIM REFERENCE MANUAL by Bram Moolenaar
@ -143,7 +143,7 @@ You can not put options there!
FUNCTIONS
*E240* *E573*
There are a number of Vim functions for scripting the command server. See
the description in |eval.txt| or use CTRL-] on the function name to jump to
the description in |builtin.txt| or use CTRL-] on the function name to jump to
the full explanation.
synopsis explanation ~

View File

@ -1,4 +1,4 @@
*repeat.txt* For Vim version 8.2. Last change: 2021 Nov 24
*repeat.txt* For Vim version 8.2. Last change: 2022 Jan 21
VIM REFERENCE MANUAL by Bram Moolenaar
@ -354,7 +354,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
<
:scriptv[ersion] {version} *:scriptv* *:scriptversion*
*E999* *E984*
*E999* *E984* *E1040*
Specify the version of Vim for the lines that follow
in the same file. Only applies at the toplevel of
sourced scripts, not inside functions.
@ -367,8 +367,8 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
:vim9s[cript] [noclear] *:vim9s* *:vim9script*
Marks a script file as containing |Vim9-script|
commands. Also see |vim9-namespace|.
Must be the first command in the file.
commands. Also see |vim9-namespace|. *E1038*
Must be the first command in the file. *E1039*
For [noclear] see |vim9-reload|.
Without the |+eval| feature this changes the syntax
for some commands.
@ -377,8 +377,11 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
*:scr* *:scriptnames*
:scr[iptnames] List all sourced script names, in the order they were
first sourced. The number is used for the script ID
|<SID>|.
first encountered. The number is used for the script
ID |<SID>|.
For a script that was used with `import autoload` but
was not actually sourced yet an "A" is shown after the
script ID.
{not available when compiled without the |+eval|
feature}
@ -495,6 +498,9 @@ space at the end of a line is hard to see and may be accidentally deleted. >
\ "very long regexp"
\ keepend
In |Vim9| script the backslash can often be omitted, but not always.
See |vim9-line-continuation|.
There is a problem with the ":append" and ":insert" commands: >
:1append
\asdf

View File

@ -1,4 +1,4 @@
*sign.txt* For Vim version 8.2. Last change: 2021 Mar 07
*sign.txt* For Vim version 8.2. Last change: 2021 Dec 05
VIM REFERENCE MANUAL by Gordon Prieur
@ -140,6 +140,11 @@ See |sign_define()| for the equivalent Vim script function.
Highlighting group used for the whole line the sign is placed
in. Most useful is defining a background color.
numhl={group}
Highlighting group used for the line number on the line where
the sign is placed. Overrides |hl-LineNr|, |hl-LineNrAbove|,
|hl-LineNrBelow|, and |hl-CursorLineNr|.
text={text} *E239*
Define the text that is displayed when there is no icon or the
GUI is not being used. Only printable characters are allowed
@ -396,6 +401,8 @@ sign_define({list})
icon full path to the bitmap file for the sign.
linehl highlight group used for the whole line the
sign is placed in.
numhl highlight group used for the line number where
the sign is placed.
text text that is displayed when there is no icon
or the GUI is not being used.
texthl highlight group used for the text item
@ -441,14 +448,18 @@ sign_getdefined([{name}]) *sign_getdefined()*
following entries:
icon full path to the bitmap file of the sign
linehl highlight group used for the whole line the
sign is placed in.
sign is placed in; not present if not set
name name of the sign
numhl highlight group used for the line number where
the sign is placed; not present if not set
text text that is displayed when there is no icon
or the GUI is not being used.
texthl highlight group used for the text item
texthl highlight group used for the text item; not
present if not set
culhl highlight group used for the text item when
the cursor is on the same line as the sign and
'cursorline' is enabled.
'cursorline' is enabled; not present if not
set
Returns an empty List if there are no signs and when {name} is
not found.

View File

@ -1,4 +1,4 @@
*starting.txt* For Vim version 8.2. Last change: 2021 May 08
*starting.txt* For Vim version 8.2. Last change: 2022 Feb 01
VIM REFERENCE MANUAL by Bram Moolenaar
@ -256,6 +256,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
Interfaces, such as Python, Ruby and Lua, are also disabled,
since they could be used to execute shell commands. Perl uses
the Safe module.
For Unix restricted mode is used when the last part of $SHELL
is "nologin" or "false".
Note that the user may still find a loophole to execute a
shell command, it has only been made difficult.
@ -268,8 +270,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
started if possible.
*-e*
-e Start Vim in Ex mode |Q|. Only makes a difference when the
executable is not called "ex".
-e Start Vim in Ex mode, see |Ex-mode|. Only makes a difference
when the executable is not called "ex".
*-E*
-E Start Vim in improved Ex mode |gQ|. Only makes a difference
@ -560,6 +562,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
":source!". When the "scriptout" file already exists, new
characters are appended. See also |complex-repeat|.
{scriptout} cannot start with a digit.
If you want to record what is typed in a human readable for
you can use |ch_logfile()|, It adds "raw key input" lines.
*-W*
-W {scriptout} Like -w, but do not append, overwrite an existing file.

View File

@ -1,4 +1,4 @@
*syntax.txt* For Vim version 8.2. Last change: 2021 Nov 20
*syntax.txt* For Vim version 8.2. Last change: 2022 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -215,7 +215,8 @@ A syntax group name doesn't specify any color or attributes itself.
The name for a highlight or syntax group must consist of ASCII letters, digits
and the underscore. As a regexp: "[a-zA-Z0-9_]*". However, Vim does not give
an error when using other characters.
an error when using other characters. The maxium length of a group name is
about 200 bytes. *E1249*
To be able to allow each user to pick their favorite set of colors, there must
be preferred names for highlight groups that are common for many languages.
@ -956,12 +957,16 @@ the options 'foldminlines' and 'foldnestmax' in |.vimrc| or use |:setlocal| in
BASIC *basic.vim* *vb.vim* *ft-basic-syntax* *ft-vb-syntax*
Both Visual Basic and "normal" basic use the extension ".bas". To detect
Both Visual Basic and "normal" BASIC use the extension ".bas". To detect
which one should be used, Vim checks for the string "VB_Name" in the first
five lines of the file. If it is not found, filetype will be "basic",
otherwise "vb". Files with the ".frm" extension will always be seen as Visual
Basic.
If the automatic detection doesn't work for you or you only edit, for
example, FreeBASIC files, use this in your startup vimrc: >
:let filetype_bas = "freebasic"
C *c.vim* *ft-c-syntax*
@ -1442,7 +1447,7 @@ add the following line to your startup file: >
:let g:filetype_euphoria = "euphoria4"
Elixir and Euphoria share the *.ex file extension. If the filetype is
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
@ -1473,7 +1478,7 @@ 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
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
@ -1532,6 +1537,14 @@ The enhanced mode also takes advantage of additional color features for a dark
gvim display. Here, statements are colored LightYellow instead of Yellow, and
conditionals are LightBlue for better distinction.
Both Visual Basic and FORM use the extension ".frm". To detect which one
should be used, Vim checks for the string "VB_Name" in the first five lines of
the file. If it is found, filetype will be "vb", otherwise "form".
If the automatic detection doesn't work for you or you only edit, for
example, FORM files, use this in your startup vimrc: >
:let filetype_frm = "form"
FORTH *forth.vim* *ft-forth-syntax*
@ -3196,6 +3209,14 @@ buffer by buffer basis.
For more detailed instructions see |ft_sql.txt|.
SQUIRREL *squirrel.vim* *ft-squirrel-syntax*
Squirrel is a high level imperative, object-oriented programming language,
designed to be a light-weight scripting language that fits in the size, memory
bandwidth, and real-time requirements of applications like video games. Files
with the following extensions are recognized as squirrel files: .nut.
TCSH *tcsh.vim* *ft-tcsh-syntax*
This covers the shell named "tcsh". It is a superset of csh. See |csh.vim|
@ -4498,7 +4519,7 @@ it marks the "\(\I\i*\)" sub-expression as external; in the end pattern, it
changes the \z1 back-reference into an external reference referring to the
first external sub-expression in the start pattern. External references can
also be used in skip patterns: >
:syn region foo start="start \(\I\i*\)" skip="not end \z1" end="end \z1"
:syn region foo start="start \z(\I\i*\)" skip="not end \z1" end="end \z1"
Note that normal and external sub-expressions are completely orthogonal and
indexed separately; for instance, if the pattern "\z(..\)\(..\)" is applied

View File

@ -1,4 +1,4 @@
*tabpage.txt* For Vim version 8.2. Last change: 2020 Oct 14
*tabpage.txt* For Vim version 8.2. Last change: 2022 Feb 02
VIM REFERENCE MANUAL by Bram Moolenaar
@ -143,7 +143,9 @@ something else.
:tabclose 3 " close the third tab page
:tabclose $ " close the last tab page
:tabclose # " close the last accessed tab page
<
When a tab is closed the next tab page will become the current one.
*:tabo* *:tabonly*
:tabo[nly][!] Close all other tab pages.
When the 'hidden' option is set, all buffers in closed windows

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
*term.txt* For Vim version 8.2. Last change: 2021 Aug 29
*term.txt* For Vim version 8.2. Last change: 2021 Dec 21
VIM REFERENCE MANUAL by Bram Moolenaar
@ -150,8 +150,10 @@ terminal that tmux is running in): >
" Enable focus event tracking, see :help xterm-focus-event
let &t_fe = "\<Esc>[?1004h"
let &t_fd = "\<Esc>[?1004l"
execute "set <FocusGained>=\<Esc>[I"
execute "set <FocusLost>=\<Esc>[O"
" Enable modified arrow keys, see :help xterm-modifier-keys
" Enable modified arrow keys, see :help arrow_modifiers
execute "silent! set <xUp>=\<Esc>[@;*A"
execute "silent! set <xDown>=\<Esc>[@;*B"
execute "silent! set <xRight>=\<Esc>[@;*C"
@ -252,7 +254,19 @@ another code. That is to avoid that the codes obtained from xterm directly
Another special value is a termcap entry ending in "@;*X". This is for cursor
keys, which either use "CSI X" or "CSI 1 ; modifier X". Thus the "@"
stands for either "1" if a modifier follows, or nothing.
*xterm-scroll-region*
*arrow_modifiers*
Several terminal emulators (alacritty, gnome, konsole, etc.) send special
codes for keys with modifiers, but these do not have an entry in the
termcap/terminfo database. You can make them work by adding a few lines in
your vimrc. For example, to make the Control modifier work with arrow keys
for the gnome terminal: >
if &term =~ 'gnome'
execute "set <xUp>=\<Esc>[@;*A"
execute "set <xDown>=\<Esc>[@;*B"
execute "set <xRight>=\<Esc>[@;*C"
execute "set <xLeft>=\<Esc>[@;*D"
endif
< *xterm-scroll-region*
The default termcap entry for xterm on Sun and other platforms does not
contain the entry for scroll regions. Add ":cs=\E[%i%d;%dr:" to the xterm
entry in /etc/termcap and everything should work.
@ -542,8 +556,15 @@ request the key codes directly from the xterm. The responses are used to
adjust the various t_ codes. This avoids the problem that the xterm can
produce different codes, depending on the mode it is in (8-bit, VT102,
VT220, etc.). The result is that codes like <xF1> are no longer needed.
Note: This is only done on startup. If the xterm options are changed after
Vim has started, the escape sequences may not be recognized anymore.
One of the codes that can change is 't_Co', the number of colors. This will
trigger a redraw. If this is a problem, reset the 'xtermcodes' option as
early as possible: >
set noxtermcodes
Note: Requesting the key codes is only done on startup. If the xterm options
are changed after Vim has started, the escape sequences may not be recognized
anymore.
*xterm-true-color*
Vim supports using true colors in the terminal (taken from |highlight-guifg|
@ -594,6 +615,8 @@ If your terminal does support this but Vim does not recognize the terminal,
you may have to set the options yourself: >
let &t_fe = "\<Esc>[?1004h"
let &t_fd = "\<Esc>[?1004l"
execute "set <FocusGained>=\<Esc>[I"
execute "set <FocusLost>=\<Esc>[O"
If this causes garbage to show when Vim starts up then it doesn't work.
*termcap-colors*

View File

@ -1,4 +1,4 @@
*terminal.txt* For Vim version 8.2. Last change: 2021 Nov 13
*terminal.txt* For Vim version 8.2. Last change: 2022 Jan 21
VIM REFERENCE MANUAL by Bram Moolenaar
@ -39,6 +39,7 @@ If the result is "1" you have it.
Stepping through code |termdebug-stepping|
Inspecting variables |termdebug-variables|
Other commands |termdebug-commands|
Events |termdebug-events|
Prompt mode |termdebug-prompt|
Communication |termdebug-communication|
Customizing |termdebug-customizing|
@ -1177,7 +1178,7 @@ gdb window A terminal window in which "gdb vim" is executed. Here you
program window A terminal window for the executed program. When "run" is
used in gdb the program I/O will happen in this window, so
that it does not interfere with controlling gdb. The buffer
name is "gdb program".
name is "debugged program".
The current window is used to show the source code. When gdb pauses the
source file location will be displayed, if possible. A sign is used to
@ -1428,6 +1429,8 @@ GDB command *termdebug-customizing*
To change the name of the gdb command, set the "g:termdebugger" variable before
invoking `:Termdebug`: >
let g:termdebugger = "mygdb"
If the command needs an argument use a List: >
let g:termdebugger = ['rr', 'replay', '--']
< *gdb-version*
Only debuggers fully compatible with gdb will work. Vim uses the GDB/MI
interface. The "new-ui" command requires gdb version 7.12 or later. if you

View File

@ -1,4 +1,4 @@
*testing.txt* For Vim version 8.2. Last change: 2021 Aug 15
*testing.txt* For Vim version 8.2. Last change: 2022 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -65,7 +65,9 @@ test_garbagecollect_now() *test_garbagecollect_now()*
Like garbagecollect(), but executed right away. This must
only be called directly to avoid any structure to exist
internally, and |v:testing| must have been set before calling
any function.
any function. *E1142*
This will not work when called from a :def function, because
variables on the stack will be freed.
test_garbagecollect_soon() *test_garbagecollect_soon()*
@ -81,46 +83,113 @@ 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
|drop_file| feature is present.
*test_gui_event()*
test_gui_event({event}, {args})
Generate a GUI {event} with arguments {args} for testing Vim
functionality. This function works only when the GUI is
running.
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.
{event} is a String and the supported values are:
"dropfiles" drop one or more files in a window.
"findrepl" search and replace text
"mouse" mouse button click event.
"scrollbar" move or drag the scrollbar
"tabline" select a tab page by mouse click.
"tabmenu" select a tabline menu entry.
*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
{args} is a Dict and contains the arguments for the event.
"dropfiles":
Drop one or more files in a specified window. The supported
items in {args} are:
files: List of file names
row: window row number
col: window column number
modifiers: key modifiers. The supported values are:
0x4 Shift
0x8 Alt
0x10 Ctrl
The files are added to the |argument-list| and the first
file in {files} is edited in the window. See |drag-n-drop|
for more information. This event works only when the
|drop_file| feature is present.
"findrepl":
{only available when the GUI has a find/replace dialog}
Perform a search and replace of text. The supported items
in {args} are:
find_text: string to find.
repl_text: replacement string
flags: flags controlling the find/replace. Supported
values are:
1 search next string (find dialog)
2 search next string (replace dialog)
3 replace string once
4 replace all matches
8 match whole words only
16 match case
forward: set to 1 for forward search.
"mouse":
Inject a mouse button click event. The supported items in
{args} are:
button: mouse button. The supported values 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: mouse click row number. The first row of the
Vim window is 1 and the last row is 'lines'.
col: mouse click column number. The maximum value
of {col} is 'columns'.
multiclick: set to 1 to inject a multiclick mouse event.
modifiers: key modifiers. The supported values are:
4 shift is pressed
8 alt is pressed
16 ctrl is pressed
"scrollbar":
Set or drag the left, right or horizontal scrollbar. Only
works when the scrollbar actually exists. The supported
items in {args} are:
which: scrollbar. The supported values are:
left Left scrollbar of the current window
right Right scrollbar of the current window
hor Horizontal scrollbar
value: amount to scroll. For the vertical scrollbars
the value can be 1 to the line-count of the
buffer. For the horizontal scrollbar the
value can be between 1 and the maximum line
length, assuming 'wrap' is not set.
dragging: 1 to drag the scrollbar and 0 to click in the
scrollbar.
"tabline":
Inject a mouse click event on the tabline to select a
tabpage. The supported items in {args} are:
tabnr: tab page number
"tabmenu":
Inject an event to select a tabline menu entry. The
supported items in {args} are:
tabnr: tab page number
item: tab page menu item number. 1 for the first
menu item, 2 for the second item and so on.
After injecting the GUI events you probably should call
|feedkeys()| to have them processed, e.g.: >
call feedkeys("y", 'Lx!')
<
Returns TRUE if the event is successfully added, FALSE if
there is a failure.
Can also be used as a |method|: >
GetEvent()->test_gui_event({args})
<
test_ignore_error({expr}) *test_ignore_error()*
Ignore any error containing {expr}. A normal message is given
instead.
@ -187,24 +256,28 @@ test_override({name}, {val}) *test_override()*
to run tests. Only to be used for testing Vim!
The override is enabled when {val} is non-zero and removed
when {val} is zero.
Current supported values for name are:
Current supported values for {name} are:
name effect when {val} is non-zero ~
redraw disable the redrawing() function
redraw_flag ignore the RedrawingDisabled flag
{name} effect when {val} is non-zero ~
autoload `import autoload` will load the script right
away, not postponed until an item is used
char_avail disable the char_avail() function
starting reset the "starting" variable, see below
nfa_fail makes the NFA regexp engine fail to force a
fallback to the old engine
no_query_mouse do not query the mouse position for "dec"
terminals
no_wait_return set the "no_wait_return" flag. Not restored
with "ALL".
ui_delay time in msec to use in ui_delay(); overrules a
wait time of up to 3 seconds for messages
redraw disable the redrawing() function
redraw_flag ignore the RedrawingDisabled flag
starting reset the "starting" variable, see below
term_props reset all terminal properties when the version
string is detected
ui_delay time in msec to use in ui_delay(); overrules a
wait time of up to 3 seconds for messages
uptime overrules sysinfo.uptime
vterm_title setting the window title by a job running in a
terminal window
ALL clear all overrides ({val} is not used)
"starting" is to be used when a test should behave like
@ -230,27 +303,6 @@ test_refcount({expr}) *test_refcount()*
GetVarname()->test_refcount()
test_scrollbar({which}, {value}, {dragging}) *test_scrollbar()*
Pretend using scrollbar {which} to move it to position
{value}. {which} can be:
left Left scrollbar of the current window
right Right scrollbar of the current window
hor Horizontal scrollbar
For the vertical scrollbars {value} can be 1 to the
line-count of the buffer. For the horizontal scrollbar the
{value} can be between 1 and the maximum line length, assuming
'wrap' is not set.
When {dragging} is non-zero it's like dragging the scrollbar,
otherwise it's like clicking in the scrollbar.
Only works when the {which} scrollbar actually exists,
obviously only when using the GUI.
Can also be used as a |method|: >
GetValue()->test_scrollbar('right', 0)
test_setmouse({row}, {col}) *test_setmouse()*
Set the mouse position to be used for the next mouse action.
{row} and {col} are one based.
@ -347,7 +399,7 @@ assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
Run {cmd} and add an error message to |v:errors| if it does
NOT produce an error or when {error} is not found in the
error message. Also see |assert-return|.
*E856*
When {error} is a string it must be found literally in the
first reported error. Most often this will be the error code,
including the colon, e.g. "E123:". >
@ -367,12 +419,12 @@ assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
<
If {msg} is empty then it is not used. Do this to get the
default message when passing the {lnum} argument.
*E1115*
When {lnum} is present and not negative, and the {error}
argument is present and matches, then this is compared with
the line number at which the error was reported. That can be
the line number in a function or in a script.
*E1116*
When {context} is present it is used as a pattern and matched
against the context (script name or function name) where
{lnum} is located in.

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2021 Nov 26
*todo.txt* For Vim version 8.2. Last change: 2022 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -38,41 +38,16 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
refactor ex_let_one() to subfunctions.
Vim9 - Make everything work:
- "filter #pat# ls" should work, #pat# is not a comment
vim9script
edit foobar
filter #foobar# ls
- Check TODO items in vim9compile.c and vim9execute.c
- use CheckLegacyAndVim9Success(lines) in many more places
- 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)
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.
- Unexpected error message when using "var x: any | x.key = 9", because "x" is
given the type number. Can we use VAR_ANY?
- Check performance with callgrind and kcachegrind.
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.
- Check code coverage, add more tests if needed.
- Use Vim9 for runtime files.
PR #7497 for autoload/ccomplete.vim
Further Vim9 improvements, possibly after launch:
- better implementation for partial and tests for that.
- Check performance with callgrind and kcachegrind.
- Better implementation for partial and tests for that.
- when using "const" mark the variable type as const with TTFLAG_CONST, so
that an error is given at compile time when trying to change it. E.g. for a
const list and trying to call add().
- Compile options that are an expression, e.g. "expr:" in 'spellsuggest',
'foldexpr', 'foldtext', 'printexpr', 'diffexpr', 'patchexpr', 'charconvert',
'balloonexpr', 'includeexpr', 'indentexpr', 'formatexpr'.
@ -81,10 +56,11 @@ Further Vim9 improvements, possibly after launch:
evaluation.
Use the location where the option was set for deciding whether it's to be
evaluated in Vim9 script context.
- Handle command that is only a range more efficient than calling ISN_EXEC
- implement :type, "import type"
- implement enum, "import enum".
- implement class and interface: See |vim9-classes|
- Implement "import lazy" - like autoload but with a relative or absolute
path. #9595
- implement :type
- implement :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.
- Inline call to map() and filter(), better type checking.
@ -95,6 +71,10 @@ Further Vim9 improvements, possibly after launch:
has(featureName), len(someString)
- Implement as part of an expression: ++expr, --expr, expr++, expr--.
Update list of features to vote on:
- multiple cursors
- built-in LSP support
- start first line halfway
Popup windows:
- Preview popup not properly updated when it overlaps with completion menu.
@ -137,8 +117,6 @@ Text properties:
where property fits in.
Or Should we let the textprop highlight overrule other (e.g. diff) highlight
if the priority is above a certain value? (#7392)
- Popup attached to text property stays visible when text is no longer
visible. (#7736)
- Popup attached to text property stays visible when text is deleted with
"cc". (#7737) "C" works OK. "dd" also files in a buffer with a single
line.
@ -200,8 +178,6 @@ Terminal emulator window:
- GUI: When using ":set go+=!" a system() call causes the hit-enter prompt.
(#3327)
- Allow for specifying the directory, with ++cwd={dir}.
- With a vertical split only one window is updated. (Linwei, 2018 Jun 2,
#2977)
- When pasting should call vterm_keyboard_start_paste(), e.g. when using
K_MIDDLEMOUSE, calling insert_reg().
- Users expect parsing the :term argument like a shell does, also support
@ -223,6 +199,11 @@ Terminal emulator window:
When using 'cryptmethod' xchaha20 the undo file is not encrypted.
Need to handle extra bytes.
In Select mode the deleted text always goes into the unnamed register.
Use CTRL-R to specify the register to use. (#9531)
Some prompts are not translated: #9495
Test_communicate_ipv6(): is flaky on many systems
Fails in line 64 of Ch_communicate, no exception is thrown.
@ -251,6 +232,8 @@ Memory leak in test_alot with pyeval() (allocating partial)
Memory leak in test_alot with expand()
Memory leaks in test_channel? (or is it because of fork())
PR to support %e and %k in 'errorformat'. #9624
Idea: when typing ":e /some/dir/" and "dir" does not exist, highlight in red.
":set &shellpipe" and ":set &shellredir" should use the logic from
@ -259,10 +242,16 @@ this.
MS-Windows: did path modifier :p:8 stop working? #8600
Add support for "underdouble", "underdot" and "underdash". #9553
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)
Information for a specific terminal (e.g. gnome, tmux, konsole, alacritty) is
spread out. Make a section with copy/paste examples of script and pointers to
more information.
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.
@ -273,6 +262,8 @@ Was originally written by Felipe Morales.
Request to use "." for the cursor column in search pattern \%<.c and \%<.v.
(#8179)
":filter set termcap" only filters terminal codes, not keys. (#9297)
Remove SPACE_IN_FILENAME ? It is only used for completion.
When 'term' starts with "foot" then default t_TI and t_TE to the values used
@ -417,8 +408,6 @@ Motif: Build on Ubuntu can't enter any text in dialog text fields.
Running test_gui and test_gui_init with Motif sometimes kills the window
manager. Problem with Motif?
Patch to add :argdedupe. (Nir Lichtman, #6235)
When editing a file with ":edit" the output of :swapname is relative, while
editing it with "vim file" it is absolute. (#355)
Which one should it be?
@ -848,9 +837,7 @@ window for the buffer.
Win32 key codes are messy. Mike Williams tried to fix that, but now old
mappings no longer work. Create a new terminal for the better solution?
Compiler warnings (geeknik, 2017 Oct 26):
- signed integer overflow in do_sub() (#2249)
- signed integer overflow in get_address() (#2248)
Compiler warning (geeknik, 2017 Oct 26):
- undefined left shift in get_string_tv() (#2250)
Add Native language protocol server (LSP) support. (Yegappan Lakshmanan, 2018
@ -918,9 +905,6 @@ With 'foldmethod' "indent" and appending an empty line, what follows isn't
included in the existing fold. Deleting the empty line and undo fixes it.
(Oleg Koshovetc, 2018 Jul 15, #3214)
Patch to support "xxd -ps". (Erik Auerswald, 2018 May 1)
Lacks a test.
Column number is wrong when using 'linebreak' and 'wrap'. (Keith Smiley, 2018
Jan 15, #2555)
@ -1470,10 +1454,6 @@ When the CursorMovedI event triggers, and CTRL-X was typed, a script cannot
restore the mode properly. (Andrew Stewart, 2016 Apr 20)
Do not trigger the event?
Patch to fix display of listchars on the cursorline. (Nayuri Aohime, 2013)
Update suggested by Yasuhiro Matsumoto, 2014 Nov 25:
https://gist.github.com/presuku/d3d6b230b9b6dcfc0477
Patch to make the behavior of "w" more straightforward, but not Vi compatible.
With a 'cpo' flag. (Christian Brabandt, 2016 Feb 8)
@ -3901,7 +3881,7 @@ User Friendlier:
$HOME/_vimrc, etc.) and add "edit vimrc" to the File menu.
- Add a way to save local settings and mappings into a new plugin file.
":mkplugin <file>"?
- Add mappings local to a window: ":map <window> ..."?
- Add mappings local to a window: ":map <window> ..." #9339
9 Add buffer-local menu. Should offer a choice between removing the menu or
disabling it. Be careful that tear-offs don't disappear (keep one empty
item?).

View File

@ -1,4 +1,4 @@
*uganda.txt* For Vim version 8.2. Last change: 2020 Jan 08
*uganda.txt* For Vim version 8.2. Last change: 2022 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
@ -11,9 +11,9 @@ Vim is Charityware. You can use and copy it as much as you like, but you are
encouraged to make a donation for needy children in Uganda. Please see |kcc|
below or visit the ICCF web site, available at these URLs:
http://iccf-holland.org/
http://www.vim.org/iccf/
http://www.iccf.nl/
https://iccf-holland.org/
https://www.vim.org/iccf/
https://www.iccf.nl/
You can also sponsor the development of Vim. Vim sponsors can vote for
features. See |sponsor|. The money goes to Uganda anyway.
@ -169,10 +169,11 @@ households are stimulated to build a proper latrine. I helped setting up a
production site for cement slabs. These are used to build a good latrine.
They are sold below cost price.
There is a small clinic at the project, which provides children and their
family with medical help. When needed, transport to a hospital is offered.
Immunization programs are carried out and help is provided when an epidemic is
breaking out (measles and cholera have been a problem).
There is a clinic at the project, which provides children and their family
medical help. Since 2020 a maternity ward was added and 24/7 service is
available. When needed, transport to a hospital is offered. Immunization
programs are carried out and help is provided when an epidemic is breaking out
(measles and cholera have been a problem).
*donate*
Summer 1994 to summer 1995 I spent a whole year at the centre, working as a
volunteer. I have helped to expand the centre and worked in the area of water
@ -214,44 +215,29 @@ Check the ICCF web site for the latest information! See |iccf| for the URL.
USA: The methods mentioned below can be used.
Sending a check to the Nehemiah Group Outreach Society (NGOS)
is no longer possible, unfortunately. We are looking for
another way to get you an IRS tax receipt.
For sponsoring a child contact KCF in Canada (see below). US
checks can be sent to them to lower banking costs.
If you must send a check send it to our Canadian partner:
https://www.kuwasha.net/
Canada: Contact Kibaale Children's Fund (KCF) in Surrey, Canada. They
take care of the Canadian sponsors for the children in
Kibaale. KCF forwards 100% of the money to the project in
Uganda. You can send them a one time donation directly.
Canada: Contact Kuwasha in Surrey, Canada. They take care of the
Canadian sponsors for the children in Kibaale. Kuwasha
forwards 100% of the money to the project in Uganda. You can
send them a one time donation directly.
Please send me a note so that I know what has been donated
because of Vim. Ask KCF for information about sponsorship.
Kibaale Children's Fund c/o Pacific Academy
10238-168 Street
Surrey, B.C. V4N 1Z4
Canada
Phone: 604-581-5353
If you make a donation to Kibaale Children's Fund (KCF) you
will receive a tax receipt which can be submitted with your
tax return.
because of Vim. Look on their for information about
sponsorship: https://www.kuwasha.net/
If you make a donation to Kuwasha you will receive a tax
receipt which can be submitted with your tax return.
Holland: Transfer to the account of "Stichting ICCF Holland" in Lisse.
This will allow for tax deduction if you live in Holland.
Postbank, nr. 4548774
IBAN: NL95 INGB 0004 5487 74
Holland: Transfer to the account of "Stichting ICCF Holland" in
Amersfoort. This will allow for tax deduction if you live in
Holland. ING bank, IBAN: NL95 INGB 0004 5487 74
Germany: It is possible to make donations that allow for a tax return.
Check the ICCF web site for the latest information:
http://iccf-holland.org/germany.html
https://iccf-holland.org/germany.html
World: Use a postal money order. That should be possible from any
country, mostly from the post office. Use this name (which is
in my passport): "Abraham Moolenaar". Use Euro for the
currency if possible.
Europe: Use a bank transfer if possible. Your bank should have a form
that you can use for this. See "Others" below for the swift
code and IBAN number.
Europe: Use a bank transfer if possible. See "Others" below for the
swift code and IBAN number.
Any other method should work. Ask for information about
sponsorship.
@ -261,28 +247,12 @@ Credit Card: You can use PayPal to send money with a Credit card. This is
https://www.paypal.com/en_US/mrb/pal=XAC62PML3GF8Q
The e-mail address for sending the money to is:
Bram@iccf-holland.org
For amounts above 400 Euro ($500) sending a check is
preferred.
Others: Transfer to one of these accounts if possible:
Postbank, account 4548774
Swift code: INGB NL 2A
IBAN: NL95 INGB 0004 5487 74
under the name "stichting ICCF Holland", Lisse
If that doesn't work:
Rabobank Lisse, account 3765.05.117
Swift code: RABO NL 2U
under the name "Bram Moolenaar", Lisse
Otherwise, send a check in euro or US dollars to the address
below. Minimal amount: $70 (my bank does not accept smaller
amounts for foreign check, sorry)
ING bank: IBAN: NL95 INGB 0004 5487 74
Swift code: INGBNL2A
under the name "stichting ICCF Holland", Amersfoort
Checks are not accepted.
Address to send checks to:
Bram Moolenaar
Finsterruetihof 1
8134 Adliswil
Switzerland
This address is expected to be valid for a long time.
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -189,7 +189,7 @@ You can specify #rrggbb hex colors and you can define new names for hex
colors in |v:colornames| like so: >
let v:colornames['mine_red'] = '#aa0000'
<
If you are authoring a color scheme for others to use, it is important
to define these colors only when they do not exist: >
@ -197,7 +197,7 @@ to define these colors only when they do not exist: >
This allows users of the color scheme to override the precise definition of
that color prior to loading your color scheme. For example, in a |.vimrc|
file:
file: >
runtime colors/lists/css_colors.vim
let v:colornames['your_red'] = v:colornames['css_red']

View File

@ -1,4 +1,4 @@
*usr_40.txt* For Vim version 8.2. Last change: 2020 Sep 02
*usr_40.txt* For Vim version 8.2. Last change: 2022 Jan 03
VIM USER MANUAL - by Bram Moolenaar
@ -20,7 +20,7 @@ Table of contents: |usr_toc.txt|
==============================================================================
*40.1* Key mapping
A simple mapping was explained in section |05.3|. The principle is that one
A simple mapping was explained in section |05.4|. The principle is that one
sequence of key strokes is translated into another sequence of key strokes.
This is a simple, yet powerful mechanism.
The simplest form is that one key is mapped to a sequence of keys. Since

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
*various.txt* For Vim version 8.2. Last change: 2021 Sep 06
*various.txt* For Vim version 8.2. Last change: 2022 Feb 03
VIM REFERENCE MANUAL by Bram Moolenaar
@ -244,10 +244,10 @@ g8 Print the hex values of the bytes used in the
compiler will have set stdin to a non-interactive
mode.
*:!cmd* *:!* *E34*
*:!cmd* *:!*
:!{cmd} Execute {cmd} with the shell. See also the 'shell'
and 'shelltype' option.
*E34*
Any '!' in {cmd} is replaced with the previous
external command (see also 'cpoptions'). But not when
there is a backslash before the '!', then that
@ -369,7 +369,7 @@ N *+digraphs* |digraphs| *E196*
*+dnd* Support for DnD into the "~ register |quote_~|.
B *+emacs_tags* |emacs-tags| files
N *+eval* expression evaluation |eval.txt|
N *+ex_extra* always on now, used to be for Vim's extra Ex commands
T *+ex_extra* always on now, used to be for Vim's extra Ex commands
N *+extra_search* |'hlsearch'| and |'incsearch'| options.
- *+farsi* Removed: |farsi| language
N *+file_in_path* |gf|, |CTRL-W_f| and |<cfile>|
@ -391,7 +391,7 @@ m *+hangul_input* Hangul input support |hangul|
T *+insert_expand* |insert_expand| Insert mode completion
m *+ipv6* Support for IPv6 networking |channel|
m *+job* starting and stopping jobs |job|
S *+jumplist* |jumplist|
T *+jumplist* |jumplist|; Always enabled since 8.2.3795
B *+keymap* |'keymap'|
N *+lambda* |lambda| and |closure|
B *+langmap* |'langmap'|
@ -423,8 +423,8 @@ N *+multi_lang* non-English language support |multi-lang|
m *+mzscheme* Mzscheme interface |mzscheme|
m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn|
m *+netbeans_intg* |netbeans|
*+num64* 64-bit Number support |Number|
Always enabled since 8.2.0271, use v:numbersize to
T *+num64* 64-bit Number support |Number|
Always enabled since 8.2.0271, use v:numbersize to
check the actual size of a Number.
m *+ole* Win32 GUI only: |ole-interface|
N *+packages* Loading |packages|
@ -471,15 +471,16 @@ N *+textobjects* |text-objects| selection
N *+textprop* |text-properties|
*+tgetent* non-Unix only: able to use external termcap
N *+timers* the |timer_start()| function
N *+title* Setting the window 'title' and 'icon'; Always enabled
T *+title* Setting the window 'title' and 'icon'; Always enabled
N *+toolbar* |gui-toolbar|
T *+user_commands* User-defined commands. |user-commands|
Always enabled since 8.1.1210.
B *+vartabs* Variable-width tabstops. |'vartabstop'|
N *+viminfo* |'viminfo'|
*+vertsplit* Vertically split windows |:vsplit|; Always enabled
T *+vertsplit* Vertically split windows |:vsplit|; Always enabled
since 8.0.1118.
N *+virtualedit* |'virtualedit'| Always enabled since 8.1.826.
T *+vim9script* |Vim9| script
N *+viminfo* |'viminfo'|
T *+virtualedit* |'virtualedit'| Always enabled since 8.1.826.
T *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200.
T *+visualextra* extra Visual mode commands |blockwise-operators|
T *+vreplace* |gR| and |gr|
@ -548,37 +549,40 @@ N *+X11* Unix only: can restore window title |X11|
backward compatibility, the ">" after the register
name can be omitted.
:redi[r] @">> Append messages to the unnamed register.
:redi[r] => {var} Redirect messages to a variable. If the variable
doesn't exist, then it is created. If the variable
exists, then it is initialized to an empty string.
*E1092*
:redi[r] => {var} Redirect messages to a variable.
In legacy script: If the variable doesn't exist, then
it is created. If the variable exists, then it is
initialized to an empty string. After the redirection
starts, if the variable is removed or locked or the
variable type is changed, then further command output
messages will cause errors.
In Vim9 script: the variable must have been declared
as a string.
The variable will remain empty until redirection ends.
Only string variables can be used. After the
redirection starts, if the variable is removed or
locked or the variable type is changed, then further
command output messages will cause errors.
Only string variables can be used.
To get the output of one command the |execute()|
function can be used instead of redirection.
:redi[r] =>> {var} Append messages to an existing variable. Only string
variables can be used.
*E1185*
:redi[r] END End redirecting messages.
*:filt* *:filter*
:filt[er][!] {pat} {command}
:filt[er][!] /{pat}/ {command}
:filt[er][!] {pattern} {command}
:filt[er][!] /{pattern}/ {command}
Restrict the output of {command} to lines matching
with {pat}. For example, to list only xml files: >
with {pattern}. For example, to list only xml files: >
:filter /\.xml$/ oldfiles
< If the [!] is given, restrict the output of {command}
to lines that do NOT match {pat}.
to lines that do NOT match {pattern}.
{pat} is a Vim search pattern. Instead of enclosing
{pattern} is a Vim search pattern. Instead of enclosing
it in / any non-ID character (see |'isident'|) can be
used, so long as it does not appear in {pat}. Without
the enclosing character the pattern cannot include the
bar character. 'ignorecase' is not used.
used, so long as it does not appear in {pattern}.
Without the enclosing character the pattern cannot
include the bar character. 'ignorecase' is not used.
The pattern is matched against the relevant part of
the output, not necessarily the whole line. Only some
@ -598,7 +602,7 @@ N *+X11* Unix only: can restore window title |X11|
|:oldfiles| - filter by file name
|:registers| - filter by register contents
(does not work multi-line)
|:set| - filter by variable name
|:set| - filter by option name
Only normal messages are filtered, error messages are
not.
@ -645,7 +649,7 @@ N *+X11* Unix only: can restore window title |X11|
used. In this example |:silent| is used to avoid the
message about reading the file and |:unsilent| to be
able to list the first line of each file. >
:silent argdo unsilent echo expand('%') . ": " . getline(1)
:silent argdo unsilent echo expand('%') . ": " . getline(1)
<
*:verb* *:verbose*

View File

@ -1,4 +1,4 @@
*version8.txt* For Vim version 8.2. Last change: 2021 Jul 24
*version8.txt* For Vim version 8.2. Last change: 2022 Feb 03
VIM REFERENCE MANUAL by Bram Moolenaar
@ -25971,7 +25971,7 @@ Added functions:
|test_getvalue()|
|test_null_blob()|
|test_refcount()|
|test_scrollbar()|
test_scrollbar() (later replaced with |test_gui_event()|)
|test_setmouse()|
|win_execute()|
|win_splitmove()|

View File

@ -166,7 +166,7 @@ Note: "+" と "\-c" は合わせて 10 個まで指定できます。
.TP
\-d
差分モードで起動します。
二つか三つの四つのファイルを引数に指定してください。
2 個から 8 個のファイルを引数に指定してください。
指定されたファイルが開かれ、それらのファイルの差分が表示されます。
vimdiff(1) と同様の動作です。
.TP
@ -217,8 +217,7 @@ GUI がサポートされている場合は、GUI で起動します。
サポートされていない場合はエラーメッセージを表示して終了します。
.TP
\-i {viminfo}
viminfo ファイルを使う設定になっている場合は、初期設定の "~/.viminfo"
の代わりに、指定されたファイルを設定します。
初期設定の "~/.viminfo" の代わりに、viminfo ファイルを読み書きする際に使うファイル名を指定します。
"NONE" を指定すると、.viminfo ファイルを使わないように設定できます。
.TP
\-L
@ -356,6 +355,10 @@ X サーバーと通信しません。端末での起動時間を短くできま
これ以降の引数はすべてファイル名として扱われます。
ファイル名が '\-' で始まっているファイルを開くときに使ってください。
.TP
\-\-clean
一切の個人設定 (vimrc、プラグイン、その他) を使用しません。
ある問題がクリーンな Vim セットアップで再現するかを確認するのに有用です。
.TP
\-\-echo\-wid
GTK GUI のみ: Window ID を標準出力に出力します。
.TP
@ -398,6 +401,9 @@ Vim サーバーの一覧を表示します。
\-\-socketid {id}
GTK GUI のみ: GtkPlug メカニズムを使って gvim を別のウィンドウの中で実行します。
.TP
\-\-startuptime {file}
起動処理の間、経過時間のメッセージをファイル {fname} に書き出します。
.TP
\-\-version
バージョン情報を表示して終了します。
.SH オンラインヘルプ

View File

@ -1,4 +1,4 @@
.TH VIM 1 "2006 Apr 11"
.TH VIM 1 "2021 Jun 13"
.SH NAME
vim \- Vi IMproved, a programmer's text editor
.SH SYNOPSIS

View File

@ -432,4 +432,4 @@ BUGS
2006 Apr 11 VIM(1)
2021 Jun 13 VIM(1)

View File

@ -1,17 +1,14 @@
*vim9.txt* For Vim version 8.2. Last change: 2021 Nov 22
*vim9.txt* For Vim version 8.2. Last change: 2022 Feb 04
VIM REFERENCE MANUAL by Bram Moolenaar
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
Vim9 script commands and expressions. *Vim9* *vim9*
Most expression help is in |eval.txt|. This file is about the new syntax and
features in Vim9 script.
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
1. What is Vim9 script? |Vim9-script|
@ -27,8 +24,6 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
1. What is Vim9 script? *Vim9-script*
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
Vim script has been growing over time, while preserving backwards
compatibility. That means bad choices from the past often can't be changed
and compatibility with Vi restricts possible solutions. Execution is quite
@ -61,12 +56,12 @@ Vim9 script and legacy Vim script can be mixed. There is no requirement to
rewrite old scripts, they keep working as before. You may want to use a few
`:def` functions for code that needs to be fast.
:vim9[cmd] {cmd} *:vim9* *:vim9cmd*
:vim9[cmd] {cmd} *:vim9* *:vim9cmd* *E1164*
Execute {cmd} using Vim9 script syntax and semantics.
Useful when typing a command and in a legacy script or
function.
:leg[acy] {cmd} *:leg* *:legacy*
:leg[acy] {cmd} *:leg* *:legacy* *E1189* *E1234*
Execute {cmd} using legacy script syntax and semantics. Only
useful in a Vim9 script or a :def function.
Note that {cmd} cannot use local variables, since it is parsed
@ -76,10 +71,8 @@ rewrite old scripts, they keep working as before. You may want to use a few
2. Differences from legacy Vim script *vim9-differences*
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
Overview ~
*E1146*
Brief summary of the differences you will most often encounter when using Vim9
script and `:def` functions; details are below:
- Comments start with #, not ": >
@ -88,8 +81,8 @@ script and `:def` functions; details are below:
echo "hello "
.. yourName
.. ", how are you?"
- White space is required in many places.
- Assign values without `:let`, declare variables with `:var`: >
- White space is required in many places to improve readability.
- Assign values without `:let` *E1126* , declare variables with `:var`: >
var count = 0
count += 3
- Constants can be declared with `:final` and `:const`: >
@ -101,8 +94,8 @@ script and `:def` functions; details are below:
def CallMe(count: number, message: string): bool
- Call functions without `:call`: >
writefile(['done'], 'file.txt')
- You cannot use `:xit`, `:t`, `:k`, `:append`, `:change`, `:insert`, `:open`,
and `:s` or `:d` with only flags.
- You cannot use old Ex commands `:xit`, `:t`, `:k`, `:append`, `:change`,
`:insert`, `:open`, and `:s` or `:d` with only flags.
- You cannot use curly-braces names.
- A range before a command must be prefixed with a colon: >
:%s/this/that
@ -110,6 +103,8 @@ script and `:def` functions; details are below:
`:exe`: >
:exe @a
- Unless mentioned specifically, the highest |scriptversion| is used.
- When defining an expression mapping, the expression will be evaluated in the
context of the script where it was defined.
Comments starting with # ~
@ -127,13 +122,13 @@ is the same as in shell scripts and Python programs.
In Vi # is a command to list text with numbers. In Vim9 script you can use
`:number` for that. >
101 number
:101 number
To improve readability there must be a space between a command and the #
that starts a comment: >
var name = value # comment
var name = value# error!
< *E1170*
Do not start a comment with #{, it looks like the legacy dictionary literal
and produces an error where this might be confusing. #{{ or #{{{ are OK,
these can be used to start a fold.
@ -144,7 +139,7 @@ arguments).
Vim9 functions ~
*E1099*
A function defined with `:def` is compiled. Execution is many times faster,
often 10 to 100 times.
@ -158,7 +153,7 @@ Compilation is done when any of these is encountered:
- `:disassemble` is used for the function.
- a function that is compiled calls the function or uses it as a function
reference (so that the argument and return types can be checked)
*E1091*
*E1091* *E1191*
If compilation fails it is not tried again on the next call, instead this
error is given: "E1091: Function is not compiled: {name}".
Compilation will fail when encountering a user command that has not been
@ -169,8 +164,8 @@ created yet. In this case you can call `execute()` to invoke it at runtime. >
`:def` has no options like `:function` does: "range", "abort", "dict" or
"closure". A `:def` function always aborts on an error (unless `:silent!` was
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.
used for the command or the error was caught a `:try` block), does not get a
range passed cannot be a "dict" function, and can always be a closure.
*vim9-no-dict-function*
Later classes will be added, which replaces the "dict function" mechanism.
For now you will need to pass the dictionary explicitly: >
@ -188,14 +183,14 @@ You can call a legacy dict function though: >
var d = {func: Legacy, value: 'text'}
d.func()
enddef
< *E1096* *E1174* *E1175*
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.
*E1106*
Arguments are accessed by name, without "a:", just like any other language.
There is no "a:" dictionary or "a:000" list.
*vim9-variable-arguments*
*vim9-variable-arguments* *E1055* *E1160* *E1180*
Variable arguments are defined as the last argument, with a name and have a
list type, similar to TypeScript. For example, a list of numbers: >
def MyFunc(...itemlist: list<number>)
@ -211,7 +206,7 @@ should use its default value. Example: >
enddef
MyFunc(v:none, 'LAST') # first argument uses default value 'one'
<
*vim9-ignored-argument*
*vim9-ignored-argument* *E1181*
The argument "_" (an underscore) can be used to ignore the argument. This is
most useful in callbacks where you don't need it, but do need to give an
argument to match the call. E.g. when using map() two arguments are passed,
@ -232,19 +227,17 @@ the "name#" prefix is sufficient. >
def s:ThisFunction() # script-local
def g:ThatFunction() # global
def scriptname#function() # autoload
< *E1058* *E1075*
When using `:function` or `:def` to specify a nested function inside a `:def`
function, this nested function is local to the code block it is defined in.
In a `:def` function it is not possible to define a script-local function. It
is possible to define a global function by using the "g:" prefix.
function and no namespace was given, this nested function is local to the code
block it is defined in. In a `:def` function it is not possible to define a
script-local function. It is possible to define a global function by using
the "g:" prefix.
When referring to a function and no "s:" or "g:" prefix is used, Vim will
search for the function:
- in the function scope, in block scopes
- in the script scope, possibly imported
- in the list of global functions
However, it is recommended to always use "g:" to refer to a global function
for clarity.
Since a script-local function reference can be used without "s:" the name must
start with an upper case letter even when using the "s:" prefix. In legacy
@ -259,7 +252,7 @@ it is being compiled (to figure out the return type).
The result is that functions and variables without a namespace can usually be
found in the script, either defined there or imported. Global functions and
variables could be defined anywhere (good luck finding out where!).
*E1102*
Global functions can still be defined and deleted at nearly any time. In
Vim9 script script-local functions are defined once when the script is sourced
and cannot be deleted or replaced.
@ -271,7 +264,7 @@ You can use an autoload function if needed, or call a legacy function and have
Reloading a Vim9 script clears functions and variables by default ~
*vim9-reload*
*vim9-reload* *E1149* *E1150*
When loading a legacy Vim script a second time nothing is removed, the
commands will replace existing variables and functions and create new ones.
@ -293,7 +286,8 @@ some point when loaded again. E.g. when a buffer local option is set: >
Variable declarations with :var, :final and :const ~
*vim9-declaration* *:var*
*vim9-declaration* *:var*
*E1017* *E1020* *E1054* *E1087* *E1108* *E1124*
Local variables need to be declared with `:var`. Local constants need to be
declared with `:final` or `:const`. We refer to both as "variables" in this
section.
@ -324,7 +318,7 @@ The declaration must be done earlier: >
inner = 0
endif
echo inner
< *E1025* *E1128*
To intentionally hide a variable from code that follows, a block can be
used: >
{
@ -351,21 +345,24 @@ And with autocommands: >
}
Although using a :def function probably works better.
*E1022* *E1103* *E1130* *E1131* *E1133*
*E1134* *E1235*
Declaring a variable with a type but without an initializer will initialize to
zero, false or empty.
false (for bool), empty (for string, list, dict, etc.) or zero (for number,
any, etc.). This matters especially when using the "any" type, the value will
default to the number zero.
*E1016* *E1052* *E1066*
In Vim9 script `:let` cannot be used. An existing variable is assigned to
without any command. The same for global, window, tab, buffer and Vim
variables, because they are not really declared. They can also be deleted
variables, because they are not really declared. Those can also be deleted
with `:unlet`.
*E1178*
`:lockvar` does not work on local variables. Use `:const` and `:final`
instead.
The `exists()` and `exists_compiled()` functions do not work on local variables
or arguments.
*E1006* *E1041* *E1167* *E1168* *E1213*
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.
@ -376,13 +373,12 @@ Global variables must be prefixed with "g:", also at the script level. >
g:global = 'value'
var Funcref = g:ThatFunction
Global functions must be prefixed with "g:" when defining them, but can be
called without "g:". >
Global functions must be prefixed with "g:": >
vim9script
def g:GlobalFunc(): string
return 'text'
enddef
echo GlobalFunc()
echo g:GlobalFunc()
The "g:" prefix is not needed for auto-load functions.
*vim9-function-defined-later*
@ -395,8 +391,8 @@ later. Example: >
endif
enddef
If you would do it like this you get an error at compile time that
"PluginFunc" does not exist, even when "g:loaded_plugin" does not exist: >
If you do it like this, you get an error at compile time that "PluginFunc"
does not exist, even when "g:loaded_plugin" does not exist: >
def CallPluginFunc()
if exists('g:loaded_plugin')
PluginFunc() # Error - function not found
@ -419,7 +415,7 @@ similar to how a function argument can be ignored: >
[a, _, c] = theList
To ignore any remaining items: >
[a, b; _] = longList
< *E1163*
Declaring more than one variable at a time, using the unpack notation, is
possible. Each variable can have a type or infer it from the value: >
var [v1: number, v2] = GetValues()
@ -433,7 +429,7 @@ How constants work varies between languages. Some consider a variable that
can't be assigned another value a constant. JavaScript is an example. Others
also make the value immutable, thus when a constant uses a list, the list
cannot be changed. In Vim9 we can use both.
*E1021*
`:const` is used for making both the variable and the value a constant. Use
this for composite structures that you want to make sure will not be modified.
Example: >
@ -441,7 +437,7 @@ Example: >
myList = [3, 4] # Error!
myList[0] = 9 # Error!
myList->add(3) # Error!
< *:final*
< *:final* *E1125*
`:final` is used for making only the variable a constant, the value can be
changed. This is well known from Java. Example: >
final myList = [1, 2]
@ -461,7 +457,7 @@ The constant only applies to the value itself, not what it refers to. >
Omitting :call and :eval ~
*E1190*
Functions can be called without `:call`: >
writefile(lines, 'file')
Using `:call` is still possible, but this is discouraged.
@ -508,7 +504,7 @@ The function must already have been defined. >
When using `function()` the resulting type is "func", a function with any
number of arguments and any return type (including void). The function can be
defined later.
defined later if the argument is in quotes.
Lambda using => instead of -> ~
@ -521,7 +517,8 @@ 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: >
var Lambda = (arg) => expression
var Lambda = (arg): type => expression
< *E1157*
No line break is allowed in the arguments of a lambda up to and including the
"=>" (so that Vim can tell the difference between an expression in parentheses
and lambda arguments). This is OK: >
@ -537,7 +534,7 @@ But you can use a backslash to concatenate the lines before parsing: >
filter(list, (k,
\ v)
\ => v > 0)
< *vim9-lambda-arguments*
< *vim9-lambda-arguments* *E1172*
In legacy script a lambda could be called with any number of extra arguments,
there was no way to warn for not using them. In Vim9 script the number of
arguments must match. If you do want to accept any arguments, or any further
@ -546,7 +543,7 @@ arguments, use "..._", which makes the function accept
var Callback = (..._) => 'anything'
echo Callback(1, 2, 3) # displays "anything"
< *inline-function*
< *inline-function* *E1171*
Additionally, a lambda can contain statements in {}: >
var Lambda = (arg) => {
g:was_called = 'yes'
@ -559,7 +556,6 @@ This can be useful for a timer, for example: >
echom 'Handler called ' .. count
}, {repeat: 3})
The ending "}" must be at the start of a line. It can be followed by other
characters, e.g.: >
var d = mapnew(dict, (k, v): string => {
@ -567,6 +563,24 @@ characters, e.g.: >
})
No command can follow the "{", only a comment can be used there.
*command-block* *E1026*
The block can also be used for defining a user command. Inside the block Vim9
syntax will be used.
If the statements include a dictionary, its closing bracket must not be
written at the start of a line. Otherwise, it would be parsed as the end of
the block. This does not work: >
command NewCommand {
g:mydict = {
'key': 'value',
} # ERROR: will be recognized as the end of the block
}
Put the '}' after the last item to avoid this: >
command NewCommand {
g:mydict = {
'key': 'value' }
}
Rationale: The "}" cannot be after a command because it would require parsing
the commands to find it. For consistency with that no command can follow the
"{". Unfortunately this means using "() => { command }" does not work, line
@ -584,7 +598,7 @@ Also when confused with the start of a command block: >
Automatic line continuation ~
*vim9-line-continuation* *E1097*
In many cases it is obvious that an expression continues on the next line. In
those cases there is no need to prefix the line with a backslash (see
|line-continuation|). For example, when a list spans multiple lines: >
@ -669,6 +683,11 @@ This will assign "start" and print a line: >
var result = start
:+ print
After the range an Ex command must follow. Without the colon you can call a
function without `:call`, but after a range you do need it: >
MyFunc()
:% call MyFunc()
Note that the colon is not required for the |+cmd| argument: >
edit +6 fname
@ -687,6 +706,7 @@ second line is seen as a separate command: >
Now "exit_cb: Func})" is actually a valid command: save any changes to the
file "_cb: Func})" and exit. To avoid this kind of mistake in Vim9 script
there must be white space between most command names and the argument.
*E1144*
However, the argument of a command that is a command won't be recognized. For
example, after "windo echo expr" a line break inside "expr" will not be seen.
@ -717,7 +737,7 @@ Notes:
White space ~
*E1004* *E1068* *E1069* *E1074* *E1127* *E1202*
Vim9 script enforces proper use of white space. This is no longer allowed: >
var name=234 # Error!
var name= 234 # Error!
@ -751,7 +771,7 @@ White space is not allowed:
Func(
arg # OK
)
< *E1205*
White space is not allowed in a `:set` command between the option name and a
following "&", "!", "<", "=", "+=", "-=" or "^=".
@ -761,8 +781,13 @@ No curly braces expansion ~
|curly-braces-names| cannot be used.
Dictionary literals ~
Command modifiers are not ignored ~
*E1176*
Using a command modifier for a command that does not use it gives an error.
Dictionary literals ~
*vim9-literal-dict* *E1014*
Traditionally Vim has supported dictionary literals with a {} syntax: >
let dict = {'key': value}
@ -782,7 +807,7 @@ use another character, use a single or double quoted string: >
var dict = {'key with space': value}
var dict = {"key\twith\ttabs": value}
var dict = {'': value} # empty key
< *E1139*
In case the key needs to be an expression, square brackets can be used, just
like in JavaScript: >
var dict = {["key" .. nr]: value}
@ -795,7 +820,7 @@ error. A number can be given with and without the []: >
No :xit, :t, :k, :append, :change or :insert ~
*E1100*
These commands are too easily confused with local variable names.
Instead of `:x` or `:xit` you can use `:exit`.
Instead of `:t` you can use `:copy`.
@ -819,11 +844,17 @@ error. Example: >
For loop ~
The loop variable must not exist yet: >
*E1254*
The loop variable must not be declared yet: >
var i = 1
for i in [1, 2, 3] # Error!
It is possible to use a global variable though: >
g:i = 1
for g:i in [1, 2, 3]
echo g:i
endfor
Legacy Vim script has some tricks to make a for loop over a list handle
deleting items at the current or previous item. In Vim9 script it just uses
the index, if items are deleted then items in the list will be skipped.
@ -846,7 +877,7 @@ first if needed.
Conditions and expressions ~
*vim9-boolean*
Conditions and expressions are mostly working like they do in other languages.
Some values are different from legacy Vim script:
value legacy Vim script Vim9 script ~
@ -898,9 +929,9 @@ always converted to string: >
'hello ' .. 123 == 'hello 123'
'hello ' .. v:true == 'hello true'
Simple types are string, float, special and bool. For other types |string()|
can be used.
*false* *true* *null*
Simple types are Number, Float, Special and Bool. For other types |string()|
should be used.
*false* *true* *null* *E1034*
In Vim9 script one can use "true" for v:true, "false" for v:false and "null"
for v:null. When converting a boolean to a string "false" and "true" are
used, not "v:false" and "v:true" like in legacy script. "v:none" is not
@ -1043,17 +1074,19 @@ Using ++var or --var in an expression is not supported yet.
3. New style functions *fast-functions*
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
*:def*
*:def* *E1028*
:def[!] {name}([arguments])[: {return-type}]
Define a new function by the name {name}. The body of
the function follows in the next lines, until the
matching `:enddef`.
When {return-type} is omitted or is "void" the
function is not expected to return anything.
matching `:enddef`. *E1073*
*E1011*
The {name} must be less than 100 bytes long.
*E1003* *E1027* *E1056* *E1059*
The type of value used with `:return` must match
{return-type}. When {return-type} is omitted or is
"void" the function is not expected to return
anything.
*E1077* *E1123*
{arguments} is a sequence of zero or more argument
declarations. There are three forms:
{name}: {type}
@ -1071,13 +1104,13 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
It is possible to nest `:def` inside another `:def` or
`:function` up to about 50 levels deep.
*E1117*
[!] is used as with `:function`. Note that
script-local functions cannot be deleted or redefined
later in Vim9 script. They can only be removed by
reloading the same script.
*:enddef*
*:enddef* *E1057* *E1152* *E1173*
:enddef End of a function defined with `:def`. It should be on
a line by its own.
@ -1097,7 +1130,7 @@ prefix if they do not exist at the time of compiling.
*:disa* *:disassemble*
:disa[ssemble] {func} Show the instructions generated for {func}.
This is for debugging and testing.
This is for debugging and testing. *E1061*
Note that for command line completion of {func} you
can prepend "s:" to find script-local functions.
@ -1156,12 +1189,72 @@ for each closure call a function to define it: >
echo range(5)->map((i, _) => flist[i]())
# Result: [0, 1, 2, 3, 4]
In some situations, especially when calling a Vim9 closure from legacy
context, the evaluation will fail. *E1248*
Converting a function from legacy to Vim9 ~
*convert_legacy_function_to_vim9*
These are the most changes that need to be made to convert a legacy function
to a Vim9 function:
- Change `func` or `function` to `def`.
- Change `endfunc` or `endfunction` to `enddef`.
- Add types to the function arguments.
- If the function returns something, add the return type.
- Change comments to start with # instead of ".
For example, a legacy function: >
func MyFunc(text)
" function body
endfunc
< Becomes: >
def MyFunc(text: string): number
# function body
enddef
- Remove "a:" used for arguments. E.g.: >
return len(a:text)
< Becomes: >
return len(text)
- Change `let` used to declare a variable to `var`.
- Remove `let` used to assign a value to a variable. This is for local
variables already declared and b: w: g: and t: variables.
For example, legacy function: >
let lnum = 1
let lnum += 3
let b:result = 42
< Becomes: >
var lnum = 1
lnum += 3
b:result = 42
- Insert white space in expressions where needed.
- Change "." used for concatenation to "..".
For example, legacy function: >
echo line(1).line(2)
< Becomes: >
echo line(1) .. line(2)
- line continuation does not always require a backslash: >
echo ['one',
\ 'two',
\ 'three'
\ ]
< Becomes: >
echo ['one',
'two',
'three'
]
==============================================================================
4. Types *vim9-types*
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
*E1008* *E1009* *E1010* *E1012*
*E1013* *E1029* *E1030*
The following builtin types are supported:
bool
number
@ -1176,17 +1269,19 @@ The following builtin types are supported:
func: {type}
func({type}, ...)
func({type}, ...): {type}
void
Not supported yet:
tuple<a: {type}, b: {type}, ...>
These types can be used in declarations, but no simple value will actually
have the "void" type.
have the "void" type. Trying to use a void (e.g. a function without a
return value) results in error *E1031* *E1186* .
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
memory.
*E1005* *E1007*
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
@ -1258,7 +1353,7 @@ expected to always be the same. For example, when declaring a list: >
At compile time Vim doesn't know the type of "g:two" and the expression type
becomes list<any>. An instruction is generated to check the list type before
doing the assignment, which is a bit inefficient.
*type-casting*
*type-casting* *E1104*
To avoid this, use a type cast: >
var l: list<number> = [1, <number>g:two]
The compiled code will then only check that "g:two" is a number and give an
@ -1303,6 +1398,14 @@ Results in:
For script-local variables in Vim9 script the type is checked, also when the
variable was declared in a legacy function.
When a type has been declared this is attached to a list or string. When
later some expression attempts to change the type an error will be given: >
var ll: list<number> = [1, 2, 3]
ll->extend(['x']) # Error, 'x' is not a number
If the type is inferred then the type is allowed to change: >
[1, 2, 3]->extend(['x']) # result: [1, 2, 3, 'x']
Stricter type checking ~
*type-checking*
@ -1311,13 +1414,13 @@ automatically converted to a number. This was convenient for an actual number
such as "123", but leads to unexpected problems (and no error message) if the
string doesn't start with a number. Quite often this leads to hard-to-find
bugs.
*E1206* *E1210* *E1212*
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 option.
- Using a number where a string is expected. *E1024*
- Using a number where a string is expected. *E1024* *E1105*
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: >
@ -1333,23 +1436,35 @@ type. E.g. when a list of mixed types gets changed to a list of strings: >
# typename(mylist) == "list<any>"
map(mylist, (i, v) => 'item ' .. i)
# typename(mylist) == "list<string>", no error
< *E1158*
Same for |extend()|, use |extendnew()| instead, and for |flatten()|, use
|flattennew()| instead.
*E1211* *E1217* *E1218* *E1219* *E1220* *E1221*
*E1222* *E1223* *E1224* *E1225* *E1226* *E1227*
*E1228* *E1238* *E1250* *E1251* *E1252* *E1253*
*E1256*
Types are checked for most builtin functions to make it easier to spot
mistakes.
==============================================================================
5. Namespace, Import and Export
*vim9script* *vim9-export* *vim9-import*
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
A Vim9 script can be written to be imported. This means that some items are
intentionally exported, made available to other scripts. When the exporting
script is imported in another script, these exported items can then be used in
that script. All the other items remain script-local in the exporting script
and cannot be accessed by the importing script.
A Vim9 script can be written to be imported. This means that everything in
the script is local, unless exported. Those exported items, and only those
items, can then be imported in another script.
This mechanism exists for writing a script that can be sourced (imported) by
other scripts, while making sure these other scripts only have access to what
you want them to. This also avoids using the global namespace, which has a
risc of name collisions. For example when you have two plugins with similar
functionality.
You can cheat by using the global namespace explicitly. We will assume here
that you don't do that.
You can cheat by using the global namespace explicitly. That should be done
only for things that really are global.
Namespace ~
@ -1362,7 +1477,7 @@ global namespace. If a file starts with: >
var myvar = 'yes'
Then "myvar" will only exist in this file. While without `vim9script` it would
be available as `g:myvar` from any other script and function.
*E1101*
The variables at the file level are very much like the script-local "s:"
variables in legacy Vim script, but the "s:" is omitted. And they cannot be
deleted.
@ -1378,6 +1493,7 @@ One of the effects is that |line-continuation| is always enabled.
The original value of 'cpoptions' is restored at the end of the script, while
flags added or removed in the script are also added to or removed from the
original value to get the same effect. The order of flags may change.
In the |vimrc| file sourced on startup this does not happen.
*vim9-mix*
There is one way to use both legacy and Vim9 syntax in one script file: >
@ -1397,9 +1513,6 @@ This can only work in two ways:
2. The "if" statement evaluates to true, the commands up to `endif` are
executed and `finish` bails out before reaching `vim9script`.
TODO: The "vim9script" feature does not exist yet, it will only be added once
the Vim9 script syntax has been fully implemented.
Export ~
*:export* *:exp*
@ -1411,7 +1524,7 @@ Exporting an item can be written as: >
export def MyFunc() ...
export class MyClass ...
export interface MyClass ...
< *E1043* *E1044*
As this suggests, only constants, variables, `:def` functions and classes can
be exported. {not implemented yet: class, interface}
@ -1420,25 +1533,40 @@ be exported. {not implemented yet: class, interface}
Import ~
*:import* *:imp* *E1094*
The exported items can be imported individually in another Vim9 script: >
import EXPORTED_CONST from "thatscript.vim"
import MyClass from "myclass.vim"
*:import* *:imp* *E1094* *E1047* *E1262*
*E1048* *E1049* *E1053* *E1071* *E1236*
The exported items can be imported in another Vim9 script: >
import "myscript.vim"
To import multiple items at the same time: >
import {someValue, MyClass} from "thatscript.vim"
This makes each item available as "myscript.item".
*:import-as* *E1257* *E1261*
In case the name is long or ambiguous, another name can be specified: >
import "thatscript.vim" as that
< *E1060* *E1258* *E1259* *E1260*
Then you can use "that.EXPORTED_CONST", "that.someValue", etc. You are free
to choose the name "that". Use something that will be recognized as referring
to the imported script. Avoid command names, command modifiers and builtin
function names, because the name will shadow them.
If the name starts with a capital letter it can also shadow global user
commands and functions. Also, you cannot use the name for something else in
the script, such as a function or variable name.
In case the name is ambiguous, another name can be specified: >
import MyClass as ThatClass from "myclass.vim"
import {someValue, MyClass as ThatClass} from "myclass.vim"
In case the dot in the name is undesired, a local reference can be made for a
function: >
var LongFunc = that.LongFuncName
To import all exported items under a specific identifier: >
import * as That from 'thatscript.vim'
This also works for constants: >
const MAXLEN = that.MAX_LEN_OF_NAME
Then you can use "That.EXPORTED_CONST", "That.someValue", etc. You are free
to choose the name "That", but it is highly recommended to use the name of the
script file to avoid confusion. Also avoid command names, because the name
will shadow them.
This does not work for variables, since the value would be copied once and
when changing the variable the copy will change, not the original variable.
You will need to use the full name, with the dot.
The full syntax of the command is:
import {filename} [as {name}]
Where {filename} is an expression that must evaluate to a string. Without the
"as {name}" part it must end in ".vim". {name} must consist of letters,
digits and '_', like |internal-variables|.
`:import` can also be used in legacy Vim script. The imported items still
become script-local, even when the "s:" prefix is not given.
@ -1457,53 +1585,88 @@ The script name after `import` can be:
longer and unique, to avoid loading the wrong file.
Note that "after/import" is not used.
If the name does not end in ".vim" then the use of "as name" is required.
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.
*:import-cycle*
The `import` commands are executed when encountered. If that script (directly
or indirectly) imports the current script, then items defined after the
`import` won't be processed yet. Therefore cyclic imports can exist, but may
result in undefined items.
It is not allowed to import the same script twice, also when using two
different "as" names.
When using the imported name the dot and the item name must be in the same
line, there can be no line break: >
echo that.
name # Error!
echo that
.name # Error!
< *:import-cycle*
The `import` commands are executed when encountered. If script A imports
script B, and B (directly or indirectly) imports A, this will be skipped over.
At this point items in A after "import B" will not have been processed and
defined yet. Therefore cyclic imports can exist and not result in an error
directly, but may result in an error for items in A after "import B" not being
defined. This does not apply to autoload imports, see the next section.
Import in an autoload script ~
Importing an autoload script ~
*vim9-autoload*
For optimal startup speed, loading scripts should be postponed until they are
actually needed. A recommended mechanism:
actually needed. Using the autoload mechanism is recommended:
*E1264*
1. In the plugin define user commands, functions and/or mappings that refer to
an autoload script. >
command -nargs=1 SearchForStuff searchfor#Stuff(<f-args>)
items imported from an autoload script. >
import autoload 'for/search.vim'
command -nargs=1 SearchForStuff search.Stuff(<f-args>)
< This goes in .../plugin/anyname.vim. "anyname.vim" can be freely chosen.
The "SearchForStuff" command is now available to the user.
2. In the autoload script do the actual work. You can import items from
other files to split up functionality in appropriate pieces. >
The "autoload" argument to `:import` means that the script is not loaded
until one of the items is actually used. The script will be found under
the "autoload" directory in 'runtimepath' instead of the "import"
directory.
2. In the autoload script put the bulk of the code. >
vim9script
import FilterFunc from "../import/someother.vim"
def searchfor#Stuff(arg: string)
var filtered = FilterFunc(arg)
export def Stuff(arg: string)
...
< This goes in .../autoload/searchfor.vim. "searchfor" in the file name
must be exactly the same as the prefix for the function name, that is how
Vim finds the file.
3. Other functionality, possibly shared between plugins, contains the exported
items and any private items. >
vim9script
var localVar = 'local'
export def FilterFunc(arg: string): string
...
< This goes in .../import/someother.vim.
< This goes in .../autoload/for/search.vim.
Putting the "search.vim" script under the "/autoload/for/" directory has
the effect that "for#search#" will be prefixed to every exported item. The
prefix is obtained from the file name, as you would to manually in a
legacy autoload script. Thus the exported function can be found with
"for#search#Stuff", but you would normally use `import autoload` and not
use the prefix.
You can split up the functionality and import other scripts from the
autoload script as you like. This way you can share code between plugins.
For defining a mapping that uses the imported autoload script the special key
|<ScriptCmd>| is useful. It allows for a command in a mapping to use the
script context of where the mapping was defined.
When compiling a `:def` function and a function in an autoload script is
encountered, the script is not loaded until the `:def` function is called.
This also means you get any errors only at runtime, since the argument and
return types are not known yet.
For testing the |test_override()| function can be used to have the
`import autoload` load the script right away, so that the items and types can
be checked without waiting for them to be actually used: >
test_override('autoload', 1)
Reset it later with: >
test_override('autoload', 0)
Or: >
test_override('ALL', 0)
Import in legacy Vim script ~
If an `import` statement is used in legacy Vim script, the script-local "s:"
namespace will be used for the imported item, even when "s:" is not specified.
namespace will be used for the imported items, even when "s:" is not
specified.
==============================================================================
@ -1657,13 +1820,17 @@ Specific items from TypeScript we avoid:
- TypeScript can use an expression like "99 || 'yes'" in a condition, but
cannot assign the value to a boolean. That is inconsistent and can be
annoying. Vim recognizes an expression with && or || and allows using the
result as a bool. TODO: to be reconsidered
result as a bool. The |falsy-operator| was added for the mechanism to use a
default value.
- TypeScript considers an empty string as Falsy, but an empty list or dict as
Truthy. That is inconsistent. In Vim an empty list and dict are also
Falsy.
- TypeScript has various "Readonly" types, which have limited usefulness,
since a type cast can remove the immutable nature. Vim locks the value,
which is more flexible, but is only checked at runtime.
- TypeScript has a complicated "import" statement that does not match how the
Vim import mechanism works. A much simpler mechanism is used instead, which
matches that the imported script is only sourced once.
Declarations ~

View File

@ -1,15 +1,15 @@
.TH VIMDIFF 1 "2001 March 30"
.SH 名前
vimdiff \- 二つか三つか四つのファイルを Vim で開いて、その差分を表示する
vimdiff \- 2 個から 8 個のファイルを Vim で開いて、その差分を表示する
.SH 書式
.br
.B vimdiff
[options] file1 file2 [file3 [file4]]
[options] file1 file2 [file3 [file4 [file5 [file6 [file7 [file8]]]]]]
.PP
.B gvimdiff
.SH 説明
.B Vimdiff
は、二つ (か三つか四つ) のファイルを
は、2 個から 8 個のファイルを
.B Vim
で開きます。
ファイルは個別のウィンドウで開かれ、差分が強調表示されます。

View File

@ -1,4 +1,4 @@
*visual.txt* For Vim version 8.2. Last change: 2021 Nov 21
*visual.txt* For Vim version 8.2. Last change: 2022 Jan 20
VIM REFERENCE MANUAL by Bram Moolenaar
@ -265,6 +265,7 @@ Additionally the following commands can be used:
X delete (2) |v_X|
Y yank (2) |v_Y|
p put |v_p|
P put without unnamed register overwrite |v_P|
J join (1) |v_J|
U make uppercase |v_U|
u make lowercase |v_u|
@ -488,6 +489,11 @@ Commands in Select mode:
- ESC stops Select mode.
- CTRL-O switches to Visual mode for the duration of one command. *v_CTRL-O*
- CTRL-G switches to Visual mode.
- CTRL-R {register} selects the register to be used for the text that is
deleted when typing text. *v_CTRL-R*
Unless you specify the "_" (black hole) register, the unnamed register is
also overwritten.
Otherwise, typed characters are handled as in Visual mode.

View File

@ -1,4 +1,4 @@
*windows.txt* For Vim version 8.2. Last change: 2021 Sep 09
*windows.txt* For Vim version 8.2. Last change: 2022 Feb 03
VIM REFERENCE MANUAL by Bram Moolenaar
@ -146,7 +146,7 @@ highlight group (|hl-EndOfBuffer|) can be used to change the highlighting of
the filler characters.
==============================================================================
3. Opening and closing a window *opening-window* *E36*
3. Opening and closing a window *opening-window*
CTRL-W s *CTRL-W_s*
CTRL-W S *CTRL-W_S*
@ -168,7 +168,7 @@ CTRL-W CTRL-S *CTRL-W_CTRL-S*
Note: CTRL-S does not work on all terminals and might block
further input, use CTRL-Q to get going again.
Also see |++opt| and |+cmd|.
*E242*
*E242* *E1159*
Be careful when splitting a window in an autocommand, it may
mess up the window layout if this happens while making other
window layout changes.
@ -246,6 +246,10 @@ CTRL-W : Does the same as typing |:| - enter a command line. Useful in a
Note that the 'splitbelow' and 'splitright' options influence where a new
window will appear.
*E36*
Creating a window will fail if there is not enough room. Every window needs
at least one screen line and column, sometimes more. Options 'winminheight'
and 'winminwidth' are relevant.
*:vert* *:vertical*
:vert[ical] {cmd}
@ -1203,6 +1207,8 @@ list of buffers. |unlisted-buffer|
the current buffer remains being edited. See |:buffer-!| for
[!]. This will also edit a buffer that is not in the buffer
list, without setting the 'buflisted' flag.
The notation with single quotes does not work here,
`:buf 12'345'` uses 12'345 as a buffer name.
Also see |+cmd|.
:[N]b[uffer][!] [+cmd] {bufname} *{bufname}*

View File

@ -111,7 +111,7 @@ octets.
.TP
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
Produit une conversion continue dans le style Postscript (postscript continuous
hexdumd style).
hexdump style).
<EFBFBD>galement connu sous le nom de <20> conversion brute <20> (plain hexdump style).
.TP
.IR \-r " | " \-revert

View File

@ -111,7 +111,7 @@ octets.
.TP
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
Produit une conversion continue dans le style Postscript (postscript continuous
hexdumd style).
hexdump style).
Également connu sous le nom de « conversion brute » (plain hexdump style).
.TP
.IR \-r " | " \-revert

View File

@ -74,6 +74,7 @@
一行
.RI < cols >
オクテットで出力する。標準設定は 16 (\-i: 12, \-ps: 30, \-b: 6)。最大 256。
\-ps には最大値がありません。 \-ps 付きの場合、0 を指定すると単一の長い行で出力されます。
.TP
.IR \-C " | " \-capitalize
\-i を使用した際に、C インクルードファイル形式の変数名を大文字にする。

View File

@ -70,6 +70,7 @@ followed by an ascii (or ebcdic) representation. The command line switches
Format
.RI < cols >
octets per line. Default 16 (\-i: 12, \-ps: 30, \-b: 6). Max 256.
No maxmimum for \-ps. With \-ps, 0 results in one long line of output.
.TP
.IR \-C " | " \-capitalize
Capitalize variable names in C include file style, when using \-i.

View File

@ -42,7 +42,8 @@ OPTIONS
-c cols | -cols cols
Format <cols> octets per line. Default 16 (-i: 12, -ps: 30, -b:
6). Max 256.
6). Max 256. No maxmimum for -ps. With -ps, 0 results in one
long line of output.
-C | -capitalize
Capitalize variable names in C include file style, when using

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Nov 16
" Last Change: 2022 Jan 31
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@ -193,7 +193,8 @@ au BufNewFile,BufRead *.awk,*.gawk setf awk
au BufNewFile,BufRead *.mch,*.ref,*.imp setf b
" BASIC or Visual Basic
au BufNewFile,BufRead *.bas call dist#ft#FTVB("basic")
au BufNewFile,BufRead *.bas call dist#ft#FTbas()
au BufNewFile,BufRead *.bi,*.bm call dist#ft#FTbas()
" Visual Basic Script (close to Visual Basic) or Visual Basic .NET
au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb
@ -202,7 +203,7 @@ au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb
au BufNewFile,BufRead *.iba,*.ibi setf ibasic
" FreeBasic file (similar to QBasic)
au BufNewFile,BufRead *.fb,*.bi setf freebasic
au BufNewFile,BufRead *.fb setf freebasic
" Batch file for MSDOS.
au BufNewFile,BufRead *.bat,*.sys setf dosbatch
@ -260,7 +261,7 @@ au BufNewFile,BufRead *.lpc,*.ulpc setf lpc
au BufNewFile,BufRead calendar setf calendar
" C#
au BufNewFile,BufRead *.cs setf cs
au BufNewFile,BufRead *.cs,*.csx setf cs
" CSDL
au BufNewFile,BufRead *.csdl setf csdl
@ -397,6 +398,7 @@ au BufNewFile,BufRead configure.in,configure.ac setf config
au BufNewFile,BufRead *.cu,*.cuh setf cuda
" Dockerfile; Podman uses the same syntax with name Containerfile
" Also see Dockerfile.* below.
au BufNewFile,BufRead Containerfile,Dockerfile,*.Dockerfile setf dockerfile
" WildPackets EtherPeek Decoder
@ -490,10 +492,13 @@ au BufNewFile,BufRead dict.conf,.dictrc setf dictconf
" Dictd config
au BufNewFile,BufRead dictd*.conf setf dictdconf
" DEP3 formatted patch files
au BufNewFile,BufRead */debian/patches/* call dist#ft#Dep3patch()
" Diff files
au BufNewFile,BufRead *.diff,*.rej setf diff
au BufNewFile,BufRead *.patch
\ if getline(1) =~ '^From [0-9a-f]\{40\} Mon Sep 17 00:00:00 2001$' |
\ if getline(1) =~# '^From [0-9a-f]\{40,\} Mon Sep 17 00:00:00 2001$' |
\ setf gitsendemail |
\ else |
\ setf diff |
@ -649,6 +654,9 @@ au BufNewFile,BufRead *.fsl setf framescript
" FStab
au BufNewFile,BufRead fstab,mtab setf fstab
" Fusion
au BufRead,BufNewFile *.fusion setf fusion
" F# or Forth
au BufNewFile,BufRead *.fs call dist#ft#FTfs()
@ -661,6 +669,12 @@ au BufNewFile,BufRead .gdbinit,gdbinit setf gdb
" GDMO
au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
" GDscript
au BufNewFile,BufRead *.gd setf gdscript
" Godot resource
au BufRead,BufNewFile *.tscn,*.tres setf gdresource
" Gedcom
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
@ -672,26 +686,28 @@ autocmd BufRead,BufNewFile *.gift setf gift
" Git
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig setf gitconfig
au BufNewFile,BufRead NOTES_EDITMSG,EDIT_DESCRIPTION setf gitcommit
au BufNewFile,BufRead *.git/config,.gitconfig,*/etc/gitconfig setf gitconfig
au BufNewFile,BufRead */.config/git/config setf gitconfig
au BufNewFile,BufRead *.git/config.worktree setf gitconfig
au BufNewFile,BufRead *.git/worktrees/*/config.worktree setf gitconfig
au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig
if !empty($XDG_CONFIG_HOME)
au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
endif
au BufNewFile,BufRead git-rebase-todo setf gitrebase
au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail
au BufNewFile,BufRead .msg.[0-9]*
\ if getline(1) =~ '^From.*# This line is ignored.$' |
\ setf gitsendemail |
\ endif
au BufNewFile,BufRead *.git/*
\ if getline(1) =~ '^\x\{40\}\>\|^ref: ' |
\ if getline(1) =~# '^\x\{40,\}\>\|^ref: ' |
\ setf git |
\ endif
" Gkrellmrc
au BufNewFile,BufRead gkrellmrc,gkrellmrc_? setf gkrellmrc
" GLSL
au BufNewFile,BufRead *.glsl setf glsl
" GP scripts (2.0 and onward)
au BufNewFile,BufRead *.gp,.gprc setf gp
@ -712,15 +728,19 @@ au BufNewFile,BufRead gitolite.conf setf gitolite
au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl
" Gnuplot scripts
au BufNewFile,BufRead *.gpi setf gnuplot
au BufNewFile,BufRead *.gpi,.gnuplot setf gnuplot
" Go (Google)
au BufNewFile,BufRead *.go setf go
au BufNewFile,BufRead Gopkg.lock setf toml
au BufRead,BufNewFile go.work setf gowork
" GrADS scripts
au BufNewFile,BufRead *.gs setf grads
" GraphQL
au BufNewFile,BufRead *.graphql,*.graphqls,*.gql setf graphql
" Gretl
au BufNewFile,BufRead *.gretl setf gretl
@ -736,12 +756,18 @@ au BufNewFile,BufRead */etc/group,*/etc/group-,*/etc/group.edit,*/etc/gshadow,*/
" GTK RC
au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
" Hack
au BufRead,BufNewFile *.hack,*.hackpartial setf hack
" Haml
au BufNewFile,BufRead *.haml setf haml
" Hamster Classic | Playground files
au BufNewFile,BufRead *.hsm setf hamster
" Handlebars
au BufNewFile,BufRead *.hbs setf handlebars
" Haskell
au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot,*.hsig setf haskell
au BufNewFile,BufRead *.lhs setf lhaskell
@ -754,12 +780,21 @@ au BufNewFile,BufRead cabal.config setf cabalconfig
au BufNewFile,BufRead *.ht setf haste
au BufNewFile,BufRead *.htpp setf hastepreproc
" HCL
au BufRead,BufNewFile *.hcl setf hcl
" Hercules
au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules
" HEEx
au BufRead,BufNewFile *.heex setf heex
" HEX (Intel)
au BufNewFile,BufRead *.hex,*.h32 setf hex
" Hjson
au BufNewFile,BufRead *.hjson setf hjson
" Hollywood
au BufRead,BufNewFile *.hws setf hollywood
@ -790,6 +825,10 @@ au BufNewFile,BufRead *.hb setf hb
" Httest
au BufNewFile,BufRead *.htt,*.htb setf httest
" i3 (and sway)
au BufNewFile,BufRead */i3/config,*/sway/config setf i3config
au BufNewFile,BufRead */.i3/config,*/.sway/config setf i3config
" Icon
au BufNewFile,BufRead *.icn setf icon
@ -880,6 +919,9 @@ au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
" JSON
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
" JSON5
au BufNewFile,BufRead *.json5 setf json5
" JSON Patch (RFC 6902)
au BufNewFile,BufRead *.json-patch setf json
@ -931,6 +973,9 @@ au BufNewFile,BufRead *.ldif setf ldif
" Ld loader
au BufNewFile,BufRead *.ld setf ld
" Ledger
au BufRead,BufNewFile *.ldg,*.ledger,*.journal setf ledger
" Less
au BufNewFile,BufRead *.less setf less
@ -955,9 +1000,9 @@ au BufNewFile,BufRead lilo.conf setf lilo
" Lisp (*.el = ELisp, *.cl = Common Lisp)
" *.jl was removed, it's also used for Julia, better skip than guess wrong.
if has("fname_case")
au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,*.L,.emacs,.sawfishrc setf lisp
au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,*.L,.emacs,.sawfishrc setf lisp
else
au BufNewFile,BufRead *.lsp,*.lisp,*.el,*.cl,.emacs,.sawfishrc setf lisp
au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,.emacs,.sawfishrc setf lisp
endif
" SBCL implementation of Common Lisp
@ -1084,7 +1129,9 @@ au BufNewFile,BufRead *.mmp setf mmp
" Modsim III (or LambdaProlog)
au BufNewFile,BufRead *.mod
\ if getline(1) =~ '\<module\>' |
\ if expand("<afile>") =~ '\<go.mod$' |
\ setf gomod |
\ elseif getline(1) =~ '\<module\>' |
\ setf lprolog |
\ else |
\ setf modsim3 |
@ -1166,6 +1213,9 @@ au BufNewFile,BufRead *.nginx,nginx*.conf,*nginx.conf,*/etc/nginx/*,*/usr/local/
" Ninja file
au BufNewFile,BufRead *.ninja setf ninja
" Nix
au BufRead,BufNewFile *.nix setf nix
" NPM RC file
au BufNewFile,BufRead npmrc,.npmrc setf dosini
@ -1207,6 +1257,9 @@ au BufNewFile,BufRead *.xom,*.xin setf omnimark
" OPAM
au BufNewFile,BufRead opam,*.opam,*.opam.template setf opam
" OpenFOAM
au BufNewFile,BufRead [a-zA-Z0-9]*Dict\(.*\)\=,[a-zA-Z]*Properties\(.*\)\=,*Transport\(.*\),fvSchemes,fvSolution,fvConstrains,fvModels,*/constant/g,*/0\(\.orig\)\=/* call dist#ft#FTfoam()
" OpenROAD
au BufNewFile,BufRead *.or setf openroad
@ -1348,6 +1401,9 @@ au BufNewFile,BufRead *printcap
au BufNewFile,BufRead *termcap
\ let b:ptcap_type = "term" | setf ptcap
" Prisma
au BufRead,BufNewFile *.prisma setf prisma
" PCCTS / ANTLR
"au BufNewFile,BufRead *.g setf antlr
au BufNewFile,BufRead *.g setf pccts
@ -1355,6 +1411,9 @@ au BufNewFile,BufRead *.g setf pccts
" PPWizard
au BufNewFile,BufRead *.it,*.ih setf ppwiz
" Pug
au BufRead,BufNewFile *.pug setf pug
" Puppet
au BufNewFile,BufRead Puppetfile setf ruby
@ -1420,6 +1479,9 @@ au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc setf python
au BufNewFile,BufRead *.ptl,*.pyi,SConstruct setf python
" QL
au BufRead,BufNewFile *.ql,*.qll setf ql
" Radiance
au BufNewFile,BufRead *.rad,*.mat setf radiance
@ -1650,13 +1712,16 @@ au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFile
" (patterns ending in a start further below)
au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
" Zig
au BufNewFile,BufRead *.zig setf zig
" Z-Shell script (patterns ending in a star further below)
au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump setf zsh
au BufNewFile,BufRead *.zsh setf zsh
" Scheme
au BufNewFile,BufRead *.scm,*.ss,*.rkt,*.rktd,*.rktl setf scheme
au BufNewFile,BufRead *.scm,*.ss,*.sld,*.rkt,*.rktd,*.rktl setf scheme
" Screen RC
au BufNewFile,BufRead .screenrc,screenrc setf screen
@ -1736,6 +1801,10 @@ au BufNewFile,BufRead *.speedup,*.spdata,*.spd setf spup
" Slice
au BufNewFile,BufRead *.ice setf slice
" Microsoft Visual Studio Solution
au BufNewFile,BufRead *.sln setf solution
au BufNewFile,BufRead *.slnf setf json
" Spice
au BufNewFile,BufRead *.sp,*.spice setf spice
@ -1761,8 +1830,8 @@ au BufNewFile,BufRead *.sqr,*.sqi setf sqr
au BufNewFile,BufRead *.nut setf squirrel
" OpenSSH configuration
au BufNewFile,BufRead ssh_config,*/.ssh/config setf sshconfig
au BufNewFile,BufRead */etc/ssh/ssh_config.d/*.conf setf sshconfig
au BufNewFile,BufRead ssh_config,*/.ssh/config,*/.ssh/*.conf setf sshconfig
au BufNewFile,BufRead */etc/ssh/ssh_config.d/*.conf setf sshconfig
" OpenSSH server configuration
au BufNewFile,BufRead sshd_config setf sshdconfig
@ -1817,6 +1886,9 @@ au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers
" SVG (Scalable Vector Graphics)
au BufNewFile,BufRead *.svg setf svg
" Surface
au BufRead,BufNewFile *.sface setf surface
" Tads (or Nroff or Perl test file)
au BufNewFile,BufRead *.t
\ if !dist#ft#FTnroff() && !dist#ft#FTperl() | setf tads | endif
@ -1834,6 +1906,9 @@ au BufRead,BufNewFile *.task setf taskedit
" Tcl (JACL too)
au BufNewFile,BufRead *.tcl,*.tm,*.tk,*.itcl,*.itk,*.jacl,.tclshrc,.wishrc setf tcl
" Teal
au BufRead,BufNewFile *.tl setf teal
" TealInfo
au BufNewFile,BufRead *.tli setf tli
@ -1851,6 +1926,9 @@ au BufRead,BufNewFile *.ttl
" Terminfo
au BufNewFile,BufRead *.ti setf terminfo
" Terraform
au BufRead,BufNewFile *.tfvars setf terraform
" TeX
au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
au BufNewFile,BufRead *.tex call dist#ft#FTtex()
@ -1868,7 +1946,13 @@ au BufNewFile,BufRead texmf.cnf setf texmf
au BufNewFile,BufRead .tidyrc,tidyrc,tidy.conf setf tidy
" TF mud client
au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf
au BufNewFile,BufRead .tfrc,tfrc setf tf
" TF mud client or terraform
au BufNewFile,BufRead *.tf call dist#ft#FTtf()
" TLA+
au BufNewFile,BufRead *.tla setf tla
" tmux configuration
au BufNewFile,BufRead {.,}tmux*.conf setf tmux
@ -1877,7 +1961,7 @@ au BufNewFile,BufRead {.,}tmux*.conf setf tmux
au BufNewFile,BufRead *.toml setf toml
" TPP - Text Presentation Program
au BufNewFile,BufReadPost *.tpp setf tpp
au BufNewFile,BufRead *.tpp setf tpp
" Treetop
au BufRead,BufNewFile *.treetop setf treetop
@ -1934,6 +2018,9 @@ au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart
au BufNewFile,BufRead */.config/upstart/*.conf setf upstart
au BufNewFile,BufRead */.config/upstart/*.override setf upstart
" Vala
au BufNewFile,BufRead *.vala setf vala
" Vera
au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera
@ -1964,7 +2051,7 @@ au BufRead,BufNewFile *.hw,*.module,*.pkg
\ endif
" Visual Basic (also uses *.bas) or FORM
au BufNewFile,BufRead *.frm call dist#ft#FTVB("form")
au BufNewFile,BufRead *.frm call dist#ft#FTfrm()
" SaxBasic is close to Visual Basic
au BufNewFile,BufRead *.sba setf vb
@ -2128,6 +2215,9 @@ au BufNewFile,BufRead *.raml setf raml
" yum conf (close enough to dosini)
au BufNewFile,BufRead */etc/yum.conf setf dosini
" YANG
au BufRead,BufNewFile *.yang setf yang
" Zimbu
au BufNewFile,BufRead *.zu setf zimbu
" Zimbu Templates
@ -2222,6 +2312,9 @@ au BufNewFile,BufRead crontab,crontab.*,*/etc/cron.d/* call s:StarSetf('crontab
" dnsmasq(8) configuration
au BufNewFile,BufRead */etc/dnsmasq.d/* call s:StarSetf('dnsmasq')
" Dockerfile
au BufNewFile,BufRead Dockerfile.*,Containerfile.* call s:StarSetf('dockerfile')
" Dracula
au BufNewFile,BufRead drac.* call s:StarSetf('dracula')
@ -2266,6 +2359,9 @@ au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig')
" Lilo: Linux loader
au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo')
" Libsensors
au BufNewFile,BufRead */etc/sensors.d/[^.]* call s:StarSetf('sensors')
" Logcheck
au BufNewFile,BufRead */etc/logcheck/*.d*/* call s:StarSetf('logcheck')

View File

@ -1,7 +1,7 @@
" Vim support file to switch on loading plugins for file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2006 Apr 30
" Last change: 2022 Feb 04
if exists("did_load_ftplugin")
finish
@ -10,26 +10,26 @@ let did_load_ftplugin = 1
augroup filetypeplugin
au FileType * call s:LoadFTPlugin()
func! s:LoadFTPlugin()
if exists("b:undo_ftplugin")
exe b:undo_ftplugin
unlet! b:undo_ftplugin b:did_ftplugin
endif
let s = expand("<amatch>")
if s != ""
if &cpo =~# "S" && exists("b:did_ftplugin")
" In compatible mode options are reset to the global values, need to
" set the local values also when a plugin was already used.
unlet b:did_ftplugin
endif
" When there is a dot it is used to separate filetype names. Thus for
" "aaa.bbb" load "aaa" and then "bbb".
for name in split(s, '\.')
exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim'
endfor
endif
endfunc
augroup END
def s:LoadFTPlugin()
if exists("b:undo_ftplugin")
exe b:undo_ftplugin
unlet! b:undo_ftplugin b:did_ftplugin
endif
var s = expand("<amatch>")
if s != ""
if &cpo =~# "S" && exists("b:did_ftplugin")
# In compatible mode options are reset to the global values, need to
# set the local values also when a plugin was already used.
unlet b:did_ftplugin
endif
# When there is a dot it is used to separate filetype names. Thus for
# "aaa.bbb" load "aaa" and then "bbb".
for name in split(s, '\.')
exe 'runtime! ftplugin/' .. name .. '.vim ftplugin/' .. name .. '_*.vim ftplugin/' .. name .. '/*.vim'
endfor
endif
enddef

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: BASIC
" Language: BASIC (QuickBASIC 4.5)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2015 Jan 10
" Last Change: 2021 Mar 16
if exists("b:did_ftplugin")
finish
@ -11,17 +11,46 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=:REM,:'
setlocal comments=:REM\ ,:Rem\ ,:rem\ ,:'
setlocal commentstring='\ %s
setlocal formatoptions-=t formatoptions+=croql
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "BASIC Source Files (*.bas)\t*.bas\n" .
\ "All Files (*.*)\t*.*\n"
" TODO: support exit ... as middle matches?
if exists("loaded_matchit") && !exists("b:match_words")
let s:line_start = '\%(^\s*\)\@<='
let s:not_end = '\%(end\s\+\)\@<!'
let s:not_end_or_exit = '\%(\%(end\|exit\)\s\+\)\@<!'
let b:match_ignorecase = 1
let b:match_words =
\ s:not_end_or_exit .. '\<def\s\+fn:\<end\s\+def\>,' ..
\ s:not_end_or_exit .. '\<function\>:\<end\s\+function\>,' ..
\ s:not_end_or_exit .. '\<sub\>:\<end\s\+sub\>,' ..
\ s:not_end .. '\<type\>:\<end\s\+type\>,' ..
\ s:not_end .. '\<select\>:\%(select\s\+\)\@<!\<case\%(\s\+\%(else\|is\)\)\=\>:\<end\s\+select\>,' ..
\ '\<do\>:\<loop\>,' ..
\ '\<for\>\%(\s\+\%(input\|output\|random\|append\|binary\)\)\@!:\<next\>,' ..
\ '\<while\>:\<wend\>,' ..
\ s:line_start .. 'if\%(.*\<then\s*\%($\|''\)\)\@=:\<\%(' .. s:line_start .. 'else\|elseif\)\>:\<end\s\+if\>,' ..
\ '\<lock\>:\<unlock\>'
let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string" || ' ..
\ 'strpart(getline("."), 0, col(".") ) =~? "\\<exit\\s\\+"'
unlet s:line_start s:not_end s:not_end_or_exit
endif
let b:undo_ftplugin = "setl fo< com< cms< sua<" .
\ " | unlet! b:browsefilter"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "BASIC Source Files (*.bas)\t*.bas\n" ..
\ "BASIC Include Files (*.bi, *.bm)\t*.bi;*.bm\n" ..
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl fo< com< cms<" ..
\ " | unlet! b:match_ignorecase b:match_skip b:match_words" ..
\ " | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:

View File

@ -1,13 +1,65 @@
" Vim filetype plugin file
" Language: FreeBasic
" Language: FreeBASIC
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2015 Jan 10
" Last Change: 2021 Mar 16
" Setup {{{1
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
runtime! ftplugin/basic.vim
" vim: ts=8
let s:dialect = freebasic#GetDialect()
" Comments {{{1
" add ''comments before 'comments
let &l:comments = "sO:*\ -,mO:*\ \ ,exO:*/,s1:/',mb:',ex:'/,:''," .. &l:comments
" Match words {{{1
if exists("loaded_matchit")
let s:not_end = '\%(end\s\+\)\@<!'
let b:match_words ..= ','
if s:dialect == 'fb'
let b:match_words ..= s:not_end .. '\<constructor\>:\<end\s\+constructor\>,' ..
\ s:not_end .. '\<destructor\>:\<end\s\+destructor\>,' ..
\ s:not_end .. '\<property\>:\<end\s\+property\>,' ..
\ s:not_end .. '\<operator\>:\<end\s\+operator\>,' ..
\ s:not_end .. '\<extern\%(\s\+"\)\@=:\<end\s\+extern\>,'
endif
if s:dialect == 'fb' || s:dialect == 'deprecated'
let b:match_words ..= s:not_end .. '\<scope\>:\<end\s\+scope\>,'
endif
if s:dialect == 'qb'
let b:match_words ..= s:not_end .. '\<__asm\>:\<end\s\+__asm\>,' ..
\ s:not_end .. '\<__union\>:\<end\s\+__union\>,' ..
\ s:not_end .. '\<__with\>:\<end\s\+__with\>,'
else
let b:match_words ..= s:not_end .. '\<asm\>:\<end\s\+asm\>,' ..
\ s:not_end .. '\<namespace\>:\<end\s\+namespace\>,' ..
\ s:not_end .. '\<union\>:\<end\s\+union\>,' ..
\ s:not_end .. '\<with\>:\<end\s\+with\>,'
endif
let b:match_words ..= s:not_end .. '\<enum\>:\<end\s\+enum\>,' ..
\ '^#\s*\%(if\|ifdef\|ifndef\)\>:^#\s*\%(else\|elseif\)\>:^#\s*endif\>,' ..
\ '^#\s*macro\>:^#\s*endmacro\>'
" skip "function = <retval>"
let b:match_skip ..= '|| strpart(getline("."), col(".") - 1) =~? "^\\<function\\s\\+="'
unlet s:not_end
endif
" Cleanup {{{1
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:

View File

@ -1,41 +0,0 @@
" Vim filetype plugin
" Language: generic git output
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2019 Dec 05
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
finish
endif
let b:did_ftplugin = 1
if !exists('b:git_dir')
if expand('%:p') =~# '[\/]\.git[\/]modules[\/]\|:[\/][\/]\|^\a\a\+:'
" Stay out of the way
elseif expand('%:p') =~# '[\/]\.git[\/]worktrees'
let b:git_dir = matchstr(expand('%:p'),'.*\.git[\/]worktrees[\/][^\/]\+\>')
elseif expand('%:p') =~# '\.git\>'
let b:git_dir = matchstr(expand('%:p'),'.*\.git\>')
elseif $GIT_DIR != ''
let b:git_dir = $GIT_DIR
endif
if (has('win32') || has('win64')) && exists('b:git_dir')
let b:git_dir = substitute(b:git_dir,'\\','/','g')
endif
endif
if exists('*shellescape') && exists('b:git_dir') && b:git_dir != ''
if b:git_dir =~# '/\.git$' " Not a bare repository
let &l:path = escape(fnamemodify(b:git_dir,':h'),'\, ').','.&l:path
endif
let &l:path = escape(b:git_dir,'\, ').','.&l:path
let &l:keywordprg = 'git --git-dir='.shellescape(b:git_dir).' show'
else
setlocal keywordprg=git\ show
endif
if has('gui_running')
let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','')
endif
setlocal includeexpr=substitute(v:fname,'^[^/]\\+/','','')
let b:undo_ftplugin = "setl keywordprg< path< includeexpr<"

View File

@ -1,66 +1,57 @@
" Vim filetype plugin
" Language: git commit file
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2019 Dec 05
" Last Change: 2022 Jan 05
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
finish
endif
runtime! ftplugin/git.vim
let b:did_ftplugin = 1
setlocal comments=:# commentstring=#\ %s
setlocal nomodeline tabstop=8 formatoptions+=tl textwidth=72
setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q formatoptions+=n
setlocal formatlistpat+=\\\|^\\s*[-*+]\\s\\+
setlocal include=^+++
setlocal includeexpr=substitute(v:fname,'^[bi]/','','')
let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions< tw< com< cms< formatlistpat<'
let b:undo_ftplugin = 'setl modeline< tabstop< formatoptions< tw< com< cms< formatlistpat< inc< inex<'
if exists("g:no_gitcommit_commands") || v:version < 700
let s:l = search('\C\m^[#;@!$%^&|:] -\{24,\} >8 -\{24,\}$', 'cnW', '', 100)
let &l:comments = ':' . (matchstr(getline(s:l ? s:l : '$'), '^[#;@!$%^&|:]\S\@!') . '#')[0]
let &l:commentstring = &l:comments[1] . ' %s'
unlet s:l
if exists("g:no_gitcommit_commands")
finish
endif
if !exists("b:git_dir")
let b:git_dir = expand("%:p:h")
endif
command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0, <f-args>)
let b:undo_ftplugin = b:undo_ftplugin . "|delc DiffGitCached"
function! s:diffcomplete(A,L,P)
function! s:diffcomplete(A, L, P) abort
let args = ""
if a:P <= match(a:L." -- "," -- ")+3
let args = args . "-p\n--stat\n--shortstat\n--summary\n--patch-with-stat\n--no-renames\n-B\n-M\n-C\n"
end
if exists("b:git_dir") && a:A !~ '^-'
let tree = fnamemodify(b:git_dir,':h')
if strpart(getcwd(),0,strlen(tree)) == tree
let args = args."\n".system("git diff --cached --name-only")
endif
if a:A !~ '^-' && !empty(getftype('.git'))
let args = args."\n".system("git diff --cached --name-only")
endif
return args
endfunction
function! s:gitdiffcached(bang,gitdir,...)
let tree = fnamemodify(a:gitdir,':h')
function! s:gitdiffcached(bang, ...) abort
let name = tempname()
let git = "git"
if strpart(getcwd(),0,strlen(tree)) != tree
let git .= " --git-dir=".(exists("*shellescape") ? shellescape(a:gitdir) : '"'.a:gitdir.'"')
endif
if a:0
let extra = join(map(copy(a:000),exists("*shellescape") ? 'shellescape(v:val)' : "'\"'.v:val.'\"'"))
let extra = join(map(copy(a:000), 'shellescape(v:val)'))
else
let extra = "-p --stat=".&columns
endif
call system(git." diff --cached --no-color --no-ext-diff ".extra." > ".(exists("*shellescape") ? shellescape(name) : name))
exe "pedit ".(exists("*fnameescape") ? fnameescape(name) : name)
call system("git diff --cached --no-color --no-ext-diff ".extra." > ".shellescape(name))
exe "pedit " . fnameescape(name)
wincmd P
let b:git_dir = a:gitdir
command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0,b:git_dir,<f-args>)
nnoremap <buffer> <silent> q :q<CR>
command! -bang -bar -buffer -complete=custom,s:diffcomplete -nargs=* DiffGitCached :call s:gitdiffcached(<bang>0, <f-args>)
setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=git
endfunction

View File

@ -1,22 +1,20 @@
" Vim filetype plugin
" Language: git rebase --interactive
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2019 Dec 05
" Last Change: 2022 Jan 05
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
finish
endif
runtime! ftplugin/git.vim
let b:did_ftplugin = 1
setlocal comments=:# commentstring=#\ %s formatoptions-=t
let &l:comments = ':' . (matchstr(getline('$'), '^[#;@!$%^&|:]\S\@!') . '#')[0]
let &l:commentstring = &l:comments[1] . ' %s'
setlocal formatoptions-=t
setlocal nomodeline
if !exists("b:undo_ftplugin")
let b:undo_ftplugin = ""
endif
let b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo< ml<"
let b:undo_ftplugin = "setl com< cms< fo< ml<"
function! s:choose(word) abort
s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e
@ -41,8 +39,7 @@ if exists("g:no_plugin_maps") || exists("g:no_gitrebase_maps")
finish
endif
nnoremap <buffer> <expr> K col('.') < 7 && expand('<Lt>cword>') =~ '\X' && getline('.') =~ '^\w\+\s\+\x\+\>' ? 'wK' : 'K'
nnoremap <buffer> <silent> <C-A> :<C-U><C-R>=v:count1<CR>Cycle<CR>
nnoremap <buffer> <silent> <C-X> :<C-U><C-R>=v:count1<CR>Cycle!<CR>
let b:undo_ftplugin = b:undo_ftplugin . "|exe 'nunmap <buffer> K'|exe 'nunmap <buffer> <C-A>'|exe 'nunmap <buffer> <C-X>'"
let b:undo_ftplugin = b:undo_ftplugin . "|exe 'nunmap <buffer> <C-A>'|exe 'nunmap <buffer> <C-X>'"

View File

@ -0,0 +1,13 @@
" Vim filetype plugin file
" Language: i3 config file
" Original Author: Mohamed Boughaba <mohamed dot bgb at gmail dot com>
" Maintainer: Quentin Hibon
" Version: 0.4
" Last Change: 2021 Dec 14
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
let b:undo_ftplugin = "setlocal cms<"
setlocal commentstring=#\ %s

26
runtime/ftplugin/qb64.vim Normal file
View File

@ -0,0 +1,26 @@
" Vim filetype plugin file
" Language: QB64
" Maintainer: Doug Kearns <dougkearns@gmail.com>
if exists("b:did_ftplugin")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
runtime! ftplugin/basic.vim
let s:not_end = '\%(end\s\+\)\@<!'
let b:match_words ..= ',' ..
\ s:not_end .. '\<declare\>:\<end\s\+declare\>,' ..
\ '\<select\s\+everycase\>:\%(select\s\+\)\@<!\<case\%(\s\+\%(else\|is\)\)\=\>:\<end\s\+select\>,' ..
\ '$IF\>:$\%(ELSEIF\|ELSE\)\>:$END\s*IF\>'
unlet s:not_end
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:

View File

@ -0,0 +1,37 @@
" Vim filetype plugin file
" Language: Microsoft Visual Studio Solution
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Dec 15
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=:#
setlocal commentstring=#\ %s
let b:undo_ftplugin = "setl com< cms<"
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_words =
\ '\<Project\>:\<EndProject\>,' ..
\ '\<ProjectSection\>:\<EndProjectSection\>,' ..
\ '\<Global\>:\<EndGlobal\>,' ..
\ '\<GlobalSection\>:\<EndGlobalSection\>'
let b:undo_ftplugin ..= " | unlet! b:match_words"
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Microsoft Visual Studio Solution Files\t*.sln\n" ..
\ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet:

View File

@ -18,13 +18,13 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl com< cms< fo< "
if executable('zsh')
if executable('zsh') && &shell !~# '/\%(nologin\|false\)$'
if !has('gui_running') && executable('less')
command! -buffer -nargs=1 RunHelp silent exe '!MANPAGER= zsh -ic "autoload -Uz run-help; run-help <args> 2>/dev/null | LESS= less"' | redraw!
command! -buffer -nargs=1 RunHelp silent exe '!MANPAGER= zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null | LESS= less"' | redraw!
elseif has('terminal')
command! -buffer -nargs=1 RunHelp silent exe ':term zsh -ic "autoload -Uz run-help; run-help <args>"'
command! -buffer -nargs=1 RunHelp silent exe ':term zsh -c "autoload -Uz run-help; run-help <args>"'
else
command! -buffer -nargs=1 RunHelp echo system('zsh -ic "autoload -Uz run-help; run-help <args> 2>/dev/null"')
command! -buffer -nargs=1 RunHelp echo system('zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
endif
if !exists('current_compiler')
compiler zsh

View File

@ -4,7 +4,9 @@
# Translators: This is the Application Name used in the GVim desktop file
Name[de]=GVim
Name[eo]=GVim
Name[fi]=GVim
Name[fr]=GVim
Name[ga]=GVim
Name[it]=GVim
Name[ru]=GVim
Name[sr]=GVim
@ -13,7 +15,9 @@ Name=GVim
# Translators: This is the Generic Application Name used in the Vim desktop file
GenericName[de]=Texteditor
GenericName[eo]=Tekstoredaktilo
GenericName[fi]=Tekstinmuokkain
GenericName[fr]=Éditeur de texte
GenericName[ga]=Eagarthóir Téacs
GenericName[it]=Editor di testi
GenericName[ja]=テキストエディタ
GenericName[ru]=Текстовый редактор
@ -23,7 +27,9 @@ GenericName=Text Editor
# Translators: This is the comment used in the Vim desktop file
Comment[de]=Textdateien bearbeiten
Comment[eo]=Redakti tekstajn dosierojn
Comment[fi]=Muokkaa tekstitiedostoja
Comment[fr]=Éditer des fichiers texte
Comment[ga]=Cuir comhaid téacs in eagar
Comment[it]=Edita file di testo
Comment[ja]=テキストファイルを編集します
Comment[ru]=Редактирование текстовых файлов
@ -54,8 +60,6 @@ Comment[es]=Edita archivos de texto
Comment[et]=Redigeeri tekstifaile
Comment[eu]=Editatu testu-fitxategiak
Comment[fa]=ویرایش پرونده‌های متنی
Comment[fi]=Muokkaa tekstitiedostoja
Comment[ga]=Eagar comhad Téacs
Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
Comment[he]=ערוך קבצי טקסט
Comment[hi]=पाठ फ़ाइलें संपादित करें
@ -103,7 +107,9 @@ Type=Application
# Translators: Search terms to find this application. Do NOT change the semicolons! The list MUST also end with a semicolon!
Keywords[de]=Text;Editor;
Keywords[eo]=Teksto;redaktilo;
Keywords[fi]=Teksti;muokkain;editori;
Keywords[fr]=Texte;éditeur;
Keywords[ga]=Téacs;eagarthóir;
Keywords[it]=Testo;editor;
Keywords[ja]=テキスト;エディタ;
Keywords[ru]=текст;текстовый редактор;

View File

@ -1,7 +1,7 @@
" Vim support file to switch on loading indent files for file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2008 Feb 22
" Last Change: 2022 Feb 04
if exists("did_indent_on")
finish
@ -10,22 +10,23 @@ let did_indent_on = 1
augroup filetypeindent
au FileType * call s:LoadIndent()
func! s:LoadIndent()
if exists("b:undo_indent")
exe b:undo_indent
unlet! b:undo_indent b:did_indent
endif
let s = expand("<amatch>")
if s != ""
if exists("b:did_indent")
unlet b:did_indent
endif
" When there is a dot it is used to separate filetype names. Thus for
" "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim".
for name in split(s, '\.')
exe 'runtime! indent/' . name . '.vim'
endfor
endif
endfunc
augroup END
def s:LoadIndent()
if exists("b:undo_indent")
exe b:undo_indent
unlet! b:undo_indent b:did_indent
endif
var s = expand("<amatch>")
if s != ""
if exists("b:did_indent")
unlet b:did_indent
endif
# When there is a dot it is used to separate filetype names. Thus for
# "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim".
for name in split(s, '\.')
exe 'runtime! indent/' .. name .. '.vim'
endfor
endif
enddef

11
runtime/indent/basic.vim Normal file
View File

@ -0,0 +1,11 @@
" Vim indent file
" Language: BASIC (QuickBASIC 4.5)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Jan 24
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
runtime! indent/vb.vim

View File

@ -0,0 +1,11 @@
" Vim indent file
" Language: FreeBASIC
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Jan 24
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
runtime! indent/vb.vim

View File

@ -1,7 +1,7 @@
" Vim indent script for HTML
" Maintainer: Bram Moolenaar
" Original Author: Andy Wokula <anwoku@yahoo.de>
" Last Change: 2021 Jun 13
" Last Change: 2022 Jan 31
" Version: 1.0 "{{{
" Description: HTML indent script with cached state for faster indenting on a
" range of lines.
@ -149,6 +149,15 @@ func HtmlIndent_CheckUserSettings()
let b:html_indent_line_limit = 200
endif
endif
if exists('b:html_indent_attribute')
let b:hi_attr_indent = b:html_indent_attribute
elseif exists('g:html_indent_attribute')
let b:hi_attr_indent = g:html_indent_attribute
else
let b:hi_attr_indent = 2
endif
endfunc "}}}
" Init Script Vars
@ -946,11 +955,11 @@ func s:InsideTag(foundHtmlString)
let idx = match(text, '<' . s:tagname . '\s\+\zs\w')
endif
if idx == -1
" after just "<tag" indent two levels more
" after just "<tag" indent two levels more by default
let idx = match(text, '<' . s:tagname . '$')
if idx >= 0
call cursor(lnum, idx + 1)
return virtcol('.') - 1 + shiftwidth() * 2
return virtcol('.') - 1 + shiftwidth() * b:hi_attr_indent
endif
endif
if idx > 0

11
runtime/indent/qb64.vim Normal file
View File

@ -0,0 +1,11 @@
" Vim indent file
" Language: QB64
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Jan 24
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
runtime! indent/vb.vim

View File

@ -109,7 +109,7 @@ function! GetShIndent()
let ind += s:indent_value('continuation-line')
endif
elseif s:end_block(line) && !s:start_block(line)
let ind -= s:indent_value('default')
let ind = indent(lnum)
elseif pnum != 0 &&
\ s:is_continuation_line(pline) &&
\ !s:end_block(curline) &&

View File

@ -1,4 +1,4 @@
" vim: set ft=html sw=4 :
" vim: set ft=html sw=4 ts=8 :
" START_INDENT
@ -41,6 +41,11 @@ dd text
dt text
</dt>
</dl>
<div
class="test"
style="color: yellow">
text
</div>
</body>
</html>
@ -50,6 +55,7 @@ dt text
% START_INDENT
% INDENT_EXE let g:html_indent_style1 = "inc"
% INDENT_EXE let g:html_indent_script1 = "zero"
% INDENT_EXE let g:html_indent_attribute = 1
% INDENT_EXE call HtmlIndent_CheckUserSettings()
<html>
<body>
@ -61,6 +67,11 @@ div#d2 { color: green; }
var v1 = "v1";
var v2 = "v2";
</script>
<div
class="test"
style="color: yellow">
text
</div>
</body>
</html>
% END_INDENT

View File

@ -1,4 +1,4 @@
" vim: set ft=html sw=4 :
" vim: set ft=html sw=4 ts=8 :
" START_INDENT
@ -41,6 +41,11 @@ div#d2 { color: green; }
dt text
</dt>
</dl>
<div
class="test"
style="color: yellow">
text
</div>
</body>
</html>
@ -50,6 +55,7 @@ div#d2 { color: green; }
% START_INDENT
% INDENT_EXE let g:html_indent_style1 = "inc"
% INDENT_EXE let g:html_indent_script1 = "zero"
% INDENT_EXE let g:html_indent_attribute = 1
% INDENT_EXE call HtmlIndent_CheckUserSettings()
<html>
<body>
@ -61,6 +67,11 @@ div#d2 { color: green; }
var v1 = "v1";
var v2 = "v2";
</script>
<div
class="test"
style="color: yellow">
text
</div>
</body>
</html>
% END_INDENT

View File

@ -1,7 +1,7 @@
" Vim indent file
" Language: Vim script
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Nov 03
" Last Change: 2021 Nov 27
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@ -12,6 +12,7 @@ let b:did_indent = 1
setlocal indentexpr=GetVimIndent()
setlocal indentkeys+==end,=},=else,=cat,=finall,=END,0\\,0=\"\\\
setlocal indentkeys-=0#
setlocal indentkeys-=:
let b:undo_indent = "setl indentkeys< indentexpr<"

View File

@ -39,6 +39,8 @@ setlocal indentkeys=o,O,*<Return>,<>>,<<>,/,{,},!^F
" autoindent: used when the indentexpr returns -1
setlocal autoindent
let b:undo_indent = "setl ai< inde< indk<"
if !exists('b:xml_indent_open')
let b:xml_indent_open = '.\{-}<[:A-Z_a-z]'
" pre tag, e.g. <address>
@ -51,6 +53,10 @@ if !exists('b:xml_indent_close')
" let b:xml_indent_close = '.\{-}</\(address\)\@!'
endif
if !exists('b:xml_indent_continuation_filetype')
let b:xml_indent_continuation_filetype = 'xml'
endif
let &cpo = s:keepcpo
unlet s:keepcpo
@ -162,7 +168,7 @@ endfun
func! <SID>IsXMLContinuation(line)
" Checks, whether or not the line matches a start-of-tag
return a:line !~ '^\s*<' && &ft is# 'xml'
return a:line !~ '^\s*<' && &ft =~# b:xml_indent_continuation_filetype
endfunc
func! <SID>HasNoTagEnd(line)

View File

@ -1,52 +1,54 @@
" Script to define the syntax menu in synmenu.vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2019 Dec 07
vim9script
" This is used by "make menu" in the src directory.
# Script to define the syntax menu in synmenu.vim
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last Change: 2022 Feb 04
# This is used by "make menu" in the src directory.
edit <sfile>:p:h/synmenu.vim
/The Start Of The Syntax Menu/+1,/The End Of The Syntax Menu/-1d
let s:lnum = line(".") - 1
call append(s:lnum, "")
let s:lnum = s:lnum + 1
:/The Start Of The Syntax Menu/+1,/The End Of The Syntax Menu/-1d
var lnum = line(".") - 1
call append(lnum, "")
lnum += 1
" Use the SynMenu command and function to define all menu entries
command! -nargs=* SynMenu call <SID>Syn(<q-args>)
# Use the SynMenu command and function to define all menu entries
command! -nargs=* SynMenu call Syn(<q-args>)
let s:cur_menu_name = ""
let s:cur_menu_nr = 0
let s:cur_menu_item = 0
let s:cur_menu_char = ""
var cur_menu_name = ""
var cur_menu_nr = 0
var cur_menu_item = 0
var cur_menu_char = ""
fun! <SID>Syn(arg)
" isolate menu name: until the first dot
let i = match(a:arg, '\.')
let menu_name = strpart(a:arg, 0, i)
let r = strpart(a:arg, i + 1, 999)
" isolate submenu name: until the colon
let i = match(r, ":")
let submenu_name = strpart(r, 0, i)
" after the colon is the syntax name
let syntax_name = strpart(r, i + 1, 999)
def Syn(arg: string)
# isolate menu name: until the first dot
var i = match(arg, '\.')
var menu_name = strpart(arg, 0, i)
var r = strpart(arg, i + 1, 999)
# isolate submenu name: until the colon
i = match(r, ":")
var submenu_name = strpart(r, 0, i)
# after the colon is the syntax name
var syntax_name = strpart(r, i + 1, 999)
if s:cur_menu_name != menu_name
let s:cur_menu_name = menu_name
let s:cur_menu_nr = s:cur_menu_nr + 10
let s:cur_menu_item = 100
let s:cur_menu_char = submenu_name[0]
if cur_menu_name != menu_name
cur_menu_name = menu_name
cur_menu_nr += 10
cur_menu_item = 100
cur_menu_char = submenu_name[0]
else
" When starting a new letter, insert a menu separator.
let c = submenu_name[0]
# When starting a new letter, insert a menu separator.
var c = submenu_name[0]
if c != s:cur_menu_char
exe 'an 50.' . s:cur_menu_nr . '.' . s:cur_menu_item . ' &Syntax.' . menu_name . ".-" . c . '- <nul>'
let s:cur_menu_item = s:cur_menu_item + 10
let s:cur_menu_char = c
exe 'an 50.' .. s:cur_menu_nr .. '.' .. s:cur_menu_item .. ' &Syntax.' .. menu_name .. ".-" .. c .. '- <nul>'
cur_menu_item += 10
cur_menu_char = c
endif
endif
call append(s:lnum, 'an 50.' . s:cur_menu_nr . '.' . s:cur_menu_item . ' &Syntax.' . menu_name . "." . submenu_name . ' :cal SetSyn("' . syntax_name . '")<CR>')
let s:cur_menu_item = s:cur_menu_item + 10
let s:lnum = s:lnum + 1
endfun
append(lnum, 'an 50.' .. s:cur_menu_nr .. '.' .. s:cur_menu_item .. ' &Syntax.' .. menu_name .. "." .. submenu_name .. ' :cal SetSyn("' .. syntax_name .. '")<CR>')
cur_menu_item += 10
lnum += 1
enddef
SynMenu AB.A2ps\ config:a2ps
SynMenu AB.Aap:aap
@ -676,6 +678,6 @@ SynMenu WXYZ.YAML:yaml
SynMenu WXYZ.Yacc:yacc
SynMenu WXYZ.Zimbu:zimbu
call append(s:lnum, "")
append(lnum, "")
wq

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Oct 28
" Last Change: 2021 Dec 21
" If there already is an option window, jump to that one.
let buf = bufnr('option-window')
@ -260,6 +260,8 @@ call <SID>OptionG("sect", &sect)
call <SID>AddOption("path", gettext("list of directory names used for file searching"))
call append("$", "\t" .. s:global_or_local)
call <SID>OptionG("pa", &pa)
call <SID>AddOption("cdhome", gettext(":cd without argument goes to the home directory"))
call <SID>BinOptionG("cdh", &cdh)
call <SID>AddOption("cdpath", gettext("list of directory names used for :cd"))
call <SID>OptionG("cd", &cd)
if exists("+autochdir")
@ -560,14 +562,22 @@ endif
call <SID>Header(gettext("terminal"))
call <SID>AddOption("term", gettext("name of the used terminal"))
call <SID>OptionG("term", &term)
call <SID>AddOption("ttytype", gettext("alias for 'term'"))
call <SID>OptionG("tty", &tty)
call <SID>AddOption("ttybuiltin", gettext("check built-in termcaps first"))
call <SID>BinOptionG("tbi", &tbi)
call <SID>AddOption("ttyfast", gettext("terminal connection is fast"))
call <SID>BinOptionG("tf", &tf)
call <SID>AddOption("xtermcodes", gettext("request terminal key codes when an xterm is detected"))
call <SID>BinOptionG("xtermcodes", &xtermcodes)
call <SID>AddOption("weirdinvert", gettext("terminal that requires extra redrawing"))
call <SID>BinOptionG("wiv", &wiv)
call <SID>AddOption("esckeys", gettext("recognize keys that start with <Esc> in Insert mode"))
call <SID>BinOptionG("ek", &ek)
call <SID>AddOption("scrolljump", gettext("minimal number of lines to scroll at a time"))

View File

@ -1,6 +1,11 @@
" matchit.vim: (global plugin) Extended "%" matching
" autload script of matchit plugin, see ../plugin/matchit.vim
" Last Change: Mar 01, 2020
" Last Change: Jun 10, 2021
" Neovim does not support scriptversion
if has("vimscript-4")
scriptversion 4
endif
let s:last_mps = ""
let s:last_words = ":"
@ -30,11 +35,11 @@ function s:RestoreOptions()
" In s:CleanUp(), :execute "set" restore_options .
let restore_options = ""
if get(b:, 'match_ignorecase', &ic) != &ic
let restore_options .= (&ic ? " " : " no") . "ignorecase"
let restore_options ..= (&ic ? " " : " no") .. "ignorecase"
let &ignorecase = b:match_ignorecase
endif
if &ve != ''
let restore_options = " ve=" . &ve . restore_options
let restore_options = " ve=" .. &ve .. restore_options
set ve=
endif
return restore_options
@ -42,22 +47,23 @@ endfunction
function matchit#Match_wrapper(word, forward, mode) range
let restore_options = s:RestoreOptions()
" If this function was called from Visual mode, make sure that the cursor
" is at the correct end of the Visual range:
if a:mode == "v"
execute "normal! gv\<Esc>"
elseif a:mode == "o" && mode(1) !~# '[vV]'
exe "norm! v"
elseif a:mode == "n" && mode(1) =~# 'ni'
exe "norm! v"
endif
" In s:CleanUp(), we may need to check whether the cursor moved forward.
let startpos = [line("."), col(".")]
" Use default behavior if called with a count.
" if a count has been applied, use the default [count]% mode (see :h N%)
if v:count
exe "normal! " . v:count . "%"
exe "normal! " .. v:count .. "%"
return s:CleanUp(restore_options, a:mode, startpos)
end
if a:mode =~# "v" && mode(1) =~# 'ni'
exe "norm! gv"
elseif a:mode == "o" && mode(1) !~# '[vV]'
exe "norm! v"
" If this function was called from Visual mode, make sure that the cursor
" is at the correct end of the Visual range:
elseif a:mode == "v"
execute "normal! gv\<Esc>"
let startpos = [line("."), col(".")]
endif
" First step: if not already done, set the script variables
" s:do_BR flag for whether there are backrefs
@ -78,30 +84,30 @@ function matchit#Match_wrapper(word, forward, mode) range
" quote the special chars in 'matchpairs', replace [,:] with \| and then
" append the builtin pairs (/*, */, #if, #ifdef, #ifndef, #else, #elif,
" #endif)
let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
let default = escape(&mps, '[$^.*~\\/?]') .. (strlen(&mps) ? "," : "") ..
\ '\/\*:\*\/,#\s*if\%(n\=def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
" s:all = pattern with all the keywords
let match_words = match_words . (strlen(match_words) ? "," : "") . default
let match_words = match_words .. (strlen(match_words) ? "," : "") .. default
let s:last_words = match_words
if match_words !~ s:notslash . '\\\d'
if match_words !~ s:notslash .. '\\\d'
let s:do_BR = 0
let s:pat = match_words
else
let s:do_BR = 1
let s:pat = s:ParseWords(match_words)
endif
let s:all = substitute(s:pat, s:notslash . '\zs[,:]\+', '\\|', 'g')
let s:all = substitute(s:pat, s:notslash .. '\zs[,:]\+', '\\|', 'g')
" Just in case there are too many '\(...)' groups inside the pattern, make
" sure to use \%(...) groups, so that error E872 can be avoided
let s:all = substitute(s:all, '\\(', '\\%(', 'g')
let s:all = '\%(' . s:all . '\)'
let s:all = '\%(' .. s:all .. '\)'
if exists("b:match_debug")
let b:match_pat = s:pat
endif
" Reconstruct the version with unresolved backrefs.
let s:patBR = substitute(match_words.',',
\ s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
let s:patBR = substitute(s:patBR, s:notslash.'\zs:\{2,}', ':', 'g')
let s:patBR = substitute(match_words .. ',',
\ s:notslash .. '\zs[,:]*,[,:]*', ',', 'g')
let s:patBR = substitute(s:patBR, s:notslash .. '\zs:\{2,}', ':', 'g')
endif
" Second step: set the following local variables:
@ -128,12 +134,15 @@ function matchit#Match_wrapper(word, forward, mode) range
let curcol = match(matchline, regexp)
" If there is no match, give up.
if curcol == -1
" Make sure macros abort properly
"exe "norm! \<esc>"
call feedkeys("\e", 'tni')
return s:CleanUp(restore_options, a:mode, startpos)
endif
let endcol = matchend(matchline, regexp)
let suf = strlen(matchline) - endcol
let prefix = (curcol ? '^.*\%' . (curcol + 1) . 'c\%(' : '^\%(')
let suffix = (suf ? '\)\%' . (endcol + 1) . 'c.*$' : '\)$')
let prefix = (curcol ? '^.*\%' .. (curcol + 1) .. 'c\%(' : '^\%(')
let suffix = (suf ? '\)\%' .. (endcol + 1) .. 'c.*$' : '\)$')
endif
if exists("b:match_debug")
let b:match_match = matchstr(matchline, regexp)
@ -150,7 +159,7 @@ function matchit#Match_wrapper(word, forward, mode) range
" 'while:endwhile' or whatever. A bit of a kluge: s:Choose() returns
" group . "," . groupBR, and we pick it apart.
let group = s:Choose(s:pat, matchline, ",", ":", prefix, suffix, s:patBR)
let i = matchend(group, s:notslash . ",")
let i = matchend(group, s:notslash .. ",")
let groupBR = strpart(group, i)
let group = strpart(group, 0, i-1)
" Now, matchline =~ prefix . substitute(group,':','\|','g') . suffix
@ -159,32 +168,32 @@ function matchit#Match_wrapper(word, forward, mode) range
endif
if exists("b:match_debug")
let b:match_wholeBR = groupBR
let i = matchend(groupBR, s:notslash . ":")
let i = matchend(groupBR, s:notslash .. ":")
let b:match_iniBR = strpart(groupBR, 0, i-1)
endif
" Fourth step: Set the arguments for searchpair().
let i = matchend(group, s:notslash . ":")
let j = matchend(group, '.*' . s:notslash . ":")
let i = matchend(group, s:notslash .. ":")
let j = matchend(group, '.*' .. s:notslash .. ":")
let ini = strpart(group, 0, i-1)
let mid = substitute(strpart(group, i,j-i-1), s:notslash.'\zs:', '\\|', 'g')
let mid = substitute(strpart(group, i,j-i-1), s:notslash .. '\zs:', '\\|', 'g')
let fin = strpart(group, j)
"Un-escape the remaining , and : characters.
let ini = substitute(ini, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
let mid = substitute(mid, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
let fin = substitute(fin, s:notslash . '\zs\\\(:\|,\)', '\1', 'g')
let ini = substitute(ini, s:notslash .. '\zs\\\(:\|,\)', '\1', 'g')
let mid = substitute(mid, s:notslash .. '\zs\\\(:\|,\)', '\1', 'g')
let fin = substitute(fin, s:notslash .. '\zs\\\(:\|,\)', '\1', 'g')
" searchpair() requires that these patterns avoid \(\) groups.
let ini = substitute(ini, s:notslash . '\zs\\(', '\\%(', 'g')
let mid = substitute(mid, s:notslash . '\zs\\(', '\\%(', 'g')
let fin = substitute(fin, s:notslash . '\zs\\(', '\\%(', 'g')
let ini = substitute(ini, s:notslash .. '\zs\\(', '\\%(', 'g')
let mid = substitute(mid, s:notslash .. '\zs\\(', '\\%(', 'g')
let fin = substitute(fin, s:notslash .. '\zs\\(', '\\%(', 'g')
" Set mid. This is optimized for readability, not micro-efficiency!
if a:forward && matchline =~ prefix . fin . suffix
\ || !a:forward && matchline =~ prefix . ini . suffix
if a:forward && matchline =~ prefix .. fin .. suffix
\ || !a:forward && matchline =~ prefix .. ini .. suffix
let mid = ""
endif
" Set flag. This is optimized for readability, not micro-efficiency!
if a:forward && matchline =~ prefix . fin . suffix
\ || !a:forward && matchline !~ prefix . ini . suffix
if a:forward && matchline =~ prefix .. fin .. suffix
\ || !a:forward && matchline !~ prefix .. ini .. suffix
let flag = "bW"
else
let flag = "W"
@ -193,14 +202,14 @@ function matchit#Match_wrapper(word, forward, mode) range
if exists("b:match_skip")
let skip = b:match_skip
elseif exists("b:match_comment") " backwards compatibility and testing!
let skip = "r:" . b:match_comment
let skip = "r:" .. b:match_comment
else
let skip = 's:comment\|string'
endif
let skip = s:ParseSkip(skip)
if exists("b:match_debug")
let b:match_ini = ini
let b:match_tail = (strlen(mid) ? mid.'\|' : '') . fin
let b:match_tail = (strlen(mid) ? mid .. '\|' : '') .. fin
endif
" Fifth step: actually start moving the cursor and call searchpair().
@ -210,25 +219,29 @@ function matchit#Match_wrapper(word, forward, mode) range
if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on"))
let skip = "0"
else
execute "if " . skip . "| let skip = '0' | endif"
execute "if " .. skip .. "| let skip = '0' | endif"
endif
let sp_return = searchpair(ini, mid, fin, flag, skip)
if &selection isnot# 'inclusive' && a:mode == 'v'
" move cursor one pos to the right, because selection is not inclusive
" add virtualedit=onemore, to make it work even when the match ends the " line
" add virtualedit=onemore, to make it work even when the match ends the
" line
if !(col('.') < col('$')-1)
set ve=onemore
let eolmark=1 " flag to set a mark on eol (since we cannot move there)
endif
norm! l
endif
let final_position = "call cursor(" . line(".") . "," . col(".") . ")"
let final_position = "call cursor(" .. line(".") .. "," .. col(".") .. ")"
" Restore cursor position and original screen.
call winrestview(view)
normal! m'
if sp_return > 0
execute final_position
endif
return s:CleanUp(restore_options, a:mode, startpos, mid.'\|'.fin)
if exists('eolmark') && eolmark
call setpos("''", [0, line('.'), col('$'), 0]) " set mark on the eol
endif
return s:CleanUp(restore_options, a:mode, startpos, mid .. '\|' .. fin)
endfun
" Restore options and do some special handling for Operator-pending mode.
@ -270,16 +283,16 @@ endfun
" a:matchline = "123<tag>12" or "123</tag>12"
" then extract "tag" from a:matchline and return "<tag>:</tag>" .
fun! s:InsertRefs(groupBR, prefix, group, suffix, matchline)
if a:matchline !~ a:prefix .
\ substitute(a:group, s:notslash . '\zs:', '\\|', 'g') . a:suffix
if a:matchline !~ a:prefix ..
\ substitute(a:group, s:notslash .. '\zs:', '\\|', 'g') .. a:suffix
return a:group
endif
let i = matchend(a:groupBR, s:notslash . ':')
let i = matchend(a:groupBR, s:notslash .. ':')
let ini = strpart(a:groupBR, 0, i-1)
let tailBR = strpart(a:groupBR, i)
let word = s:Choose(a:group, a:matchline, ":", "", a:prefix, a:suffix,
\ a:groupBR)
let i = matchend(word, s:notslash . ":")
let i = matchend(word, s:notslash .. ":")
let wordBR = strpart(word, i)
let word = strpart(word, 0, i-1)
" Now, a:matchline =~ a:prefix . word . a:suffix
@ -289,10 +302,10 @@ fun! s:InsertRefs(groupBR, prefix, group, suffix, matchline)
let table = ""
let d = 0
while d < 10
if tailBR =~ s:notslash . '\\' . d
let table = table . d
if tailBR =~ s:notslash .. '\\' .. d
let table = table .. d
else
let table = table . "-"
let table = table .. "-"
endif
let d = d + 1
endwhile
@ -300,13 +313,13 @@ fun! s:InsertRefs(groupBR, prefix, group, suffix, matchline)
let d = 9
while d
if table[d] != "-"
let backref = substitute(a:matchline, a:prefix.word.a:suffix,
\ '\'.table[d], "")
let backref = substitute(a:matchline, a:prefix .. word .. a:suffix,
\ '\' .. table[d], "")
" Are there any other characters that should be escaped?
let backref = escape(backref, '*,:')
execute s:Ref(ini, d, "start", "len")
let ini = strpart(ini, 0, start) . backref . strpart(ini, start+len)
let tailBR = substitute(tailBR, s:notslash . '\zs\\' . d,
let ini = strpart(ini, 0, start) .. backref .. strpart(ini, start+len)
let tailBR = substitute(tailBR, s:notslash .. '\zs\\' .. d,
\ escape(backref, '\\&'), 'g')
endif
let d = d-1
@ -320,7 +333,7 @@ fun! s:InsertRefs(groupBR, prefix, group, suffix, matchline)
let b:match_word = ""
endif
endif
return ini . ":" . tailBR
return ini .. ":" .. tailBR
endfun
" Input a comma-separated list of groups with backrefs, such as
@ -328,25 +341,25 @@ endfun
" and return a comma-separated list of groups with backrefs replaced:
" return '\(foo\):end\(foo\),\(bar\):end\(bar\)'
fun! s:ParseWords(groups)
let groups = substitute(a:groups.",", s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
let groups = substitute(groups, s:notslash . '\zs:\{2,}', ':', 'g')
let groups = substitute(a:groups .. ",", s:notslash .. '\zs[,:]*,[,:]*', ',', 'g')
let groups = substitute(groups, s:notslash .. '\zs:\{2,}', ':', 'g')
let parsed = ""
while groups =~ '[^,:]'
let i = matchend(groups, s:notslash . ':')
let j = matchend(groups, s:notslash . ',')
let i = matchend(groups, s:notslash .. ':')
let j = matchend(groups, s:notslash .. ',')
let ini = strpart(groups, 0, i-1)
let tail = strpart(groups, i, j-i-1) . ":"
let tail = strpart(groups, i, j-i-1) .. ":"
let groups = strpart(groups, j)
let parsed = parsed . ini
let i = matchend(tail, s:notslash . ':')
let parsed = parsed .. ini
let i = matchend(tail, s:notslash .. ':')
while i != -1
" In 'if:else:endif', ini='if' and word='else' and then word='endif'.
let word = strpart(tail, 0, i-1)
let tail = strpart(tail, i)
let i = matchend(tail, s:notslash . ':')
let parsed = parsed . ":" . s:Resolve(ini, word, "word")
let i = matchend(tail, s:notslash .. ':')
let parsed = parsed .. ":" .. s:Resolve(ini, word, "word")
endwhile " Now, tail has been used up.
let parsed = parsed . ","
let parsed = parsed .. ","
endwhile " groups =~ '[^,:]'
let parsed = substitute(parsed, ',$', '', '')
return parsed
@ -364,14 +377,14 @@ endfun
" let j = matchend(getline("."), regexp)
" let match = matchstr(getline("."), regexp)
fun! s:Wholematch(string, pat, start)
let group = '\%(' . a:pat . '\)'
let prefix = (a:start ? '\(^.*\%<' . (a:start + 2) . 'c\)\zs' : '^')
let group = '\%(' .. a:pat .. '\)'
let prefix = (a:start ? '\(^.*\%<' .. (a:start + 2) .. 'c\)\zs' : '^')
let len = strlen(a:string)
let suffix = (a:start+1 < len ? '\(\%>'.(a:start+1).'c.*$\)\@=' : '$')
if a:string !~ prefix . group . suffix
let suffix = (a:start+1 < len ? '\(\%>' .. (a:start+1) .. 'c.*$\)\@=' : '$')
if a:string !~ prefix .. group .. suffix
let prefix = ''
endif
return prefix . group . suffix
return prefix .. group .. suffix
endfun
" No extra arguments: s:Ref(string, d) will
@ -392,7 +405,7 @@ fun! s:Ref(string, d, ...)
let match = a:string
while cnt
let cnt = cnt - 1
let index = matchend(match, s:notslash . '\\(')
let index = matchend(match, s:notslash .. '\\(')
if index == -1
return ""
endif
@ -404,7 +417,7 @@ fun! s:Ref(string, d, ...)
endif
let cnt = 1
while cnt
let index = matchend(match, s:notslash . '\\(\|\\)') - 1
let index = matchend(match, s:notslash .. '\\(\|\\)') - 1
if index == -2
return ""
endif
@ -418,7 +431,7 @@ fun! s:Ref(string, d, ...)
if a:0 == 1
return len
elseif a:0 == 2
return "let " . a:1 . "=" . start . "| let " . a:2 . "=" . len
return "let " .. a:1 .. "=" .. start .. "| let " .. a:2 .. "=" .. len
else
return strpart(a:string, start, len)
endif
@ -431,9 +444,9 @@ endfun
fun! s:Count(string, pattern, ...)
let pat = escape(a:pattern, '\\')
if a:0 > 1
let foo = substitute(a:string, '[^'.a:pattern.']', "a:1", "g")
let foo = substitute(a:string, '[^' .. a:pattern .. ']', "a:1", "g")
let foo = substitute(a:string, pat, a:2, "g")
let foo = substitute(foo, '[^' . a:2 . ']', "", "g")
let foo = substitute(foo, '[^' .. a:2 .. ']', "", "g")
return strlen(foo)
endif
let result = 0
@ -456,7 +469,7 @@ endfun
" unless it is preceded by "\".
fun! s:Resolve(source, target, output)
let word = a:target
let i = matchend(word, s:notslash . '\\\d') - 1
let i = matchend(word, s:notslash .. '\\\d') - 1
let table = "----------"
while i != -2 " There are back references to be replaced.
let d = word[i]
@ -477,28 +490,28 @@ fun! s:Resolve(source, target, output)
if table[s] == "-"
if w + b < 10
" let table[s] = w + b
let table = strpart(table, 0, s) . (w+b) . strpart(table, s+1)
let table = strpart(table, 0, s) .. (w+b) .. strpart(table, s+1)
endif
let b = b + 1
let s = s + 1
else
execute s:Ref(backref, b, "start", "len")
let ref = strpart(backref, start, len)
let backref = strpart(backref, 0, start) . ":". table[s]
\ . strpart(backref, start+len)
let backref = strpart(backref, 0, start) .. ":" .. table[s]
\ .. strpart(backref, start+len)
let s = s + s:Count(substitute(ref, '\\\\', '', 'g'), '\(', '1')
endif
endwhile
let word = strpart(word, 0, i-1) . backref . strpart(word, i+1)
let i = matchend(word, s:notslash . '\\\d') - 1
let word = strpart(word, 0, i-1) .. backref .. strpart(word, i+1)
let i = matchend(word, s:notslash .. '\\\d') - 1
endwhile
let word = substitute(word, s:notslash . '\zs:', '\\', 'g')
let word = substitute(word, s:notslash .. '\zs:', '\\', 'g')
if a:output == "table"
return table
elseif a:output == "word"
return word
else
return table . word
return table .. word
endif
endfun
@ -508,21 +521,21 @@ endfun
" If <patn> is the first pattern that matches a:string then return <patn>
" if no optional arguments are given; return <patn>,<altn> if a:1 is given.
fun! s:Choose(patterns, string, comma, branch, prefix, suffix, ...)
let tail = (a:patterns =~ a:comma."$" ? a:patterns : a:patterns . a:comma)
let i = matchend(tail, s:notslash . a:comma)
let tail = (a:patterns =~ a:comma .. "$" ? a:patterns : a:patterns .. a:comma)
let i = matchend(tail, s:notslash .. a:comma)
if a:0
let alttail = (a:1 =~ a:comma."$" ? a:1 : a:1 . a:comma)
let j = matchend(alttail, s:notslash . a:comma)
let alttail = (a:1 =~ a:comma .. "$" ? a:1 : a:1 .. a:comma)
let j = matchend(alttail, s:notslash .. a:comma)
endif
let current = strpart(tail, 0, i-1)
if a:branch == ""
let currpat = current
else
let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g')
let currpat = substitute(current, s:notslash .. a:branch, '\\|', 'g')
endif
while a:string !~ a:prefix . currpat . a:suffix
while a:string !~ a:prefix .. currpat .. a:suffix
let tail = strpart(tail, i)
let i = matchend(tail, s:notslash . a:comma)
let i = matchend(tail, s:notslash .. a:comma)
if i == -1
return -1
endif
@ -530,15 +543,15 @@ fun! s:Choose(patterns, string, comma, branch, prefix, suffix, ...)
if a:branch == ""
let currpat = current
else
let currpat = substitute(current, s:notslash . a:branch, '\\|', 'g')
let currpat = substitute(current, s:notslash .. a:branch, '\\|', 'g')
endif
if a:0
let alttail = strpart(alttail, j)
let j = matchend(alttail, s:notslash . a:comma)
let j = matchend(alttail, s:notslash .. a:comma)
endif
endwhile
if a:0
let current = current . a:comma . strpart(alttail, 0, j-1)
let current = current .. a:comma .. strpart(alttail, 0, j-1)
endif
return current
endfun
@ -562,7 +575,7 @@ fun! matchit#Match_debug()
" fin = 'endif' piece, with all backrefs resolved from match
amenu &Matchit.&word :echo b:match_word<CR>
" '\'.d in ini refers to the same thing as '\'.table[d] in word.
amenu &Matchit.t&able :echo '0:' . b:match_table . ':9'<CR>
amenu &Matchit.t&able :echo '0:' .. b:match_table .. ':9'<CR>
endfun
" Jump to the nearest unmatched "(" or "if" or "<tag>" if a:spflag == "bW"
@ -598,26 +611,26 @@ fun! matchit#MultiMatch(spflag, mode)
endif
if (match_words != s:last_words) || (&mps != s:last_mps) ||
\ exists("b:match_debug")
let default = escape(&mps, '[$^.*~\\/?]') . (strlen(&mps) ? "," : "") .
let default = escape(&mps, '[$^.*~\\/?]') .. (strlen(&mps) ? "," : "") ..
\ '\/\*:\*\/,#\s*if\%(n\=def\)\=:#\s*else\>:#\s*elif\>:#\s*endif\>'
let s:last_mps = &mps
let match_words = match_words . (strlen(match_words) ? "," : "") . default
let match_words = match_words .. (strlen(match_words) ? "," : "") .. default
let s:last_words = match_words
if match_words !~ s:notslash . '\\\d'
if match_words !~ s:notslash .. '\\\d'
let s:do_BR = 0
let s:pat = match_words
else
let s:do_BR = 1
let s:pat = s:ParseWords(match_words)
endif
let s:all = '\%(' . substitute(s:pat, '[,:]\+', '\\|', 'g') . '\)'
let s:all = '\%(' .. substitute(s:pat, '[,:]\+', '\\|', 'g') .. '\)'
if exists("b:match_debug")
let b:match_pat = s:pat
endif
" Reconstruct the version with unresolved backrefs.
let s:patBR = substitute(match_words.',',
\ s:notslash.'\zs[,:]*,[,:]*', ',', 'g')
let s:patBR = substitute(s:patBR, s:notslash.'\zs:\{2,}', ':', 'g')
let s:patBR = substitute(match_words .. ',',
\ s:notslash .. '\zs[,:]*,[,:]*', ',', 'g')
let s:patBR = substitute(s:patBR, s:notslash .. '\zs:\{2,}', ':', 'g')
endif
" Second step: figure out the patterns for searchpair()
@ -625,23 +638,23 @@ fun! matchit#MultiMatch(spflag, mode)
" - TODO: A lot of this is copied from matchit#Match_wrapper().
" - maybe even more functionality should be split off
" - into separate functions!
let openlist = split(s:pat . ',', s:notslash . '\zs:.\{-}' . s:notslash . ',')
let midclolist = split(',' . s:pat, s:notslash . '\zs,.\{-}' . s:notslash . ':')
call map(midclolist, {-> split(v:val, s:notslash . ':')})
let openlist = split(s:pat .. ',', s:notslash .. '\zs:.\{-}' .. s:notslash .. ',')
let midclolist = split(',' .. s:pat, s:notslash .. '\zs,.\{-}' .. s:notslash .. ':')
call map(midclolist, {-> split(v:val, s:notslash .. ':')})
let closelist = []
let middlelist = []
call map(midclolist, {i,v -> [extend(closelist, v[-1 : -1]),
\ extend(middlelist, v[0 : -2])]})
call map(openlist, {i,v -> v =~# s:notslash . '\\|' ? '\%(' . v . '\)' : v})
call map(middlelist, {i,v -> v =~# s:notslash . '\\|' ? '\%(' . v . '\)' : v})
call map(closelist, {i,v -> v =~# s:notslash . '\\|' ? '\%(' . v . '\)' : v})
call map(openlist, {i,v -> v =~# s:notslash .. '\\|' ? '\%(' .. v .. '\)' : v})
call map(middlelist, {i,v -> v =~# s:notslash .. '\\|' ? '\%(' .. v .. '\)' : v})
call map(closelist, {i,v -> v =~# s:notslash .. '\\|' ? '\%(' .. v .. '\)' : v})
let open = join(openlist, ',')
let middle = join(middlelist, ',')
let close = join(closelist, ',')
if exists("b:match_skip")
let skip = b:match_skip
elseif exists("b:match_comment") " backwards compatibility and testing!
let skip = "r:" . b:match_comment
let skip = "r:" .. b:match_comment
else
let skip = 's:comment\|string'
endif
@ -650,18 +663,18 @@ fun! matchit#MultiMatch(spflag, mode)
" Third step: call searchpair().
" Replace '\('--but not '\\('--with '\%(' and ',' with '\|'.
let openpat = substitute(open, '\%(' . s:notslash . '\)\@<=\\(', '\\%(', 'g')
let openpat = substitute(open, '\%(' .. s:notslash .. '\)\@<=\\(', '\\%(', 'g')
let openpat = substitute(openpat, ',', '\\|', 'g')
let closepat = substitute(close, '\%(' . s:notslash . '\)\@<=\\(', '\\%(', 'g')
let closepat = substitute(close, '\%(' .. s:notslash .. '\)\@<=\\(', '\\%(', 'g')
let closepat = substitute(closepat, ',', '\\|', 'g')
let middlepat = substitute(middle, '\%(' . s:notslash . '\)\@<=\\(', '\\%(', 'g')
let middlepat = substitute(middle, '\%(' .. s:notslash .. '\)\@<=\\(', '\\%(', 'g')
let middlepat = substitute(middlepat, ',', '\\|', 'g')
if skip =~ 'synID' && !(has("syntax") && exists("g:syntax_on"))
let skip = '0'
else
try
execute "if " . skip . "| let skip = '0' | endif"
execute "if " .. skip .. "| let skip = '0' | endif"
catch /^Vim\%((\a\+)\)\=:E363/
" We won't find anything, so skip searching, should keep Vim responsive.
return {}
@ -744,15 +757,15 @@ fun! s:ParseSkip(str)
let skip = a:str
if skip[1] == ":"
if skip[0] == "s"
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" .
\ strpart(skip,2) . "'"
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" ..
\ strpart(skip,2) .. "'"
elseif skip[0] == "S"
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" .
\ strpart(skip,2) . "'"
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" ..
\ strpart(skip,2) .. "'"
elseif skip[0] == "r"
let skip = "strpart(getline('.'),0,col('.'))=~'" . strpart(skip,2). "'"
let skip = "strpart(getline('.'),0,col('.'))=~'" .. strpart(skip,2) .. "'"
elseif skip[0] == "R"
let skip = "strpart(getline('.'),0,col('.'))!~'" . strpart(skip,2). "'"
let skip = "strpart(getline('.'),0,col('.'))!~'" .. strpart(skip,2) .. "'"
endif
endif
return skip

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: 2021 Nov 13
For Vim version 8.2. Last change: 2021 Dec 24
VIM REFERENCE MANUAL by Benji Fisher et al
@ -148,6 +148,13 @@ To use the matchit plugin add this line to your |vimrc|: >
The script should start working the next time you start Vim.
To use the matching plugin after startup, you can use this command (note the
omitted '!'): >
packadd matchit
To use the matchit plugin after Vim has started, execute this command: >
packadd matchit
(Earlier versions of the script did nothing unless a |buffer-variable| named
|b:match_words| was defined. Even earlier versions contained autocommands
that set this variable for various file types. Now, |b:match_words| is
@ -376,8 +383,8 @@ The back reference '\'.d refers to the same thing as '\'.b:match_table[d] in
5. Known Bugs and Limitations *matchit-bugs*
Repository: https://github.com/chrisbra/matchit/
Bugs can be reported at the repository (alternatively you can send me a mail).
The latest development snapshot can also be downloaded there.
Bugs can be reported at the repository and the latest development snapshot can
also be downloaded there.
Just because I know about a bug does not mean that it is on my todo list. I
try to respond to reports of bugs that cause real problems. If it does not

View File

@ -1,7 +1,7 @@
" matchit.vim: (global plugin) Extended "%" matching
" Maintainer: Christian Brabandt
" Version: 1.17
" Last Change: 2019 Oct 24
" Version: 1.18
" Last Change: 2020 Dec 23
" Repository: https://github.com/chrisbra/matchit
" Previous URL:http://www.vim.org/script.php?script_id=39
" Previous Maintainer: Benji Fisher PhD <benji@member.AMS.org>
@ -48,18 +48,12 @@ set cpo&vim
nnoremap <silent> <Plug>(MatchitNormalForward) :<C-U>call matchit#Match_wrapper('',1,'n')<CR>
nnoremap <silent> <Plug>(MatchitNormalBackward) :<C-U>call matchit#Match_wrapper('',0,'n')<CR>
xnoremap <silent> <Plug>(MatchitVisualForward) :<C-U>call matchit#Match_wrapper('',1,'v')<CR>m'gv``
xnoremap <silent> <Plug>(MatchitVisualForward) :<C-U>call matchit#Match_wrapper('',1,'v')<CR>
\:if col("''") != col("$") \| exe ":normal! m'" \| endif<cr>gv``
xnoremap <silent> <Plug>(MatchitVisualBackward) :<C-U>call matchit#Match_wrapper('',0,'v')<CR>m'gv``
onoremap <silent> <Plug>(MatchitOperationForward) :<C-U>call matchit#Match_wrapper('',1,'o')<CR>
onoremap <silent> <Plug>(MatchitOperationBackward) :<C-U>call matchit#Match_wrapper('',0,'o')<CR>
nmap <silent> % <Plug>(MatchitNormalForward)
nmap <silent> g% <Plug>(MatchitNormalBackward)
xmap <silent> % <Plug>(MatchitVisualForward)
xmap <silent> g% <Plug>(MatchitVisualBackward)
omap <silent> % <Plug>(MatchitOperationForward)
omap <silent> g% <Plug>(MatchitOperationBackward)
" Analogues of [{ and ]} using matching patterns:
nnoremap <silent> <Plug>(MatchitNormalMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>
nnoremap <silent> <Plug>(MatchitNormalMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>
@ -68,16 +62,28 @@ xnoremap <silent> <Plug>(MatchitVisualMultiForward) :<C-U>call matchit#Multi
onoremap <silent> <Plug>(MatchitOperationMultiBackward) :<C-U>call matchit#MultiMatch("bW", "o")<CR>
onoremap <silent> <Plug>(MatchitOperationMultiForward) :<C-U>call matchit#MultiMatch("W", "o")<CR>
nmap <silent> [% <Plug>(MatchitNormalMultiBackward)
nmap <silent> ]% <Plug>(MatchitNormalMultiForward)
xmap <silent> [% <Plug>(MatchitVisualMultiBackward)
xmap <silent> ]% <Plug>(MatchitVisualMultiForward)
omap <silent> [% <Plug>(MatchitOperationMultiBackward)
omap <silent> ]% <Plug>(MatchitOperationMultiForward)
" text object:
xmap <silent> <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward)
xmap a% <Plug>(MatchitVisualTextObject)
if !exists("g:no_plugin_maps")
nmap <silent> % <Plug>(MatchitNormalForward)
nmap <silent> g% <Plug>(MatchitNormalBackward)
xmap <silent> % <Plug>(MatchitVisualForward)
xmap <silent> g% <Plug>(MatchitVisualBackward)
omap <silent> % <Plug>(MatchitOperationForward)
omap <silent> g% <Plug>(MatchitOperationBackward)
" Analogues of [{ and ]} using matching patterns:
nmap <silent> [% <Plug>(MatchitNormalMultiBackward)
nmap <silent> ]% <Plug>(MatchitNormalMultiForward)
xmap <silent> [% <Plug>(MatchitVisualMultiBackward)
xmap <silent> ]% <Plug>(MatchitVisualMultiForward)
omap <silent> [% <Plug>(MatchitOperationMultiBackward)
omap <silent> ]% <Plug>(MatchitOperationMultiForward)
" Text object
xmap a% <Plug>(MatchitVisualTextObject)
endif
" Call this function to turn on debugging information. Every time the main
" script is run, buffer variables will be saved. These can be used directly

View File

@ -2,7 +2,7 @@
"
" Author: Bram Moolenaar
" Copyright: Vim license applies, see ":help license"
" Last Change: 2021 Nov 27
" Last Change: 2022 Jan 17
"
" WORK IN PROGRESS - Only the basics work
" Note: On MS-Windows you need a recent version of gdb. The one included with
@ -98,6 +98,10 @@ call s:Highlight(1, '', &background)
hi default debugBreakpoint term=reverse ctermbg=red guibg=red
hi default debugBreakpointDisabled term=reverse ctermbg=gray guibg=gray
func s:GetCommand()
return type(g:termdebugger) == v:t_list ? copy(g:termdebugger) : [g:termdebugger]
endfunc
func s:StartDebug(bang, ...)
" First argument is the command to debug, second core file or process ID.
call s:StartDebug_internal({'gdb_args': a:000, 'bang': a:bang})
@ -113,8 +117,9 @@ func s:StartDebug_internal(dict)
echoerr 'Terminal debugger already running, cannot run two'
return
endif
if !executable(g:termdebugger)
echoerr 'Cannot execute debugger program "' .. g:termdebugger .. '"'
let gdbcmd = s:GetCommand()
if !executable(gdbcmd[0])
echoerr 'Cannot execute debugger program "' .. gdbcmd[0] .. '"'
return
endif
@ -142,7 +147,7 @@ func s:StartDebug_internal(dict)
if &columns < g:termdebug_wide
let s:save_columns = &columns
let &columns = g:termdebug_wide
" If we make the Vim window wider, use the whole left halve for the debug
" If we make the Vim window wider, use the whole left half for the debug
" windows.
let s:allleft = 1
endif
@ -188,7 +193,7 @@ endfunc
func s:CheckGdbRunning()
let gdbproc = term_getjob(s:gdbbuf)
if gdbproc == v:null || job_status(gdbproc) !=# 'run'
echoerr string(g:termdebugger) . ' exited unexpectedly'
echoerr string(s:GetCommand()[0]) . ' exited unexpectedly'
call s:CloseBuffers()
return ''
endif
@ -233,7 +238,7 @@ func s:StartDebug_term(dict)
let gdb_args = get(a:dict, 'gdb_args', [])
let proc_args = get(a:dict, 'proc_args', [])
let gdb_cmd = [g:termdebugger]
let gdb_cmd = s:GetCommand()
" Add -quiet to avoid the intro message causing a hit-enter prompt.
let gdb_cmd += ['-quiet']
" Disable pagination, it causes everything to stop at the gdb
@ -364,7 +369,7 @@ func s:StartDebug_prompt(dict)
let gdb_args = get(a:dict, 'gdb_args', [])
let proc_args = get(a:dict, 'proc_args', [])
let gdb_cmd = [g:termdebugger]
let gdb_cmd = s:GetCommand()
" Add -quiet to avoid the intro message causing a hit-enter prompt.
let gdb_cmd += ['-quiet']
" Disable pagination, it causes everything to stop at the gdb, needs to be run early
@ -421,7 +426,7 @@ func s:StartDebug_prompt(dict)
call s:SendCommand('set env COLORS = ' . &t_Co)
call s:SendCommand('set env VIM_TERMINAL = ' . v:version)
else
" TODO: open a new terminal get get the tty name, pass on to gdb
" TODO: open a new terminal, get the tty name, pass on to gdb
call s:SendCommand('show inferior-tty')
endif
call s:SendCommand('set print pretty on')
@ -479,7 +484,7 @@ func s:StartDebugCommon(dict)
" Run the command if the bang attribute was given and got to the debug
" window.
if get(a:dict, 'bang', 0)
call s:SendCommand('-exec-run')
call s:SendResumingCommand('-exec-run')
call win_gotoid(s:ptywin)
endif
endfunc
@ -512,9 +517,14 @@ func TermDebugSendCommand(cmd)
endif
endfunc
" Send a command only when stopped. Used for :Next and :Step.
func s:SendCommandIfStopped(cmd)
" Send a command that resumes the program. If the program isn't stopped the
" command is not sent (to avoid a repeated command to cause trouble).
" If the command is sent then reset s:stopped.
func s:SendResumingCommand(cmd)
if s:stopped
" reset s:stopped here, it may take a bit of time before we get a response
let s:stopped = 0
call ch_log('assume that program is running after this command')
call s:SendCommand(a:cmd)
else
call ch_log('dropping command, program is running: ' . a:cmd)
@ -580,7 +590,7 @@ endfunc
" to the next ", unescaping characters:
" - remove line breaks
" - change \\t to \t
" - change \0xhh to \xhh
" - change \0xhh to \xhh (disabled for now)
" - change \ooo to octal
" - change \\ to \
func s:DecodeMessage(quotedText)
@ -589,12 +599,21 @@ func s:DecodeMessage(quotedText)
return
endif
return a:quotedText
\->substitute('^"\|".*\|\\n', '', 'g')
\->substitute('\\t', "\t", 'g')
\->substitute('\\0x\(\x\x\)', {-> eval('"\x' .. submatch(1) .. '"')}, 'g')
\->substitute('\\\o\o\o', {-> eval('"' .. submatch(0) .. '"')}, 'g')
\->substitute('\\\\', '\', 'g')
\ ->substitute('^"\|".*\|\\n', '', 'g')
\ ->substitute('\\t', "\t", 'g')
" multi-byte characters arrive in octal form
" NULL-values must be kept encoded as those break the string otherwise
\ ->substitute('\\000', s:NullRepl, 'g')
\ ->substitute('\\\o\o\o', {-> eval('"' .. submatch(0) .. '"')}, 'g')
" Note: GDB docs also mention hex encodings - the translations below work
" but we keep them out for performance-reasons until we actually see
" those in mi-returns
" \ ->substitute('\\0x\(\x\x\)', {-> eval('"\x' .. submatch(1) .. '"')}, 'g')
" \ ->substitute('\\0x00', s:NullRepl, 'g')
\ ->substitute('\\\\', '\', 'g')
\ ->substitute(s:NullRepl, '\\000', 'g')
endfunc
const s:NullRepl = 'XXXNULLXXX'
" Extract the "name" value from a gdb message with fullname="name".
func s:GetFullname(msg)
@ -808,11 +827,11 @@ func s:InstallCommands()
command -nargs=? Break call s:SetBreakpoint(<q-args>)
command Clear call s:ClearBreakpoint()
command Step call s:SendCommandIfStopped('-exec-step')
command Over call s:SendCommandIfStopped('-exec-next')
command Finish call s:SendCommandIfStopped('-exec-finish')
command Step call s:SendResumingCommand('-exec-step')
command Over call s:SendResumingCommand('-exec-next')
command Finish call s:SendResumingCommand('-exec-finish')
command -nargs=* Run call s:Run(<q-args>)
command -nargs=* Arguments call s:SendCommand('-exec-arguments ' . <q-args>)
command -nargs=* Arguments call s:SendResumingCommand('-exec-arguments ' . <q-args>)
if s:way == 'prompt'
command Stop call s:PromptInterrupt()
@ -995,9 +1014,9 @@ endfunc
func s:Run(args)
if a:args != ''
call s:SendCommand('-exec-arguments ' . a:args)
call s:SendResumingCommand('-exec-arguments ' . a:args)
endif
call s:SendCommand('-exec-run')
call s:SendResumingCommand('-exec-run')
endfunc
func s:SendEval(expr)
@ -1048,10 +1067,10 @@ func s:GetEvaluationExpression(range, arg)
return expr
endfunc
" clean up expression that may got in because of range
" clean up expression that may get in because of range
" (newlines and surrounding whitespace)
" As it can also be specified via ex-command for assignments this function
" may not change the "content" parts (like replacing contained spaces
" may not change the "content" parts (like replacing contained spaces)
func s:CleanupExpr(expr)
" replace all embedded newlines/tabs/...
let expr = substitute(a:expr, '\_s', ' ', 'g')
@ -1076,10 +1095,19 @@ let s:evalFromBalloonExpr = 0
" Handle the result of data-evaluate-expression
func s:HandleEvaluate(msg)
let value = substitute(a:msg, '.*value="\(.*\)"', '\1', '')
let value = substitute(value, '\\"', '"', 'g')
" multi-byte characters arrive in octal form
let value = substitute(value, '\\\o\o\o', {-> eval('"' .. submatch(0) .. '"')}, 'g')
let value = a:msg
\ ->substitute('.*value="\(.*\)"', '\1', '')
\ ->substitute('\\"', '"', 'g')
\ ->substitute('\\\\', '\\', 'g')
"\ multi-byte characters arrive in octal form, replace everything but NULL values
\ ->substitute('\\000', s:NullRepl, 'g')
\ ->substitute('\\\o\o\o', {-> eval('"' .. submatch(0) .. '"')}, 'g')
"\ Note: GDB docs also mention hex encodings - the translations below work
"\ but we keep them out for performance-reasons until we actually see
"\ those in mi-returns
"\ ->substitute('\\0x00', s:NullRep, 'g')
"\ ->substitute('\\0x\(\x\x\)', {-> eval('"\x' .. submatch(1) .. '"')}, 'g')
\ ->substitute(s:NullRepl, '\\000', 'g')
if s:evalFromBalloonExpr
if s:evalFromBalloonExprResult == ''
let s:evalFromBalloonExprResult = s:evalexpr . ': ' . value
@ -1224,8 +1252,18 @@ func s:HandleCursor(msg)
if a:msg =~ '^\(\*stopped\|=thread-selected\)' && filereadable(fname)
let lnum = substitute(a:msg, '.*line="\([^"]*\)".*', '\1', '')
if lnum =~ '^[0-9]*$'
call s:GotoSourcewinOrCreateIt()
call s:GotoSourcewinOrCreateIt()
if expand('%:p') != fnamemodify(fname, ':p')
echomsg 'different fname: "' .. expand('%:p') .. '" vs "' .. fnamemodify(fname, ':p') .. '"'
augroup Termdebug
" Always open a file read-only instead of showing the ATTENTION
" prompt, since we are unlikely to want to edit the file.
" The file may be changed but not saved, warn for that.
au SwapExists * echohl WarningMsg
\ | echo 'Warning: file is being edited elsewhere'
\ | echohl None
\ | let v:swapchoice = '0'
augroup END
if &modified
" TODO: find existing window
exe 'split ' . fnameescape(fname)
@ -1234,6 +1272,9 @@ func s:HandleCursor(msg)
else
exe 'edit ' . fnameescape(fname)
endif
augroup Termdebug
au! SwapExists
augroup END
endif
exe lnum
normal! zv

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