Compare commits

...

727 Commits

Author SHA1 Message Date
Bram Moolenaar
728a05c4ab patch 8.2.4920: MS-Windows GUI: unused variables
Problem:    MS-Windows GUI: unused variables.
Solution:   Delete the variables. (John Marriott)
2022-05-08 22:37:45 +01:00
Bram Moolenaar
7c824682d2 patch 8.2.4919: can add invalid bytes with :spellgood
Problem:    Can add invalid bytes with :spellgood.
Solution:   Check for a valid word string.
2022-05-08 22:32:58 +01:00
LemonBoy
9830db6305 patch 8.2.4918: conceal character from matchadd() displayed too many times
Problem:    Conceal character from matchadd() displayed too many times.
Solution:   Check the syntax flag. (closes #10381, closes #7268)
2022-05-08 21:25:20 +01:00
Christian Brabandt
cb747899bd patch 8.2.4917: fuzzy expansion of option names is not right
Problem:    Fuzzy expansion of option names is not right.
Solution:   Pass the fuzzy flag down the call chain. (Christian Brabandt,
            closes #10380, closes #10318)
2022-05-08 21:10:56 +01:00
Bram Moolenaar
8e8dc9b323 patch 8.2.4916: mouse in Insert mode test fails
Problem:    Mouse in Insert mode test fails.
Solution:   Fix the text and check relevant positions.
2022-05-08 20:38:06 +01:00
Bram Moolenaar
a91cb98bb3 patch 8.2.4915: sometimes the cursor is in the wrong position
Problem:    Sometimes the cursor is in the wrong position.
Solution:   When the cursor moved to another line, recompute w_botline.
            (closes #9736)
2022-05-08 19:39:31 +01:00
Bram Moolenaar
933c2922b5 patch 8.2.4914: string interpolation in :def function may fail
Problem:    String interpolation in :def function may fail.
Solution:   Do not terminate the expression. (closes #10377)
2022-05-08 16:37:07 +01:00
Bram Moolenaar
27724251bc patch 8.2.4913: popup_hide() does not always have effect
Problem:    Popup_hide() does not always have effect.
Solution:   Add the POPF_HIDDEN_FORCE flag. (closes #10376)
2022-05-08 15:00:04 +01:00
Bram Moolenaar
d899e51120 Update runtime files 2022-05-07 21:54:03 +01:00
Bram Moolenaar
a7583c42cd patch 8.2.4912: using execute() to define a lambda doesn't work
Problem:    Using execute() to define a lambda doesn't work. (Ernie Rael)
Solution:   Put the getline function in evalarg. (closes #10375)
2022-05-07 21:14:05 +01:00
Bram Moolenaar
249591057b patch 8.2.4911: the mode #defines are not clearly named
Problem:    The mode #defines are not clearly named.
Solution:   Prepend MODE_.  Renumber them to put the mapped modes first.
2022-05-07 20:01:16 +01:00
Bram Moolenaar
9ff7d717aa patch 8.2.4910: imperfect coding
Problem:    Imperfect coding.
Solution:   Make code nicer.
2022-05-07 17:45:16 +01:00
Bram Moolenaar
ac4174e166 patch 8.2.4909: MODE_ enum entries names are too generic
Problem:    MODE_ enum entries names are too generic.
Solution:   use CH_MODE_.
2022-05-07 16:38:24 +01:00
Bram Moolenaar
48a8a83303 patch 8.2.4908: no text formatting for // comment after a statement
Problem:    No text formatting for // comment after a statement.
Solution:   format a comment when the 'c' flag is in 'formatoptions'.
2022-05-07 15:43:52 +01:00
Bram Moolenaar
2bf875f881 patch 8.2.4907: some users do not want a line comment always inserted
Problem:    Some users do not want a line comment always inserted.
Solution:   Add the '/' flag to 'formatoptions' to not repeat the comment
            leader after a statement when using "o".
2022-05-07 14:54:11 +01:00
Yasuhiro Matsumoto
aa04e1b0be patch 8.2.4906: MS-Windows: cannot use transparent background
Problem:    MS-Windows: cannot use transparent background.
Solution:   Make transparent background work with 'termguicolors' and NONE
            background color. (Yasuhiro Matsumoto, closes #10310, closes #7162)
2022-05-07 14:09:19 +01:00
Bram Moolenaar
3f1cfcb864 patch 8.2.4905: codecov includes MS-Windows install header file
Problem:    codecov includes MS-Windows install header file.
Solution:   Ignore dosinst.h.
2022-05-07 13:25:37 +01:00
Bram Moolenaar
4649c12123 patch 8.2.4904: codecov includes MS-Windows install files
Problem:    codecov includes MS-Windows install files.
Solution:   Ignore dosinst.c and uninstall.c.
2022-05-07 13:00:42 +01:00
Shougo Matsushita
79d599b877 patch 8.2.4903: cannot get the current cmdline completion type and position
Problem:    Cannot get the current cmdline completion type and position.
Solution:   Add getcmdcompltype() and getcmdscreenpos(). (Shougo Matsushita,
            closes #10344)
2022-05-07 12:48:29 +01:00
LemonBoy
c27747e6dd patch 8.2.4902: mouse wheel scrolling is inconsistent
Problem:    Mouse wheel scrolling is inconsistent.
Solution:   Use the MS-Winows system setting. (closes #10368)
2022-05-07 12:25:40 +01:00
Bram Moolenaar
8e4b76da1d patch 8.2.4901: NULL pointer access when using invalid pattern
Problem:    NULL pointer access when using invalid pattern.
Solution:   Check for failed regexp program.
2022-05-07 11:28:06 +01:00
Dominique Pelle
801c3c1dbe patch 8.2.4900: Vim9 expression test fails without the job feature
Problem:    Vim9 expression test fails without the job feature.
Solution:   Add a check for the job feature. (Dominique Pellé, closes #10373)
2022-05-07 11:00:08 +01:00
Bram Moolenaar
ef02f16609 patch 8.2.4899: with latin1 encoding CTRL-W might go before the cmdline
Problem:    With latin1 encoding CTRL-W might go before the start of the
            command line.
Solution:   Check already being at the start of the command line.
2022-05-07 10:49:10 +01:00
Bram Moolenaar
70d87690a3 patch 8.2.4898: Coverity complains about pointer usage
Problem:    Coverity complains about pointer usage.
Solution:   Move code for increment/decerment.
2022-05-07 10:03:27 +01:00
Bram Moolenaar
39be4981cd patch 8.2.4897: comment inside an expression in lambda ignores the rest
Problem:    Comment inside an expression in lambda ignores the rest of the
            expression.
Solution:   Truncate the line at the comment. (closes #10367)
2022-05-06 21:51:50 +01:00
Bram Moolenaar
a13e7acba9 patch 8.2.4896: expression in command block does not look after NL
Problem:    Expression in command block does not look after NL when command is
            typed.
Solution:   Skip over NL also when not in a script. (closes #10358)
2022-05-06 21:24:31 +01:00
Bram Moolenaar
d88934406c patch 8.2.4895: buffer overflow with invalid command with composing chars
Problem:    Buffer overflow with invalid command with composing chars.
Solution:   Check that the whole character fits in the buffer.
2022-05-06 20:38:47 +01:00
LemonBoy
5a7b6dc23c patch 8.2.4894: MS-Windows: not using italics
Problem:    MS-Windows: not using italics.
Solution:   Use italics.  Simplify the code. (closes #10359)
2022-05-06 18:38:41 +01:00
Bram Moolenaar
44433da534 patch 8.2.4893: distributed import files are not installed
Problem:    Distributed import files are not installed.
Solution:   Add rules to Makefile and NSIS.
2022-05-06 18:08:52 +01:00
Bram Moolenaar
ec89223478 patch 8.2.4892: test failures because of changed error messages
Problem:    Test failures because of changed error messages.
Solution:   Adjust the exptected error messages.
2022-05-06 17:53:06 +01:00
Bram Moolenaar
b3c9077a5b patch 8.2.4891: Vim help presentation could be better
Problem:    Vim help presentation could be better.
Solution:   Add an imported file for extra Vim help support.  Show highlight
            names in the color they have.
2022-05-06 16:32:46 +01:00
Bram Moolenaar
cf030578b2 patch 8.2.4890: inconsistent capitalization in error messages
Problem:    Inconsistent capitalization in error messages.
Solution:   Make capitalization consistent. (Doug Kearns)
2022-05-06 16:18:41 +01:00
Philip H
009e79c7b7 patch 8.2.4889: CI only tests with FreeBSD 12
Problem:    CI only tests with FreeBSD 12.
Solution:   Also test with FreeBSD 13. (closes #10366)
2022-05-06 16:10:50 +01:00
Bram Moolenaar
521bf32bb4 patch 8.2.4888: line number of lambda ignores line continuation
Problem:    Line number of lambda ignores line continuation.
Solution:   Use the line number of where the arguments are. Avoid outputting
            "..." twice. (closes #10364)
2022-05-06 15:47:07 +01:00
Bram Moolenaar
9b334d5912 patch 8.2.4887: channel log does not show invoking a timer callback
Problem:    Channel log does not show invoking a timer callback.
Solution:   Add a ch_log() call.
2022-05-06 14:59:04 +01:00
Bram Moolenaar
bc6f2bf78a patch 8.2.4886: Vim9: redir in skipped block seen as assignment
Problem:    Vim9: redir in skipped block seen as assignment.
Solution:   Check for valid assignment.
2022-05-06 14:29:09 +01:00
Bram Moolenaar
f1d63b9cba patch 8.2.4885: test fails with the job/channel feature
Problem:    Test fails with the job/channel feature.
Solution:   Move check for job/channel separately.
2022-05-06 13:37:42 +01:00
Bram Moolenaar
175913fb03 patch 8.2.4884: test fails without the job/channel feature
Problem:    Test fails without the job/channel feature. (Dominique Pellé)
Solution:   Add condition.
2022-05-06 13:27:08 +01:00
LemonBoy
2eaef106e4 patch 8.2.4883: string interpolation only works in heredoc
Problem:    String interpolation only works in heredoc.
Solution:   Support interpolated strings.  Use syntax for heredoc consistent
            with strings, similar to C#. (closes #10327)
2022-05-06 13:14:50 +01:00
Christian Brabandt
e7d6dbc572 patch 8.2.4882: cannot make 'breakindent' use a specific column
Problem:    Cannot make 'breakindent' use a specific column.
Solution:   Add the "column" entry in 'breakindentopt'. (Christian Brabandt,
            closes #10362, closes #10325)
2022-05-06 12:21:04 +01:00
Shougo Matsushita
509142ab7a patch 8.2.4881: "P" in Visual mode still changes some registers
Problem:    "P" in Visual mode still changes some registers.
Solution:   Make "P" in Visual mode not change any register. (Shougo
            Matsushita, closes #10349)
2022-05-06 11:45:09 +01:00
Bram Moolenaar
434725cc4c patch 8.2.4880: Vim9: misplaced elseif causes invalid memory access
Problem:    Vim9: misplaced elseif causes invalid memory access.
Solution:   Check cs_idx not to be negative.
2022-05-06 11:27:52 +01:00
Bram Moolenaar
3e79427803 patch 8.2.4879: screendump test may fail when using valgrind
Problem:    Screendump test may fail when using valgrind.
Solution:   Wait longer for the first screendump.
2022-05-06 11:21:19 +01:00
Bram Moolenaar
dd7eff0a75 patch 8.2.4878: valgrind warning for using uninitialized variable
Problem:    Valgrind warning for using uninitialized variable.
Solution:   Initialize the type of newtv.
2022-05-06 11:02:05 +01:00
Christian Brabandt
d560014e03 patch 8.2.4877: MS-Windows: Wrongly using Normal colors for termguicolors
Problem:    MS-Windows: Using Normal colors for termguicolors causes problems.
Solution:   Do not use Normal colors to set sg_gui_fg and sg_gui_bg.
            (Christian Brabandt, closes #10317, closes #10241)
2022-05-05 21:09:54 +01:00
Christian Brabandt
dfbdadce44 patch 8.2.4876: MS-Windows: Shift-BS results in strange char in powershell
Problem:    MS-Windows: Shift-BS results in strange character in powershell.
Solution:   Add K_S_BS. (Christian Brabandt, closes #10283, closes #10279)
2022-05-05 20:46:47 +01:00
LemonBoy
40fd7e6652 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Problem:    MS-Windows: some .exe files are not recognized.
Solution:   Parse APPEXECLINK junctions. (closes #10302)
2022-05-05 20:18:16 +01:00
LemonBoy
365d8f76b5 patch 8.2.4874: Win32 GUI: horizontal scroll wheel not handled properly
Problem:    Win32 GUI: horizontal scroll wheel not handled properly.
Solution:   Also handle WM_MOUSEHWHEEL. (closes #10309)
2022-05-05 19:23:07 +01:00
Bram Moolenaar
505ed0c38f patch 8.2.4873: Vim9: using "else" differs from using "endif/if !cond"
Problem:    Vim9: using "else" differs from using "endif/if !cond".
Solution:   Leave the block and enter another one. (closes #10320)
2022-05-05 17:02:46 +01:00
Bram Moolenaar
ea72038d60 patch 8.2.4872: Vim9: no error for using an expression only
Problem:    Vim9: no error for using an expression only at the script level
            when followed by an empty line.
Solution:   Do not check the line number but whether something follows.
            (closes #10357)
2022-05-05 16:08:55 +01:00
Bram Moolenaar
09d9421b67 patch 8.2.4871: Vim9: in :def function no error for misplaced range
Problem:    Vim9: in :def function no error for using a range with a command
            that does not accept one.
Solution:   Check for the command to accept a range. (closes #10330)
2022-05-05 15:20:03 +01:00
LemonBoy
f3b4895f27 patch 8.2.4870: Vim9: expression in :substitute is not compiled
Problem:    Vim9: expression in :substitute is not compiled.
Solution:   Use an INSTR instruction if possible. (closes #10334)
2022-05-05 13:53:03 +01:00
Bram Moolenaar
e442d59f6d patch 8.2.4869: expression in command block does not look after NL
Problem:    Expression in command block does not look after NL.
Solution:   Skip over NL to check what follows. (closes #10358)
2022-05-05 12:20:28 +01:00
LemonBoy
2a2707d033 patch 8.2.4868: when closing help window autocmds triggered for wrong window
Problem:    When closing help window autocmds triggered for the wrong window.
Solution:   Figure out the new current window earlier. (closes #10348)
2022-05-04 22:13:47 +01:00
zeertzjq
ac402f4d64 patch 8.2.4867: listing of mapping with K_SPECIAL is wrong
Problem:    Listing of mapping with K_SPECIAL is wrong.
Solution:   Adjust escaping of special characters. (closes #10351)
2022-05-04 18:51:43 +01:00
LemonBoy
47d4e317f8 patch 8.2.4866: duplicate code in "get" functions
Problem:    Duplicate code in "get" functions.
Solution:   Use get_var_from() for getwinvar(), gettabvar(), gettabwinvar()
            and getbufvar(). (closes #10335)
2022-05-04 18:12:55 +01:00
zeertzjq
cd5dbad184 patch 8.2.4865: :startinsert right after :stopinsert may not work
Problem:    :startinsert right after :stopinsert does not work when popup menu
            is still visible.
Solution:   Use ins_compl_active() instead of pum_visible(). (closes #10352)
2022-05-04 17:51:50 +01:00
Bram Moolenaar
0395f88b84 patch 8.2.4864: Vim9: script test fails
Problem:    Vim9: script test fails.
Solution:   Remove "if" around declaration.
2022-05-04 17:29:15 +01:00
Bram Moolenaar
c9af617ac6 patch 8.2.4863: accessing freed memory in test without the +channel feature
Problem:    Accessing freed memory in test without the +channel feature.
            (Dominique Pellé)
Solution:   Do not generted PUSHCHANNEL or PUSHJOB if they are not
            implemented. (closes #10350)
2022-05-04 16:46:54 +01:00
Bram Moolenaar
23d44493f1 patch 8.2.4862: Vim9: test may fail when run with valgrind
Problem:    Vim9: test may fail when run with valgrind.
Solution:   Wait longer for callback if needed.
2022-05-04 16:24:57 +01:00
Ernie Rael
51d04d16f2 patch 8.2.4861: it is not easy to restore saved mappings
Problem:    It is not easy to restore saved mappings.
Solution:   Make mapset() accept a dict argument. (Ernie Rael, closes #10295)
2022-05-04 15:40:22 +01:00
Yasuhiro Matsumoto
05cf63e9bd patch 8.2.4860: MS-Windows: always uses current directory for executables
Problem:    MS-Windows: always uses current directory for executables.
Solution:   Check the NoDefaultCurrentDirectoryInExePath environment variable.
            (Yasuhiro Matsumoto, closes #10341)
2022-05-03 11:02:28 +01:00
Bram Moolenaar
3a974a8933 patch 8.2.4859: wget2 files are not recognized
Problem:    wget2 files are not recognized.
Solution:   Add patterns to recognize wget2. (Doug Kearns)
2022-05-02 23:51:13 +01:00
zeertzjq
db08887f24 patch 8.2.4858: K_SPECIAL may be escaped twice
Problem:    K_SPECIAL may be escaped twice.
Solution:   Avoid double escaping. (closes #10340)
2022-05-02 22:53:45 +01:00
asmka
f4f579b46b patch 8.2.4857: Yaml indent for multiline is wrong
Problem:    Yaml indent for multiline is wrong.
Solution:   Adjust patterns. (closes #10328, closes #8740)
2022-05-02 10:46:49 +01:00
Christian Brabandt
2890c0b9d2 patch 8.2.4856: MinGW compiler complains about unknown escape sequence
Problem:    MinGW compiler complains about unknown escape sequence.
Solution:   Avoid using a backslash in path. (Christian Brabandt,
            closes #10337)
2022-05-02 10:34:15 +01:00
Zoe Roux
2096a5f128 patch 8.2.4855: robot files are not recognized
Problem:    Robot files are not recognized.
Solution:   Add patterns for robot files. (Zoe Roux, closes #10339)
2022-05-02 10:29:31 +01:00
Christian Brabandt
2f7e00a8ae patch 8.2.4854: array size does not match usage
Problem:    Array size does not match usage.
Solution:   Make array size 3 instead of 4. (Christian Brabandt, closes #10336)
2022-05-02 00:06:51 +01:00
Philip H
056a1c2bdd patch 8.2.4853: CI with FreeBSD is a bit outdated
Problem:    CI with FreeBSD is a bit outdated.
Solution:   Use 12.3 instead of 12.1. (closes #10333)
2022-05-01 20:43:50 +01:00
LemonBoy
d2a4662430 patch 8.2.4852: ANSI color index to RGB value not correct
Problem:    ANSI color index to RGB value not correct.
Solution:   Convert the cterm index to ANSI index. (closes #10321,
            closes #9836))
2022-05-01 17:43:33 +01:00
Bram Moolenaar
b4011afe53 patch 8.2.4851: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable.
Solution:   Use another variable to decide to restore option values.
2022-05-01 00:42:24 +01:00
LemonBoy
d7c9564d8d patch 8.2.4850: mksession mixes up "tabpages" and "curdir" arguments
Problem:    Mksession mixes up "tabpages" and "curdir" arguments.
Solution:   Correct logic for storing tabpage in session. (closes #10312)
2022-04-30 16:10:27 +01:00
Mathias Jean Johansen
917c32c4f7 patch 8.2.4849: Gleam filetype not detected
Problem:    Gleam filetype not detected.
Solution:   Add a pattern for Gleam files. (Mathias Jean Johansen,
            closes #10326)
2022-04-30 15:10:07 +01:00
zeertzjq
ee44603069 patch 8.2.4848: local completion with mappings and simplification not working
Problem:    Local completion with mappings and simplification not working.
Solution:   Fix local completion <C-N>/<C-P> mappings not ignored if keys are
            not simplified. (closes #10323)
2022-04-30 15:02:22 +01:00
LemonBoy
a5d3590505 patch 8.2.4847: crash when using uninitialized function pointer
Problem:    Crash when using uninitialized function pointer.
Solution:   Check for NULL pointer. (closes #10319, closes #10319)
2022-04-29 21:15:02 +01:00
zeertzjq
bad8a013c2 patch 8.2.4846: termcodes test fails
Problem:    Termcodes test fails.
Solution:   use CTRL-SHIFT-V to insert an unsimplified key. (closes #10316)
2022-04-29 16:44:00 +01:00
zeertzjq
590f365f91 patch 8.2.4845: duplicate code
Problem:    Duplicate code.
Solution:   Move code below if/else. (closes #10314)
2022-04-29 11:29:54 +01:00
zeertzjq
758a8d1999 patch 8.2.4844: <C-S-I> is simplified to <S-Tab>
Problem:    <C-S-I> is simplified to <S-Tab>.
Solution:   Do not simplify CTRL if there is also SHIFT. (closes #10313)
2022-04-29 11:06:34 +01:00
LemonBoy
202b4bd3a4 patch 8.2.4843: treating CTRL + ALT as AltGr is not backwards compatible
Problem:    Win32 GUI: Treating CTRL + ALT as AltGr is not backwards
            compatible. (Axel Bender)
Solution:   Make a difference between left and right menu keys.
            (closes #10308)
2022-04-28 19:50:54 +01:00
Bram Moolenaar
211a5bb235 patch 8.2.4842: expand("%:p") is not empty when there is no buffer name
Problem:    expand("%:p") is not empty when there is no buffer name.
Solution:   When ignoring errors still return NULL. (closes #10311)
2022-04-28 19:09:03 +01:00
Bram Moolenaar
a96edb736d patch 8.2.4841: empty string considered an error for expand()
Problem:    Empty string considered an error for expand() when 'verbose' is
            set. (Christian Brabandt)
Solution:   Do not give an error for an empty result. (closes #10307)
2022-04-28 17:52:24 +01:00
Bram Moolenaar
05c7f5d3d0 patch 8.2.4840: heredoc expression evaluated even when skipping
Problem:    Heredoc expression evaluated even when skipping.
Solution:   Don't evaluate when "skip" is set. (closes #10306)
2022-04-28 16:51:41 +01:00
Bram Moolenaar
0a748d9184 patch 8.2.4839: compiler warning for unused argument
Problem:    Compiler warning for unused argument.
Solution:   Add "UNUSED".
2022-04-28 15:39:08 +01:00
LemonBoy
dca1d40cd0 patch 8.2.4838: checking for absolute path is not trivial
Problem:    Checking for absolute path is not trivial.
Solution:   Add isabsolutepath(). (closes #10303)
2022-04-28 15:26:33 +01:00
zeertzjq
68a573ce2b patch 8.2.4837: modifiers not simplified when timed out
Problem:    Modifiers not simplified when timed out or using feedkeys() with
            'n" flag.
Solution:   Adjust how mapped flag and timeout are used. (closes #10305)
2022-04-28 14:10:01 +01:00
Bram Moolenaar
f6ced9863f patch 8.2.4836: Vim9: some lines not covered by tests
Problem:    Vim9: some lines not covered by tests.
Solution:   Remove dead code.  Add disassemble tests.
2022-04-28 12:00:49 +01:00
Bram Moolenaar
95e4dd813a patch 8.2.4835: Vim9: some lines not covered by tests
Problem:    Vim9: some lines not covered by tests.
Solution:   Add a few more tests.  Fix disassemble output.
2022-04-27 22:15:40 +01:00
Bram Moolenaar
06651630ee patch 8.2.4834: Vim9: some lines not covered by tests
Problem:    Vim9: some lines not covered by tests.
Solution:   Add a few more tests.  Remove dead code.
2022-04-27 17:54:25 +01:00
Bram Moolenaar
ce001a337e Update runtime files 2022-04-27 15:25:03 +01:00
zeertzjq
12e21e387b patch 8.2.4833: failure of mapping not checked for
Problem:    Failure of mapping not checked for.
Solution:   Check return value of ins_typebuf(). (closes #10299)
2022-04-27 11:58:01 +01:00
zeertzjq
fc78a0369e patch 8.2.4832: passing zero instead of NULL to a pointer argument
Problem:    Passing zero instead of NULL to a pointer argument.
Solution:   Use NULL. (closes #10296)
2022-04-26 22:11:38 +01:00
zeertzjq
2c8a7ebdad patch 8.2.4831: crash when using maparg() and unmapping simplified keys
Problem:    Crash when using maparg() and unmapping simplified keys.
Solution:   Do not keep a mapblock pointer. (closes #10294)
2022-04-26 21:36:21 +01:00
Bram Moolenaar
23f106efeb patch 8.2.4830: possible endless loop if there is unused typahead
Problem:    Possible endless loop if there is unused typahead.
Solution:   Only loop when the typeahead changed.
2022-04-26 18:52:22 +01:00
zeertzjq
17c95d9608 patch 8.2.4829: a key may be simplified to NUL
Problem:    A key may be simplified to NUL.
Solution:   Use K_ZERO instead.  Use macros instead of hard coded values.
            (closes #10290)
2022-04-26 12:51:07 +01:00
zeertzjq
abeb09b2c5 patch 8.2.4828: fix for unmapping simplified key not fully tested
Problem:    Fix for unmapping simplified key not fully tested.
Solution:   Add a test case. (closes #10292)
2022-04-26 12:29:43 +01:00
Bram Moolenaar
87f74106f9 patch 8.2.4827: typo in variable name
Problem:    Typo in variable name. (Gabriel Dupras)
Solution:   Rename the variable.
2022-04-25 18:59:25 +01:00
jvoisin
1f435dafff patch 8.2.4826: .cshtml files are not recognized
Problem:    .cshtml files are not recognized.
Solution:   Use html filetype for .cshtml files. (Julien Voisin, closes #10212)
2022-04-25 17:40:56 +01:00
Ernie Rael
09661203ec patch 8.2.4825: can only get a list of mappings
Problem:    Can only get a list of mappings.
Solution:   Add the optional {abbr} argument. (Ernie Rael, closes #10277)
            Rename to maplist().  Rename test file.
2022-04-25 14:40:44 +01:00
zeertzjq
23d5770ef5 patch 8.2.4824: expression is evaluated multiple times
Problem:    Expression is evaluated multiple times.
Solution:   Evaluate expression once and store the result. (closes #10278)
2022-04-25 13:28:00 +01:00
LemonBoy
372bcceeee patch 8.2.4823: concat more than 2 strings in :def function is inefficient
Problem:    Concatenating more than 2 strings in a :def function is
            inefficient.
Solution:   Add a count to the CONCAT instruction. (closes #10276)
2022-04-25 12:43:20 +01:00
LemonBoy
af59e34f1b patch 8.2.4822: setting ufunc to NULL twice
Problem:    Setting ufunc to NULL twice.
Solution:   Set ufunc to NULL in find_exported(). (closes #19275)
2022-04-24 21:55:00 +01:00
Bram Moolenaar
aac12daa61 patch 8.2.4821: crash when imported autoload script was deleted
Problem:    Crash when imported autoload script was deleted.
Solution:   Initialize local variable. (closes #10274)  Give a more meaningful
            error message.
2022-04-24 21:33:20 +01:00
Ernie Rael
659c240cf7 patch 8.2.4820: not simple programmatic way to find a specific mapping
Problem:    Not simple programmatic way to find a specific mapping.
Solution:   Add getmappings(). (Ernie Rael, closes #10273)
2022-04-24 18:40:28 +01:00
zeertzjq
a4e3332650 patch 8.2.4819: unmapping simplified keys also deletes other mapping
Problem:    Unmapping simplified keys also deletes other mapping.
Solution:   Only unmap a mapping with m_simplified set. (closes #10270)
2022-04-24 17:07:53 +01:00
zeertzjq
ac92ab7719 patch 8.2.4818: no test for what 8.2.4806 fixes
Problem:    No test for what 8.2.4806 fixes.
Solution:   Add a test. (closes #10727)
2022-04-24 15:58:30 +01:00
LemonBoy
45684c6ec4 patch 8.2.4817: Win32 GUI: modifiers are not always used
Problem:    Win32 GUI: modifiers are not always used.
Solution:   Handle more modifiers. (closes #10269)
2022-04-24 15:46:42 +01:00
Philip H
490ac3fe98 patch 8.2.4816: still using older codecov app in some places of CI
Problem:    Still using older codecov app in some places of CI.
Solution:   Use v3.1.0. (closes #10209)
2022-04-24 12:44:32 +01:00
Ernie Rael
d42b83942e patch 8.2.4815: cannot build with older GTK version
Problem:    Cannot build with older GTK version.
Solution:   Use gtk_window_get_size() instead of gdk_window_get_width() and
            gdk_window_get_height(). (Ernie Rael, closes #10257)
2022-04-23 19:52:23 +01:00
LemonBoy
4a392d2440 patch 8.2.4814: possible to leave a popup window with win_gotoid()
Problem:    Possible to leave a popup window with win_gotoid().
Solution:   Give an error when trying to leave a popup window with
            win_gotoid(). (closes #10253)
2022-04-23 14:07:56 +01:00
Brandon Simmons
2c40707baa patch 8.2.4813: pasting text while indent folding may mess up folds
Problem:    Pasting text while indent folding may mess up folds.
Solution:   Adjust the way folds are split. (Brandon Simmons, closes #10254)
2022-04-23 13:50:17 +01:00
zeertzjq
8279cfe499 patch 8.2.4812: unused struct item
Problem:    Unused struct item.
Solution:   Remove "lines" match_T.  Simplify the code. (closes #10256)
2022-04-23 12:05:51 +01:00
LemonBoy
0de7369fd4 patch 8.2.4811: Win32 GUI: caps lock doesn't work
Problem:    Win32 GUI: caps lock doesn't work.
Solution:   Handle VK_CAPITAL. (closes #10260, closes #10258)
2022-04-23 11:08:11 +01:00
Bram Moolenaar
56dba60216 patch 8.2.4810: missing changes in one file
Problem:    Missing changes in one file.
Solution:   Also change the struct initializers.
2022-04-23 11:03:58 +01:00
Yegappan Lakshmanan
885de449c0 patch 8.2.4809: various things no6 properly tested
Problem:    Various things no6 properly tested.
Solution:   Add various test cases. (Yegappan Lakshmanan, closes #10259)
2022-04-23 10:51:14 +01:00
Bram Moolenaar
33d3ce640c patch 8.2.4808: unused item in engine struct
Problem:    Unused item in engine struct.
Solution:   Remove "expr".  Add comment with tags.
2022-04-23 10:41:35 +01:00
LemonBoy
77fc0b02e5 patch 8.2.4807: processing key eveints in Win32 GUI is not ideal
Problem:    Processing key eveints in Win32 GUI is not ideal.
Solution:   Improve processing of key events. (closes #10155)
2022-04-22 22:45:52 +01:00
Bram Moolenaar
53ef573148 patch 8.2.4806: a mapping using <LeftDrag> does not start Select mode
Problem:    A mapping using <LeftDrag> does not start Select mode.
Solution:   When checking for starting select mode with the mouse also do this
            when there is typeahead. (closes #10249)
2022-04-22 21:20:26 +01:00
Bram Moolenaar
9b36750640 patch 8.2.4805: CurSearch used for all matches in current line
Problem:    CurSearch used for all matches in current line.
Solution:   Don't use the non-zero line count. (closes #10247)
2022-04-22 20:07:21 +01:00
Yegappan Lakshmanan
1fc6ea9bf3 patch 8.2.4804: expression in heredoc doesn't work for compiled function
Problem:    Expression in heredoc doesn't work for compiled function.
Solution:   Implement compiling the heredoc expressions. (Yegappan Lakshmanan,
            closes #10232)
2022-04-21 23:30:15 +01:00
LemonBoy
66e13aedc7 patch 8.2.4803: WinScrolled not always triggered when scrolling with mouse
Problem:    WinScrolled not always triggered when scrolling with the mouse.
Solution:   Add calls to may_trigger_winscrolled(). (closes #10246)
2022-04-21 22:52:11 +01:00
zeertzjq
7851c69a12 patch 8.2.4802: test is not cleaned up
Problem:    Test is not cleaned up.
Solution:   Make test clean up after itself.  Avoid NUL. (closes #10233)
2022-04-21 11:14:01 +01:00
Christian Brabandt
3fd7480cd2 patch 8.2.4801: fix for cursorbind fix not fully tested
Problem:    Fix for cursorbind fix not fully tested.
Solution:   Add another test case. (Christian Brabandt, closes #10240)
2022-04-20 22:07:41 +01:00
Bram Moolenaar
d0eaf675aa patch 8.2.4800: missing test update for adjusted t_8u behavior
Problem:    Missing test update for adjusted t_8u behavior.
Solution:   Update and extend the test.
2022-04-20 19:55:37 +01:00
LemonBoy
0044e5100a patch 8.2.4799: popup does not use correct topline
Problem:    Popup does not use correct topline.
Solution:   Also add one when firstline is negative. (closes #10229)
2022-04-20 19:47:37 +01:00
Bram Moolenaar
dbec26d789 patch 8.2.4798: t_8u option was reset even when set by the user
Problem:    t_8u option was reset even when set by the user.
Solution:   Only reset t_8u when using the default value. (closes #10239)
2022-04-20 19:08:50 +01:00
LemonBoy
8530b41fd3 patch 8.2.4797: getwininfo() may get oudated values
Problem:    getwininfo() may get oudated values.
Solution:   Make sure w_botline is up-to-date. (closes #10226)
2022-04-20 19:00:36 +01:00
Bram Moolenaar
da1050cd6f patch 8.2.4796: file left behind after running cursorline tests
Problem:    File left behind after running cursorline tests.
Solution:   Uncomment the line that deletes the file.
2022-04-20 18:41:49 +01:00
Christian Brabandt
2c645e8b00 patch 8.2.4795: 'cursorbind' scrolling depends on whether 'cursorline' is set
Problem:    'cursorbind' scrolling depends on whether 'cursorline' is set.
Solution:   Always call validate_cursor(). (Christian Brabandt, closes #10230,
            closes #10014)
2022-04-20 14:52:01 +01:00
Bram Moolenaar
4c84dd33ad patch 8.2.4794: compiler warning for not initialized variable
Problem:    Compiler warning for not initialized variable.
Solution:   Initialize the variable. (John Marriott)
2022-04-20 10:22:54 +01:00
Bram Moolenaar
928a131356 patch 8.2.4793: recognizing Maxima filetype even though it might be another
Problem:    Recognizing Maxima filetype even though it might be another.
Solution:   Remove *.mc and *.dem patterns from Maxima files
2022-04-19 19:38:38 +01:00
Bram Moolenaar
e468698994 patch 8.2.4792: indent operator creates an undo entry for every line
Problem:    Indent operator creates an undo entry for every line.
Solution:   Create one undo entry for all lines. (closes #10227)
2022-04-19 18:28:45 +01:00
Charlie Groves
fef4485ef5 patch 8.2.4791: events triggered in different order when reusing buffer
Problem:    Autocmd events triggered in different order when reusing an empty
            buffer.
Solution:   Call buff_freeall() earlier. (Charlie Groves, closes #10198)
2022-04-19 16:24:12 +01:00
Bram Moolenaar
c448e9c950 patch 8.2.4790: lilypond filetype not recognized
Problem:    Lilypond filetype not recognized.
Solution:   Add patterns for lilypond. (Doug Kearns)
2022-04-19 15:29:57 +01:00
Bram Moolenaar
a653e53b1f patch 8.2.4789: cursor pos wrong when using :redraw while editing the cmdline
Problem:    The cursor may be in the in wrong place when using :redraw while
            editing the cmdline.
Solution:   When editing the command line let :redraw update the command line
            too. (closes #10210)
2022-04-19 11:38:24 +01:00
Yegappan Lakshmanan
bac9a9e5c2 patch 8.2.4788: large payload for LSP message not tested
Problem:    Large payload for LSP message not tested.
Solution:   Add a test with a large LSP payload. (Yegappan Lakshmanan,
            closes #10223)
2022-04-19 10:25:13 +01:00
LemonBoy
9bd3ce22e3 patch 8.2.4787: prop_find() does not find the right property
Problem:    prop_find() does not find the right property.
Solution:   Fix the scan order. (closes #10220)
2022-04-18 21:54:02 +01:00
Bram Moolenaar
861fcee8de patch 8.2.4786: test for win_gotoid() in Visual mode fails on Mac
Problem:    Test for win_gotoid() in Visual mode fails on Mac.
Solution:   Skip the test on MacOS.
2022-04-18 19:16:55 +01:00
Bram Moolenaar
3aca0916f0 patch 8.2.4785: Visual mode not stopped if win_gotoid() goes to other buffer
Problem:    Visual mode not stopped early enough if win_gotoid() goes to
            another buffer. (Sergey Vlasov)
Solution:   Stop Visual mode before jumping to another buffer. (closes #10217)
2022-04-18 18:32:19 +01:00
Bram Moolenaar
1693712f02 patch 8.2.4784: lamba test with timer is flaky
Problem:    Lamba test with timer is flaky.
Solution:   Adjust sleep time on retry.
2022-04-18 16:14:10 +01:00
Bram Moolenaar
42ccb8d747 patch 8.2.4783: Coverity warns for leaking memory
Problem:    Coverity warns for leaking memory.
Solution:   Use another strategy freeing "theline".
2022-04-18 15:45:23 +01:00
Bram Moolenaar
75ab590f85 Update runtime files 2022-04-18 15:36:40 +01:00
Bram Moolenaar
a929c922b1 patch 8.2.4782: accessing freed memory
Problem:    Accessing freed memory.
Solution:   Clear evalarg after checking for trailing characters.
            (issue #10218)
2022-04-18 15:21:17 +01:00
Doron Behar
d0a20c9d11 patch 8.2.4781: Maxima files are not recognized
Problem:    Maxima files are not recognized.
Solution:   Add patterns to detect Maxima files. (Doron Behar, closes #10211)
2022-04-18 14:32:42 +01:00
Yegappan Lakshmanan
03cca297df patch 8.2.4780: parsing an LSP message fails when it is split
Problem:    Parsing an LSP message fails when it is split.
Solution:   Collapse the received data before parsing. (Yegappan Lakshmanan,
            closes #10215)
2022-04-18 14:07:46 +01:00
Christian Brabandt
53e8f3ffdf patch 8.2.4779: lsan suppression is too version specific
Problem:    lsan suppression is too version specific.
Solution:   Leave out the version number. (Christian Brabandt, closes #10214)
2022-04-17 21:36:37 +01:00
Chaoren Lin
35cff32dd8 patch 8.2.4778: pacman files use dosini filetype
Problem:    Pacman files use dosini filetype.
Solution:   Use conf instead. (Chaoren Lin, closes #10213)
2022-04-17 21:15:48 +01:00
Bram Moolenaar
366f0bdd08 patch 8.2.4777: screendump tests fail because of a redraw
Problem:    Screendump tests fail because of a redraw.
Solution:   Do not output t_8u before receiving termresponse.  Redraw only
            when t_8u is not reset and termresponse is received.
2022-04-17 19:20:33 +01:00
Ernie Rael
9f53e7bd7f patch 8.2.4776: GTK: 'lines' and 'columns' may change during startup
Problem:    GTK: 'lines' and 'columns' may change during startup.
Solution:   Ignore stale GTK resize events. (Ernie Rael, closes #10179)
2022-04-17 18:27:49 +01:00
Bram Moolenaar
280aebfd35 patch 8.2.4775: SpellBad highlighting does not work in Konsole
Problem:    SpellBad highlighting does not work in Konsole.
Solution:   Do not keep t_8u defined for Konsole.  Redraw when t_8u is reset.
            (closes #10177)
2022-04-17 17:34:42 +01:00
Bram Moolenaar
8b91e71441 patch 8.2.4774: crash when using a number for lambda name
Problem:    Crash when using a number for lambda name.
Solution:   Check the type of the lambda reference.
2022-04-17 15:06:35 +01:00
Bram Moolenaar
a9549c9e8f patch 8.2.4773: build failure without the +eval feature
Problem:    Build failure without the +eval feature.
Solution:   Use other error message.  Avoid warnings.
2022-04-17 14:18:11 +01:00
Bram Moolenaar
3df8f6e353 patch 8.2.4772: old Coverity warning for not checking ftell() return value
Problem:    Old Coverity warning for not checking ftell() return value.
Solution:   Check return value of fseek() and ftell().
2022-04-17 14:01:51 +01:00
Bram Moolenaar
066e0d9869 patch 8.2.4771: Coverity warns for not checking return value
Problem:    Coverity warns for not checking return value.
Solution:   Check return value of rettv_dict_alloc().
2022-04-17 13:17:40 +01:00
Yegappan Lakshmanan
efbfa867a1 patch 8.2.4770: cannot easily mix expression and heredoc
Problem:    Cannot easily mix expression and heredoc.
Solution:   Support  in heredoc. (Yegappan Lakshmanan, closes #10138)
2022-04-17 12:47:40 +01:00
Bram Moolenaar
68aaff4697 patch 8.2.4769: build warning with UCRT
Problem:    Build warning with UCRT.
Solution:   Adjust #ifdef for _wenviron. (John Marriott)
2022-04-17 10:57:44 +01:00
Philip H
34ffa10280 patch 8.2.4768: CI: codecov upload sometimes does not work
Problem:    CI: codecov upload sometimes does not work.
Solution:   Use action v3 instead of v2. (closes #10209)
2022-04-16 21:46:38 +01:00
salkin-mada
c360b2566c patch 8.2.4767: openscad files are not recognized
Problem:    Openscad files are not recognized.
Solution:   Add a filetype pattern. (Niklas Adam, closes #10199)
2022-04-16 21:33:54 +01:00
KnoP-01
93c7a45e86 patch 8.2.4766: KRL files using "deffct" not recognized
Problem:    KRL files using "deffct" not recognized.
Solution:   Adjust the pattern used for matching. (Patrick Meiser-Knosowski,
            closes #10200)
2022-04-16 21:14:04 +01:00
Yegappan Lakshmanan
047a7019b2 patch 8.2.4765: function matchfuzzy() sorts too many items
Problem:    Function matchfuzzy() sorts too many items.
Solution:   Only put matches in the array. (Yegappan Lakshmanan,
            closes #10208)
2022-04-16 20:42:40 +01:00
Philip H
d2edee5cf3 patch 8.2.4764: CI uses an older gcc version
Problem:    CI uses an older gcc version.
Solution:   Use GCC 11. (closes #10185)
2022-04-16 20:04:30 +01:00
Bram Moolenaar
f50808ed13 patch 8.2.4763: using invalid pointer with "V:" in Ex mode
Problem:    Using invalid pointer with "V:" in Ex mode.
Solution:   Correctly handle the command being changed to "+".
2022-04-16 18:52:17 +01:00
zeertzjq
ca7e86c237 patch 8.2.4762: using freed memory using synstack() and synID() in WinEnter
Problem:    Using freed memory when using synstack() and synID() in WinEnter.
Solution:   Check using the syntax window. (closes #10204)
2022-04-16 16:49:24 +01:00
Yegappan Lakshmanan
e0805b849c patch 8.2.4761: documentation for using LSP messages is incomplete
Problem:    Documentation for using LSP messages is incomplete.
Solution:   Update the documentation. (Yegappan Lakshmanan, closes #10206)
2022-04-16 15:18:23 +01:00
Yasuhiro Matsumoto
9029a6e993 patch 8.2.4760: using matchfuzzy() on a long list can take a while
Problem:    Using matchfuzzy() on a long list can take a while.
Solution:   Add a limit to the number of matches. (Yasuhiro Matsumoto,
            closes #10189)
2022-04-16 12:35:35 +01:00
Bram Moolenaar
693ccd1160 patch 8.2.4759: CurSearch highlight does not work for multi-line match
Problem:    CurSearch highlight does not work for multi-line match.
Solution:   Check cursor position before adjusting columns. (closes #10133)
2022-04-16 12:04:37 +01:00
Yegappan Lakshmanan
3b470ae88f patch 8.2.4758: when using an LSP channel want to get the message ID
Problem:    When using an LSP channel want to get the message ID.
Solution:   Have ch_sendexpr() return the ID. (Yegappan Lakshmanan,
            closes #10202)
2022-04-16 10:41:27 +01:00
Philip H
b9e99e58bb patch 8.2.4757: list of libraries to suppress lsan errors is outdated
Problem:    List of libraries to suppress lsan errors is outdated.
Solution:   Add another library. (closes #10201)
2022-04-16 10:08:52 +01:00
Bram Moolenaar
092e09cba7 patch 8.2.4756: build error without the +eval feature
Problem:    Build error without the +eval feature.
Solution:   Adjust #ifdefs.
2022-04-15 23:29:23 +01:00
Bram Moolenaar
12eb2eb4d7 patch 8.2.4755: cannot use <SID>FuncRef in completion spec
Problem:    Cannot use <SID>FuncRef in completion spec.
Solution:   Dereference a function name in another way. (closes #10197)
2022-04-15 22:57:09 +01:00
LemonBoy
7714231bb5 patch 8.2.4754: using cached values after unsetting some environment variables
Problem:    Still using cached values after unsetting some known environment
            variables.
Solution:   Take care of the side effects. (closes #10194)
2022-04-15 20:50:46 +01:00
Bram Moolenaar
31e5c60a68 patch 8.2.4753: error from setting an option is silently ignored
Problem:    Error from setting an option is silently ignored.
Solution:   Handle option value errors better.  Fix uses of N_().
2022-04-15 13:53:33 +01:00
zeertzjq
5dc294a7b6 patch 8.2.4752: wrong 'statusline' value can cause illegal memory access
Problem:    Wrong 'statusline' value can cause illegal memory access.
Solution:   Properly check the value. (closes #10192)
2022-04-15 13:17:57 +01:00
Bram Moolenaar
648dd88af6 patch 8.2.4751: mapping <SID>name.Func does not work for autoload script
Problem:    Mapping <SID>name.Func does not work for script in autoload
            directory.
Solution:   Use the # form for a script in the autoload directory.
            (closes #10186)
2022-04-14 21:36:15 +01:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
b836658a04 patch 8.2.4750: small pieces of dead code
Problem:    Small pieces of dead code.
Solution:   Remove the dead code. (Goc Dundar, closes #10190) Rename the
            qftf_cb struct member to avoid confusion.
2022-04-14 20:43:56 +01:00
LemonBoy
eca7c60d68 patch 8.2.4749: <script> is not expanded in autocmd context
Problem:    <script> is not expanded in autocmd context.
Solution:   Add the context to the pattern struct. (closes #10144)
            Rename AutoPatCmd to AutoPatCmd_T.
2022-04-14 15:39:43 +01:00
Bram Moolenaar
8944551534 patch 8.2.4748: cannot use an imported function in a mapping
Problem:    Cannot use an imported function in a mapping.
Solution:   Recognize <SID>name.Func.
2022-04-14 12:58:23 +01:00
KnoP-01
f420ff2440 patch 8.2.4747: no filetype override for .sys files
Problem:    No filetype override for .sys files.
Solution:   Add g:filetype_sys. (Patrick Meiser-Knosowski, closes #10181)
2022-04-13 20:46:21 +01:00
ranjithshegde
8cac20ed42 patch 8.2.4746: supercollider filetype not recognized
Problem:    Supercollider filetype not recognized.
Solution:   Match file extentions and check file contents to detect
            supercollider. (closes #10142)
2022-04-13 15:29:21 +01:00
Bram Moolenaar
aae9762b2c patch 8.2.4745: using wrong flag for using bell in the terminal
Problem:    Using wrong flag for using bell in the terminal.
Solution:   Change to use BO_TERM.
2022-04-13 14:28:07 +01:00
LemonBoy
77771d33f4 patch 8.2.4744: a terminal window can't use the bell
Problem:    A terminal window can't use the bell.
Solution:   Add bell support for the terminal window. (closes #10178)
2022-04-13 11:47:25 +01:00
Philip H
9bbe5c6b8c patch 8.2.4743: clang 14 is available on CI
Problem:    Clang 14 is available on CI.
Solution:   Switch from clang 13 to 14. (closes #10157)
2022-04-12 15:40:12 +01:00
Bram Moolenaar
c9a9a0ac1e patch 8.2.4742: there is no way to start logging very early in startup
Problem:    There is no way to start logging very early in startup.
Solution:   Add the --log argument.  Include the date in the start message in
            the log file.  Avoid a duplicate message when forking.  Log an
            executed shell command.
2022-04-12 15:09:23 +01:00
Bram Moolenaar
60895f3e36 patch 8.2.4741: startup test fails
Problem:    Startup test fails.
Solution:   Avoid an error for verbose expansion.  Fix that the "0verbose"
            command modifier doesn't work.
2022-04-12 14:23:19 +01:00
Bram Moolenaar
575445200b patch 8.2.4740: when expand() fails there is no error message
Problem:    When expand() fails there is no error message.
Solution:   When 'verbose' is set give an error message.
2022-04-12 12:54:11 +01:00
zeertzjq
d58862d18f patch 8.2.4739: accessing freed memory after WinScrolled autocmd event
Problem:    Accessing freed memory after WinScrolled autocmd event.
Solution:   Check the window pointer is still valid. (closes #10156)
            Remove the argument from may_trigger_winscrolled().
2022-04-12 11:32:48 +01:00
Bram Moolenaar
11a57dfd16 patch 8.2.4738: Esc on commandline executes command instead of abandoning it
Problem:    Esc on commandline executes command instead of abandoning it.
Solution:   Save and restore KeyTyped when removing the popup menu.
            (closes #10154)
2022-04-11 19:38:56 +01:00
Bram Moolenaar
1655619717 patch 8.2.4737: // in JavaScript string recognized as comment
Problem:    // in JavaScript string recognized as comment.
Solution:   Only check for linecomment if 'cindent' is set. (closes #10151)
2022-04-11 17:36:37 +01:00
Bram Moolenaar
825b55e695 patch 8.2.4736: build problem for Cygwin with Motif
Problem:    Build problem for Cygwin with Motif.
Solution:   Undefine ControlMask. (Kelvin Lee, closes #10152)
2022-04-11 15:28:50 +01:00
Yegappan Lakshmanan
4a7724a440 patch 8.2.4735: quickfix tests can be a bit hard to read
Problem:    Quickfix tests can be a bit hard to read.
Solution:   Use heredoc instead of strings and line continuation. (Yegappan
            Lakshmanan, closes #10145)
2022-04-11 15:11:39 +01:00
Bram Moolenaar
3caf1cce2b patch 8.2.4734: getcharpos() may change a mark position
Problem:    getcharpos() may change a mark position.
Solution:   Copy the mark position. (closes #10148)
2022-04-11 13:05:16 +01:00
Aaron Tinio
4232dff815 patch 8.2.4733: HEEx and Surface do need a separate filetype
Problem:    HEEx and Surface do need a separate filetype.
Solution:   Revert 8.2.4729. (closes #10147)
2022-04-11 11:37:13 +01:00
Bram Moolenaar
c6e0a5e98c patch 8.2.4732: duplicate code to free fuzzy matches
Problem:    Duplicate code to free fuzzy matches.
Solution:   Bring back fuzmatch_str_free().
2022-04-10 18:09:06 +01:00
LemonBoy
db0ea7f2b0 patch 8.2.4731: the changelist index is not remembered per buffer
Problem:    The changelist index is not remembered per buffer.
Solution:   Keep the changelist index per window and buffer. (closes #10135,
            closes #2173)
2022-04-10 17:59:26 +01:00
Yasuhiro Matsumoto
e08fde0073 patch 8.2.4730: MS-Windows GUI: cannot use CTRL-/
Problem:    MS-Windows GUI: cannot use CTRL-/.
Solution:   Handle the WM_KEYUP event. (Yasuhiro Matsumoto, closes #10141)
2022-04-10 12:37:48 +01:00
Aaron Tinio
fa76a24109 patch 8.2.4729: HEEx and Surface templates do not need a separate filetype
Problem:    HEEx and Surface templates do not need a separate filetype.
Solution:   Use Eelixir for the similar filetypes. (Aaron Tinio, closes #10124)
2022-04-10 12:13:56 +01:00
zeertzjq
021996ffaa patch 8.2.4728: no test that v:event cannot be modified
Problem:    No test that v:event cannot be modified.
Solution:   Add a test. (closes #10139)
2022-04-10 11:44:04 +01:00
Dominique Pelle
7765f5cf96 patch 8.2.4727: unused code
Problem:    Unused code.
Solution:   Remove code and add #ifdefs. (Dominique Pellé, closes #10136)
2022-04-10 11:26:53 +01:00
LemonBoy
6013d0045d patch 8.2.4726: cannot use expand() to get the script name
Problem:    Cannot use expand() to get the script name.
Solution:   Support expand('<script>'). (closes #10121)
2022-04-09 21:42:10 +01:00
Bram Moolenaar
2ce97ae6aa patch 8.2.4725: unused variable in tiny build
Problem:    Unused variable in tiny build.
Solution:   Add #ifdef.
2022-04-09 21:13:51 +01:00
LemonBoy
a43993897a patch 8.2.4724: current instance of last search pattern not easily spotted
Problem:    Current instance of last search pattern not easily spotted.
Solution:   Add CurSearch highlighting. (closes #10133)
2022-04-09 21:04:08 +01:00
LemonBoy
2bf52dd065 patch 8.2.4723: the ModeChanged autocmd event is inefficient
Problem:    The ModeChanged autocmd event is inefficient.
Solution:   Avoid allocating memory. (closes #10134)  Rename
            trigger_modechanged() to may_trigger_modechanged().
2022-04-09 18:17:34 +01:00
zeertzjq
81b46a6ccd patch 8.2.4722: ending recording with mapping records too much
Problem:    When a recording is ended with a mapped key that key is also
            recorded.
Solution:   Remember the previous last_recorded_len. (closes #10122)
2022-04-09 17:58:49 +01:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
36951ed1da patch 8.2.4721: cooklang files are not recognized
Problem:    Cooklang files are not recognized.
Solution:   recognize *.cook files. (Goc Dundar, closes #10120)
2022-04-09 16:08:08 +01:00
KnoP-01
b09c320039 patch 8.2.4720: ABB Rapid files are not recognized properly
Problem:    ABB Rapid files are not recognized properly.
Solution:   Add checks for ABB Rapid files. (Patrick Meiser-Knosowski,
            closes #10104)
2022-04-09 15:20:28 +01:00
Bram Moolenaar
0bbf09ca41 patch 8.2.0003: Build file dependencies are incomplete
Problem:    Build file dependencies are incomplete.
Solution:   Fix the dependencies. (Ken Takata, closes #5356)
2022-04-09 15:16:53 +01:00
Christian Brabandt
a0f659c76e patch 8.2.4719: ">" marker sometimes not displayed in the jumplist
Problem:    ">" marker sometimes not displayed in the jumplist.
Solution:   If the buffer no longer exists show "-invalid-". (Christian
            Brabandt, closes #10131, closes #10100)
2022-04-09 13:35:00 +01:00
Bram Moolenaar
cee9c844f2 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Problem:    @@@ in the last line sometimes drawn in the wrong place.
Solution:   Make sure the column is valid. (closes #10130)
2022-04-09 12:40:13 +01:00
Bram Moolenaar
a016eeba7a patch 8.2.4717: for TextYankPost v:event does not contain all information
Problem:    For TextYankPost v:event does not contain information about the
            operation being inclusive or not.
Solution:   Add "inclusive" to v:event. (Justn M. Keyes, Yegappan Lakshmanan,
            closes #10125)
2022-04-09 11:37:38 +01:00
Yegappan Lakshmanan
7c7e19cf50 patch 8.2.4716: memory allocation failure not tested when defining a function
Problem:    Memory allocation failure not tested when defining a function.
Solution:   Add a test. (Yegappan Lakshmanan, closes #10127)
2022-04-09 11:09:07 +01:00
Julien Voisin
5e1792270a patch 8.2.4715: Vagrantfile not recognized
Problem:    Vagrantfile not recognized.
Solution:   Recognize Vagrantfile as ruby. (Julien Voisin, closes #10119)
2022-04-08 19:55:39 +01:00
Bram Moolenaar
cbaff5e06e Update runtime files 2022-04-08 17:45:08 +01:00
Bram Moolenaar
a8034a4886 patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Problem:    Using g:filetype_dat and g:filetype_src not tested.
Solution:   Add a test. (Patrick Meiser-Knosowski, closes #10117)
2022-04-08 17:26:26 +01:00
LemonBoy
0937182d49 patch 8.2.4713: plugins cannot track text scrolling
Problem:    Plugins cannot track text scrolling.
Solution:   Add the WinScrolled event. (closes #10102)
2022-04-08 15:18:45 +01:00
Yegappan Lakshmanan
18ee0f603e patch 8.2.4712: only get profiling information after exiting
Problem:    Only get profiling information after exiting.
Solution:   Add "profile dump" and "profile stop". (Marco Hinz, Yegappan
            Lakshmanan, closes #10107)
2022-04-08 13:23:19 +01:00
zeertzjq
3a56b6d405 patch 8.2.4711: when 'insermode' is set :edit from <Cmd> mapping misbehaves
Problem:    When 'insermode' is set :edit from <Cmd> mapping misbehaves.
Solution:   Don't set "need_start_insertmode" when already in Insert mode.
            (closes #10116)
2022-04-08 11:56:14 +01:00
Christian Brabandt
ac72c21da6 patch 8.2.4710: smart indenting does not work after completion
Problem:    Smart indenting does not work after completion.
Solution:   Set "can_si". (Christian Brabandt, closes #10113, closes #558)
2022-04-07 21:00:53 +01:00
Bram Moolenaar
5017c66bd4 patch 8.2.4709: after :redraw the statusline highlight might be used
Problem:    After :redraw the statusline highlight might be used.
Solution:   Clear the screen attribute after redrawing the screen.
            (closes #10108)
2022-04-07 18:06:08 +01:00
Julien Voisin
177847e67a patch 8.2.4708: PHP test files are not recognized
Problem:    PHP test files are not recognized.
Solution:   Add the *.phpt pattern. (Julien Voisin, closes #10112)
2022-04-07 16:01:13 +01:00
zeertzjq
8c97960850 patch 8.2.4707: redrawing could be a bit more efficient
Problem:    Redrawing could be a bit more efficient.
Solution:   Optimize redrawing. (closes #10105)
2022-04-07 15:08:01 +01:00
zeertzjq
6a06940f8a patch 8.2.4706: buffer remains active with WinClosed and tabpages
Problem:    Buffer remains active if a WinClosed event throws an exception
            when there are multiple tabpages.
Solution:   Ignore aborting() when closing the buffer. (closes #10101)
2022-04-07 14:08:29 +01:00
zeertzjq
6d4e725a34 patch 8.2.4705: jump list marker disappears
Problem:    Jump list marker disappears.
Solution:   Reset reg_executing later. (closes #10111, closes #10100)
2022-04-07 13:58:04 +01:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
f26c16144d patch 8.2.4704: using "else" after return or break increases indent
Problem:    Using "else" after return or break increases indent.
Solution:   Remove "else" and reduce indent. (Goc Dundar, closes #10099)
2022-04-07 13:26:34 +01:00
Bram Moolenaar
cb49a1d934 patch 8.2.4703: memory leak in handling 'cinscopedecls'
Problem:    Memory leak in handling 'cinscopedecls'.
Solution:   Free the memory before returning.
2022-04-07 13:08:00 +01:00
Tom Praschan
3506cf34c1 patch 8.2.4702: C++ scope labels are hard-coded
Problem:    C++ scope labels are hard-coded.
Solution:   Add 'cinscopedecls' to define the labels. (Rom Praschan,
            closes #10109)
2022-04-07 12:39:08 +01:00
Bram Moolenaar
3ad2090316 patch 8.2.4701: Kuka Robot Language files not recognized
Problem:    Kuka Robot Language files not recognized.
Solution:   Recognize *.src and *.dat files. (Patrick Meiser-Knosowski,
            closes #10096)
2022-04-06 18:57:39 +01:00
Bram Moolenaar
c947b9ae41 patch 8.2.4700: buffer remains active if WinClosed event throws an exception
Problem:    Buffer remains active if a WinClosed event throws an exception.
Solution:   Ignore aborting() when closing the buffer. (closes #10097)
2022-04-06 17:59:21 +01:00
LemonBoy
75a0f3c011 patch 8.2.4699: hard to reproduce hang when reading from a channel
Problem:    Hard to reproduce hang when reading from a channel.
Solution:   Check for readahead before starting to wait. (closes #10093,
            closes #7781, closes #6364)
2022-04-05 22:03:30 +01:00
Bram Moolenaar
aa7d0c2335 patch 8.2.4698: Vim9: script variable has no flag that it was set
Problem:    Vim9: script variable has no flag that it was set.
Solution:   Add a flag that it was set, to avoid giving it a value when used.
            (closes #10088)
2022-04-05 21:40:38 +01:00
Bram Moolenaar
0d1f55c044 patch 8.2.4697: Vim9: crash when adding a duplicate key to a dictionary
Problem:    Vim9: crash when adding a duplicate key to a dictionary.
Solution:   Clear the stack item when it has been moved into the dictionary.
            (closes #10087)
2022-04-05 17:30:29 +01:00
zeertzjq
478700336d patch 8.2.4696: delete() with "rf" argument does not report a failure
Problem:    delete() with "rf" argument does not report a failure.
Solution:   Return -1 if the directory could not be removed. (closes #10078)
2022-04-05 15:31:01 +01:00
LemonBoy
beb0ef1ab2 patch 8.2.4695: JSON encoding could be faster
Problem:    JSON encoding could be faster.
Solution:   Optimize encoding JSON strings. (closes #10086)
2022-04-05 15:07:32 +01:00
ichizok
02560424bf patch 8.2.4694: avoidance of #elif causes more preproc nesting
Problem:    Avoidance of #elif causes more preproc nesting.
Solution:   Use #elif where it is useful. (Ozaki Kiichi, closes #10081)
2022-04-05 14:18:44 +01:00
Bram Moolenaar
72bb10df1f patch 8.2.4693: new regexp does not accept pattern "\%>0v"
Problem:    new regexp does not accept pattern "\%>0v".
Solution:   Do accept digit zero.
2022-04-05 14:00:32 +01:00
zeertzjq
0f68e6c07a patch 8.2.4692: no test for what 8.2.4691 fixes
Problem:    No test for what 8.2.4691 fixes.
Solution:   Add a test.  Use a more generic sotlution. (closes #10090)
2022-04-05 13:17:01 +01:00
Bram Moolenaar
ca9d8d2cb9 patch 8.2.4691: solution for <Cmd> in a mapping causes trouble
Problem:    Solution for <Cmd> in a mapping causes trouble.
Solution:   Use another solution: put back CTRL-O after reading the <Cmd>
            sequence.
2022-04-04 22:09:30 +01:00
LemonBoy
1b76a8dfe2 patch 8.2.4690: channel tests fail on MS-Windows
Problem:    Channel tests fail on MS-Windows.
Solution:   Check if the AF_UNIX attribute exists. (closes #10083)
2022-04-04 21:13:35 +01:00
Bram Moolenaar
d0fb2d8041 patch 8.2.4689: using <Cmd> in a mapping does not work for mouse keys
Problem:    Using <Cmd> in a mapping does not work for mouse keys in Insert
            mode. (Sergey Vlasov)
Solution:   When reading the <Cmd> argument do not use the stuff buffer.
            (closes #10080)
2022-04-04 21:03:52 +01:00
Bram Moolenaar
91ff3d4f52 patch 8.2.4688: new regexp engine does not give an error for "\%v"
Problem:    New regexp engine does not give an error for "\%v".
Solution:   Check for a value argument. (issue #10079)
2022-04-04 18:32:32 +01:00
Bram Moolenaar
e8a4c0d91f patch 8.2.4687: "vimgrep /\%v/ *" may cause a crash
Problem:    "vimgrep /\%v/ *" may cause a crash.
Solution:   When compiling the pattern with the old engine fails, restore the
            regprog of the new engine instead of leaving it NULL.
            (closes #10079)
2022-04-04 18:14:34 +01:00
Kelvin Lee
b471690fad patch 8.2.4686: configure doesn't find the Motif library with Cygwin
Problem:    Configure doesn't find the Motif library with Cygwin.
Solution:   Check for libXm.dll.a. (Kelvin Lee, closes #10077)
2022-04-04 17:20:01 +01:00
Bram Moolenaar
188639d75c patch 8.2.4685: when a swap file is found for a popup there is no dialog
Problem:    When a swap file is found for a popup there is no dialog and the
            buffer is loaded anyway.
Solution:   Silently load the buffer read-only. (closes #10073)
2022-04-04 16:57:21 +01:00
LemonBoy
cc766a85f4 patch 8.2.4684: cannot open a channel on a Unix domain socket
Problem:    Cannot open a channel on a Unix domain socket.
Solution:   Add Unix domain socket support. (closes #10062)
2022-04-04 15:46:58 +01:00
Yegappan Lakshmanan
4829c1c9e9 patch 8.2.4683: verbose check with dict_find() to see if a key is present
Problem:    Verbose check with dict_find() to see if a key is present.
Solution:   Add dict_has_key(). (Yegappan Lakshmanan, closes #10074)
2022-04-04 15:16:54 +01:00
Bram Moolenaar
7a411a306f patch 8.2.4682: Vim9: can use :unlockvar for const variable
Problem:    Vim9: can use :unlockvar for const variable. (Ernie Rael)
Solution:   Check whether the variable is a const.
2022-04-04 14:58:06 +01:00
Bram Moolenaar
15f74fab65 patch 8.2.4681: build fails with a combination of features
Problem:    Build fails with a combination of features.
Solution:   Remove #ifdef for alloc_clear_id(). (John Marriott)
2022-04-03 21:57:26 +01:00
Bram Moolenaar
242c152c08 patch 8.2.4680: build failure without +postscript
Problem:    Build failure without +postscript.
Solution:   Use another error message.
2022-04-03 21:52:51 +01:00
Yegappan Lakshmanan
2b74b6805b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Problem:    Cannot have expandcmd() give an error message for mistakes.
Solution:   Add an optional argument to give errors. Fix memory leak when
            expanding files fails. (Yegappan Lakshmanan, closes #10071)
2022-04-03 21:30:32 +01:00
Bram Moolenaar
1061195057 patch 8.2.4678: Vim9: not all code is tested
Problem:    Vim9: not all code is tested.
Solution:   Add a few more tests.
2022-04-03 21:11:34 +01:00
Bram Moolenaar
0b962e5685 patch 8.2.4677: the Athena GUI support is outdated
Problem:    The Athena GUI support is outdated.
Solution:   Remove the Athena GUI code.
2022-04-03 18:02:37 +01:00
Bram Moolenaar
292e1b9f68 patch 8.2.4676: test fails with different error
Problem:    Test fails with different error.
Solution:   Add argument for :elseif.
2022-04-03 16:59:02 +01:00
Bram Moolenaar
fa010cdfb1 patch 8.2.4675: no error for missing expression after :elseif
Problem:    No error for missing expression after :elseif. (Ernie Rael)
Solution:   Check for missing expression. (closes #10068)
2022-04-03 16:13:07 +01:00
Ernie Rael
c4cb544cd5 patch 8.2.4674: cannot force getting MouseMove events
Problem:    Cannot force getting MouseMove events.
Solution:   Add the 'mousemoveevent' option with implementaiton for the GUI.
            (Ernie Rael, closes #10044)
2022-04-03 15:47:28 +01:00
Bram Moolenaar
8ef6997e2d patch 8.2.4673: redrawing a split window is slow when using CTRL-F and CTRL-B
Problem:    Redrawing a vertically split window is slow when using CTRL-F and
            CTRL-B.
Solution:   When deciding on USE_REDRAW bail out if scrolling more than three
            lines. (issue #8002)
2022-04-03 13:23:22 +01:00
Bram Moolenaar
ce416b453a patch 8.2.4672: using :normal with Ex mode may make :substitute hang
Problem:    Using :normal with Ex mode may make :substitute hang.
Solution:   When getting an empty line behave like 'q' was typed.
            (closes #10070)
2022-04-03 12:59:34 +01:00
LemonBoy
a3157a476b patch 8.2.4671: 'wildignorecase' is sometimes not used for glob()
Problem:    'wildignorecase' is sometimes not used for glob().
Solution:   Also use 'wildignorecase' when there are no wildcards.
            (closes #10066, closes #8350)
2022-04-03 11:58:31 +01:00
Yegappan Lakshmanan
72bb47e38f patch 8.2.4670: memory allocation failures for new tab page not tested
Problem:    Memory allocation failures for new tab page not tested.
Solution:   Add tests with failing memory allocation. (Yegappan Lakshmanan,
            closes #10067)
2022-04-03 11:22:38 +01:00
LemonBoy
58f331a05f patch 8.2.4669: in compiled code len('string') is not inlined
Problem:    In compiled code len('string') is not inlined.
Solution:   Compute the length at compile time if possible. (closes #10065)
2022-04-02 21:59:06 +01:00
Yegappan Lakshmanan
0dac1ab579 patch 8.2.4668: buffer allocation failures insufficiently tested
Problem:    Buffer allocation failures insufficiently tested.
Solution:   Add tests for memory allocation failures. (Yegappan Lakshmanan,
            closes #10064)
2022-04-02 21:46:19 +01:00
Yegappan Lakshmanan
5018a836c0 patch 8.2.4667: expandcmd() fails on an error
Problem:    expandcmd() fails on an error.
Solution:   On failure return the command unmodified. (yegappan Lakshmanan,
            closes #10063)
2022-04-02 21:12:21 +01:00
Bram Moolenaar
97f8c1081e patch 8.2.4666: Vim9: assignment not recognized in skipped block
Problem:    Vim9: assignment not recognized in skipped block.
Solution:   When skipping assume identifier exists. (closes #10059)
2022-04-02 19:43:57 +01:00
Bram Moolenaar
eabddc425e patch 8.2.4665: popup with "minwidth" and scrollbar not updated properly
Problem:    Popup with "minwidth" and scrollbar not updated properly.
Solution:   Adjust the computation if the window width. (closes #10061)
2022-04-02 15:32:16 +01:00
Bruno Roque
c1658a196b patch 8.2.4664: Elvish files are not recognized
Problem:    Elvish files are not recognized.
Solution:   Recognize .elv files. (Bruno Roque, closes #10058)
2022-04-02 10:48:24 +01:00
Bram Moolenaar
17fa233f6f patch 8.2.4663: occasional crash when running the GUI tests
Problem:    Occasional crash when running the GUI tests.
Solution:   Check that the line index is not too high. (closes #8681)
2022-04-01 19:44:47 +01:00
Bram Moolenaar
22ebd172e4 patch 8.2.4662: no error for using out of range list index
Problem:    No error for using out of range list index.
Solution:   Check list index at script level like in compiled function.
            (closes #10051)
2022-04-01 15:26:58 +01:00
Bram Moolenaar
ffe6e646dc patch 8.2.4661: Coverity warning for using uninitialized variable
Problem:    Coverity warning for using uninitialized variable.
Solution:   Initialize variable to NULL.
2022-04-01 13:23:47 +01:00
Bram Moolenaar
782c6744b4 patch 8.2.4660: cursorcolumn is sometimes not correct
Problem:    Cursorcolumn is sometimes not correct.
Solution:   Recompute the cursor column when entering Insert mode and the
            cursor is on a character wider than a screen cell.
2022-04-01 12:06:31 +01:00
Bram Moolenaar
96e08e028c patch 8.2.4659: invalid memory access when using printable function name
Problem:    Invalid memory access when using printable function name.
Solution:   Adjust copied name length.
2022-03-31 21:40:33 +01:00
ranjithshegde
3a6f952cc8 patch 8.2.4658: org-mode files are not recognized
Problem:    Org-mode files are not recognized.
Solution:   Add patterns to recognize "org" files. (closes #10046)
2022-03-31 20:24:35 +01:00
Bram Moolenaar
a6c18d38ca patch 8.2.4657: errors for functions are sometimes hard to read
Problem:    Errors for functions are sometimes hard to read.
Solution:   Use printable_func_name() in more places.
2022-03-31 20:02:56 +01:00
Bram Moolenaar
ccbfd4883f patch 8.2.4656: Vim9: can't use item from "import autoload" with autoload dir
Problem:    Vim9: can't use items from "import autoload" with autoload
            directory name.
Solution:   Let sn_autoload_prefix overrule sn_import_autoload.
            (closes #10054)
2022-03-31 16:18:23 +01:00
Yegappan Lakshmanan
1104a6d0c2 patch 8.2.4655: cmdline completion popup menu positioned wrong
Problem:    Command line completion popup menu positioned wrong when using a
            terminal window.
Solution:   Position the popup menu differently when editing the command line.
            (Yegappan Lakshmanan, closes #10050, closes #10035)
2022-03-31 12:34:15 +01:00
Bram Moolenaar
49d008d96b patch 8.2.4654: missing changes for import check
Problem:    Missing changes for import check.
Solution:   Add missing changes.
2022-03-31 11:51:21 +01:00
Bram Moolenaar
4dea2d92e4 patch 8.2.4653: "import autoload" does not check the file name
Problem:    "import autoload" does not check the file name.
Solution:   Give an error if the file is not readable. (closes #10049)
2022-03-31 11:37:57 +01:00
Bram Moolenaar
d1d2684c80 patch 8.2.4652: leaking memory if assignment fails
Problem:    Leaking memory if assignment fails.
Solution:   Clear assigned value on failure.
2022-03-31 10:13:47 +01:00
Bram Moolenaar
1712518f48 patch 8.2.4651: test fails because path differs
Problem:    Test fails because path differs.
Solution:   Only compare the tail of the path.
2022-03-30 21:57:50 +01:00
Bram Moolenaar
c0ceeeb839 patch 8.2.4650: "import autoload" only works with using 'runtimepath'
Problem:    "import autoload" only works with using 'runtimepath'.
Solution:   Also support a relative and absolute file name.
2022-03-30 21:12:27 +01:00
Bram Moolenaar
b4ad3b0dea patch 8.2.4649: various formatting problems
Problem:    Various formatting problems.
Solution:   Improve the code formatting.
2022-03-30 10:57:45 +01:00
Bram Moolenaar
46eea444d9 Update runtime files 2022-03-30 10:51:39 +01:00
Yegappan Lakshmanan
9247a221ce patch 8.2.4648: handling LSP messages is a bit slow
Problem:    Handling LSP messages is a bit slow.
Solution:   Included support for LSP messages. (Yegappan Lakshmanan,
            closes #10025)
2022-03-30 10:16:05 +01:00
Bram Moolenaar
2bdad61267 patch 8.2.4647: "source" can read past end of copied line
Problem:    "source" can read past end of copied line.
Solution:   Add a terminating NUL.
2022-03-29 19:52:12 +01:00
Bram Moolenaar
b55986c52d patch 8.2.4646: using buffer line after it has been freed
Problem:    Using buffer line after it has been freed in old regexp engine.
Solution:   After getting mark get the line again.
2022-03-29 13:24:58 +01:00
James Cherti
fd01280d01 patch 8.2.4645: 'shortmess' changed when session does not store options
Problem:    'shortmess' changed when session does not store options.
Solution:   Save and restore 'shortmess' if needed. (James Charti,
            closes #10037)
2022-03-29 12:02:57 +01:00
Lewis Russell
1624639ec8 patch 8.2.4644: redrawing too often when 'relativenumber' is set
Problem:    Redrawing too often when 'relativenumber' is set.
Solution:   Only redraw when the cursor line changed. (Lewis Russell,
            closes #10040)
2022-03-29 11:38:17 +01:00
Bram Moolenaar
24565cf27b patch 8.2.4643: Vim9: variable may be locked unintentionally
Problem:    Vim9: variable may be locked unintentionally.
Solution:   Clear "v_lock". (closes #10036)
2022-03-28 18:16:52 +01:00
Bram Moolenaar
859cc21c6b patch 8.2.4642: Vim9: in :def function script var cannot be null
Problem:    Vim9: in :def function script var cannot be null.
Solution:   Only initialize a script variable when not set to a null value.
            (closes #10034)
2022-03-28 15:22:35 +01:00
Bram Moolenaar
471b3aed3e patch 8.2.4641: may mark the wrong window for redrawing
Problem:    May mark the wrong window for redrawing.
Solution:   Use redraw_win_later(). (closes #10032)
2022-03-28 12:41:19 +01:00
James McCoy
8be423b7ac patch 8.2.4640: some boolean options use "long" instead of "int"
Problem:    Some boolean options use "long" instead of "int".
Solution:   Adjust the type. (James McCoy, closes #10033)
2022-03-28 11:55:12 +01:00
kylo252
9dac9b1751 patch 8.2.4639: not sufficient parenthesis in preprocessor macros
Problem:    Not sufficient parenthesis in preprocessor macros.
Solution:   Add more parenthesis. (closes #10031)
2022-03-27 20:05:17 +01:00
zeertzjq
3e559cd884 patch 8.2.4638: superfluous check if a redraw is needed for 'cursorline'
Problem:    Superfluous check if a redraw is needed for 'cursorline'.
Solution:   Remove check_redraw_cursorline(). (closes #10030, closes #10029)
2022-03-27 19:26:55 +01:00
Bram Moolenaar
565d1278cb patch 8.2.4637: warning for using uninitialized variable
Problem:    Warning for using uninitialized variable. (Tony Mechelynck)
Solution:   Initialize it.
2022-03-27 18:11:05 +01:00
Bram Moolenaar
1501b63f8d patch 8.2.4636: not using Visual range
Problem:    Not using Visual range.
Solution:   Put the command pointer back to the range.
2022-03-27 16:56:21 +01:00
Bram Moolenaar
501f978288 patch 8.2.4635: tests using null list or dict fail
Problem:    Tests using null list or dict fail.
Solution:   Only use the new rules for Vim9 script.
2022-03-27 16:51:04 +01:00
Bram Moolenaar
ec15b1cfdc patch 8.2.4634: Vim9: cannot initialize a variable to null_list
Problem:    Vim9: cannot initialize a variable to null_list.
Solution:   Give negative count to NEWLIST. (closes #10027)
            Also fix inconsistencies in comparing with null values.
2022-03-27 16:29:53 +01:00
Bram Moolenaar
c75bca3ee9 patch 8.2.4633: Visual range does not work before command modifiers
Problem:    Visual range does not work before command modifiers.
Solution:   Move Visual range to after command modifiers.
2022-03-27 13:36:50 +01:00
Bram Moolenaar
f3980dc5d0 patch 8.2.4632: using freed memory in flatten()
Problem:    Using freed memory in flatten().
Solution:   Clear typval after recursing into list.
2022-03-26 16:42:23 +00:00
Bram Moolenaar
347538fad0 patch 8.2.4631: crash when switching window in BufWipeout autocommand
Problem:    Crash when switching window in BufWipeout autocommand.
Solution:   Put any buffer in the window to avoid it being NULL.
            (closes #10024)
2022-03-26 16:28:06 +00:00
Bram Moolenaar
bf269ed0b0 patch 8.2.4630: 'cursorline' not always updated with 'culopt' is "screenline"
Problem:    'cursorline' not always updated with 'cursorlineopt' is
            "screenline".
Solution:   Call check_redraw_cursorline() more often. (closes #10013)
2022-03-26 13:28:14 +00:00
Bram Moolenaar
c6c1ec4da5 patch 8.2.4629: flattennew() makes a deep copy unnecessarily
Problem:    flattennew() makes a deep copy unnecessarily.
Solution:   Use a shallow copy. (issue #10012)
2022-03-26 10:50:11 +00:00
Yegappan Lakshmanan
5e877baf87 patch 8.2.4628: not enough testing for 2/3 letter substitute commands
Problem:    Not enough testing for 2/3 letter substitute commands.
Solution:   Add more tests. (Yegappan Lakshmanan, closes #10019)
2022-03-25 21:19:26 +00:00
Bram Moolenaar
acf7d73a7f patch 8.2.4627: flatten() does not use maxdepth correctly
Problem:    flatten() does not use maxdepth correctly.
Solution:   Use a recursive implementation. (closes #10020)
2022-03-25 19:50:57 +00:00
Bram Moolenaar
abb6fbd14d patch 8.2.4626: Visual area not updated when removing sign in Visual mode
Problem:    Visual area not fully updated when removing sign in Visual mode
            while scrolling.
Solution:   Adjust check for topline. (closes #10017)
2022-03-25 15:42:27 +00:00
Bram Moolenaar
90da27b927 patch 8.2.4625: old Coverity warning for resource leak
Problem:    Old Coverity warning for resource leak.
Solution:   Call FreeWild() if expanding matches did not fail.
2022-03-25 14:54:18 +00:00
Bram Moolenaar
5d46dcfeed patch 8.2.4624: old Coverity warning for resource leak
Problem:    Old Coverity warning for resource leak.
Solution:   Close the file if memory allocation fails.
2022-03-25 14:46:47 +00:00
Bram Moolenaar
03a297c63f patch 8.2.4623: Coverity warns for using uninitialized field
Problem:    Coverity warns for using uninitialized field.
Solution:   Initialize he field to zero.
2022-03-25 14:39:51 +00:00
Bram Moolenaar
43216611a5 patch 8.2.4622: Vim9: crash with :execute and :finish
Problem:    Vim9: Crash with :execute and :finish. (Sergey Vlasov)
Solution:   Check for NULL. (closes #10011)
2022-03-25 11:16:28 +00:00
Bram Moolenaar
9dd42a6311 patch 8.2.4621: crash when using the tabline right-click menu
Problem:    Crash when using the tabline right-click menu.
Solution:   Use XtPointer for XmNuserData. (closes #10009)
2022-03-24 18:04:49 +00:00
Bram Moolenaar
1e2c4175dc patch 8.2.4620: two letter substitute commands don't work
Problem:    Two letter substitute commands don't work. (Yegappan Lakshmanan)
Solution:   Invert condition.
2022-03-24 15:24:45 +00:00
Bram Moolenaar
f8e43f6107 patch 8.2.4619: mapping is cancelled when mouse moves and popup is visible
Problem:    Mapping is cancelled when mouse moves and popup is visible.
Solution:   Only generate mouse moved events when a popup may use them.
            (closes #10004)
2022-03-24 15:15:15 +00:00
Bram Moolenaar
f4f0525c34 patch 8.2.4618: cmdline completion does not recognize single letter commands
Problem:    Command line completion does not recognize single letter commands.
Solution:   Use the condition from find_ex_command().
2022-03-24 13:08:36 +00:00
Yegappan Lakshmanan
454ce6737c patch 8.2.4617: no completion for :scriptnames
Problem:    No completion for :scriptnames.
Solution:   Implement :scriptnames completion. (Yegappan Lakshmanan,
            closes #10005)
2022-03-24 11:22:13 +00:00
Bram Moolenaar
98b7fe725e patch 8.2.4616: Vim9: Declarations in a {} block of a user command remain
Problem:    Vim9: Declarations in a {} block of a user command do not use Vim9
            rules if defined in a legacy script. (Yegappan Lakshmanan)
Solution:   Pretend the script is Vim9 script.
2022-03-23 21:36:27 +00:00
Bram Moolenaar
ac48506ac6 patch 8.2.4615: mapping with escaped bar does not work in :def function
Problem:    Mapping with escaped bar does not work in :def function. (Sergey
            Vlasov)
Solution:   Do not remove the backslash. (closes #10002)
2022-03-23 19:45:01 +00:00
zeertzjq
c20e46a4e3 patch 8.2.4614: redrawing too much when 'cursorline' is set
Problem:    Redrawing too much when 'cursorline' is set and jumping around.
Solution:   Rely on win_update() to redraw the current and previous cursor
            line, do not mark lines as modified. (closes #9996)
2022-03-23 14:55:23 +00:00
zeertzjq
3c5999e53d patch 8.2.4613: return type of swapfile_unchanged() is wrong
Problem:    Return type of swapfile_unchanged() is wrong.
Solution:   Use "int". (closes #10000  Yeah!)
2022-03-23 13:54:51 +00:00
Bram Moolenaar
a915fa0103 patch 8.2.4612: Vim9: cannot use a recursive call in a nested function
Problem:    Vim9: cannot use a recursive call in a nested function. (Sergey
            Vlasov)
Solution:   Define the funcref before compiling the function. (closes #9989)
2022-03-23 11:29:15 +00:00
Dominique Pelle
81b573d7e5 patch 8.2.4611: typos in tests; one lua line not covered by test
Problem:    Typos in tests; one lua line not covered by test.
Solution:   Fix typos. Add test case. (Dominique Pellé, closes #9994)
2022-03-22 21:14:55 +00:00
Bram Moolenaar
fe154990c1 patch 8.2.4610: some conditions are always true
Problem:    Some conditions are always true.
Solution:   Remove the useless conditions. (closes #9993)
2022-03-22 20:42:12 +00:00
Bram Moolenaar
6f2465d336 patch 8.2.4609: :unhide does not check for failing to close a window
Problem:    :unhide does not check for failing to close a window.
Solution:   When closing a window fails continue with the next one.  Do not
            try closing the autocmd window. (closes #9984)
2022-03-22 18:13:01 +00:00
Yegappan Lakshmanan
e7dd0fa2c6 patch 8.2.4608: getcompletion() does not work when 'wildoptions' has "fuzzy"
Problem:    getcompletion() does not work properly when 'wildoptions
            contains "fuzzy".
Solution:   Do not use addstar(). (Yegappan Lakshmanan, closes #9992,
            closes #9986)
2022-03-22 16:06:31 +00:00
Yegappan Lakshmanan
35dc17634d patch 8.2.4607: sourcing buffer lines may lead to errors for conflicts
Problem:    Sourcing buffer lines may lead to errors for conflicts.
Solution:   Add the ++clear argument. (Yegappan Lakshmanan, closes #9991)
2022-03-22 12:13:54 +00:00
Bram Moolenaar
e18acb02bb patch 8.2.4606: test fails because of changed error message
Problem:    Test fails because of changed error message.
Solution:   Update the expected error message
2022-03-21 20:40:35 +00:00
Bram Moolenaar
6d877fe018 patch 8.2.4604: error for redefining a script item may be confusing
Problem:    Error for redefining a script item may be confusing.
Solution:   Put quotes around the name.
2022-03-21 19:47:31 +00:00
Yegappan Lakshmanan
85b43c6cb7 patch 8.2.4603: sourcing buffer lines is too complicated
Problem:    Sourcing buffer lines is too complicated.
Solution:   Simplify the code. Make it possible to source Vim9 script lines.
            (Yegappan Lakshmanan, closes #9974)
2022-03-21 19:45:17 +00:00
Bram Moolenaar
397a87ac1c patch 8.2.4602: Vim9: not enough test coverage for executing :def function
Problem:    Vim9: not enough test coverage for executing :def function.
Solution:   Add a few more tests.  Fix uncovered problem.  Remove dead code.
2022-03-20 21:14:15 +00:00
Bram Moolenaar
efd73ae5d2 patch 8.2.4601: Vim9: not enough test coverage for executing :def function
Problem:    Vim9: not enough test coverage for executing :def function.
Solution:   Add a few more tests.
2022-03-20 18:51:00 +00:00
Bram Moolenaar
6b8c7ba062 patch 8.2.4600: Vim9: not enough test coverage for executing :def function
Problem:    Vim9: not enough test coverage for executing :def function.
Solution:   Add a few more tests.  Fix inconsistencies.
2022-03-20 17:46:06 +00:00
Bram Moolenaar
a4df834a92 patch 8.2.4599: GTK: get assertion errors when scrolling a split window
Problem:    GTK: get assertion errors when scrolling a split window.
Solution:   Use GDK_IS_DRAWABLE() on the scrollbar window. (closes #9982)
2022-03-20 15:43:01 +00:00
Bram Moolenaar
7e0be3ea21 patch 8.2.4598: profile completion test sometimes fails
Problem:    Profile completion test sometimes fails.
Solution:   Delete the .res file before running tests.
2022-03-20 13:40:41 +00:00
Dominique Pelle
b6643d10d3 patch 8.2.4597: LuaV_debug() not covered by tests
Problem:    LuaV_debug() not covered by tests.
Solution:   Add a test. (Dominique Pellé, closes #9980)
2022-03-20 11:46:01 +00:00
Sergei Trofimovich
c670ebddcd patch 8.2.4596: installing tutor binary may fail
Problem:    Installing tutor binary may fail.
Solution:   Fix the dependency. (Sergei Trofimovich, closes #9978)
2022-03-20 11:26:36 +00:00
jsecchiero
6f95363677 patch 8.2.4595: X11: using --remote-wait may keep the CPU busy
Problem:    X11: using --remote-wait may keep the CPU busy.
Solution:   Set the timeout for select() on every call. (Jacopo Secchiero,
            closes #9973)
2022-03-20 11:07:17 +00:00
Bram Moolenaar
47c532e2bc Update runtime files 2022-03-19 15:18:53 +00:00
Yegappan Lakshmanan
36a5b6867b patch 8.2.4594: need to write script to a file to be able to source them
Problem:    Need to write script to a file to be able to source them.
Solution:   Make ":source" use lines from the current buffer. (Yegappan
            Lakshmanan et al., closes #9967)
2022-03-19 12:56:51 +00:00
zeertzjq
95d2e7634c patch 8.2.4593: unnecessary call to redraw_later()
Problem:    Unnecessary call to redraw_later().
Solution:   Remove the call to redraw_later() in op_yank(). (closes #9971)
2022-03-19 11:42:16 +00:00
Bram Moolenaar
b10ff5c1b3 patch 8.2.4592: search continues after giving E1204
Problem:    Search continues after giving E1204.
Solution:   Return failure after giving E1204. (closes #9972)
2022-03-19 11:31:38 +00:00
Bram Moolenaar
e7a74d5375 patch 8.2.4591: cursor line not updated when a callback moves the cursor
Problem:    Cursor line not updated when a callback moves the cursor.
Solution:   Check if the cursor moved. (closes #9970)
2022-03-19 11:10:15 +00:00
Bram Moolenaar
2995e5cf4e patch 8.2.4590: Vim9: range type check has wrong offset
Problem:    Vim9: range type check has wrong offset.
Solution:   Adjust offset for CHECKTYPE.  Remove other type check.
2022-03-18 21:41:47 +00:00
Bram Moolenaar
2e17fef225 patch 8.2.4589: cannot index the g: dictionary
Problem:    Cannot index the g: dictionary.
Solution:   Recognize using "g:[key]". (closes #9969)
2022-03-18 19:44:48 +00:00
Bram Moolenaar
f35fd8e5d4 patch 8.2.4588: mapping with key after other matching mapping does not work
Problem:    Mapping with key code after other matching mapping does not work.
Solution:   Change ">" to ">=". (closes #9903)
2022-03-18 15:41:17 +00:00
Bram Moolenaar
61efa16932 patch 8.2.4587: Vim9: double free after unpacking a list
Problem:    Vim9: double free after unpacking a list.
Solution:   Make a copy of the value instead of moving it. (closes #9968)
2022-03-18 13:10:48 +00:00
Bram Moolenaar
1d9cef769d patch 8.2.4586: Vim9: no error for using lower case name for "func" argument
Problem:    Vim9: no error for using lower case name for "func" argument.
            (Ernie Rael)
Solution:   Check the name as soon as the type is known.
2022-03-17 16:30:03 +00:00
Yegappan Lakshmanan
155b088208 patch 8.2.4585: cannot use keypad page-up/down for completion menu
Problem:    Cannot use keypad page-up/down for completion menu.
Solution:   Recognize the keypad keys. (Yegappan Lakshmanan, closes #9963)
2022-03-17 13:03:09 +00:00
Bram Moolenaar
da6d42c35a patch 8.2.4584: error for using autoload function in custom completion
Problem:    Error for using autoload function in custom completion.
Solution:   Do not check for errors when using an autoload function.
            (closes #9962)
2022-03-17 11:46:55 +00:00
Bram Moolenaar
4f6e772c9c patch 8.2.4583: screendump test fails
Problem:    Screendump test fails.
Solution:   Check that making a screendump is possible.
2022-03-16 20:26:02 +00:00
Bram Moolenaar
4c8b546da2 patch 8.2.4582: useless code handling a type declaration
Problem:    Useless code handling a type declaration.
Solution:   Remove the code and give an error.
2022-03-16 20:01:39 +00:00
Bram Moolenaar
d597ab00d7 patch 8.2.4581: null types not fully tested
Problem:    Null types not fully tested.
Solution:   Add some more tests using null types.
2022-03-16 17:56:33 +00:00
Bram Moolenaar
21dc8f1527 patch 8.2.4580: Vim9: incorrect error for shadowing variable
Problem:    Vim9: incorrect error for shadowing variable.
Solution:   Do not pass the context when compiling a referenced function.
2022-03-16 17:54:17 +00:00
Yegappan Lakshmanan
5cffa8df7e patch 8.2.4579: cannot use page-up and page-down in the cmdline popup menu
Problem:    Cannot use page-up and page-down in the command line completion
            popup menu.
Solution:   Check for to page-up and page-down keys. (Yegappan Lakshmanan,
            closes #9960)
2022-03-16 13:33:53 +00:00
Bram Moolenaar
fe8e9f6740 patch 8.2.4578: no warning when autoload script for completion has an error
Problem:    No warning when an autoload script for completion function has an
            error.
Solution:   Do not ignore errors when a function name is given with a dot or
            '#' character. (closes #9958)
2022-03-16 13:09:15 +00:00
Bram Moolenaar
9323ca51c2 patch 8.2.4577: message test is flaky
Problem:    Message test is flaky. (Elimar Riesebieter)
Solution:   Trigger the autocommand event only after startup is finished.
2022-03-16 11:14:57 +00:00
Bram Moolenaar
056678184f patch 8.2.4576: Vim9: error for comparing with null can be annoying
Problem:    Vim9: error for comparing with null can be annoying.
Solution:   Allow comparing anything with null. (closes #9948)
2022-03-15 20:21:33 +00:00
Bram Moolenaar
139575de66 patch 8.2.4575: Vim9: test for profiling still fails
Problem:    Vim9: test for profiling still fails.
Solution:   Update flags for profiling and breakpoints when obtaining the
            compile type.  Do not set the FC_CLOSURE flag for a toplevel
            function.
2022-03-15 19:29:30 +00:00
Bram Moolenaar
48f69cdfa4 patch 8.2.4574: Vim9: test for profiling fails
Problem:    Vim9: test for profiling fails.
Solution:   Mark function for profiling earlier to avoid E1271.
2022-03-15 16:16:47 +00:00
Bram Moolenaar
96923b7a14 patch 8.2.4573: a nested function is compiled for debugging without context
Problem:    A nested function (closure) is compiled for debugging without
            context.
Solution:   Check if a nested function is marked for debugging before
            compiling it.  Give an error when trying to compile a closure
            without its context. (closes #9951)
2022-03-15 15:57:04 +00:00
Bram Moolenaar
1a572e9b3b patch 8.2.4572: Vim9: return type "any" is changed to first returned type
Problem:    Vim9: return type "any" is sometimes changed to first returned
            type.  (Virginia Senioria)
Solution:   Do not change the return type if declared as "any". (closes #9949)
2022-03-15 12:28:10 +00:00
Jade Lovelace
8d5e514d77 patch 8.2.4571: not all gdb files are recognized
Problem:    Not all gdb files are recognized.
Solution:   Add a few more patterns for gdb. (Jade Lovelace, closes #9956)
2022-03-15 12:00:23 +00:00
Yegappan Lakshmanan
1fdf84e033 patch 8.2.4570: no command line completion for :profile and :profdel
Problem:    No command line completion for :profile and :profdel.
Solution:   Implement completion. (Yegappan Lakshmanan, closes #9955)
2022-03-15 10:53:09 +00:00
Bram Moolenaar
977525fea6 patch 8.2.4569: Coverity warning for not using a return value
Problem:    Coverity warning for not using a return value.
Solution:   Add "(void)".
2022-03-15 10:22:39 +00:00
Sean Dewar
10792feebd patch 8.2.4568: getmousepos() does not compute the column below the last line
Problem:    getmousepos() does not compute the column below the last line.
Solution:   Also compute the column when the mouse is below the last line.
            (Sean Dewar, closes #9946)
2022-03-15 09:46:54 +00:00
zeertzjq
7a73252063 patch 8.2.4567: bracketed paste doesn't work well in Visual linewise mode
Problem:    Bracketed paste doesn't work well in Visual linewise mode.
Solution:   Handle linewise Visual mode differently. (closes #9947)
2022-03-14 20:46:41 +00:00
James Cherti
7d42840033 patch 8.2.4566: check for existing buffer in session file may not work
Problem:    Check for existing buffer in session file does not work for files
            in the home directory.
Solution:   Use fnamemodify(). (James Cherti, closes #9945)  Add a test.
2022-03-14 20:24:51 +00:00
Bram Moolenaar
6e2e2cc95b patch 8.2.4565: no command line completion for :breakadd and :breakdel
Problem:    No command line completion for :breakadd and :breakdel.
Solution:   Add completion for :breakadd and :breakdel. (Yegappan Lakshmanan,
            closes #9950)
2022-03-14 19:24:46 +00:00
Bram Moolenaar
129e33e44b patch 8.2.4564: running test leaves file behind
Problem:    Running test leaves file behind.  (Dominique Pellé)
Solution:   Run the profiling in a separate Vim instance. (closes #9952)
2022-03-14 10:50:23 +00:00
Bram Moolenaar
5c68617d39 patch 8.2.4563: "z=" in Visual mode may go beyond the end of the line
Problem:    "z=" in Visual mode may go beyond the end of the line.
Solution:   Adjust "badlen".
2022-03-13 20:12:25 +00:00
Yegappan Lakshmanan
b29b96806f patch 8.2.4562: linear tag search is not optimal
Problem:    Linear tag search is not optimal.
Solution:   Improve linear tag search performance. (Yegappan Lakshmanan,
            closes #9944)
2022-03-13 19:23:48 +00:00
Bram Moolenaar
424da7aa48 patch 8.2.4561: build failure with some combination of features
Problem:    Build failure with some combination of features. (John Marriott)
Solution:   Adjust #ifdef.
2022-03-13 19:08:48 +00:00
ichizok
5f823d1e73 patch 8.2.4560: suspending with CTRL-Z does not work on DragonFlyBSD
Problem:    Suspending with CTRL-Z does not work on DragonFlyBSD.
Solution:   Adjust #ifdef. (Ozaki Kiichi, closes #9943)
2022-03-13 17:27:38 +00:00
Bram Moolenaar
533870a985 patch 8.2.4559: getmousepos() returns the screen column
Problem:    getmousepos() returns the screen column. (Ernie Rael)
Solution:   Return the text column, as documented.
2022-03-13 15:52:44 +00:00
Bram Moolenaar
e850439a56 patch 8.2.4558: Motif: using default colors does not work as expected
Problem:    Motif: using default colors does not work as expected.
Solution:   Do not try to store the default colors, use the resources.
            (closes #9933)
2022-03-13 14:45:03 +00:00
zeertzjq
754d2b4036 patch 8.2.4557: confusing comment about 'cursorlineopt'
Problem:    Confusing comment about 'cursorlineopt'.
Solution:   Adjust comment.  (closes #9939)  Add parenthesis around logical
            OR.
2022-03-13 13:40:45 +00:00
Bram Moolenaar
4f3321f704 patch 8.2.4556: test fails without the +job or +channel feature
Problem:    Test fails without the +job or +channel feature. (Dominique Pellé)
Solution:   Adjust #ifdefs.  Pass on skip flag. (closes #9942)
2022-03-13 13:12:27 +00:00
Bram Moolenaar
986b0fd0c5 patch 8.2.4555: getmousepos() returns the wrong column
Problem:    getmousepos() returns the wrong column. (Ernie Rael)
Solution:   Limit to the text size, not the number of bytes.
2022-03-13 12:06:07 +00:00
Bram Moolenaar
badf04f5c2 patch 8.2.4554: Vim9: using null values not sufficiently tested
Problem:    Vim9: using null values not sufficiently tested.
Solution:   Add more tests.  Fix uncovered problem.
2022-03-12 21:28:22 +00:00
Yegappan Lakshmanan
8b530b3158 patch 8.2.4553: linear tag search is a bit slow
Problem:    Linear tag search is a bit slow.
Solution:   Remove a vim_ftell() call. (Yegappan Lakshmanan, closes #9937)
2022-03-12 17:38:29 +00:00
Bram Moolenaar
d0b7bfa957 patch 8.2.4552: in a :def function "put = expr" does not work
Problem:    In a :def function "put = expr" does not work.
Solution:   Skip over white space. (closes #9936)
2022-03-12 14:51:16 +00:00
Bram Moolenaar
bbf84e2737 patch 8.2.4551: when mapping <Esc> terminal codes are not recognized
Problem:    When mapping <Esc> terminal codes are not recognized.
Solution:   Specifically recognize a mapping with just <Esc> and check for
            terminal codes even though there is no partial mapping.
            (closes #9903)
2022-03-12 13:48:39 +00:00
Bram Moolenaar
5b4f8a0e84 patch 8.2.4550: Motif: cannot set the color of the scrollbar thumb
Problem:    Motif: cannot set the color of the scrollbar thumb.
Solution:   Remove #ifdef.
2022-03-12 12:21:28 +00:00
Bram Moolenaar
e2adcf3974 patch 8.2.4549: cannot build with Motif and editres
Problem:    Cannot build with Motif and editres. (Tony Mechelynck)
Solution:   Fix configure mistake.
2022-03-12 11:57:25 +00:00
Bram Moolenaar
fb43cfc2c6 patch 8.2.4548: script-local function is deleted when used in a funcref
Problem:    Script-local function is deleted when used in a funcref.
Solution:   Do not consider a function starting with "<SNR>" reference
            counted. (closes #9916, closes #9820)
2022-03-11 18:54:17 +00:00
Bram Moolenaar
f52fac2ed9 patch 8.2.4547: the neXTaw GUI is old and does not work well
Problem:    The neXTaw GUI is old and does not work well.
Solution:   Remove the neXTaw GUI from configure to find out who still wants
            support for this GUI.
2022-03-11 16:01:26 +00:00
zeertzjq
0a4e098f32 patch 8.2.4546: duplicate #undef
Problem:    Duplicate #undef.
Solution:   Remove one #undef. (closes #9932)
2022-03-11 15:33:53 +00:00
Christian Brabandt
176711f069 patch 8.2.4545: MS-Windows: the installed icon is low resolution
Problem:    MS-Windows: the installed icon is low resolution.
Solution:   Use a better icon.  Install vim.ico. (Christian Brabandt,
            closes #9931, closes #9930)
2022-03-11 15:24:11 +00:00
Bram Moolenaar
dbf8094b17 patch 8.2.4544: Coverity warnings for not using returned value
Problem:    Coverity warnings for not using returned value.
Solution:   Assign to vim_ignored.
2022-03-11 14:54:03 +00:00
Yegappan Lakshmanan
20fb28b1dc patch 8.2.4543: Coverity warning for refactored tag search code
Problem:    Coverity warning for refactored tag search code.
Solution:   Avoid the warnings.  Update comments.  Add one more test case.
            (Yegappan Lakshmanan, closes #9928)
2022-03-11 12:05:18 +00:00
Bram Moolenaar
873f8243f6 patch 8.2.4542: Vim9: "break" inside try/catch not handled correctly
Problem:    Vim9: "break" inside try/catch not handled correctly.
Solution:   First jump to :endtry. (closes #9927)
2022-03-10 21:53:44 +00:00
Bram Moolenaar
e406ff87c8 patch 8.2.4541: Crash in debugger when a variable is not available
Problem:    Crash in debugger when a variable is not available in the current
            block.
Solution:   Check for a NULL name. (closes #9926)
2022-03-10 20:47:43 +00:00
Bram Moolenaar
1b1df95f1a patch 8.2.4540: line number for error is off by one
Problem:    Line number for error is off by one.
Solution:   Remember the line number of the comparison. (closes #9923)
2022-03-10 20:01:50 +00:00
Bram Moolenaar
53ba6ca5b2 patch 8.2.4539: when comparing special v:none and v:null are handled the same
Problem:    When comparing special v:none and v:null are handled the same when
            compiling.
Solution:   Pass more information so that v:none can be handled differently at
            compile time.  (issue #9923)
2022-03-10 19:23:28 +00:00
Yegappan Lakshmanan
bf40e90dfe patch 8.2.4538: the find_tags_in_file() function is too long
Problem:    The find_tags_in_file() function is too long.
Solution:   Refactor into smaller functions. (Yegappan Lakshmanan,
            closes #9920)
2022-03-10 18:36:54 +00:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
48f83c31d1 patch 8.2.4537: output from linter and language server shows up in git
Problem:    Output from linter and language server shows up in git.
Solution:   Add patterns to .gitignore. (Goc Dundar, closes #9925)
2022-03-10 15:51:24 +00:00
Bram Moolenaar
cf6662082f patch 8.2.4536: debugger test fails when breaking on expression
Problem:    Debugger test fails when breaking on expression.
Solution:   Compare strings with "==" instead of "is".
2022-03-10 13:29:20 +00:00
Christian Brabandt
81da16b53f patch 8.2.4535: filename modifer ":8" removes the filename
Problem:    Filename modifer ":8" removes the filename.
Solution:   Use strncpy() instead of vim_strncpy(). (Christian Brabandt,
            closes #9918, closes #8600)
2022-03-10 12:24:02 +00:00
Bram Moolenaar
f8691004b0 patch 8.2.4534: Vim9: "is" operator with empty string and null returns true
Problem:    Vim9: "is" operator with empty string and null returns true.
Solution:   Consider empty string and null to be different for "is".
2022-03-10 12:20:53 +00:00
Bram Moolenaar
56b84b1728 patch 8.2.4533: Vim9: no test that after assigning null type is still checked
Problem:    Vim9: no test that after assigning null the type is still checked.
Solution:   Add a test.
2022-03-09 19:46:48 +00:00
Stuart Henderson
f2832ad965 patch 8.2.4532: suspending with CTRL-Z does not work on OpenBSD
Problem:    Suspending with CTRL-Z does not work on OpenBSD.
Solution:   Adjust #ifdef for SIGTSTP. (Stuart Henderson, closes #9912)
2022-03-09 14:33:02 +00:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
f01a653ac5 patch 8.2.4531: LGTM warnings for condition and buffer size
Problem:    LGTM warnings for condition always true and buffer size too small.
Solution:   Remove the useless condition.  Make the buffer larger. (Goc
            Dundar, closes #9914)
2022-03-09 13:00:54 +00:00
Bram Moolenaar
f3507a517c patch 8.2.4530: making comparison with null work changes legacy behavior
Problem:    Making comparison with null work changes legacy behavior.
Solution:   Only use the better comparison in Vim9 script. (closes #9910)
2022-03-09 11:56:21 +00:00
Bram Moolenaar
1588bc8ebe Update runtime files 2022-03-08 21:35:07 +00:00
Bram Moolenaar
ed0c62e7b1 patch 8.2.4529: Vim9: comparing partial with function fails
Problem:    Vim9: comparing partial with function fails.
Solution:   Support this comparison.  Avoid a crash. (closes #9909)
            Add more test cases.
2022-03-08 19:43:55 +00:00
Bram Moolenaar
673bcb10eb patch 8.2.4528: crash when using null_function for a partial
Problem:    Crash when using null_function for a partial.
Solution:   Don't call fname_trans_sid() with NULL. (closes #9908)
2022-03-08 16:52:24 +00:00
Bram Moolenaar
0b40d086b3 patch 8.2.4527: the Athena GUI is old and does not work well
Problem:    The Athena GUI is old and does not work well.
Solution:   Remove the Athena GUI from configure to find out who still wants
            support for this GUI.
2022-03-08 13:32:37 +00:00
Bram Moolenaar
8acb9cc620 patch 8.2.4526: Vim9: cannot set variables to a null value
Problem:    Vim9: cannot set variables to a null value.
Solution:   Add null_list, null_job, etc.
2022-03-08 13:18:55 +00:00
Yegappan Lakshmanan
08238045e7 patch 8.2.4525: some GUI tests don't work on Athena
Problem:    Some GUI tests don't work on Athena.
Solution:   Skip tests that won't work. (Yegappan Lakshmanan, closes #9902)
2022-03-07 16:57:22 +00:00
K.Takata
d8f8629b1b patch 8.2.4524: MS-Windows: cannot build with some sodium libraries
Problem:    MS-Windows: cannot build with some sodium libraries.
Solution:   Make the DLL name configuragle.  Add build instructions.
            (Ken Takata, closes #9905)
2022-03-07 15:16:15 +00:00
K.Takata
6ca883dd8a patch 8.2.4523: when gvim is started maximized the 'window' option isn't set
Problem:    When gvim is started maximized the 'window' option isn't set
            properly. (Christian J. Robinson)
Solution:   Check if 'windows' was already set or not. (Ken Takata,
            closes #9904)
2022-03-07 13:31:15 +00:00
Bram Moolenaar
88dd6523fa patch 8.2.4522: GUI test fails with Motif
Problem:    GUI test fails with Motif. (Dominique Pellé)
Solution:   Remove using an invalid value for 'guifontset'.
2022-03-06 22:21:37 +00:00
Bram Moolenaar
936dc6014c patch 8.2.4521: build failure without the +diff feature
Problem:    Build failure without the +diff feature. (John Marriott)
Solution:   Define filler+lines if not declaring it.
2022-03-06 20:47:01 +00:00
Bram Moolenaar
127969cf98 patch 8.2.4520: using wrong highlight for cursor line number
Problem:    Using wrong highlight for cursor line number.
Solution:   Take filler lines into account when using CursorLineNr.
            (closes #9897)
2022-03-06 19:54:13 +00:00
Bram Moolenaar
d523c7be5c patch 8.2.4519: Vim9: Can still use ":fini" and ":finis" for ":finish"
Problem:    Vim9: Can still use ":fini" and ":finis" for ":finish".
Solution:   Require using ":finish".
2022-03-06 14:51:22 +00:00
Yegappan Lakshmanan
655b734ee8 patch 8.2.4518: the binary tag search feature is always enabled
Problem:    The binary tag search feature is always enabled.
Solution:   Remove the #ifdefs.  Add a few more tests. (Yegappan Lakshmanan,
            closes #9893)
2022-03-06 14:27:10 +00:00
K.Takata
9eccee0e85 patch 8.2.4517: MS-Windows: cannot specify location of sodium library
Problem:    MS-Windows: cannot specify location of sodium library.
Solution:   Allow for using a path for SODIUM. (Ken Takata, closes #9896)
2022-03-06 14:01:52 +00:00
Bram Moolenaar
525eba00ef patch 8.2.4516: build failure without the +eval feature
Problem:    Build failure without the +eval feature.
Solution:   Move error message outside of #ifdef.
2022-03-05 22:07:32 +00:00
Bram Moolenaar
9fb7b42935 patch 8.2.4515: old subsitute syntax is still supported
Problem:    Old subsitute syntax is still supported.
Solution:   Disallow using backslash after ":s" in Vim9 script.
2022-03-05 21:13:26 +00:00
Bram Moolenaar
b2175220da patch 8.2.4514: Vim9: some flow commands can be shortened
Problem:    Vim9: some flow commands can be shortened.
Solution:   Also require using the full name for ":return", ":enddef",
            ":continue", ":export" and ":import".
2022-03-05 20:24:41 +00:00
zeertzjq
b29ae15977 patch 8.2.4513: window-local directory is not applied if 'acd' fails
Problem:    Window-local directory is not applied if 'acd' fails.
Solution:   Don't call do_autochdir(). (closes #9891)
2022-03-05 17:00:31 +00:00
Yegappan Lakshmanan
df1bbea436 patch 8.2.4512: the find_tags_in_file() function is much too long
Problem:    The find_tags_in_file() function is much too long.
Solution:   Refactor into multiple smaller functions. (Yegappan Lakshmanan,
            closes #9892)
2022-03-05 14:35:12 +00:00
Bram Moolenaar
c12dc47b8f patch 8.2.4511: filetype test fails
Problem:    Filetype test fails.
Solution:   Change "endw" to "endwhile".
2022-03-05 13:45:56 +00:00
Bram Moolenaar
204852ae2a patch 8.2.4510: Vim9: shortening commands leads to confusing script
Problem:    Vim9: shortening commands leads to confusing script.
Solution:   In Vim9 script require at least ":cont" for ":continue", "const"
            instead of "cons", "break" instead of "brea", "catch" instead of
            "cat", "else" instead of "el" "elseif" instead of "elsei" "endfor"
            instead of "endfo" "endif" instead of "en" "endtry" instead of
            "endt", "finally" instead of "fina", "throw" instead of "th",
            "while" instead of "wh".
2022-03-05 12:56:44 +00:00
Bram Moolenaar
e1d1211799 patch 8.2.4509: Vim9: can declare a variable with ":va"
Problem:    Vim9: can declare a variable with ":va".
Solution:   Disallow using ":va", require using ":var".
2022-03-05 11:37:48 +00:00
Bram Moolenaar
330a388e18 patch 8.2.4508: Vim9: cannot assign to a global variable on the command line
Problem:    Vim9: cannot assign to a global variable on the command line.
Solution:   Allow using :vim9cmd for assignment on the command line.
2022-03-05 11:05:57 +00:00
Bram Moolenaar
f78ee2b49f patch 8.2.4507: test fails because of new error message
Problem:    Test fails because of new error message.
Solution:   Avoid the test fails.
2022-03-04 23:22:27 +00:00
Bram Moolenaar
24d9c0557e patch 8.2.4506: "pattern not found" for :global is not an error message
Problem:    "pattern not found" for :global is not an error message.
Solution:   In Vim9 script make this an actual error, so that try/catch can be
            used as expected.
2022-03-04 21:34:31 +00:00
Bram Moolenaar
f07751457c patch 8.2.4505: Vim9: outdated "autocmd nested" still works
Problem:    Vim9: outdated "autocmd nested" still works.
Solution:   Do not accept the :autocmd argument "nested" without "++" in Vim9
            script.
2022-03-04 20:10:38 +00:00
Bram Moolenaar
196c3850db patch 8.2.4504: when there is a partially matching map full map may not work
Problem:    When there is a partially matching map and modifyOtherKeys is
            active a full map may not work.
Solution:   Only simplify modifiers when there is no matching mapping.
            (closes #8792)
2022-03-04 19:22:36 +00:00
Bram Moolenaar
6aca4d3c2b patch 8.2.4503: Vim9: there is no point in supporting :Print and :mode
Problem:    Vim9: there is no point in supporting :Print and :mode.
Solution:   Do not recognize :Print and :mode as commands. (closes #9870)
2022-03-04 17:10:19 +00:00
Bram Moolenaar
d979d64fa2 patch 8.2.4502: in the GUI a modifier is not recognized after CTRL-X
Problem:    In the GUI a modifier is not recognized for the key typed after
            CTRL-X, which may result in a mapping to be used. (Daniel
            Steinberg)
Solution:   Recognize a modifier starting with CSI. (closes #9889)
2022-03-04 14:51:06 +00:00
Bram Moolenaar
21efafe4c2 patch 8.2.4501: with 'showbreak' set cursor displayed in wrong position
Problem:    With 'showbreak' set and after the end of the line the cursor
            may be displayed in the wrong position.
Solution:   Do not apply 'showbreak' after the end of the line. (closes #9884)
2022-03-03 20:04:03 +00:00
Bram Moolenaar
0e1574c406 patch 8.2.4500: Vim9: can declare a global variable on the command line
Problem:    Vim9: can declare a global variable on the command line.
Solution:   Disallow declaring a variable on the command line. (closes #9881)
2022-03-03 17:05:35 +00:00
Bram Moolenaar
28bf649a57 patch 8.2.4499: Vim9: at the script level declarations leak to next block
Problem:    Vim9: at the script level declarations leak from try block to
            catch and finally block.
Solution:   End the block and start a new one. (closes #9883)
2022-03-03 15:11:20 +00:00
Bram Moolenaar
1fc34225ac patch 8.2.4498: using <Plug> with "noremap" does not work
Problem:    Using <Plug> with "noremap" does not work.
Solution:   Always remap <Plug>. (closes #9879, closes #9789)
2022-03-03 13:56:24 +00:00
Bram Moolenaar
35d8c2010e patch 8.2.4497: wrong color for half of wide character next to pum scrollbar
Problem:    Wrong color for half of wide character next to pum scrollbar.
Solution:   Redraw the screen cell with the right color. (closes #9874)
2022-03-03 11:46:00 +00:00
Bram Moolenaar
fe9112e630 patch 8.2.4496: Coverity gives warnings after tags code refactoring
Problem:    Coverity gives warnings after tags code refactoring.
Solution:   Avoid the warnings. (Yegappan Lakshmanan, closes #9882)
2022-03-03 10:44:17 +00:00
Bram Moolenaar
e4e1a1e1c8 patch 8.2.4495: help test fails in 24 line terminal
Problem:    Help test fails in 24 line terminal.
Solution:   Use up to 23 lines for text.
2022-03-02 20:49:50 +00:00
Yegappan Lakshmanan
2f87a99b6e patch 8.2.4494: the find_tags() function is much too long
Problem:    The find_tags() function is much too long.
Solution:   Refactor the function. (Yegappan Lakshmanan, closes #9869)
2022-03-02 20:29:35 +00:00
Bram Moolenaar
b9c5108593 patch 8.2.4493: options test fails in the GUI
Problem:    Options test fails in the GUI.
Solution:   Do not save and restore 'term'.
2022-03-02 20:12:03 +00:00
Bram Moolenaar
8ccbbeb620 patch 8.2.4492: no error if an option is given a value with ":let &opt = val"
Problem:    No error if an option is given an invalid value with
            ":let &opt = val".
Solution:   Give the error. (closes #9864)
2022-03-02 19:49:38 +00:00
K.Takata
7f687aaca9 patch 8.2.4491: MS-Windows makefile dependencies are outdated
Problem:    MS-Windows makefile dependencies are outdated.
Solution:   Update dependencies. (Ken Takata, closes #9876)
2022-03-02 17:34:56 +00:00
Bram Moolenaar
8d5daf267e patch 8.2.4490: terminal focus reporting only works for xterm-like terminals
Problem:    Terminal focus reporting only works for xterm-like terminals.
            (Jonathan Rascher)
Solution:   Remove the "focus_mode" flag. (closes #9859)
2022-03-02 17:16:39 +00:00
Bram Moolenaar
c6e9d7063d patch 8.2.4489: failing test for comparing v:null with number
Problem:    Failing test for comparing v:null with number.
Solution:   Allow comparing v:null with number in legacy script.
            (Ken Takata, closes #9873)  Also do this for float.
2022-03-02 13:13:30 +00:00
Bram Moolenaar
f6b0c79742 patch 8.2.4488: build error with +eval but without +channel or +job
Problem:    Build error with +eval but without +channel or +job.
Solution:   Add #ifdef. (John Marriott)
2022-03-01 19:52:48 +00:00
Bram Moolenaar
7a22224875 patch 8.2.4487: Vim9: cannot compare with v:null
Problem:    Vim9: cannot compare with v:null.
Solution:   Allow comparing anything with v:null. (closes #9866)
2022-03-01 19:23:24 +00:00
Bram Moolenaar
f01af9c4e6 patch 8.2.4486: MS-Windows GUI: slow scrolling with maximized window
Problem:    MS-Windows GUI: slow scrolling with maximized window.
Solution:   Use a better way to check the window is on screen. (Ken Takata,
            closes #9865)
2022-03-01 16:02:26 +00:00
Bram Moolenaar
3e7637bd26 patch 8.2.4485: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable.
Solution:   Initialize the variable. (John Marriott)
2022-02-28 21:02:19 +00:00
Bram Moolenaar
1983f1aa31 patch 8.2.4484: Vim9: some error messages are not tested
Problem:    Vim9: some error messages are not tested.
Solution:   Add a few more test cases.  Delete dead code.
2022-02-28 20:55:02 +00:00
Yegappan Lakshmanan
5de4c4372d patch 8.2.4483: command completion makes two rounds to collect matches
Problem:    Command completion makes two rounds to collect matches.
Solution:   Use a growarray to collect matches. (Yegappan Lakshmanan,
            closes #9860)
2022-02-28 13:28:38 +00:00
Yegappan Lakshmanan
afd4ae35d6 patch 8.2.4482: no fuzzy cmdline completion for user defined completion
Problem:    No fuzzy cmdline completion for user defined completion.
Solution:   Add fuzzy completion for user defined completion. (Yegappan
            Lakshmanan, closes #9858)
2022-02-27 21:03:21 +00:00
Bram Moolenaar
5c52be40fb patch 8.2.4481: cmdline popup menu not removed when 'lazyredraw' is set
Problem:    Cmdline popup menu not removed when 'lazyredraw' is set.
Solution:   Temporarily reset 'lazyredraw' when removing the popup menu.
            (closes #9857)
2022-02-27 14:28:31 +00:00
xtkoba
cbef12e60b patch 8.2.4480: suspending with CTRL-Z does not work on Android
Problem:    Suspending with CTRL-Z does not work on Android.
Solution:   Do not handle SIGTSTP. (closes #9854)
2022-02-27 12:31:52 +00:00
Yegappan Lakshmanan
6caeda2fce patch 8.2.4479: no fuzzy completieon for maps and abbreviations
Problem:    No fuzzy completieon for maps and abbreviations.
Solution:   Fuzzy complete maps and abbreviations. (Yegappan Lakshmanan,
            closes #9856)
2022-02-27 12:07:30 +00:00
Yegappan Lakshmanan
00333cb3b3 patch 8.2.4478: crash when using fuzzy completion
Problem:    Crash when using fuzzy completion.
Solution:   Temporary fix: put back regexp. (closes #9852, closes #9851)
2022-02-26 16:05:08 +00:00
Bram Moolenaar
29ab6ce9f3 patch 8.2.4477: crash when using fuzzy completion
Problem:    Crash when using fuzzy completion.
Solution:   Temporary fix: put back regexp. (closes #9851)
2022-02-26 15:52:08 +00:00
Bram Moolenaar
c51cf03298 Update runtime files. 2022-02-26 12:25:45 +00:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
e41c1dd889 patch 8.2.4476: operator name spelled wrong
Problem:    Operator name spelled wrong.
Solution:   Change trinary to ternary. (Goc Dundar, closes #9850)
2022-02-26 11:46:13 +00:00
Yegappan Lakshmanan
4df5b33f20 patch 8.2.4475: fuzzy cmdline completion does not work for lower case
Problem:    Fuzzy cmdline completion does not work for lower case.
Solution:   Also use fuzzy completion for lower case input. (Yegappan
            Lakshmanan, closes #9849)
2022-02-26 11:04:42 +00:00
Yegappan Lakshmanan
5a2d4a3ecb patch 8.2.4474: memory allocation failures not tested in quickfix code
Problem:    Memory allocation failures not tested in quickfix code.
Solution:   Add alloc IDs and tests. (Yegappan Lakshmanan, closes #9848)
2022-02-26 10:31:32 +00:00
Bram Moolenaar
416b5f4894 patch 8.2.4473: Coverity warnds for not checking return value of ftell()
Problem:    Coverity warnds for not checking return value of ftell().
Solution:   Bail out if ftell() returns a negative value.
2022-02-25 21:47:48 +00:00
Bram Moolenaar
9383a3afb6 patch 8.2.4472: Coverity warns for use of a freed function name
Problem:    Coverity warns for use of a freed function name.
Solution:   Only check an autoload name when is prefixed.
2022-02-25 21:35:17 +00:00
Bram Moolenaar
62628d97c4 patch 8.2.4471: Coverity warns for uninitialized variable
Problem:    Coverity warns for uninitialized variable.
Solution:   Set flags to zero.
2022-02-25 21:10:53 +00:00
Bram Moolenaar
ae49aa8434 patch 8.2.4470: Coverity warns for uninitialized variable
Problem:    Coverity warns for uninitialized variable.
Solution:   Set can_spell to zero.
2022-02-25 21:05:36 +00:00
Bram Moolenaar
05c1734c4f patch 8.2.4469: Coverity warns for uninitialized variable
Problem:    Coverity warns for uninitialized variable.
Solution:   Set the value to zero.
2022-02-25 20:57:11 +00:00
Bram Moolenaar
68afde4c9b patch 8.2.4468: Coverity warns for uninitialized struct member
Problem:    Coverity warns for uninitialized struct member.
Solution:   Set color.index to zero.
2022-02-25 20:48:26 +00:00
Bram Moolenaar
0e71b7d4ce patch 8.2.4467: running filetype test leaves file behind
Problem:    Running filetype test leaves file behind.
Solution:   Delete the file.
2022-02-25 17:45:04 +00:00
Cam Sinclair
5c6edf41f9 patch 8.2.4466: MS-Windows: illegal memory access in installer
Problem:    MS-Windows: illegal memory access in installer when using
            "create-directories" as the final argument.
Solution:   Check the argument count. (Cam Sinclair, closes #9844)
2022-02-25 17:42:23 +00:00
Yegappan Lakshmanan
5ec633b9b0 patch 8.2.4465: fuzzy completion does not order matches properly
Problem:    Fuzzy completion does not order matches properly.
Solution:   Do not use regular expression match. (Yegappan Lakshmanan,
            closes #9843)
2022-02-25 15:24:24 +00:00
=?UTF-8?q?Teubel=20Gy=C3=B6rgy?=
4d56b971cb patch 8.2.4464: Dtrace files are recognized as filetype D
Problem:    Dtrace files are recognized as filetype D.
Solution:   Add a pattern for Dtrace files. (Teubel György, closes #9841)
            Add some more testing.
2022-02-24 17:59:09 +00:00
Yegappan Lakshmanan
38b85cb4d7 patch 8.2.4463: completion only uses strict matching
Problem:    Completion only uses strict matching.
Solution:   Add the "fuzzy" item for 'wildoptions'. (Yegappan Lakshmanan,
            closes #9803)
2022-02-24 13:28:41 +00:00
Yegappan Lakshmanan
9c9be05b17 patch 8.2.4462: not enough testing for quickfix code
Problem:    Not enough testing for quickfix code.
Solution:   Add more tests. Fix uncovered problem. (Yegappan Lakshmanan,
            closes #9839)
2022-02-24 12:33:17 +00:00
Bram Moolenaar
3c620b0c03 patch 8.2.4461: MS-Windows: garbage characters on stdout with VIMDLL
Problem:    MS-Windows: garbage characters on stdout with VIMDLL.
Solution:   Don't call gui_focus_change() when about to quit. (Ken Takata,
            closes #9840)
2022-02-24 11:39:43 +00:00
Bram Moolenaar
dea5ab0fc5 patch 8.2.4460: Vim9: wrong error for defining dict function
Problem:    Vim9: wrong error for defining dict function.
Solution:   Explicitly check for trying to define a dict function.
            (closes 9827)
2022-02-23 22:12:02 +00:00
Bram Moolenaar
fa02616718 patch 8.2.4459: Vim9: compiling sort() call fails with unknown arguments
Problem:    Vim9: compiling sort() call fails with a funcref that has unknown
            arguments.
Solution:   Do not check the arguments if they are unknown at compile time.
            (closes #9835)
2022-02-23 21:03:32 +00:00
Bram Moolenaar
6e1a38745f patch 8.2.4458: Vim9: compiling filter() call fails with unknown arguments
Problem:    Vim9: compiling filter() call fails with funcref that has unknown
            arguments.
Solution:   Do not check the arguments if they are unknown at compile time.
            (closes #9835)
2022-02-23 19:11:49 +00:00
Bram Moolenaar
33fc4a6307 patch 8.2.4457: the GPM library can only be linked statically
Problem:    The GPM library can only be linked statically.
Solution:   Make it possible to load the GPM library dynamically. (Damien)
2022-02-23 18:07:38 +00:00
Zdenek Dohnal
dd2dfb3cb0 patch 8.2.4456: terminal test may fail on some machines
Problem:    Terminal test may fail on some machines.
Solution:   Increase wait time. (Zdenek Dohnal, closes #9834)
2022-02-23 14:25:17 +00:00
Bram Moolenaar
2007dd49f5 patch 8.2.4455: accepting one and zero for second sort() argument is strange
Problem:    Accepting one and zero for the second sort() argument is strange.
Solution:   Disallow using one and zero in Vim9 script.
2022-02-23 13:17:47 +00:00
zeertzjq
6a8b13614e patch 8.2.4454: resetting cmdwin_type only for one situation
Problem:    Resetting cmdwin_type only for one situation.
Solution:   Reset cmdwin_type before closing windows. (closes #9822)
2022-02-23 12:23:08 +00:00
Bram Moolenaar
4791fcd825 patch 8.2.4453: :helpgrep may free an option that was not allocated
Problem:    :helpgrep may free an option that was not allocated. (Yegappan
            Lakshmanan)
Solution:   Check if the value was allocated.
2022-02-23 12:06:00 +00:00
Bram Moolenaar
2dada73a4e patch 8.2.4452: test for what 8.2.4436 fixes does not check for regression
Problem:    Test for what 8.2.4436 fixes does not check for regression.
Solution:   Set several options. (Ken Takata, closes #9830)
2022-02-23 10:52:41 +00:00
Bram Moolenaar
9cd4c0fb98 patch 8.2.4451: sort() fails when ignoring case
Problem:    sort() fails when ignoring case.
Solution:   Accept a number one argument in sort().
2022-02-22 22:53:10 +00:00
Bram Moolenaar
2afeb40831 patch 8.2.4450: list sort test fails
Problem:    List sort test fails.
Solution:   Pass a valid "how" argument.
2022-02-22 22:17:00 +00:00
Bram Moolenaar
e843efcc35 patch 8.2.4449: vim9: function argument of sort() not checked at compile time
Problem:    vim9: function argument of sort() not checked at compile time.
Solution:   Add a compile time check.
2022-02-22 21:54:44 +00:00
Bram Moolenaar
b2c72359dc patch 8.2.4448: filetype detection is failing
Problem:    Filetype detection is failing.
Solution:   Do not use "s:" where it is no longer allowed.
2022-02-22 21:17:40 +00:00
Bram Moolenaar
afa048f0d4 patch 8.2.4447: Vim9: can still use s:var in a compiled function
Problem:    Vim9: can still use s:var in a compiled function.
Solution:   Disallow using s:var for Vim9 script. (closes #9824)
2022-02-22 20:43:36 +00:00
Bram Moolenaar
fe73255c92 patch 8.2.4446: Vim9: cannot refer to a global function like a local one
Problem:    Vim9: cannot refer to a global function like a local one.
Solution:   When g:name is not a variable but a function, use a function
            reference. (closes #9826)
2022-02-22 19:39:13 +00:00
Bram Moolenaar
29a9e69718 patch 8.2.4445: exit test fails on MS-Windows anyway
Problem:    Exit test fails on MS-Windows anyway.
Solution:   Skip the test on MS-Windows.
2022-02-22 18:48:11 +00:00
Bram Moolenaar
68eab67119 patch 8.2.4444: beep caused by test
Problem:    Beep caused by test.  ASAN reports leaks.
Solution:   Do not put a NL at the end of the script.  Make the text work on
            MS-Windows.  Do not run the test with ASAN.
2022-02-22 17:42:48 +00:00
Bram Moolenaar
2457b2bbc2 patch 8.2.4443: regexp pattern test fails on Mac
Problem:    Regexp pattern test fails on Mac.
Solution:   Do not use a swapfile for the buffer.
2022-02-22 16:19:37 +00:00
Bram Moolenaar
70b9e4f4c3 patch 8.2.4442: test for error reading input fails on MS-Windows
Problem:    Test for error reading input fails on MS-Windows.
Solution:   Don't run the test on MS-Windows.
2022-02-22 15:24:51 +00:00
Bram Moolenaar
16f6c8ac94 patch 8.2.4441: Vim9: function argument of filter() not checked like map()
Problem:    Vim9: function argument of filter() not checked like map().
Solution:   Also check the function argument of filter().
2022-02-22 15:12:14 +00:00
Bram Moolenaar
6456fae9ba patch 8.2.4440: crash with specific regexp pattern and string
Problem:    Crash with specific regexp pattern and string.
Solution:   Stop at the start of the string.
2022-02-22 13:37:31 +00:00
Bram Moolenaar
1349bd712c patch 8.2.4439: accepting "iso8859" 'encoding' as "iso-8859-"
Problem:    Accepting "iso8859" 'encoding' as "iso-8859-".
Solution:   use "iso8859" as "iso-8859-1".
2022-02-22 12:34:28 +00:00
Bram Moolenaar
ca0c1caa36 patch 8.2.4438: crash on exit when using cmdline window
Problem:    Crash on exit when using cmdline window.
Solution:   Reset "cmdwin_type" before exiting. (closes #9817)
2022-02-22 12:08:07 +00:00
K.Takata
0f113e4f7b patch 8.2.4437: vartabs test fails on MS-Windows
Problem:    Vartabs test fails on MS-Windows.
Solution:   Use iso8859-1 'encoding'. (Ken Takata, closes #9818)
2022-02-22 11:04:50 +00:00
Bram Moolenaar
4e889f98e9 patch 8.2.4436: crash with weird 'vartabstop' value
Problem:    Crash with weird 'vartabstop' value.
Solution:   Check for running into the end of the line.
2022-02-21 19:36:12 +00:00
Bram Moolenaar
7842761bba patch 8.2.4435: dead code in checking map() arguments
Problem:    Dead code in checking map() arguments. (Dominique Pellé)
Solution:   Remove the first return statement. (closes #9815)
2022-02-21 18:34:30 +00:00
Sean Dewar
16b51d26fe patch 8.2.4434: duplicate check for cmdline window
Problem:    Duplicate check for cmdline window.
Solution:   Remove the second check. (Sean Dewar, closes #9816)
2022-02-21 17:56:33 +00:00
K.Takata
83e36c8606 patch 8.2.4433: CI: cannot see interface versions for MS-Windows
Problem:    CI: cannot see interface versions for MS-Windows.
Solution:   List the interface versions. (Ken Takata, closes #9811)
2022-02-21 17:49:28 +00:00
Bram Moolenaar
592f625001 patch 8.2.4432: cannot use settabvar() while the cmdline window is open
Problem:    Cannot use settabvar() while the cmdline window is open.
Solution:   Only give an error when actually switching tabpage.
            (closes #9813)
2022-02-21 16:13:49 +00:00
Bram Moolenaar
993faa3405 patch 8.2.4431: unnecessary condition when assigning to a variable
Problem:    Unnecessary condition when assigning to a variable.
Solution:   Remove the condition.
2022-02-21 15:59:11 +00:00
Amon Sha
101979358f patch 8.2.4430: GTK: crash when using 'guiligatures' and reading from stdin
Problem:    GTK: crash when using 'guiligatures' and reading from stdin.
Solution:   Make a copy of the message. (Amon Sha, closes #9719, closes #9814)
2022-02-21 15:07:12 +00:00
Bram Moolenaar
c2f17f7e64 patch 8.2.4429: using script-local function from the wrong script
Problem:    Using script-local function from the wrong script when using a
            partial. (Yegappan Lakshmanan)
Solution:   Include the script ID in the partial name.
2022-02-21 13:13:50 +00:00
Bram Moolenaar
0f6e28f686 patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem:    Crash when switching tabpage while in the cmdline window.
Solution:   Disallow switching tabpage when in the cmdline window.
2022-02-20 20:49:35 +00:00
Bram Moolenaar
944697ae19 Update runtime files 2022-02-20 19:48:20 +00:00
zeertzjq
ad6c45f625 patch 8.2.4427: getchar() may return modifiers if no character is available
Problem:    getchar() may return modifiers if no character is available.
Solution:   Do not process modifiers when there is no character. (closes #9806)
2022-02-20 19:05:10 +00:00
Bram Moolenaar
c1e6c7bafe patch 8.2.4426: map() function on string and blob does not check types
Problem:    map() function on string and blob does not check argument types at
            compile time.
Solution:   Check string and blob argument types.  Support "0z1234->func()".
2022-02-20 18:26:46 +00:00
Bram Moolenaar
eddd4fc4f6 patch 8.2.4425: map() function does not check function arguments
Problem:    map() function does not check function arguments at compile time.
Solution:   Give an error if the arguments of a map() function are wrong.
2022-02-20 15:52:28 +00:00
NullVoxPopuli
cdf717283c patch 8.2.4424: ".gts" and ".gjs" files are not recognized
Problem:    ".gts" and ".gjs" files are not recognized.
Solution:   Recognize Glimmer flavored typescript and javascript.
            (closes #9799)
2022-02-19 16:35:58 +00:00
Bram Moolenaar
d56eb654f5 patch 8.2.4423: "make nvcmdidxs" fails
Problem:    "make nvcmdidxs" fails.
Solution:   Use "-S" instead of "-u" to source the script.
2022-02-19 16:00:16 +00:00
Bram Moolenaar
adbb383e0f patch 8.2.4422: autochdir test fails on MS-Windows
Problem:    Autochdir test fails on MS-Windows.
Solution:   Expecta nother error on MS-Windows.
2022-02-19 14:49:51 +00:00
Bram Moolenaar
20563e0f84 patch 8.2.4421: some installed files and directories have wrong permissions
Problem:    Some installed files and directories have wrong permissions.
Solution:   Adjust the Makefile and shell to set permissions. (closes #9793)
2022-02-19 13:25:18 +00:00
Ada
a42535340a patch 8.2.4420: menu translations are inconsistent
Problem:    Menu translations are inconsistent.
Solution:   Add a Makefile to convert between encodings. (Ada (Haowen) Yu,
            closes #9801)
2022-02-19 12:06:09 +00:00
Brandon Richardson
a493b6506b patch 8.2.4419: illegal memory access when using 20 highlights
Problem:    Illegal memory access when using exactly 20 highlights.
Solution:   Add one more item in the array. (Brandon Richardson,
            closes #9800)
2022-02-19 11:45:03 +00:00
Bram Moolenaar
5921aeb574 patch 8.2.4418: crash when using special multi-byte character
Problem:    Crash when using special multi-byte character.
Solution:   Don't use isalpha() for an arbitrary character.
2022-02-19 11:20:12 +00:00
Bram Moolenaar
e89bfd212b patch 8.2.4417: using NULL pointer
Problem:    Using NULL pointer.
Solution:   Set offset after checking for NULL pointer.
2022-02-18 18:34:45 +00:00
Bram Moolenaar
1fca5f3e86 patch 8.2.4416: Vim9: using a script-local function requires using "s:"
Problem:    Vim9: using a script-local function requires using "s:" when
            setting 'completefunc'.
Solution:   Do not require "s:" in Vim9 script. (closes #9796)
2022-02-18 17:50:47 +00:00
Bram Moolenaar
b8fb5bb68d patch 8.2.4415: function argument name conflicts with C++ keyword
Problem:    Function argument name conflicts with C++ keyword.
Solution:   Rename the argument.
2022-02-18 13:56:38 +00:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
97b231541d patch 8.2.4414: solidity files are not recognized
Problem:    Solidity files are not recognized.
Solution:   Add the *.sol pattern. (Dundar Goc, closes #9792)
2022-02-18 13:45:55 +00:00
Bram Moolenaar
56acd1f8ed patch 8.2.4413: Vim9: Coverity warns for using NULL pointer
Problem:    Vim9: Coverity warns for using NULL pointer.
Solution:   Give an internal error when funcref function can't be found.
2022-02-18 13:24:52 +00:00
Bram Moolenaar
0257599036 patch 8.2.4412: translation cleanup script does not remove empty lines at end
Problem:    Translation cleanup script does not remove empty lines at end.
Solution:   Remove empty lines at the end. (Ken Takata, closes #9794)
2022-02-18 11:28:29 +00:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
8e5ba693ad patch 8.2.4411: bicep files are not recognized
Problem:    Bicep files are not recognized.
Solution:   Match *.bicep files. (Dundar Goc, closes #9791)
2022-02-17 21:30:26 +00:00
Bram Moolenaar
0c7f2610de patch 8.2.4410: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few more tests. Remove dead code.
2022-02-17 19:44:07 +00:00
Bram Moolenaar
6296d1e60e patch 8.2.4409: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few more tests.  Fix reported line number.
2022-02-17 16:30:11 +00:00
Bram Moolenaar
ea5c898b5f patch 8.2.4408: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few more tests.  Correct error message.  Allow unlet on dict
            with a number key.
2022-02-17 14:42:02 +00:00
Bram Moolenaar
e08be09a08 patch 8.2.4407: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add more tests.  Avoid giving two errors.  Remove dead code.
2022-02-17 13:08:26 +00:00
Yegappan Lakshmanan
2438430863 patch 8.2.4406: expand functions use confusing argument names
Problem:    Expand functions use confusing argument names.
Solution:   Rename "file" to "match".  Refactor some completion code.  Add a
            few more tests. (Yegappan Lakshmanan, closes #9790)
2022-02-17 11:26:42 +00:00
Bram Moolenaar
8329ab79b2 patch 8.2.4405: compiler warning for unused variable without +folding
Problem:    Compiler warning for unused variable without the +folding feature.
            (Tony Mechelynck)
Solution:   Add #ifdef.
2022-02-16 21:51:00 +00:00
Bram Moolenaar
cd1cda2f87 patch 8.2.4404: Vim9: some code not covered by tests
Problem:    Vim9: some code not covered by tests.
Solution:   Add a few specific test cases.
2022-02-16 21:48:25 +00:00
Bram Moolenaar
9437737833 patch 8.2.4403: ml_get error with nested folds and deleting lines
Problem:    ml_get error with nested folds and deleting lines.
Solution:   Correct the last line number before calling hasFoldingWin().
2022-02-16 20:30:52 +00:00
kylo252
ae6f1d8b14 patch 8.2.4402: missing parenthesis may cause unexpected problems
Problem:    Missing parenthesis may cause unexpected problems.
Solution:   Add more parenthesis is macros. (closes #9788)
2022-02-16 19:24:07 +00:00
Bram Moolenaar
d288eaad84 patch 8.2.4401: map listing does not clear the rest of the command line
Problem:    Map listing does not clear the rest of the command line.
Solution:   Call msg_clear_eos(). (closes #5623, closes #5962)
2022-02-16 18:27:55 +00:00
zeertzjq
646bb7247a patch 8.2.4400: MS-Windows: cannot use the mouse in the console with VIMDLL
Problem:    MS-Windows: cannot use the mouse in the console with VIMDLL.
Solution:   use add_char2buf() instead of fix_input_buffer(). (closes #9784,
            closes #9769)
2022-02-16 17:51:47 +00:00
Bram Moolenaar
f9435e49ef patch 8.2.4399: crash after ml_get error
Problem:    Crash after ml_get error.
Solution:   When returning "???" flush the line and set ml_line_lnum.
2022-02-16 16:33:28 +00:00
Yegappan Lakshmanan
b31aec3b93 patch 8.2.4398: some command completion functions are too long
Problem:    Some command completion functions are too long.
Solution:   Refactor code into separate functions.  Add a few more tests.
            (Yegappan Lakshmanan, closes #9785)
2022-02-16 12:44:29 +00:00
Bram Moolenaar
34f8117dec patch 8.2.4397: crash when using many composing characters in error message
Problem:    Crash when using many composing characters in error message.
Solution:   Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
2022-02-16 12:16:19 +00:00
Bram Moolenaar
f5288c5895 patch 8.2.4396: Python3 test fails
Problem:    Python3 test fails.
Solution:   Remove "let".
2022-02-15 21:33:29 +00:00
Bram Moolenaar
8b716f5f22 patch 8.2.4395: some code lines not covered by tests
Problem:    Some code lines not covered by tests.
Solution:   Add a few more test cases.  Fix getting more than one error for
            invalid assignment.
2022-02-15 21:17:56 +00:00
Bram Moolenaar
9fdde7992a patch 8.2.4394: UTF8 select mode test fails on MS-Windows
Problem:    UTF8 select mode test fails on MS-Windows.
Solution:   Revert the #ifdef change.
2022-02-15 19:52:56 +00:00
Bram Moolenaar
6b43471da4 patch 8.2.4393: possible number overflow with nested folds
Problem:    Possible number overflow with nested folds.
Solution:   Avoid a negative line number.
2022-02-15 19:15:22 +00:00
Bram Moolenaar
64d95cfc56 patch 8.2.4392: MS-Windows with VIMDLL: Escaping CSI is wrong
Problem:    MS-Windows with VIMDLL: Escaping CSI is wrong.
Solution:   Put back #ifdef. (Ken Takata, closes #9769)
2022-02-15 17:17:18 +00:00
Bram Moolenaar
0e1f36fc59 patch 8.2.4391: command line executed when typing Esc in the GUI
Problem:    Command line executed when typing Esc in the GUI.
Solution:   Move saving/restoring KeyTyped to build_stl_str_hl().
            (closes #9783)
2022-02-15 16:17:44 +00:00
Bram Moolenaar
e88c6b7a5d patch 8.2.4390: Vim9: list from declaration with inferred type not set
Problem:    Vim9: list from declaration with inferred type does not set the
            type on the value.
Solution:   When inferring the type in a variable declaration also set the
            type of the list or dictionary. (closes #9705)  Do not set the
            type when the member is "any".
2022-02-15 15:37:11 +00:00
Bram Moolenaar
4556a2e868 patch 8.2.4389: screenpos() does not handle a position in a closed fold
Problem:    screenpos() does not handle a position in a closed fold.
Solution:   Check if the position is inside a closed fold. (closes #9778)
2022-02-15 13:40:17 +00:00
zeertzjq
7745f14ef3 patch 8.2.4388: dead code in op_insert()
Problem:    Dead code in op_insert().
Solution:   Remove condition and else block. (closes #9782)
2022-02-15 11:48:22 +00:00
Yegappan Lakshmanan
e3846cf1eb patch 8.2.4387: command line completion doesn't always work properly
Problem:    Command line completion doesn't always work properly.
Solution:   Adjust triggering after a "|".  Add more tests. (Yegappan
            Lakshmanan, closes #9779)
2022-02-15 11:35:54 +00:00
Bram Moolenaar
8991be2ab4 patch 8.2.4386: still cannot build tiny version
Problem:    Still cannot build tiny version.
Solution:   Adjust #ifdefs.
2022-02-14 21:51:46 +00:00
Bram Moolenaar
b5d2039e00 patch 8.2.4385: cannot build tiny version
Problem:    Cannot build tiny version.
Solution:   Adjust #ifdefs.
2022-02-14 21:42:15 +00:00
Bram Moolenaar
bc51006402 patch 8.2.4384: Vim9: error message not tested, some code not tested
Problem:    Vim9: error message not tested, some code not tested.
Solution:   Add a couple of test cases.  Give an error for a command modifier
            without a command.
2022-02-14 21:19:04 +00:00
Bram Moolenaar
7a3b802bab patch 8.2.4383: Vim9: unused code lines
Problem:    Vim9: unused code lines.
Solution:   Rely on either "cctx" or "cstack" to not be NULL.
2022-02-14 19:53:03 +00:00
Bram Moolenaar
e4835bf340 patch 8.2.4382: a custom 'tabline' may cause Esc to work like Enter
Problem:    A custom 'tabline' may cause Esc to work like Enter on the
            command line when the popup menu is displayed.
Solution:   Save and restore KeyTyped. (closes #9776)
2022-02-14 19:17:53 +00:00
Bram Moolenaar
0e76714e90 patch 8.2.4381: translation file listed twice
Problem:    Translation file listed twice.
Solution:   Remove one entry.
2022-02-14 15:59:05 +00:00
Ada
774e55702f patch 8.2.4380: small differences between Chinese translation files
Problem:    Small differences between Chinese translation files.
Solution:   Add rule for converting UTF-8 to gb2312. (closes #9773)
2022-02-14 15:04:55 +00:00
Bram Moolenaar
55737c2a31 patch 8.2.4379: an empty change is reported to a listener
Problem:    An empty change is reported to a listener.
Solution:   Do not report an empty change. (closes #9768)  Remove unused
            return value.
2022-02-14 14:51:22 +00:00
Christian Brabandt
6dd7424c7e patch 8.2.4378: incsearch HL broken when calling searchcount in 'tabLine'
Problem:    Incsearch highlight broken when calling searchcount() in 'tabLine'
            function. (Mirko Palmer)
Solution:   Save and restore the incsearch state. (Christian Brabandt,
            closes #9763, closes #9633)
2022-02-14 12:44:32 +00:00
ichizok
0cd3e94e2c patch 8.2.4377: CI steps for Windows are a bit unorganized
Problem:    CI steps for Windows are a bit unorganized.
Solution:   Organize CI test steps on Windows. (Ozaki Kiichi, closes #9764)
2022-02-14 11:36:57 +00:00
Yegappan Lakshmanan
9773db6f9b patch 8.2.4376: not enough tests for command line completion
Problem:    Not enough tests for command line completion.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #9771)
2022-02-14 11:10:59 +00:00
Bram Moolenaar
4b1d963972 patch 8.2.4375: ctx_imports is not used
Problem:    ctx_imports is not used.
Solution:   Delete ctx_imports.  Add missing dependency.
2022-02-13 21:51:08 +00:00
Bram Moolenaar
0631bb4ed7 patch 8.2.4374: unreachable code
Problem:    Unreachable code.
Solution:   Remove outdated code lines.
2022-02-13 21:20:21 +00:00
Bram Moolenaar
c87aa34dfd patch 8.2.4373: expression test fails
Problem:    Expression test fails.
Solution:   Make the test work with latest Vim9 syntax.
2022-02-13 20:46:18 +00:00
Bram Moolenaar
299d8e5eec patch 8.2.4372: filetype detection from file contents is in legacy script
Problem:    Filetype detection from file contents is in legacy script.
Solution:   Use a compiled function for filetype detection.
2022-02-13 20:32:02 +00:00
Bram Moolenaar
75e27d78f5 patch 8.2.4371: Vim9: can create a script variable from a legacy function
Problem:    Vim9: can create a script variable from a legacy function.
Solution:   Disallow creating a script variable from a function.
2022-02-13 13:56:29 +00:00
Christian Brabandt
cf6ad8ea8c patch 8.2.4370: MS-Windows: libsodium.dll not included with the installer
Problem:    MS-Windows: libsodium.dll not included with the installer.
Solution:   Add the file to the installer if it exists. (Christian Brabandt,
            closes #9762)
2022-02-13 13:11:32 +00:00
ola.soder@axis.com
f7fbeed0ac patch 8.2.4369: redundant #ifdef argument
Problem:    Redundant #ifdef argument.
Solution:   Remove unused MSWIN. (Ola Söder, closes #9758)
2022-02-13 12:24:21 +00:00
ola.soder@axis.com
e131496ebf patch 8.2.4368: Amiga: a few compiler warnings
Problem:    Amiga: a few compiler warnings.
Solution:   Adjust #ifdefs. Add "UNUSED". (Ola Söder, closes #9756,
            closes #9757)
2022-02-13 12:13:38 +00:00
Bram Moolenaar
4525a57afb patch 8.2.4367: calling in_vim9script() multiple times
Problem:    Calling in_vim9script() multiple times.
Solution:   Call it once and keep the result.
2022-02-13 11:57:33 +00:00
Yegappan Lakshmanan
4d03d87000 patch 8.2.4366: not enough tests for command line completion
Problem:    Not enough tests for command line completion.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #9760)
2022-02-13 11:45:09 +00:00
Bram Moolenaar
cdf0485969 patch 8.2.4365: sticky command modifiers are too sticky
Problem:    sticky command modifiers are too sticky.
Solution:   Do not apply command modifiers to a called function. (closes #9751)
2022-02-12 22:13:06 +00:00
Bram Moolenaar
4549166078 patch 8.2.4364: MS-Windows: still running out of memory for a very long line
Problem:    MS-Windows: still running out of memory for a very long line.
Solution:   Check for negative length.
2022-02-12 21:59:51 +00:00
Bram Moolenaar
8e38555ece patch 8.2.4363: MS-Windows: running out of memory for a very long line
Problem:    MS-Windows: running out of memory for a very long line.
Solution:   Use a 32 bit value for MAXCOL also when ints are 64 bits.
2022-02-12 21:16:21 +00:00
Bram Moolenaar
33f3c59854 patch 8.2.4362: :retab may allocate too much memory
Problem:    :retab may allocate too much memory.
Solution:   Bail out when allocating more than MAXCOL bytes.
2022-02-12 20:46:15 +00:00
Bram Moolenaar
62b191c387 patch 8.2.4361: Vim9: some tests fail
Problem:    Vim9: some tests fail.
Solution:   Fix the tests, mostly by removing "s:".
2022-02-12 20:34:50 +00:00
Bram Moolenaar
a749a42ed2 patch 8.2.4360: Vim9: allowing use of "s:" leads to inconsistencies
Problem:    Vim9: allowing use of "s:" leads to inconsistencies.
Solution:   Disallow using "s:" in Vim9 script at the script level.
2022-02-12 19:52:25 +00:00
Bram Moolenaar
6e28703a8e patch 8.2.4359: crash when repeatedly using :retab
Problem:    crash when repeatedly using :retab.
Solution:   Bail out when the line is getting too long.
2022-02-12 15:42:18 +00:00
Bram Moolenaar
90a57168a4 patch 8.2.4358: Vim9: line number of exception is not set
Problem:    Vim9: line number of exception is not set.
Solution:   Set the line number before throwing an exception. (closes #9755)
2022-02-12 14:23:17 +00:00
Bram Moolenaar
2a9b62dfa2 patch 8.2.4357: sticky command modifiers are too sticky
Problem:    sticky command modifiers are too sticky.
Solution:   Do not apply command modifiers to a sourced script. (closes #9751)
2022-02-12 13:30:17 +00:00
Yegappan Lakshmanan
620d8edba0 patch 8.2.4356: command line completion functions are very long
Problem:    Command line completion functions are very long.
Solution:   Refactor into multiple functions. (Yegappan Lakshmanan,
            closes #9753)
2022-02-12 12:03:07 +00:00
Sean Dewar
0f7ff851cb patch 8.2.4355: unnecessary call to check_colorcolumn()
Problem:    Unnecessary call to check_colorcolumn().
Solution:   Remove the call. (Sean Dewar, closes #9748)
2022-02-12 11:51:25 +00:00
K.Takata
d68b2fc034 patch 8.2.4354: dynamic loading of libsodium not handled properly
Problem:    Dynamic loading of libsodium not handled properly.
Solution:   Fix has() and :version. Show an error message when loading fails.
            Fix memory leaks. (Ken Takata, closes #9754)
2022-02-12 11:18:37 +00:00
Philip H
18f7593e57 patch 8.2.4353: CI does not use the latest Lua and Python
Problem:    CI does not use the latest Lua and Python.
Solution:   Use Lua 5.4.2 and Python 3.10. (closes #9744)
2022-02-12 10:53:07 +00:00
Ananda Umamil
0c3cc2fec3 patch 8.2.4352: ReScript files are not recognized
Problem:    ReScript files are not recognized.
Solution:   Add the *.res and *.resi patterns. (Ananda Umamil, closes #9752)
2022-02-12 10:33:56 +00:00
ichizok
41ee5b1913 patch 8.2.4351: no coverage is measured on MS-Windows CI
Problem:    No coverage is measured on MS-Windows CI.
Solution:   Enable coverage on MS-Windows. (Ozaki Kiichi, closes #9750)
2022-02-12 10:13:13 +00:00
ola.soder@axis.com
29c70f612f patch 8.2.4350: FEAT_GUI_ENABLED defined but never used
Problem:    FEAT_GUI_ENABLED defined but never used.
Solution:   Remove the #define. (Ola Söder, closes #9732)
2022-02-11 21:13:35 +00:00
Bram Moolenaar
c9e3187d05 patch 8.2.4349: FileChangedShell test fails on MS-Windows
Problem:    FileChangedShell test fails on MS-Windows.
Solution:   Skip the test on MS-Windows.
2022-02-11 20:55:16 +00:00
Bram Moolenaar
5b1d6e98c6 patch 8.2.4348: "legacy exe cmd" does not do what one would expect
Problem:    "legacy exe cmd" does not do what one would expect.
Solution:   Apply the "legacy" and "vim9script" command modifiers to the
            argument of ":execute".
2022-02-11 20:33:48 +00:00
ola.soder@axis.com
bd89d44063 patch 8.2.4347: in some build setups UNUSED is not defined
Problem:    In some build setups UNUSED is not defined.
Solution:   Change the logic of how UNUSED is defined. (Ola Söder,
            closes #9734)
2022-02-11 19:27:55 +00:00
Bram Moolenaar
481acb1141 patch 8.2.4346: a custom statusline may cause Esc to work like Enter
Problem:    A custom statusline may cause Esc to work like Enter on the
            command line when the popup menu is displayed.
Solution:   Save and restore KeyTyped. (closes #9749)
2022-02-11 18:51:45 +00:00
Bram Moolenaar
f6246f51e3 patch 8.2.4345: <amatch> is expanded like a file name for DirChangedPre
Problem:    <amatch> is expanded like a file name for DirChangedPre.
Solution:   Do not expand <amatch>. (closes #9742)  Also for the User event.
2022-02-11 16:30:12 +00:00
ola.soder@axis.com
14f23122bf patch 8.2.4344: Amiga: header file included twice
Problem:    Amiga: header file included twice.
Solution:   Remove #include. (Ola Söder, closes #9733)
2022-02-11 16:11:14 +00:00
Rob Pilling
8196e94a8b patch 8.2.4343: when reloading not all properties are detected
Problem:    When reloading not all properties are detected.
Solution:   Add the "edit" value to v:fcs_choice. (Rob Pilling, closes #9579)
2022-02-11 15:12:10 +00:00
Bram Moolenaar
92f645bef7 Update runtime files. (closes #9741) 2022-02-11 13:29:40 +00:00
ichizok
bece72785d patch 8.2.4342: CI will soon switch to other windows version
Problem:    CI will soon switch to other windows version.
Solution:   Use "windows-2019" instead of "windows-latest". (Ozaki Kiichi,
            closes #9740)
2022-02-11 11:09:40 +00:00
Bram Moolenaar
414acd342f patch 8.2.4341: command line not redrawn when finishing popup menu
Problem:    Command line not redrawn when finishing popup menu and the screen
            has scrolled up.
Solution:   Redraw the command line after updating the screen. (closes #9722)
2022-02-10 21:09:45 +00:00
ola.soder@axis.com
949b35d83b patch 8.2.4340: Amiga: mch_can_exe() is not implemented
Problem:    Amiga: mch_can_exe() is not implemented.
Solution:   Implement mch_can_exe() for Amiga OS 4. (Ola Söder, closes #9731)
2022-02-10 20:21:04 +00:00
Yegappan Lakshmanan
560dff49c0 patch 8.2.4339: CTRL-A does not work properly with the cmdline popup menu
Problem:    CTRL-A does not work properly with the cmdline popup menu.
Solution:   Fix issues with CTRL-A.  Add more tests for the cmdline popup
            menu.  Remove TermWait() before VeriryScreenDump().  Refactor the
            cmdline popup code. (Yegappan Lakshmanan, closes #9735)
2022-02-10 19:52:10 +00:00
Bram Moolenaar
74a0a5b26d patch 8.2.4338: an error from an expression mapping messes up the display
Problem:    An error from an expression mapping messes up the display.
Solution:   When the expression results in an empty string return K_IGNORE.
            In cmdline mode redraw the command line. (closes #9726)
2022-02-10 14:07:41 +00:00
Bram Moolenaar
9da17d7c57 Update runtime files 2022-02-09 21:50:44 +00:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
78a8404f8b patch 8.2.4337: part of condition is always true
Problem:    Part of condition is always true.
Solution:   Remove that part of the condition. (closes #9729)
2022-02-09 15:20:39 +00:00
Bram Moolenaar
769f5895eb patch 8.2.4336: using :filter for :scriptnames does not work
Problem:    Using :filter for :scriptnames does not work. (Ben Jackson)
Solution:   Call message_filtered(). (closes #9720)
2022-02-09 14:31:05 +00:00
Bram Moolenaar
28e8f73ae2 patch 8.2.4335: no autocommand event triggered before changing directory
Problem:    No autocommand event triggered before changing directory. (Ronnie
            Magatti)
Solution:   Add DirChangedPre. (closes #9721)
2022-02-09 12:58:20 +00:00
rbtnn
68cc2b8a37 patch 8.2.4334: command line popup menu not positioned correctly
Problem:    Command line popup menu not positioned correctly.
Solution:   Also use vim_strsize() on the existing text. (Naruhiko Nishino,
            closes #9727)
2022-02-09 11:55:47 +00:00
Bram Moolenaar
b6a138eb33 patch 8.2.4333: cstack not always passed to where it is needed
Problem:    cstack not always passed to where it is needed.
Solution:   Pass ctack through functions.
2022-02-08 21:17:22 +00:00
Bram Moolenaar
dce2441a60 patch 8.2.4332: Vim9: incomplete test for existing script variable in block
Problem:    Vim9: incomplete test for existing script variable in block.
Solution:   Add a couple more tests.  Fix uncovered problem.
2022-02-08 20:35:30 +00:00
Bram Moolenaar
3a5988c025 patch 8.2.4331: Vim9: no test for existing script variable in block
Problem:    Vim9: no test for existing script variable in block.
Solution:   Add a test.
2022-02-08 19:23:35 +00:00
Bram Moolenaar
779aeff5c3 patch 8.2.4330: Vim9: no error if script imports itself
Problem:    Vim9: no error if script imports itself.
Solution:   Give an error when a script imports itself.
2022-02-08 19:12:19 +00:00
haya14busa
e023d49937 patch 8.2.4329: no support for end line number and column in 'errorformat'
Problem:    No support for end line number and column in 'errorformat'.
Solution:   Add %e and %k. (closes #9624)
2022-02-08 18:09:29 +00:00
Bram Moolenaar
73a16c22a4 patch 8.2.4328: command line complete matches cleard when typing character
Problem:    Command line complete matches cleard when typing character.
            (Dominique Pellé)
Solution:   Only remove a popup menu if there is one.
2022-02-08 17:40:36 +00:00
Bram Moolenaar
e3537aec2f patch 8.2.4327: may end up with no current buffer
Problem:    May end up with no current buffer.
Solution:   When deleting the current buffer to not pick a quickfix buffer as
            the new current buffer.
2022-02-08 15:05:20 +00:00
zeertzjq
51ab7c7d0d patch 8.2.4326: "o" and "O" copying comment not sufficiently tested
Problem:    "o" and "O" copying comment not sufficiently tested.
Solution:   Add a test case. (closes #9718)
2022-02-08 12:58:37 +00:00
Yegappan Lakshmanan
3908ef5017 patch 8.2.4325: 'wildmenu' only shows few matches
Problem:    'wildmenu' only shows few matches.
Solution:   Add the "pum" option: use a popup menu to show the matches.
            (Yegappan Lakshmanan et al., closes #9707)
2022-02-08 12:08:07 +00:00
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
qsmodo
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
K.Takata
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
zeertzjq
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Dominique Pelle
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
3e79c97c18 Update runtime files; use compiled functions 2022-02-04 19:48:06 +00:00
Bram Moolenaar
a2baa73d1d Update runtime files. 2022-02-04 16:09:54 +00:00
Bram Moolenaar
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
K.Takata
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
Bram Moolenaar
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
Bram Moolenaar
02a977ea5e patch 8.2.4292: test fails
Problem:    Test fails.
Solution:   Adjust the expected error number.
2022-02-03 21:29:39 +00:00
Bram Moolenaar
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
K.Takata
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
K.Takata
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
K.Takata
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
ichizok
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
zeertzjq
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
matveyt
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Yegappan Lakshmanan
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
=?UTF-8?q?Bj=C3=B6rn=20Linse?=
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
Doug Kearns
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
Bram Moolenaar
c4573eb12d Update runtime files 2022-01-31 15:40:56 +00:00
Bram Moolenaar
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
Bram Moolenaar
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
K.Takata
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
ichizok
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
Bram Moolenaar
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
ichizok
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Yegappan Lakshmanan
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Yegappan Lakshmanan
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
Bram Moolenaar
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
Bram Moolenaar
f10911e5db Update runtime files 2022-01-29 22:20:48 +00:00
Bram Moolenaar
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
K.Takata
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
=?UTF-8?q?Dundar=20G=C3=B6c?=
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
=?UTF-8?q?Dundar=20G=C3=B6c?=
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
Bram Moolenaar
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
Yegappan Lakshmanan
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
Bram Moolenaar
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
ichizok
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
Bram Moolenaar
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
zeertzjq
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
K.Takata
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
=?UTF-8?q?Jakub=20Kul=C3=ADk?=
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
Shougo Matsushita
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
=?UTF-8?q?Dundar=20G=C3=B6c?=
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
Bram Moolenaar
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
Bram Moolenaar
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
=?UTF-8?q?Dundar=20G=C3=B6c?=
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
zeertzjq
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
K.Takata
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
Bram Moolenaar
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
Yegappan Lakshmanan
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
K.Takata
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
K.Takata
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
Yegappan Lakshmanan
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
K.Takata
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
K.Takata
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
Bram Moolenaar
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
820 changed files with 104708 additions and 56195 deletions

View File

@@ -2,13 +2,20 @@ env:
CIRRUS_CLONE_DEPTH: 3 CIRRUS_CLONE_DEPTH: 3
FEATURES: huge FEATURES: huge
freebsd_12_task: freebsd_task:
name: FreeBSD
matrix:
- name: FreeBSD 13.1
freebsd_instance:
image_family: freebsd-13-1
- name: FreeBSD 12.3
freebsd_instance:
image_family: freebsd-12-3
only_if: $CIRRUS_TAG == '' only_if: $CIRRUS_TAG == ''
timeout_in: 20m timeout_in: 20m
freebsd_instance:
image: freebsd-12-1-release-amd64
install_script: install_script:
pkg install -y gettext - pkg update -f
- pkg install -y gettext
build_script: build_script:
- NPROC=$(getconf _NPROCESSORS_ONLN) - NPROC=$(getconf _NPROCESSORS_ONLN)
- ./configure --with-features=${FEATURES} - ./configure --with-features=${FEATURES}

View File

@@ -4,3 +4,9 @@ coverage:
project: project:
default: default:
threshold: 0.05% threshold: 0.05%
# Files not run by tests
ignore:
- "src/dosinst.c"
- "src/dosinst.h"
- "src/uninstall.c"

9
.github/CODEOWNERS vendored
View File

@@ -9,6 +9,7 @@
# So if a pull request only touches javascript files, only these owners # So if a pull request only touches javascript files, only these owners
# will be requested to review. # will be requested to review.
runtime/autoload/freebasic.vim @dkearns
runtime/autoload/getscript.vim @cecamp runtime/autoload/getscript.vim @cecamp
runtime/autoload/netrw.vim @cecamp runtime/autoload/netrw.vim @cecamp
runtime/autoload/netrwFileHandlers.vim @cecamp runtime/autoload/netrwFileHandlers.vim @cecamp
@@ -111,6 +112,7 @@ runtime/ftplugin/pbtxt.vim @lakshayg
runtime/ftplugin/pdf.vim @tpope runtime/ftplugin/pdf.vim @tpope
runtime/ftplugin/ps1.vim @heaths runtime/ftplugin/ps1.vim @heaths
runtime/ftplugin/ps1xml.vim @heaths runtime/ftplugin/ps1xml.vim @heaths
runtime/ftplugin/qb64.vim @dkearns
runtime/ftplugin/routeros.vim @zainin runtime/ftplugin/routeros.vim @zainin
runtime/ftplugin/ruby.vim @tpope @dkearns runtime/ftplugin/ruby.vim @tpope @dkearns
runtime/ftplugin/sass.vim @tpope runtime/ftplugin/sass.vim @tpope
@@ -124,8 +126,11 @@ runtime/ftplugin/tmux.vim @ericpruitt
runtime/ftplugin/toml.vim @averms runtime/ftplugin/toml.vim @averms
runtime/ftplugin/typescript.vim @dkearns runtime/ftplugin/typescript.vim @dkearns
runtime/ftplugin/typescriptreact.vim @dkearns runtime/ftplugin/typescriptreact.vim @dkearns
runtime/ftplugin/wget.vim @dkearns
runtime/ftplugin/wget2.vim @dkearns
runtime/ftplugin/xml.vim @chrisbra runtime/ftplugin/xml.vim @chrisbra
runtime/ftplugin/zsh.vim @chrisbra runtime/ftplugin/zsh.vim @chrisbra
runtime/indent/basic.vim @dkearns
runtime/indent/bst.vim @tpope runtime/indent/bst.vim @tpope
runtime/indent/cdl.vim @dkearns runtime/indent/cdl.vim @dkearns
runtime/indent/clojure.vim @axvr runtime/indent/clojure.vim @axvr
@@ -140,6 +145,7 @@ runtime/indent/elm.vim @andys8
runtime/indent/eruby.vim @tpope @dkearns runtime/indent/eruby.vim @tpope @dkearns
runtime/indent/eterm.vim @dkearns runtime/indent/eterm.vim @dkearns
runtime/indent/framescript.vim @dkearns runtime/indent/framescript.vim @dkearns
runtime/indent/freebasic.vim @dkearns
runtime/indent/gitconfig.vim @tpope runtime/indent/gitconfig.vim @tpope
runtime/indent/haml.vim @tpope runtime/indent/haml.vim @tpope
runtime/indent/idlang.vim @dkearns runtime/indent/idlang.vim @dkearns
@@ -154,6 +160,7 @@ runtime/indent/occam.vim @dkearns
runtime/indent/postscr.vim @dkearns runtime/indent/postscr.vim @dkearns
runtime/indent/prolog.vim @dkearns runtime/indent/prolog.vim @dkearns
runtime/indent/ps1.vim @heaths runtime/indent/ps1.vim @heaths
runtime/indent/qb64.vim @dkearns
runtime/indent/readline.vim @dkearns runtime/indent/readline.vim @dkearns
runtime/indent/ruby.vim @AndrewRadev @dkearns runtime/indent/ruby.vim @AndrewRadev @dkearns
runtime/indent/sass.vim @tpope runtime/indent/sass.vim @tpope
@@ -239,6 +246,7 @@ runtime/syntax/prolog.vim @XVilka
runtime/syntax/ps1.vim @heaths runtime/syntax/ps1.vim @heaths
runtime/syntax/ps1xml.vim @heaths runtime/syntax/ps1xml.vim @heaths
runtime/syntax/psl.vim @danielkho runtime/syntax/psl.vim @danielkho
runtime/syntax/qb64.vim @dkearns
runtime/syntax/rc.vim @chrisbra runtime/syntax/rc.vim @chrisbra
runtime/syntax/routeros.vim @zainin runtime/syntax/routeros.vim @zainin
runtime/syntax/rpcgen.vim @cecamp runtime/syntax/rpcgen.vim @cecamp
@@ -262,6 +270,7 @@ runtime/syntax/tmux.vim @ericpruitt
runtime/syntax/toml.vim @averms runtime/syntax/toml.vim @averms
runtime/syntax/vim.vim @cecamp runtime/syntax/vim.vim @cecamp
runtime/syntax/wget.vim @dkearns runtime/syntax/wget.vim @dkearns
runtime/syntax/wget2.vim @dkearns
runtime/syntax/xbl.vim @dkearns runtime/syntax/xbl.vim @dkearns
runtime/syntax/xmath.vim @cecamp runtime/syntax/xmath.vim @cecamp
runtime/syntax/xml.vim @chrisbra runtime/syntax/xml.vim @chrisbra

View File

@@ -21,6 +21,7 @@ jobs:
TEST: test TEST: test
SRCDIR: ./src SRCDIR: ./src
LEAK_CFLAGS: -DEXITFREE LEAK_CFLAGS: -DEXITFREE
CFLAGS: -Wno-error=deprecated-declarations
LOG_DIR: ${{ github.workspace }}/logs LOG_DIR: ${{ github.workspace }}/logs
TERM: xterm TERM: xterm
DISPLAY: ':99' DISPLAY: ':99'
@@ -88,17 +89,25 @@ jobs:
fi fi
sudo apt update && sudo apt install -y "${PKGS[@]}" sudo apt update && sudo apt install -y "${PKGS[@]}"
- name: Install clang-13 - name: Install gcc-11
if: matrix.compiler == 'gcc'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt install -y gcc-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
sudo update-alternatives --set gcc /usr/bin/gcc-11
- name: Install clang-14
if: matrix.compiler == 'clang' if: matrix.compiler == 'clang'
run: | run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
. /etc/lsb-release . /etc/lsb-release
sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-13 main" sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-14 main"
sudo apt-get install -y clang-13 llvm-13 sudo apt install -y clang-14 llvm-14
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 100 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 100
sudo update-alternatives --set clang /usr/bin/clang-13 sudo update-alternatives --set clang /usr/bin/clang-14
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-13 100 sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-14 100
sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-13 100 sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-14 100
- name: Set up environment - name: Set up environment
run: | run: |
@@ -225,7 +234,7 @@ jobs:
do_test make ${SHADOWOPT} ${TEST} do_test make ${SHADOWOPT} ${TEST}
# - name: Coveralls # - name: Coveralls
# if: matrix.coverage && success() && github.event_name != 'pull_request' # if: matrix.coverage && github.event_name != 'pull_request'
# env: # env:
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} # COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
# COVERALLS_PARALLEL: true # COVERALLS_PARALLEL: true
@@ -238,21 +247,21 @@ jobs:
# ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8 # ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8
- name: Generate gcov files - name: Generate gcov files
if: matrix.coverage && success() if: matrix.coverage
run: | run: |
cd "${SRCDIR}" cd "${SRCDIR}"
find . -type f -name '*.gcno' -exec gcov -pb {} + || true find . -type f -name '*.gcno' -exec gcov -pb {} + || true
- name: Codecov - name: Codecov
if: matrix.coverage && success() if: matrix.coverage
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v3.1.0
with: with:
flags: ${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }} flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
- name: ASan logs - name: ASan logs
if: contains(matrix.extra, 'asan') && !cancelled() if: contains(matrix.extra, 'asan') && !cancelled()
run: | run: |
for f in $(grep -lR '#[[:digit:]]* *0x[[:digit:]a-fA-F]*' "${LOG_DIR}"); do for f in $(grep -lR '#[[:digit:]]* *0x[[:xdigit:]]*' "${LOG_DIR}"); do
asan_symbolize -l "$f" asan_symbolize -l "$f"
false # in order to fail a job false # in order to fail a job
done done
@@ -344,24 +353,25 @@ jobs:
make ${TEST} make ${TEST}
windows: windows:
runs-on: windows-latest runs-on: windows-2019
env: env:
VCVARSALL: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
# Interfaces # Interfaces
# Lua # Lua
LUA_VER: 54 LUA_VER: 54
LUA_VER_DOT: '5.4' LUA_VER_DOT: '5.4'
LUA_RELEASE: 5.4.0 LUA_RELEASE: 5.4.2
LUA32_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win32_dllw6_lib.zip LUA32_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win32_dllw6_lib.zip
LUA64_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win64_dllw6_lib.zip LUA64_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win64_dllw6_lib.zip
LUA_DIR: D:\Lua LUA_DIR: D:\Lua
# do not want \L to end up in pathdef.c and compiler complaining about unknown escape sequences \l
LUA_DIR_SLASH: D:/Lua
# Python 2 # Python 2
PYTHON_VER: 27 PYTHON_VER: 27
PYTHON_VER_DOT: '2.7' PYTHON_VER_DOT: '2.7'
# Python 3 # Python 3
PYTHON3_VER: 38 PYTHON3_VER: 310
PYTHON3_VER_DOT: '3.8' PYTHON3_VER_DOT: '3.10'
# Other dependencies # Other dependencies
# winpty # winpty
WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
@@ -392,6 +402,10 @@ jobs:
msystem: MINGW32 msystem: MINGW32
cygreg: registry32 cygreg: registry32
pyreg: "-32" pyreg: "-32"
- toolchain: mingw
arch: x64
features: HUGE
coverage: yes
exclude: exclude:
- toolchain: msvc - toolchain: msvc
arch: x64 arch: x64
@@ -406,6 +420,7 @@ jobs:
shell: bash shell: bash
run: | run: |
git config --global core.autocrlf input git config --global core.autocrlf input
echo "VCVARSALL=$(vswhere -products \* -latest -property installationPath)\\VC\\Auxiliary\\Build\\vcvarsall.bat" >> $GITHUB_ENV
python_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON_VER_DOT}/InstallPath/@") python_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON_VER_DOT}/InstallPath/@")
python3_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}${{ matrix.pyreg }}/InstallPath/@") python3_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}${{ matrix.pyreg }}/InstallPath/@")
echo "PYTHON_DIR=$python_dir" >> $GITHUB_ENV echo "PYTHON_DIR=$python_dir" >> $GITHUB_ENV
@@ -463,8 +478,7 @@ jobs:
- name: Copy src directory to src2 - name: Copy src directory to src2
shell: cmd shell: cmd
run: | run: xcopy src src2\ /E > nul
xcopy src src2\ /E > nul
- name: Build (MSVC) - name: Build (MSVC)
if: matrix.toolchain == 'msvc' if: matrix.toolchain == 'msvc'
@@ -472,17 +486,15 @@ jobs:
run: | run: |
call "%VCVARSALL%" ${{ matrix.vcarch }} call "%VCVARSALL%" ${{ matrix.vcarch }}
cd src 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" ( if "${{ matrix.features }}"=="HUGE" (
nmake -nologo -f Make_mvc2.mak ^ nmake -nologo -f Make_mvc.mak ^
FEATURES=${{ matrix.features }} ^ FEATURES=${{ matrix.features }} ^
GUI=yes IME=yes ICONV=yes VIMDLL=yes ^ GUI=yes IME=yes ICONV=yes VIMDLL=yes ^
DYNAMIC_LUA=yes LUA=%LUA_DIR% ^ DYNAMIC_LUA=yes LUA=%LUA_DIR% ^
DYNAMIC_PYTHON=yes PYTHON=%PYTHON_DIR% ^ DYNAMIC_PYTHON=yes PYTHON=%PYTHON_DIR% ^
DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR% DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR%
) else ( ) else (
nmake -nologo -f Make_mvc2.mak ^ nmake -nologo -f Make_mvc.mak ^
FEATURES=${{ matrix.features }} ^ FEATURES=${{ matrix.features }} ^
GUI=yes IME=yes ICONV=yes VIMDLL=yes GUI=yes IME=yes ICONV=yes VIMDLL=yes
) )
@@ -500,10 +512,10 @@ jobs:
mingw32-make -f Make_ming.mak -j2 \ mingw32-make -f Make_ming.mak -j2 \
FEATURES=${{ matrix.features }} \ FEATURES=${{ matrix.features }} \
GUI=yes IME=yes ICONV=yes VIMDLL=yes \ GUI=yes IME=yes ICONV=yes VIMDLL=yes \
DYNAMIC_LUA=yes LUA=${LUA_DIR} \ DYNAMIC_LUA=yes LUA=${LUA_DIR_SLASH} \
DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \ DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \
DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \ DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \
STATIC_STDCPLUS=yes STATIC_STDCPLUS=yes COVERAGE=${{ matrix.coverage }}
else else
mingw32-make -f Make_ming.mak -j2 \ mingw32-make -f Make_ming.mak -j2 \
FEATURES=${{ matrix.features }} \ FEATURES=${{ matrix.features }} \
@@ -511,6 +523,14 @@ jobs:
STATIC_STDCPLUS=yes STATIC_STDCPLUS=yes
fi fi
- name: Check version
shell: cmd
run: |
PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem }}\bin;%PATH%;%PYTHON3_DIR%
src\vim --version || exit 1
src\vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
src\vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
#- name: Prepare Artifact #- name: Prepare Artifact
# shell: cmd # shell: cmd
# run: | # run: |
@@ -524,27 +544,34 @@ jobs:
# name: vim${{ matrix.bits }}-${{ matrix.toolchain }} # name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
# path: ./artifacts # path: ./artifacts
- name: Test - name: Copy gcov data files to src2
if: matrix.coverage
shell: msys2 {0}
run: find src -name '*.gcno' | tar -c -T - | tar -x -C src2 --strip-components 1
- name: Test and show the result of testing gVim
shell: cmd shell: cmd
timeout-minutes: 20 timeout-minutes: 20
run: | run: |
PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem }}\bin;%PATH%;%PYTHON3_DIR% PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem }}\bin;%PATH%;%PYTHON3_DIR%
call "%VCVARSALL%" ${{ matrix.vcarch }} call "%VCVARSALL%" ${{ matrix.vcarch }}
cd src
echo.
echo %COL_GREEN%vim version:%COL_RESET%
.\vim --version || exit 1
echo %COL_GREEN%Start testing vim in background.%COL_RESET% 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" 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 %COL_GREEN%Test gVim:%COL_RESET%
cd testdir cd src\testdir
nmake -nologo -f Make_dos.mak VIMPROG=..\gvim || exit 1 nmake -nologo -f Make_dos.mak VIMPROG=..\gvim || exit 1
cd ..
echo %COL_GREEN%Wait for vim tests to finish.%COL_RESET% - name: Show the result of testing Vim
cd ..\src2\testdir shell: cmd
timeout-minutes: 20
run: |
PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem }}\bin;%PATH%;%PYTHON3_DIR%
call "%VCVARSALL%" ${{ matrix.vcarch }}
echo %COL_GREEN%Wait for Vim tests to finish.%COL_RESET%
cd src2\testdir
:: Wait about 10 minutes. :: Wait about 10 minutes.
for /L %%i in (1,1,60) do ( for /L %%i in (1,1,60) do (
if exist done.txt goto exitloop if exist done.txt goto exitloop
@@ -554,10 +581,35 @@ jobs:
set timeout=1 set timeout=1
:exitloop :exitloop
echo %COL_GREEN%Test results of vim:%COL_RESET% echo %COL_GREEN%The result of testing Vim:%COL_RESET%
cd src2\testdir
if exist messages type messages if exist messages type messages
nmake -nologo -f Make_dos.mak report VIMPROG=..\..\src\vim || exit 1 nmake -nologo -f Make_dos.mak report VIMPROG=..\..\src\vim || exit 1
if "%timeout%"=="1" ( if "%timeout%"=="1" (
echo %COL_RED%Timed out.%COL_RESET% echo %COL_RED%Timed out.%COL_RESET%
exit 1 exit 1
) )
- name: Generate gcov files
if: matrix.coverage
shell: msys2 {0}
run: |
cd src
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
cd ../src2
find . -type f -name '*.gcno' -exec gcov -pb {} + || true
- name: Codecov (gVim)
if: matrix.coverage
uses: codecov/codecov-action@v3.1.0
with:
directory: src
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}-gui
- name: Codecov (Vim)
if: matrix.coverage
uses: codecov/codecov-action@v3.1.0
with:
directory: src2
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}

7
.gitignore vendored
View File

@@ -96,5 +96,10 @@ src/shadow-*
src/runtime src/runtime
src/pixmaps src/pixmaps
# other possible files build by tools # other files possibly created by tools
src/cscope.out src/cscope.out
# Linter/language server files
/.cache/clangd/
/.ccls-cache/
/compile_commands.json

View File

@@ -113,6 +113,8 @@ SRC_ALL = \
src/nbdebug.h \ src/nbdebug.h \
src/netbeans.c \ src/netbeans.c \
src/normal.c \ src/normal.c \
src/nv_cmdidxs.h \
src/nv_cmds.h \
src/ops.c \ src/ops.c \
src/option.c \ src/option.c \
src/option.h \ src/option.h \
@@ -196,7 +198,6 @@ SRC_ALL = \
src/testdir/view_util.vim \ src/testdir/view_util.vim \
src/testdir/test[0-9]*.ok \ src/testdir/test[0-9]*.ok \
src/testdir/test77a.ok \ src/testdir/test77a.ok \
src/testdir/test83-tags? \
src/testdir/test77a.com \ src/testdir/test77a.com \
src/testdir/test_*.vim \ src/testdir/test_*.vim \
src/testdir/python2/*.py \ src/testdir/python2/*.py \
@@ -443,10 +444,8 @@ SRC_UNIX = \
src/configure \ src/configure \
src/configure.ac \ src/configure.ac \
src/create_cmdidxs.vim \ src/create_cmdidxs.vim \
src/gui_at_fs.c \ src/create_nvcmdidxs.c \
src/gui_at_sb.c \ src/create_nvcmdidxs.vim \
src/gui_at_sb.h \
src/gui_athena.c \
src/gui_gtk.c \ src/gui_gtk.c \
src/gui_gtk_f.c \ src/gui_gtk_f.c \
src/gui_gtk_f.h \ src/gui_gtk_f.h \
@@ -471,7 +470,6 @@ SRC_UNIX = \
src/osdef1.h.in \ src/osdef1.h.in \
src/osdef2.h.in \ src/osdef2.h.in \
src/pathdef.sh \ src/pathdef.sh \
src/proto/gui_athena.pro \
src/proto/gui_gtk.pro \ src/proto/gui_gtk.pro \
src/proto/gui_gtk_x11.pro \ src/proto/gui_gtk_x11.pro \
src/proto/gui_gtk_gresources.pro \ src/proto/gui_gtk_gresources.pro \
@@ -543,7 +541,6 @@ SRC_DOS = \
tools/rename.bat \ tools/rename.bat \
src/bigvim.bat \ src/bigvim.bat \
src/bigvim64.bat \ src/bigvim64.bat \
src/msvcsetup.bat \
src/msvc2008.bat \ src/msvc2008.bat \
src/msvc2010.bat \ src/msvc2010.bat \
src/msvc2015.bat \ src/msvc2015.bat \
@@ -629,6 +626,7 @@ SRC_DOS_BIN = \
src/xpm/x86/lib-vc14/libXpm.lib \ src/xpm/x86/lib-vc14/libXpm.lib \
src/xpm/x86/lib/libXpm.a \ src/xpm/x86/lib/libXpm.a \
src/xpm/x86/lib/libXpm.lib \ src/xpm/x86/lib/libXpm.lib \
runtime/bitmaps/vim.ico \
nsis/icons.zip \ nsis/icons.zip \
# source files for Amiga, DOS, etc. (also in the extra archive) # source files for Amiga, DOS, etc. (also in the extra archive)
@@ -660,10 +658,7 @@ SRC_HAIKU = \
# source files for the Mac (also in the extra archive) # source files for the Mac (also in the extra archive)
SRC_MAC = \ SRC_MAC = \
src/INSTALLmac.txt \ src/INSTALLmac.txt \
src/dehqx.py \
src/os_mac_rsrc/*.icns \
src/os_mac.h \ src/os_mac.h \
src/os_mac.rsr.hqx \
src/os_mac_conv.c \ src/os_mac_conv.c \
src/os_macosx.m \ src/os_macosx.m \
src/proto/os_mac_conv.pro \ src/proto/os_mac_conv.pro \
@@ -701,7 +696,6 @@ SRC_EXTRA = \
$(SRC_QNX) \ $(SRC_QNX) \
$(SRC_VMS) \ $(SRC_VMS) \
README_os390.txt \ README_os390.txt \
src/infplist.xml \
src/link.390 \ src/link.390 \
src/os_vms_fix.com \ src/os_vms_fix.com \
src/toolbar.phi \ src/toolbar.phi \
@@ -728,6 +722,7 @@ RT_ALL = \
runtime/doc/xxd.1 \ runtime/doc/xxd.1 \
runtime/ftoff.vim \ runtime/ftoff.vim \
runtime/gvimrc_example.vim \ runtime/gvimrc_example.vim \
runtime/import/dist/vimhelp.vim \
runtime/macros/README.txt \ runtime/macros/README.txt \
runtime/macros/editexisting.vim \ runtime/macros/editexisting.vim \
runtime/macros/hanoi/click.me \ runtime/macros/hanoi/click.me \
@@ -1001,6 +996,7 @@ LANG_GEN = \
runtime/doc/*-tr.1 \ runtime/doc/*-tr.1 \
runtime/doc/*-tr.UTF-8.1 \ runtime/doc/*-tr.UTF-8.1 \
runtime/lang/README.txt \ runtime/lang/README.txt \
runtime/lang/Makefile \
runtime/lang/menu_*.vim \ runtime/lang/menu_*.vim \
runtime/keymap/README.txt \ runtime/keymap/README.txt \
runtime/keymap/*.vim \ runtime/keymap/*.vim \

View File

@@ -5,11 +5,9 @@ setlocal ENABLEDELAYEDEXPANSION
cd %APPVEYOR_BUILD_FOLDER% cd %APPVEYOR_BUILD_FOLDER%
cd src 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" 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 ^ OLE=no GUI=no IME=yes ICONV=yes DEBUG=no ^
FEATURES=%FEATURE% FEATURES=%FEATURE%
if not exist vim.exe ( if not exist vim.exe (
@@ -21,13 +19,13 @@ if not exist vim.exe (
:: GUI needs to be last, so that testing works :: GUI needs to be last, so that testing works
echo "Building MSVC 64bit GUI Version" echo "Building MSVC 64bit GUI Version"
if "%FEATURE%" == "HUGE" ( 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 ^ OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no POSTSCRIPT=yes ^
PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 ^ PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 ^
PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 ^ PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 ^
FEATURES=%FEATURE% FEATURES=%FEATURE%
) ELSE ( ) 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 ^ OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no ^
FEATURES=%FEATURE% FEATURES=%FEATURE%
) )

View File

@@ -347,6 +347,9 @@ Section "$(str_section_exe)" id_section_exe
File /oname=gvim.exe ${VIMSRC}\gvim_ole.exe File /oname=gvim.exe ${VIMSRC}\gvim_ole.exe
!if /FileExists "${VIMSRC}\vim${BIT}.dll" !if /FileExists "${VIMSRC}\vim${BIT}.dll"
File ${VIMSRC}\vim${BIT}.dll File ${VIMSRC}\vim${BIT}.dll
!endif
!if /FileExists "${VIMRT}\libsodium.dll"
File ${VIMRT}\libsodium.dll
!endif !endif
File /oname=install.exe ${VIMSRC}\installw32.exe File /oname=install.exe ${VIMSRC}\installw32.exe
File /oname=uninstall.exe ${VIMSRC}\uninstallw32.exe File /oname=uninstall.exe ${VIMSRC}\uninstallw32.exe
@@ -400,6 +403,12 @@ Section "$(str_section_exe)" id_section_exe
SetOutPath $0\autoload\xml SetOutPath $0\autoload\xml
File ${VIMRT}\autoload\xml\*.* File ${VIMRT}\autoload\xml\*.*
SetOutPath $0\import\dist
File ${VIMRT}\import\dist\*.*
SetOutPath $0\bitmaps
File ${VIMSRC}\vim.ico
SetOutPath $0\syntax SetOutPath $0\syntax
File ${VIMRT}\syntax\*.* File ${VIMRT}\syntax\*.*
@@ -1038,6 +1047,7 @@ Section "un.$(str_unsection_exe)" id_unsection_exe
RMDir /r $0\compiler RMDir /r $0\compiler
RMDir /r $0\doc RMDir /r $0\doc
RMDir /r $0\ftplugin RMDir /r $0\ftplugin
RMDir /r $0\import
RMDir /r $0\indent RMDir /r $0\indent
RMDir /r $0\macros RMDir /r $0\macros
RMDir /r $0\pack RMDir /r $0\pack

View File

@@ -4,13 +4,13 @@ vim9script noclear
# Language: C # Language: C
# Maintainer: Bram Moolenaar <Bram@vim.org> # Maintainer: Bram Moolenaar <Bram@vim.org>
# Rewritten in Vim9 script by github user lacygoill # Rewritten in Vim9 script by github user lacygoill
# Last Change: 2021 Dec 27 # Last Change: 2022 Jan 31
var prepended: string var prepended: string
var grepCache: dict<list<dict<any>>> var grepCache: dict<list<dict<any>>>
# This function is used for the 'omnifunc' option. # This function is used for the 'omnifunc' option.
def ccomplete#Complete(findstart: bool, abase: string): any # {{{1 export def Complete(findstart: bool, abase: string): any # {{{1
if findstart if findstart
# Locate the start of the item, including ".", "->" and "[...]". # Locate the start of the item, including ".", "->" and "[...]".
var line: string = getline('.') var line: string = getline('.')
@@ -202,7 +202,7 @@ def ccomplete#Complete(findstart: bool, abase: string): any # {{{1
|| !v['static'] || !v['static']
|| bufnr('%') == bufnr(v['filename'])) || bufnr('%') == bufnr(v['filename']))
res = extendnew(res, tags->map((_, v: dict<any>) => Tag2item(v))) res = res->extend(tags->map((_, v: dict<any>) => Tag2item(v)))
endif endif
if len(res) == 0 if len(res) == 0
@@ -216,9 +216,9 @@ def ccomplete#Complete(findstart: bool, abase: string): any # {{{1
for i: number in len(diclist)->range() for i: number in len(diclist)->range()
# New ctags has the "typeref" field. Patched version has "typename". # New ctags has the "typeref" field. Patched version has "typename".
if diclist[i]->has_key('typename') if diclist[i]->has_key('typename')
res = extendnew(res, diclist[i]['typename']->StructMembers(items[1 :], true)) res = res->extend(diclist[i]['typename']->StructMembers(items[1 :], true))
elseif diclist[i]->has_key('typeref') elseif diclist[i]->has_key('typeref')
res = extendnew(res, diclist[i]['typeref']->StructMembers(items[1 :], true)) res = res->extend(diclist[i]['typeref']->StructMembers(items[1 :], true))
endif endif
# For a variable use the command, which must be a search pattern that # For a variable use the command, which must be a search pattern that
@@ -227,7 +227,7 @@ def ccomplete#Complete(findstart: bool, abase: string): any # {{{1
var line: string = diclist[i]['cmd'] var line: string = diclist[i]['cmd']
if line[: 1] == '/^' if line[: 1] == '/^'
var col: number = line->charidx(match(line, '\<' .. items[0] .. '\>')) var col: number = line->charidx(match(line, '\<' .. items[0] .. '\>'))
res = extendnew(res, line[2 : col - 1]->Nextitem(items[1 :], 0, true)) res = res->extend(line[2 : col - 1]->Nextitem(items[1 :], 0, true))
endif endif
endif endif
endfor endfor
@@ -256,11 +256,10 @@ def ccomplete#Complete(findstart: bool, abase: string): any # {{{1
enddef enddef
def GetAddition( # {{{1 def GetAddition( # {{{1
line: string, line: string,
match: string, match: string,
memarg: list<dict<any>>, memarg: list<dict<any>>,
bracket: bool bracket: bool): string
): string
# Guess if the item is an array. # Guess if the item is an array.
if bracket && match(line, match .. '\s*\[') > 0 if bracket && match(line, match .. '\s*\[') > 0
return '[' return '['
@@ -403,10 +402,9 @@ def Tagline2item(val: dict<any>, brackets: string): dict<string> # {{{1
enddef enddef
def Tagcmd2extra( # {{{1 def Tagcmd2extra( # {{{1
cmd: string, cmd: string,
name: string, name: string,
fname: string fname: string): string
): string
# Turn a command from a tag line to something that is useful in the menu # Turn a command from a tag line to something that is useful in the menu
var x: string var x: string
if cmd =~ '^/^' if cmd =~ '^/^'
@@ -427,11 +425,10 @@ def Tagcmd2extra( # {{{1
enddef enddef
def Nextitem( # {{{1 def Nextitem( # {{{1
lead: string, lead: string,
items: list<string>, items: list<string>,
depth: number, depth: number,
all: bool all: bool): list<dict<string>>
): list<dict<string>>
# Find composing type in "lead" and match items[0] with it. # Find composing type in "lead" and match items[0] with it.
# Repeat this recursively for items[1], if it's there. # Repeat this recursively for items[1], if it's there.
# When resolving typedefs "depth" is used to avoid infinite recursion. # When resolving typedefs "depth" is used to avoid infinite recursion.
@@ -473,11 +470,11 @@ def Nextitem( # {{{1
# New ctags has the "typeref" field. Patched version has "typename". # New ctags has the "typeref" field. Patched version has "typename".
if item->has_key('typeref') if item->has_key('typeref')
res = extendnew(res, item['typeref']->StructMembers(items, all)) res = res->extend(item['typeref']->StructMembers(items, all))
continue continue
endif endif
if item->has_key('typename') if item->has_key('typename')
res = extendnew(res, item['typename']->StructMembers(items, all)) res = res->extend(item['typename']->StructMembers(items, all))
continue continue
endif endif
@@ -511,11 +508,11 @@ def Nextitem( # {{{1
endif endif
endfor endfor
if name != '' if name != ''
res = extendnew(res, StructMembers(cmdtokens[0] .. ':' .. name, items, all)) res = res->extend(StructMembers(cmdtokens[0] .. ':' .. name, items, all))
endif endif
elseif depth < 10 elseif depth < 10
# Could be "typedef other_T some_T". # Could be "typedef other_T some_T".
res = extendnew(res, cmdtokens[0]->Nextitem(items, depth + 1, all)) res = res->extend(cmdtokens[0]->Nextitem(items, depth + 1, all))
endif endif
endif endif
endif endif
@@ -529,10 +526,9 @@ def Nextitem( # {{{1
enddef enddef
def StructMembers( # {{{1 def StructMembers( # {{{1
atypename: string, atypename: string,
items: list<string>, items: list<string>,
all: bool all: bool): list<dict<string>>
): list<dict<string>>
# Search for members of structure "typename" in tags files. # Search for members of structure "typename" in tags files.
# Return a list with resulting matches. # Return a list with resulting matches.
@@ -641,10 +637,9 @@ def StructMembers( # {{{1
enddef enddef
def SearchMembers( # {{{1 def SearchMembers( # {{{1
matches: list<dict<any>>, matches: list<dict<any>>,
items: list<string>, items: list<string>,
all: bool all: bool): list<dict<string>>
): list<dict<string>>
# For matching members, find matches for following items. # For matching members, find matches for following items.
# When "all" is true find all, otherwise just return 1 if there is any member. # When "all" is true find all, otherwise just return 1 if there is any member.
@@ -674,7 +669,7 @@ def SearchMembers( # {{{1
endif endif
if typename != '' if typename != ''
res = extendnew(res, StructMembers(typename, items, all)) res = res->extend(StructMembers(typename, items, all))
else else
# Use the search command (the declaration itself). # Use the search command (the declaration itself).
var sb: number = line->match('\t\zs/^') var sb: number = line->match('\t\zs/^')
@@ -683,7 +678,7 @@ def SearchMembers( # {{{1
var e: number = line var e: number = line
->charidx(match(line, '\<' .. matches[i]['match'] .. '\>', sb)) ->charidx(match(line, '\<' .. matches[i]['match'] .. '\>', sb))
if e > 0 if e > 0
res = extendnew(res, line[s : e - 1]->Nextitem(items, 0, all)) res = res->extend(line[s : e - 1]->Nextitem(items, 0, all))
endif endif
endif endif
endif endif

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

426
runtime/autoload/dist/script.vim vendored Normal file
View File

@@ -0,0 +1,426 @@
vim9script
# Vim function for detecting a filetype from the file contents.
# Invoked from "scripts.vim" in 'runtimepath'
#
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last Change: 2022 Feb 13
export def DetectFiletype()
var line1 = getline(1)
if line1[0] == '#' && line1[1] == '!'
# File that starts with "#!".
DetectFromHashBang(line1)
else
# File does not start with "#!".
DetectFromText(line1)
endif
enddef
# Called for a script that has "#!" in the first line.
def DetectFromHashBang(firstline: string)
var line1 = firstline
# Check for a line like "#!/usr/bin/env {options} bash". Turn it into
# "#!/usr/bin/bash" to make matching easier.
# Recognize only a few {options} that are commonly used.
if line1 =~ '^#!\s*\S*\<env\s'
line1 = substitute(line1, '\S\+=\S\+', '', 'g')
line1 = substitute(line1, '\(-[iS]\|--ignore-environment\|--split-string\)', '', '')
line1 = substitute(line1, '\<env\s\+', '', '')
endif
# Get the program name.
# Only accept spaces in PC style paths: "#!c:/program files/perl [args]".
# If the word env is used, use the first word after the space:
# "#!/usr/bin/env perl [path/args]"
# If there is no path use the first word: "#!perl [path/args]".
# Otherwise get the last word after a slash: "#!/usr/bin/perl [path/args]".
var name: string
if line1 =~ '^#!\s*\a:[/\\]'
name = substitute(line1, '^#!.*[/\\]\(\i\+\).*', '\1', '')
elseif line1 =~ '^#!.*\<env\>'
name = substitute(line1, '^#!.*\<env\>\s\+\(\i\+\).*', '\1', '')
elseif line1 =~ '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)'
name = substitute(line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '')
else
name = substitute(line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '')
endif
# tcl scripts may have #!/bin/sh in the first line and "exec wish" in the
# third line. Suggested by Steven Atkinson.
if getline(3) =~ '^exec wish'
name = 'wish'
endif
# Bourne-like shell scripts: bash bash2 ksh ksh93 sh
if name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>'
call dist#ft#SetFileTypeSH(line1)
# csh scripts
elseif name =~ '^csh\>'
if exists("g:filetype_csh")
call dist#ft#SetFileTypeShell(g:filetype_csh)
else
call dist#ft#SetFileTypeShell("csh")
endif
# tcsh scripts
elseif name =~ '^tcsh\>'
call dist#ft#SetFileTypeShell("tcsh")
# Z shell scripts
elseif name =~ '^zsh\>'
set ft=zsh
# TCL scripts
elseif name =~ '^\(tclsh\|wish\|expectk\|itclsh\|itkwish\)\>'
set ft=tcl
# Expect scripts
elseif name =~ '^expect\>'
set ft=expect
# Gnuplot scripts
elseif name =~ '^gnuplot\>'
set ft=gnuplot
# Makefiles
elseif name =~ 'make\>'
set ft=make
# Pike
elseif name =~ '^pike\%(\>\|[0-9]\)'
set ft=pike
# Lua
elseif name =~ 'lua'
set ft=lua
# Perl
elseif name =~ 'perl'
set ft=perl
# PHP
elseif name =~ 'php'
set ft=php
# Python
elseif name =~ 'python'
set ft=python
# Groovy
elseif name =~ '^groovy\>'
set ft=groovy
# Raku
elseif name =~ 'raku'
set ft=raku
# Ruby
elseif name =~ 'ruby'
set ft=ruby
# JavaScript
elseif name =~ 'node\(js\)\=\>\|js\>' || name =~ 'rhino\>'
set ft=javascript
# BC calculator
elseif name =~ '^bc\>'
set ft=bc
# sed
elseif name =~ 'sed\>'
set ft=sed
# OCaml-scripts
elseif name =~ 'ocaml'
set ft=ocaml
# Awk scripts; also finds "gawk"
elseif name =~ 'awk\>'
set ft=awk
# Website MetaLanguage
elseif name =~ 'wml'
set ft=wml
# Scheme scripts
elseif name =~ 'scheme'
set ft=scheme
# CFEngine scripts
elseif name =~ 'cfengine'
set ft=cfengine
# Erlang scripts
elseif name =~ 'escript'
set ft=erlang
# Haskell
elseif name =~ 'haskell'
set ft=haskell
# Scala
elseif name =~ 'scala\>'
set ft=scala
# Clojure
elseif name =~ 'clojure'
set ft=clojure
# Free Pascal
elseif name =~ 'instantfpc\>'
set ft=pascal
# Fennel
elseif name =~ 'fennel\>'
set ft=fennel
# MikroTik RouterOS script
elseif name =~ 'rsc\>'
set ft=routeros
# Fish shell
elseif name =~ 'fish\>'
set ft=fish
# Gforth
elseif name =~ 'gforth\>'
set ft=forth
endif
enddef
# Called for a script that does not have "#!" in the first line.
def DetectFromText(line1: string)
var line2 = getline(2)
var line3 = getline(3)
var line4 = getline(4)
var line5 = getline(5)
# Bourne-like shell scripts: sh ksh bash bash2
if line1 =~ '^:$'
call dist#ft#SetFileTypeSH(line1)
# Z shell scripts
elseif line1 =~ '^#compdef\>'
|| line1 =~ '^#autoload\>'
|| "\n" .. line1 .. "\n" .. line2 .. "\n" .. line3 ..
"\n" .. line4 .. "\n" .. line5
=~ '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>'
set ft=zsh
# ELM Mail files
elseif line1 =~ '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$'
set ft=mail
# Mason
elseif line1 =~ '^<[%&].*>'
set ft=mason
# Vim scripts (must have '" vim' as the first line to trigger this)
elseif line1 =~ '^" *[vV]im$'
set ft=vim
# libcxx and libstdc++ standard library headers like "iostream" do not have
# an extension, recognize the Emacs file mode.
elseif line1 =~? '-\*-.*C++.*-\*-'
set ft=cpp
# MOO
elseif line1 =~ '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$'
set ft=moo
# Diff file:
# - "diff" in first line (context diff)
# - "Only in " in first line
# - "--- " in first line and "+++ " in second line (unified diff).
# - "*** " in first line and "--- " in second line (context diff).
# - "# It was generated by makepatch " in the second line (makepatch diff).
# - "Index: <filename>" in the first line (CVS file)
# - "=== ", line of "=", "---", "+++ " (SVK diff)
# - "=== ", "--- ", "+++ " (bzr diff, common case)
# - "=== (removed|added|renamed|modified)" (bzr diff, alternative)
# - "# HG changeset patch" in first line (Mercurial export format)
elseif line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)'
|| (line1 =~ '^--- ' && line2 =~ '^+++ ')
|| (line1 =~ '^\* looking for ' && line2 =~ '^\* comparing to ')
|| (line1 =~ '^\*\*\* ' && line2 =~ '^--- ')
|| (line1 =~ '^=== ' && ((line2 =~ '^=\{66\}' && line3 =~ '^--- ' && line4 =~ '^+++') || (line2 =~ '^--- ' && line3 =~ '^+++ ')))
|| (line1 =~ '^=== \(removed\|added\|renamed\|modified\)')
set ft=diff
# PostScript Files (must have %!PS as the first line, like a2ps output)
elseif line1 =~ '^%![ \t]*PS'
set ft=postscr
# M4 scripts: Guess there is a line that starts with "dnl".
elseif line1 =~ '^\s*dnl\>'
|| line2 =~ '^\s*dnl\>'
|| line3 =~ '^\s*dnl\>'
|| line4 =~ '^\s*dnl\>'
|| line5 =~ '^\s*dnl\>'
set ft=m4
# AmigaDos scripts
elseif $TERM == "amiga" && (line1 =~ "^;" || line1 =~? '^\.bra')
set ft=amiga
# SiCAD scripts (must have procn or procd as the first line to trigger this)
elseif line1 =~? '^ *proc[nd] *$'
set ft=sicad
# Purify log files start with "**** Purify"
elseif line1 =~ '^\*\*\*\* Purify'
set ft=purifylog
# XML
elseif line1 =~ '<?\s*xml.*?>'
set ft=xml
# XHTML (e.g.: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN")
elseif line1 =~ '\<DTD\s\+XHTML\s'
set ft=xhtml
# HTML (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN")
# Avoid "doctype html", used by slim.
elseif line1 =~? '<!DOCTYPE\s\+html\>'
set ft=html
# PDF
elseif line1 =~ '^%PDF-'
set ft=pdf
# XXD output
elseif line1 =~ '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} '
set ft=xxd
# RCS/CVS log output
elseif line1 =~ '^RCS file:' || line2 =~ '^RCS file:'
set ft=rcslog
# CVS commit
elseif line2 =~ '^CVS:' || getline("$") =~ '^CVS: '
set ft=cvs
# Prescribe
elseif line1 =~ '^!R!'
set ft=prescribe
# Send-pr
elseif line1 =~ '^SEND-PR:'
set ft=sendpr
# SNNS files
elseif line1 =~ '^SNNS network definition file'
set ft=snnsnet
elseif line1 =~ '^SNNS pattern definition file'
set ft=snnspat
elseif line1 =~ '^SNNS result file'
set ft=snnsres
# Virata
elseif line1 =~ '^%.\{-}[Vv]irata'
|| line2 =~ '^%.\{-}[Vv]irata'
|| line3 =~ '^%.\{-}[Vv]irata'
|| line4 =~ '^%.\{-}[Vv]irata'
|| line5 =~ '^%.\{-}[Vv]irata'
set ft=virata
# Strace
elseif line1 =~ '[0-9:.]* *execve(' || line1 =~ '^__libc_start_main'
set ft=strace
# VSE JCL
elseif line1 =~ '^\* $$ JOB\>' || line1 =~ '^// *JOB\>'
set ft=vsejcl
# TAK and SINDA
elseif line4 =~ 'K & K Associates' || line2 =~ 'TAK 2000'
set ft=takout
elseif line3 =~ 'S Y S T E M S I M P R O V E D '
set ft=sindaout
elseif getline(6) =~ 'Run Date: '
set ft=takcmp
elseif getline(9) =~ 'Node File 1'
set ft=sindacmp
# DNS zone files
elseif line1 .. line2 .. line3 .. line4 =~ '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA'
set ft=bindzone
# BAAN
elseif line1 =~ '|\*\{1,80}' && line2 =~ 'VRC '
|| line2 =~ '|\*\{1,80}' && line3 =~ 'VRC '
set ft=baan
# Valgrind
elseif line1 =~ '^==\d\+== valgrind' || line3 =~ '^==\d\+== Using valgrind'
set ft=valgrind
# Go docs
elseif line1 =~ '^PACKAGE DOCUMENTATION$'
set ft=godoc
# Renderman Interface Bytestream
elseif line1 =~ '^##RenderMan'
set ft=rib
# Scheme scripts
elseif line1 =~ 'exec\s\+\S*scheme' || line2 =~ 'exec\s\+\S*scheme'
set ft=scheme
# Git output
elseif line1 =~ '^\(commit\|tree\|object\) \x\{40,\}\>\|^tag \S\+$'
set ft=git
# Gprof (gnu profiler)
elseif line1 == 'Flat profile:'
&& line2 == ''
&& line3 =~ '^Each sample counts as .* seconds.$'
set ft=gprof
# Erlang terms
# (See also: http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html#Choosing-Modes)
elseif line1 =~? '-\*-.*erlang.*-\*-'
set ft=erlang
# YAML
elseif line1 =~ '^%YAML'
set ft=yaml
# MikroTik RouterOS script
elseif line1 =~ '^#.*by RouterOS.*$'
set ft=routeros
# Sed scripts
# #ncomment is allowed but most likely a false positive so require a space
# before any trailing comment text
elseif line1 =~ '^#n\%($\|\s\)'
set ft=sed
else
var lnum = 1
while getline(lnum) =~ "^? " && lnum < line("$")
lnum += 1
endwhile
if getline(lnum) =~ '^Index:\s\+\f\+$'
# CVS diff
set ft=diff
# locale input files: Formal Definitions of Cultural Conventions
# filename must be like en_US, fr_FR@euro or en_US.UTF-8
elseif expand("%") =~ '\a\a_\a\a\($\|[.@]\)\|i18n$\|POSIX$\|translit_'
lnum = 1
while lnum < 100 && lnum < line("$")
if getline(lnum) =~ '^LC_\(IDENTIFICATION\|CTYPE\|COLLATE\|MONETARY\|NUMERIC\|TIME\|MESSAGES\|PAPER\|TELEPHONE\|MEASUREMENT\|NAME\|ADDRESS\)$'
setf fdcc
break
endif
lnum += 1
endwhile
endif
endif
enddef

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

@@ -2,7 +2,7 @@
" Maintainer: <vacancy> " Maintainer: <vacancy>
" Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com> " Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
" Version: 0.9 " Version: 0.9
" Last Updated: 2020 Oct 9 " Last Updated: 2022 Mar 30
" "
" Roland Puntaier: this file contains adaptations for python3 and is parallel to pythoncomplete.vim " Roland Puntaier: this file contains adaptations for python3 and is parallel to pythoncomplete.vim
" "
@@ -91,6 +91,9 @@ endfunction
function! s:DefPython() function! s:DefPython()
py3 << PYTHONEOF py3 << PYTHONEOF
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
import sys, tokenize, io, types import sys, tokenize, io, types
from token import NAME, DEDENT, NEWLINE, STRING from token import NAME, DEDENT, NEWLINE, STRING

BIN
runtime/bitmaps/vim.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -1,5 +1,5 @@
" Maintainer: Drew Vogel <dvogel@sidejump.org> " Maintainer: Drew Vogel <dvogel@sidejump.org>
" Last Change: 2021 Jul 25 " Last Change: 2022 Mar 20
" "
" Replaced rgb.txt as the source of de facto standard color names. This is " Replaced rgb.txt as the source of de facto standard color names. This is
" sourced each time the colorscheme command is run. It is also sourced each " sourced each time the colorscheme command is run. It is also sourced each
@@ -430,6 +430,8 @@ call extend(v:colornames, {
\ 'yellow2': '#eeee00', \ 'yellow2': '#eeee00',
\ 'yellow3': '#cdcd00', \ 'yellow3': '#cdcd00',
\ 'yellow4': '#8b8b00', \ 'yellow4': '#8b8b00',
\ 'dark yellow': '#8b8b00',
\ 'darkyellow': '#8b8b00',
\ 'gold1': '#ffd700', \ 'gold1': '#ffd700',
\ 'gold2': '#eec900', \ 'gold2': '#eec900',
\ 'gold3': '#cdad00', \ 'gold3': '#cdad00',
@@ -506,6 +508,8 @@ call extend(v:colornames, {
\ 'orangered2': '#ee4000', \ 'orangered2': '#ee4000',
\ 'orangered3': '#cd3700', \ 'orangered3': '#cd3700',
\ 'orangered4': '#8b2500', \ 'orangered4': '#8b2500',
\ 'light red': '#ff8b8b',
\ 'lightred': '#ff8b8b',
\ 'red1': '#ff0000', \ 'red1': '#ff0000',
\ 'red2': '#ee0000', \ 'red2': '#ee0000',
\ 'red3': '#cd0000', \ 'red3': '#cd0000',
@@ -538,6 +542,8 @@ call extend(v:colornames, {
\ 'violetred2': '#ee3a8c', \ 'violetred2': '#ee3a8c',
\ 'violetred3': '#cd3278', \ 'violetred3': '#cd3278',
\ 'violetred4': '#8b2252', \ 'violetred4': '#8b2252',
\ 'light magenta': '#ff8bff',
\ 'lightmagenta': '#ff8bff',
\ 'magenta1': '#ff00ff', \ 'magenta1': '#ff00ff',
\ 'magenta2': '#ee00ee', \ 'magenta2': '#ee00ee',
\ 'magenta3': '#cd00cd', \ 'magenta3': '#cd00cd',

View File

@@ -1,7 +1,7 @@
" Vim compiler file " Vim compiler file
" Compiler: Jest " Compiler: Jest
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2018 May 15 " Last Change: 2021 Nov 20
if exists("current_compiler") if exists("current_compiler")
finish finish
@@ -15,12 +15,14 @@ endif
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo&vim set cpo&vim
" CompilerSet makeprg=npx\ jest\ --no-colors " CompilerSet makeprg=npx\ --no-install\ jest\ --no-colors
CompilerSet makeprg=jest\ --no-colors CompilerSet makeprg=jest\ --no-colors
CompilerSet errorformat=%E\ \ ●\ %m, CompilerSet errorformat=%-A\ \ ●\ Console,
\%E\ \ ●\ %m,
\%Z\ %\\{4}%.%#Error:\ %f:\ %m\ (%l:%c):%\\=, \%Z\ %\\{4}%.%#Error:\ %f:\ %m\ (%l:%c):%\\=,
\%Z\ %\\{6}at\ %\\S%#\ (%f:%l:%c), \%Z\ %\\{6}at\ %\\S%#\ (%f:%l:%c),
\%Z\ %\\{6}at\ %\\S%#\ %f:%l:%c,
\%+C\ %\\{4}%\\w%.%#, \%+C\ %\\{4}%\\w%.%#,
\%+C\ %\\{4}%[-+]%.%#, \%+C\ %\\{4}%[-+]%.%#,
\%-C%.%#, \%-C%.%#,

View File

@@ -1,7 +1,7 @@
" Vim compiler file " Vim compiler file
" Compiler: SML/NJ Compiler " Compiler: SML/NJ Compiler
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2020 Feb 10 " Last Change: 2022 Feb 09
if exists("current_compiler") if exists("current_compiler")
finish finish
@@ -16,10 +16,10 @@ let s:cpo_save = &cpo
set cpo&vim set cpo&vim
CompilerSet makeprg=sml CompilerSet makeprg=sml
CompilerSet errorformat=%f:%l.%c-%\\d%\\+.%\\d%\\+\ %trror:\ %m, CompilerSet errorformat=%f:%l.%c-%e.%k\ %trror:\ %m,
\%f:%l.%c\ %trror:\ %m, \%f:%l.%c\ %trror:\ %m,
\%trror:\ %m \%trror:\ %m,
\%f:%l.%c-%\\d%\\+.%\\d%\\+\ %tarning:\ %m, \%f:%l.%c-%e.%k\ %tarning:\ %m,
\%f:%l.%c\ %tarning:\ %m, \%f:%l.%c\ %tarning:\ %m,
\%tarning:\ %m, \%tarning:\ %m,
\%-G%.%# \%-G%.%#

View File

@@ -1,7 +1,7 @@
" The default vimrc file. " The default vimrc file.
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2021 Nov 17 " Last change: 2022 Mar 03
" "
" This is loaded if no vimrc file was found. " This is loaded if no vimrc file was found.
" Except when Vim is run with "-u NONE" or "-C". " Except when Vim is run with "-u NONE" or "-C".
@@ -64,9 +64,10 @@ if has('win32')
set guioptions-=t set guioptions-=t
endif endif
" Don't use Ex mode, use Q for formatting. " Don't use Q for Ex mode, use it for formatting. Except for Select mode.
" Revert with ":unmap Q". " Revert with ":unmap Q".
map Q gq map Q gq
sunmap Q
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo, " CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
" so that you can undo CTRL-U after inserting a line break. " so that you can undo CTRL-U after inserting a line break.

View File

@@ -153,6 +153,7 @@ DOCS = \
version6.txt \ version6.txt \
version7.txt \ version7.txt \
version8.txt \ version8.txt \
version9.txt \
vi_diff.txt \ vi_diff.txt \
vim9.txt \ vim9.txt \
visual.txt \ visual.txt \
@@ -298,6 +299,7 @@ HTMLS = \
version6.html \ version6.html \
version7.html \ version7.html \
version8.html \ version8.html \
version9.html \
vi_diff.html \ vi_diff.html \
vimindex.html \ vimindex.html \
vim9.html \ vim9.html \

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.2. Last change: 2022 Jan 21 *autocmd.txt* For Vim version 8.2. Last change: 2022 Apr 17
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -63,7 +63,7 @@ effects. Be careful not to destroy your text.
they were given. they were given.
See |autocmd-nested| for [++nested]. "nested" See |autocmd-nested| for [++nested]. "nested"
(without the ++) can also be used, for backwards (without the ++) can also be used, for backwards
compatibility. compatibility, but not in |Vim9| script. *E1078*
*autocmd-once* *autocmd-once*
If [++once] is supplied the command is executed once, If [++once] is supplied the command is executed once,
then removed ("one shot"). then removed ("one shot").
@@ -95,6 +95,7 @@ Or use `:execute`: >
:augroup mine | exe "au! BufRead *" | augroup END :augroup mine | exe "au! BufRead *" | augroup END
:augroup mine | exe "au BufRead * set tw=70" | augroup END :augroup mine | exe "au BufRead * set tw=70" | augroup END
< *autocmd-expand*
Note that special characters (e.g., "%", "<cword>") in the ":autocmd" Note that special characters (e.g., "%", "<cword>") in the ":autocmd"
arguments are not expanded when the autocommand is defined. These will be arguments are not expanded when the autocommand is defined. These will be
expanded when the Event is recognized, and the {cmd} is executed. The only expanded when the Event is recognized, and the {cmd} is executed. The only
@@ -326,6 +327,7 @@ Name triggered by ~
|FileChangedRO| before making the first change to a read-only file |FileChangedRO| before making the first change to a read-only file
|DiffUpdated| after diffs have been updated |DiffUpdated| after diffs have been updated
|DirChangedPre| before the working directory will change
|DirChanged| after the working directory has changed |DirChanged| after the working directory has changed
|ShellCmdPost| after executing a shell command |ShellCmdPost| after executing a shell command
@@ -364,6 +366,7 @@ Name triggered by ~
|InsertEnter| starting Insert mode |InsertEnter| starting Insert mode
|InsertChange| when typing <Insert> while in Insert or Replace mode |InsertChange| when typing <Insert> while in Insert or Replace mode
|InsertLeave| when leaving Insert mode |InsertLeave| when leaving Insert mode
|InsertLeavePre| just before leaving Insert mode
|InsertCharPre| when a character was typed in Insert mode, before |InsertCharPre| when a character was typed in Insert mode, before
inserting it inserting it
@@ -400,6 +403,8 @@ Name triggered by ~
|User| to be used in combination with ":doautocmd" |User| to be used in combination with ":doautocmd"
|SigUSR1| after the SIGUSR1 signal has been detected |SigUSR1| after the SIGUSR1 signal has been detected
|WinScrolled| after scrolling or resizing a window
The alphabetical list of autocommand events: *autocmd-events-abc* The alphabetical list of autocommand events: *autocmd-events-abc*
@@ -469,13 +474,15 @@ BufRead or BufReadPost When starting to edit a new buffer, after
executing the modelines. See |BufWinEnter| executing the modelines. See |BufWinEnter|
for when you need to do something after for when you need to do something after
processing the modelines. processing the modelines.
This does NOT work for ":r file". Not used Also triggered:
when the file doesn't exist. Also used after - when writing an unnamed buffer in a way that
successfully recovering a file. the buffer gets a name
Also triggered for the filetypedetect group - after successfully recovering a file
when executing ":filetype detect" and when - for the filetypedetect group when executing
writing an unnamed buffer in a way that the ":filetype detect"
buffer gets a name. Not triggered:
- for the `:read file` command
- when the file doesn't exist
*BufReadCmd* *BufReadCmd*
BufReadCmd Before starting to edit a new buffer. Should BufReadCmd Before starting to edit a new buffer. Should
read the file into the buffer. |Cmd-event| read the file into the buffer. |Cmd-event|
@@ -688,9 +695,9 @@ CursorHoldI Just like CursorHold, but in Insert mode.
CursorMoved After the cursor was moved in Normal or Visual CursorMoved After the cursor was moved in Normal or Visual
mode. Also when the text of the cursor line mode. Also when the text of the cursor line
has been changed, e.g., with "x", "rx" or "p". has been changed, e.g., with "x", "rx" or "p".
Not triggered when there is typeahead, while Not always triggered when there is typeahead,
executing commands in a script file, when while executing commands in a script file,
an operator is pending or when moving to when an operator is pending or when moving to
another window while remaining at the same another window while remaining at the same
cursor position. cursor position.
For an example see |match-parens|. For an example see |match-parens|.
@@ -703,9 +710,38 @@ CursorMoved After the cursor was moved in Normal or Visual
CursorMovedI After the cursor was moved in Insert mode. CursorMovedI After the cursor was moved in Insert mode.
Not triggered when the popup menu is visible. Not triggered when the popup menu is visible.
Otherwise the same as CursorMoved. Otherwise the same as CursorMoved.
*DiffUpdated*
DiffUpdated After diffs have been updated. Depending on
what kind of diff is being used (internal or
external) this can be triggered on every
change or when doing |:diffupdate|.
*DirChangedPre*
DirChangedPre The working directory is going to be changed,
as with |DirChanged|. The pattern is like
with |DirChanged|. The new directory can be
found in v:event.directory.
*DirChanged*
DirChanged The working directory has changed in response
to the |:cd| or |:tcd| or |:lcd| commands, or
as a result of the 'autochdir' option.
The pattern can be:
"window" to trigger on `:lcd`
"tabpage" to trigger on `:tcd`
"global" to trigger on `:cd`
"auto" to trigger on 'autochdir'.
"drop" to trigger on editing a file
<afile> is set to the new directory name.
*EncodingChanged* *EncodingChanged*
EncodingChanged Fires off after the 'encoding' option has been EncodingChanged Fires off after the 'encoding' option has been
changed. Useful to set up fonts, for example. changed. Useful to set up fonts, for example.
*ExitPre*
ExitPre When using `:quit`, `:wq` in a way it makes
Vim exit, or using `:qall`, just after
|QuitPre|. Can be used to close any
non-essential window. Exiting may still be
cancelled if there is a modified buffer that
isn't automatically saved, use |VimLeavePre|
for really exiting.
*FileAppendCmd* *FileAppendCmd*
FileAppendCmd Before appending to a file. Should do the FileAppendCmd Before appending to a file. Should do the
appending to the file. Use the '[ and '] appending to the file. Use the '[ and ']
@@ -733,30 +769,6 @@ FileChangedRO Before making the first change to a read-only
*E881* *E881*
If the number of lines changes saving for undo If the number of lines changes saving for undo
may fail and the change will be aborted. may fail and the change will be aborted.
*DiffUpdated*
DiffUpdated After diffs have been updated. Depending on
what kind of diff is being used (internal or
external) this can be triggered on every
change or when doing |:diffupdate|.
*DirChanged*
DirChanged The working directory has changed in response
to the |:cd| or |:tcd| or |:lcd| commands, or
as a result of the 'autochdir' option.
The pattern can be:
"window" to trigger on `:lcd`
"tabpage" to trigger on `:tcd`
"global" to trigger on `:cd`
"auto" to trigger on 'autochdir'.
"drop" to trigger on editing a file
<afile> is set to the new directory name.
*ExitPre*
ExitPre When using `:quit`, `:wq` in a way it makes
Vim exit, or using `:qall`, just after
|QuitPre|. Can be used to close any
non-essential window. Exiting may still be
cancelled if there is a modified buffer that
isn't automatically saved, use |VimLeavePre|
for really exiting.
*FileChangedShell* *FileChangedShell*
FileChangedShell When Vim notices that the modification time of FileChangedShell When Vim notices that the modification time of
a file has changed since editing started. a file has changed since editing started.
@@ -1196,6 +1208,9 @@ TextYankPost After text has been yanked or deleted in the
current buffer. The following values of current buffer. The following values of
|v:event| can be used to determine the operation |v:event| can be used to determine the operation
that triggered this autocmd: that triggered this autocmd:
inclusive TRUE if the motion is
|inclusive| else the motion is
|exclusive|.
operator The operation performed. operator The operation performed.
regcontents Text that was stored in the regcontents Text that was stored in the
register, as a list of lines, register, as a list of lines,
@@ -1221,7 +1236,13 @@ User Never executed automatically. To be used for
Note that when `:doautocmd User MyEvent` is Note that when `:doautocmd User MyEvent` is
used while there are no matching autocommands, used while there are no matching autocommands,
you will get an error. If you don't want you will get an error. If you don't want
that, define a dummy autocommand yourself. that, either check whether an autocommand is
defined using `exists('#User#MyEvent')` or
define a dummy autocommand yourself.
Example: >
if exists('#User#MyEvent')
doautocmd User MyEvent
endif
*SigUSR1* *SigUSR1*
SigUSR1 After the SIGUSR1 signal has been detected. SigUSR1 After the SIGUSR1 signal has been detected.
@@ -1310,10 +1331,23 @@ WinNew When a new window was created. Not done for
the first window, when Vim has just started. the first window, when Vim has just started.
Before a WinEnter event. Before a WinEnter event.
*WinScrolled*
WinScrolled After scrolling the content of a window or
resizing a window.
The pattern is matched against the
|window-ID|. Both <amatch> and <afile> are
set to the |window-ID|.
Non-recursive (the event cannot trigger
itself). However, if the command causes the
window to scroll or change size another
WinScrolled event will be triggered later.
Does not trigger when the command is added,
only after the first scroll or resize.
============================================================================== ==============================================================================
6. Patterns *autocmd-patterns* *{aupat}* 6. Patterns *autocmd-patterns* *{aupat}*
The {aupat} argument of `:autocmd` can be a comma separated list. This works as 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: > if the command was given with each pattern separately. Thus this command: >
:autocmd BufRead *.txt,*.info set et :autocmd BufRead *.txt,*.info set et
Is equivalent to: > Is equivalent to: >
@@ -1633,7 +1667,7 @@ Examples for reading and writing compressed files: >
: autocmd BufReadPre,FileReadPre *.gz set bin : autocmd BufReadPre,FileReadPre *.gz set bin
: autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip : autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip
: autocmd BufReadPost,FileReadPost *.gz set nobin : autocmd BufReadPost,FileReadPost *.gz set nobin
: autocmd BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " . expand("%:r") : autocmd BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " .. expand("%:r")
: autocmd BufWritePost,FileWritePost *.gz !mv <afile> <afile>:r : autocmd BufWritePost,FileWritePost *.gz !mv <afile> <afile>:r
: autocmd BufWritePost,FileWritePost *.gz !gzip <afile>:r : autocmd BufWritePost,FileWritePost *.gz !gzip <afile>:r
@@ -1732,7 +1766,7 @@ To insert the current date and time in a *.html file when writing it: >
: else : else
: let l = line("$") : let l = line("$")
: endif : endif
: exe "1," . l . "g/Last modified: /s/Last modified: .*/Last modified: " . : exe "1," .. l .. "g/Last modified: /s/Last modified: .*/Last modified: " ..
: \ strftime("%Y %b %d") : \ strftime("%Y %b %d")
:endfun :endfun

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 Dec 29 *change.txt* For Vim version 8.2. Last change: 2022 May 07
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -614,9 +614,10 @@ attack or other people reading your file). When Vim exits the directory and
all files in it are deleted. When Vim has the setuid bit set this may cause all files in it are deleted. When Vim has the setuid bit set this may cause
problems, the temp file is owned by the setuid user but the filter command problems, the temp file is owned by the setuid user but the filter command
probably runs as the original user. probably runs as the original user.
On MS-Windows the first of these directories that works is used: $TMP, Directory for temporary files is created in the first of these directories
$TEMP, c:\TMP, c:\TEMP. that works:
For Unix the list of directories is: $TMPDIR, /tmp, current-dir, $HOME. Unix: $TMPDIR, /tmp, current-dir, $HOME.
Windows: $TMP, $TEMP, c:\TMP, c:\TEMP
For MS-Windows the GetTempFileName() system function is used. For MS-Windows the GetTempFileName() system function is used.
For other systems the tmpnam() library function is used. For other systems the tmpnam() library function is used.
@@ -778,11 +779,11 @@ matched pattern is deleted. The separator after {pattern} can also be left
out then. Example: > out then. Example: >
:%s/TESTING :%s/TESTING
This deletes "TESTING" from all lines, but only one per line. This deletes "TESTING" from all lines, but only one per line.
*E1270*
For compatibility with Vi these two exceptions are allowed: For compatibility with Vi these two exceptions are allowed in legacy script:
"\/{string}/" and "\?{string}?" do the same as "//{string}/r". "\/{string}/" and "\?{string}?" do the same as "//{string}/r".
"\&{string}&" does the same as "//{string}/". "\&{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 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 use another single-byte character. This is useful if you want to include a
'/' in the search pattern or replacement string. Example: > '/' in the search pattern or replacement string. Example: >
@@ -946,7 +947,7 @@ Consider using a character like "@" or ":". There is no problem if the result
of the expression contains the separation character. of the expression contains the separation character.
Examples: > Examples: >
:s@\n@\="\r" . expand("$HOME") . "\r"@ :s@\n@\="\r" .. expand("$HOME") .. "\r"@
This replaces an end-of-line with a new line containing the value of $HOME. > This replaces an end-of-line with a new line containing the value of $HOME. >
s/E/\="\<Char-0x20ac>"/g s/E/\="\<Char-0x20ac>"/g
@@ -1076,7 +1077,7 @@ inside of strings can change! Also see 'softtabstop' option. >
in [range] (default: current line |cmdline-ranges|), in [range] (default: current line |cmdline-ranges|),
[into register x]. [into register x].
*p* *put* *E353* *p* *put* *E353* *E1240*
["x]p Put the text [from register x] after the cursor ["x]p Put the text [from register x] after the cursor
[count] times. [count] times.
@@ -1123,7 +1124,7 @@ inside of strings can change! Also see 'softtabstop' option. >
the command. You need to escape the '|' and '"' the command. You need to escape the '|' and '"'
characters to prevent them from terminating the characters to prevent them from terminating the
command. Example: > command. Example: >
:put ='path' . \",/test\" :put ='path' .. \",/test\"
< If there is no expression after '=', Vim uses the < If there is no expression after '=', Vim uses the
previous expression. You can see it with ":dis =". previous expression. You can see it with ":dis =".
@@ -1176,11 +1177,15 @@ register. With blockwise selection it also depends on the size of the block
and whether the corners are on an existing character. (Implementation detail: and whether the corners are on an existing character. (Implementation detail:
it actually works by first putting the register after the selection and then it actually works by first putting the register after the selection and then
deleting the selection.) deleting the selection.)
The previously selected text is put in the unnamed register. If you want to With |p| the previously selected text is put in the unnamed register (and
put the same text into a Visual selection several times you need to use possibly the selection and/or clipboard). This is useful if you want to put
another register. E.g., yank the text to copy, Visually select the text to that text somewhere else. But you cannot repeat the same change.
replace and use "0p . You can repeat this as many times as you like, the With |P| the unnamed register is not changed (and neither the selection or
unnamed register will be changed each time. clipboard), 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, and the unnamed register will be
changed each time.
When you use a blockwise Visual mode command and yank only a single line into When you use a blockwise Visual mode command and yank only a single line into
a register, a paste on a visual selected area will paste that single line on a register, a paste on a visual selected area will paste that single line on
@@ -1668,9 +1673,9 @@ readability.
letter meaning when present in 'formatoptions' ~ letter meaning when present in 'formatoptions' ~
*fo-t* *fo-t*
t Auto-wrap text using textwidth t Auto-wrap text using 'textwidth'
*fo-c* *fo-c*
c Auto-wrap comments using textwidth, inserting the current comment c Auto-wrap comments using 'textwidth', inserting the current comment
leader automatically. leader automatically.
*fo-r* *fo-r*
r Automatically insert the current comment leader after hitting r Automatically insert the current comment leader after hitting
@@ -1679,6 +1684,9 @@ r Automatically insert the current comment leader after hitting
o Automatically insert the current comment leader after hitting 'o' or o Automatically insert the current comment leader after hitting 'o' or
'O' in Normal mode. In case comment is unwanted in a specific place 'O' in Normal mode. In case comment is unwanted in a specific place
use CTRL-U to quickly delete it. |i_CTRL-U| use CTRL-U to quickly delete it. |i_CTRL-U|
*fo-/*
/ When 'o' is included: do not insert the comment leader for a //
comment after a statement, only when // is at the start of the line.
*fo-q* *fo-q*
q Allow formatting of comments with "gq". q Allow formatting of comments with "gq".
Note that formatting will not change blank lines or lines containing Note that formatting will not change blank lines or lines containing
@@ -1741,8 +1749,8 @@ B When joining lines, don't insert a space between two multibyte
1 Don't break a line after a one-letter word. It's broken before it 1 Don't break a line after a one-letter word. It's broken before it
instead (if possible). instead (if possible).
*fo-]* *fo-]*
] Respect textwidth rigorously. With this flag set, no line can be ] Respect 'textwidth' rigorously. With this flag set, no line can be
longer than textwidth, unless line-break-prohibition rules make this longer than 'textwidth', unless line-break-prohibition rules make this
impossible. Mainly for CJK scripts and works only if 'encoding' is impossible. Mainly for CJK scripts and works only if 'encoding' is
"utf-8". "utf-8".
*fo-j* *fo-j*

View File

@@ -1,4 +1,4 @@
*channel.txt* For Vim version 8.2. Last change: 2021 Nov 28 *channel.txt* For Vim version 8.2. Last change: 2022 Apr 16
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -25,6 +25,7 @@ The Netbeans interface also uses a channel. |netbeans|
12. Job options |job-options| 12. Job options |job-options|
13. Controlling a job |job-control| 13. Controlling a job |job-control|
14. Using a prompt buffer |prompt-buffer| 14. Using a prompt buffer |prompt-buffer|
15. Language Server Protocol |language-server-protocol|
{only when compiled with the |+channel| feature for channel stuff} {only when compiled with the |+channel| feature for channel stuff}
You can check this with: `has('channel')` You can check this with: `has('channel')`
@@ -53,6 +54,7 @@ RAW nothing known, Vim cannot tell where a message ends
NL every message ends in a NL (newline) character NL every message ends in a NL (newline) character
JSON JSON encoding |json_encode()| JSON JSON encoding |json_encode()|
JS JavaScript style JSON-like encoding |js_encode()| JS JavaScript style JSON-like encoding |js_encode()|
LSP Language Server Protocol encoding |language-server-protocol|
Common combination are: Common combination are:
- Using a job connected through pipes in NL mode. E.g., to run a style - Using a job connected through pipes in NL mode. E.g., to run a style
@@ -91,7 +93,7 @@ And you should see the message in Vim. You can move the cursor a word forward:
To handle asynchronous communication a callback needs to be used: > To handle asynchronous communication a callback needs to be used: >
func MyHandler(channel, msg) func MyHandler(channel, msg)
echo "from the handler: " . a:msg echo "from the handler: " .. a:msg
endfunc endfunc
call ch_sendexpr(channel, 'hello!', {'callback': "MyHandler"}) call ch_sendexpr(channel, 'hello!', {'callback': "MyHandler"})
Vim will not wait for a response. Now the server can send the response later Vim will not wait for a response. Now the server can send the response later
@@ -118,10 +120,13 @@ To open a channel: >
Use |ch_status()| to see if the channel could be opened. Use |ch_status()| to see if the channel could be opened.
{address} has the form "hostname:port". E.g., "localhost:8765". *channel-address*
{address} can be a domain name or an IP address, followed by a port number, or
When using an IPv6 address, enclose it within square brackets. E.g., a Unix-domain socket path prefixed by "unix:". E.g. >
"[2001:db8::1]:8765". www.example.com:80 " domain + port
127.0.0.1:1234 " IPv4 + port
[2001:db8::1]:8765 " IPv6 + port
unix:/tmp/my-socket " Unix-domain socket path
{options} is a dictionary with optional entries: *channel-open-options* {options} is a dictionary with optional entries: *channel-open-options*
@@ -130,18 +135,19 @@ When using an IPv6 address, enclose it within square brackets. E.g.,
"js" - Use JS (JavaScript) encoding, more efficient than JSON. "js" - Use JS (JavaScript) encoding, more efficient than JSON.
"nl" - Use messages that end in a NL character "nl" - Use messages that end in a NL character
"raw" - Use raw messages "raw" - Use raw messages
"lsp" - Use language server protocol encoding
*channel-callback* *E921* *channel-callback* *E921*
"callback" A function that is called when a message is received that is "callback" A function that is called when a message is received that is
not handled otherwise (e.g. a JSON message with ID zero). It not handled otherwise (e.g. a JSON message with ID zero). It
gets two arguments: the channel and the received message. gets two arguments: the channel and the received message.
Example: > Example: >
func Handle(channel, msg) func Handle(channel, msg)
echo 'Received: ' . a:msg echo 'Received: ' .. a:msg
endfunc endfunc
let channel = ch_open("localhost:8765", {"callback": "Handle"}) let channel = ch_open("localhost:8765", {"callback": "Handle"})
< <
When "mode" is "json" or "js" the "msg" argument is the body When "mode" is "json" or "js" or "lsp" the "msg" argument is
of the received message, converted to Vim types. the body of the received message, converted to Vim types.
When "mode" is "nl" the "msg" argument is one message, When "mode" is "nl" the "msg" argument is one message,
excluding the NL. excluding the NL.
When "mode" is "raw" the "msg" argument is the whole message When "mode" is "raw" the "msg" argument is the whole message
@@ -165,7 +171,19 @@ When using an IPv6 address, enclose it within square brackets. E.g.,
to check for messages, the close_cb may be invoked while still to check for messages, the close_cb may be invoked while still
in the callback. The plugin must handle this somehow, it can in the callback. The plugin must handle this somehow, it can
be useful to know that no more data is coming. be useful to know that no more data is coming.
*channel-drop* If it is not known if there is a message to be read, use a
try/catch block: >
try
let msg = ch_readraw(a:channel)
catch
let msg = 'no message'
endtry
try
let err = ch_readraw(a:channel, #{part: 'err'})
catch
let err = 'no error'
endtry
< *channel-drop*
"drop" Specifies when to drop messages: "drop" Specifies when to drop messages:
"auto" When there is no callback to handle a message. "auto" When there is no callback to handle a message.
The "close_cb" is also considered for this. The "close_cb" is also considered for this.
@@ -407,6 +425,7 @@ To send a message, without expecting a response: >
The process can send back a response, the channel handler will be called with The process can send back a response, the channel handler will be called with
it. it.
*channel-onetime-callback*
To send a message and letting the response handled by a specific function, To send a message and letting the response handled by a specific function,
asynchronously: > asynchronously: >
call ch_sendraw(channel, {string}, {'callback': 'MyHandler'}) call ch_sendraw(channel, {string}, {'callback': 'MyHandler'})
@@ -443,7 +462,7 @@ to check if there is something to read.
Note that when there is no callback, messages are dropped. To avoid that add Note that when there is no callback, messages are dropped. To avoid that add
a close callback to the channel. a close callback to the channel.
To read all output from a RAW channel that is available: > To read all normal output from a RAW channel that is available: >
let output = ch_readraw(channel) let output = ch_readraw(channel)
To read the error output: > To read the error output: >
let output = ch_readraw(channel, {"part": "err"}) let output = ch_readraw(channel, {"part": "err"})
@@ -503,6 +522,7 @@ ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()*
according to the type of channel. The function cannot be used according to the type of channel. The function cannot be used
with a raw channel. See |channel-use|. with a raw channel. See |channel-use|.
{handle} can be a Channel or a Job that has a Channel. {handle} can be a Channel or a Job that has a Channel.
When using the "lsp" channel mode, {expr} must be a |Dict|.
*E917* *E917*
{options} must be a Dictionary. It must not have a "callback" {options} must be a Dictionary. It must not have a "callback"
entry. It can have a "timeout" entry to specify the timeout entry. It can have a "timeout" entry to specify the timeout
@@ -510,7 +530,8 @@ ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()*
ch_evalexpr() waits for a response and returns the decoded ch_evalexpr() waits for a response and returns the decoded
expression. When there is an error or timeout it returns an expression. When there is an error or timeout it returns an
empty string. empty |String| or, when using the "lsp" channel mode, returns an
empty |Dict|.
Note that while waiting for the response, Vim handles other Note that while waiting for the response, Vim handles other
messages. You need to make sure this doesn't cause trouble. messages. You need to make sure this doesn't cause trouble.
@@ -564,10 +585,15 @@ ch_info({handle}) *ch_info()*
When opened with ch_open(): When opened with ch_open():
"hostname" the hostname of the address "hostname" the hostname of the address
"port" the port of the address "port" the port of the address
"path" the path of the Unix-domain socket
"sock_status" "open" or "closed" "sock_status" "open" or "closed"
"sock_mode" "NL", "RAW", "JSON" or "JS" "sock_mode" "NL", "RAW", "JSON" or "JS"
"sock_io" "socket" "sock_io" "socket"
"sock_timeout" timeout in msec "sock_timeout" timeout in msec
Note that "path" is only present for Unix-domain sockets, for
regular ones "hostname" and "port" are present instead.
When opened with job_start(): When opened with job_start():
"out_status" "open", "buffered" or "closed" "out_status" "open", "buffered" or "closed"
"out_mode" "NL", "RAW", "JSON" or "JS" "out_mode" "NL", "RAW", "JSON" or "JS"
@@ -578,7 +604,7 @@ ch_info({handle}) *ch_info()*
"err_io" "out", "null", "pipe", "file" or "buffer" "err_io" "out", "null", "pipe", "file" or "buffer"
"err_timeout" timeout in msec "err_timeout" timeout in msec
"in_status" "open" or "closed" "in_status" "open" or "closed"
"in_mode" "NL", "RAW", "JSON" or "JS" "in_mode" "NL", "RAW", "JSON", "JS" or "LSP"
"in_io" "null", "pipe", "file" or "buffer" "in_io" "null", "pipe", "file" or "buffer"
"in_timeout" timeout in msec "in_timeout" timeout in msec
@@ -610,8 +636,8 @@ ch_logfile({fname} [, {mode}]) *ch_logfile()*
is going on in real time. is going on in real time.
To enable the log very early, to see what is received from a To enable the log very early, to see what is received from a
terminal during startup, use |--cmd|: > terminal during startup, use |--log|: >
vim --cmd "call ch_logfile('logfile', 'w')" vim --log logfile
< <
This function is not available in the |sandbox|. This function is not available in the |sandbox|.
NOTE: the channel communication is stored in the file, be NOTE: the channel communication is stored in the file, be
@@ -626,11 +652,8 @@ ch_open({address} [, {options}]) *ch_open()*
Open a channel to {address}. See |channel|. Open a channel to {address}. See |channel|.
Returns a Channel. Use |ch_status()| to check for failure. Returns a Channel. Use |ch_status()| to check for failure.
{address} is a String and has the form "hostname:port", e.g., {address} is a String, see |channel-address| for the possible
"localhost:8765". accepted forms.
When using an IPv6 address, enclose it within square brackets.
E.g., "[2001:db8::1]:8765".
If {options} is given it must be a |Dictionary|. If {options} is given it must be a |Dictionary|.
See |channel-open-options|. See |channel-open-options|.
@@ -674,6 +697,17 @@ ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()*
with a raw channel. with a raw channel.
See |channel-use|. *E912* See |channel-use|. *E912*
{handle} can be a Channel or a Job that has a Channel. {handle} can be a Channel or a Job that has a Channel.
When using the "lsp" channel mode, {expr} must be a |Dict|.
If the channel mode is "lsp", then returns a Dict. Otherwise
returns an empty String. If the "callback" item is present in
{options}, then the returned Dict contains the ID of the
request message. The ID can be used to send a cancellation
request to the LSP server (if needed). Returns an empty Dict
on error.
If a response message is not expected for {expr}, then don't
specify the "callback" item in {options}.
Can also be used as a |method|: > Can also be used as a |method|: >
GetChannel()->ch_sendexpr(expr) GetChannel()->ch_sendexpr(expr)
@@ -1288,18 +1322,18 @@ prompt. >
" Create a channel log so we can see what happens. " Create a channel log so we can see what happens.
call ch_logfile('logfile', 'w') call ch_logfile('logfile', 'w')
" Function handling a line of text has been typed. " Function handling a line of text that has been typed.
func TextEntered(text) func TextEntered(text)
" Send the text to a shell with Enter appended. " Send the text to a shell with Enter appended.
call ch_sendraw(g:shell_job, a:text .. "\n") call ch_sendraw(g:shell_job, a:text .. "\n")
endfunc endfunc
" Function handling output from the shell: Added above the prompt. " Function handling output from the shell: Add it above the prompt.
func GotOutput(channel, msg) func GotOutput(channel, msg)
call append(line("$") - 1, "- " . a:msg) call append(line("$") - 1, "- " .. a:msg)
endfunc endfunc
" Function handling the shell exist: close the window. " Function handling the shell exits: close the window.
func JobExit(job, status) func JobExit(job, status)
quit! quit!
endfunc endfunc
@@ -1310,7 +1344,6 @@ prompt. >
\ err_cb: function('GotOutput'), \ err_cb: function('GotOutput'),
\ exit_cb: function('JobExit'), \ exit_cb: function('JobExit'),
\ }) \ })
let shell_ch = job_getchannel(shell_job)
new new
set buftype=prompt set buftype=prompt
@@ -1321,6 +1354,231 @@ prompt. >
" start accepting shell commands " start accepting shell commands
startinsert startinsert
< <
The same in |Vim9| script: >
vim9script
# Create a channel log so we can see what happens.
ch_logfile('logfile', 'w')
var shell_job: job
# Function handling a line of text that has been typed.
def TextEntered(text: string)
# Send the text to a shell with Enter appended.
ch_sendraw(shell_job, text .. "\n")
enddef
# Function handling output from the shell: Add it above the prompt.
def GotOutput(channel: channel, msg: string)
append(line("$") - 1, "- " .. msg)
enddef
# Function handling the shell exits: close the window.
def JobExit(job: job, status: number)
quit!
enddef
# Start a shell in the background.
shell_job = job_start(["/bin/sh"], {
out_cb: GotOutput,
err_cb: GotOutput,
exit_cb: JobExit,
})
new
set buftype=prompt
var buf = bufnr('')
prompt_setcallback(buf, TextEntered)
prompt_setprompt(buf, "shell command: ")
# start accepting shell commands
startinsert
==============================================================================
15. Language Server Protocol *language-server-protocol*
The language server protocol specification is available at:
https://microsoft.github.io/language-server-protocol/specification
Each LSP protocol message starts with a simple HTTP header followed by the
payload encoded in JSON-RPC format. This is described in:
https://www.jsonrpc.org/specification
To encode and send a LSP request/notification message in a Vim |Dict| into a
LSP JSON-RPC message and to receive and decode a LSP JSON-RPC
response/notification message into a Vim |Dict|, connect to the LSP server
with the |channel-mode| set to "lsp".
For messages received on a channel with |channel-mode| set to "lsp", Vim will
process the HTTP header and decode the JSON-RPC payload into a Vim |Dict| type
and call the |channel-callback| function or the specified
|channel-onetime-callback| function. When sending messages on a channel using
the |ch_evalexpr()| or |ch_sendexpr()| functions, Vim will add the HTTP header
and encode the Vim expression into JSON. Refer to |json_encode()| and
|json_decode()| for more information about how Vim encodes and decodes the
builtin types into JSON.
To open a channel using the 'lsp' mode, set the 'mode' item in the |ch_open()|
{options} argument to 'lsp'. Example: >
let ch = ch_open(..., #{mode: 'lsp'})
To open a channel using the 'lsp' mode with a job, set the 'in_mode' and
'out_mode' items in the |job_start()| {options} argument to 'lsp'. Example: >
let cmd = ['clangd', '--background-index', '--clang-tidy']
let opts = {}
let opts.in_mode = 'lsp'
let opts.out_mode = 'lsp'
let opts.err_mode = 'nl'
let opts.out_cb = function('LspOutCallback')
let opts.err_cb = function('LspErrCallback')
let opts.exit_cb = function('LspExitCallback')
let job = job_start(cmd, opts)
Note that if a job outputs LSP messages on stdout and non-LSP messages on
stderr, then the channel-callback function should handle both the message
formats appropriately or you should use a separate callback function for
"out_cb" and "err_cb" to handle them as shown above.
To synchronously send a JSON-RPC request to the server, use the
|ch_evalexpr()| function. This function will wait and return the decoded
response message from the server. You can use either the |channel-timeout| or
the 'timeout' field in the {options} argument to control the response wait
time. If the request times out, then an empty |Dict| is returned. Example: >
let req = {}
let req.method = 'textDocument/definition'
let req.params = {}
let req.params.textDocument = #{uri: 'a.c'}
let req.params.position = #{line: 10, character: 3}
let defs = ch_evalexpr(ch, req, #{timeout: 100})
if defs->empty()
... <handle failure>
endif
Note that in the request message the 'id' field should not be specified. If it
is specified, then Vim will overwrite the value with an internally generated
identifier. Vim currently supports only a number type for the 'id' field.
The callback function will be invoked for both a successful and a failed RPC
request.
To send a JSON-RPC request to the server and asynchronously process the
response, use the |ch_sendexpr()| function and supply a callback function. If
the "id" field is present in the request message, then Vim will overwrite it
with an internally generated number. This function returns a Dict with the
identifier used for the message. This can be used to send cancellation
request to the LSP server (if needed). Example: >
let req = {}
let req.method = 'textDocument/hover'
let req.id = 200
let req.params = {}
let req.params.textDocument = #{uri: 'a.c'}
let req.params.position = #{line: 10, character: 3}
let resp = ch_sendexpr(ch, req, #{callback: 'HoverFunc'})
To cancel an outstanding asynchronous LSP request sent to the server using the
|ch_sendexpr()| function, send a cancelation message to the server using the
|ch_sendexpr()| function with the ID returned by the |ch_sendexpr()| function
for the request. Example: >
" send a completion request
let req = {}
let req.method = 'textDocument/completion'
let req.params = {}
let req.params.textDocument = #{uri: 'a.c'}
let req.params.position = #{line: 10, character: 3}
let reqstatus = ch_sendexpr(ch, req, #{callback: 'LspComplete'})
" send a cancellation notification
let notif = {}
let notif.method = '$/cancelRequest'
let notif.id = reqstatus.id
call ch_sendexpr(ch, notif)
To send a JSON-RPC notification message to the server, use the |ch_sendexpr()|
function. As the server will not send a response message to the notification,
don't specify the "callback" item. Example: >
call ch_sendexpr(ch, #{method: 'initialized'})
To respond to a JSON-RPC request message from the server, use the
|ch_sendexpr()| function. In the response message, copy the 'id' field value
from the server request message. Example: >
let resp = {}
let resp.id = req.id
let resp.result = 1
call ch_sendexpr(ch, resp)
The JSON-RPC notification messages from the server are delivered through the
|channel-callback| function.
Depending on the use case, you can use the ch_evalexpr(), ch_sendexpr() and
ch_sendraw() functions on the same channel.
A LSP request message has the following format (expressed as a Vim Dict). The
"params" field is optional: >
{
"jsonrpc": "2.0",
"id": <number>,
"method": <string>,
"params": <list|dict>
}
A LSP reponse message has the following format (expressed as a Vim Dict). The
"result" and "error" fields are optional: >
{
"jsonrpc": "2.0",
"id": <number>,
"result": <vim type>
"error": <dict>
}
A LSP notification message has the following format (expressed as a Vim Dict).
The "params" field is optional: >
{
"jsonrpc": "2.0",
"method": <string>,
"params": <list|dict>
}
Depending on the use case, you can use the ch_evalexpr(), ch_sendexpr() and
ch_sendraw() functions on the same channel.
A LSP request message has the following format (expressed as a Vim Dict). The
"params" field is optional: >
{
"jsonrpc": "2.0",
"id": <number>,
"method": <string>,
"params": <list|dict>
}
A LSP reponse message has the following format (expressed as a Vim Dict). The
"result" and "error" fields are optional: >
{
"jsonrpc": "2.0",
"id": <number>,
"result": <vim type>
"error": <dict>
}
A LSP notification message has the following format (expressed as a Vim Dict).
The "params" field is optional: >
{
"jsonrpc": "2.0",
"method": <string>,
"params": <list|dict>
}
vim:tw=78:ts=8:noet:ft=help:norl: vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 8.2. Last change: 2022 Jan 08 *cmdline.txt* For Vim version 8.2. Last change: 2022 Apr 29
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -87,6 +87,7 @@ CTRL-Q Same as CTRL-V. But with some terminals it is used for
CTRL-SHIFT-V *c_CTRL-SHIFT-V* *c_CTRL-SHIFT-Q* CTRL-SHIFT-V *c_CTRL-SHIFT-V* *c_CTRL-SHIFT-Q*
CTRL-SHIFT-Q Works just like CTRL-V, unless |modifyOtherKeys| is active, CTRL-SHIFT-Q Works just like CTRL-V, unless |modifyOtherKeys| is active,
then it inserts the Escape sequence for a key with modifiers. then it inserts the Escape sequence for a key with modifiers.
In the GUI the |key-notation| is inserted without simplifying.
*c_<Left>* *c_Left* *c_<Left>* *c_Left*
<Left> cursor left <Left> cursor left
@@ -227,7 +228,7 @@ CTRL-\ e {expr} *c_CTRL-\_e*
Example: > Example: >
:cmap <F7> <C-\>eAppendSome()<CR> :cmap <F7> <C-\>eAppendSome()<CR>
:func AppendSome() :func AppendSome()
:let cmd = getcmdline() . " Some()" :let cmd = getcmdline() .. " Some()"
:" place the cursor on the ) :" place the cursor on the )
:call setcmdpos(strlen(cmd)) :call setcmdpos(strlen(cmd))
:return cmd :return cmd
@@ -730,7 +731,7 @@ If more line specifiers are given than required for the command, the first
one(s) will be ignored. one(s) will be ignored.
Line numbers may be specified with: *:range* *{address}* Line numbers may be specified with: *:range* *{address}*
{number} an absolute line number {number} an absolute line number *E1247*
. the current line *:.* . the current line *:.*
$ the last line in the file *:$* $ the last line in the file *:$*
% equal to 1,$ (the entire file) *:%* % equal to 1,$ (the entire file) *:%*
@@ -939,7 +940,7 @@ Note: these are typed literally, they are not special keys!
file name of the sourced file. *E498* file name of the sourced file. *E498*
When executing a legacy function, is replaced with the call When executing a legacy function, is replaced with the call
stack, as with <stack> (this is for backwards stack, as with <stack> (this is for backwards
compatibility, using <stack> is preferred). compatibility, using <stack> or <script> is preferred).
In Vim9 script using <sfile> in a function gives error In Vim9 script using <sfile> in a function gives error
*E1245* . *E1245* .
Note that filename-modifiers are useless when <sfile> is Note that filename-modifiers are useless when <sfile> is
@@ -951,6 +952,12 @@ Note: these are typed literally, they are not special keys!
".." in between items. E.g.: ".." in between items. E.g.:
"function {function-name1}[{lnum}]..{function-name2}[{lnum}]" "function {function-name1}[{lnum}]..{function-name2}[{lnum}]"
If there is no call stack you get error *E489* . If there is no call stack you get error *E489* .
*:<script>* *<script>*
<script> When executing a `:source` command, is replaced with the file
name of the sourced file. When executing a function, is
replaced with the file name of the script where it is
defined.
If the file name cannot be determined you get error *E1274* .
*:<slnum>* *<slnum>* *:<slnum>* *<slnum>*
<slnum> When executing a ":source" command, is replaced with the <slnum> When executing a ":source" command, is replaced with the
line number. *E842* line number. *E842*

View File

@@ -382,13 +382,13 @@ Example (this does almost the same as 'diffexpr' being empty): >
function MyDiff() function MyDiff()
let opt = "" let opt = ""
if &diffopt =~ "icase" if &diffopt =~ "icase"
let opt = opt . "-i " let opt = opt .. "-i "
endif endif
if &diffopt =~ "iwhite" if &diffopt =~ "iwhite"
let opt = opt . "-b " let opt = opt .. "-b "
endif endif
silent execute "!diff -a --binary " . opt . v:fname_in . " " . v:fname_new . silent execute "!diff -a --binary " .. opt .. v:fname_in .. " " .. v:fname_new ..
\ " > " . v:fname_out \ " > " .. v:fname_out
redraw! redraw!
endfunction endfunction
@@ -445,8 +445,8 @@ Example (this does the same as 'patchexpr' being empty): >
set patchexpr=MyPatch() set patchexpr=MyPatch()
function MyPatch() function MyPatch()
:call system("patch -o " . v:fname_out . " " . v:fname_in . :call system("patch -o " .. v:fname_out .. " " .. v:fname_in ..
\ " < " . v:fname_diff) \ " < " .. v:fname_diff)
endfunction endfunction
Make sure that using the "patch" program doesn't have unwanted side effects. Make sure that using the "patch" program doesn't have unwanted side effects.

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 8.2. Last change: 2022 Jan 21 *editing.txt* For Vim version 8.2. Last change: 2022 Apr 16
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -222,7 +222,7 @@ If you want to keep the changed buffer without saving it, switch on the
Edit {file} always. Discard any changes to the Edit {file} always. Discard any changes to the
current buffer. current buffer.
Also see |++opt| and |+cmd|. Also see |++opt| and |+cmd|.
*:edit_#* *:e#*
:e[dit] [++opt] [+cmd] #[count] :e[dit] [++opt] [+cmd] #[count]
Edit the [count]th buffer (as shown by |:files|). Edit the [count]th buffer (as shown by |:files|).
This command does the same as [count] CTRL-^. But ":e This command does the same as [count] CTRL-^. But ":e
@@ -389,7 +389,7 @@ as a wildcard when "[" is in the 'isfname' option. A simple way to avoid this
is to use "path\[[]abc]", this matches the file "path\[abc]". is to use "path\[[]abc]", this matches the file "path\[abc]".
*starstar-wildcard* *starstar-wildcard*
Expanding "**" is possible on Unix, Win32, Mac OS/X and a few other systems. Expanding "**" is possible on Unix, Win32, macOS and a few other systems.
This allows searching a directory tree. This goes up to 100 directories deep. This allows searching a directory tree. This goes up to 100 directories deep.
Note there are some commands where this works slightly differently, see Note there are some commands where this works slightly differently, see
|file-searching|. |file-searching|.
@@ -444,9 +444,10 @@ does apply like to other wildcards.
Environment variables in the expression are expanded when evaluating the Environment variables in the expression are expanded when evaluating the
expression, thus this works: > expression, thus this works: >
:e `=$HOME . '/.vimrc'` :e `=$HOME .. '/.vimrc'`
This does not work, $HOME is inside a string and used literally: > This uses $HOME inside a string and it will be used literally, most likely not
:e `='$HOME' . '/.vimrc'` what you intended: >
:e `='$HOME' .. '/.vimrc'`
If the expression returns a string then names are to be separated with line If the expression returns a string then names are to be separated with line
breaks. When the result is a |List| then each item is used as a name. Line breaks. When the result is a |List| then each item is used as a name. Line
@@ -633,7 +634,7 @@ list of the current window.
Also see |++opt| and |+cmd|. Also see |++opt| and |+cmd|.
:[count]arga[dd] {name} .. *:arga* *:argadd* *E479* :[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 Add the {name}s to the argument list. When {name} is
omitted add the current buffer name to the argument omitted add the current buffer name to the argument
list. list.
@@ -1224,7 +1225,7 @@ Examples: >
If you want to always use ":confirm", set the 'confirm' option. If you want to always use ":confirm", set the 'confirm' option.
*:browse* *:bro* *E338* *E614* *E615* *E616* *:browse* *:bro* *E338*
:bro[wse] {command} Open a file selection dialog for an argument to :bro[wse] {command} Open a file selection dialog for an argument to
{command}. At present this works for |:e|, |:w|, {command}. At present this works for |:e|, |:w|,
|:wall|, |:wq|, |:wqall|, |:x|, |:xall|, |:exit|, |:wall|, |:wq|, |:wqall|, |:x|, |:xall|, |:exit|,
@@ -1235,7 +1236,7 @@ If you want to always use ":confirm", set the 'confirm' option.
|:diffsplit|, |:diffpatch|, |:open|, |:pedit|, |:diffsplit|, |:diffpatch|, |:open|, |:pedit|,
|:redir|, |:source|, |:update|, |:visual|, |:vsplit|, |:redir|, |:source|, |:update|, |:visual|, |:vsplit|,
and |:qall| if 'confirm' is set. and |:qall| if 'confirm' is set.
{only in Win32, Athena, Motif, GTK and Mac GUI, in {only in Win32, Motif, GTK and Mac GUI, in
console `browse edit` works if the FileExplorer console `browse edit` works if the FileExplorer
autocommand group exists} autocommand group exists}
When ":browse" is not possible you get an error When ":browse" is not possible you get an error
@@ -1650,6 +1651,11 @@ If you don't get warned often enough you can use the following command.
if it exists now. if it exists now.
Once a file has been checked the timestamp is reset, Once a file has been checked the timestamp is reset,
you will not be warned again. you will not be warned again.
Syntax highlighting, marks, diff status,
'fileencoding', 'fileformat' and 'binary' options
are not changed. See |v:fcs_choice| to reload these
too (for example, if a code formatting tools has
changed the file).
:[N]checkt[ime] {filename} :[N]checkt[ime] {filename}
:[N]checkt[ime] [N] :[N]checkt[ime] [N]
@@ -1689,8 +1695,8 @@ session or with another command (e.g., a filter command). Then you will know
which version of the file you want to keep. which version of the file you want to keep.
The accuracy of the time check depends on the filesystem. On Unix it is The accuracy of the time check depends on the filesystem. On Unix it is
usually sub-second. With old file sytems and on MS-Windows it is normally one usually sub-second. With old file systems and on MS-Windows it is normally one
second. Use has('nanotime') check if sub-second time stamp checks are second. Use `has('nanotime')` to check if sub-second time stamp checks are
available. available.
There is one situation where you get the message while there is nothing wrong: There is one situation where you get the message while there is nothing wrong:
@@ -1772,10 +1778,8 @@ There are three different types of searching:
/u/user_x/include /u/user_x/include
< Note: If your 'path' setting includes a non-existing directory, Vim will < Note: If your 'path' setting includes a non-existing directory, Vim will
skip the non-existing directory, but continues searching in the parent of skip the non-existing directory, and also does not search in the parent of
the non-existing directory if upwards searching is used. E.g. when the non-existing directory if upwards searching is used.
searching "../include" and that doesn't exist, and upward searching is
used, also searches in "..".
3) Combined up/downward search: 3) Combined up/downward search:
If Vim's current path is /u/user_x/work/release and you do > If Vim's current path is /u/user_x/work/release and you do >

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.2. Last change: 2022 Jan 21 *eval.txt* For Vim version 8.2. Last change: 2022 May 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -44,7 +44,8 @@ Profiling is documented at |profiling|.
1. Variables *variables* 1. Variables *variables*
1.1 Variable types ~ 1.1 Variable types ~
*E712* *E896* *E897* *E899* *E712* *E896* *E897* *E899* *E1098*
*E1107* *E1135* *E1138*
There are ten types of variables: There are ten types of variables:
*Number* *Integer* *Number* *Integer*
@@ -180,7 +181,7 @@ You will not get an error if you try to change the type of a variable.
1.2 Function references ~ 1.2 Function references ~
*Funcref* *E695* *E718* *Funcref* *E695* *E718* *E1192*
A Funcref variable is obtained with the |function()| function, the |funcref()| A Funcref variable is obtained with the |function()| function, the |funcref()|
function or created with the lambda expression |expr-lambda|. It can be used function or created with the lambda expression |expr-lambda|. It can be used
in an expression in the place of a function name, before the parenthesis in an expression in the place of a function name, before the parenthesis
@@ -260,7 +261,7 @@ position in the sequence.
List creation ~ List creation ~
*E696* *E697* *E696* *E697*
A List is created with a comma separated list of items in square brackets. A List is created with a comma-separated list of items in square brackets.
Examples: > Examples: >
:let mylist = [1, two, 3, "four"] :let mylist = [1, two, 3, "four"]
:let emptylist = [] :let emptylist = []
@@ -469,7 +470,7 @@ It is also possible to put remaining items in a List variable: >
:for [i, j; rest] in listlist :for [i, j; rest] in listlist
: call Doit(i, j) : call Doit(i, j)
: if !empty(rest) : if !empty(rest)
: echo "remainder: " . string(rest) : echo "remainder: " .. string(rest)
: endif : endif
:endfor :endfor
@@ -497,11 +498,11 @@ Functions that are useful with a List: >
:let list = split("a b c") " create list from items in a string :let list = split("a b c") " create list from items in a string
:let string = join(list, ', ') " create string from list items :let string = join(list, ', ') " create string from list items
:let s = string(list) " String representation of list :let s = string(list) " String representation of list
:call map(list, '">> " . v:val') " prepend ">> " to each item :call map(list, '">> " .. v:val') " prepend ">> " to each item
Don't forget that a combination of features can make things simple. For Don't forget that a combination of features can make things simple. For
example, to add up all the numbers in a list: > example, to add up all the numbers in a list: >
:exe 'let sum = ' . join(nrlist, '+') :exe 'let sum = ' .. join(nrlist, '+')
1.4 Dictionaries ~ 1.4 Dictionaries ~
@@ -513,7 +514,7 @@ ordering.
Dictionary creation ~ Dictionary creation ~
*E720* *E721* *E722* *E723* *E720* *E721* *E722* *E723*
A Dictionary is created with a comma separated list of entries in curly A Dictionary is created with a comma-separated list of entries in curly
braces. Each entry has a key and a value, separated by a colon. Each key can braces. Each entry has a key and a value, separated by a colon. Each key can
only appear once. Examples: > only appear once. Examples: >
:let mydict = {1: 'one', 2: 'two', 3: 'three'} :let mydict = {1: 'one', 2: 'two', 3: 'three'}
@@ -522,8 +523,8 @@ only appear once. Examples: >
A key is always a String. You can use a Number, it will be converted to a A key is always a String. You can use a Number, it will be converted to a
String automatically. Thus the String '4' and the number 4 will find the same String automatically. Thus the String '4' and the number 4 will find the same
entry. Note that the String '04' and the Number 04 are different, since the entry. Note that the String '04' and the Number 04 are different, since the
Number will be converted to the String '4'. The empty string can also be used Number will be converted to the String '4', leading zeros are dropped. The
as a key. empty string can also be used as a key.
In |Vim9| script literaly keys can be used if the key consists of alphanumeric In |Vim9| script literaly keys can be used if the key consists of alphanumeric
characters, underscore and dash, see |vim9-literal-dict|. characters, underscore and dash, see |vim9-literal-dict|.
@@ -533,7 +534,8 @@ legacy script. This does require the key to consist only of ASCII letters,
digits, '-' and '_'. Example: > digits, '-' and '_'. Example: >
:let mydict = #{zero: 0, one_key: 1, two-key: 2, 333: 3} :let mydict = #{zero: 0, one_key: 1, two-key: 2, 333: 3}
Note that 333 here is the string "333". Empty keys are not possible with #{}. Note that 333 here is the string "333". Empty keys are not possible with #{}.
In |Vim9| script the #{} form cannot be used. In |Vim9| script the #{} form cannot be used because it can be confused with
the start of a comment.
A value can be any expression. Using a Dictionary for a value creates a A value can be any expression. Using a Dictionary for a value creates a
nested Dictionary: > nested Dictionary: >
@@ -567,7 +569,7 @@ turn the Dictionary into a List and pass it to |:for|.
Most often you want to loop over the keys, using the |keys()| function: > Most often you want to loop over the keys, using the |keys()| function: >
:for key in keys(mydict) :for key in keys(mydict)
: echo key . ': ' . mydict[key] : echo key .. ': ' .. mydict[key]
:endfor :endfor
The List of keys is unsorted. You may want to sort them first: > The List of keys is unsorted. You may want to sort them first: >
@@ -575,13 +577,13 @@ The List of keys is unsorted. You may want to sort them first: >
To loop over the values use the |values()| function: > To loop over the values use the |values()| function: >
:for v in values(mydict) :for v in values(mydict)
: echo "value: " . v : echo "value: " .. v
:endfor :endfor
If you want both the key and the value use the |items()| function. It returns If you want both the key and the value use the |items()| function. It returns
a List in which each item is a List with two items, the key and the value: > a List in which each item is a List with two items, the key and the value: >
:for [key, value] in items(mydict) :for [key, value] in items(mydict)
: echo key . ': ' . value : echo key .. ': ' .. value
:endfor :endfor
@@ -676,7 +678,7 @@ Functions that can be used with a Dictionary: >
:let small = min(dict) " minimum value in dict :let small = min(dict) " minimum value in dict
:let xs = count(dict, 'x') " count nr of times 'x' appears in dict :let xs = count(dict, 'x') " count nr of times 'x' appears in dict
:let s = string(dict) " String representation of dict :let s = string(dict) " String representation of dict
:call map(dict, '">> " . v:val') " prepend ">> " to each item :call map(dict, '">> " .. v:val') " prepend ">> " to each item
1.5 Blobs ~ 1.5 Blobs ~
@@ -764,7 +766,7 @@ length minus one is used: >
Blob modification ~ Blob modification ~
*blob-modification* *blob-modification* *E1182* *E1184*
To change a specific byte of a blob use |:let| this way: > To change a specific byte of a blob use |:let| this way: >
:let blob[4] = 0x44 :let blob[4] = 0x44
@@ -835,7 +837,7 @@ In legacy script it is possible to form a variable name with curly braces, see
============================================================================== ==============================================================================
2. Expression syntax *expression-syntax* 2. Expression syntax *expression-syntax*
*E1143*
Expression syntax summary, from least to most significant: Expression syntax summary, from least to most significant:
|expr1| expr2 |expr1| expr2
@@ -916,14 +918,17 @@ Example: >
All expressions within one level are parsed from left to right. All expressions within one level are parsed from left to right.
Expression nesting is limited to 1000 levels deep (300 when build with MSVC)
to avoid running out of stack and crashing. *E1169*
expr1 *expr1* *trinary* *falsy-operator* *??* *E109*
expr1 *expr1* *ternary* *falsy-operator* *??* *E109*
----- -----
The trinary operator: expr2 ? expr1 : expr1 The ternary operator: expr2 ? expr1 : expr1
The falsy operator: expr2 ?? expr1 The falsy operator: expr2 ?? expr1
Trinary operator ~ Ternary operator ~
In legacy script the expression before the '?' is evaluated to a number. If In legacy script the expression before the '?' is evaluated to a number. If
it evaluates to |TRUE|, the result is the value of the expression between the it evaluates to |TRUE|, the result is the value of the expression between the
@@ -1014,7 +1019,7 @@ This is valid whether "b" has been defined or not. The second clause will
only be evaluated if "b" has been defined. only be evaluated if "b" has been defined.
expr4 *expr4* expr4 *expr4* *E1153*
----- -----
expr5 {cmp} expr5 expr5 {cmp} expr5
@@ -1172,6 +1177,7 @@ When dividing a Number by zero the result depends on the value:
>0 / 0 = 0x7fffffff (like positive infinity) >0 / 0 = 0x7fffffff (like positive infinity)
<0 / 0 = -0x7fffffff (like negative infinity) <0 / 0 = -0x7fffffff (like negative infinity)
(before Vim 7.2 it was always 0x7fffffff) (before Vim 7.2 it was always 0x7fffffff)
In |Vim9| script dividing a number by zero is an error. *E1154*
When 64-bit Number support is enabled: When 64-bit Number support is enabled:
0 / 0 = -0x8000000000000000 (like NaN for Float) 0 / 0 = -0x8000000000000000 (like NaN for Float)
@@ -1239,7 +1245,7 @@ recognize multibyte encodings, see `byteidx()` for an alternative, or use
byte under the cursor: > byte under the cursor: >
:let c = getline(".")[col(".") - 1] :let c = getline(".")[col(".") - 1]
In |Vim9| script: In |Vim9| script: *E1147* *E1148*
If expr9 is a String this results in a String that contains the expr1'th If expr9 is a String this results in a String that contains the expr1'th
single character (including any composing characters) from expr9. To use byte single character (including any composing characters) from expr9. To use byte
indexes use |strpart()|. indexes use |strpart()|.
@@ -1319,7 +1325,7 @@ for a sublist: >
expr9.name entry in a |Dictionary| *expr-entry* expr9.name entry in a |Dictionary| *expr-entry*
*E1203* *E1229*
If expr9 is a |Dictionary| and it is followed by a dot, then the following If expr9 is a |Dictionary| and it is followed by a dot, then the following
name will be used as a key in the |Dictionary|. This is just like: name will be used as a key in the |Dictionary|. This is just like:
expr9[name]. expr9[name].
@@ -1339,14 +1345,14 @@ Note that the dot is also used for String concatenation. To avoid confusion
always put spaces around the dot for String concatenation. always put spaces around the dot for String concatenation.
expr9(expr1, ...) |Funcref| function call expr9(expr1, ...) |Funcref| function call *E1085*
When expr9 is a |Funcref| type variable, invoke the function it refers to. When expr9 is a |Funcref| type variable, invoke the function it refers to.
expr9->name([args]) method call *method* *->* expr9->name([args]) method call *method* *->*
expr9->{lambda}([args]) expr9->{lambda}([args])
*E260* *E276* *E260* *E276* *E1265*
For methods that are also available as global functions this is the same as: > For methods that are also available as global functions this is the same as: >
name(expr9 [, args]) name(expr9 [, args])
There can also be methods specifically for the type of "expr9". There can also be methods specifically for the type of "expr9".
@@ -1366,7 +1372,7 @@ And NOT: >
-(1.234->string()) -(1.234->string())
What comes after "->" can be a name, a simple expression (not containing any What comes after "->" can be a name, a simple expression (not containing any
parenthesis), or any expression in parenthesis: > parenthesis), or any expression in parentheses: >
base->name(args) base->name(args)
base->some.name(args) base->some.name(args)
base->alist[idx](args) base->alist[idx](args)
@@ -1518,6 +1524,25 @@ to be doubled. These two commands are equivalent: >
if a =~ '\s*' if a =~ '\s*'
interpolated-string *interp-string* *E256*
--------------------
$"string" interpolated string constant *expr-$quote*
$'string' interpolated literal string constant *expr-$'*
Interpolated strings are an extension of the |string| and |literal-string|,
allowing the inclusion of Vim script expressions (see |expr1|). Any
expression returning a value can be enclosed between curly braces. The value
is converted to a string. All the text and results of the expressions
are concatenated to make a new string.
To include an opening brace '{' or closing brace '}' in the string content
double it.
Examples: >
let your_name = input("What's your name? ")
echo $"Hello, {your_name}!"
echo $"The square root of 9 is {sqrt(9)}"
option *expr-option* *E112* *E113* option *expr-option* *E112* *E113*
------ ------
&option option value, local value if possible &option option value, local value if possible
@@ -1525,7 +1550,7 @@ option *expr-option* *E112* *E113*
&l:option local option value &l:option local option value
Examples: > Examples: >
echo "tabstop is " . &tabstop echo "tabstop is " .. &tabstop
if &insertmode if &insertmode
Any option name can be used here. See |options|. When using the local value Any option name can be used here. See |options|. When using the local value
@@ -1546,7 +1571,7 @@ When using the '=' register you get the expression itself, not what it
evaluates to. Use |eval()| to evaluate it. evaluates to. Use |eval()| to evaluate it.
nesting *expr-nesting* *E110* nesting *expr-nesting* *E110*
------- -------
(expr1) nested expression (expr1) nested expression
@@ -1577,7 +1602,7 @@ The first one probably doesn't echo anything, the second echoes the $shell
variable (if your shell supports it). variable (if your shell supports it).
internal variable *expr-variable* *E1015* internal variable *expr-variable* *E1015* *E1089*
----------------- -----------------
variable internal variable variable internal variable
See below |internal-variables|. See below |internal-variables|.
@@ -1815,7 +1840,7 @@ maintain a counter: >
echo "script executed for the first time" echo "script executed for the first time"
else else
let s:counter = s:counter + 1 let s:counter = s:counter + 1
echo "script executed " . s:counter . " times now" echo "script executed " .. s:counter .. " times now"
endif endif
Note that this means that filetype plugins don't get a different set of script Note that this means that filetype plugins don't get a different set of script
@@ -1829,6 +1854,7 @@ Some variables can be set by the user, but the type cannot be changed.
*v:argv* *argv-variable* *v:argv* *argv-variable*
v:argv The command line arguments Vim was invoked with. This is a v:argv The command line arguments Vim was invoked with. This is a
list of strings. The first item is the Vim command. list of strings. The first item is the Vim command.
See |v:progpath| for the command with full path.
*v:beval_col* *beval_col-variable* *v:beval_col* *beval_col-variable*
v:beval_col The number of the column, over which the mouse pointer is. v:beval_col The number of the column, over which the mouse pointer is.
@@ -1950,7 +1976,7 @@ v:completed_item
*v:count* *count-variable* *v:count* *count-variable*
v:count The count given for the last Normal mode command. Can be used v:count The count given for the last Normal mode command. Can be used
to get the count before a mapping. Read-only. Example: > to get the count before a mapping. Read-only. Example: >
:map _x :<C-U>echo "the count is " . v:count<CR> :map _x :<C-U>echo "the count is " .. v:count<CR>
< Note: The <C-U> is required to remove the line range that you < Note: The <C-U> is required to remove the line range that you
get when typing ':' after a count. get when typing ':' after a count.
When there are two counts, as in "3d2w", they are multiplied, When there are two counts, as in "3d2w", they are multiplied,
@@ -2065,6 +2091,11 @@ v:fcs_choice What should happen after a |FileChangedShell| event was
do with the affected buffer: do with the affected buffer:
reload Reload the buffer (does not work if reload Reload the buffer (does not work if
the file was deleted). the file was deleted).
edit Reload the buffer and detect the
values for options such as
'fileformat', 'fileencoding', 'binary'
(does not work if the file was
deleted).
ask Ask the user what to do, as if there ask Ask the user what to do, as if there
was no autocommand. Except that when was no autocommand. Except that when
only the timestamp changed nothing only the timestamp changed nothing
@@ -2172,7 +2203,8 @@ v:lnum Line number for the 'foldexpr' |fold-expr|, 'formatexpr' and
*v:maxcol* *maxcol-variable* *v:maxcol* *maxcol-variable*
v:maxcol Maximum line length. Depending on where it is used it can be v:maxcol Maximum line length. Depending on where it is used it can be
screen columns, characters or bytes. screen columns, characters or bytes. The value currently is
2147483647 on all systems.
*v:mouse_win* *mouse_win-variable* *v:mouse_win* *mouse_win-variable*
v:mouse_win Window number for a mouse click obtained with |getchar()|. v:mouse_win Window number for a mouse click obtained with |getchar()|.
@@ -2204,6 +2236,8 @@ v:none An empty String. Used to put an empty item in JSON. See
< v:none ~ < v:none ~
That is so that eval() can parse the string back to the same That is so that eval() can parse the string back to the same
value. Read-only. value. Read-only.
Note that using `== v:none` and `!= v:none` will often give
an error. Instead, use `is v:none` and `isnot v:none` .
*v:null* *null-variable* *v:null* *null-variable*
v:null An empty String. Used to put "null" in JSON. See v:null An empty String. Used to put "null" in JSON. See
@@ -2214,7 +2248,10 @@ v:null An empty String. Used to put "null" in JSON. See
< v:null ~ < v:null ~
That is so that eval() can parse the string back to the same That is so that eval() can parse the string back to the same
value. Read-only. value. Read-only.
In |Vim9| script "null" can be used without "v:". In |Vim9| script `null` can be used without "v:".
In some places `v:null` and `null` can be used for a List,
Dict, Job, etc. that is not set. That is slightly different
than an empty List, Dict, etc.
*v:numbermax* *numbermax-variable* *v:numbermax* *numbermax-variable*
v:numbermax Maximum value of a number. v:numbermax Maximum value of a number.
@@ -2690,7 +2727,7 @@ See |:verbose-cmd| for more information.
implies that the effect of |:nohlsearch| is undone implies that the effect of |:nohlsearch| is undone
when the function returns. when the function returns.
*:endf* *:endfunction* *E126* *E193* *W22* *:endf* *:endfunction* *E126* *E193* *W22* *E1151*
:endf[unction] [argument] :endf[unction] [argument]
The end of a function definition. Best is to put it The end of a function definition. Best is to put it
on a line by its own, without [argument]. on a line by its own, without [argument].
@@ -2709,7 +2746,7 @@ See |:verbose-cmd| for more information.
command, use line breaks instead of |:bar|: > command, use line breaks instead of |:bar|: >
:exe "func Foo()\necho 'foo'\nendfunc" :exe "func Foo()\necho 'foo'\nendfunc"
< <
*:delf* *:delfunction* *E131* *E933* *:delf* *:delfunction* *E131* *E933* *E1084*
:delf[unction][!] {name} :delf[unction][!] {name}
Delete function {name}. Delete function {name}.
{name} can also be a |Dictionary| entry that is a {name} can also be a |Dictionary| entry that is a
@@ -2726,8 +2763,11 @@ See |:verbose-cmd| for more information.
If "[expr]" is not given, the number 0 is returned. If "[expr]" is not given, the number 0 is returned.
When a function ends without an explicit ":return", When a function ends without an explicit ":return",
the number 0 is returned. the number 0 is returned.
Note that there is no check for unreachable lines, In a :def function *E1095* is given if unreachable
thus there is no warning if commands follow ":return". code follows after the `:return`.
In legacy script there is no check for unreachable
lines, thus there is no warning if commands follow
`:return`.
If the ":return" is used after a |:try| but before the If the ":return" is used after a |:try| but before the
matching |:finally| (if present), the commands matching |:finally| (if present), the commands
@@ -2746,7 +2786,7 @@ may optionally be following. In the function the extra arguments can be used
as "a:1", "a:2", etc. "a:0" is set to the number of extra arguments (which as "a:1", "a:2", etc. "a:0" is set to the number of extra arguments (which
can be 0). "a:000" is set to a |List| that contains these arguments. Note can be 0). "a:000" is set to a |List| that contains these arguments. Note
that "a:1" is the same as "a:000[0]". that "a:1" is the same as "a:000[0]".
*E742* *E742* *E1090*
The a: scope and the variables in it cannot be changed, they are fixed. The a: scope and the variables in it cannot be changed, they are fixed.
However, if a composite type is used, such as |List| or |Dictionary| , you can However, if a composite type is used, such as |List| or |Dictionary| , you can
change their contents. Thus you can pass a |List| to a function and have the change their contents. Thus you can pass a |List| to a function and have the
@@ -2815,9 +2855,9 @@ Example: >
: echohl Title : echohl Title
: echo a:title : echo a:title
: echohl None : echohl None
: echo a:0 . " items:" : echo a:0 .. " items:"
: for s in a:000 : for s in a:000
: echon ' ' . s : echon ' ' .. s
: endfor : endfor
:endfunction :endfunction
@@ -2860,7 +2900,7 @@ This function can then be called with: >
this works: this works:
*function-range-example* > *function-range-example* >
:function Mynumber(arg) :function Mynumber(arg)
: echo line(".") . " " . a:arg : echo line(".") .. " " .. a:arg
:endfunction :endfunction
:1,5call Mynumber(getline(".")) :1,5call Mynumber(getline("."))
< <
@@ -2871,7 +2911,7 @@ This function can then be called with: >
Example of a function that handles the range itself: > Example of a function that handles the range itself: >
:function Cont() range :function Cont() range
: execute (a:firstline + 1) . "," . a:lastline . 's/^/\t\\ ' : execute (a:firstline + 1) .. "," .. a:lastline .. 's/^/\t\\ '
:endfunction :endfunction
:4,8call Cont() :4,8call Cont()
< <
@@ -2988,8 +3028,9 @@ Also note that if you have two script files, and one calls a function in the
other and vice versa, before the used function is defined, it won't work. other and vice versa, before the used function is defined, it won't work.
Avoid using the autoload functionality at the toplevel. Avoid using the autoload functionality at the toplevel.
In |Vim9| script you will get error *E1263* if you use a function name with a In |Vim9| script you will get error *E1263* if you define a function with
"#" character when not in an autoload script. a "#" character in the name. You should use a name without "#" and use
`:export`.
Hint: If you distribute a bunch of scripts you can pack them together with the Hint: If you distribute a bunch of scripts you can pack them together with the
|vimball| utility. Also read the user manual |distribute-script|. |vimball| utility. Also read the user manual |distribute-script|.
@@ -3054,7 +3095,7 @@ declarations and assignments do not use a command. |vim9-declaration|
from the {expr}. If {var-name} didn't exist yet, it from the {expr}. If {var-name} didn't exist yet, it
is created. is created.
:let {var-name}[{idx}] = {expr1} *E689* :let {var-name}[{idx}] = {expr1} *E689* *E1141*
Set a list item to the result of the expression Set a list item to the result of the expression
{expr1}. {var-name} must refer to a list and {idx} {expr1}. {var-name} must refer to a list and {idx}
must be a valid index in that list. For nested list must be a valid index in that list. For nested list
@@ -3062,12 +3103,12 @@ declarations and assignments do not use a command. |vim9-declaration|
This cannot be used to add an item to a |List|. This cannot be used to add an item to a |List|.
This cannot be used to set a byte in a String. You This cannot be used to set a byte in a String. You
can do that like this: > can do that like this: >
:let var = var[0:2] . 'X' . var[4:] :let var = var[0:2] .. 'X' .. var[4:]
< When {var-name} is a |Blob| then {idx} can be the < When {var-name} is a |Blob| then {idx} can be the
length of the blob, in which case one byte is length of the blob, in which case one byte is
appended. appended.
*E711* *E719* *E711* *E719* *E1165* *E1166* *E1183*
:let {var-name}[{idx1}:{idx2}] = {expr1} *E708* *E709* *E710* :let {var-name}[{idx1}:{idx2}] = {expr1} *E708* *E709* *E710*
Set a sequence of items in a |List| to the result of Set a sequence of items in a |List| to the result of
the expression {expr1}, which must be a list with the the expression {expr1}, which must be a list with the
@@ -3132,7 +3173,7 @@ declarations and assignments do not use a command. |vim9-declaration|
is just like using the |:set| command: both the local is just like using the |:set| command: both the local
value and the global value are changed. value and the global value are changed.
Example: > Example: >
:let &path = &path . ',/usr/local/include' :let &path = &path .. ',/usr/local/include'
< This also works for terminal codes in the form t_xx. < This also works for terminal codes in the form t_xx.
But only for alphanumerical names. Example: > But only for alphanumerical names. Example: >
:let &t_k1 = "\<Esc>[234;" :let &t_k1 = "\<Esc>[234;"
@@ -3161,7 +3202,7 @@ declarations and assignments do not use a command. |vim9-declaration|
:let &g:{option-name} -= {expr1} :let &g:{option-name} -= {expr1}
Like above, but only set the global value of an option Like above, but only set the global value of an option
(if there is one). Works like |:setglobal|. (if there is one). Works like |:setglobal|.
*E1093*
:let [{name1}, {name2}, ...] = {expr1} *:let-unpack* *E687* *E688* :let [{name1}, {name2}, ...] = {expr1} *:let-unpack* *E687* *E688*
{expr1} must evaluate to a |List|. The first item in {expr1} must evaluate to a |List|. The first item in
the list is assigned to {name1}, the second item to the list is assigned to {name1}, the second item to
@@ -3202,15 +3243,31 @@ declarations and assignments do not use a command. |vim9-declaration|
|List| item. |List| item.
*:let=<<* *:let-heredoc* *:let=<<* *:let-heredoc*
*E990* *E991* *E172* *E221* *E990* *E991* *E172* *E221* *E1145*
:let {var-name} =<< [trim] {endmarker} :let {var-name} =<< [trim] [eval] {endmarker}
text... text...
text... text...
{endmarker} {endmarker}
Set internal variable {var-name} to a |List| Set internal variable {var-name} to a |List|
containing the lines of text bounded by the string containing the lines of text bounded by the string
{endmarker}. The lines of text is used as a {endmarker}.
|literal-string|.
If "eval" is not specified, then each line of text is
used as a |literal-string|, except that single quotes
doe not need to be doubled.
If "eval" is specified, then any Vim expression in the
form {expr} is evaluated and the result replaces the
expression, like with |interp-string|.
Example where $HOME is expanded: >
let lines =<< trim eval END
some text
See the file {$HOME}/.vimrc
more text
END
< There can be multiple Vim expressions in a single line
but an expression cannot span multiple lines. If any
expression evaluation fails, then the assignment fails.
{endmarker} must not contain white space. {endmarker} must not contain white space.
{endmarker} cannot start with a lower case character. {endmarker} cannot start with a lower case character.
The last line should end only with the {endmarker} The last line should end only with the {endmarker}
@@ -3260,6 +3317,13 @@ text...
1 2 3 4 1 2 3 4
5 6 7 8 5 6 7 8
DATA DATA
let code =<< trim eval CODE
let v = {10 + 20}
let h = "{$HOME}"
let s = "{Str1()} abc {Str2()}"
let n = {MyFunc(3, 4)}
CODE
< <
*E121* *E121*
:let {var-name} .. List the value of variable {var-name}. Multiple :let {var-name} .. List the value of variable {var-name}. Multiple
@@ -3355,7 +3419,7 @@ text...
:lockvar v :lockvar v
:let v = 'asdf' " fails! :let v = 'asdf' " fails!
:unlet v " works :unlet v " works
< *E741* *E940* < *E741* *E940* *E1118* *E1119* *E1120* *E1121* *E1122*
If you try to change a locked variable you get an If you try to change a locked variable you get an
error message: "E741: Value is locked: {name}". error message: "E741: Value is locked: {name}".
If you try to lock or unlock a built-in variable you If you try to lock or unlock a built-in variable you
@@ -3403,19 +3467,22 @@ text...
See |deepcopy()|. See |deepcopy()|.
:unlo[ckvar][!] [depth] {name} ... *:unlockvar* *:unlo* :unlo[ckvar][!] [depth] {name} ... *:unlockvar* *:unlo* *E1246*
Unlock the internal variable {name}. Does the Unlock the internal variable {name}. Does the
opposite of |:lockvar|. opposite of |:lockvar|.
:if {expr1} *:if* *:end* *:endif* *:en* *E171* *E579* *E580* :if {expr1} *:if* *:end* *:endif* *:en* *E171* *E579* *E580*
:en[dif] Execute the commands until the next matching ":else" :en[dif] Execute the commands until the next matching `:else`
or ":endif" if {expr1} evaluates to non-zero. or `:endif` if {expr1} evaluates to non-zero.
Although the short forms work, it is recommended to
always use `:endif` to avoid confusion and to make
auto-indenting work properly.
From Vim version 4.5 until 5.0, every Ex command in From Vim version 4.5 until 5.0, every Ex command in
between the ":if" and ":endif" is ignored. These two between the `:if` and `:endif` is ignored. These two
commands were just to allow for future expansions in a commands were just to allow for future expansions in a
backward compatible way. Nesting was allowed. Note backward compatible way. Nesting was allowed. Note
that any ":else" or ":elseif" was ignored, the "else" that any `:else` or `:elseif` was ignored, the `else`
part was not executed either. part was not executed either.
You can use this to remain compatible with older You can use this to remain compatible with older
@@ -3424,32 +3491,38 @@ text...
: version-5-specific-commands : version-5-specific-commands
:endif :endif
< The commands still need to be parsed to find the < The commands still need to be parsed to find the
"endif". Sometimes an older Vim has a problem with a `endif`. Sometimes an older Vim has a problem with a
new command. For example, ":silent" is recognized as new command. For example, `:silent` is recognized as
a ":substitute" command. In that case ":execute" can a `:substitute` command. In that case `:execute` can
avoid problems: > avoid problems: >
:if version >= 600 :if version >= 600
: execute "silent 1,$delete" : execute "silent 1,$delete"
:endif :endif
< <
NOTE: The ":append" and ":insert" commands don't work In |Vim9| script `:endif` cannot be shortened, to
properly in between ":if" and ":endif". improve script readability.
NOTE: The `:append` and `:insert` commands don't work
properly in between `:if` and `:endif`.
*:else* *:el* *E581* *E583* *:else* *:el* *E581* *E583*
:el[se] Execute the commands until the next matching ":else" :el[se] Execute the commands until the next matching `:else`
or ":endif" if they previously were not being or `:endif` if they previously were not being
executed. executed.
In |Vim9| script `:else` cannot be shortened, to
improve script readability.
*:elseif* *:elsei* *E582* *E584* *:elseif* *:elsei* *E582* *E584*
:elsei[f] {expr1} Short for ":else" ":if", with the addition that there :elsei[f] {expr1} Short for `:else` `:if`, with the addition that there
is no extra ":endif". is no extra `:endif`.
In |Vim9| script `:elseif` cannot be shortened, to
improve script readability.
:wh[ile] {expr1} *:while* *:endwhile* *:wh* *:endw* :wh[ile] {expr1} *:while* *:endwhile* *:wh* *:endw*
*E170* *E585* *E588* *E733* *E170* *E585* *E588* *E733*
:endw[hile] Repeat the commands between ":while" and ":endwhile", :endw[hile] Repeat the commands between `:while` and `:endwhile`,
as long as {expr1} evaluates to non-zero. as long as {expr1} evaluates to non-zero.
When an error is detected from a command inside the When an error is detected from a command inside the
loop, execution continues after the "endwhile". loop, execution continues after the `endwhile`.
Example: > Example: >
:let lnum = 1 :let lnum = 1
:while lnum <= line("$") :while lnum <= line("$")
@@ -3457,14 +3530,16 @@ text...
:let lnum = lnum + 1 :let lnum = lnum + 1
:endwhile :endwhile
< <
NOTE: The ":append" and ":insert" commands don't work In |Vim9| script `:while` and `:endwhile` cannot be
properly inside a ":while" and ":for" loop. shortened, to improve script readability.
NOTE: The `:append` and `:insert` commands don't work
properly inside a `:while` and `:for` loop.
:for {var} in {object} *:for* *E690* *E732* :for {var} in {object} *:for* *E690* *E732*
:endfo[r] *:endfo* *:endfor* :endfo[r] *:endfo* *:endfor*
Repeat the commands between ":for" and ":endfor" for Repeat the commands between `:for` and `:endfor` for
each item in {object}. {object} can be a |List| or each item in {object}. {object} can be a |List| or
a |Blob|. a |Blob|. *E1177*
Variable {var} is set to the value of each item. Variable {var} is set to the value of each item.
In |Vim9| script the loop variable must not have been In |Vim9| script the loop variable must not have been
@@ -3472,7 +3547,7 @@ text...
global/window/tab/buffer variable. global/window/tab/buffer variable.
When an error is detected for a command inside the When an error is detected for a command inside the
loop, execution continues after the "endfor". loop, execution continues after the `endfor`.
Changing {object} inside the loop affects what items Changing {object} inside the loop affects what items
are used. Make a copy if this is unwanted: > are used. Make a copy if this is unwanted: >
:for item in copy(mylist) :for item in copy(mylist)
@@ -3497,9 +3572,12 @@ text...
iterate over. Unlike with |List|, modifying the iterate over. Unlike with |List|, modifying the
|Blob| does not affect the iteration. |Blob| does not affect the iteration.
In |Vim9| script `:endfor` cannot be shortened, to
improve script readability.
:for [{var1}, {var2}, ...] in {listlist} :for [{var1}, {var2}, ...] in {listlist}
:endfo[r] :endfo[r] *E1140*
Like ":for" above, but each item in {listlist} must be Like `:for` above, but each item in {listlist} must be
a list, of which each item is assigned to {var1}, a list, of which each item is assigned to {var1},
{var2}, etc. Example: > {var2}, etc. Example: >
:for [lnum, col] in [[1, 3], [2, 5], [3, 8]] :for [lnum, col] in [[1, 3], [2, 5], [3, 8]]
@@ -3507,39 +3585,44 @@ text...
:endfor :endfor
< <
*:continue* *:con* *E586* *:continue* *:con* *E586*
:con[tinue] When used inside a ":while" or ":for" loop, jumps back :con[tinue] When used inside a `:while` or `:for` loop, jumps back
to the start of the loop. to the start of the loop.
If it is used after a |:try| inside the loop but If it is used after a `:try` inside the loop but
before the matching |:finally| (if present), the before the matching `:finally` (if present), the
commands following the ":finally" up to the matching commands following the `:finally` up to the matching
|:endtry| are executed first. This process applies to `:endtry` are executed first. This process applies to
all nested ":try"s inside the loop. The outermost all nested `:try`s inside the loop. The outermost
":endtry" then jumps back to the start of the loop. `:endtry` then jumps back to the start of the loop.
In |Vim9| script `:cont` is the shortest form, to
improve script readability.
*:break* *:brea* *E587* *:break* *:brea* *E587*
:brea[k] When used inside a ":while" or ":for" loop, skips to :brea[k] When used inside a `:while` or `:for` loop, skips to
the command after the matching ":endwhile" or the command after the matching `:endwhile` or
":endfor". `:endfor`.
If it is used after a |:try| inside the loop but If it is used after a `:try` inside the loop but
before the matching |:finally| (if present), the before the matching `:finally` (if present), the
commands following the ":finally" up to the matching commands following the `:finally` up to the matching
|:endtry| are executed first. This process applies to `:endtry` are executed first. This process applies to
all nested ":try"s inside the loop. The outermost all nested `:try`s inside the loop. The outermost
":endtry" then jumps to the command after the loop. `:endtry` then jumps to the command after the loop.
In |Vim9| script `:break` cannot be shortened, to
improve script readability.
:try *:try* *:endt* *:endtry* :try *:try* *:endt* *:endtry*
*E600* *E601* *E602* *E1032* *E600* *E601* *E602* *E1032*
:endt[ry] Change the error handling for the commands between :endt[ry] Change the error handling for the commands between
":try" and ":endtry" including everything being `:try` and `:endtry` including everything being
executed across ":source" commands, function calls, executed across `:source` commands, function calls,
or autocommand invocations. or autocommand invocations.
When an error or interrupt is detected and there is When an error or interrupt is detected and there is
a |:finally| command following, execution continues a `:finally` command following, execution continues
after the ":finally". Otherwise, or when the after the `:finally`. Otherwise, or when the
":endtry" is reached thereafter, the next `:endtry` is reached thereafter, the next
(dynamically) surrounding ":try" is checked for (dynamically) surrounding `:try` is checked for
a corresponding ":finally" etc. Then the script a corresponding `:finally` etc. Then the script
processing is terminated. Whether a function processing is terminated. Whether a function
definition has an "abort" argument does not matter. definition has an "abort" argument does not matter.
Example: > Example: >
@@ -3547,9 +3630,9 @@ text...
echomsg "not reached" echomsg "not reached"
< <
Moreover, an error or interrupt (dynamically) inside Moreover, an error or interrupt (dynamically) inside
":try" and ":endtry" is converted to an exception. It `:try` and `:endtry` is converted to an exception. It
can be caught as if it were thrown by a |:throw| can be caught as if it were thrown by a `:throw`
command (see |:catch|). In this case, the script command (see `:catch`). In this case, the script
processing is not terminated. processing is not terminated.
The value "Vim:Interrupt" is used for an interrupt The value "Vim:Interrupt" is used for an interrupt
@@ -3564,13 +3647,16 @@ text...
try | sleep 100 | catch /^Vim:Interrupt$/ | endtry try | sleep 100 | catch /^Vim:Interrupt$/ | endtry
try | edit | catch /^Vim(edit):E\d\+/ | echo "error" | endtry try | edit | catch /^Vim(edit):E\d\+/ | echo "error" | endtry
< <
In |Vim9| script `:endtry` cannot be shortened, to
improve script readability.
*:cat* *:catch* *:cat* *:catch*
*E603* *E604* *E605* *E654* *E1033* *E603* *E604* *E605* *E654* *E1033*
:cat[ch] /{pattern}/ The following commands until the next |:catch|, :cat[ch] /{pattern}/ The following commands until the next `:catch`,
|:finally|, or |:endtry| that belongs to the same `:finally`, or `:endtry` that belongs to the same
|:try| as the ":catch" are executed when an exception `:try` as the `:catch` are executed when an exception
matching {pattern} is being thrown and has not yet matching {pattern} is being thrown and has not yet
been caught by a previous ":catch". Otherwise, these been caught by a previous `:catch`. Otherwise, these
commands are skipped. commands are skipped.
When {pattern} is omitted all errors are caught. When {pattern} is omitted all errors are caught.
Examples: > Examples: >
@@ -3592,29 +3678,35 @@ text...
NOTE: It is not reliable to ":catch" the TEXT of NOTE: It is not reliable to ":catch" the TEXT of
an error message because it may vary in different an error message because it may vary in different
locales. locales.
In |Vim9| script `:catch` cannot be shortened, to
improve script readability.
*:fina* *:finally* *E606* *E607* *:fina* *:finally* *E606* *E607*
:fina[lly] The following commands until the matching |:endtry| :fina[lly] The following commands until the matching `:endtry`
are executed whenever the part between the matching are executed whenever the part between the matching
|:try| and the ":finally" is left: either by falling `:try` and the `:finally` is left: either by falling
through to the ":finally" or by a |:continue|, through to the `:finally` or by a `:continue`,
|:break|, |:finish|, or |:return|, or by an error or `:break`, `:finish`, or `:return`, or by an error or
interrupt or exception (see |:throw|). interrupt or exception (see `:throw`).
*:th* *:throw* *E608* In |Vim9| script `:finally` cannot be shortened, to
improve script readability and avoid confusion with
`:final`.
*:th* *:throw* *E608* *E1129*
:th[row] {expr1} The {expr1} is evaluated and thrown as an exception. :th[row] {expr1} The {expr1} is evaluated and thrown as an exception.
If the ":throw" is used after a |:try| but before the If the ":throw" is used after a `:try` but before the
first corresponding |:catch|, commands are skipped first corresponding `:catch`, commands are skipped
until the first ":catch" matching {expr1} is reached. until the first `:catch` matching {expr1} is reached.
If there is no such ":catch" or if the ":throw" is If there is no such `:catch` or if the ":throw" is
used after a ":catch" but before the |:finally|, the used after a `:catch` but before the `:finally`, the
commands following the ":finally" (if present) up to commands following the `:finally` (if present) up to
the matching |:endtry| are executed. If the ":throw" the matching `:endtry` are executed. If the `:throw`
is after the ":finally", commands up to the ":endtry" is after the `:finally`, commands up to the `:endtry`
are skipped. At the ":endtry", this process applies are skipped. At the ":endtry", this process applies
again for the next dynamically surrounding ":try" again for the next dynamically surrounding `:try`
(which may be found in a calling function or sourcing (which may be found in a calling function or sourcing
script), until a matching ":catch" has been found. script), until a matching `:catch` has been found.
If the exception is not caught, the command processing If the exception is not caught, the command processing
is terminated. is terminated.
Example: > Example: >
@@ -3623,13 +3715,16 @@ text...
for when an error causes the parsing to skip the whole for when an error causes the parsing to skip the whole
line and not see the "|" that separates the commands. line and not see the "|" that separates the commands.
In |Vim9| script `:throw` cannot be shortened, to
improve script readability.
*:ec* *:echo* *:ec* *:echo*
:ec[ho] {expr1} .. Echoes each {expr1}, with a space in between. The :ec[ho] {expr1} .. Echoes each {expr1}, with a space in between. The
first {expr1} starts on a new line. first {expr1} starts on a new line.
Also see |:comment|. Also see |:comment|.
Use "\n" to start a new line. Use "\r" to move the Use "\n" to start a new line. Use "\r" to move the
cursor to the first column. cursor to the first column.
Uses the highlighting set by the |:echohl| command. Uses the highlighting set by the `:echohl` command.
Cannot be followed by a comment. Cannot be followed by a comment.
Example: > Example: >
:echo "the value of 'shell' is" &shell :echo "the value of 'shell' is" &shell
@@ -3638,21 +3733,21 @@ text...
And since Vim mostly postpones redrawing until it's And since Vim mostly postpones redrawing until it's
finished with a sequence of commands this happens finished with a sequence of commands this happens
quite often. To avoid that a command from before the quite often. To avoid that a command from before the
":echo" causes a redraw afterwards (redraws are often `:echo` causes a redraw afterwards (redraws are often
postponed until you type something), force a redraw postponed until you type something), force a redraw
with the |:redraw| command. Example: > with the `:redraw` command. Example: >
:new | redraw | echo "there is a new window" :new | redraw | echo "there is a new window"
< <
*:echon* *:echon*
:echon {expr1} .. Echoes each {expr1}, without anything added. Also see :echon {expr1} .. Echoes each {expr1}, without anything added. Also see
|:comment|. |:comment|.
Uses the highlighting set by the |:echohl| command. Uses the highlighting set by the `:echohl` command.
Cannot be followed by a comment. Cannot be followed by a comment.
Example: > Example: >
:echon "the value of 'shell' is " &shell :echon "the value of 'shell' is " &shell
< <
Note the difference between using ":echo", which is a Note the difference between using `:echo`, which is a
Vim command, and ":!echo", which is an external shell Vim command, and `:!echo`, which is an external shell
command: > command: >
:!echo % --> filename :!echo % --> filename
< The arguments of ":!" are expanded, see |:_%|. > < The arguments of ":!" are expanded, see |:_%|. >
@@ -3668,8 +3763,8 @@ text...
*:echoh* *:echohl* *:echoh* *:echohl*
:echoh[l] {name} Use the highlight group {name} for the following :echoh[l] {name} Use the highlight group {name} for the following
|:echo|, |:echon| and |:echomsg| commands. Also used `:echo`, `:echon` and `:echomsg` commands. Also used
for the |input()| prompt. Example: > for the `input()` prompt. Example: >
:echohl WarningMsg | echo "Don't panic!" | echohl None :echohl WarningMsg | echo "Don't panic!" | echohl None
< Don't forget to set the group back to "None", < Don't forget to set the group back to "None",
otherwise all following echo's will be highlighted. otherwise all following echo's will be highlighted.
@@ -3678,14 +3773,14 @@ text...
:echom[sg] {expr1} .. Echo the expression(s) as a true message, saving the :echom[sg] {expr1} .. Echo the expression(s) as a true message, saving the
message in the |message-history|. message in the |message-history|.
Spaces are placed between the arguments as with the Spaces are placed between the arguments as with the
|:echo| command. But unprintable characters are `:echo` command. But unprintable characters are
displayed, not interpreted. displayed, not interpreted.
The parsing works slightly different from |:echo|, The parsing works slightly different from `:echo`,
more like |:execute|. All the expressions are first more like `:execute`. All the expressions are first
evaluated and concatenated before echoing anything. evaluated and concatenated before echoing anything.
If expressions does not evaluate to a Number or If expressions does not evaluate to a Number or
String, string() is used to turn it into a string. String, string() is used to turn it into a string.
Uses the highlighting set by the |:echohl| command. Uses the highlighting set by the `:echohl` command.
Example: > Example: >
:echomsg "It's a Zizzer Zazzer Zuzz, as you can plainly see." :echomsg "It's a Zizzer Zazzer Zuzz, as you can plainly see."
< See |:echo-redraw| to avoid the message disappearing < See |:echo-redraw| to avoid the message disappearing
@@ -3695,12 +3790,12 @@ text...
message in the |message-history|. When used in a message in the |message-history|. When used in a
script or function the line number will be added. script or function the line number will be added.
Spaces are placed between the arguments as with the Spaces are placed between the arguments as with the
|:echomsg| command. When used inside a try conditional, `:echomsg` command. When used inside a try conditional,
the message is raised as an error exception instead the message is raised as an error exception instead
(see |try-echoerr|). (see |try-echoerr|).
Example: > Example: >
:echoerr "This script just failed!" :echoerr "This script just failed!"
< If you just want a highlighted message use |:echohl|. < If you just want a highlighted message use `:echohl`.
And to get a beep: > And to get a beep: >
:exe "normal \<Esc>" :exe "normal \<Esc>"
@@ -3718,6 +3813,9 @@ text...
the `append()` call appends the List with text to the the `append()` call appends the List with text to the
buffer. This is similar to `:call` but works with any buffer. This is similar to `:call` but works with any
expression. expression.
In |Vim9| script an expression without an effect will
result in error *E1207* . This should help noticing
mistakes.
The command can be shortened to `:ev` or `:eva`, but The command can be shortened to `:ev` or `:eva`, but
these are hard to recognize and therefore not to be these are hard to recognize and therefore not to be
@@ -4010,7 +4108,7 @@ exception most recently caught as long it is not finished.
:function! Caught() :function! Caught()
: if v:exception != "" : if v:exception != ""
: echo 'Caught "' . v:exception . '" in ' . v:throwpoint : echo 'Caught "' . v:exception .. '" in ' .. v:throwpoint
: else : else
: echo 'Nothing caught' : echo 'Nothing caught'
: endif : endif
@@ -4413,8 +4511,8 @@ a script in order to catch unexpected things.
:catch /^Vim:Interrupt$/ :catch /^Vim:Interrupt$/
: echo "Script interrupted" : echo "Script interrupted"
:catch /.*/ :catch /.*/
: echo "Internal error (" . v:exception . ")" : echo "Internal error (" .. v:exception .. ")"
: echo " - occurred at " . v:throwpoint : echo " - occurred at " .. v:throwpoint
:endtry :endtry
:" end of script :" end of script
@@ -4610,7 +4708,7 @@ parentheses can be cut out from |v:exception| with the ":substitute" command.
:function! CheckRange(a, func) :function! CheckRange(a, func)
: if a:a < 0 : if a:a < 0
: throw "EXCEPT:MATHERR:RANGE(" . a:func . ")" : throw "EXCEPT:MATHERR:RANGE(" .. a:func .. ")"
: endif : endif
:endfunction :endfunction
: :
@@ -4637,13 +4735,13 @@ parentheses can be cut out from |v:exception| with the ":substitute" command.
: try : try
: execute "write" fnameescape(a:file) : execute "write" fnameescape(a:file)
: catch /^Vim(write):/ : catch /^Vim(write):/
: throw "EXCEPT:IO(" . getcwd() . ", " . a:file . "):WRITEERR" : throw "EXCEPT:IO(" .. getcwd() .. ", " .. a:file .. "):WRITEERR"
: endtry : endtry
:endfunction :endfunction
: :
:try :try
: :
: " something with arithmetics and I/O : " something with arithmetic and I/O
: :
:catch /^EXCEPT:MATHERR:RANGE/ :catch /^EXCEPT:MATHERR:RANGE/
: let function = substitute(v:exception, '.*(\(\a\+\)).*', '\1', "") : let function = substitute(v:exception, '.*(\(\a\+\)).*', '\1', "")
@@ -4656,9 +4754,9 @@ parentheses can be cut out from |v:exception| with the ":substitute" command.
: let dir = substitute(v:exception, '.*(\(.\+\),\s*.\+).*', '\1', "") : let dir = substitute(v:exception, '.*(\(.\+\),\s*.\+).*', '\1', "")
: let file = substitute(v:exception, '.*(.\+,\s*\(.\+\)).*', '\1', "") : let file = substitute(v:exception, '.*(.\+,\s*\(.\+\)).*', '\1', "")
: if file !~ '^/' : if file !~ '^/'
: let file = dir . "/" . file : let file = dir .. "/" .. file
: endif : endif
: echo 'I/O error for "' . file . '"' : echo 'I/O error for "' .. file .. '"'
: :
:catch /^EXCEPT/ :catch /^EXCEPT/
: echo "Unspecified error" : echo "Unspecified error"
@@ -4726,7 +4824,7 @@ clauses, however, is executed.
: echo "inner finally" : echo "inner finally"
: endtry : endtry
:catch :catch
: echo 'outer catch-all caught "' . v:exception . '"' : echo 'outer catch-all caught "' .. v:exception .. '"'
: finally : finally
: echo "outer finally" : echo "outer finally"
:endtry :endtry
@@ -4788,7 +4886,7 @@ Printing in Binary ~
: let n = a:nr : let n = a:nr
: let r = "" : let r = ""
: while n : while n
: let r = '01'[n % 2] . r : let r = '01'[n % 2] .. r
: let n = n / 2 : let n = n / 2
: endwhile : endwhile
: return r : return r
@@ -4799,7 +4897,7 @@ Printing in Binary ~
:func String2Bin(str) :func String2Bin(str)
: let out = '' : let out = ''
: for ix in range(strlen(a:str)) : for ix in range(strlen(a:str))
: let out = out . '-' . Nr2Bin(char2nr(a:str[ix])) : let out = out .. '-' .. Nr2Bin(char2nr(a:str[ix]))
: endfor : endfor
: return out[1:] : return out[1:]
:endfunc :endfunc
@@ -4885,6 +4983,9 @@ explicit the |:scriptversion| command can be used. When a Vim script is not
compatible with older versions of Vim this will give an explicit error, compatible with older versions of Vim this will give an explicit error,
instead of failing in mysterious ways. instead of failing in mysterious ways.
When using a legacy function, defined with `:function`, in |Vim9| script then
scriptversion 4 is used.
*scriptversion-1* > *scriptversion-1* >
:scriptversion 1 :scriptversion 1
< This is the original Vim script, same as not using a |:scriptversion| < This is the original Vim script, same as not using a |:scriptversion|

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 8.2. Last change: 2022 Jan 21 *filetype.txt* For Vim version 8.2. Last change: 2022 Apr 09
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -142,18 +142,31 @@ variables can be used to overrule the filetype used for certain extensions:
*.asm g:asmsyntax |ft-asm-syntax| *.asm g:asmsyntax |ft-asm-syntax|
*.asp g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax| *.asp g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax|
*.bas g:filetype_bas |ft-basic-syntax| *.bas g:filetype_bas |ft-basic-syntax|
*.fs g:filetype_fs |ft-forth-syntax| *.cfg g:filetype_cfg
*.csh g:filetype_csh |ft-csh-syntax|
*.dat g:filetype_dat
*.frm g:filetype_frm |ft-form-syntax|
*.fs g:filetype_fs |ft-forth-syntax|
*.i g:filetype_i |ft-progress-syntax| *.i g:filetype_i |ft-progress-syntax|
*.inc g:filetype_inc *.inc g:filetype_inc
*.m g:filetype_m |ft-mathematica-syntax| *.m g:filetype_m |ft-mathematica-syntax|
*.mod g:filetype_mod
*.p g:filetype_p |ft-pascal-syntax| *.p g:filetype_p |ft-pascal-syntax|
*.pl g:filetype_pl *.pl g:filetype_pl
*.pp g:filetype_pp |ft-pascal-syntax| *.pp g:filetype_pp |ft-pascal-syntax|
*.prg g:filetype_prg *.prg g:filetype_prg
*.r g:filetype_r
*.sql g:filetype_sql |ft-sql-syntax|
*.src g:filetype_src
*.sys g:filetype_sys
*.sh g:bash_is_sh |ft-sh-syntax| *.sh g:bash_is_sh |ft-sh-syntax|
*.tex g:tex_flavor |ft-tex-plugin| *.tex g:tex_flavor |ft-tex-plugin|
*.w g:filetype_w |ft-cweb-syntax| *.w g:filetype_w |ft-cweb-syntax|
For a few filetypes the global variable is used only when the filetype could
not be detected:
*.r g:filetype_r |ft-rexx-syntax|
*filetype-ignore* *filetype-ignore*
To avoid that certain files are being inspected, the g:ft_ignore_pat variable To avoid that certain files are being inspected, the g:ft_ignore_pat variable
is used. The default value is set like this: > is used. The default value is set like this: >

View File

@@ -507,7 +507,7 @@ Note the use of backslashes to avoid some characters to be interpreted by the
:function MyFoldText() :function MyFoldText()
: let line = getline(v:foldstart) : let line = getline(v:foldstart)
: let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g') : let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g')
: return v:folddashes . sub : return v:folddashes .. sub
:endfunction :endfunction
Evaluating 'foldtext' is done in the |sandbox|. The current window is set to Evaluating 'foldtext' is done in the |sandbox|. The current window is set to

View File

@@ -1,4 +1,4 @@
*ft_ada.txt* For Vim version 8.2. Last change: 2010 Jul 20 *ft_ada.txt* For Vim version 8.2. Last change: 2022 Mar 13
ADA FILE TYPE PLUG-INS REFERENCE MANUAL~ ADA FILE TYPE PLUG-INS REFERENCE MANUAL~
@@ -89,9 +89,9 @@ file is opened and adds Ada related entries to the main and pop-up menu.
*ft-ada-omni* *ft-ada-omni*
The Ada omni-completions (|i_CTRL-X_CTRL-O|) uses tags database created either The Ada omni-completions (|i_CTRL-X_CTRL-O|) uses tags database created either
by "gnat xref -v" or the "exuberant Ctags (http://ctags.sourceforge.net). The by "gnat xref -v" or the "Universal Ctags" (https://ctags.io). The complete
complete function will automatically detect which tool was used to create the function will automatically detect which tool was used to create the tags
tags file. file.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
3.1 Omni Completion with "gnat xref" ~ 3.1 Omni Completion with "gnat xref" ~
@@ -125,18 +125,18 @@ NOTE: "gnat xref -v" is very tricky to use as it has almost no diagnostic
3.2 Omni Completion with "ctags"~ 3.2 Omni Completion with "ctags"~
*ada-ctags* *ada-ctags*
Exuberant Ctags uses its own multi-language code parser. The parser is quite Universal/Exuberant Ctags use their own multi-language code parser. The
fast, produces a lot of extra information (hence the name "Exuberant Ctags") parser is quite fast, produces a lot of extra information and can run on files
and can run on files which currently do not compile. which currently do not compile.
There are also lots of other Vim-tools which use exuberant Ctags. There are also lots of other Vim-tools which use Universal/Exuberant Ctags.
Universal Ctags is preferred, Exuberant Ctags is no longer being developed.
You will need to install a version of the Exuberant Ctags which has Ada You will need to install Universal Ctags which is available from
support patched in. Such a version is available from the GNU Ada Project https://ctags.io
(http://gnuada.sourceforge.net).
The Ada parser for Exuberant Ctags is fairly new - don't expect complete The Ada parser for Universal/Exuberant Ctags is fairly new - don't expect
support yet. complete support yet.
============================================================================== ==============================================================================
4. Compiler Support ~ 4. Compiler Support ~

View File

@@ -47,20 +47,20 @@ Numbers, subscripts and superscripts are available with 's' and 'S':
But some don't come defined by default. Those are digraph definitions you can But some don't come defined by default. Those are digraph definitions you can
add in your ~/.vimrc file. > add in your ~/.vimrc file. >
exec 'digraph \\ '.char2nr('') exec 'digraph \\ ' .. char2nr('')
exec 'digraph \< '.char2nr('≼') exec 'digraph \< ' .. char2nr('≼')
exec 'digraph \> '.char2nr('≽') exec 'digraph \> ' .. char2nr('≽')
exec 'digraph (L '.char2nr('⊈') exec 'digraph (L ' .. char2nr('⊈')
exec 'digraph )L '.char2nr('⊉') exec 'digraph )L ' .. char2nr('⊉')
exec 'digraph (/ '.char2nr('⊄') exec 'digraph (/ ' .. char2nr('⊄')
exec 'digraph )/ '.char2nr('⊅') exec 'digraph )/ ' .. char2nr('⊅')
exec 'digraph )/ '.char2nr('⊅') exec 'digraph )/ ' .. char2nr('⊅')
exec 'digraph U+ '.char2nr('⊎') exec 'digraph U+ ' .. char2nr('⊎')
exec 'digraph 0- '.char2nr('⊖') exec 'digraph 0- ' .. char2nr('⊖')
" Euler's constant " Euler's constant
exec 'digraph ne '.char2nr('𝑒') exec 'digraph ne ' .. char2nr('𝑒')
" Raku's atomic operations marker " Raku's atomic operations marker
exec 'digraph @@ '.char2nr('⚛') exec 'digraph @@ ' .. char2nr('⚛')
Alternatively, you can write Insert mode abbreviations that convert ASCII- Alternatively, you can write Insert mode abbreviations that convert ASCII-
based operators into their single-character Unicode equivalent. > based operators into their single-character Unicode equivalent. >

View File

@@ -26,7 +26,7 @@ behavior of the plugin.
g:rustc_path~ g:rustc_path~
Set this option to the path to rustc for use in the |:RustRun| and Set this option to the path to rustc for use in the |:RustRun| and
|:RustExpand| commands. If unset, "rustc" will be located in $PATH: > |:RustExpand| commands. If unset, "rustc" will be located in $PATH: >
let g:rustc_path = $HOME."/bin/rustc" let g:rustc_path = $HOME .. "/bin/rustc"
< <
*g:rustc_makeprg_no_percent* *g:rustc_makeprg_no_percent*
@@ -87,7 +87,7 @@ g:rust_bang_comment_leader~
g:ftplugin_rust_source_path~ g:ftplugin_rust_source_path~
Set this option to a path that should be prepended to 'path' for Rust Set this option to a path that should be prepended to 'path' for Rust
source files: > source files: >
let g:ftplugin_rust_source_path = $HOME.'/dev/rust' let g:ftplugin_rust_source_path = $HOME .. '/dev/rust'
< <
*g:rustfmt_command* *g:rustfmt_command*

View File

@@ -1,4 +1,4 @@
*ft_sql.txt* For Vim version 8.2. Last change: 2019 Dec 07 *ft_sql.txt* For Vim version 8.2. Last change: 2022 Apr 06
by David Fishburn by David Fishburn
@@ -109,8 +109,8 @@ must be configurable. The filetype plugin attempts to define many of the
standard objects, plus many additional ones. In order to make this as standard objects, plus many additional ones. In order to make this as
flexible as possible, you can override the list of objects from within your flexible as possible, you can override the list of objects from within your
|vimrc| with the following: > |vimrc| with the following: >
let g:ftplugin_sql_objects = 'function,procedure,event,table,trigger' . let g:ftplugin_sql_objects = 'function,procedure,event,table,trigger' ..
\ ',schema,service,publication,database,datatype,domain' . \ ',schema,service,publication,database,datatype,domain' ..
\ ',index,subscription,synchronization,view,variable' \ ',index,subscription,synchronization,view,variable'
The following |Normal| mode and |Visual| mode maps have been created which use The following |Normal| mode and |Visual| mode maps have been created which use
@@ -131,10 +131,10 @@ Repeatedly pressing ]} will cycle through each of these create statements: >
create index i1 on t1 (c1); create index i1 on t1 (c1);
The default setting for g:ftplugin_sql_objects is: > The default setting for g:ftplugin_sql_objects is: >
let g:ftplugin_sql_objects = 'function,procedure,event,' . let g:ftplugin_sql_objects = 'function,procedure,event,' ..
\ '\\(existing\\\\|global\\s\\+temporary\\s\\+\\)\\\{,1}' . \ '\\(existing\\\\|global\\s\\+temporary\\s\\+\\)\\\{,1}' ..
\ 'table,trigger' . \ 'table,trigger' ..
\ ',schema,service,publication,database,datatype,domain' . \ ',schema,service,publication,database,datatype,domain' ..
\ ',index,subscription,synchronization,view,variable' \ ',index,subscription,synchronization,view,variable'
The above will also handle these cases: > The above will also handle these cases: >
@@ -559,7 +559,7 @@ the SQL completion plugin. >
< 1. After typing SELECT press <C-C>t to display a list of tables. < 1. After typing SELECT press <C-C>t to display a list of tables.
2. Highlight the table you need the column list for. 2. Highlight the table you need the column list for.
3. Press <Enter> to choose the table from the list. 3. Press <Enter> to choose the table from the list.
4. Press <C-C>l to request a comma separated list of all columns 4. Press <C-C>l to request a comma-separated list of all columns
for this table. for this table.
5. Based on the table name chosen in step 3, the plugin attempts to 5. Based on the table name chosen in step 3, the plugin attempts to
decide on a reasonable table alias. You are then prompted to decide on a reasonable table alias. You are then prompted to
@@ -613,7 +613,7 @@ your |vimrc|: >
> >
omni_sql_use_tbl_alias omni_sql_use_tbl_alias
< - Default: a < - Default: a
- This setting is only used when generating a comma separated - This setting is only used when generating a comma-separated
column list. By default the map is <C-C>l. When generating column list. By default the map is <C-C>l. When generating
a column list, an alias can be prepended to the beginning of each a column list, an alias can be prepended to the beginning of each
column, for example: e.emp_id, e.emp_name. This option has three column, for example: e.emp_id, e.emp_name. This option has three
@@ -697,9 +697,9 @@ plugin. >
<C-C>c <C-C>c
< - Displays a list of columns for a specific table. > < - Displays a list of columns for a specific table. >
<C-C>l <C-C>l
< - Displays a comma separated list of columns for a specific table. > < - Displays a comma-separated list of columns for a specific table. >
<C-C>L <C-C>L
< - Displays a comma separated list of columns for a specific table. < - Displays a comma-separated list of columns for a specific table.
This should only be used when the completion window is active. > This should only be used when the completion window is active. >
<Right> <Right>
< - Displays a list of columns for the table currently highlighted in < - Displays a list of columns for the table currently highlighted in

View File

@@ -1,4 +1,4 @@
*gui.txt* For Vim version 8.2. Last change: 2021 Jun 27 *gui.txt* For Vim version 8.2. Last change: 2022 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -25,7 +25,7 @@ Other GUI documentation:
First you must make sure you actually have a version of Vim with the GUI code First you must make sure you actually have a version of Vim with the GUI code
included. You can check this with the ":version" command, it says "with xxx included. You can check this with the ":version" command, it says "with xxx
GUI", where "xxx" is X11-Motif, X11-Athena, Photon, GTK2, GTK3, etc., or GUI", where "xxx" is X11-Motif, Photon, GTK2, GTK3, etc., or
"MS-Windows 32 bit GUI version". "MS-Windows 32 bit GUI version".
How to start the GUI depends on the system used. Mostly you can run the How to start the GUI depends on the system used. Mostly you can run the
@@ -108,7 +108,7 @@ There are a number of options which only have meaning in the GUI version of
Vim. These are 'guicursor', 'guifont', 'guipty' and 'guioptions'. They are Vim. These are 'guicursor', 'guifont', 'guipty' and 'guioptions'. They are
documented in |options.txt| with all the other options. documented in |options.txt| with all the other options.
If using the Motif or Athena version of the GUI (but not for the GTK+ or If using the Motif version of the GUI (but not for the GTK+ or
Win32 version), a number of X resources are available. See |gui-resources|. Win32 version), a number of X resources are available. See |gui-resources|.
Another way to set the colors for different occasions is with highlight Another way to set the colors for different occasions is with highlight
@@ -147,7 +147,8 @@ task bar with the 'guiheadroom' option.
*:win* *:winsize* *E465* *:win* *:winsize* *E465*
:win[size] {width} {height} :win[size] {width} {height}
Set the window height to {width} by {height} characters. Set the window height to {width} by {height} characters.
Obsolete, use ":set lines=11 columns=22". It is recommended to use `:set lines=11 columns=22` instead,
since it's easy to see what the numbers mean.
If you get less lines than expected, check the 'guiheadroom' If you get less lines than expected, check the 'guiheadroom'
option. option.
@@ -155,8 +156,8 @@ If you are running the X Window System, you can get information about the
window Vim is running in with these commands: > window Vim is running in with these commands: >
:!xwininfo -id $WINDOWID :!xwininfo -id $WINDOWID
:!xprop -id $WINDOWID :!xprop -id $WINDOWID
:execute '!xwininfo -id ' . v:windowid :execute '!xwininfo -id ' .. v:windowid
:execute '!xprop -id ' . v:windowid :execute '!xprop -id ' .. v:windowid
< <
*gui-IME* *iBus* *gui-IME* *iBus*
Input methods for international characters in X that rely on the XIM Input methods for international characters in X that rely on the XIM
@@ -235,7 +236,7 @@ takes too much time or you don't like the cursor jumping to another line,
include the 'h' flag in 'guioptions'. Then the scrolling is limited by the include the 'h' flag in 'guioptions'. Then the scrolling is limited by the
text of the current cursor line. text of the current cursor line.
*athena-intellimouse* *motif-intellimouse*
If you have an Intellimouse and an X server that supports using the wheel, If you have an Intellimouse and an X server that supports using the wheel,
then you can use the wheel to scroll the text up and down in gvim. This works then you can use the wheel to scroll the text up and down in gvim. This works
with XFree86 4.0 and later, and with some older versions when you add patches. with XFree86 4.0 and later, and with some older versions when you add patches.
@@ -260,6 +261,7 @@ Other options that are relevant:
'mousefocus' window focus follows mouse pointer |gui-mouse-focus| 'mousefocus' window focus follows mouse pointer |gui-mouse-focus|
'mousemodel' what mouse button does which action 'mousemodel' what mouse button does which action
'mousehide' hide mouse pointer while typing text 'mousehide' hide mouse pointer while typing text
'mousemoveevent' enable mouse move events so that <MouseMove> can be mapped
'selectmode' whether to start Select mode or Visual mode 'selectmode' whether to start Select mode or Visual mode
A quick way to set these is with the ":behave" command. A quick way to set these is with the ":behave" command.
@@ -405,6 +407,9 @@ These mappings make selection work the way it probably should in a Motif
application, with shift-left mouse allowing for extending the visual area application, with shift-left mouse allowing for extending the visual area
rather than the right mouse button. rather than the right mouse button.
<MouseMove> may be mapped, but 'mousemoveevent' must be enabled to use the
mapping.
Mouse mapping with modifiers does not work for modeless selection. Mouse mapping with modifiers does not work for modeless selection.
@@ -741,7 +746,7 @@ because the item will never be selected. Use a single colon to keep it
simple. simple.
*gui-toolbar* *gui-toolbar*
The toolbar is currently available in the Win32, Athena, Motif, GTK+ (X11), The toolbar is currently available in the Win32, Motif, GTK+ (X11),
and Photon GUI. It should turn up in other GUIs in due course. The and Photon GUI. It should turn up in other GUIs in due course. The
default toolbar is setup in menu.vim. default toolbar is setup in menu.vim.
The display of the toolbar is controlled by the 'guioptions' letter 'T'. You The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
@@ -857,7 +862,7 @@ The window toolbar uses the ToolbarLine and ToolbarButton highlight groups.
When splitting the window the window toolbar is not copied to the new window. When splitting the window the window toolbar is not copied to the new window.
*popup-menu* *popup-menu*
In the Win32, GTK+, Motif, Athena and Photon GUI, you can define the In the Win32, GTK+, Motif and Photon GUI, you can define the
special menu "PopUp". This is the menu that is displayed when the right mouse special menu "PopUp". This is the menu that is displayed when the right mouse
button is pressed, if 'mousemodel' is set to popup or popup_setpos. button is pressed, if 'mousemodel' is set to popup or popup_setpos.
Example: > Example: >

View File

@@ -1,4 +1,4 @@
*gui_w32.txt* For Vim version 8.2. Last change: 2021 Oct 24 *gui_w32.txt* For Vim version 8.2. Last change: 2022 Mar 09
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -236,7 +236,8 @@ The "* register reflects the contents of the clipboard. |quotestar|
When the "unnamed" string is included in the 'clipboard' option, the unnamed When the "unnamed" string is included in the 'clipboard' option, the unnamed
register is the same. Thus you can yank to and paste from the clipboard register is the same. Thus you can yank to and paste from the clipboard
without prepending "* to commands. without prepending "* to commands. If this doesn't work use the "unnamedplus"
string in the 'clipboard' option.
The 'a' flag in 'guioptions' is not included by default. This means that text The 'a' flag in 'guioptions' is not included by default. This means that text
is only put on the clipboard when an operation is performed on it. Just is only put on the clipboard when an operation is performed on it. Just

View File

@@ -1,11 +1,11 @@
*gui_x11.txt* For Vim version 8.2. Last change: 2020 Jun 05 *gui_x11.txt* For Vim version 8.2. Last change: 2022 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
Vim's Graphical User Interface *gui-x11* *GUI-X11* Vim's Graphical User Interface *gui-x11* *GUI-X11*
*Athena* *Motif* *Motif*
1. Starting the X11 GUI |gui-x11-start| 1. Starting the X11 GUI |gui-x11-start|
2. GUI Resources |gui-resources| 2. GUI Resources |gui-resources|
3. Shell Commands |gui-pty| 3. Shell Commands |gui-pty|
@@ -64,7 +64,7 @@ flag in 'guioptions'. |-f|.
============================================================================== ==============================================================================
2. GUI Resources *gui-resources* *.Xdefaults* 2. GUI Resources *gui-resources* *.Xdefaults*
If using the Motif or Athena version of the GUI (not for the KDE, GTK+ or Win32 If using the Motif version of the GUI (not for the KDE, GTK+ or Win32
version), a number of X resources are available. You should use Vim's class version), a number of X resources are available. You should use Vim's class
"Vim" when setting these. They are as follows: "Vim" when setting these. They are as follows:
@@ -96,7 +96,6 @@ version), a number of X resources are available. You should use Vim's class
is same size as terminal that started it). is same size as terminal that started it).
scrollbarWidth Thickness of scrollbars. scrollbarWidth Thickness of scrollbars.
borderWidth Thickness of border around text area. borderWidth Thickness of border around text area.
menuHeight Height of the menu bar (only for Athena).
A special font for italic, bold, and italic-bold text will only be used if A special font for italic, bold, and italic-bold text will only be used if
the user has specified one via a resource. No attempt is made to guess what the user has specified one via a resource. No attempt is made to guess what
@@ -135,12 +134,9 @@ which make Motif applications look even better, highly recommended!
The "Vim*fontList" is to set the menu font for Motif. Example: > The "Vim*fontList" is to set the menu font for Motif. Example: >
Vim*menuBar*fontList: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-* Vim*menuBar*fontList: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
With Athena: >
Vim*menuBar*SmeBSB*font: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
Vim*menuBar*MenuButton*font: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
NOTE: A more portable, and indeed more correct, way to specify the menu font NOTE: A more portable, and indeed more correct, way to specify the menu font
in either Motif or Athena is through the resource: > in Motif is through the resource: >
Vim.menuFont: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-* Vim.menuFont: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
Or, when compiled with the |+xfontset| feature: > Or, when compiled with the |+xfontset| feature: >
Vim.menuFontSet: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-* Vim.menuFontSet: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
@@ -255,7 +251,7 @@ For example: >
:10vmenu File.Print :w !lpr -Php3 :10vmenu File.Print :w !lpr -Php3
< <
*X11-icon* *X11-icon*
Vim uses a black&white icon by default when compiled with Motif or Athena. A Vim uses a black&white icon by default when compiled with Motif. A
colored Vim icon is included as $VIMRUNTIME/vim32x32.xpm. For GTK+, this is colored Vim icon is included as $VIMRUNTIME/vim32x32.xpm. For GTK+, this is
the builtin icon used. Unfortunately, how you should install it depends on the builtin icon used. Unfortunately, how you should install it depends on
your window manager. When you use this, remove the 'i' flag from your window manager. When you use this, remove the 'i' flag from
@@ -594,8 +590,7 @@ GTK+ files on your system. When both GTK+ 2 and GTK+ 3 are available, GTK+ 2
will be chosen unless --enable-gui=gtk3 is passed explicitly to configure. will be chosen unless --enable-gui=gtk3 is passed explicitly to configure.
If the GTK+ files cannot be found, then the Motif files will be searched for. If the GTK+ files cannot be found, then the Motif files will be searched for.
Finally, if this fails, the Athena files will be searched for. If all three If both fail, the GUI will be disabled.
fail, the GUI will be disabled.
For GTK+, Vim's configuration process uses pkg-config(1) to check if the For GTK+, Vim's configuration process uses pkg-config(1) to check if the
GTK+ required for a specified build is properly installed and usable. GTK+ required for a specified build is properly installed and usable.
@@ -621,10 +616,10 @@ explicitly to configure, and avoid passing --enable-gnome-check to that, as
the functionality of the GNOME 2 support has already been consolidated in the functionality of the GNOME 2 support has already been consolidated in
GTK+ 3. GTK+ 3.
Otherwise, if you are using Motif or Athena, when you have the Motif or Athena Otherwise, if you are using Motif, when you have the Motif files in a
files in a directory where configure doesn't look, edit the Makefile to enter directory where configure doesn't look, edit the Makefile to enter the names
the names of the directories. Search for "GUI_INC_LOC" for an example to set of the directories. Search for "GUI_INC_LOC" for an example to set
the Motif directories, "CONF_OPT_X" for Athena. the Motif directories.
*gui-x11-gtk* *gui-x11-gtk*
Currently, Vim supports both GTK+ 2 and GTK+ 3. Currently, Vim supports both GTK+ 2 and GTK+ 3.
@@ -643,18 +638,11 @@ few problems, but you might make it compile and run with a bit of work, please
send me the patches if you do). The newest releases of LessTif have been send me the patches if you do). The newest releases of LessTif have been
reported to work fine too. reported to work fine too.
*gui-x11-athena* *gui-x11-athena* *gui-x11-neXtaw*
The Athena version uses the Xaw widget set by default. If you have the 3D Support for the Athena GUI and neXtaw was removed in patch 8.2.4677.
version, you might want to link with Xaw3d instead. This will make the
menus look a bit better. Edit the Makefile and look for "XAW_LIB". The
scrollbars will remain the same, because Vim has its own, which are already
3D (in fact, they look more like Motif).
*gui-x11-neXtaw*
The neXtaw version is mostly like Athena, but uses different widgets.
*gui-x11-misc* *gui-x11-misc*
In general, do not try to mix files from different GTK+, Motif, Athena and X11 In general, do not try to mix files from different GTK+, Motif and X11
versions. This will cause problems. For example, using header files for versions. This will cause problems. For example, using header files for
X11R5 with a library for X11R6 probably doesn't work (although the linking X11R5 with a library for X11R6 probably doesn't work (although the linking
won't give an error message, Vim will crash later). won't give an error message, Vim will crash later).

View File

@@ -1,4 +1,4 @@
*help.txt* For Vim version 8.2. Last change: 2021 Dec 27 *help.txt* For Vim version 8.2. Last change: 2022 Feb 26
VIM - main help file VIM - main help file
k k
@@ -197,6 +197,7 @@ Versions ~
|version6.txt| Differences between Vim version 5.7 and 6.x |version6.txt| Differences between Vim version 5.7 and 6.x
|version7.txt| Differences between Vim version 6.4 and 7.x |version7.txt| Differences between Vim version 6.4 and 7.x
|version8.txt| Differences between Vim version 7.4 and 8.x |version8.txt| Differences between Vim version 7.4 and 8.x
|version9.txt| Differences between Vim version 8.2 and 9.0
*sys-file-list* *sys-file-list*
Remarks about specific systems ~ Remarks about specific systems ~
|os_390.txt| OS/390 Unix |os_390.txt| OS/390 Unix

View File

@@ -1,4 +1,4 @@
*if_perl.txt* For Vim version 8.2. Last change: 2022 Jan 08 *if_perl.txt* For Vim version 8.2. Last change: 2022 Mar 13
VIM REFERENCE MANUAL by Sven Verdoolaege VIM REFERENCE MANUAL by Sven Verdoolaege
@@ -22,9 +22,9 @@ line of a file, regardless of the filename suffix, to check if a file is a
Perl script (see scripts.vim in Vim's syntax directory). Vim assumes a file Perl script (see scripts.vim in Vim's syntax directory). Vim assumes a file
is POD text if the filename has a .POD suffix. is POD text if the filename has a .POD suffix.
To use tags with Perl, you need a recent version of Exuberant ctags. Look To use tags with Perl, you need Universal/Exuberant Ctags. Look here:
here: Universal Ctags (preferred): https://ctags.io
http://ctags.sourceforge.net Exuberant Ctags: http://ctags.sourceforge.net
Alternatively, you can use the Perl script pltags.pl, which is shipped with Alternatively, you can use the Perl script pltags.pl, which is shipped with
Vim in the $VIMRUNTIME/tools directory. This script has currently more Vim in the $VIMRUNTIME/tools directory. This script has currently more
@@ -103,7 +103,7 @@ Here are some things you can try: >
:perldo $_ = reverse($_);1 :perldo $_ = reverse($_);1
:perl VIM::Msg("hello") :perl VIM::Msg("hello")
:perl $line = $curbuf->Get(42) :perl $line = $curbuf->Get(42)
< < *E299*
Executing Perl commands in the |sandbox| is limited. ":perldo" will not be 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 at all. ":perl" will be evaluated in the Safe environment, if
possible. possible.

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 8.2. Last change: 2021 Nov 12 *if_pyth.txt* For Vim version 8.2. Last change: 2022 Feb 22
VIM REFERENCE MANUAL by Paul Moore VIM REFERENCE MANUAL by Paul Moore
@@ -25,6 +25,10 @@ The Python 3 interface is available only when Vim was compiled with the
|+python3| feature. |+python3| feature.
Both can be available at the same time, but read |python-2-and-3|. Both can be available at the same time, but read |python-2-and-3|.
NOTE: Python 2 is old and no longer being developed. Using Python 3 is highly
recommended. Python 2 support will be dropped when it does not work properly
anymore.
============================================================================== ==============================================================================
1. Commands *python-commands* 1. Commands *python-commands*
@@ -65,7 +69,7 @@ There is no need to import sys, it's done by default.
*python-environment* *python-environment*
Environment variables set in Vim are not always available in Python. This Environment variables set in Vim are not always available in Python. This
depends on how Vim and Python were build. Also see depends on how Vim and Python were built. Also see
https://docs.python.org/3/library/os.html#os.environ https://docs.python.org/3/library/os.html#os.environ
Note: Python is very sensitive to the indenting. Make sure the "class" line Note: Python is very sensitive to the indenting. Make sure the "class" line
@@ -834,6 +838,19 @@ To work around such problems there are these options:
Raising SystemExit exception in python isn't endorsed way to quit vim, use: > Raising SystemExit exception in python isn't endorsed way to quit vim, use: >
:py vim.command("qall!") :py vim.command("qall!")
< <
*E1266*
This error can occur when python 3 cannot load the required modules. This
means that your python 3 is not correctly installed or there are some mistakes
in your settings. Please check the following items:
1. Make sure that python 3 is correctly installed. Also check the version of
python.
2. Check the 'pythonthreedll' option.
3. Check the 'pythonthreehome' option.
4. Check the PATH environment variable if you don't set 'pythonthreedll'.
On MS-Windows, you can use where.exe to check which dll will be loaded.
E.g. >
where.exe python310.dll
5. Check the PYTHONPATH and PYTHONHOME environment variables.
*has-python* *has-python*
You can test what Python version is available with: > You can test what Python version is available with: >
@@ -910,7 +927,7 @@ The `:pyxdo` command works similar to `:pydo`.
*has-pythonx* *has-pythonx*
You can test if pyx* commands are available with: > You can test if pyx* commands are available with: >
if has('pythonx') if has('pythonx')
echo 'pyx* commands are available. (Python ' . &pyx . ')' echo 'pyx* commands are available. (Python ' .. &pyx .. ')'
endif endif
When compiled with only one of |+python| or |+python3|, the has() returns 1. When compiled with only one of |+python| or |+python3|, the has() returns 1.

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 Apr 07
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -42,11 +42,12 @@ is not a C compiler: it does not recognize all syntax. One requirement is
that toplevel functions have a '{' in the first column. Otherwise they are that toplevel functions have a '{' in the first column. Otherwise they are
easily confused with declarations. easily confused with declarations.
These four options control C program indenting: These five options control C program indenting:
'cindent' Enables Vim to perform C program indenting automatically. 'cindent' Enables Vim to perform C program indenting automatically.
'cinkeys' Specifies which keys trigger reindenting in insert mode. 'cinkeys' Specifies which keys trigger reindenting in insert mode.
'cinoptions' Sets your preferred indent style. 'cinoptions' Sets your preferred indent style.
'cinwords' Defines keywords that start an extra indent in the next line. 'cinwords' Defines keywords that start an extra indent in the next line.
'cinscopedecls' Defines strings that are recognized as a C++ scope declaration.
If 'lisp' is not on and 'equalprg' is empty, the "=" operator indents using If 'lisp' is not on and 'equalprg' is empty, the "=" operator indents using
Vim's built-in algorithm rather than calling an external program. Vim's built-in algorithm rather than calling an external program.
@@ -293,8 +294,9 @@ The examples below assume a 'shiftwidth' of 4.
< <
*cino-g* *cino-g*
gN Place C++ scope declarations N characters from the indent of the gN Place C++ scope declarations N characters from the indent of the
block they are in. (default 'shiftwidth'). A scope declaration block they are in. (default 'shiftwidth'). By default, a scope
can be "public:", "protected:" or "private:". declaration is "public:", "protected:" or "private:". This can
be adjusted with the 'cinscopedecls' option.
cino= cino=g0 > cino= cino=g0 >
{ { { {
@@ -778,6 +780,15 @@ You can set the indent for the first line after <script> and <style>
"auto" auto indent (same indent as the blocktag) "auto" auto indent (same indent as the blocktag)
"inc" auto indent + one indent step "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 Many tags increase the indent for what follows per default (see "Add Indent
Tags" in the script). You can add further tags with: > Tags" in the script). You can add further tags with: >

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 Mar 05
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -937,7 +937,9 @@ tag command note action in Visual mode ~
before the highlighted area before the highlighted area
|v_J| J 2 join the highlighted lines |v_J| J 2 join the highlighted lines
|v_K| K run 'keywordprg' on the highlighted area |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; registers are unchanged
Q does not start Ex mode Q does not start Ex mode
|v_R| R 2 delete the highlighted lines and start |v_R| R 2 delete the highlighted lines and start
insert 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_i}| i} same as iB |v_i}| i} same as iB
|v_o| o move cursor to other corner of area |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_r| r 2 replace highlighted area with a character
|v_s| s 2 delete highlighted area and start insert |v_s| s 2 delete highlighted area and start insert
|v_u| u 2 make highlighted area lowercase |v_u| u 2 make highlighted area lowercase
@@ -1148,7 +1152,7 @@ tag command action ~
|:&| :& repeat last ":substitute" |:&| :& repeat last ":substitute"
|:star| :* execute contents of a register |:star| :* execute contents of a register
|:<| :< shift lines one 'shiftwidth' left |:<| :< shift lines one 'shiftwidth' left
|:=| := print the cursor line number |:=| := print the last line number
|:>| :> shift lines one 'shiftwidth' right |:>| :> shift lines one 'shiftwidth' right
|:@| :@ execute contents of a register |:@| :@ execute contents of a register
|:@@| :@@ repeat the previous ":@" |:@@| :@@ repeat the previous ":@"
@@ -1166,7 +1170,7 @@ tag command action ~
be remapped be remapped
|:args| :ar[gs] print the argument list |:args| :ar[gs] print the argument list
|:argadd| :arga[dd] add items to the argument list |:argadd| :arga[dd] add items to the argument list
:argdedupe :argdedupe remove duplicates from the argument list |:argdedupe| :argded[upe] remove duplicates from the argument list
|:argdelete| :argd[elete] delete items 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 |:argedit| :arge[dit] add item to the argument list and edit it
|:argdo| :argdo do a command on all items in the argument list |: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 Dec 29 *insert.txt* For Vim version 8.2. Last change: 2022 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -272,7 +272,7 @@ CTRL-] Trigger abbreviation, without inserting a character.
*i_backspacing* *i_backspacing*
The effect of the <BS>, CTRL-W, and CTRL-U depend on the 'backspace' option The effect of the <BS>, CTRL-W, and CTRL-U depend on the 'backspace' option
(unless 'revins' is set). This is a comma separated list of items: (unless 'revins' is set). This is a comma-separated list of items:
item action ~ item action ~
indent allow backspacing over autoindent indent allow backspacing over autoindent
@@ -283,8 +283,8 @@ start allow backspacing over the start position of insert; CTRL-W and
When 'backspace' is empty, Vi compatible backspacing is used. You cannot When 'backspace' is empty, Vi compatible backspacing is used. You cannot
backspace over autoindent, before column 1 or before where insert started. backspace over autoindent, before column 1 or before where insert started.
For backwards compatibility the values "0", "1" and "2" are also allowed, see For backwards compatibility the values "0", "1", "2" and "3" are also allowed,
|'backspace'|. see |'backspace'|.
If the 'backspace' option does contain "eol" and the cursor is in column 1 If the 'backspace' option does contain "eol" and the cursor is in column 1
when one of the three keys is used, the current line is joined with the when one of the three keys is used, the current line is joined with the
@@ -800,7 +800,7 @@ If the previous expansion was split, because it got longer than 'textwidth',
then just the text in the current line will be used. then just the text in the current line will be used.
If the match found is at the end of a line, then the first word in the next If the match found is at the end of a line, then the first word in the next
line will be inserted and the message "word from next line" displayed, if line will be inserted and the message "Word from other line" displayed, if
this word is accepted the next CTRL-X CTRL-P or CTRL-X CTRL-N will search this word is accepted the next CTRL-X CTRL-P or CTRL-X CTRL-N will search
for those lines starting with this word. for those lines starting with this word.
@@ -818,6 +818,7 @@ CTRL-X CTRL-K Search the files given with the 'dictionary' option
the 'dictionary' option is empty. the 'dictionary' option is empty.
For suggestions where to find a list of words, see the For suggestions where to find a list of words, see the
'dictionary' option. 'dictionary' option.
'ignorecase', 'smartcase' and 'infercase' apply.
CTRL-K or CTRL-K or
CTRL-N Search forward for next matching keyword. This CTRL-N Search forward for next matching keyword. This
@@ -879,9 +880,9 @@ Groß): >
endif endif
let res = [] let res = []
let h = '' let h = ''
for l in systemlist('aiksaurus '.shellescape(a:base)) for l in systemlist('aiksaurus ' .. shellescape(a:base))
if l[:3] == '=== ' if l[:3] == '=== '
let h = '('.substitute(l[4:], ' =*$', ')', '') let h = '(' .. substitute(l[4:], ' =*$', ')', '')
elseif l ==# 'Alphabetically similar known words are: ' elseif l ==# 'Alphabetically similar known words are: '
let h = "\U0001f52e" let h = "\U0001f52e"
elseif l[0] =~ '\a' || (h ==# "\U0001f52e" && l[0] ==# "\t") elseif l[0] =~ '\a' || (h ==# "\U0001f52e" && l[0] ==# "\t")
@@ -1195,7 +1196,7 @@ three lines, but 'previewheight' is used when it has a value of 1 or 2.
*complete-popup* *complete-popup*
When "popup" is in 'completeopt' a popup window is used to display the "info". When "popup" is in 'completeopt' a popup window is used to display the "info".
Then the 'completepopup' option specifies the properties of the popup. This Then the 'completepopup' option specifies the properties of the popup. This
is used when the info popup is created. The option is a comma separated list is used when the info popup is created. The option is a comma-separated list
of values: of values:
height maximum height of the popup height maximum height of the popup
width maximum width of the popup width maximum width of the popup
@@ -1266,7 +1267,7 @@ An example that completes the names of the months: >
" find months matching with "a:base" " find months matching with "a:base"
let res = [] let res = []
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec") for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
if m =~ '^' . a:base if m =~ '^' .. a:base
call add(res, m) call add(res, m)
endif endif
endfor endfor
@@ -1288,7 +1289,7 @@ The same, but now pretending searching for matches is slow: >
else else
" find months matching with "a:base" " find months matching with "a:base"
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec") for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
if m =~ '^' . a:base if m =~ '^' .. a:base
call complete_add(m) call complete_add(m)
endif endif
sleep 300m " simulate searching for next match sleep 300m " simulate searching for next match
@@ -1408,11 +1409,16 @@ in 'runtimepath'. Thus for "java" it is autoload/javacomplete.vim.
C *ft-c-omni* C *ft-c-omni*
Completion of C code requires a tags file. You should use Exuberant ctags, Completion of C code requires a tags file. You should use Universal/
because it adds extra information that is needed for completion. You can find Exuberant ctags, because it adds extra information that is needed for
it here: http://ctags.sourceforge.net/ Version 5.6 or later is recommended. completion. You can find it here:
Universal Ctags: https://ctags.io
Exuberant Ctags: http://ctags.sourceforge.net
For version 5.5.4 you should add a patch that adds the "typename:" field: Universal Ctags is preferred, Exuberant Ctags is no longer being developed.
For Exuberant ctags, version 5.6 or later is recommended. For version 5.5.4
you should add a patch that adds the "typename:" field:
ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch
A compiled .exe for MS-Windows can be found at: A compiled .exe for MS-Windows can be found at:
http://ctags.sourceforge.net/ http://ctags.sourceforge.net/
@@ -1533,8 +1539,11 @@ will be suggested. All other elements are not placed in suggestion list.
PHP *ft-php-omni* PHP *ft-php-omni*
Completion of PHP code requires a tags file for completion of data from Completion of PHP code requires a tags file for completion of data from
external files and for class aware completion. You should use Exuberant ctags external files and for class aware completion. You should use Universal/
version 5.5.4 or newer. You can find it here: http://ctags.sourceforge.net/ Exuberant ctags version 5.5.4 or newer. You can find it here:
Universal Ctags: https://ctags.io
Exuberant Ctags: http://ctags.sourceforge.net
Script completes: Script completes:

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 8.2. Last change: 2021 Sep 29 *intro.txt* For Vim version 8.2. Last change: 2022 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -213,7 +213,7 @@ Vim would never have become what it is now, without the help of these people!
Daniel Elstner GTK+ 2 port Daniel Elstner GTK+ 2 port
Eric Fischer Mac port, 'cindent', and other improvements Eric Fischer Mac port, 'cindent', and other improvements
Benji Fisher Answering lots of user questions Benji Fisher Answering lots of user questions
Bill Foster Athena GUI port Bill Foster Athena GUI port (later removed)
Google Lets me work on Vim one day a week Google Lets me work on Vim one day a week
Loic Grenie xvim (ideas for multi windows version) Loic Grenie xvim (ideas for multi windows version)
Sven Guckes Vim promoter and previous WWW page maintainer Sven Guckes Vim promoter and previous WWW page maintainer
@@ -701,7 +701,8 @@ Q Switch to "Ex" mode. This is a bit like typing ":"
Use the ":vi" command |:visual| to exit "Ex" mode. Use the ":vi" command |:visual| to exit "Ex" mode.
Note: In older versions of Vim "Q" formatted text, Note: In older versions of Vim "Q" formatted text,
that is now done with |gq|. But if you use the that is now done with |gq|. But if you use the
|vimrc_example.vim| script "Q" works like "gq". |vimrc_example.vim| script or |defaults.vim|, "Q"
works like "gq". Except for Select mode.
*gQ* *gQ*
gQ Switch to "Ex" mode like with "Q", but really behave gQ Switch to "Ex" mode like with "Q", but really behave

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 8.2. Last change: 2022 Jan 23 *map.txt* For Vim version 8.2. Last change: 2022 Apr 14
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -80,6 +80,8 @@ modes.
where the map command applies. Disallow mapping of where the map command applies. Disallow mapping of
{rhs}, to avoid nested and recursive mappings. Often {rhs}, to avoid nested and recursive mappings. Often
used to redefine a command. used to redefine a command.
Note: When <Plug> appears in the {rhs} this part is
always applied even if remapping is disallowed.
:unm[ap] {lhs} |mapmode-nvo| *:unm* *:unmap* :unm[ap] {lhs} |mapmode-nvo| *:unm* *:unmap*
@@ -314,7 +316,7 @@ Here is an example that inserts a list number that increases: >
func ListItem() func ListItem()
let g:counter += 1 let g:counter += 1
return g:counter . '. ' return g:counter .. '. '
endfunc endfunc
func ListReset() func ListReset()
@@ -387,7 +389,7 @@ contain special characters like function keys.
1.3 MAPPING AND MODES *:map-modes* 1.3 MAPPING AND MODES *:map-modes*
*mapmode-nvo* *mapmode-n* *mapmode-v* *mapmode-o* *mapmode-nvo* *mapmode-n* *mapmode-v* *mapmode-o*
There are six sets of mappings There are seven sets of mappings
- For Normal mode: When typing commands. - For Normal mode: When typing commands.
- For Visual mode: When typing commands while the Visual area is highlighted. - For Visual mode: When typing commands while the Visual area is highlighted.
- For Select mode: like Visual mode but typing text replaces the selection. - For Select mode: like Visual mode but typing text replaces the selection.
@@ -395,6 +397,7 @@ There are six sets of mappings
etc.). See below: |omap-info|. etc.). See below: |omap-info|.
- For Insert mode. These are also used in Replace mode. - For Insert mode. These are also used in Replace mode.
- For Command-line mode: When entering a ":" or "/" command. - For Command-line mode: When entering a ":" or "/" command.
- For Terminal mode: When typing in a |:terminal| buffer.
Special case: While typing a count for a command in Normal mode, mapping zero Special case: While typing a count for a command in Normal mode, mapping zero
is disabled. This makes it possible to map zero without making it impossible is disabled. This makes it possible to map zero without making it impossible
@@ -694,6 +697,10 @@ The special key name "<Plug>" can be used for an internal mapping, which is
not to be matched with any key sequence. This is useful in plugins not to be matched with any key sequence. This is useful in plugins
|using-<Plug>|. |using-<Plug>|.
*<MouseMove>*
The special key name "<MouseMove>" can be used to handle mouse movement. It
needs to be enabled with 'mousemoveevent'. Currently only works in the GUI.
*<Char>* *<Char->* *<Char>* *<Char->*
To map a character by its decimal, octal or hexadecimal number the <Char> To map a character by its decimal, octal or hexadecimal number the <Char>
construct can be used: construct can be used:
@@ -1317,7 +1324,8 @@ underscore. Example: >
could define a mapping "<SNR>23_Add". could define a mapping "<SNR>23_Add".
When defining a function in a script, "s:" can be prepended to the name to When defining a function in a script, "s:" can be prepended to the name to
make it local to the script. But when a mapping is executed from outside of make it local to the script (in |Vim9| script functions without a prefix are
local to the script). But when a mapping is executed from outside of
the script, it doesn't know in which script the function was defined. To the script, it doesn't know in which script the function was defined. To
avoid this problem, use "<SID>" instead of "s:". The same translation is done avoid this problem, use "<SID>" instead of "s:". The same translation is done
as for mappings. This makes it possible to define a call to the function in as for mappings. This makes it possible to define a call to the function in
@@ -1444,7 +1452,7 @@ See |:verbose-cmd| for more information.
Command attributes ~ Command attributes ~
*command-attributes*
User-defined commands are treated by Vim just like any other Ex commands. They User-defined commands are treated by Vim just like any other Ex commands. They
can have arguments, or have a range specified. Arguments are subject to can have arguments, or have a range specified. Arguments are subject to
completion as filenames, buffers, etc. Exactly how this works depends upon the completion as filenames, buffers, etc. Exactly how this works depends upon the
@@ -1561,9 +1569,11 @@ The function arguments are:
The function may use these for determining context. For the "custom" The function may use these for determining context. For the "custom"
argument, it is not necessary to filter candidates against the (implicit argument, it is not necessary to filter candidates against the (implicit
pattern in) ArgLead. Vim will filter the candidates with its regexp engine pattern in) ArgLead. Vim will filter the candidates with its regexp engine
after function return, and this is probably more efficient in most cases. For after function return, and this is probably more efficient in most cases. If
the "customlist" argument, Vim will not filter the returned completion 'wildoptions' contains "fuzzy", then the candidates will be filtered using
candidates and the user supplied function should filter the candidates. |fuzzy-matching|. For the "customlist" argument, Vim will not
filter the returned completion candidates and the user supplied function
should filter the candidates.
The following example lists user names to a Finger command > The following example lists user names to a Finger command >
:com -complete=custom,ListUsers -nargs=1 Finger !finger <args> :com -complete=custom,ListUsers -nargs=1 Finger !finger <args>
@@ -1697,12 +1707,12 @@ The valid escape sequences are
Examples: > Examples: >
command! -nargs=+ -complete=file MyEdit command! -nargs=+ -complete=file MyEdit
\ for f in expand(<q-args>, 0, 1) | \ for f in expand(<q-args>, 0, 1) |
\ exe '<mods> split ' . f | \ exe '<mods> split ' .. f |
\ endfor \ endfor
function! SpecialEdit(files, mods) function! SpecialEdit(files, mods)
for f in expand(a:files, 0, 1) for f in expand(a:files, 0, 1)
exe a:mods . ' split ' . f exe a:mods .. ' split ' .. f
endfor endfor
endfunction endfunction
command! -nargs=+ -complete=file Sedit command! -nargs=+ -complete=file Sedit
@@ -1778,7 +1788,7 @@ This will invoke: >
: let i = 0 : let i = 0
: while i < argc() : while i < argc()
: if filereadable(argv(i)) : if filereadable(argv(i))
: execute "e " . argv(i) : execute "e " .. argv(i)
: execute a:command : execute a:command
: endif : endif
: let i = i + 1 : let i = i + 1

View File

@@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 8.2. Last change: 2022 Jan 20 *mbyte.txt* For Vim version 8.2. Last change: 2022 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar et al. VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -702,7 +702,7 @@ USING RESOURCE FILES
Instead of specifying 'guifontset', you can set X11 resources and Vim will Instead of specifying 'guifontset', you can set X11 resources and Vim will
pick them up. This is only for people who know how X resource files work. pick them up. This is only for people who know how X resource files work.
For Motif and Athena insert these three lines in your $HOME/.Xdefaults file: For Motif insert these three lines in your $HOME/.Xdefaults file:
Vim.font: |base_font_name_list| Vim.font: |base_font_name_list|
Vim*fontSet: |base_font_name_list| Vim*fontSet: |base_font_name_list|
@@ -1280,7 +1280,7 @@ internally.
Vim has comprehensive UTF-8 support. It works well in: Vim has comprehensive UTF-8 support. It works well in:
- xterm with UTF-8 support enabled - xterm with UTF-8 support enabled
- Athena, Motif and GTK GUI - Motif and GTK GUI
- MS-Windows GUI - MS-Windows GUI
- several other platforms - several other platforms

View File

@@ -1,4 +1,4 @@
*message.txt* For Vim version 8.2. Last change: 2022 Jan 19 *message.txt* For Vim version 8.2. Last change: 2022 Jan 26
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -82,7 +82,6 @@ LIST OF MESSAGES
Add to read buffer ~ Add to read buffer ~
makemap: Illegal mode ~ makemap: Illegal mode ~
Cannot create BalloonEval with both message and callback ~ Cannot create BalloonEval with both message and callback ~
Hangul automata ERROR ~
block was not locked ~ block was not locked ~
Didn't get block nr {N}? ~ Didn't get block nr {N}? ~
ml_upd_block0(): Didn't get block 0?? ~ ml_upd_block0(): Didn't get block 0?? ~
@@ -92,12 +91,12 @@ LIST OF MESSAGES
u_undo: line numbers wrong ~ u_undo: line numbers wrong ~
undo list corrupt ~ undo list corrupt ~
undo line missing ~ undo line missing ~
ml_get: cannot find line {N} ~ ml_get: cannot find line {N} in buffer {nr} {name} ~
cannot find line {N} ~
line number out of range: {N} past the end ~ line number out of range: {N} past the end ~
line count wrong in block {N} ~ line count wrong in block {N} ~
Internal error ~ Internal error: lalloc(0, ) ~
Internal error: {function} ~ Internal error: {function} ~
Internal error in regexp ~
fatal error in cs_manage_matches ~ fatal error in cs_manage_matches ~
Invalid count for del_bytes(): {N} ~ Invalid count for del_bytes(): {N} ~
@@ -728,6 +727,7 @@ specified.
*E488* *E488*
Trailing characters ~ Trailing characters ~
Trailing characters: {text} ~
An argument has been added to an Ex command that does not permit one. 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. Or the argument has invalid characters and has not been recognized.
@@ -798,7 +798,7 @@ This is an (incomplete) overview of various messages that Vim gives:
*hit-enter* *press-enter* *hit-return* *hit-enter* *press-enter* *hit-return*
*press-return* *hit-enter-prompt* *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, This message is given when there is something on the screen for you to read,
and the screen is about to be redrawn: and the screen is about to be redrawn:

View File

@@ -1,4 +1,4 @@
*motion.txt* For Vim version 8.2. Last change: 2021 Dec 27 *motion.txt* For Vim version 8.2. Last change: 2022 Apr 18
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -33,7 +33,8 @@ know what the hjkl keys do. The mnemonic value of hjkl is clear from looking
at the keyboard. Think of j as an arrow pointing downwards. at the keyboard. Think of j as an arrow pointing downwards.
The 'virtualedit' option can be set to make it possible to move the cursor to The 'virtualedit' option can be set to make it possible to move the cursor to
positions where there is no character or halfway a character. positions where there is no character or within a multi-column character (like
a tab).
============================================================================== ==============================================================================
1. Motions and operators *operator* 1. Motions and operators *operator*
@@ -445,35 +446,35 @@ between Vi and Vim.
5. Text object motions *object-motions* 5. Text object motions *object-motions*
*(* *(*
( [count] sentences backward. |exclusive| motion. ( [count] |sentence|s backward. |exclusive| motion.
*)* *)*
) [count] sentences forward. |exclusive| motion. ) [count] |sentence|s forward. |exclusive| motion.
*{* *{*
{ [count] paragraphs backward. |exclusive| motion. { [count] |paragraph|s backward. |exclusive| motion.
*}* *}*
} [count] paragraphs forward. |exclusive| motion. } [count] |paragraph|s forward. |exclusive| motion.
*]]* *]]*
]] [count] sections forward or to the next '{' in the ]] [count] |section|s forward or to the next '{' in the
first column. When used after an operator, then also first column. When used after an operator, then also
stops below a '}' in the first column. |exclusive| stops below a '}' in the first column. |exclusive|
Note that |exclusive-linewise| often applies. Note that |exclusive-linewise| often applies.
*][* *][*
][ [count] sections forward or to the next '}' in the ][ [count] |section|s forward or to the next '}' in the
first column. |exclusive| first column. |exclusive|
Note that |exclusive-linewise| often applies. Note that |exclusive-linewise| often applies.
*[[* *[[*
[[ [count] sections backward or to the previous '{' in [[ [count] |section|s backward or to the previous '{' in
the first column. |exclusive| the first column. |exclusive|
Note that |exclusive-linewise| often applies. Note that |exclusive-linewise| often applies.
*[]* *[]*
[] [count] sections backward or to the previous '}' in [] [count] |section|s backward or to the previous '}' in
the first column. |exclusive| the first column. |exclusive|
Note that |exclusive-linewise| often applies. Note that |exclusive-linewise| often applies.
@@ -1019,7 +1020,7 @@ These commands are not marks themselves, but jump to a mark:
:let lnum = line(".") :let lnum = line(".")
:keepjumps normal gg :keepjumps normal gg
:call SetLastChange() :call SetLastChange()
:keepjumps exe "normal " . lnum . "G" :keepjumps exe "normal " .. lnum .. "G"
< <
Note that ":keepjumps" must be used for every command. Note that ":keepjumps" must be used for every command.
When invoking a function the commands in that function When invoking a function the commands in that function
@@ -1076,6 +1077,9 @@ The "file/text" column shows the file name, or the text at the jump if it is
in the current file (an indent is removed and a long line is truncated to fit in the current file (an indent is removed and a long line is truncated to fit
in the window). in the window).
The marker ">" indicates the current position in the jumplist. It may not be
shown when filtering the |:jumps| command using |:filter|
You are currently in line 1167. If you then use the CTRL-O command, the You are currently in line 1167. If you then use the CTRL-O command, the
cursor is put in line 1154. This results in: cursor is put in line 1154. This results in:

View File

@@ -1,4 +1,4 @@
*netbeans.txt* For Vim version 8.2. Last change: 2020 Nov 02 *netbeans.txt* For Vim version 8.2. Last change: 2022 Apr 03
VIM REFERENCE MANUAL by Gordon Prieur et al. VIM REFERENCE MANUAL by Gordon Prieur et al.
@@ -124,12 +124,12 @@ In case you do not want the NetBeans interface you can disable it by
uncommenting a line with "--disable-netbeans" in the Makefile. uncommenting a line with "--disable-netbeans" in the Makefile.
Currently the NetBeans interface is supported by Vim running in a terminal and Currently the NetBeans interface is supported by Vim running in a terminal and
by gvim when it is run with one of the following GUIs: GTK, GNOME, Windows, by gvim when it is run with one of the following GUIs: GTK, GNOME, Windows
Athena and Motif. and Motif.
*netbeans-xpm* *netbeans-xpm*
If Motif support is required the user must supply XPM libraries. If Motif support is required the user must supply XPM libraries.
The XPM library is required to show images within Vim with Motif or Athena. The XPM library is required to show images within Vim with Motif.
Without it the toolbar and signs will be disabled. Without it the toolbar and signs will be disabled.
The XPM library is provided by Arnaud Le Hors of the French National Institute The XPM library is provided by Arnaud Le Hors of the French National Institute

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.2. Last change: 2022 Jan 22 *options.txt* For Vim version 8.2. Last change: 2022 May 07
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -87,7 +87,7 @@ achieve special effects. These options come in three forms:
:se[t] {option}+={value} *:set+=* :se[t] {option}+={value} *:set+=*
Add the {value} to a number option, or append the Add the {value} to a number option, or append the
{value} to a string option. When the option is a {value} to a string option. When the option is a
comma separated list, a comma is added, unless the comma-separated list, a comma is added, unless the
value was empty. value was empty.
If the option is a list of flags, superfluous flags If the option is a list of flags, superfluous flags
are removed. When adding a flag that was already are removed. When adding a flag that was already
@@ -97,7 +97,7 @@ achieve special effects. These options come in three forms:
:se[t] {option}^={value} *:set^=* :se[t] {option}^={value} *:set^=*
Multiply the {value} to a number option, or prepend Multiply the {value} to a number option, or prepend
the {value} to a string option. When the option is a the {value} to a string option. When the option is a
comma separated list, a comma is added, unless the comma-separated list, a comma is added, unless the
value was empty. value was empty.
Also see |:set-args| above. Also see |:set-args| above.
@@ -383,12 +383,22 @@ lambda it will be converted to the name, e.g. "<lambda>123". Examples:
set opfunc=function('MyOpFunc') set opfunc=function('MyOpFunc')
set opfunc=funcref('MyOpFunc') set opfunc=funcref('MyOpFunc')
set opfunc={a\ ->\ MyOpFunc(a)} set opfunc={a\ ->\ MyOpFunc(a)}
" set using a funcref variable
Set to a script-local function: >
set opfunc=s:MyLocalFunc
set opfunc=<SID>MyLocalFunc
In |Vim9| script the "s:" and "<SID>" can be omitted if the function exists in
the script: >
set opfunc=MyLocalFunc
Set using a funcref variable: >
let Fn = function('MyTagFunc') let Fn = function('MyTagFunc')
let &tagfunc = Fn let &tagfunc = Fn
" set using a lambda expression
Set using a lambda expression: >
let &tagfunc = {t -> MyTagFunc(t)} let &tagfunc = {t -> MyTagFunc(t)}
" set using a variable with lambda expression
Set using a variable with lambda expression: >
let L = {a, b, c -> MyTagFunc(a, b , c)} let L = {a, b, c -> MyTagFunc(a, b , c)}
let &tagfunc = L let &tagfunc = L
@@ -800,6 +810,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 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 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. /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'* *'noarabic'* *'noarab'*
'arabic' 'arab' boolean (default off) 'arabic' 'arab' boolean (default off)
@@ -976,7 +987,8 @@ A jump table for the options with a short description can be found at |Q_op|.
nostop like start, except CTRL-W and CTRL-U do not stop at the start of nostop like start, except CTRL-W and CTRL-U do not stop at the start of
insert. insert.
When the value is empty, Vi compatible backspacing is used. When the value is empty, Vi compatible backspacing is used, none of
the ways mentioned for the items above are possible.
For backwards compatibility with version 5.4 and earlier: For backwards compatibility with version 5.4 and earlier:
value effect ~ value effect ~
@@ -1007,7 +1019,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'backupcopy' 'bkc' string (Vi default for Unix: "yes", otherwise: "auto") 'backupcopy' 'bkc' string (Vi default for Unix: "yes", otherwise: "auto")
global or local to buffer |global-local| global or local to buffer |global-local|
When writing a file and a backup is made, this option tells how it's When writing a file and a backup is made, this option tells how it's
done. This is a comma separated list of words. done. This is a comma-separated list of words.
The main values are: The main values are:
"yes" make a copy of the file and overwrite the original one "yes" make a copy of the file and overwrite the original one
@@ -1031,10 +1043,10 @@ A jump table for the options with a short description can be found at |Q_op|.
file. file.
- When the file is a link the new file will not be a link. - When the file is a link the new file will not be a link.
The "auto" value is the middle way: When Vim sees that renaming file The "auto" value is the middle way: When Vim sees that renaming the
is possible without side effects (the attributes can be passed on and file is possible without side effects (the attributes can be passed on
the file is not a link) that is used. When problems are expected, a and the file is not a link) that is used. When problems are expected,
copy will be made. a copy will be made.
The "breaksymlink" and "breakhardlink" values can be used in The "breaksymlink" and "breakhardlink" values can be used in
combination with any of "yes", "no" and "auto". When included, they combination with any of "yes", "no" and "auto". When included, they
@@ -1053,13 +1065,13 @@ A jump table for the options with a short description can be found at |Q_op|.
When a copy is made, the original file is truncated and then filled When a copy is made, the original file is truncated and then filled
with the new text. This means that protection bits, owner and with the new text. This means that protection bits, owner and
symbolic links of the original file are unmodified. The backup file symbolic links of the original file are unmodified. The backup file,
however, is a new file, owned by the user who edited the file. The however, is a new file, owned by the user who edited the file. The
group of the backup is set to the group of the original file. If this group of the backup is set to the group of the original file. If this
fails, the protection bits for the group are made the same as for fails, the protection bits for the group are made the same as for
others. others.
When the file is renamed this is the other way around: The backup has When the file is renamed, this is the other way around: The backup has
the same attributes of the original file, and the newly written file the same attributes of the original file, and the newly written file
is owned by the current user. When the file was a (hard/symbolic) is owned by the current user. When the file was a (hard/symbolic)
link, the new file will not! That's why the "auto" value doesn't link, the new file will not! That's why the "auto" value doesn't
@@ -1126,12 +1138,12 @@ A jump table for the options with a short description can be found at |Q_op|.
accidentally overwriting existing files with a backup file. You might accidentally overwriting existing files with a backup file. You might
prefer using ".bak", but make sure that you don't have files with prefer using ".bak", but make sure that you don't have files with
".bak" that you want to keep. ".bak" that you want to keep.
Only normal file name characters can be used, "/\*?[|<>" are illegal. Only normal file name characters can be used; "/\*?[|<>" are illegal.
If you like to keep a lot of backups, you could use a BufWritePre If you like to keep a lot of backups, you could use a BufWritePre
autocommand to change 'backupext' just before writing the file to autocommand to change 'backupext' just before writing the file to
include a timestamp. > include a timestamp. >
:au BufWritePre * let &bex = '-' . strftime("%Y%b%d%X") . '~' :au BufWritePre * let &bex = '-' .. strftime("%Y%b%d%X") .. '~'
< Use 'backupdir' to put the backup in a different directory. < Use 'backupdir' to put the backup in a different directory.
*'backupskip'* *'bsk'* *'backupskip'* *'bsk'*
@@ -1156,7 +1168,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Note that environment variables are not expanded. If you want to use Note that environment variables are not expanded. If you want to use
$HOME you must expand it explicitly, e.g.: > $HOME you must expand it explicitly, e.g.: >
:let &backupskip = escape(expand('$HOME'), '\') . '/tmp/*' :let &backupskip = escape(expand('$HOME'), '\') .. '/tmp/*'
< Note that the default also makes sure that "crontab -e" works (when a < Note that the default also makes sure that "crontab -e" works (when a
backup would be made by renaming the original file crontab won't see backup would be made by renaming the original file crontab won't see
@@ -1207,10 +1219,10 @@ A jump table for the options with a short description can be found at |Q_op|.
The evaluation of the expression must not have side effects! The evaluation of the expression must not have side effects!
Example: > Example: >
function MyBalloonExpr() function MyBalloonExpr()
return 'Cursor is at line ' . v:beval_lnum . return 'Cursor is at line ' .. v:beval_lnum ..
\', column ' . v:beval_col . \ ', column ' .. v:beval_col ..
\ ' of file ' . bufname(v:beval_bufnr) . \ ' of file ' .. bufname(v:beval_bufnr) ..
\ ' on word "' . v:beval_text . '"' \ ' on word "' .. v:beval_text .. '"'
endfunction endfunction
set bexpr=MyBalloonExpr() set bexpr=MyBalloonExpr()
set ballooneval set ballooneval
@@ -1253,6 +1265,7 @@ A jump table for the options with a short description can be found at |Q_op|.
separated list of items. For each item that is present, the bell separated list of items. For each item that is present, the bell
will be silenced. This is most useful to specify specific events in will be silenced. This is most useful to specify specific events in
insert mode to be silenced. insert mode to be silenced.
You can also make it flash by using 'visualbell'.
item meaning when present ~ item meaning when present ~
all All events. all All events.
@@ -1278,6 +1291,7 @@ A jump table for the options with a short description can be found at |Q_op|.
register Unknown register after <C-R> in |Insert-mode|. register Unknown register after <C-R> in |Insert-mode|.
shell Bell from shell output |:!|. shell Bell from shell output |:!|.
spell Error happened on spell suggest. spell Error happened on spell suggest.
term Bell from |:terminal| output.
wildmode More matches in |cmdline-completion| available wildmode More matches in |cmdline-completion| available
(depends on the 'wildmode' setting). (depends on the 'wildmode' setting).
@@ -1378,19 +1392,25 @@ A jump table for the options with a short description can be found at |Q_op|.
characters. It permits dynamic French paragraph characters. It permits dynamic French paragraph
indentation (negative) or emphasizing the line indentation (negative) or emphasizing the line
continuation (positive). continuation (positive).
(default: 0)
sbr Display the 'showbreak' value before applying the sbr Display the 'showbreak' value before applying the
additional indent. additional indent.
(default: off)
list:{n} Adds an additional indent for lines that match a list:{n} Adds an additional indent for lines that match a
numbered or bulleted list (using the numbered or bulleted list (using the
'formatlistpat' setting). 'formatlistpat' setting).
list:-1 Uses the length of a match with 'formatlistpat' list:-1 Uses the length of a match with 'formatlistpat'
for indentation. for indentation.
The default value for min is 20, shift and list is 0. (default: 0)
column:{n} Indent at column {n}. Will overrule the other
sub-options. Note: an additional indent may be
added for the 'showbreak' setting.
(default: off)
*'browsedir'* *'bsdir'* *'browsedir'* *'bsdir'*
'browsedir' 'bsdir' string (default: "last") 'browsedir' 'bsdir' string (default: "last")
global global
{only for Motif, Athena, GTK, Mac and Win32 GUI} {only for Motif, GTK, Mac and Win32 GUI}
Which directory to use for the file browser: Which directory to use for the file browser:
last Use same directory as with last file browser, where a last Use same directory as with last file browser, where a
file was opened or saved. file was opened or saved.
@@ -1404,16 +1424,16 @@ A jump table for the options with a short description can be found at |Q_op|.
This option specifies what happens when a buffer is no longer This option specifies what happens when a buffer is no longer
displayed in a window: displayed in a window:
<empty> follow the global 'hidden' option <empty> follow the global 'hidden' option
hide hide the buffer (don't unload it), also when 'hidden' hide hide the buffer (don't unload it), even if 'hidden' is
is not set not set
unload unload the buffer, also when 'hidden' is set or using unload unload the buffer, even if 'hidden' is set; the
|:hide| |:hide| command will also unlod the buffer
delete delete the buffer from the buffer list, also when delete delete the buffer from the buffer list, even if
'hidden' is set or using |:hide|, like using 'hidden' is set; the |:hide| command will also delete
|:bdelete| the buffer, making it behave like |:bdelete|
wipe wipe out the buffer from the buffer list, also when wipe wipe the buffer from the buffer list, even if
'hidden' is set or using |:hide|, like using 'hidden' is set; the |:hide| command will also wipe
|:bwipeout| out the buffer, making it behave like |:bwipeout|
CAREFUL: when "unload", "delete" or "wipe" is used changes in a buffer CAREFUL: when "unload", "delete" or "wipe" is used changes in a buffer
are lost without a warning. Also, these values may break autocommands are lost without a warning. Also, these values may break autocommands
@@ -1526,7 +1546,7 @@ A jump table for the options with a short description can be found at |Q_op|.
If the default value taken from $CDPATH is not what you want, include If the default value taken from $CDPATH is not what you want, include
a modified version of the following command in your vimrc file to a modified version of the following command in your vimrc file to
override it: > override it: >
:let &cdpath = ',' . substitute(substitute($CDPATH, '[, ]', '\\\0', 'g'), ':', ',', 'g') :let &cdpath = ',' .. substitute(substitute($CDPATH, '[, ]', '\\\0', 'g'), ':', ',', 'g')
< This option cannot be set from a |modeline| or in the |sandbox|, for < This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons. security reasons.
(parts of 'cdpath' can be passed to the shell to expand file names). (parts of 'cdpath' can be passed to the shell to expand file names).
@@ -1558,8 +1578,8 @@ A jump table for the options with a short description can be found at |Q_op|.
preferred, because it is much faster. preferred, because it is much faster.
'charconvert' is not used when reading stdin |--|, because there is no '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. 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, The expression must return zero, false or an empty string for success,
non-zero for failure. non-zero or true for failure.
The possible encoding names encountered are in 'encoding'. The possible encoding names encountered are in 'encoding'.
Additionally, names given in 'fileencodings' and 'fileencoding' are Additionally, names given in 'fileencodings' and 'fileencoding' are
used. used.
@@ -1571,8 +1591,8 @@ A jump table for the options with a short description can be found at |Q_op|.
set charconvert=CharConvert() set charconvert=CharConvert()
fun CharConvert() fun CharConvert()
system("recode " system("recode "
\ . v:charconvert_from . ".." . v:charconvert_to \ .. v:charconvert_from .. ".." .. v:charconvert_to
\ . " <" . v:fname_in . " >" v:fname_out) \ .. " <" .. v:fname_in .. " >" .. v:fname_out)
return v:shell_error return v:shell_error
endfun endfun
< The related Vim variables are: < The related Vim variables are:
@@ -1583,9 +1603,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:fname_in and v:fname_out will never be the same.
Note that v:charconvert_from and v:charconvert_to may be different 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. 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 Encryption is not done by Vim when using 'charconvert'. If you want
to encrypt the file after conversion, 'charconvert' should take care to encrypt the file after conversion, 'charconvert' should take care
of this. 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 This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons. security reasons.
@@ -1640,13 +1669,23 @@ A jump table for the options with a short description can be found at |Q_op|.
matter, include the keyword both the uppercase and lowercase: matter, include the keyword both the uppercase and lowercase:
"if,If,IF". "if,If,IF".
*'clipboard'* *'cb'* *'cinscopedecls'* *'cinsd'*
'cinscopedecls' 'cinsd' string (default "public,protected,private")
local to buffer
{not available when compiled without the |+cindent|
feature}
Keywords that are interpreted as a C++ scope declaration by |cino-g|.
Useful e.g. for working with the Qt framework that defines additional
scope declarations "signals", "public slots" and "private slots": >
set cinscopedecls+=signals,public\ slots,private\ slots
< *'clipboard'* *'cb'*
'clipboard' 'cb' string (default "autoselect,exclude:cons\|linux" 'clipboard' 'cb' string (default "autoselect,exclude:cons\|linux"
for X-windows, "" otherwise) for X-windows, "" otherwise)
global global
{only in GUI versions or when the |+xterm_clipboard| {only in GUI versions or when the |+xterm_clipboard|
feature is included} feature is included}
This option is a list of comma separated names. This option is a list of comma-separated names.
Note: if one of the items is "exclude:", then you can't add an item Note: if one of the items is "exclude:", then you can't add an item
after that. Therefore do append an item with += but use ^= to after that. Therefore do append an item with += but use ^= to
prepend, e.g.: > prepend, e.g.: >
@@ -1747,7 +1786,7 @@ A jump table for the options with a short description can be found at |Q_op|.
local to window local to window
{not available when compiled without the |+syntax| {not available when compiled without the |+syntax|
feature} feature}
'colorcolumn' is a comma separated list of screen columns that are 'colorcolumn' is a comma-separated list of screen columns that are
highlighted with ColorColumn |hl-ColorColumn|. Useful to align highlighted with ColorColumn |hl-ColorColumn|. Useful to align
text. Will make screen redrawing slower. text. Will make screen redrawing slower.
The screen column can be an absolute number, or a number preceded with The screen column can be an absolute number, or a number preceded with
@@ -1781,7 +1820,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'comments' 'com' string (default 'comments' 'com' string (default
"s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-") "s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-")
local to buffer local to buffer
A comma separated list of strings that can start a comment line. See A comma-separated list of strings that can start a comment line. See
|format-comments|. See |option-backslash| about using backslashes to |format-comments|. See |option-backslash| about using backslashes to
insert a space. insert a space.
@@ -1922,7 +1961,7 @@ A jump table for the options with a short description can be found at |Q_op|.
This option specifies how keyword completion |ins-completion| works This option specifies how keyword completion |ins-completion| works
when CTRL-P or CTRL-N are used. It is also used for whole-line when CTRL-P or CTRL-N are used. It is also used for whole-line
completion |i_CTRL-X_CTRL-L|. It indicates the type of completion completion |i_CTRL-X_CTRL-L|. It indicates the type of completion
and the places to scan. It is a comma separated list of flags: and the places to scan. It is a comma-separated list of flags:
. scan the current buffer ('wrapscan' is ignored) . scan the current buffer ('wrapscan' is ignored)
w scan buffers from other windows w scan buffers from other windows
b scan other loaded buffers that are in the buffer list b scan other loaded buffers that are in the buffer list
@@ -1991,7 +2030,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'completeopt'* *'cot'* *'completeopt'* *'cot'*
'completeopt' 'cot' string (default: "menu,preview") 'completeopt' 'cot' string (default: "menu,preview")
global global
A comma separated list of options for Insert mode completion A comma-separated list of options for Insert mode completion
|ins-completion|. The supported values are: |ins-completion|. The supported values are:
menu Use a popup menu to show the possible completions. The menu Use a popup menu to show the possible completions. The
@@ -2467,7 +2506,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 you write the file the encrypted bytes will be
different. The whole undo file is encrypted, not just different. The whole undo file is encrypted, not just
the pieces of text. the pieces of text.
*E1193* *E1194* *E1195* *E1196* *E1193* *E1194* *E1195* *E1196* *E1230*
*E1197* *E1198* *E1199* *E1200* *E1201* *E1197* *E1198* *E1199* *E1200* *E1201*
xchacha20 XChaCha20 Cipher with Poly1305 Message Authentication xchacha20 XChaCha20 Cipher with Poly1305 Message Authentication
Code. Medium strong till strong encryption. Code. Medium strong till strong encryption.
@@ -2607,7 +2646,7 @@ A jump table for the options with a short description can be found at |Q_op|.
local to window local to window
{not available when compiled without the |+syntax| {not available when compiled without the |+syntax|
feature} feature}
Comma separated list of settings for how 'cursorline' is displayed. Comma-separated list of settings for how 'cursorline' is displayed.
Valid values: Valid values:
"line" Highlight the text line of the cursor with "line" Highlight the text line of the cursor with
CursorLine |hl-CursorLine|. CursorLine |hl-CursorLine|.
@@ -2887,7 +2926,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'display' 'dy' string (default "", set to "truncate" in 'display' 'dy' string (default "", set to "truncate" in
|defaults.vim|) |defaults.vim|)
global global
Change the way text is displayed. This is comma separated list of Change the way text is displayed. This is comma-separated list of
flags: flags:
lastline When included, as much as possible of the last line lastline When included, as much as possible of the last line
in a window will be displayed. "@@@" is put in the in a window will be displayed. "@@@" is put in the
@@ -3091,7 +3130,7 @@ A jump table for the options with a short description can be found at |Q_op|.
A list of autocommand event names, which are to be ignored. A list of autocommand event names, which are to be ignored.
When set to "all" or when "all" is one of the items, all autocommand When set to "all" or when "all" is one of the items, all autocommand
events are ignored, autocommands will not be executed. events are ignored, autocommands will not be executed.
Otherwise this is a comma separated list of event names. Example: > Otherwise this is a comma-separated list of event names. Example: >
:set ei=WinEnter,WinLeave :set ei=WinEnter,WinLeave
< <
*'expandtab'* *'et'* *'noexpandtab'* *'noet'* *'expandtab'* *'et'* *'noexpandtab'* *'noet'*
@@ -3351,7 +3390,7 @@ A jump table for the options with a short description can be found at |Q_op|.
{not available when compiled without the |+folding| {not available when compiled without the |+folding|
feature} feature}
Characters to fill the statuslines and vertical separators. Characters to fill the statuslines and vertical separators.
It is a comma separated list of items: It is a comma-separated list of items:
item default Used for ~ item default Used for ~
stl:c ' ' or '^' statusline of the current window stl:c ' ' or '^' statusline of the current window
@@ -3541,7 +3580,7 @@ A jump table for the options with a short description can be found at |Q_op|.
{not available when compiled without the |+folding| {not available when compiled without the |+folding|
feature} feature}
Specifies for which type of commands folds will be opened, if the Specifies for which type of commands folds will be opened, if the
command moves the cursor into a closed fold. It is a comma separated command moves the cursor into a closed fold. It is a comma-separated
list of items. list of items.
NOTE: When the command is part of a mapping this option is not used. NOTE: When the command is part of a mapping this option is not used.
Add the |zv| command to the mapping to get the same effect. Add the |zv| command to the mapping to get the same effect.
@@ -3759,7 +3798,7 @@ A jump table for the options with a short description can be found at |Q_op|.
For a console the 't_SI', 't_SR', and 't_EI' escape sequences are For a console the 't_SI', 't_SR', and 't_EI' escape sequences are
used. used.
The option is a comma separated list of parts. Each part consist of a The option is a comma-separated list of parts. Each part consist of a
mode-list and an argument-list: mode-list and an argument-list:
mode-list:argument-list,mode-list:argument-list,.. mode-list:argument-list,mode-list:argument-list,..
The mode-list is a dash separated list of these modes: The mode-list is a dash separated list of these modes:
@@ -3878,7 +3917,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'guioptions'* *'go'* *'guioptions'* *'go'*
'guioptions' 'go' string (default "egmrLtT" (MS-Windows, 'guioptions' 'go' string (default "egmrLtT" (MS-Windows,
"t" is removed in |defaults.vim|), "t" is removed in |defaults.vim|),
"aegimrLtT" (GTK, Motif and Athena), "aegimrLtT" (GTK and Motif),
) )
global global
{only available when compiled with GUI enabled} {only available when compiled with GUI enabled}
@@ -3959,13 +3998,12 @@ A jump table for the options with a short description can be found at |Q_op|.
*'go-g'* *'go-g'*
'g' Grey menu items: Make menu items that are not active grey. If 'g' Grey menu items: Make menu items that are not active grey. If
'g' is not included inactive menu items are not shown at all. 'g' is not included inactive menu items are not shown at all.
Exception: Athena will always use grey menu items.
*'go-t'* *'go-t'*
't' Include tearoff menu items. Currently only works for Win32, 't' Include tearoff menu items. Currently only works for Win32,
GTK+, and Motif 1.2 GUI. GTK+, and Motif 1.2 GUI.
*'go-T'* *'go-T'*
'T' Include Toolbar. Currently only in Win32, GTK+, Motif, Photon 'T' Include Toolbar. Currently only in Win32, GTK+, Motif and
and Athena GUIs. Photon GUIs.
*'go-r'* *'go-r'*
'r' Right-hand scrollbar is always present. 'r' Right-hand scrollbar is always present.
*'go-R'* *'go-R'*
@@ -4018,7 +4056,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'guitablabel' 'gtl' string (default empty) 'guitablabel' 'gtl' string (default empty)
global global
{only available when compiled with GUI enabled} {only available when compiled with GUI enabled}
When nonempty describes the text to use in a label of the GUI tab When non-empty describes the text to use in a label of the GUI tab
pages line. When empty and when the result is empty Vim will use a pages line. When empty and when the result is empty Vim will use a
default label. See |setting-guitablabel| for more info. default label. See |setting-guitablabel| for more info.
@@ -4036,7 +4074,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'guitabtooltip' 'gtt' string (default empty) 'guitabtooltip' 'gtt' string (default empty)
global global
{only available when compiled with GUI enabled} {only available when compiled with GUI enabled}
When nonempty describes the text to use in a tooltip for the GUI tab When non-empty describes the text to use in a tooltip for the GUI tab
pages line. When empty Vim will use a default tooltip. pages line. When empty Vim will use a default tooltip.
This option is otherwise just like 'guitablabel' above. This option is otherwise just like 'guitablabel' above.
You can include a line break. Simplest method is to use |:let|: > You can include a line break. Simplest method is to use |:let|: >
@@ -4071,7 +4109,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global global
{only available when compiled with the |+multi_lang| {only available when compiled with the |+multi_lang|
feature} feature}
Comma separated list of languages. Vim will use the first language Comma-separated list of languages. Vim will use the first language
for which the desired help can be found. The English help will always for which the desired help can be found. The English help will always
be used as a last resort. You can add "en" to prefer English over be used as a last resort. You can add "en" to prefer English over
another language, but that will only find tags that exist in that another language, but that will only find tags that exist in that
@@ -4090,10 +4128,14 @@ A jump table for the options with a short description can be found at |Q_op|.
When off a buffer is unloaded when it is |abandon|ed. When on a When off a buffer is unloaded when it is |abandon|ed. When on a
buffer becomes hidden when it is |abandon|ed. If the buffer is still buffer becomes hidden when it is |abandon|ed. If the buffer is still
displayed in another window, it does not become hidden, of course. displayed in another window, it does not become hidden, of course.
The commands that move through the buffer list sometimes make a buffer The commands that move through the buffer list sometimes make a buffer
hidden although the 'hidden' option is off: When the buffer is hidden even if the 'hidden' option is off when these three are true:
modified, 'autowrite' is off or writing is not possible, and the '!' - the buffer is modified
flag was used. See also |windows.txt|. - 'autowrite' is off or writing is not possible
- the '!' flag was used
Also see |windows.txt|.
To only make one buffer hidden use the 'bufhidden' option. To only make one buffer hidden use the 'bufhidden' option.
This option is set for one command with ":hide {command}" |:hide|. This option is set for one command with ":hide {command}" |:hide|.
WARNING: It's easy to forget that you have changes in hidden buffers. WARNING: It's easy to forget that you have changes in hidden buffers.
@@ -4119,7 +4161,7 @@ A jump table for the options with a short description can be found at |Q_op|.
z:StatusLineTerm,Z:StatusLineTermNC") z:StatusLineTerm,Z:StatusLineTermNC")
global global
This option can be used to set highlighting mode for various This option can be used to set highlighting mode for various
occasions. It is a comma separated list of character pairs. The occasions. It is a comma-separated list of character pairs. The
first character in a pair gives the occasion, the second the mode to first character in a pair gives the occasion, the second the mode to
use for that occasion. The occasions are: use for that occasion. The occasions are:
|hl-SpecialKey| 8 Meta and special keys listed with ":map" |hl-SpecialKey| 8 Meta and special keys listed with ":map"
@@ -4131,6 +4173,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|hl-ErrorMsg| e error messages |hl-ErrorMsg| e error messages
h (obsolete, ignored) h (obsolete, ignored)
|hl-IncSearch| i 'incsearch' highlighting |hl-IncSearch| i 'incsearch' highlighting
|hl-CurSearch| y current instance of last search pattern
|hl-Search| l last search pattern highlighting (see 'hlsearch') |hl-Search| l last search pattern highlighting (see 'hlsearch')
|hl-MoreMsg| m |more-prompt| |hl-MoreMsg| m |more-prompt|
|hl-ModeMsg| M Mode (e.g., "-- INSERT --") |hl-ModeMsg| M Mode (e.g., "-- INSERT --")
@@ -4374,7 +4417,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|i_CTRL-^|. |i_CTRL-^|.
The value is set to 1 when setting 'keymap' to a valid keymap name. The value is set to 1 when setting 'keymap' to a valid keymap name.
It is also used for the argument of commands like "r" and "f". It is also used for the argument of commands like "r" and "f".
The value 0 may not work correctly with Athena and Motif with some XIM The value 0 may not work correctly with Motif with some XIM
methods. Use 'imdisable' to disable XIM then. methods. Use 'imdisable' to disable XIM then.
You can set 'imactivatefunc' and 'imstatusfunc' to handle IME/XIM You can set 'imactivatefunc' and 'imstatusfunc' to handle IME/XIM
@@ -4395,7 +4438,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|c_CTRL-^|. |c_CTRL-^|.
The value is set to 1 when it is not -1 and setting the 'keymap' The value is set to 1 when it is not -1 and setting the 'keymap'
option to a valid keymap name. option to a valid keymap name.
The value 0 may not work correctly with Athena and Motif with some XIM The value 0 may not work correctly with Motif with some XIM
methods. Use 'imdisable' to disable XIM then. methods. Use 'imdisable' to disable XIM then.
*'imstatusfunc'* *'imsf'* *'imstatusfunc'* *'imsf'*
@@ -4786,7 +4829,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'keymodel'* *'km'* *'keymodel'* *'km'*
'keymodel' 'km' string (default "") 'keymodel' 'km' string (default "")
global global
List of comma separated words, which enable special things that keys List of comma-separated words, which enable special things that keys
can do. These values can be used: can do. These values can be used:
startsel Using a shifted special key starts selection (either startsel Using a shifted special key starts selection (either
Select mode or Visual mode, depending on "key" being Select mode or Visual mode, depending on "key" being
@@ -4867,7 +4910,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|+multi_lang| features} |+multi_lang| features}
Language to use for menu translation. Tells which file is loaded Language to use for menu translation. Tells which file is loaded
from the "lang" directory in 'runtimepath': > from the "lang" directory in 'runtimepath': >
"lang/menu_" . &langmenu . ".vim" "lang/menu_" .. &langmenu .. ".vim"
< (without the spaces). For example, to always use the Dutch menus, no < (without the spaces). For example, to always use the Dutch menus, no
matter what $LANG is set to: > matter what $LANG is set to: >
:set langmenu=nl_NL.ISO_8859-1 :set langmenu=nl_NL.ISO_8859-1
@@ -4987,7 +5030,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global or local to buffer |global-local| global or local to buffer |global-local|
{not available when compiled without the |+lispindent| {not available when compiled without the |+lispindent|
feature} feature}
Comma separated list of words that influence the Lisp indenting. Comma-separated list of words that influence the Lisp indenting.
|'lisp'| |'lisp'|
*'list'* *'nolist'* *'list'* *'nolist'*
@@ -5011,7 +5054,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'listchars' 'lcs' string (default "eol:$") 'listchars' 'lcs' string (default "eol:$")
global or local to window |global-local| global or local to window |global-local|
Strings to use in 'list' mode and for the |:list| command. It is a Strings to use in 'list' mode and for the |:list| command. It is a
comma separated list of string settings. comma-separated list of string settings.
*lcs-eol* *lcs-eol*
eol:c Character to show at the end of each line. When eol:c Character to show at the end of each line. When
omitted, there is no extra character at the end of the omitted, there is no extra character at the end of the
@@ -5496,6 +5539,18 @@ A jump table for the options with a short description can be found at |Q_op|.
The 'mousemodel' option is set by the |:behave| command. The 'mousemodel' option is set by the |:behave| command.
*'mousemoveevent'* *'mousemev'*
'mousemoveevent' 'mousemev' boolean (default off)
global
{only works in the GUI}
When on, mouse move events are delivered to the input queue and are
available for mapping. The default, off, avoids the mouse movement
overhead except when needed. See |gui-mouse-mapping|.
Warning: Setting this option can make pending mappings to be aborted
when the mouse is moved.
Currently only works in the GUI, may be made to work in a terminal
later.
*'mouseshape'* *'mouses'* *E547* *'mouseshape'* *'mouses'* *E547*
'mouseshape' 'mouses' string (default "i-r:beam,s:updown,sd:udsizing, 'mouseshape' 'mouses' string (default "i-r:beam,s:updown,sd:udsizing,
vs:leftright,vd:lrsizing,m:no, vs:leftright,vd:lrsizing,m:no,
@@ -5504,7 +5559,7 @@ A jump table for the options with a short description can be found at |Q_op|.
{only available when compiled with the |+mouseshape| {only available when compiled with the |+mouseshape|
feature} feature}
This option tells Vim what the mouse pointer should look like in This option tells Vim what the mouse pointer should look like in
different modes. The option is a comma separated list of parts, much different modes. The option is a comma-separated list of parts, much
like used for 'guicursor'. Each part consist of a mode/location-list like used for 'guicursor'. Each part consist of a mode/location-list
and an argument-list: and an argument-list:
mode-list:shape,mode-list:shape,.. mode-list:shape,mode-list:shape,..
@@ -5881,7 +5936,7 @@ A jump table for the options with a short description can be found at |Q_op|.
< To use an environment variable, you probably need to replace the < To use an environment variable, you probably need to replace the
separator. Here is an example to append $INCL, in which directory separator. Here is an example to append $INCL, in which directory
names are separated with a semi-colon: > names are separated with a semi-colon: >
:let &path = &path . "," . substitute($INCL, ';', ',', 'g') :let &path = &path .. "," .. substitute($INCL, ';', ',', 'g')
< Replace the ';' with a ':' or whatever separator is used. Note that < Replace the ';' with a ':' or whatever separator is used. Note that
this doesn't work when $INCL contains a comma or white space. this doesn't work when $INCL contains a comma or white space.
@@ -6645,7 +6700,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'selectmode'* *'slm'* *'selectmode'* *'slm'*
'selectmode' 'slm' string (default "") 'selectmode' 'slm' string (default "")
global global
This is a comma separated list of words, which specifies when to start This is a comma-separated list of words, which specifies when to start
Select mode instead of Visual mode, when a selection is started. Select mode instead of Visual mode, when a selection is started.
Possible values: Possible values:
mouse when using the mouse mouse when using the mouse
@@ -6714,6 +6769,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. See |option-backslash| about including spaces and backslashes.
Environment variables are expanded |:set_env|. 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 If the name of the shell contains a space, you need to enclose it in
quotes and escape the space. Example with quotes: > quotes and escape the space. Example with quotes: >
:set shell=\"c:\program\ files\unix\sh.exe\"\ -f :set shell=\"c:\program\ files\unix\sh.exe\"\ -f
@@ -7261,7 +7319,7 @@ A jump table for the options with a short description can be found at |Q_op|.
commands. It must end in ".{encoding}.add". You need to include the commands. It must end in ".{encoding}.add". You need to include the
path, otherwise the file is placed in the current directory. path, otherwise the file is placed in the current directory.
*E765* *E765*
It may also be a comma separated list of names. A count before the It may also be a comma-separated list of names. A count before the
|zg| and |zw| commands can be used to access each. This allows using |zg| and |zw| commands can be used to access each. This allows using
a personal word list file and a project word list file. a personal word list file and a project word list file.
When a word is added while this option is empty Vim will set it for When a word is added while this option is empty Vim will set it for
@@ -7283,7 +7341,7 @@ A jump table for the options with a short description can be found at |Q_op|.
local to buffer local to buffer
{not available when compiled without the |+syntax| {not available when compiled without the |+syntax|
feature} feature}
A comma separated list of word list names. When the 'spell' option is A comma-separated list of word list names. When the 'spell' option is
on spellchecking will be done for these languages. Example: > on spellchecking will be done for these languages. Example: >
set spelllang=en_us,nl,medical set spelllang=en_us,nl,medical
< This means US English, Dutch and medical words are recognized. Words < This means US English, Dutch and medical words are recognized. Words
@@ -7328,7 +7386,7 @@ A jump table for the options with a short description can be found at |Q_op|.
local to buffer local to buffer
{not available when compiled without the |+syntax| {not available when compiled without the |+syntax|
feature} feature}
A comma separated list of options for spell checking: A comma-separated list of options for spell checking:
camel When a word is CamelCased, assume "Cased" is a camel When a word is CamelCased, assume "Cased" is a
separate word: every upper-case character in a word separate word: every upper-case character in a word
that comes after a lower case character indicates the that comes after a lower case character indicates the
@@ -7363,6 +7421,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' suggestions is never more than the value of 'lines'
minus two. 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, file:{filename} Read file {filename}, which must have two columns,
separated by a slash. The first column contains the separated by a slash. The first column contains the
bad word, the second column the suggested good word. bad word, the second column the suggested good word.
@@ -7430,7 +7494,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global or local to window |global-local| global or local to window |global-local|
{not available when compiled without the |+statusline| {not available when compiled without the |+statusline|
feature} feature}
When nonempty, this option determines the content of the status line. When non-empty, this option determines the content of the status line.
Also see |status-line|. Also see |status-line|.
The option consists of printf style '%' items interspersed with The option consists of printf style '%' items interspersed with
@@ -7627,7 +7691,7 @@ A jump table for the options with a short description can be found at |Q_op|.
local to buffer local to buffer
{not available when compiled without the {not available when compiled without the
|+file_in_path| feature} |+file_in_path| feature}
Comma separated list of suffixes, which are used when searching for a Comma-separated list of suffixes, which are used when searching for a
file for the "gf", "[I", etc. commands. Example: > file for the "gf", "[I", etc. commands. Example: >
:set suffixesadd=.java :set suffixesadd=.java
< <
@@ -7673,7 +7737,7 @@ A jump table for the options with a short description can be found at |Q_op|.
This option controls the behavior when switching between buffers. This option controls the behavior when switching between buffers.
Mostly for |quickfix| commands some values are also used for other Mostly for |quickfix| commands some values are also used for other
commands, as mentioned below. commands, as mentioned below.
Possible values (comma separated list): Possible values (comma-separated list):
useopen If included, jump to the first open window that useopen If included, jump to the first open window that
contains the specified buffer (if there is one). contains the specified buffer (if there is one).
Otherwise: Do not examine other windows. Otherwise: Do not examine other windows.
@@ -7738,7 +7802,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'tabline'* *'tal'* *'tabline'* *'tal'*
'tabline' 'tal' string (default empty) 'tabline' 'tal' string (default empty)
global global
When nonempty, this option determines the content of the tab pages When non-empty, this option determines the content of the tab pages
line at the top of the Vim window. When empty Vim will use a default line at the top of the Vim window. When empty Vim will use a default
tab pages line. See |setting-tabline| for more info. tab pages line. See |setting-tabline| for more info.
@@ -7771,10 +7835,11 @@ A jump table for the options with a short description can be found at |Q_op|.
'tabstop' 'ts' number (default 8) 'tabstop' 'ts' number (default 8)
local to buffer local to buffer
Number of spaces that a <Tab> in the file counts for. Also see 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 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: There are four main ways to use tabs in Vim:
1. Always keep 'tabstop' at 8, set 'softtabstop' and 'shiftwidth' to 4 1. Always keep 'tabstop' at 8, set 'softtabstop' and 'shiftwidth' to 4
@@ -7829,9 +7894,10 @@ A jump table for the options with a short description can be found at |Q_op|.
linear search can be avoided when case is ignored. Use a value of '2' linear search can be avoided when case is ignored. Use a value of '2'
in the "!_TAG_FILE_SORTED" line for this. A tag file can be case-fold in the "!_TAG_FILE_SORTED" line for this. A tag file can be case-fold
sorted with the -f switch to "sort" in most unices, as in the command: sorted with the -f switch to "sort" in most unices, as in the command:
"sort -f -o tags tags". For "Exuberant ctags" version 5.x or higher "sort -f -o tags tags". For Universal ctags and Exuberant ctags
(at least 5.5) the --sort=foldcase switch can be used for this as version 5.x or higher (at least 5.5) the --sort=foldcase switch can be
well. Note that case must be folded to uppercase for this to work. used for this as well. Note that case must be folded to uppercase for
this to work.
By default, tag searches are case-sensitive. Case is ignored when By default, tag searches are case-sensitive. Case is ignored when
'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is 'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is
@@ -8013,6 +8079,13 @@ A jump table for the options with a short description can be found at |Q_op|.
< This requires Vim to be built with the |+vtp| feature. < This requires Vim to be built with the |+vtp| feature.
Note that the "cterm" attributes are still used, not the "gui" ones. Note that the "cterm" attributes are still used, not the "gui" ones.
When using Vim with Windows Terminal, the background of Windows
Terminal is normally filled with the Vim background color. Setting
'termguicolors' and the guibg of the Normal highlight group to NONE
will make the background transparent: >
:hi Normal guibg=NONE
<
NOTE: This option is reset when 'compatible' is set. NOTE: This option is reset when 'compatible' is set.
*'termwinkey'* *'twk'* *'termwinkey'* *'twk'*
@@ -8288,7 +8361,7 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set in a modeline when 'modelineexpr' is off. This option cannot be set in a modeline when 'modelineexpr' is off.
Example: > Example: >
:auto BufEnter * let &titlestring = hostname() . "/" . expand("%:p") :auto BufEnter * let &titlestring = hostname() .. "/" .. expand("%:p")
:set title titlestring=%<%F%=%l/%L-%P titlelen=70 :set title titlestring=%<%F%=%l/%L-%P titlelen=70
< The value of 'titlelen' is used to align items in the middle or right < The value of 'titlelen' is used to align items in the middle or right
of the available space. of the available space.
@@ -8304,8 +8377,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'toolbar'* *'tb'* *'toolbar'* *'tb'*
'toolbar' 'tb' string (default "icons,tooltips") 'toolbar' 'tb' string (default "icons,tooltips")
global global
{only for |+GUI_GTK|, |+GUI_Athena|, |+GUI_Motif| and {only for |+GUI_GTK|, |+GUI_Motif| and |+GUI_Photon|}
|+GUI_Photon|}
The contents of this option controls various toolbar settings. The The contents of this option controls various toolbar settings. The
possible values are: possible values are:
icons Toolbar buttons are shown with icons. icons Toolbar buttons are shown with icons.
@@ -8319,7 +8391,7 @@ A jump table for the options with a short description can be found at |Q_op|.
If you want the toolbar to be shown with icons as well as text, do the If you want the toolbar to be shown with icons as well as text, do the
following: > following: >
:set tb=icons,text :set tb=icons,text
< Motif and Athena cannot display icons and text at the same time. They < Motif cannot display icons and text at the same time. They
will show icons if both are requested. will show icons if both are requested.
If none of the strings specified in 'toolbar' are valid or if If none of the strings specified in 'toolbar' are valid or if
@@ -8638,7 +8710,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global global
{not available when compiled without the |+mksession| {not available when compiled without the |+mksession|
feature} feature}
Changes the effect of the |:mkview| command. It is a comma separated Changes the effect of the |:mkview| command. It is a comma-separated
list of words. Each word enables saving and restoring something: list of words. Each word enables saving and restoring something:
word save and restore ~ word save and restore ~
cursor cursor position in file and in window cursor cursor position in file and in window
@@ -8668,7 +8740,7 @@ A jump table for the options with a short description can be found at |Q_op|.
When non-empty, the viminfo file is read upon startup and written When non-empty, the viminfo file is read upon startup and written
when exiting Vim (see |viminfo-file|). Except when 'viminfofile' is when exiting Vim (see |viminfo-file|). Except when 'viminfofile' is
"NONE". "NONE".
The string should be a comma separated list of parameters, each The string should be a comma-separated list of parameters, each
consisting of a single character identifying the particular parameter, consisting of a single character identifying the particular parameter,
followed by a number or string which specifies the value of that followed by a number or string which specifies the value of that
parameter. If a particular character is left out, then the default parameter. If a particular character is left out, then the default
@@ -8791,7 +8863,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'virtualedit'* *'ve'* *'virtualedit'* *'ve'*
'virtualedit' 've' string (default "") 'virtualedit' 've' string (default "")
global or local to window |global-local| global or local to window |global-local|
A comma separated list of these words: A comma-separated list of these words:
block Allow virtual editing in Visual block mode. block Allow virtual editing in Visual block mode.
insert Allow virtual editing in Insert mode. insert Allow virtual editing in Insert mode.
all Allow virtual editing in all modes. all Allow virtual editing in all modes.
@@ -8954,7 +9026,8 @@ A jump table for the options with a short description can be found at |Q_op|.
mode. On pressing 'wildchar' (usually <Tab>) to invoke completion, mode. On pressing 'wildchar' (usually <Tab>) to invoke completion,
the possible matches are shown just above the command line, with the the possible matches are shown just above the command line, with the
first match highlighted (overwriting the status line, if there is first match highlighted (overwriting the status line, if there is
one). Keys that show the previous/next match, such as <Tab> or one). This is the behavior without "pum" in 'wildoptions.
Keys that show the previous/next match, such as <Tab> or
CTRL-P/CTRL-N, cause the highlight to move to the appropriate match. CTRL-P/CTRL-N, cause the highlight to move to the appropriate match.
When 'wildmode' is used, "wildmenu" mode is used where "full" is When 'wildmode' is used, "wildmenu" mode is used where "full" is
specified. "longest" and "list" do not start "wildmenu" mode. specified. "longest" and "list" do not start "wildmenu" mode.
@@ -8962,10 +9035,12 @@ A jump table for the options with a short description can be found at |Q_op|.
If there are more matches than can fit in the line, a ">" is shown on If there are more matches than can fit in the line, a ">" is shown on
the right and/or a "<" is shown on the left. The status line scrolls the right and/or a "<" is shown on the left. The status line scrolls
as needed. as needed.
When 'wildoptions' contains "pum", then the completion matches are
shown in a popup menu.
The "wildmenu" mode is abandoned when a key is hit that is not used The "wildmenu" mode is abandoned when a key is hit that is not used
for selecting a completion. for selecting a completion.
While the "wildmenu" is active the following keys have special While the "wildmenu" is active, not using the popup menu, the
meanings: following keys have special meanings:
<Left> <Right> - select previous/next match (like CTRL-P/CTRL-N) <Left> <Right> - select previous/next match (like CTRL-P/CTRL-N)
<Down> - in filename/menu name completion: move into a <Down> - in filename/menu name completion: move into a
@@ -8975,6 +9050,21 @@ A jump table for the options with a short description can be found at |Q_op|.
<Up> - in filename/menu name completion: move up into <Up> - in filename/menu name completion: move up into
parent directory or parent menu. parent directory or parent menu.
When using the popup menu for command line completion, the following
keys have special meanings:
<Down> - select next match (like CTRL-N)
<Left> - in filename/menu name completion: move up into
parent directory or parent menu.
<Right> - in filename/menu name completion: move into a
subdirectory or submenu.
<Up> - select previous match (like CTRL-P)
CTRL-E - end completion, go back to what was there before
selecting a match.
CTRL-N - go to the next entry
CTRL-P - go to the previous entry
CTRL-Y - accept the currently selected match and stop
completion.
This makes the menus accessible from the console |console-menus|. This makes the menus accessible from the console |console-menus|.
If you prefer the <Left> and <Right> keys to move the cursor instead If you prefer the <Left> and <Right> keys to move the cursor instead
@@ -8989,7 +9079,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'wildmode' 'wim' string (Vim default: "full") 'wildmode' 'wim' string (Vim default: "full")
global global
Completion mode that is used for the character specified with Completion mode that is used for the character specified with
'wildchar'. It is a comma separated list of up to four parts. Each 'wildchar'. It is a comma-separated list of up to four parts. Each
part specifies what to do for each consecutive use of 'wildchar'. The part specifies what to do for each consecutive use of 'wildchar'. The
first part specifies the behavior for the first use of 'wildchar', first part specifies the behavior for the first use of 'wildchar',
The second part for the second use, etc. The second part for the second use, etc.
@@ -9037,14 +9127,23 @@ A jump table for the options with a short description can be found at |Q_op|.
global global
{not available when compiled without the |+wildignore| {not available when compiled without the |+wildignore|
feature} feature}
A list of words that change how command line completion is done. A list of words that change how |cmdline-completion| is done.
Currently only one word is allowed: The following values are supported:
fuzzy Use |fuzzy-matching| to find completion matches. When
this value is specified, wildcard expansion will not
be used for completion. The matches will be sorted by
the "best match" rather than alphabetically sorted.
This will find more matches than the wildcard
expansion. Currently fuzzy matching based completion
is not supported for file and directory names and
instead wildcard expansion is used.
pum Display the completion matches using the popupmenu
in the same style as the |ins-completion-menu|.
tagfile When using CTRL-D to list matching tags, the kind of tagfile When using CTRL-D to list matching tags, the kind of
tag and the file of the tag is listed. Only one match tag and the file of the tag is listed. Only one match
is displayed per line. Often used tag kinds are: is displayed per line. Often used tag kinds are:
d #define d #define
f function f function
Also see |cmdline-completion|.
*'winaltkeys'* *'wak'* *'winaltkeys'* *'wak'*
'winaltkeys' 'wak' string (default "menu") 'winaltkeys' 'wak' string (default "menu")

View File

@@ -603,13 +603,13 @@ program to the new diff on VMS. Add this to your .vimrc file: >
function MyDiff() function MyDiff()
let opt = "" let opt = ""
if &diffopt =~ "icase" if &diffopt =~ "icase"
let opt = opt . "-i " let opt = opt .. "-i "
endif endif
if &diffopt =~ "iwhite" if &diffopt =~ "iwhite"
let opt = opt . "-b " let opt = opt .. "-b "
endif endif
silent execute "!mc GNU:diff.exe -a " . opt . v:fname_in . " " . v:fname_new . silent execute "!mc GNU:diff.exe -a " .. opt .. v:fname_in .. " " .. v:fname_new ..
\ " > " . v:fname_out \ " > " .. v:fname_out
endfunction endfunction
endif endif

View File

@@ -1,4 +1,4 @@
*os_win32.txt* For Vim version 8.2. Last change: 2021 Apr 05 *os_win32.txt* For Vim version 8.2. Last change: 2022 Feb 14
VIM REFERENCE MANUAL by George Reilly VIM REFERENCE MANUAL by George Reilly
@@ -294,7 +294,7 @@ A. When using :! to run an external command, you can run it with "start". For
/b no console window will be opened /b no console window will be opened
You can use only one of these flags at a time. A second one will be You can use only one of these flags at a time. A second one will be
treated as the start of the command. treated as the start of the command.
*windows-asynchronously*
Q. How do I avoid getting a window for programs that I run asynchronously? Q. How do I avoid getting a window for programs that I run asynchronously?
A. You have two possible solutions depending on what you want: A. You have two possible solutions depending on what you want:
1) You may use the /min flag in order to run program in a minimized state 1) You may use the /min flag in order to run program in a minimized state
@@ -308,17 +308,17 @@ A. You have two possible solutions depending on what you want:
Example for a console application, run Exuberant ctags: > Example for a console application, run Exuberant ctags: >
:!start /min ctags -R . :!start /min ctags -R .
< When it has finished you should see file named "tags" in your current < When it has finished you should see file named "tags" in your current
directory. You should notice the window title blinking on your taskbar. directory. You should notice the window title blinking on your taskbar.
This is more noticeable for commands that take longer. This is more noticeable for commands that take longer.
Now delete the "tags" file and run this command: > Now delete the "tags" file and run this command: >
:!start /b ctags -R . :!start /b ctags -R .
< You should have the same "tags" file, but this time there will be no < You should have the same "tags" file, but this time there will be no
blinking on the taskbar. blinking on the taskbar.
Example for a GUI application: > Example for a GUI application: >
:!start /min notepad :!start /min notepad
:!start /b notepad :!start /b notepad
< The first command runs notepad minimized and the second one runs it < The first command runs notepad minimized and the second one runs it
normally. normally.
*windows-icon* *windows-icon*

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 8.2. Last change: 2022 Jan 08 *pattern.txt* For Vim version 8.2. Last change: 2022 Mar 04
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -19,7 +19,7 @@ explanations are in chapter 27 |usr_27.txt|.
8. Composing characters |patterns-composing| 8. Composing characters |patterns-composing|
9. Compare with Perl patterns |perl-patterns| 9. Compare with Perl patterns |perl-patterns|
10. Highlighting matches |match-highlight| 10. Highlighting matches |match-highlight|
11. Fuzzy matching |fuzzy-match| 11. Fuzzy matching |fuzzy-matching|
============================================================================== ==============================================================================
1. Search commands *search-commands* 1. Search commands *search-commands*
@@ -164,9 +164,12 @@ index, on which the cursor is. This can look like this: >
Note: the count does not take offset into account. Note: the count does not take offset into account.
When no match is found you get the error: *E486* Pattern not found When no match is found you get the error: *E486* Pattern not found
Note that for the |:global| command this behaves like a normal message, for Vi Note that for the `:global` command, when used in legacy script, you get a
compatibility. For the |:s| command the "e" flag can be used to avoid the normal message "Pattern not found", for Vi compatibility.
error message |:s_flags|. In |Vim9| script you get E486 for "pattern not found" or *E538* when the pattern
matches in every line with `:vglobal`.
For the |:s| command the "e" flag can be used to avoid the error message
|:s_flags|.
*search-offset* *{offset}* *search-offset* *{offset}*
These commands search for the specified pattern. With "/" and "?" an These commands search for the specified pattern. With "/" and "?" an
@@ -925,7 +928,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
becomes invalid. Vim doesn't automatically update the matches. becomes invalid. Vim doesn't automatically update the matches.
Similar to moving the cursor for "\%#" |/\%#|. Similar to moving the cursor for "\%#" |/\%#|.
*/\%l* */\%>l* */\%<l* *E951* */\%l* */\%>l* */\%<l* *E951* *E1204*
\%23l Matches in a specific line. \%23l Matches in a specific line.
\%<23l Matches above a specific line (lower line number). \%<23l Matches above a specific line (lower line number).
\%>23l Matches below a specific line (higher line number). \%>23l Matches below a specific line (higher line number).
@@ -963,7 +966,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
the cursor moves the display isn't updated for this change. An update the cursor moves the display isn't updated for this change. An update
is done when using the |CTRL-L| command (the whole screen is updated). is done when using the |CTRL-L| command (the whole screen is updated).
Example, to highlight the column where the cursor currently is: > Example, to highlight the column where the cursor currently is: >
:exe '/\%' . col(".") . 'c' :exe '/\%' .. col(".") .. 'c'
< Alternatively use: > < Alternatively use: >
/\%.c /\%.c
< When 'hlsearch' is set and you move the cursor around and make changes < When 'hlsearch' is set and you move the cursor around and make changes
@@ -1457,7 +1460,7 @@ Finally, these constructs are unique to Perl:
":2match" for another plugin. ":2match" for another plugin.
============================================================================== ==============================================================================
11. Fuzzy matching *fuzzy-match* 11. Fuzzy matching *fuzzy-matching*
Fuzzy matching refers to matching strings using a non-exact search string. Fuzzy matching refers to matching strings using a non-exact search string.
Fuzzy matching will match a string, if all the characters in the search string Fuzzy matching will match a string, if all the characters in the search string

View File

@@ -1,4 +1,4 @@
*pi_netrw.txt* For Vim version 8.2. Last change: 2021 Aug 16 *pi_netrw.txt* For Vim version 8.2. Last change: 2022 Apr 06
------------------------------------------------ ------------------------------------------------
NETRW REFERENCE MANUAL by Charles E. Campbell NETRW REFERENCE MANUAL by Charles E. Campbell
@@ -968,7 +968,7 @@ itself:
fun! NetReadFixup(method, line1, line2) fun! NetReadFixup(method, line1, line2)
if method == 3 " ftp (no <.netrc>) if method == 3 " ftp (no <.netrc>)
let fourblanklines= line2 - 3 let fourblanklines= line2 - 3
silent fourblanklines.",".line2."g/^\s*/d" silent fourblanklines .. "," .. line2 .. "g/^\s*/d"
endif endif
endfunction endfunction
endif endif
@@ -1975,7 +1975,7 @@ To use this function, simply assign its output to |g:netrw_list_hide| option. >
Example: let g:netrw_list_hide= netrw_gitignore#Hide('my_gitignore_file') Example: let g:netrw_list_hide= netrw_gitignore#Hide('my_gitignore_file')
Function can take additional files with git-ignore patterns. Function can take additional files with git-ignore patterns.
Example: g:netrw_list_hide= netrw_gitignore#Hide() . '.*\.swp$' Example: let g:netrw_list_hide= netrw_gitignore#Hide() .. '.*\.swp$'
Combining 'netrw_gitignore#Hide' with custom patterns. Combining 'netrw_gitignore#Hide' with custom patterns.
< <
@@ -2815,7 +2815,7 @@ your browsing preferences. (see also: |netrw-settings|)
= 2: wide listing (multiple files in columns) = 2: wide listing (multiple files in columns)
= 3: tree style listing = 3: tree style listing
*g:netrw_list_hide* comma separated pattern list for hiding files *g:netrw_list_hide* comma-separated pattern list for hiding files
Patterns are regular expressions (see |regexp|) Patterns are regular expressions (see |regexp|)
There's some special support for git-ignore There's some special support for git-ignore
files: you may add the output from the helper files: you may add the output from the helper
@@ -2825,7 +2825,7 @@ your browsing preferences. (see also: |netrw-settings|)
Examples: Examples:
let g:netrw_list_hide= '.*\.swp$' let g:netrw_list_hide= '.*\.swp$'
let g:netrw_list_hide= netrw_gitignore#Hide().'.*\.swp$' let g:netrw_list_hide= netrw_gitignore#Hide() .. '.*\.swp$'
default: "" default: ""
*g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin *g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin

View File

@@ -1,4 +1,4 @@
*popup.txt* For Vim version 8.2. Last change: 2022 Jan 08 *popup.txt* For Vim version 8.2. Last change: 2022 Apr 04
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -271,6 +271,11 @@ popup_create({what}, {options}) *popup_create()*
'buftype' set to "popup". That buffer will be wiped out once 'buftype' set to "popup". That buffer will be wiped out once
the popup closes. the popup closes.
if {what} is a buffer number and loading the buffer runs into
an existing swap file, it is silently opened read-only, as if
a |SwapExists| autocommand had set |v:swapchoice| to 'o'.
This is because we assume the buffer is only used for viewing.
{options} is a dictionary with many possible entries. {options} is a dictionary with many possible entries.
See |popup_create-arguments| for details. See |popup_create-arguments| for details.

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 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -139,28 +139,28 @@ If there is no error, return zero or an empty string.
The default for non MS-Windows or VMS systems is to simply use "lpr" to print The default for non MS-Windows or VMS systems is to simply use "lpr" to print
the file: > the file: >
system('lpr' . (&printdevice == '' ? '' : ' -P' . &printdevice) system('lpr' .. (&printdevice == '' ? '' : ' -P' .. &printdevice)
. ' ' . v:fname_in) . delete(v:fname_in) + v:shell_error .. ' ' .. v:fname_in) .. delete(v:fname_in) + v:shell_error
On MS-Windows machines the default is to copy the file to the currently On MS-Windows machines the default is to copy the file to the currently
specified printdevice: > specified printdevice: >
system('copy' . ' ' . v:fname_in . (&printdevice == '' system('copy' .. ' ' .. v:fname_in .. (&printdevice == ''
? ' LPT1:' : (' \"' . &printdevice . '\"'))) ? ' LPT1:' : (' \"' .. &printdevice .. '\"')))
. delete(v:fname_in) .. delete(v:fname_in)
On VMS machines the default is to send the file to either the default or On VMS machines the default is to send the file to either the default or
currently specified printdevice: > currently specified printdevice: >
system('print' . (&printdevice == '' ? '' : ' /queue=' . system('print' .. (&printdevice == '' ? '' : ' /queue=' ..
&printdevice) . ' ' . v:fname_in) . delete(v:fname_in) &printdevice) .. ' ' .. v:fname_in) .. delete(v:fname_in)
If you change this option, using a function is an easy way to avoid having to If you change this option, using a function is an easy way to avoid having to
escape all the spaces. Example: > escape all the spaces. Example: >
:set printexpr=PrintFile(v:fname_in) :set printexpr=PrintFile(v:fname_in)
:function PrintFile(fname) :function PrintFile(fname)
: call system("ghostview " . a:fname) : call system("ghostview " .. a:fname)
: call delete(a:fname) : call delete(a:fname)
: return v:shell_error : return v:shell_error
:endfunc :endfunc
@@ -178,7 +178,9 @@ If the expression starts with s: or |<SID>|, then it is replaced with the
script ID (|local-function|). Example: > script ID (|local-function|). Example: >
set printexpr=s:MyPrintFile() set printexpr=s:MyPrintFile()
set printexpr=<SID>SomePrintFile() 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 This option cannot be set from a |modeline| or in the |sandbox|, for security
reasons. reasons.

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 8.2. Last change: 2022 Jan 04 *quickfix.txt* For Vim version 8.2. Last change: 2022 Feb 22
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -353,7 +353,7 @@ processing a quickfix or location list command, it will be aborted.
cursor position will not be changed. See |:cexpr| for cursor position will not be changed. See |:cexpr| for
more information. more information.
Example: > Example: >
:g/mypattern/caddexpr expand("%") . ":" . line(".") . ":" . getline(".") :g/mypattern/caddexpr expand("%") .. ":" .. line(".") .. ":" .. getline(".")
< <
*:lad* *:addd* *:laddexpr* *:lad* *:addd* *:laddexpr*
:lad[dexpr] {expr} Same as ":caddexpr", except the location list for the :lad[dexpr] {expr} Same as ":caddexpr", except the location list for the
@@ -654,6 +654,27 @@ quickfix window. If there already is a window for that file, it is used
instead. If the buffer in the used window has changed, and the error is in instead. If the buffer in the used window has changed, and the error is in
another file, jumping to the error will fail. You will first have to make another file, jumping to the error will fail. You will first have to make
sure the window contains a buffer which can be abandoned. sure the window contains a buffer which can be abandoned.
When you select a file from the quickfix window, the following steps are used
to find a window to edit the file:
1. If a window displaying the selected file is present in the current tabpage
(starting with the window before the quickfix window), then that window is
used.
2. If the above step fails and if 'switchbuf' contains "usetab" and a window
displaying the selected file is present in any one of the tabpages
(starting with the first tabpage) then that window is used.
3. If the above step fails then a window in the current tabpage displaying a
buffer with 'buftype' not set (starting with the window before the quickfix
window) is used.
4. If the above step fails and if 'switchbuf' contains "uselast", then the
previously accessed window is used.
5. If the above step fails then the window before the quickfix window is used.
If there is no previous window, then the window after the quickfix window
is used.
6. If the above step fails, then a new horizontally split window above the
quickfix window is used.
*CTRL-W_<Enter>* *CTRL-W_<CR>* *CTRL-W_<Enter>* *CTRL-W_<CR>*
You can use CTRL-W <Enter> to open a new window and jump to the error there. You can use CTRL-W <Enter> to open a new window and jump to the error there.
@@ -663,7 +684,7 @@ FileType event (also see |qf.vim|). Then the BufReadPost event is triggered,
using "quickfix" for the buffer name. This can be used to perform some action using "quickfix" for the buffer name. This can be used to perform some action
on the listed errors. Example: > on the listed errors. Example: >
au BufReadPost quickfix setlocal modifiable au BufReadPost quickfix setlocal modifiable
\ | silent exe 'g/^/s//\=line(".")." "/' \ | silent exe 'g/^/s//\=line(".") .. " "/'
\ | setlocal nomodifiable \ | setlocal nomodifiable
This prepends the line number to each line. Note the use of "\=" in the This prepends the line number to each line. Note the use of "\=" in the
substitute string of the ":s" command, which is used to evaluate an substitute string of the ":s" command, which is used to evaluate an
@@ -692,13 +713,15 @@ this window, the displayed location list is used.
When you select a file from the location list window, the following steps are When you select a file from the location list window, the following steps are
used to find a window to edit the file: used to find a window to edit the file:
1. If a window with the location list displayed in the location list window is 1. If a non-quickfix window associated with the location list is present in
present, then the file is opened in that window. the current tabpage, then that window is used.
2. If the above step fails and if the file is already opened in another 2. If the above step fails and if the file is already opened in another window
window, then that window is used. in the current tabpage, then that window is used.
3. If the above step fails then an existing window showing a buffer with 3. If the above step fails and 'switchbuf' contains "usetab" and if the file
'buftype' not set is used. is opened in a window in any one of the tabpages, then that window is used.
4. If the above step fails, then the file is edited in a new window. 4. If the above step fails then a window in the current tabpage showing a
buffer with 'buftype' not set is used.
5. If the above step fails, then the file is edited in a new window.
In all of the above cases, if the location list for the selected window is not In all of the above cases, if the location list for the selected window is not
yet set, then it is set to the location list displayed in the location list yet set, then it is set to the location list displayed in the location list
@@ -1037,7 +1060,7 @@ commands can be combined to create a NewGrep command: >
matching is used to find matching lines. In this matching is used to find matching lines. In this
case, {pattern} is treated as a literal string case, {pattern} is treated as a literal string
instead of a regular expression. See instead of a regular expression. See
|fuzzy-match| for more information about fuzzy |fuzzy-matching| for more information about fuzzy
matching strings. matching strings.
|QuickFixCmdPre| and |QuickFixCmdPost| are triggered. |QuickFixCmdPre| and |QuickFixCmdPost| are triggered.
@@ -1385,12 +1408,17 @@ Basic items
%f file name (finds a string) %f file name (finds a string)
%o module name (finds a string) %o module name (finds a string)
%l line number (finds a number) %l line number (finds a number)
%e end line number (finds a number)
%c column number (finds a number representing character %c column number (finds a number representing character
column of the error, byte index, a <tab> is 1 column of the error, byte index, a <tab> is 1
character column) character column)
%v virtual column number (finds a number representing %v virtual column number (finds a number representing
screen column of the error (1 <tab> == 8 screen screen column of the error (1 <tab> == 8 screen
columns)) columns))
%k end column number (finds a number representing
the character column of the error, byte index, or a
number representing screen end column of the error if
it's used with %v)
%t error type (finds a single character): %t error type (finds a single character):
e - error message e - error message
w - warning message w - warning message

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 8.2. Last change: 2021 Dec 21 *quickref.txt* For Vim version 8.2. Last change: 2022 May 05
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -643,6 +643,7 @@ Short explanation of each option: *option-list*
'cinkeys' 'cink' keys that trigger indent when 'cindent' is set 'cinkeys' 'cink' keys that trigger indent when 'cindent' is set
'cinoptions' 'cino' how to do indenting when 'cindent' is set 'cinoptions' 'cino' how to do indenting when 'cindent' is set
'cinwords' 'cinw' words where 'si' and 'cin' add an indent 'cinwords' 'cinw' words where 'si' and 'cin' add an indent
'cinscopedecls' 'cinsd' words that are recognized by 'cino-g'
'clipboard' 'cb' use the clipboard as the unnamed register 'clipboard' 'cb' use the clipboard as the unnamed register
'cmdheight' 'ch' number of lines to use for the command-line 'cmdheight' 'ch' number of lines to use for the command-line
'cmdwinheight' 'cwh' height of the command-line window 'cmdwinheight' 'cwh' height of the command-line window
@@ -814,6 +815,7 @@ Short explanation of each option: *option-list*
'mousefocus' 'mousef' keyboard focus follows the mouse 'mousefocus' 'mousef' keyboard focus follows the mouse
'mousehide' 'mh' hide mouse pointer while typing 'mousehide' 'mh' hide mouse pointer while typing
'mousemodel' 'mousem' changes meaning of mouse buttons 'mousemodel' 'mousem' changes meaning of mouse buttons
'mousemoveevent' 'mousemev' report mouse moves with <MouseMove>
'mouseshape' 'mouses' shape of the mouse pointer in different modes 'mouseshape' 'mouses' shape of the mouse pointer in different modes
'mousetime' 'mouset' max time between mouse double-click 'mousetime' 'mouset' max time between mouse double-click
'mzquantum' 'mzq' the interval between polls for MzScheme threads 'mzquantum' 'mzq' the interval between polls for MzScheme threads
@@ -1348,7 +1350,7 @@ Context-sensitive completion on the command-line:
|CTRL-W_^| CTRL-W ^ split window and edit alternate file |CTRL-W_^| CTRL-W ^ split window and edit alternate file
|CTRL-W_n| CTRL-W n or :new create new empty window |CTRL-W_n| CTRL-W n or :new create new empty window
|CTRL-W_q| CTRL-W q or :q[uit] quit editing and close window |CTRL-W_q| CTRL-W q or :q[uit] quit editing and close window
|CTRL-W_c| CTRL-W c or :cl[ose] make buffer hidden and close window |CTRL-W_c| CTRL-W c or :clo[se] make buffer hidden and close window
|CTRL-W_o| CTRL-W o or :on[ly] make current window only one on the |CTRL-W_o| CTRL-W o or :on[ly] make current window only one on the
screen screen

View File

@@ -1,4 +1,4 @@
*remote.txt* For Vim version 8.2. Last change: 2021 Dec 27 *remote.txt* For Vim version 8.2. Last change: 2022 Feb 17
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -120,6 +120,10 @@ when sending command to it.
The --serverlist argument will cause Vim to print a list of registered command The --serverlist argument will cause Vim to print a list of registered command
servers on the standard output (stdout) and exit. servers on the standard output (stdout) and exit.
*{server}*
The {server} argument is used by several functions. When this is an empty
string then on Unix the default server name is used, which is "GVIM". On
MS-Windows an empty string does not work.
Win32 Note: Making the Vim server go to the foreground doesn't always work, Win32 Note: Making the Vim server go to the foreground doesn't always work,
because MS-Windows doesn't allow it. The client will move the server to the because MS-Windows doesn't allow it. The client will move the server to the

View File

@@ -1,4 +1,4 @@
*repeat.txt* For Vim version 8.2. Last change: 2022 Jan 21 *repeat.txt* For Vim version 8.2. Last change: 2022 Apr 08
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -197,6 +197,41 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
:so[urce] {file} Read Ex commands from {file}. These are commands that :so[urce] {file} Read Ex commands from {file}. These are commands that
start with a ":". start with a ":".
Triggers the |SourcePre| autocommand. Triggers the |SourcePre| autocommand.
:[range]so[urce] [++clear]
Read Ex commands from the [range] of lines in the
current buffer.
When sourcing commands from the current buffer, the
same script-ID |<SID>| is used even if the buffer is
sourced multiple times. If a buffer is sourced more
than once, then the functions in the buffer are
defined again.
To source a range of lines that doesn't start with the
|:vim9script| command in Vim9 script context, the
|:vim9cmd| modifier can be used. If you use a Visual
selection and type ":", the range in the form "'<,'>"
can come before it: >
:'<,'>vim9cmd source
< Otherwise the range goes after the modifier and must
have a colon prefixed, like all Vim9 ranges: >
:vim9cmd :5,9source
< When a range of lines in a buffer is sourced in the
Vim9 script context, the previously defined
script-local variables and functions are not cleared.
This works like the range started with the
":vim9script noclear" command. The "++clear" argument
can be used to clear the script-local variables and
functions before sourcing the script. This works like
the range started with the `:vim9script` command
without the "noclear" argument. See |vim9-reload| for
more information.
Examples: >
:4,5source
:10,18source ++clear
*:source!* *:source!*
:so[urce]! {file} Read Vim commands from {file}. These are commands :so[urce]! {file} Read Vim commands from {file}. These are commands
that are executed from Normal mode, like you type that are executed from Normal mode, like you type
@@ -419,10 +454,10 @@ An alternative is to put the commands in a file, and execute them with the
':source!' command. Useful for long command sequences. Can be combined with ':source!' command. Useful for long command sequences. Can be combined with
the ':map' command to put complicated commands under a function key. the ':map' command to put complicated commands under a function key.
The ':source' command reads Ex commands from a file line by line. You will The ':source' command reads Ex commands from a file or a buffer line by line.
have to type any needed keyboard input. The ':source!' command reads from a You will have to type any needed keyboard input. The ':source!' command reads
script file character by character, interpreting each character as if you from a script file character by character, interpreting each character as if
typed it. you typed it.
Example: When you give the ":!ls" command you get the |hit-enter| prompt. If Example: When you give the ":!ls" command you get the |hit-enter| prompt. If
you ':source' a file with the line "!ls" in it, you will have to type the you ':source' a file with the line "!ls" in it, you will have to type the
@@ -1008,18 +1043,24 @@ For example, to profile the one_script.vim script file: >
:prof[ile] start {fname} *:prof* *:profile* *E750* :prof[ile] start {fname} *:prof* *:profile* *E750*
Start profiling, write the output in {fname} upon exit. Start profiling, write the output in {fname} upon exit or when
a `:profile stop` or `:profile dump` command is invoked.
"~/" and environment variables in {fname} will be expanded. "~/" and environment variables in {fname} will be expanded.
If {fname} already exists it will be silently overwritten. If {fname} already exists it will be silently overwritten.
The variable |v:profiling| is set to one. The variable |v:profiling| is set to one.
:prof[ile] stop
Write the collected profiling information to the logfile and
stop profiling. You can use the `:profile start` command to
clear the profiling statistics and start profiling again.
:prof[ile] pause :prof[ile] pause
Don't profile until the following ":profile continue". Can be Don't profile until the following `:profile continue`. Can be
used when doing something that should not be counted (e.g., an used when doing something that should not be counted (e.g., an
external command). Does not nest. external command). Does not nest.
:prof[ile] continue :prof[ile] continue
Continue profiling after ":profile pause". Continue profiling after `:profile pause`.
:prof[ile] func {pattern} :prof[ile] func {pattern}
Profile function that matches the pattern {pattern}. Profile function that matches the pattern {pattern}.
@@ -1036,11 +1077,17 @@ For example, to profile the one_script.vim script file: >
after this command. A :profile command in the script itself after this command. A :profile command in the script itself
won't work. won't work.
:prof[ile] dump
Write the current state of profiling to the logfile
immediately. After running this command, Vim continues to
collect the profiling statistics.
:profd[el] ... *:profd* *:profdel* :profd[el] ... *:profd* *:profdel*
Stop profiling for the arguments specified. See |:breakdel| Stop profiling for the arguments specified. See |:breakdel|
for the arguments. for the arguments. Examples: >
profdel func MyFunc
profdel file MyScript.vim
profdel here
You must always start with a ":profile start fname" command. The resulting You must always start with a ":profile start fname" command. The resulting
file is written when Vim exits. For example, to profile one specific file is written when Vim exits. For example, to profile one specific

View File

@@ -1,4 +1,4 @@
*rileft.txt* For Vim version 8.2. Last change: 2021 Jun 13 *rileft.txt* For Vim version 8.2. Last change: 2022 Apr 03
VIM REFERENCE MANUAL by Avner Lottem VIM REFERENCE MANUAL by Avner Lottem
@@ -110,9 +110,6 @@ o Does not support reverse insert and rightleft modes on the command-line.
o Somewhat slower in right-to-left mode, because right-to-left motion is o Somewhat slower in right-to-left mode, because right-to-left motion is
emulated inside Vim, not by the controlling terminal. emulated inside Vim, not by the controlling terminal.
o When the Athena GUI is used, the bottom scrollbar works in the wrong
direction. This is difficult to fix.
o When both 'rightleft' and 'revins' are on: 'textwidth' does not work. o When both 'rightleft' and 'revins' are on: 'textwidth' does not work.
Lines do not wrap at all; you just get a single, long line. Lines do not wrap at all; you just get a single, long line.

View File

@@ -1,4 +1,4 @@
*scroll.txt* For Vim version 8.2. Last change: 2019 May 13 *scroll.txt* For Vim version 8.2. Last change: 2022 May 07
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -237,31 +237,34 @@ it works depends on your system. It might also work in an xterm
|xterm-mouse-wheel|. By default only vertical scroll wheels are supported, |xterm-mouse-wheel|. By default only vertical scroll wheels are supported,
but some GUIs also support horizontal scroll wheels. but some GUIs also support horizontal scroll wheels.
For the Win32 GUI the scroll action is hard coded. It works just like On MS-Windows, if the scroll action causes input focus -problems, see
dragging the scrollbar of the current window. How many lines are scrolled |intellimouse-wheel-problems|.
depends on your mouse driver. If the scroll action causes input focus
problems, see |intellimouse-wheel-problems|.
For the X11 GUIs (Motif, Athena and GTK) scrolling the wheel generates key For Win32 and the X11 GUIs (Motif and GTK) scrolling the wheel generates key
presses <ScrollWheelUp>, <ScrollWheelDown>, <ScrollWheelLeft> and presses <ScrollWheelUp>, <ScrollWheelDown>, <ScrollWheelLeft> and
<ScrollWheelRight>. For example, if you push the scroll wheel upwards a <ScrollWheelRight>. For example, if you push the scroll wheel upwards a
<ScrollWheelUp> key press is generated causing the window to scroll upwards <ScrollWheelUp> key press is generated causing the window to scroll upwards
(while the text is actually moving downwards). The default action for these (while the text is actually moving downwards). The default action for these
keys are: keys are:
<ScrollWheelUp> scroll three lines up *<ScrollWheelUp>* <ScrollWheelUp> scroll N lines up *<ScrollWheelUp>*
<S-ScrollWheelUp> scroll one page up *<S-ScrollWheelUp>* <S-ScrollWheelUp> scroll one page up *<S-ScrollWheelUp>*
<C-ScrollWheelUp> scroll one page up *<C-ScrollWheelUp>* <C-ScrollWheelUp> scroll one page up *<C-ScrollWheelUp>*
<ScrollWheelDown> scroll three lines down *<ScrollWheelDown>* <ScrollWheelDown> scroll N lines down *<ScrollWheelDown>*
<S-ScrollWheelDown> scroll one page down *<S-ScrollWheelDown>* <S-ScrollWheelDown> scroll one page down *<S-ScrollWheelDown>*
<C-ScrollWheelDown> scroll one page down *<C-ScrollWheelDown>* <C-ScrollWheelDown> scroll one page down *<C-ScrollWheelDown>*
<ScrollWheelLeft> scroll six columns left *<ScrollWheelLeft>* <ScrollWheelLeft> scroll N columns left *<ScrollWheelLeft>*
<S-ScrollWheelLeft> scroll one page left *<S-ScrollWheelLeft>* <S-ScrollWheelLeft> scroll one page left *<S-ScrollWheelLeft>*
<C-ScrollWheelLeft> scroll one page left *<C-ScrollWheelLeft>* <C-ScrollWheelLeft> scroll one page left *<C-ScrollWheelLeft>*
<ScrollWheelRight> scroll six columns right *<ScrollWheelRight>* <ScrollWheelRight> scroll N columns right *<ScrollWheelRight>*
<S-ScrollWheelRight> scroll one page right *<S-ScrollWheelRight>* <S-ScrollWheelRight> scroll one page right *<S-ScrollWheelRight>*
<C-ScrollWheelRight> scroll one page right *<C-ScrollWheelRight>* <C-ScrollWheelRight> scroll one page right *<C-ScrollWheelRight>*
This should work in all modes, except when editing the command line. This should work in all modes, except when editing the command line.
The value of N depends on the system. By default Vim scrolls three lines when
moving vertically, and six columns when moving horizontally. On MS-Windows
the amount of lines and columns for each scroll action is taken from the
system-wide settings.
Note that horizontal scrolling only works if 'nowrap' is set. Also, unless Note that horizontal scrolling only works if 'nowrap' is set. Also, unless
the "h" flag in 'guioptions' is set, the cursor moves to the longest visible the "h" flag in 'guioptions' is set, the cursor moves to the longest visible
line if the cursor line is about to be scrolled off the screen (similarly to line if the cursor line is about to be scrolled off the screen (similarly to

View File

@@ -101,7 +101,7 @@ precedence, otherwise the 'cursorline' highlighting.
Here is an example that places a sign "piet", displayed with the text ">>", in Here is an example that places a sign "piet", displayed with the text ">>", in
line 23 of the current file: > line 23 of the current file: >
:sign define piet text=>> texthl=Search :sign define piet text=>> texthl=Search
:exe ":sign place 2 line=23 name=piet file=" . expand("%:p") :exe ":sign place 2 line=23 name=piet file=" .. expand("%:p")
And here is the command to delete it again: > And here is the command to delete it again: >
:sign unplace 2 :sign unplace 2

View File

@@ -131,8 +131,8 @@ zuG Undo |zW| and |zG|, remove the word from the internal
rare as this is a fairly uncommon command and all rare as this is a fairly uncommon command and all
intuitive commands for this are already taken. If you intuitive commands for this are already taken. If you
want you can add mappings with e.g.: > want you can add mappings with e.g.: >
nnoremap z? :exe ':spellrare ' . expand('<cWORD>')<CR> nnoremap z? :exe ':spellrare ' .. expand('<cWORD>')<CR>
nnoremap z/ :exe ':spellrare! ' . expand('<cWORD>')<CR> nnoremap z/ :exe ':spellrare! ' .. expand('<cWORD>')<CR>
< |:spellundo|, |zuw|, or |zuW| can be used to undo this. < |:spellundo|, |zuw|, or |zuW| can be used to undo this.
:spellr[rare]! {word} Add {word} as a rare word to the internal word :spellr[rare]! {word} Add {word} as a rare word to the internal word

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 8.2. Last change: 2022 Jan 20 *starting.txt* For Vim version 8.2. Last change: 2022 Apr 12
VIM REFERENCE MANUAL by Bram Moolenaar 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, Interfaces, such as Python, Ruby and Lua, are also disabled,
since they could be used to execute shell commands. Perl uses since they could be used to execute shell commands. Perl uses
the Safe module. 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 Note that the user may still find a loophole to execute a
shell command, it has only been made difficult. shell command, it has only been made difficult.
@@ -342,6 +344,12 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
Example: > Example: >
vim -V20vimlog foobar vim -V20vimlog foobar
< <
--log {filename} *--log*
Start logging and write entries to {filename}.
This works like calling `ch_logfile({filename}, 'a')` very
early during startup.
{only available with the +channel feature}
*-D* *-D*
-D Debugging. Go to debugging mode when executing the first -D Debugging. Go to debugging mode when executing the first
command from a script. |debug-mode| command from a script. |debug-mode|
@@ -562,6 +570,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
{scriptout} cannot start with a digit. {scriptout} cannot start with a digit.
If you want to record what is typed in a human readable for If you want to record what is typed in a human readable for
you can use |ch_logfile()|, It adds "raw key input" lines. you can use |ch_logfile()|, It adds "raw key input" lines.
Also see |--log|.
*-W* *-W*
-W {scriptout} Like -w, but do not append, overwrite an existing file. -W {scriptout} Like -w, but do not append, overwrite an existing file.
@@ -1376,7 +1385,7 @@ resulting file, when executed with a ":source" command:
After restoring the Session, the full filename of your current Session is After restoring the Session, the full filename of your current Session is
available in the internal variable "v:this_session" |this_session-variable|. available in the internal variable "v:this_session" |this_session-variable|.
An example mapping: > An example mapping: >
:nmap <F2> :wa<Bar>exe "mksession! " . v:this_session<CR>:so ~/sessions/ :nmap <F2> :wa<Bar>exe "mksession! " .. v:this_session<CR>:so ~/sessions/
This saves the current Session, and starts off the command to load another. This saves the current Session, and starts off the command to load another.
A session includes all tab pages, unless "tabpages" was removed from A session includes all tab pages, unless "tabpages" was removed from

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 May 06
VIM REFERENCE MANUAL by Bram Moolenaar 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 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 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 maximum 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 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. be preferred names for highlight groups that are common for many languages.
@@ -652,7 +653,7 @@ evaluate to get a unique string to append to each ID used in a given document,
so that the full IDs will be unique even when combined with other content in a so that the full IDs will be unique even when combined with other content in a
larger HTML document. Example, to append _ and the buffer number to each ID: > larger HTML document. Example, to append _ and the buffer number to each ID: >
:let g:html_id_expr = '"_".bufnr("%")' :let g:html_id_expr = '"_" .. bufnr("%")'
< <
To append a string "_mystring" to the end of each ID: > To append a string "_mystring" to the end of each ID: >
@@ -1536,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 gvim display. Here, statements are colored LightYellow instead of Yellow, and
conditionals are LightBlue for better distinction. 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* FORTH *forth.vim* *ft-forth-syntax*
@@ -2188,6 +2197,15 @@ $VIMRUNTIME/syntax/syntax.vim).
mv_finance mv_logic mv_powseries mv_finance mv_logic mv_powseries
MARKDOWN *ft-markdown-syntax*
If you have long regions there might be wrong highlighting. At the cost of
slowing down displaying, you can have the engine look further back to sync on
the start of a region, for example 500 lines: >
:let g:markdown_minlines = 500
MATHEMATICA *mma.vim* *ft-mma-syntax* *ft-mathematica-syntax* MATHEMATICA *mma.vim* *ft-mma-syntax* *ft-mathematica-syntax*
Empty *.m files will automatically be presumed to be Matlab files unless you Empty *.m files will automatically be presumed to be Matlab files unless you
@@ -3598,8 +3616,8 @@ Do you want to draw with the mouse? Try the following: >
:function! GetPixel() :function! GetPixel()
: let c = getline(".")[col(".") - 1] : let c = getline(".")[col(".") - 1]
: echo c : echo c
: exe "noremap <LeftMouse> <LeftMouse>r".c : exe "noremap <LeftMouse> <LeftMouse>r" .. c
: exe "noremap <LeftDrag> <LeftMouse>r".c : exe "noremap <LeftDrag> <LeftMouse>r" .. c
:endfunction :endfunction
:noremap <RightMouse> <LeftMouse>:call GetPixel()<CR> :noremap <RightMouse> <LeftMouse>:call GetPixel()<CR>
:set guicursor=n:hor20 " to see the color beneath the cursor :set guicursor=n:hor20 " to see the color beneath the cursor
@@ -3704,12 +3722,13 @@ DEFINING CASE *:syn-case* *E390*
items until the next ":syntax case" command are affected. items until the next ":syntax case" command are affected.
:sy[ntax] case :sy[ntax] case
Show either "syntax case match" or "syntax case ignore" (translated). Show either "syntax case match" or "syntax case ignore".
DEFINING FOLDLEVEL *:syn-foldlevel* DEFINING FOLDLEVEL *:syn-foldlevel*
:sy[ntax] foldlevel [start | minimum] :sy[ntax] foldlevel start
:sy[ntax] foldlevel minimum
This defines how the foldlevel of a line is computed when using This defines how the foldlevel of a line is computed when using
foldmethod=syntax (see |fold-syntax| and |:syn-fold|): foldmethod=syntax (see |fold-syntax| and |:syn-fold|):
@@ -3722,13 +3741,16 @@ DEFINING FOLDLEVEL *:syn-foldlevel*
may close and open horizontally within a line. may close and open horizontally within a line.
:sy[ntax] foldlevel :sy[ntax] foldlevel
Show either "syntax foldlevel start" or "syntax foldlevel minimum". Show the current foldlevel method, either "syntax foldlevel start" or
"syntax foldlevel minimum".
{not meaningful when Vim was compiled without |+folding| feature} {not meaningful when Vim was compiled without |+folding| feature}
SPELL CHECKING *:syn-spell* SPELL CHECKING *:syn-spell*
:sy[ntax] spell [toplevel | notoplevel | default] :sy[ntax] spell toplevel
:sy[ntax] spell notoplevel
:sy[ntax] spell default
This defines where spell checking is to be done for text that is not This defines where spell checking is to be done for text that is not
in a syntax item: in a syntax item:
@@ -3743,8 +3765,8 @@ SPELL CHECKING *:syn-spell*
To activate spell checking the 'spell' option must be set. To activate spell checking the 'spell' option must be set.
:sy[ntax] spell :sy[ntax] spell
Show either "syntax spell toplevel", "syntax spell notoplevel" or Show the current syntax spell checking method, either "syntax spell
"syntax spell default" (translated). toplevel", "syntax spell notoplevel" or "syntax spell default".
SYNTAX ISKEYWORD SETTING *:syn-iskeyword* SYNTAX ISKEYWORD SETTING *:syn-iskeyword*
@@ -4343,7 +4365,7 @@ IMPLICIT CONCEAL *:syn-conceal-implicit*
given explicitly. given explicitly.
:sy[ntax] conceal :sy[ntax] conceal
Show either "syntax conceal on" or "syntax conceal off" (translated). Show either "syntax conceal on" or "syntax conceal off".
============================================================================== ==============================================================================
8. Syntax patterns *:syn-pattern* *E401* *E402* 8. Syntax patterns *:syn-pattern* *E401* *E402*
@@ -4439,7 +4461,7 @@ Leading context *:syn-lc* *:syn-leading* *:syn-context*
Note: This is an obsolete feature, only included for backwards compatibility Note: This is an obsolete feature, only included for backwards compatibility
with previous Vim versions. It's now recommended to use the |/\@<=| construct with previous Vim versions. It's now recommended to use the |/\@<=| construct
in the pattern. in the pattern. You can also often use |/\zs|.
The "lc" offset specifies leading context -- a part of the pattern that must The "lc" offset specifies leading context -- a part of the pattern that must
be present, but is not considered part of the match. An offset of "lc=n" will be present, but is not considered part of the match. An offset of "lc=n" will
@@ -4885,7 +4907,7 @@ in their own color.
:hi[ghlight] {group-name} :hi[ghlight] {group-name}
List one highlight group. List one highlight group.
*highlight-clear* *highlight-clear* *:hi-clear*
:hi[ghlight] clear Reset all highlighting to the defaults. Removes all :hi[ghlight] clear Reset all highlighting to the defaults. Removes all
highlighting for groups added by the user! highlighting for groups added by the user!
Uses the current value of 'background' to decide which Uses the current value of 'background' to decide which
@@ -4948,7 +4970,7 @@ the same syntax file on all terminals, and use the optimal highlighting.
*inverse* *italic* *standout* *inverse* *italic* *standout*
*nocombine* *strikethrough* *nocombine* *strikethrough*
term={attr-list} *attr-list* *highlight-term* *E418* term={attr-list} *attr-list* *highlight-term* *E418*
attr-list is a comma separated list (without spaces) of the attr-list is a comma-separated list (without spaces) of the
following items (in any order): following items (in any order):
bold bold
underline underline
@@ -5132,7 +5154,7 @@ font={font-name} *highlight-font*
When setting the font for the "Normal" group, this becomes the default When setting the font for the "Normal" group, this becomes the default
font (until the 'guifont' option is changed; the last one set is font (until the 'guifont' option is changed; the last one set is
used). used).
The following only works with Motif and Athena, not with other GUIs: The following only works with Motif, not with other GUIs:
When setting the font for the "Menu" group, the menus will be changed. When setting the font for the "Menu" group, the menus will be changed.
When setting the font for the "Tooltip" group, the tooltips will be When setting the font for the "Tooltip" group, the tooltips will be
changed. changed.
@@ -5216,6 +5238,9 @@ These are the default highlighting groups. These groups are used by the
'highlight' option default. Note that the highlighting depends on the value 'highlight' option default. Note that the highlighting depends on the value
of 'background'. You can see the current settings with the ":highlight" of 'background'. You can see the current settings with the ":highlight"
command. command.
When possible the name is highlighted in the used colors. If this makes it
unreadable use Visual selection.
*hl-ColorColumn* *hl-ColorColumn*
ColorColumn used for the columns set with 'colorcolumn' ColorColumn used for the columns set with 'colorcolumn'
*hl-Conceal* *hl-Conceal*
@@ -5305,6 +5330,10 @@ QuickFixLine Current |quickfix| item in the quickfix window.
*hl-Search* *hl-Search*
Search Last search pattern highlighting (see 'hlsearch'). Search Last search pattern highlighting (see 'hlsearch').
Also used for similar items that need to stand out. Also used for similar items that need to stand out.
*hl-CurSearch*
CurSearch Current match for the last search pattern (see 'hlsearch').
Note: this is correct after a search, but may get outdated if
changes are made or the screen is redrawn.
*hl-SpecialKey* *hl-SpecialKey*
SpecialKey Meta and special keys listed with ":map", also for text used SpecialKey Meta and special keys listed with ":map", also for text used
to show unprintable characters in the text, 'listchars'. to show unprintable characters in the text, 'listchars'.
@@ -5369,7 +5398,7 @@ Menu Current font, background and foreground colors of the menus.
Also used for the toolbar. Also used for the toolbar.
Applicable highlight arguments: font, guibg, guifg. Applicable highlight arguments: font, guibg, guifg.
NOTE: For Motif and Athena the font argument actually NOTE: For Motif the font argument actually
specifies a fontset at all times, no matter if 'guifontset' is specifies a fontset at all times, no matter if 'guifontset' is
empty, and as such it is tied to the current |:language| when empty, and as such it is tied to the current |:language| when
set. set.
@@ -5383,7 +5412,7 @@ Scrollbar Current background and foreground of the main window's
Tooltip Current font, background and foreground of the tooltips. Tooltip Current font, background and foreground of the tooltips.
Applicable highlight arguments: font, guibg, guifg. Applicable highlight arguments: font, guibg, guifg.
NOTE: For Motif and Athena the font argument actually NOTE: For Motif the font argument actually
specifies a fontset at all times, no matter if 'guifontset' is specifies a fontset at all times, no matter if 'guifontset' is
empty, and as such it is tied to the current |:language| when empty, and as such it is tied to the current |:language| when
set. set.
@@ -5540,11 +5569,12 @@ WARNING: The longer the tags file, the slower this will be, and the more
memory Vim will consume. memory Vim will consume.
Only highlighting typedefs, unions and structs can be done too. For this you Only highlighting typedefs, unions and structs can be done too. For this you
must use Exuberant ctags (found at http://ctags.sf.net). must use Universal Ctags (found at https://ctags.io) or Exuberant ctags (found
at http://ctags.sf.net).
Put these lines in your Makefile: Put these lines in your Makefile:
# Make a highlight file for types. Requires Exuberant ctags and awk # Make a highlight file for types. Requires Universal/Exuberant ctags and awk
types: types.vim types: types.vim
types.vim: *.[ch] types.vim: *.[ch]
ctags --c-kinds=gstu -o- *.[ch] |\ ctags --c-kinds=gstu -o- *.[ch] |\
@@ -5554,9 +5584,9 @@ types.vim: *.[ch]
And put these lines in your .vimrc: > And put these lines in your .vimrc: >
" load the types.vim highlighting file, if it exists " load the types.vim highlighting file, if it exists
autocmd BufRead,BufNewFile *.[ch] let fname = expand('<afile>:p:h') . '/types.vim' autocmd BufRead,BufNewFile *.[ch] let fname = expand('<afile>:p:h') .. '/types.vim'
autocmd BufRead,BufNewFile *.[ch] if filereadable(fname) autocmd BufRead,BufNewFile *.[ch] if filereadable(fname)
autocmd BufRead,BufNewFile *.[ch] exe 'so ' . fname autocmd BufRead,BufNewFile *.[ch] exe 'so ' .. fname
autocmd BufRead,BufNewFile *.[ch] endif autocmd BufRead,BufNewFile *.[ch] endif
============================================================================== ==============================================================================

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 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -143,7 +143,9 @@ something else.
:tabclose 3 " close the third tab page :tabclose 3 " close the third tab page
:tabclose $ " close the last tab page :tabclose $ " close the last tab page
:tabclose # " close the last accessed 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* *:tabonly*
:tabo[nly][!] Close all other tab pages. :tabo[nly][!] Close all other tab pages.
When the 'hidden' option is set, all buffers in closed windows When the 'hidden' option is set, all buffers in closed windows
@@ -379,24 +381,24 @@ pages and define labels for them. Then get the label for each tab page. >
for i in range(tabpagenr('$')) for i in range(tabpagenr('$'))
" select the highlighting " select the highlighting
if i + 1 == tabpagenr() if i + 1 == tabpagenr()
let s .= '%#TabLineSel#' let s ..= '%#TabLineSel#'
else else
let s .= '%#TabLine#' let s ..= '%#TabLine#'
endif endif
" set the tab page number (for mouse clicks) " set the tab page number (for mouse clicks)
let s .= '%' . (i + 1) . 'T' let s ..= '%' .. (i + 1) .. 'T'
" the label is made by MyTabLabel() " the label is made by MyTabLabel()
let s .= ' %{MyTabLabel(' . (i + 1) . ')} ' let s ..= ' %{MyTabLabel(' .. (i + 1) .. ')} '
endfor endfor
" after the last tab fill with TabLineFill and reset tab page nr " after the last tab fill with TabLineFill and reset tab page nr
let s .= '%#TabLineFill#%T' let s ..= '%#TabLineFill#%T'
" right-align the label to close the current tab page " right-align the label to close the current tab page
if tabpagenr('$') > 1 if tabpagenr('$') > 1
let s .= '%=%#TabLine#%999Xclose' let s ..= '%=%#TabLine#%999Xclose'
endif endif
return s return s
@@ -459,14 +461,14 @@ windows in the tab page and a '+' if there is a modified buffer: >
" Append the number of windows in the tab page if more than one " Append the number of windows in the tab page if more than one
let wincount = tabpagewinnr(v:lnum, '$') let wincount = tabpagewinnr(v:lnum, '$')
if wincount > 1 if wincount > 1
let label .= wincount let label ..= wincount
endif endif
if label != '' if label != ''
let label .= ' ' let label ..= ' '
endif endif
" Append the buffer name " Append the buffer name
return label . bufname(bufnrlist[tabpagewinnr(v:lnum) - 1]) return label .. bufname(bufnrlist[tabpagewinnr(v:lnum) - 1])
endfunction endfunction
set guitablabel=%{GuiTabLabel()} set guitablabel=%{GuiTabLabel()}

View File

@@ -134,6 +134,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'cinkeys' options.txt /*'cinkeys'* 'cinkeys' options.txt /*'cinkeys'*
'cino' options.txt /*'cino'* 'cino' options.txt /*'cino'*
'cinoptions' options.txt /*'cinoptions'* 'cinoptions' options.txt /*'cinoptions'*
'cinscopedecls' options.txt /*'cinscopedecls'*
'cinsd' options.txt /*'cinsd'*
'cinw' options.txt /*'cinw'* 'cinw' options.txt /*'cinw'*
'cinwords' options.txt /*'cinwords'* 'cinwords' options.txt /*'cinwords'*
'clipboard' options.txt /*'clipboard'* 'clipboard' options.txt /*'clipboard'*
@@ -487,7 +489,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'mousefocus' options.txt /*'mousefocus'* 'mousefocus' options.txt /*'mousefocus'*
'mousehide' options.txt /*'mousehide'* 'mousehide' options.txt /*'mousehide'*
'mousem' options.txt /*'mousem'* 'mousem' options.txt /*'mousem'*
'mousemev' options.txt /*'mousemev'*
'mousemodel' options.txt /*'mousemodel'* 'mousemodel' options.txt /*'mousemodel'*
'mousemoveevent' options.txt /*'mousemoveevent'*
'mouses' options.txt /*'mouses'* 'mouses' options.txt /*'mouses'*
'mouseshape' options.txt /*'mouseshape'* 'mouseshape' options.txt /*'mouseshape'*
'mouset' options.txt /*'mouset'* 'mouset' options.txt /*'mouset'*
@@ -1355,6 +1359,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
+mouse various.txt /*+mouse* +mouse various.txt /*+mouse*
+mouse_dec various.txt /*+mouse_dec* +mouse_dec various.txt /*+mouse_dec*
+mouse_gpm various.txt /*+mouse_gpm* +mouse_gpm various.txt /*+mouse_gpm*
+mouse_gpm/dyn various.txt /*+mouse_gpm\/dyn*
+mouse_jsbterm various.txt /*+mouse_jsbterm* +mouse_jsbterm various.txt /*+mouse_jsbterm*
+mouse_netterm various.txt /*+mouse_netterm* +mouse_netterm various.txt /*+mouse_netterm*
+mouse_pterm various.txt /*+mouse_pterm* +mouse_pterm various.txt /*+mouse_pterm*
@@ -1452,6 +1457,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
--echo-wid starting.txt /*--echo-wid* --echo-wid starting.txt /*--echo-wid*
--help starting.txt /*--help* --help starting.txt /*--help*
--literal starting.txt /*--literal* --literal starting.txt /*--literal*
--log starting.txt /*--log*
--nofork starting.txt /*--nofork* --nofork starting.txt /*--nofork*
--noplugin starting.txt /*--noplugin* --noplugin starting.txt /*--noplugin*
--not-a-term starting.txt /*--not-a-term* --not-a-term starting.txt /*--not-a-term*
@@ -1998,6 +2004,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:<cfile> cmdline.txt /*:<cfile>* :<cfile> cmdline.txt /*:<cfile>*
:<client> cmdline.txt /*:<client>* :<client> cmdline.txt /*:<client>*
:<cword> cmdline.txt /*:<cword>* :<cword> cmdline.txt /*:<cword>*
:<script> cmdline.txt /*:<script>*
:<sfile> cmdline.txt /*:<sfile>* :<sfile> cmdline.txt /*:<sfile>*
:<sflnum> cmdline.txt /*:<sflnum>* :<sflnum> cmdline.txt /*:<sflnum>*
:<slnum> cmdline.txt /*:<slnum>* :<slnum> cmdline.txt /*:<slnum>*
@@ -2077,6 +2084,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:Termdebug terminal.txt /*:Termdebug* :Termdebug terminal.txt /*:Termdebug*
:TermdebugCommand terminal.txt /*:TermdebugCommand* :TermdebugCommand terminal.txt /*:TermdebugCommand*
:Texplore pi_netrw.txt /*:Texplore* :Texplore pi_netrw.txt /*:Texplore*
:Until terminal.txt /*:Until*
:UseVimball pi_vimball.txt /*:UseVimball* :UseVimball pi_vimball.txt /*:UseVimball*
:Vexplore pi_netrw.txt /*:Vexplore* :Vexplore pi_netrw.txt /*:Vexplore*
:VimballList pi_vimball.txt /*:VimballList* :VimballList pi_vimball.txt /*:VimballList*
@@ -2112,6 +2120,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:abclear map.txt /*:abclear* :abclear map.txt /*:abclear*
:abo windows.txt /*:abo* :abo windows.txt /*:abo*
:aboveleft windows.txt /*:aboveleft* :aboveleft windows.txt /*:aboveleft*
:abstract vim9.txt /*:abstract*
:addd quickfix.txt /*:addd* :addd quickfix.txt /*:addd*
:al windows.txt /*:al* :al windows.txt /*:al*
:all windows.txt /*:all* :all windows.txt /*:all*
@@ -2271,6 +2280,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:chistory quickfix.txt /*:chistory* :chistory quickfix.txt /*:chistory*
:cl quickfix.txt /*:cl* :cl quickfix.txt /*:cl*
:cla quickfix.txt /*:cla* :cla quickfix.txt /*:cla*
:class vim9.txt /*:class*
:clast quickfix.txt /*:clast* :clast quickfix.txt /*:clast*
:cle motion.txt /*:cle* :cle motion.txt /*:cle*
:clearjumps motion.txt /*:clearjumps* :clearjumps motion.txt /*:clearjumps*
@@ -2415,6 +2425,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:dsp tagsrch.txt /*:dsp* :dsp tagsrch.txt /*:dsp*
:dsplit tagsrch.txt /*:dsplit* :dsplit tagsrch.txt /*:dsplit*
:e editing.txt /*:e* :e editing.txt /*:e*
:e# editing.txt /*:e#*
:ea undo.txt /*:ea* :ea undo.txt /*:ea*
:earlier undo.txt /*:earlier* :earlier undo.txt /*:earlier*
:ec eval.txt /*:ec* :ec eval.txt /*:ec*
@@ -2432,6 +2443,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:edit editing.txt /*:edit* :edit editing.txt /*:edit*
:edit! editing.txt /*:edit!* :edit! editing.txt /*:edit!*
:edit!_f editing.txt /*:edit!_f* :edit!_f editing.txt /*:edit!_f*
:edit_# editing.txt /*:edit_#*
:edit_f editing.txt /*:edit_f* :edit_f editing.txt /*:edit_f*
:el eval.txt /*:el* :el eval.txt /*:el*
:else eval.txt /*:else* :else eval.txt /*:else*
@@ -2441,12 +2453,15 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:emenu gui.txt /*:emenu* :emenu gui.txt /*:emenu*
:en eval.txt /*:en* :en eval.txt /*:en*
:end eval.txt /*:end* :end eval.txt /*:end*
:endclass vim9.txt /*:endclass*
:enddef vim9.txt /*:enddef* :enddef vim9.txt /*:enddef*
:endenum vim9.txt /*:endenum*
:endf eval.txt /*:endf* :endf eval.txt /*:endf*
:endfo eval.txt /*:endfo* :endfo eval.txt /*:endfo*
:endfor eval.txt /*:endfor* :endfor eval.txt /*:endfor*
:endfunction eval.txt /*:endfunction* :endfunction eval.txt /*:endfunction*
:endif eval.txt /*:endif* :endif eval.txt /*:endif*
:endinterface vim9.txt /*:endinterface*
:endt eval.txt /*:endt* :endt eval.txt /*:endt*
:endtry eval.txt /*:endtry* :endtry eval.txt /*:endtry*
:endw eval.txt /*:endw* :endw eval.txt /*:endw*
@@ -2455,6 +2470,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:ene! editing.txt /*:ene!* :ene! editing.txt /*:ene!*
:enew editing.txt /*:enew* :enew editing.txt /*:enew*
:enew! editing.txt /*:enew!* :enew! editing.txt /*:enew!*
:enum vim9.txt /*:enum*
:eval eval.txt /*:eval* :eval eval.txt /*:eval*
:ex editing.txt /*:ex* :ex editing.txt /*:ex*
:exe eval.txt /*:exe* :exe eval.txt /*:exe*
@@ -2537,6 +2553,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:helpt helphelp.txt /*:helpt* :helpt helphelp.txt /*:helpt*
:helptags helphelp.txt /*:helptags* :helptags helphelp.txt /*:helptags*
:hi syntax.txt /*:hi* :hi syntax.txt /*:hi*
:hi-clear syntax.txt /*:hi-clear*
:hi-default syntax.txt /*:hi-default* :hi-default syntax.txt /*:hi-default*
:hi-link syntax.txt /*:hi-link* :hi-link syntax.txt /*:hi-link*
:hi-normal syntax.txt /*:hi-normal* :hi-normal syntax.txt /*:hi-normal*
@@ -2581,6 +2598,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:inoreme gui.txt /*:inoreme* :inoreme gui.txt /*:inoreme*
:inoremenu gui.txt /*:inoremenu* :inoremenu gui.txt /*:inoremenu*
:insert insert.txt /*:insert* :insert insert.txt /*:insert*
:interface vim9.txt /*:interface*
:intro starting.txt /*:intro* :intro starting.txt /*:intro*
:is tagsrch.txt /*:is* :is tagsrch.txt /*:is*
:isearch tagsrch.txt /*:isearch* :isearch tagsrch.txt /*:isearch*
@@ -3213,6 +3231,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:startgreplace insert.txt /*:startgreplace* :startgreplace insert.txt /*:startgreplace*
:startinsert insert.txt /*:startinsert* :startinsert insert.txt /*:startinsert*
:startreplace insert.txt /*:startreplace* :startreplace insert.txt /*:startreplace*
:static vim9.txt /*:static*
:stj tagsrch.txt /*:stj* :stj tagsrch.txt /*:stj*
:stjump tagsrch.txt /*:stjump* :stjump tagsrch.txt /*:stjump*
:stop starting.txt /*:stop* :stop starting.txt /*:stop*
@@ -3390,6 +3409,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:tunma map.txt /*:tunma* :tunma map.txt /*:tunma*
:tunmap map.txt /*:tunmap* :tunmap map.txt /*:tunmap*
:tunmenu gui.txt /*:tunmenu* :tunmenu gui.txt /*:tunmenu*
:type vim9.txt /*:type*
:u undo.txt /*:u* :u undo.txt /*:u*
:un undo.txt /*:un* :un undo.txt /*:un*
:una map.txt /*:una* :una map.txt /*:una*
@@ -3604,6 +3624,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
<MiddleRelease> term.txt /*<MiddleRelease>* <MiddleRelease> term.txt /*<MiddleRelease>*
<Mouse> term.txt /*<Mouse>* <Mouse> term.txt /*<Mouse>*
<MouseDown> scroll.txt /*<MouseDown>* <MouseDown> scroll.txt /*<MouseDown>*
<MouseMove> map.txt /*<MouseMove>*
<MouseUp> scroll.txt /*<MouseUp>* <MouseUp> scroll.txt /*<MouseUp>*
<NL> motion.txt /*<NL>* <NL> motion.txt /*<NL>*
<Nop> map.txt /*<Nop>* <Nop> map.txt /*<Nop>*
@@ -3704,6 +3725,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
<range> map.txt /*<range>* <range> map.txt /*<range>*
<reg> map.txt /*<reg>* <reg> map.txt /*<reg>*
<register> map.txt /*<register>* <register> map.txt /*<register>*
<script> cmdline.txt /*<script>*
<sfile> cmdline.txt /*<sfile>* <sfile> cmdline.txt /*<sfile>*
<sflnum> cmdline.txt /*<sflnum>* <sflnum> cmdline.txt /*<sflnum>*
<slnum> cmdline.txt /*<slnum>* <slnum> cmdline.txt /*<slnum>*
@@ -3759,7 +3781,6 @@ Aleph options.txt /*Aleph*
Amiga os_amiga.txt /*Amiga* Amiga os_amiga.txt /*Amiga*
Arabic arabic.txt /*Arabic* Arabic arabic.txt /*Arabic*
Atari os_mint.txt /*Atari* Atari os_mint.txt /*Atari*
Athena gui_x11.txt /*Athena*
B motion.txt /*B* B motion.txt /*B*
BeBox os_beos.txt /*BeBox* BeBox os_beos.txt /*BeBox*
BeOS os_beos.txt /*BeOS* BeOS os_beos.txt /*BeOS*
@@ -3948,6 +3969,7 @@ Dictionary-function eval.txt /*Dictionary-function*
DiffUpdated autocmd.txt /*DiffUpdated* DiffUpdated autocmd.txt /*DiffUpdated*
Digraphs digraph.txt /*Digraphs* Digraphs digraph.txt /*Digraphs*
DirChanged autocmd.txt /*DirChanged* DirChanged autocmd.txt /*DirChanged*
DirChangedPre autocmd.txt /*DirChangedPre*
E motion.txt /*E* E motion.txt /*E*
E10 message.txt /*E10* E10 message.txt /*E10*
E100 diff.txt /*E100* E100 diff.txt /*E100*
@@ -4018,6 +4040,7 @@ E1061 vim9.txt /*E1061*
E1062 eval.txt /*E1062* E1062 eval.txt /*E1062*
E1063 eval.txt /*E1063* E1063 eval.txt /*E1063*
E1064 autocmd.txt /*E1064* E1064 autocmd.txt /*E1064*
E1065 vim9.txt /*E1065*
E1066 vim9.txt /*E1066* E1066 vim9.txt /*E1066*
E1067 eval.txt /*E1067* E1067 eval.txt /*E1067*
E1068 vim9.txt /*E1068* E1068 vim9.txt /*E1068*
@@ -4030,33 +4053,131 @@ E1074 vim9.txt /*E1074*
E1075 vim9.txt /*E1075* E1075 vim9.txt /*E1075*
E1076 eval.txt /*E1076* E1076 eval.txt /*E1076*
E1077 vim9.txt /*E1077* E1077 vim9.txt /*E1077*
E1078 autocmd.txt /*E1078*
E1079 vim9.txt /*E1079*
E108 eval.txt /*E108* E108 eval.txt /*E108*
E1080 vim9.txt /*E1080*
E1081 eval.txt /*E1081* E1081 eval.txt /*E1081*
E1083 editing.txt /*E1083* E1083 editing.txt /*E1083*
E1084 eval.txt /*E1084*
E1085 eval.txt /*E1085*
E1087 vim9.txt /*E1087*
E1089 eval.txt /*E1089*
E109 eval.txt /*E109* E109 eval.txt /*E109*
E1090 eval.txt /*E1090*
E1091 vim9.txt /*E1091* E1091 vim9.txt /*E1091*
E1092 various.txt /*E1092*
E1093 eval.txt /*E1093*
E1094 vim9.txt /*E1094* E1094 vim9.txt /*E1094*
E1095 eval.txt /*E1095*
E1096 vim9.txt /*E1096*
E1097 vim9.txt /*E1097*
E1098 eval.txt /*E1098*
E1099 vim9.txt /*E1099*
E11 cmdline.txt /*E11* E11 cmdline.txt /*E11*
E110 eval.txt /*E110* E110 eval.txt /*E110*
E1100 vim9.txt /*E1100*
E1101 vim9.txt /*E1101*
E1102 vim9.txt /*E1102*
E1103 vim9.txt /*E1103*
E1104 vim9.txt /*E1104*
E1105 vim9.txt /*E1105*
E1106 vim9.txt /*E1106*
E1107 eval.txt /*E1107*
E1108 vim9.txt /*E1108*
E1109 builtin.txt /*E1109* E1109 builtin.txt /*E1109*
E111 eval.txt /*E111* E111 eval.txt /*E111*
E1110 builtin.txt /*E1110* E1110 builtin.txt /*E1110*
E1111 builtin.txt /*E1111* E1111 builtin.txt /*E1111*
E1112 builtin.txt /*E1112* E1112 builtin.txt /*E1112*
E1113 builtin.txt /*E1113* E1113 builtin.txt /*E1113*
E1114 builtin.txt /*E1114*
E1115 testing.txt /*E1115*
E1116 testing.txt /*E1116*
E1117 vim9.txt /*E1117*
E1118 eval.txt /*E1118*
E1119 eval.txt /*E1119*
E112 eval.txt /*E112* E112 eval.txt /*E112*
E1120 eval.txt /*E1120*
E1121 eval.txt /*E1121*
E1122 eval.txt /*E1122*
E1123 vim9.txt /*E1123*
E1124 vim9.txt /*E1124*
E1125 vim9.txt /*E1125*
E1126 vim9.txt /*E1126*
E1127 vim9.txt /*E1127*
E1128 vim9.txt /*E1128*
E1129 eval.txt /*E1129*
E113 eval.txt /*E113* E113 eval.txt /*E113*
E1130 vim9.txt /*E1130*
E1131 vim9.txt /*E1131*
E1132 builtin.txt /*E1132*
E1133 vim9.txt /*E1133*
E1134 vim9.txt /*E1134*
E1135 eval.txt /*E1135*
E1136 map.txt /*E1136* E1136 map.txt /*E1136*
E1137 map.txt /*E1137* E1137 map.txt /*E1137*
E1138 eval.txt /*E1138*
E1139 vim9.txt /*E1139*
E114 eval.txt /*E114* E114 eval.txt /*E114*
E1140 eval.txt /*E1140*
E1141 eval.txt /*E1141*
E1142 testing.txt /*E1142*
E1143 eval.txt /*E1143*
E1144 vim9.txt /*E1144*
E1145 eval.txt /*E1145*
E1146 vim9.txt /*E1146*
E1147 eval.txt /*E1147*
E1148 eval.txt /*E1148*
E1149 vim9.txt /*E1149*
E115 eval.txt /*E115* E115 eval.txt /*E115*
E1150 vim9.txt /*E1150*
E1151 eval.txt /*E1151*
E1152 vim9.txt /*E1152*
E1153 eval.txt /*E1153*
E1154 eval.txt /*E1154*
E1155 autocmd.txt /*E1155* E1155 autocmd.txt /*E1155*
E1156 editing.txt /*E1156*
E1157 vim9.txt /*E1157*
E1158 vim9.txt /*E1158*
E1159 windows.txt /*E1159*
E116 eval.txt /*E116* E116 eval.txt /*E116*
E1160 vim9.txt /*E1160*
E1161 builtin.txt /*E1161*
E1162 builtin.txt /*E1162*
E1163 vim9.txt /*E1163*
E1164 vim9.txt /*E1164*
E1165 eval.txt /*E1165*
E1166 eval.txt /*E1166*
E1167 vim9.txt /*E1167*
E1168 vim9.txt /*E1168*
E1169 eval.txt /*E1169*
E117 eval.txt /*E117* E117 eval.txt /*E117*
E1170 vim9.txt /*E1170*
E1171 vim9.txt /*E1171*
E1172 vim9.txt /*E1172*
E1173 vim9.txt /*E1173*
E1174 vim9.txt /*E1174*
E1175 vim9.txt /*E1175*
E1176 vim9.txt /*E1176*
E1177 eval.txt /*E1177*
E1178 vim9.txt /*E1178*
E1179 options.txt /*E1179*
E118 eval.txt /*E118* E118 eval.txt /*E118*
E1180 vim9.txt /*E1180*
E1181 vim9.txt /*E1181*
E1182 eval.txt /*E1182*
E1183 eval.txt /*E1183*
E1184 eval.txt /*E1184*
E1185 various.txt /*E1185*
E1186 vim9.txt /*E1186*
E1187 starting.txt /*E1187* E1187 starting.txt /*E1187*
E1188 cmdline.txt /*E1188* E1188 cmdline.txt /*E1188*
E1189 vim9.txt /*E1189*
E119 eval.txt /*E119* E119 eval.txt /*E119*
E1190 vim9.txt /*E1190*
E1191 vim9.txt /*E1191*
E1192 eval.txt /*E1192*
E1193 options.txt /*E1193* E1193 options.txt /*E1193*
E1194 options.txt /*E1194* E1194 options.txt /*E1194*
E1195 options.txt /*E1195* E1195 options.txt /*E1195*
@@ -4068,26 +4189,80 @@ E12 message.txt /*E12*
E120 eval.txt /*E120* E120 eval.txt /*E120*
E1200 options.txt /*E1200* E1200 options.txt /*E1200*
E1201 options.txt /*E1201* E1201 options.txt /*E1201*
E1205 builtin.txt /*E1205* E1202 vim9.txt /*E1202*
E1203 eval.txt /*E1203*
E1204 pattern.txt /*E1204*
E1205 vim9.txt /*E1205*
E1206 vim9.txt /*E1206*
E1207 eval.txt /*E1207*
E1208 map.txt /*E1208* E1208 map.txt /*E1208*
E1209 builtin.txt /*E1209*
E121 eval.txt /*E121* E121 eval.txt /*E121*
E1210 vim9.txt /*E1210*
E1211 vim9.txt /*E1211*
E1212 vim9.txt /*E1212*
E1213 vim9.txt /*E1213*
E1214 builtin.txt /*E1214* E1214 builtin.txt /*E1214*
E1215 builtin.txt /*E1215*
E1216 builtin.txt /*E1216*
E1217 vim9.txt /*E1217*
E1218 vim9.txt /*E1218*
E1219 vim9.txt /*E1219*
E122 eval.txt /*E122* E122 eval.txt /*E122*
E1220 vim9.txt /*E1220*
E1221 vim9.txt /*E1221*
E1222 vim9.txt /*E1222*
E1223 vim9.txt /*E1223*
E1224 vim9.txt /*E1224*
E1225 vim9.txt /*E1225*
E1226 vim9.txt /*E1226*
E1227 vim9.txt /*E1227*
E1228 vim9.txt /*E1228*
E1229 eval.txt /*E1229*
E123 eval.txt /*E123* E123 eval.txt /*E123*
E1230 options.txt /*E1230*
E1231 map.txt /*E1231* E1231 map.txt /*E1231*
E1232 builtin.txt /*E1232* E1232 builtin.txt /*E1232*
E1233 builtin.txt /*E1233* E1233 builtin.txt /*E1233*
E1234 vim9.txt /*E1234*
E1236 vim9.txt /*E1236*
E1237 map.txt /*E1237* E1237 map.txt /*E1237*
E1238 vim9.txt /*E1238*
E1239 builtin.txt /*E1239* E1239 builtin.txt /*E1239*
E124 eval.txt /*E124* E124 eval.txt /*E124*
E1240 change.txt /*E1240*
E1241 change.txt /*E1241*
E1242 change.txt /*E1242*
E1243 options.txt /*E1243* E1243 options.txt /*E1243*
E1244 message.txt /*E1244* E1244 message.txt /*E1244*
E1245 cmdline.txt /*E1245* E1245 cmdline.txt /*E1245*
E1246 eval.txt /*E1246*
E1247 cmdline.txt /*E1247*
E1248 vim9.txt /*E1248*
E1249 syntax.txt /*E1249*
E125 eval.txt /*E125* E125 eval.txt /*E125*
E1250 vim9.txt /*E1250*
E1251 vim9.txt /*E1251*
E1252 vim9.txt /*E1252*
E1253 vim9.txt /*E1253*
E1254 vim9.txt /*E1254*
E1255 map.txt /*E1255* E1255 map.txt /*E1255*
E1256 vim9.txt /*E1256*
E1257 vim9.txt /*E1257*
E1258 vim9.txt /*E1258*
E1259 vim9.txt /*E1259*
E126 eval.txt /*E126* E126 eval.txt /*E126*
E1260 vim9.txt /*E1260*
E1261 vim9.txt /*E1261*
E1262 vim9.txt /*E1262*
E1263 eval.txt /*E1263* E1263 eval.txt /*E1263*
E1264 vim9.txt /*E1264*
E1265 eval.txt /*E1265*
E1266 if_pyth.txt /*E1266*
E127 eval.txt /*E127* E127 eval.txt /*E127*
E1270 change.txt /*E1270*
E1271 vim9.txt /*E1271*
E1274 cmdline.txt /*E1274*
E128 eval.txt /*E128* E128 eval.txt /*E128*
E129 eval.txt /*E129* E129 eval.txt /*E129*
E13 message.txt /*E13* E13 message.txt /*E13*
@@ -4269,6 +4444,7 @@ E295 message.txt /*E295*
E296 message.txt /*E296* E296 message.txt /*E296*
E297 message.txt /*E297* E297 message.txt /*E297*
E298 message.txt /*E298* E298 message.txt /*E298*
E299 if_perl.txt /*E299*
E30 change.txt /*E30* E30 change.txt /*E30*
E300 message.txt /*E300* E300 message.txt /*E300*
E301 message.txt /*E301* E301 message.txt /*E301*
@@ -4528,7 +4704,7 @@ E534 options.txt /*E534*
E535 options.txt /*E535* E535 options.txt /*E535*
E536 options.txt /*E536* E536 options.txt /*E536*
E537 options.txt /*E537* E537 options.txt /*E537*
E538 builtin.txt /*E538* E538 pattern.txt /*E538*
E539 options.txt /*E539* E539 options.txt /*E539*
E54 pattern.txt /*E54* E54 pattern.txt /*E54*
E540 options.txt /*E540* E540 options.txt /*E540*
@@ -4607,9 +4783,6 @@ E610 editing.txt /*E610*
E611 eval.txt /*E611* E611 eval.txt /*E611*
E612 sign.txt /*E612* E612 sign.txt /*E612*
E613 print.txt /*E613* E613 print.txt /*E613*
E614 editing.txt /*E614*
E615 editing.txt /*E615*
E616 editing.txt /*E616*
E617 options.txt /*E617* E617 options.txt /*E617*
E618 print.txt /*E618* E618 print.txt /*E618*
E619 print.txt /*E619* E619 print.txt /*E619*
@@ -4851,6 +5024,7 @@ E835 options.txt /*E835*
E836 if_pyth.txt /*E836* E836 if_pyth.txt /*E836*
E837 if_pyth.txt /*E837* E837 if_pyth.txt /*E837*
E838 netbeans.txt /*E838* E838 netbeans.txt /*E838*
E839 vim9.txt /*E839*
E84 windows.txt /*E84* E84 windows.txt /*E84*
E840 insert.txt /*E840* E840 insert.txt /*E840*
E841 map.txt /*E841* E841 map.txt /*E841*
@@ -5344,6 +5518,7 @@ WinClosed autocmd.txt /*WinClosed*
WinEnter autocmd.txt /*WinEnter* WinEnter autocmd.txt /*WinEnter*
WinLeave autocmd.txt /*WinLeave* WinLeave autocmd.txt /*WinLeave*
WinNew autocmd.txt /*WinNew* WinNew autocmd.txt /*WinNew*
WinScrolled autocmd.txt /*WinScrolled*
X change.txt /*X* X change.txt /*X*
X11 options.txt /*X11* X11 options.txt /*X11*
X11-icon gui_x11.txt /*X11-icon* X11-icon gui_x11.txt /*X11-icon*
@@ -5583,7 +5758,6 @@ assert_true() testing.txt /*assert_true()*
at motion.txt /*at* at motion.txt /*at*
atan() builtin.txt /*atan()* atan() builtin.txt /*atan()*
atan2() builtin.txt /*atan2()* atan2() builtin.txt /*atan2()*
athena-intellimouse gui.txt /*athena-intellimouse*
attr-list syntax.txt /*attr-list* attr-list syntax.txt /*attr-list*
author intro.txt /*author* author intro.txt /*author*
auto-format change.txt /*auto-format* auto-format change.txt /*auto-format*
@@ -5598,6 +5772,7 @@ autocmd-disable autocmd.txt /*autocmd-disable*
autocmd-events autocmd.txt /*autocmd-events* autocmd-events autocmd.txt /*autocmd-events*
autocmd-events-abc autocmd.txt /*autocmd-events-abc* autocmd-events-abc autocmd.txt /*autocmd-events-abc*
autocmd-execute autocmd.txt /*autocmd-execute* autocmd-execute autocmd.txt /*autocmd-execute*
autocmd-expand autocmd.txt /*autocmd-expand*
autocmd-groups autocmd.txt /*autocmd-groups* autocmd-groups autocmd.txt /*autocmd-groups*
autocmd-intro autocmd.txt /*autocmd-intro* autocmd-intro autocmd.txt /*autocmd-intro*
autocmd-list autocmd.txt /*autocmd-list* autocmd-list autocmd.txt /*autocmd-list*
@@ -5708,6 +5883,7 @@ bug-fixes-5 version5.txt /*bug-fixes-5*
bug-fixes-6 version6.txt /*bug-fixes-6* bug-fixes-6 version6.txt /*bug-fixes-6*
bug-fixes-7 version7.txt /*bug-fixes-7* bug-fixes-7 version7.txt /*bug-fixes-7*
bug-fixes-8 version8.txt /*bug-fixes-8* bug-fixes-8 version8.txt /*bug-fixes-8*
bug-fixes-9 version9.txt /*bug-fixes-9*
bug-reports intro.txt /*bug-reports* bug-reports intro.txt /*bug-reports*
bugreport.vim intro.txt /*bugreport.vim* bugreport.vim intro.txt /*bugreport.vim*
bugs intro.txt /*bugs* bugs intro.txt /*bugs*
@@ -5895,6 +6071,7 @@ changenr() builtin.txt /*changenr()*
changetick eval.txt /*changetick* changetick eval.txt /*changetick*
changing change.txt /*changing* changing change.txt /*changing*
channel channel.txt /*channel* channel channel.txt /*channel*
channel-address channel.txt /*channel-address*
channel-callback channel.txt /*channel-callback* channel-callback channel.txt /*channel-callback*
channel-close channel.txt /*channel-close* channel-close channel.txt /*channel-close*
channel-close-in channel.txt /*channel-close-in* channel-close-in channel.txt /*channel-close-in*
@@ -5906,6 +6083,7 @@ channel-functions-details channel.txt /*channel-functions-details*
channel-mode channel.txt /*channel-mode* channel-mode channel.txt /*channel-mode*
channel-more channel.txt /*channel-more* channel-more channel.txt /*channel-more*
channel-noblock channel.txt /*channel-noblock* channel-noblock channel.txt /*channel-noblock*
channel-onetime-callback channel.txt /*channel-onetime-callback*
channel-open channel.txt /*channel-open* channel-open channel.txt /*channel-open*
channel-open-options channel.txt /*channel-open-options* channel-open-options channel.txt /*channel-open-options*
channel-raw channel.txt /*channel-raw* channel-raw channel.txt /*channel-raw*
@@ -6009,6 +6187,7 @@ collate-variable eval.txt /*collate-variable*
color-xterm syntax.txt /*color-xterm* color-xterm syntax.txt /*color-xterm*
coloring syntax.txt /*coloring* coloring syntax.txt /*coloring*
colortest.vim syntax.txt /*colortest.vim* colortest.vim syntax.txt /*colortest.vim*
command-attributes map.txt /*command-attributes*
command-block vim9.txt /*command-block* command-block vim9.txt /*command-block*
command-line-functions usr_41.txt /*command-line-functions* command-line-functions usr_41.txt /*command-line-functions*
command-line-window cmdline.txt /*command-line-window* command-line-window cmdline.txt /*command-line-window*
@@ -6018,6 +6197,7 @@ compile-changes-5 version5.txt /*compile-changes-5*
compile-changes-6 version6.txt /*compile-changes-6* compile-changes-6 version6.txt /*compile-changes-6*
compile-changes-7 version7.txt /*compile-changes-7* compile-changes-7 version7.txt /*compile-changes-7*
compile-changes-8 version8.txt /*compile-changes-8* compile-changes-8 version8.txt /*compile-changes-8*
compile-changes-9 version9.txt /*compile-changes-9*
compiler-compaqada ft_ada.txt /*compiler-compaqada* compiler-compaqada ft_ada.txt /*compiler-compaqada*
compiler-decada ft_ada.txt /*compiler-decada* compiler-decada ft_ada.txt /*compiler-decada*
compiler-gcc quickfix.txt /*compiler-gcc* compiler-gcc quickfix.txt /*compiler-gcc*
@@ -6072,6 +6252,7 @@ conversion-server mbyte.txt /*conversion-server*
convert-to-HTML syntax.txt /*convert-to-HTML* convert-to-HTML syntax.txt /*convert-to-HTML*
convert-to-XHTML syntax.txt /*convert-to-XHTML* convert-to-XHTML syntax.txt /*convert-to-XHTML*
convert-to-XML syntax.txt /*convert-to-XML* convert-to-XML syntax.txt /*convert-to-XML*
convert_legacy_function_to_vim9 vim9.txt /*convert_legacy_function_to_vim9*
copy() builtin.txt /*copy()* copy() builtin.txt /*copy()*
copy-diffs diff.txt /*copy-diffs* copy-diffs diff.txt /*copy-diffs*
copy-move change.txt /*copy-move* copy-move change.txt /*copy-move*
@@ -6752,6 +6933,7 @@ ft-make-syntax syntax.txt /*ft-make-syntax*
ft-man-plugin filetype.txt /*ft-man-plugin* ft-man-plugin filetype.txt /*ft-man-plugin*
ft-maple-syntax syntax.txt /*ft-maple-syntax* ft-maple-syntax syntax.txt /*ft-maple-syntax*
ft-markdown-plugin filetype.txt /*ft-markdown-plugin* ft-markdown-plugin filetype.txt /*ft-markdown-plugin*
ft-markdown-syntax syntax.txt /*ft-markdown-syntax*
ft-masm-syntax syntax.txt /*ft-masm-syntax* ft-masm-syntax syntax.txt /*ft-masm-syntax*
ft-mathematica-syntax syntax.txt /*ft-mathematica-syntax* ft-mathematica-syntax syntax.txt /*ft-mathematica-syntax*
ft-matlab-indent indent.txt /*ft-matlab-indent* ft-matlab-indent indent.txt /*ft-matlab-indent*
@@ -6855,7 +7037,7 @@ function-range-example eval.txt /*function-range-example*
function-search-undo eval.txt /*function-search-undo* function-search-undo eval.txt /*function-search-undo*
function_key intro.txt /*function_key* function_key intro.txt /*function_key*
functions eval.txt /*functions* functions eval.txt /*functions*
fuzzy-match pattern.txt /*fuzzy-match* fuzzy-matching pattern.txt /*fuzzy-matching*
fvwm.vim syntax.txt /*fvwm.vim* fvwm.vim syntax.txt /*fvwm.vim*
fvwm2rc syntax.txt /*fvwm2rc* fvwm2rc syntax.txt /*fvwm2rc*
fvwmrc syntax.txt /*fvwmrc* fvwmrc syntax.txt /*fvwmrc*
@@ -7428,6 +7610,7 @@ hitest.vim syntax.txt /*hitest.vim*
hjkl usr_02.txt /*hjkl* hjkl usr_02.txt /*hjkl*
hl-ColorColumn syntax.txt /*hl-ColorColumn* hl-ColorColumn syntax.txt /*hl-ColorColumn*
hl-Conceal syntax.txt /*hl-Conceal* hl-Conceal syntax.txt /*hl-Conceal*
hl-CurSearch syntax.txt /*hl-CurSearch*
hl-Cursor syntax.txt /*hl-Cursor* hl-Cursor syntax.txt /*hl-Cursor*
hl-CursorColumn syntax.txt /*hl-CursorColumn* hl-CursorColumn syntax.txt /*hl-CursorColumn*
hl-CursorIM syntax.txt /*hl-CursorIM* hl-CursorIM syntax.txt /*hl-CursorIM*
@@ -7666,6 +7849,7 @@ improvements-5 version5.txt /*improvements-5*
improvements-6 version6.txt /*improvements-6* improvements-6 version6.txt /*improvements-6*
improvements-7 version7.txt /*improvements-7* improvements-7 version7.txt /*improvements-7*
improvements-8 version8.txt /*improvements-8* improvements-8 version8.txt /*improvements-8*
improvements-9 version9.txt /*improvements-9*
in_bot channel.txt /*in_bot* in_bot channel.txt /*in_bot*
in_buf channel.txt /*in_buf* in_buf channel.txt /*in_buf*
in_io-buffer channel.txt /*in_io-buffer* in_io-buffer channel.txt /*in_io-buffer*
@@ -7681,6 +7865,7 @@ incompatible-5 version5.txt /*incompatible-5*
incompatible-6 version6.txt /*incompatible-6* incompatible-6 version6.txt /*incompatible-6*
incompatible-7 version7.txt /*incompatible-7* incompatible-7 version7.txt /*incompatible-7*
incompatible-8 version8.txt /*incompatible-8* incompatible-8 version8.txt /*incompatible-8*
incompatible-9 version9.txt /*incompatible-9*
indent() builtin.txt /*indent()* indent() builtin.txt /*indent()*
indent-expression indent.txt /*indent-expression* indent-expression indent.txt /*indent-expression*
indent.txt indent.txt /*indent.txt* indent.txt indent.txt /*indent.txt*
@@ -7825,6 +8010,7 @@ lace.vim syntax.txt /*lace.vim*
lambda eval.txt /*lambda* lambda eval.txt /*lambda*
lang-variable eval.txt /*lang-variable* lang-variable eval.txt /*lang-variable*
language-mapping map.txt /*language-mapping* language-mapping map.txt /*language-mapping*
language-server-protocol channel.txt /*language-server-protocol*
last-pattern pattern.txt /*last-pattern* last-pattern pattern.txt /*last-pattern*
last-position-jump usr_05.txt /*last-position-jump* last-position-jump usr_05.txt /*last-position-jump*
last_buffer_nr() builtin.txt /*last_buffer_nr()* last_buffer_nr() builtin.txt /*last_buffer_nr()*
@@ -7988,6 +8174,7 @@ maparg() builtin.txt /*maparg()*
mapcheck() builtin.txt /*mapcheck()* mapcheck() builtin.txt /*mapcheck()*
maple.vim syntax.txt /*maple.vim* maple.vim syntax.txt /*maple.vim*
mapleader map.txt /*mapleader* mapleader map.txt /*mapleader*
maplist() builtin.txt /*maplist()*
maplocalleader map.txt /*maplocalleader* maplocalleader map.txt /*maplocalleader*
mapmode-c map.txt /*mapmode-c* mapmode-c map.txt /*mapmode-c*
mapmode-i map.txt /*mapmode-i* mapmode-i map.txt /*mapmode-i*
@@ -8002,6 +8189,7 @@ mapmode-v map.txt /*mapmode-v*
mapmode-x map.txt /*mapmode-x* mapmode-x map.txt /*mapmode-x*
mapnew() builtin.txt /*mapnew()* mapnew() builtin.txt /*mapnew()*
mapping map.txt /*mapping* mapping map.txt /*mapping*
mapping-dict builtin.txt /*mapping-dict*
mapping-functions usr_41.txt /*mapping-functions* mapping-functions usr_41.txt /*mapping-functions*
mapset() builtin.txt /*mapset()* mapset() builtin.txt /*mapset()*
mark motion.txt /*mark* mark motion.txt /*mark*
@@ -8081,6 +8269,7 @@ moo.vim syntax.txt /*moo.vim*
more-compatible version5.txt /*more-compatible* more-compatible version5.txt /*more-compatible*
more-prompt message.txt /*more-prompt* more-prompt message.txt /*more-prompt*
more-variables eval.txt /*more-variables* more-variables eval.txt /*more-variables*
motif-intellimouse gui.txt /*motif-intellimouse*
motion-count-multiplied motion.txt /*motion-count-multiplied* motion-count-multiplied motion.txt /*motion-count-multiplied*
motion.txt motion.txt /*motion.txt* motion.txt motion.txt /*motion.txt*
mouse-mode-table term.txt /*mouse-mode-table* mouse-mode-table term.txt /*mouse-mode-table*
@@ -8389,6 +8578,7 @@ new-5 version5.txt /*new-5*
new-6 version6.txt /*new-6* new-6 version6.txt /*new-6*
new-7 version7.txt /*new-7* new-7 version7.txt /*new-7*
new-8 version8.txt /*new-8* new-8 version8.txt /*new-8*
new-9 version9.txt /*new-9*
new-GTK-GUI version5.txt /*new-GTK-GUI* new-GTK-GUI version5.txt /*new-GTK-GUI*
new-MzScheme version7.txt /*new-MzScheme* new-MzScheme version7.txt /*new-MzScheme*
new-Select-mode version5.txt /*new-Select-mode* new-Select-mode version5.txt /*new-Select-mode*
@@ -8422,6 +8612,7 @@ new-indent-flex version6.txt /*new-indent-flex*
new-items-6 version6.txt /*new-items-6* new-items-6 version6.txt /*new-items-6*
new-items-7 version7.txt /*new-items-7* new-items-7 version7.txt /*new-items-7*
new-items-8 version8.txt /*new-items-8* new-items-8 version8.txt /*new-items-8*
new-items-9 version9.txt /*new-items-9*
new-line-continuation version5.txt /*new-line-continuation* new-line-continuation version5.txt /*new-line-continuation*
new-location-list version7.txt /*new-location-list* new-location-list version7.txt /*new-location-list*
new-lua version7.txt /*new-lua* new-lua version7.txt /*new-lua*
@@ -8471,6 +8662,7 @@ new-utf-8 version6.txt /*new-utf-8*
new-vertsplit version6.txt /*new-vertsplit* new-vertsplit version6.txt /*new-vertsplit*
new-vim-script version7.txt /*new-vim-script* new-vim-script version7.txt /*new-vim-script*
new-vim-script-8 version8.txt /*new-vim-script-8* new-vim-script-8 version8.txt /*new-vim-script-8*
new-vim-script-9 version9.txt /*new-vim-script-9*
new-vim-server version6.txt /*new-vim-server* new-vim-server version6.txt /*new-vim-server*
new-vimgrep version7.txt /*new-vimgrep* new-vimgrep version7.txt /*new-vimgrep*
new-vimscript-8.2 version8.txt /*new-vimscript-8.2* new-vimscript-8.2 version8.txt /*new-vimscript-8.2*
@@ -8589,7 +8781,8 @@ pascal.vim syntax.txt /*pascal.vim*
patches-8 version8.txt /*patches-8* patches-8 version8.txt /*patches-8*
patches-8.1 version8.txt /*patches-8.1* patches-8.1 version8.txt /*patches-8.1*
patches-8.2 version8.txt /*patches-8.2* patches-8.2 version8.txt /*patches-8.2*
patches-after-8.2 version8.txt /*patches-after-8.2* patches-9 version9.txt /*patches-9*
patches-after-8.2 version9.txt /*patches-after-8.2*
pathshorten() builtin.txt /*pathshorten()* pathshorten() builtin.txt /*pathshorten()*
pattern pattern.txt /*pattern* pattern pattern.txt /*pattern*
pattern-atoms pattern.txt /*pattern-atoms* pattern-atoms pattern.txt /*pattern-atoms*
@@ -9857,6 +10050,7 @@ terminal.txt terminal.txt /*terminal.txt*
terminalprops() builtin.txt /*terminalprops()* terminalprops() builtin.txt /*terminalprops()*
terminfo term.txt /*terminfo* terminfo term.txt /*terminfo*
termresponse-variable eval.txt /*termresponse-variable* termresponse-variable eval.txt /*termresponse-variable*
ternary eval.txt /*ternary*
test-functions usr_41.txt /*test-functions* test-functions usr_41.txt /*test-functions*
test-functions-details testing.txt /*test-functions-details* test-functions-details testing.txt /*test-functions-details*
test_alloc_fail() testing.txt /*test_alloc_fail()* test_alloc_fail() testing.txt /*test_alloc_fail()*
@@ -9865,8 +10059,7 @@ test_feedinput() testing.txt /*test_feedinput()*
test_garbagecollect_now() testing.txt /*test_garbagecollect_now()* test_garbagecollect_now() testing.txt /*test_garbagecollect_now()*
test_garbagecollect_soon() testing.txt /*test_garbagecollect_soon()* test_garbagecollect_soon() testing.txt /*test_garbagecollect_soon()*
test_getvalue() testing.txt /*test_getvalue()* test_getvalue() testing.txt /*test_getvalue()*
test_gui_drop_files() testing.txt /*test_gui_drop_files()* test_gui_event() testing.txt /*test_gui_event()*
test_gui_mouse_event() testing.txt /*test_gui_mouse_event()*
test_ignore_error() testing.txt /*test_ignore_error()* test_ignore_error() testing.txt /*test_ignore_error()*
test_null_blob() testing.txt /*test_null_blob()* test_null_blob() testing.txt /*test_null_blob()*
test_null_channel() testing.txt /*test_null_channel()* test_null_channel() testing.txt /*test_null_channel()*
@@ -9879,7 +10072,6 @@ test_null_string() testing.txt /*test_null_string()*
test_option_not_set() testing.txt /*test_option_not_set()* test_option_not_set() testing.txt /*test_option_not_set()*
test_override() testing.txt /*test_override()* test_override() testing.txt /*test_override()*
test_refcount() testing.txt /*test_refcount()* test_refcount() testing.txt /*test_refcount()*
test_scrollbar() testing.txt /*test_scrollbar()*
test_setmouse() testing.txt /*test_setmouse()* test_setmouse() testing.txt /*test_setmouse()*
test_settime() testing.txt /*test_settime()* test_settime() testing.txt /*test_settime()*
test_srand_seed() testing.txt /*test_srand_seed()* test_srand_seed() testing.txt /*test_srand_seed()*
@@ -9950,7 +10142,6 @@ tooltips gui.txt /*tooltips*
toupper() builtin.txt /*toupper()* toupper() builtin.txt /*toupper()*
tr() builtin.txt /*tr()* tr() builtin.txt /*tr()*
trim() builtin.txt /*trim()* trim() builtin.txt /*trim()*
trinary eval.txt /*trinary*
trojan-horse starting.txt /*trojan-horse* trojan-horse starting.txt /*trojan-horse*
true vim9.txt /*true* true vim9.txt /*true*
true-variable eval.txt /*true-variable* true-variable eval.txt /*true-variable*
@@ -10305,6 +10496,7 @@ version-7.4 version7.txt /*version-7.4*
version-8.0 version8.txt /*version-8.0* version-8.0 version8.txt /*version-8.0*
version-8.1 version8.txt /*version-8.1* version-8.1 version8.txt /*version-8.1*
version-8.2 version8.txt /*version-8.2* version-8.2 version8.txt /*version-8.2*
version-9.0 version9.txt /*version-9.0*
version-variable eval.txt /*version-variable* version-variable eval.txt /*version-variable*
version4.txt version4.txt /*version4.txt* version4.txt version4.txt /*version4.txt*
version5.txt version5.txt /*version5.txt* version5.txt version5.txt /*version5.txt*
@@ -10319,6 +10511,8 @@ version8.0 version8.txt /*version8.0*
version8.1 version8.txt /*version8.1* version8.1 version8.txt /*version8.1*
version8.2 version8.txt /*version8.2* version8.2 version8.txt /*version8.2*
version8.txt version8.txt /*version8.txt* version8.txt version8.txt /*version8.txt*
version9.0 version9.txt /*version9.0*
version9.txt version9.txt /*version9.txt*
versionlong-variable eval.txt /*versionlong-variable* versionlong-variable eval.txt /*versionlong-variable*
vi intro.txt /*vi* vi intro.txt /*vi*
vi-differences vi_diff.txt /*vi-differences* vi-differences vi_diff.txt /*vi-differences*
@@ -10334,6 +10528,8 @@ vim-7.4 version7.txt /*vim-7.4*
vim-8 version8.txt /*vim-8* vim-8 version8.txt /*vim-8*
vim-8.1 version8.txt /*vim-8.1* vim-8.1 version8.txt /*vim-8.1*
vim-8.2 version8.txt /*vim-8.2* vim-8.2 version8.txt /*vim-8.2*
vim-9 version9.txt /*vim-9*
vim-9.0 version9.txt /*vim-9.0*
vim-additions vi_diff.txt /*vim-additions* vim-additions vi_diff.txt /*vim-additions*
vim-announce intro.txt /*vim-announce* vim-announce intro.txt /*vim-announce*
vim-arguments starting.txt /*vim-arguments* vim-arguments starting.txt /*vim-arguments*
@@ -10380,6 +10576,7 @@ vim9-namespace vim9.txt /*vim9-namespace*
vim9-no-dict-function vim9.txt /*vim9-no-dict-function* vim9-no-dict-function vim9.txt /*vim9-no-dict-function*
vim9-rationale vim9.txt /*vim9-rationale* vim9-rationale vim9.txt /*vim9-rationale*
vim9-reload vim9.txt /*vim9-reload* vim9-reload vim9.txt /*vim9-reload*
vim9-s-namespace vim9.txt /*vim9-s-namespace*
vim9-scopes vim9.txt /*vim9-scopes* vim9-scopes vim9.txt /*vim9-scopes*
vim9-script-intro usr_46.txt /*vim9-script-intro* vim9-script-intro usr_46.txt /*vim9-script-intro*
vim9-types vim9.txt /*vim9-types* vim9-types vim9.txt /*vim9-types*
@@ -10537,6 +10734,7 @@ windowid windows.txt /*windowid*
windowid-variable eval.txt /*windowid-variable* windowid-variable eval.txt /*windowid-variable*
windows windows.txt /*windows* windows windows.txt /*windows*
windows-3.1 os_win32.txt /*windows-3.1* windows-3.1 os_win32.txt /*windows-3.1*
windows-asynchronously os_win32.txt /*windows-asynchronously*
windows-icon os_win32.txt /*windows-icon* windows-icon os_win32.txt /*windows-icon*
windows-intro windows.txt /*windows-intro* windows-intro windows.txt /*windows-intro*
windows-starting windows.txt /*windows-starting* windows-starting windows.txt /*windows-starting*
@@ -10710,6 +10908,7 @@ zz scroll.txt /*zz*
{offset} pattern.txt /*{offset}* {offset} pattern.txt /*{offset}*
{register} change.txt /*{register}* {register} change.txt /*{register}*
{rhs} map.txt /*{rhs}* {rhs} map.txt /*{rhs}*
{server} remote.txt /*{server}*
{subject} helphelp.txt /*{subject}* {subject} helphelp.txt /*{subject}*
{} intro.txt /*{}* {} intro.txt /*{}*
} motion.txt /*}* } motion.txt /*}*

View File

@@ -561,7 +561,8 @@ also works. The <CR> and <NL> characters can never appear inside a line.
The second format is new. It includes additional information in optional The second format is new. It includes additional information in optional
fields at the end of each line. It is backwards compatible with Vi. It is fields at the end of each line. It is backwards compatible with Vi. It is
only supported by new versions of ctags (such as Exuberant ctags). only supported by new versions of ctags (such as Universal ctags or Exuberant
ctags).
{tagname} The identifier. Normally the name of a function, but it can {tagname} The identifier. Normally the name of a function, but it can
be any identifier. It cannot contain a <Tab>. be any identifier. It cannot contain a <Tab>.
@@ -724,7 +725,7 @@ matches the pattern "^# *define" it is not considered to be a comment.
If you want to list matches, and then select one to jump to, you could use a If you want to list matches, and then select one to jump to, you could use a
mapping to do that for you. Here is an example: > mapping to do that for you. Here is an example: >
:map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR> :map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " .. nr .. "[\t"<CR>
< <
*[i* *[i*
[i Display the first line that contains the keyword [i Display the first line that contains the keyword

View File

@@ -1,4 +1,4 @@
*term.txt* For Vim version 8.2. Last change: 2021 Dec 21 *term.txt* For Vim version 8.2. Last change: 2022 Apr 23
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -386,9 +386,10 @@ Added by Vim (there are no standard codes for these):
t_SR start replace mode (underline cursor shape) *t_SR* *'t_SR'* t_SR start replace mode (underline cursor shape) *t_SR* *'t_SR'*
t_EI end insert or replace mode (block cursor shape) *t_EI* *'t_EI'* t_EI end insert or replace mode (block cursor shape) *t_EI* *'t_EI'*
|termcap-cursor-shape| |termcap-cursor-shape|
t_RV request terminal version string (for xterm) *t_RV* *'t_RV'* t_RV request terminal version string (works for *t_RV* *'t_RV'*
The response is stored in |v:termresponse| xterm and other terminal emulators) The
|xterm-8bit| |'ttymouse'| |xterm-codes| response is stored in |v:termresponse| |xterm-8bit|
|'ttymouse'| |xterm-codes|
t_u7 request cursor position (for xterm) *t_u7* *'t_u7'* t_u7 request cursor position (for xterm) *t_u7* *'t_u7'*
see |'ambiwidth'| see |'ambiwidth'|
The response is stored in |v:termu7resp| The response is stored in |v:termu7resp|
@@ -725,12 +726,12 @@ size is wrong you can use the 'lines' and 'columns' options to set the
correct values. correct values.
One command can be used to set the screen size: One command can be used to set the screen size:
*:mod* *:mode* *E359* *:mod* *:mode* *E359*
:mod[e] [mode] :mod[e] [mode]
Without argument this only detects the screen size and redraws the screen. Without argument this only detects the screen size and redraws the screen.
[mode] was used on MS-DOS, but it doesn't work anymore. [mode] was used on MS-DOS, but it doesn't work anymore. In |Vim9| this
command is not supported.
============================================================================== ==============================================================================
4. Slow and fast terminals *slow-fast-terminal* 4. Slow and fast terminals *slow-fast-terminal*
@@ -833,7 +834,7 @@ select and copy the text to the system, then press Esc.
Another way is to temporarily use ":sh" to run a shell, copy the text, then Another way is to temporarily use ":sh" to run a shell, copy the text, then
exit the shell. 'mouse' can remain set to "a" then. exit the shell. 'mouse' can remain set to "a" then.
*xterm-clipboard* *xterm-clipboard*
In the Athena and Motif GUI versions, when running in a terminal and there is In the Motif GUI version, when running in a terminal and there is
access to the X-server (DISPLAY is set), the copy and paste will behave like access to the X-server (DISPLAY is set), the copy and paste will behave like
in the GUI. If not, the middle mouse button will insert the unnamed register. in the GUI. If not, the middle mouse button will insert the unnamed register.
In that case, here is how you copy and paste a piece of text: In that case, here is how you copy and paste a piece of text:
@@ -984,7 +985,7 @@ an #if/#else/#endif block, the selection becomes linewise.
For MS-Windows and xterm the time for double clicking can be set with the For MS-Windows and xterm the time for double clicking can be set with the
'mousetime' option. For the other systems this time is defined outside of Vim. 'mousetime' option. For the other systems this time is defined outside of Vim.
An example, for using a double click to jump to the tag under the cursor: > An example, for using a double click to jump to the tag under the cursor: >
:map <2-LeftMouse> :exe "tag ". expand("<cword>")<CR> :map <2-LeftMouse> :exe "tag " .. expand("<cword>")<CR>
Dragging the mouse with a double click (button-down, button-up, button-down Dragging the mouse with a double click (button-down, button-up, button-down
and then drag) will result in whole words to be selected. This continues and then drag) will result in whole words to be selected. This continues

View File

@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 8.2. Last change: 2022 Jan 21 *terminal.txt* For Vim version 8.2. Last change: 2022 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -674,7 +674,7 @@ term_getsize({buf}) *term_getsize()*
term_getstatus({buf}) *term_getstatus()* term_getstatus({buf}) *term_getstatus()*
Get the status of terminal {buf}. This returns a String with Get the status of terminal {buf}. This returns a String with
a comma separated list of these items: a comma-separated list of these items:
running job is running running job is running
finished job has finished finished job has finished
normal in Terminal-Normal mode normal in Terminal-Normal mode
@@ -979,8 +979,8 @@ Currently supported commands:
< Calls a function defined like this: > < Calls a function defined like this: >
function Tapi_Impression(bufnum, arglist) function Tapi_Impression(bufnum, arglist)
if len(a:arglist) == 2 if len(a:arglist) == 2
echomsg "impression " . a:arglist[0] echomsg "impression " .. a:arglist[0]
echomsg "count " . a:arglist[1] echomsg "count " .. a:arglist[1]
endif endif
endfunc endfunc
< Output from `:echo` may be erased by a redraw, use `:echomsg` < Output from `:echo` may be erased by a redraw, use `:echomsg`
@@ -1285,6 +1285,8 @@ Put focus on the gdb window to type commands there. Some common ones are:
- next execute the current line and stop at the next line - next execute the current line and stop at the next line
- step execute the current line and stop at the next statement, - step execute the current line and stop at the next statement,
entering functions entering functions
- until execute until past the current cursor line or past a specified
position or the current stack frame returns
- finish execute until leaving the current function - finish execute until leaving the current function
- where show the stack - where show the stack
- frame N go to the Nth stack frame - frame N go to the Nth stack frame
@@ -1303,6 +1305,7 @@ gdb:
*:Step* execute the gdb "step" command *:Step* execute the gdb "step" command
*:Over* execute the gdb "next" command (`:Next` is a Vim command) *:Over* execute the gdb "next" command (`:Next` is a Vim command)
*:Until* execute the gdb "until" command
*:Finish* execute the gdb "finish" command *:Finish* execute the gdb "finish" command
*:Continue* execute the gdb "continue" command *:Continue* execute the gdb "continue" command
*:Stop* interrupt the program *:Stop* interrupt the program

View File

@@ -1,4 +1,4 @@
*testing.txt* For Vim version 8.2. Last change: 2022 Jan 20 *testing.txt* For Vim version 8.2. Last change: 2022 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -65,8 +65,9 @@ test_garbagecollect_now() *test_garbagecollect_now()*
Like garbagecollect(), but executed right away. This must Like garbagecollect(), but executed right away. This must
only be called directly to avoid any structure to exist only be called directly to avoid any structure to exist
internally, and |v:testing| must have been set before calling internally, and |v:testing| must have been set before calling
any function. This will not work when called from a :def any function. *E1142*
function, because variables on the stack will be freed. This will not work when called from a :def function, because
variables on the stack will be freed.
test_garbagecollect_soon() *test_garbagecollect_soon()* test_garbagecollect_soon() *test_garbagecollect_soon()*
@@ -82,46 +83,119 @@ test_getvalue({name}) *test_getvalue()*
Can also be used as a |method|: > Can also be used as a |method|: >
GetName()->test_getvalue() GetName()->test_getvalue()
< <
*test_gui_drop_files()* *test_gui_event()*
test_gui_drop_files({list}, {row}, {col}, {mods}) test_gui_event({event}, {args})
Drop one or more files in {list} in the window at {row}, {col}. Generate a GUI {event} with arguments {args} for testing Vim
This function only works when the GUI is running and the functionality. This function works only when the GUI is
|drop_file| feature is present. running.
The supported values for {mods} are: {event} is a String and the supported values are:
0x4 Shift "dropfiles" drop one or more files in a window.
0x8 Alt "findrepl" search and replace text
0x10 Ctrl "mouse" mouse button click event.
The files are added to the |argument-list| and the first file "scrollbar" move or drag the scrollbar
in {list} is edited in the window. See |drag-n-drop| for more "tabline" select a tab page by mouse click.
information. "tabmenu" select a tabline menu entry.
*test_gui_mouse_event()* {args} is a Dict and contains the arguments for the event.
test_gui_mouse_event({button}, {row}, {col}, {multiclick}, {modifiers})
Inject a mouse button click event. This function only works "dropfiles":
when the GUI is running. Drop one or more files in a specified window. The supported
The supported values for {button} are: items in {args} are:
0 right mouse button files: List of file names
1 middle mouse button row: window row number
2 left mouse button col: window column number
3 mouse button release modifiers: key modifiers. The supported values are:
4 scroll wheel down 0x4 Shift
5 scroll wheel up 0x8 Alt
6 scroll wheel left 0x10 Ctrl
7 scroll wheel right The files are added to the |argument-list| and the first
{row} and {col} specify the location of the mouse click. The file in {files} is edited in the window. See |drag-n-drop|
first row of the Vim window is 1 and the last row is 'lines'. for more information. This event works only when the
The maximum value of {col} is 'columns'. |drop_file| feature is present.
To inject a multiclick event, set {multiclick} to 1.
The supported values for {modifiers} are: "findrepl":
4 shift is pressed {only available when the GUI has a find/replace dialog}
8 alt is pressed Perform a search and replace of text. The supported items
16 ctrl is pressed in {args} are:
After injecting the mouse event you probably should call 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 either a mouse button click, or a mouse move, 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
move: Optional; if used and TRUE then a mouse move
event can be generated.
Only {args} row: and col: are used and
required; they are interpreted as pixels.
Only results in an event when 'mousemoveevent'
is set or a popup uses mouse move events.
"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.: > |feedkeys()| to have them processed, e.g.: >
call feedkeys("y", 'Lx!') 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()* test_ignore_error({expr}) *test_ignore_error()*
Ignore any error containing {expr}. A normal message is given Ignore any error containing {expr}. A normal message is given
instead. instead.
@@ -235,27 +309,6 @@ test_refcount({expr}) *test_refcount()*
GetVarname()->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()* test_setmouse({row}, {col}) *test_setmouse()*
Set the mouse position to be used for the next mouse action. Set the mouse position to be used for the next mouse action.
{row} and {col} are one based. {row} and {col} are one based.
@@ -372,12 +425,12 @@ assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
< <
If {msg} is empty then it is not used. Do this to get the If {msg} is empty then it is not used. Do this to get the
default message when passing the {lnum} argument. default message when passing the {lnum} argument.
*E1115*
When {lnum} is present and not negative, and the {error} When {lnum} is present and not negative, and the {error}
argument is present and matches, then this is compared with 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 at which the error was reported. That can be
the line number in a function or in a script. the line number in a function or in a script.
*E1116*
When {context} is present it is used as a pattern and matched When {context} is present it is used as a pattern and matched
against the context (script name or function name) where against the context (script name or function name) where
{lnum} is located in. {lnum} is located in.

View File

@@ -101,14 +101,14 @@ What you need:
create it with the shell command "mkid file1 file2 ..". create it with the shell command "mkid file1 file2 ..".
Put this in your .vimrc: > Put this in your .vimrc: >
map _u :call ID_search()<Bar>execute "/\\<" . g:word . "\\>"<CR> map _u :call ID_search()<Bar>execute "/\\<" .. g:word .. "\\>"<CR>
map _n :n<Bar>execute "/\\<" . g:word . "\\>"<CR> map _n :n<Bar>execute "/\\<" .. g:word .. "\\>"<CR>
function! ID_search() function! ID_search()
let g:word = expand("<cword>") let g:word = expand("<cword>")
let x = system("lid --key=none ". g:word) let x = system("lid --key=none " .. g:word)
let x = substitute(x, "\n", " ", "g") let x = substitute(x, "\n", " ", "g")
execute "next " . x execute "next " .. x
endfun endfun
To use it, place the cursor on a word, type "_u" and vim will load the file To use it, place the cursor on a word, type "_u" and vim will load the file
@@ -356,13 +356,13 @@ This mapping will format any bullet list. It requires that there is an empty
line above and below each list entry. The expression commands are used to line above and below each list entry. The expression commands are used to
be able to give comments to the parts of the mapping. > be able to give comments to the parts of the mapping. >
:let m = ":map _f :set ai<CR>" " need 'autoindent' set :let m = ":map _f :set ai<CR>" " need 'autoindent' set
:let m = m . "{O<Esc>" " add empty line above item :let m ..= "{O<Esc>" " add empty line above item
:let m = m . "}{)^W" " move to text after bullet :let m ..= "}{)^W" " move to text after bullet
:let m = m . "i <CR> <Esc>" " add space for indent :let m ..= "i <CR> <Esc>" " add space for indent
:let m = m . "gq}" " format text after the bullet :let m ..= "gq}" " format text after the bullet
:let m = m . "{dd" " remove the empty line :let m ..= "{dd" " remove the empty line
:let m = m . "5lDJ" " put text after bullet :let m ..= "5lDJ" " put text after bullet
:execute m |" define the mapping :execute m |" define the mapping
(<> notation |<>|. Note that this is all typed literally. ^W is "^" "W", not (<> notation |<>|. Note that this is all typed literally. ^W is "^" "W", not
@@ -514,15 +514,15 @@ A slightly more advanced version is used in the |matchparen| plugin.
let c = '\[' let c = '\['
let c2 = '\]' let c2 = '\]'
endif endif
let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' . let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' ..
\ '=~? "string\\|comment"' \ '=~? "string\\|comment"'
execute 'if' s_skip '| let s_skip = 0 | endif' execute 'if' s_skip '| let s_skip = 0 | endif'
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip) let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip)
if m_lnum > 0 && m_lnum >= line('w0') && m_lnum <= line('w$') if m_lnum > 0 && m_lnum >= line('w0') && m_lnum <= line('w$')
exe 'match Search /\(\%' . c_lnum . 'l\%' . c_col . exe 'match Search /\(\%' .. c_lnum .. 'l\%' .. c_col ..
\ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' \ 'c\)\|\(\%' .. m_lnum .. 'l\%' .. m_col .. 'c\)/'
let s:paren_hl_on = 1 let s:paren_hl_on = 1
endif endif
endfunction endfunction

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2022 Jan 22 *todo.txt* For Vim version 8.2. Last change: 2022 May 07
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,18 +38,18 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs* *known-bugs*
-------------------- Known bugs and current work ----------------------- -------------------- Known bugs and current work -----------------------
Also set the script context for other "expr" options, like for 'foldexpr'?
'printexpr' eval_printexpr()
"expr:" part of 'spellsuggest eval_spell_expr()
Once Vim9 is stable: Once Vim9 is stable:
- Add all the error numbers in a good place in documentation. - Use Vim9 for more runtime files.
done until E1083
- Check code coverage, add more tests if needed. - Check code coverage, add more tests if needed.
- Use Vim9 for runtime files. vim9expr.c
vim9instr.c
vim9script.c
vim9type.c
- Adjust intro message to say "help version9".
Further Vim9 improvements, possibly after launch: Further Vim9 improvements, possibly after launch:
- Check performance with callgrind and kcachegrind. - Check performance with callgrind and kcachegrind.
getline()/substitute()/setline() in #5632
- Better implementation for partial and tests for that. - Better implementation for partial and tests for that.
- when using "const" mark the variable type as const with TTFLAG_CONST, so - 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 that an error is given at compile time when trying to change it. E.g. for a
@@ -62,6 +62,8 @@ Further Vim9 improvements, possibly after launch:
evaluation. evaluation.
Use the location where the option was set for deciding whether it's to be Use the location where the option was set for deciding whether it's to be
evaluated in Vim9 script context. evaluated in Vim9 script context.
- Implement "import lazy" - like autoload but with a relative or absolute
path. #9595
- implement :type - implement :type
- implement :enum - implement :enum
- implement :class and :interface: See |vim9-classes| - implement :class and :interface: See |vim9-classes|
@@ -78,10 +80,13 @@ Further Vim9 improvements, possibly after launch:
Update list of features to vote on: Update list of features to vote on:
- multiple cursors - multiple cursors
- built-in LSP support - built-in LSP support
- start first line halfway
Popup windows: Popup windows:
- Preview popup not properly updated when it overlaps with completion menu. - Preview popup not properly updated when it overlaps with completion menu.
(Yegappan Lakshmanan, 2021 May 22 (Yegappan Lakshmanan, 2021 May 22
- Add a function to redraw a specific popup window. Esp. to be used when
editing the command line, when screen updating doesn't happen. (Shougo)
- In some cases prop_remove() does not work correctly. (#8261) - In some cases prop_remove() does not work correctly. (#8261)
- Add a flag to make a popup window focusable? - Add a flag to make a popup window focusable?
CTRL-W P cycle over any preview window or focusable popup, end up back in CTRL-W P cycle over any preview window or focusable popup, end up back in
@@ -102,7 +107,6 @@ Popup windows:
- Should popup_getoptions() also return the mask? #7774 - Should popup_getoptions() also return the mask? #7774
- Add a way to use popup_menu() synchronously: instead of invoking the - Add a way to use popup_menu() synchronously: instead of invoking the
callback, return the choice. (Ben Jackson, #6534) callback, return the choice. (Ben Jackson, #6534)
- Use popup (or popup menu) for command line completion
- When using a popup for the info of a completion menu, and there is not - When using a popup for the info of a completion menu, and there is not
enough space, let the popup overlap with the menu. (#4544) enough space, let the popup overlap with the menu. (#4544)
- Implement flip option. - Implement flip option.
@@ -123,6 +127,9 @@ Text properties:
- Popup attached to text property stays visible when text is deleted with - 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 "cc". (#7737) "C" works OK. "dd" also files in a buffer with a single
line. line.
- Add text property that shifts text to make room for annotation (e.g.
variable type). Like the opposite of conceal. Requires fixing the cursor
positioning and mouse clicks as with conceal mode.
- Auto-indenting may cause highlighting to shift. (#7719) - Auto-indenting may cause highlighting to shift. (#7719)
- "cc" does not call inserted_bytes(). (Axel Forsman, #5763) - "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
- Combining text property with 'cursorline' does not always work (Billie - Combining text property with 'cursorline' does not always work (Billie
@@ -147,8 +154,8 @@ Terminal debugger:
- Make prompt-buffer variant work better. - Make prompt-buffer variant work better.
- Add option to not open the program window. It's not used when attaching to - Add option to not open the program window. It's not used when attaching to
an already running program. (M. Kelly) an already running program. (M. Kelly)
- Use the optional token on requests, match the result with it. #10300
- When only gdb window exists, on "quit" edit another buffer. - When only gdb window exists, on "quit" edit another buffer.
- Use a sign group
- Termdebug does not work when Vim was built with mzscheme: gdb hangs just - Termdebug does not work when Vim was built with mzscheme: gdb hangs just
after "run". Everything else works, including communication channel. Not after "run". Everything else works, including communication channel. Not
initializing mzscheme avoid the problem, thus it's not some #ifdef. initializing mzscheme avoid the problem, thus it's not some #ifdef.
@@ -193,30 +200,40 @@ Terminal emulator window:
- When the job only outputs lines, we could handle resizing the terminal - When the job only outputs lines, we could handle resizing the terminal
better: store lines separated by line breaks, instead of screen lines, better: store lines separated by line breaks, instead of screen lines,
then when the window is resized redraw those lines. then when the window is resized redraw those lines.
- Redrawing is slow with Athena and Motif. (Ramel Eshed) - Redrawing is slow with Motif. (Ramel Eshed)
- For the GUI fill termios with default values, perhaps like pangoterm: - For the GUI fill termios with default values, perhaps like pangoterm:
http://bazaar.launchpad.net/~leonerd/pangoterm/trunk/view/head:/main.c#L134 http://bazaar.launchpad.net/~leonerd/pangoterm/trunk/view/head:/main.c#L134
- When 'encoding' is not utf-8, or the job is using another encoding, setup - When 'encoding' is not utf-8, or the job is using another encoding, setup
conversions. conversions.
When using 'cryptmethod' xchaha20 the undo file is not encrypted. String interpolation: Handle backslash and quotes in the expression normally,
Need to handle extra bytes. do not require escaping.
In Select mode the deleted text always goes into the unnamed register. Add autocmd functions. PR #10291
Use CTRL-R to specify the register to use. (#9531) a couple of outstanding comments, wait for Yegappan to respond
Can deref_func_name() and deref_function_name() be merged?
Some prompts are not translated: #9495 Some prompts are not translated: #9495
NFA regexp does not handle composing characters well: #10286
[ɔ̃] matches both ɔ and ɔ̃
\(ɔ\|ɔ̃\) matches ɔ and not ɔ̃
Improvement in terminal configuration mess: Request the terminfo entry from
the terminal itself. The $TERM value then is only relevant for whether this
feature is supported or not. Replaces the xterm mechanism to request each
entry separately. #6609
Multiplexers (screen, tmux) can request it to the underlaying terminal, and
pass it on with modifications.
Test_communicate_ipv6(): is flaky on many systems Test_communicate_ipv6(): is flaky on many systems
Fails in line 64 of Ch_communicate, no exception is thrown. Fails in line 64 of Ch_communicate, no exception is thrown.
Patch for Template string: #4634
Have another look at the implementation.
Add expanding <script> which works like <sfile> everywhere. #9189
Rename getdigraphlist -> digraph_getlist() etc. Rename getdigraphlist -> digraph_getlist() etc.
Can "CSI nr X" be used instead of outputting spaces? Is it faster? #8002
Valgrind reports memory leaks in test_options. Valgrind reports memory leaks in test_options.
Valgrind reports overlapping memcpy in Valgrind reports overlapping memcpy in
test_conceal.3 test_conceal.3
@@ -235,12 +252,23 @@ Memory leak in test_alot with pyeval() (allocating partial)
Memory leak in test_alot with expand() Memory leak in test_alot with expand()
Memory leaks in test_channel? (or is it because of fork()) Memory leaks in test_channel? (or is it because of fork())
PR to support %e and %k in 'errorformat'. #9624
PR to add left and right bitwise shift. #8457
Idea: when typing ":e /some/dir/" and "dir" does not exist, highlight in red. Idea: when typing ":e /some/dir/" and "dir" does not exist, highlight in red.
":set &shellpipe" and ":set &shellredir" should use the logic from ":set &shellpipe" and ":set &shellredir" should use the logic from
initialization to figure out the default value from 'shell'. Add a test for initialization to figure out the default value from 'shell'. Add a test for
this. this.
With concealed text mouse click doesn't put the cursor in the right position.
(Herb Sitz) Fix by Christian Brabandt, 2011 Jun 16. Doesn't work properly,
need to make the change in where RET_WIN_BUF_CHARTABSIZE() is called.
IDEA: when drawing the text, store the text byte index in ScreenLinesIdx[].
When converting screen column to text position use this.
The line number can be obtained from win->w_lines[].
MS-Windows: did path modifier :p:8 stop working? #8600 MS-Windows: did path modifier :p:8 stop working? #8600
Add support for "underdouble", "underdot" and "underdash". #9553 Add support for "underdouble", "underdot" and "underdash". #9553
@@ -276,12 +304,12 @@ Also, z= in German on a long word can take a very long time, but CTRL-C to
interrupt does not work. Where to add ui_breakcheck()? interrupt does not work. Where to add ui_breakcheck()?
New English spell files also have very slow suggestions. New English spell files also have very slow suggestions.
Searching for \%'> does not find anything when using line Visual selection.
Probably because it's using MAXCOL. #8238
Make "g>" and "g<" in Visual mode move the text right or left. Make "g>" and "g<" in Visual mode move the text right or left.
Also for a block selection. #8558 Also for a block selection. #8558
When using dictionary insert completion with 'ignorecase', the leading capital
in a word should be preserved.
Add optional argument to virtcol() that specifies "start", "cursor" or "end" Add optional argument to virtcol() that specifies "start", "cursor" or "end"
to tell which value from getvvcol() should be used. (#7964) to tell which value from getvvcol() should be used. (#7964)
Value returned by virtcol() changes depending on how lines wrap. This is Value returned by virtcol() changes depending on how lines wrap. This is
@@ -290,8 +318,7 @@ inconsistent with the documentation.
Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598) Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598)
Scroll doesn't work correctly, why? Scroll doesn't work correctly, why?
glob() and globfile() do not always honor 'wildignorecase'. #8350 globpath() does not use 'wildignorecase' at all? (related to #8350)
globpath() does not use 'wildignorecase' at all?
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
with 'termguicolors'. #1740 with 'termguicolors'. #1740
@@ -305,8 +332,7 @@ Missing filetype test for bashrc, PKGBUILD, etc.
Add an option to not fetch terminal codes in xterm, to avoid flicker when t_Co Add an option to not fetch terminal codes in xterm, to avoid flicker when t_Co
changes. changes.
When using ":bwipe!" also get rid of references to be buffer, e.g. in the Add ??= operator, "a ??= b" works like "a = a ?? b". #10343
jumplist and alternate file.
Add an option to start_timer() to return from the input loop with K_IGNORE. Add an option to start_timer() to return from the input loop with K_IGNORE.
This is useful e.g. when a popup was created that disables mappings, we need This is useful e.g. when a popup was created that disables mappings, we need
@@ -318,13 +344,6 @@ Any way to convert "$" back by using a special value? (#6901)
Can we detect true color support? https://gist.github.com/XVilka/8346728 Can we detect true color support? https://gist.github.com/XVilka/8346728
Try setting a color then request the current color, like using t_u7. Try setting a color then request the current color, like using t_u7.
Regexp to search for duplicate lines does not work correctly:
/\(^.*\n\)\1 (Chris Morgan, #6239)
MS-Windows: when writing undo file the infostreams are copied in
mch_copy_file_attribute(), that seems unnecessary. (#7925)
Add a flag to only copy attributes?
Make the jumplist behave like a tag stack. (#7738) Should there be a more Make the jumplist behave like a tag stack. (#7738) Should there be a more
time bound navigation, like with undo? time bound navigation, like with undo?
@@ -356,15 +375,6 @@ So that replaying the register doesn't use keymap/langmap and still does the
same thing. same thing.
Also see #737: langmap not applied to replaying recording. Also see #737: langmap not applied to replaying recording.
Buffer autocommands are a bit inconsistent. Add a separate set of
autocommands for the buffer lifecycle:
BufIsCreated (after buffer ID exists)
BufIsLoaded (after buffer ID has content)
BufIsUnloaded (after buffer ID no longer has)
BufIsWiped (after buffer ID was wiped)
BufIsRenamed (after buffer ID gets another name)
The buffer list and windows are locked, no changes possible
Matchparen doesn't remove highlight after undo. (#7054) Matchparen doesn't remove highlight after undo. (#7054)
Is OK when syntax HL is active. Is OK when syntax HL is active.
@@ -396,37 +406,11 @@ Why does Test_invalid_sid() not work in the GUI?
Lua: updating wrong buffer when using newly created, unloaded buffer. Lua: updating wrong buffer when using newly created, unloaded buffer.
(#6539) (#6539)
When "+ register is set then "" points to it. If another Vim grabs the "+
register, then "" doesn't contain anything. Make it still follow "+.
(#6435)
File marks merging has duplicates since 7.4.1925. (Ingo Karkat, #5733) File marks merging has duplicates since 7.4.1925. (Ingo Karkat, #5733)
"make test_gui" crashed in submenu_change(). Fix and remove workaround in
add_pixmap_args().
Athena is OK.
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?
When editing a file with ":edit" the output of :swapname is relative, while
editing it with "vim file" it is absolute. (#355)
Which one should it be?
:map output does not clear the reset of the command line.
(#5623, also see #5962)
Problem with auto-formatting - inserting space and putting cursor before added Problem with auto-formatting - inserting space and putting cursor before added
character. (#6154) character. (#6154)
undo result wrong: Masato Nishihata, #4798
After recovering from a swap file the undofile should not be used, it causes
corruption. (#6631)
When the computer crashes while writing the undofile, the contents may be
lost. Write to a temp file, fsync and rename. (#8879)
When 'lazyredraw' is set sometimes the title is not updated. When 'lazyredraw' is set sometimes the title is not updated.
(Jason Franklin, 2020 Feb 3) Looks like a race condition. (Jason Franklin, 2020 Feb 3) Looks like a race condition.
@@ -464,13 +448,6 @@ Wrong error when using local arglist. (Harm te Hennepe, #6133)
Test loose_clipboard() by selecting text before suspending. Test loose_clipboard() by selecting text before suspending.
Undo puts cursor in wrong line after "cG<Esc>" undo.
Implement completion for "breakadd". Should expand the second argument, e.g.
"func", and then function names after ":breakadd func". Including
script-local functions.
Also for ":profile".
:unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019 :unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019
Dec 19) Dec 19)
@@ -492,18 +469,10 @@ in terminal.c and then CTRL-N twice.
Should do current file first and not split it up when more results are found. Should do current file first and not split it up when more results are found.
(Also #1890) (Also #1890)
Undo history wrong when ":next file" re-uses a buffer. (#5426)
ex_next() should pass flag to do_argfile(), then to do_ecmd().
Is there a test for this?
Help for ":argadd fname" says that if "fname" is already in the argument list Help for ":argadd fname" says that if "fname" is already in the argument list
that entry is used. But instead it's always added. (#6210) that entry is used. But instead it's always added. (#6210)
Add flag AL_FIND_ADD, if there is one argument find it in the list. Add flag AL_FIND_ADD, if there is one argument find it in the list.
":bnext" in a help buffer is supposed to go to the next help buffer, but it
goes to any buffer, and then :bnext skips help buffers, since they are
unlisted. (#4478)
Statusline highlighting error, off by one. (#5599) Statusline highlighting error, off by one. (#5599)
":find" with 'path' set to "data*" does not find files, while completion does ":find" with 'path' set to "data*" does not find files, while completion does
@@ -558,9 +527,6 @@ when "qq" is mapped and after the first "q" the mouse is moved outside of the
gvim window (with focus follows mouse), then the K_FOCUSLOST key is put in the gvim window (with focus follows mouse), then the K_FOCUSLOST key is put in the
input buffer. (#5302) input buffer. (#5302)
:buffer completion does not escape "+" properly and results in a regexp error.
(#5467)
Check_external_diff() is used too often. (Daniel Hahler, #4800) Check_external_diff() is used too often. (Daniel Hahler, #4800)
Win32: after "[I" showing matches, scroll wheel messes up screen. (Tsakiridis, Win32: after "[I" showing matches, scroll wheel messes up screen. (Tsakiridis,
@@ -761,9 +727,6 @@ punctuation is repeated. (Smylers, 2018 Nov 17, #3621)
Using single wide base character with double wide composing character gives Using single wide base character with double wide composing character gives
drawing errors. Fill up the base character? (Dominique, #4328) drawing errors. Fill up the base character? (Dominique, #4328)
Problem with two buffers with the same name a/b, if it didn't exist before and
is created outside of Vim. (dskloetg, 2018 Jul 16, #3219)
When 'sidescrolloff' is set, using "zl" to go to the end of the line, suddenly When 'sidescrolloff' is set, using "zl" to go to the end of the line, suddenly
scrolls back. Should allow for this scrolling, like 'scrolloff' does when scrolls back. Should allow for this scrolling, like 'scrolloff' does when
using CTRL-E. (Yee Cheng Chin, #3721) using CTRL-E. (Yee Cheng Chin, #3721)
@@ -782,8 +745,6 @@ when possible. (Dylan Lloyd, #3973)
Make ":interactive !cmd" stop termcap mode, also when used in an autocommand. Make ":interactive !cmd" stop termcap mode, also when used in an autocommand.
(#3692) (#3692)
Add buffer argument to undotree(). (#4001)
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
19. 19.
@@ -866,10 +827,6 @@ Try out background make plugin:
or asyncmake: or asyncmake:
https://github.com/yegappan/asyncmake https://github.com/yegappan/asyncmake
Add an option with file patterns, to be used when unloading a buffer: If there
is a match, remove entries for the buffer from marks, jumplist, etc. To be
used for git temp files.
Cursor in wrong position when line wraps. (#2540) Cursor in wrong position when line wraps. (#2540)
Setting 'columns' in a BufEnter autocommand causes a second tab width to Setting 'columns' in a BufEnter autocommand causes a second tab width to
@@ -920,15 +877,10 @@ Python indenting: alternative way to indent arguments:
http://orchistro.tistory.com/236 http://orchistro.tistory.com/236
Should be supported with a flag. Should be supported with a flag.
Add the debug command line history to viminfo.
Add Makefiles to the runtime/spell directory tree, since nobody uses Aap. Add Makefiles to the runtime/spell directory tree, since nobody uses Aap.
Will have to explain the manual steps (downloading the .aff and .dic files, Will have to explain the manual steps (downloading the .aff and .dic files,
applying the diff, etc. applying the diff, etc.
Pasting a register in Visual mode cannot be repeated. (Mahmoud Al-Qudsi, 2018
Apr 26, #2849)
User dictionary ~/.vim/spell/lang.utf-8.add not used for spell checking until a User dictionary ~/.vim/spell/lang.utf-8.add not used for spell checking until a
word is re-added to it. (Matej Cepl, 2018 Feb 6) word is re-added to it. (Matej Cepl, 2018 Feb 6)
@@ -1061,9 +1013,6 @@ behavior. Skip when "uname" returns "SunOS"? (Pavel Heimlich, #1872)
The ++ options for the :edit command are also useful on the Vim command line. The ++ options for the :edit command are also useful on the Vim command line.
When recovering a file, put the swap file name in b:recovered_swapfile. Then
a command can delete it.
Overlong utf-8 sequence is displayed wrong. (Harm te Hennepe, 2017 Sep 14, Overlong utf-8 sequence is displayed wrong. (Harm te Hennepe, 2017 Sep 14,
#2089) Patch with possible solution by Björn Linse. #2089) Patch with possible solution by Björn Linse.
@@ -1123,9 +1072,6 @@ Use gvimext.dll from the nightly build? (Issue #249)
Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May
8, #1690) 8, #1690)
Using "wviminfo /tmp/viminfo" does not store file marks that Vim knows about,
it only works when merging with an existing file. (Shougo, 2017 Jun 19, #1781)
Memory leak in test97? The string is actually freed. Weird. Memory leak in test97? The string is actually freed. Weird.
assert_fails() can only check for the first error. Make it possible to have assert_fails() can only check for the first error. Make it possible to have
@@ -1245,8 +1191,6 @@ Should :vmap in matchit.vim be :xmap? (Tony Mechelynck)
Problem with whitespace in errorformat. (Gerd Wachsmuth, 2016 May 15, #807) Problem with whitespace in errorformat. (Gerd Wachsmuth, 2016 May 15, #807)
Undo problem: "g-" doesn't go back, gets stuck. (Björn Linse, 2016 Jul 18)
Add "unicode true" to NSIS installer. Doesn't work with Windows 95, which we Add "unicode true" to NSIS installer. Doesn't work with Windows 95, which we
no longer support. no longer support.
@@ -1343,10 +1287,6 @@ Regexp problems:
Another one: echom matchstr(" sdfsfsf\n sfdsdfsdf",'[^\n]*') Another one: echom matchstr(" sdfsfsf\n sfdsdfsdf",'[^\n]*')
(2017 May 15, #1252) (2017 May 15, #1252)
Undo message is not always properly displayed. Patch by Ken Takata, 2013 oct
3. Doesn't work properly according to Yukihiro Nakadaira.
Also see #1635.
Idea from Sven: record sequence of keys. Useful to show others what they are Idea from Sven: record sequence of keys. Useful to show others what they are
doing (look over the shoulder), and also to see what happened. doing (look over the shoulder), and also to see what happened.
Probably list of keystrokes, with some annotations for mode changes. Probably list of keystrokes, with some annotations for mode changes.
@@ -1359,9 +1299,6 @@ cmap using execute() has side effects. (Killthemule, 2016 Aug 17, #983)
Patch to order results from taglist(). (Duncan McDougall, 2016 Oct 25) Patch to order results from taglist(). (Duncan McDougall, 2016 Oct 25)
When using ":diffput" through a mapping, undo in the target buffer isn't
synced. (Ryan Carney, 2016 Sep 14)
Syntax highlighting for messages with RFC3339 timestamp (#946) Syntax highlighting for messages with RFC3339 timestamp (#946)
Did maintainer reply? Did maintainer reply?
@@ -1649,9 +1586,6 @@ This neither: (ZyX)
Change 'viewdir' to "$HOME/vimfiles/view" and use 'viewdiralt' to also read Change 'viewdir' to "$HOME/vimfiles/view" and use 'viewdiralt' to also read
from? from?
Problem with upwards search on Windows (works OK on Linux). (Brett Stahlman,
2014 Jun 8)
Include a plugin manager with Vim? vim-plug seems to be the best currently: Include a plugin manager with Vim? vim-plug seems to be the best currently:
https://github.com/junegunn/vim-plug. https://github.com/junegunn/vim-plug.
Also Vundle: https://github.com/gmarik/vundle Also Vundle: https://github.com/gmarik/vundle
@@ -1715,12 +1649,6 @@ Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14)
Several syntax file match "^\s*" which may get underlined if that's in the Several syntax file match "^\s*" which may get underlined if that's in the
highlight group. Add a "\zs" after it? highlight group. Add a "\zs" after it?
The undo file name can get too long. (Issue 346)
For the path use a hash instead of dir%dir%dir%name hash%name.
Patch to add ":undorecover", get as much text out of the undo file as
possible. (Christian Brabandt, 2014 Mar 12, update Aug 22)
Updated spec ftplugin. (Matěj Cepl, 2013 Oct 16) Updated spec ftplugin. (Matěj Cepl, 2013 Oct 16)
Patch to handle integer overflow. (Aaron Burrow, 2013 Dec 12) Patch to handle integer overflow. (Aaron Burrow, 2013 Dec 12)
@@ -1745,9 +1673,6 @@ Dec 13. Only helps a bit, 10000ii<Esc> is still too slow.
GTK: problem with 'L' in 'guioptions' changing the window width. GTK: problem with 'L' in 'guioptions' changing the window width.
(Aaron Cornelius, 2012 Feb 6) (Aaron Cornelius, 2012 Feb 6)
Patch to add option that tells whether small deletes go into the numbered
registers. (Aryeh Leib Taurog, 2013 Nov 18)
Javascript file where indent gets stuck on: GalaxyMaster, 2012 May 3. Javascript file where indent gets stuck on: GalaxyMaster, 2012 May 3.
The BufUnload event is triggered when re-using the empty buffer. The BufUnload event is triggered when re-using the empty buffer.
@@ -1797,10 +1722,6 @@ Patch by Christian Brabandt, 2013 Apr 20, unfinished.
Bug: findfile("any", "file:///tmp;") does not work. Bug: findfile("any", "file:///tmp;") does not work.
In the ATTENTION message about an existing swap file, mention the name of the
process that is running. It might actually be some other program, e.g. after
a reboot.
patch to add "combine" flag to syntax commands. (so8res, 2012 Dec 6) patch to add "combine" flag to syntax commands. (so8res, 2012 Dec 6)
Patch to add "combine" to :syntax, combines highlight attributes. (Nate Patch to add "combine" to :syntax, combines highlight attributes. (Nate
Soares, 2012 Dec 3) Soares, 2012 Dec 3)
@@ -1865,10 +1786,6 @@ Alternate suggestion: let all columns continue, also the number column.
Patch to add tests for if_xcmdsrv.c., Jul 8, need some more work. (Brian Burns) Patch to add tests for if_xcmdsrv.c., Jul 8, need some more work. (Brian Burns)
New tests Jul 13. Update Jul 17. Discussion Jul 18. New tests Jul 13. Update Jul 17. Discussion Jul 18.
When running Vim in silent ex mode, an existing swapfile causes Vim to wait
for a user action without a prompt. (Maarten Billemont, 2012 Feb 3)
Do give the prompt? Quit with an error?
Patch for input method status. (Hirohito Higashi, 2012 Apr 18) Patch for input method status. (Hirohito Higashi, 2012 Apr 18)
Update Vim app icon (for Gnome). (Jakub Steiner, 2013 Dec 6) Update Vim app icon (for Gnome). (Jakub Steiner, 2013 Dec 6)
@@ -1919,10 +1836,6 @@ On MS-Windows a temp dir with a & init causes system() to fail. (Ben Fritz,
Patch 7.3.116 was the wrong solution. Patch 7.3.116 was the wrong solution.
Christian Brabandt has another incomplete patch. (2011 Jul 13) Christian Brabandt has another incomplete patch. (2011 Jul 13)
With concealed text mouse click doesn't put the cursor in the right position.
(Herb Sitz) Fix by Christian Brabandt, 2011 Jun 16. Doesn't work properly,
need to make the change in where RET_WIN_BUF_CHARTABSIZE() is called.
Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2, Syntax region with 'concealends' and a 'cchar' value, 'conceallevel' set to 2,
only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug only one of the two ends gets the cchar displayed. (Brett Stahlman, 2010 Aug
21, Ben Fritz, 2010 Sep 14) 21, Ben Fritz, 2010 Sep 14)
@@ -1945,9 +1858,6 @@ Oct 26)
Bug in repeating Visual "u". (Lawrence Kesteloot, 2010 Dec 20) Bug in repeating Visual "u". (Lawrence Kesteloot, 2010 Dec 20)
With "unamedplus" in 'clipboard' pasting in Visual mode causes error for empty
register. (Michael Seiwald, 2011 Jun 28) I can't reproduce it.
Windows keys not set properly on Windows 7? (cncyber, 2010 Aug 26) Windows keys not set properly on Windows 7? (cncyber, 2010 Aug 26)
When using a Vim server, a # in the path causes an error message. When using a Vim server, a # in the path causes an error message.
@@ -2052,9 +1962,6 @@ Version of netbeans.c for use with MacVim. (Kazuki Sakamoto, 2010 Nov 18)
there is one backslash. (Ray Frush, 2010 Nov 18) What does the original ex there is one backslash. (Ray Frush, 2010 Nov 18) What does the original ex
do? do?
Searching mixed with Visual mode doesn't redraw properly. (James Vega, 2010 Nov
22)
New esperanto spell file can't be processed. (Dominique Pelle, 2011 Jan 30) New esperanto spell file can't be processed. (Dominique Pelle, 2011 Jan 30)
- move compflags to separate growarray? - move compflags to separate growarray?
- instead of a regexp use a hashtable. Expand '?', '*', '+'. What would be - instead of a regexp use a hashtable. Expand '?', '*', '+'. What would be
@@ -2147,9 +2054,6 @@ Gui menu edit/paste in block mode insert only inserts in one line (Bjorn
Winckler, 2011 May 11) Winckler, 2011 May 11)
Requires a map mode for Insert mode started from blockwise Visual mode. Requires a map mode for Insert mode started from blockwise Visual mode.
Writing nested List and Dict in viminfo gives error message and can't be read
back. (Yukihiro Nakadaira, 2010 Nov 13)
Problem with cursor in the wrong column. (SungHyun Nam, 2010 Mar 11) Problem with cursor in the wrong column. (SungHyun Nam, 2010 Mar 11)
Additional info by Dominique Pelle. (also on 2010 Apr 10) Additional info by Dominique Pelle. (also on 2010 Apr 10)
@@ -2193,18 +2097,11 @@ like it has ":keepjumps" before it.
Coverity: Check if there are new reported defects: Coverity: Check if there are new reported defects:
https://scan.coverity.com/projects/241 https://scan.coverity.com/projects/241
Patch to support :undo absolute jump to file save number. (Christian Brabandt,
2010 Nov 5)
Patch to use 'foldnestmax' also for "marker" foldmethod. (Arnaud Lacombe, 2011 Patch to use 'foldnestmax' also for "marker" foldmethod. (Arnaud Lacombe, 2011
Jan 7) Jan 7)
Problem with editing file in binary mode. (Ingo Krabbe, 2009 Oct 8) Problem with editing file in binary mode. (Ingo Krabbe, 2009 Oct 8)
With 'wildmode' set to "longest:full,full" and pressing Tab once the first
entry in wildmenu is highlighted, that shouldn't happen. (Yuki Watanabe, 2011
Feb 12)
Display error when 'tabline' that includes a file name with double-width Display error when 'tabline' that includes a file name with double-width
characters. (2010 Aug 14, bootleq) characters. (2010 Aug 14, bootleq)
@@ -2310,10 +2207,6 @@ displayed in a window should return the value that's stored for that buffer.
":he ctrl_u" can be auto-corrected to ":he ctrl-u". ":he ctrl_u" can be auto-corrected to ":he ctrl-u".
There should be a way after an abbreviation has expanded to go back to what
was typed. CTRL-G h ? Would also undo last word or line break inserted
perhaps. And undo CTRL-W. CTRL-G l would redo.
Diff mode out of sync. (Gary Johnson, 2010 Aug 4) Diff mode out of sync. (Gary Johnson, 2010 Aug 4)
Win32 GUI: last message from startup doesn't show up when there is an echoerr Win32 GUI: last message from startup doesn't show up when there is an echoerr
@@ -2332,9 +2225,6 @@ Session file generates error upon loading, cause by --remote-silent-tab.
Using ~ works OK on 'a' with composing char, but not on 0x0418 with composing Using ~ works OK on 'a' with composing char, but not on 0x0418 with composing
char 0x0301. (Tony Mechelynck, 2009 Mar 4) char 0x0301. (Tony Mechelynck, 2009 Mar 4)
Searching for composing char works, but not when inside []. (ZyX, Benjamin R.
Haskell, 2010 Aug 24)
This does not work yet: "a\(%C\)" (get composing characters into a submatch). This does not work yet: "a\(%C\)" (get composing characters into a submatch).
Inconsistent: starting with $LANG set to es_ES.utf-8 gives Spanish Inconsistent: starting with $LANG set to es_ES.utf-8 gives Spanish
@@ -2352,16 +2242,6 @@ a modeline.
Add cscope target to Makefile. (Tony Mechelynck, 2009 Jun 18, replies by Add cscope target to Makefile. (Tony Mechelynck, 2009 Jun 18, replies by
Sergey Khorev) Sergey Khorev)
Consider making YankRing or something else that keeps a list of yanked text
part of standard Vim. The "1 to "9 registers are not sufficient.
6 When yanking into the unnamed registers several times, somehow make the
previous contents also available (like it's done for deleting). What
register names to use? g"1, g"2, etc.?
Also do this for the small delete register "-.
After doing "su" $HOME can be the old user's home, thus ~root/file is not
correct. Don't use it in the swap file.
Completion for ":buf" doesn't work properly on Win32 when 'shellslash' is off. Completion for ":buf" doesn't work properly on Win32 when 'shellslash' is off.
(Henrik Ohman, 2009, Jan 29) (Henrik Ohman, 2009, Jan 29)
@@ -2393,11 +2273,6 @@ probably causes this.
'scrollbind' is not respected when deleting lines or undo. (Milan Vancura, 'scrollbind' is not respected when deleting lines or undo. (Milan Vancura,
2009 Jan 16) 2009 Jan 16)
Document that default font in Athena can be set with resources:
XtDefaultFont: "9x15"
XtDefaultFontSet: "9x15"
(Richard Sherman, 2009 Apr 12)
Having "Syntax" in 'eventignore' for :bufdo may cause problems, e.g. for Having "Syntax" in 'eventignore' for :bufdo may cause problems, e.g. for
":bufdo e" when buffers are open in windows. ex_listdo(eap) could set the ":bufdo e" when buffers are open in windows. ex_listdo(eap) could set the
option only for when jumping to another buffer, not when the command argument option only for when jumping to another buffer, not when the command argument
@@ -2407,10 +2282,6 @@ is executed.
first line. (Ingo Karkat, 2008 Jul 1) Ian Kelling is working on this. first line. (Ingo Karkat, 2008 Jul 1) Ian Kelling is working on this.
Similar problem with ":e". (Marc Montu, 2014 Apr 22) Similar problem with ":e". (Marc Montu, 2014 Apr 22)
Wildmenu not deleted: "gvim -u NONE", ":set nocp wildmenu cmdheight=3
laststatus=2", CTRL-D CTRL-H CTRL-H CTRL-H. (A.Politz, 2008 April 1)
Works OK with Vim in an xterm.
Cursor line moves in other window when using CTRL-W J that doesn't change Cursor line moves in other window when using CTRL-W J that doesn't change
anything. (Dasn, 2009 Apr 7) anything. (Dasn, 2009 Apr 7)
@@ -2443,10 +2314,6 @@ backslash? (Robert Vibrant, 2008 Jun 5)
When 'rightleft' is set, cursorcolumn isn't highlighted after the end of a When 'rightleft' is set, cursorcolumn isn't highlighted after the end of a
line. It's also wrong in folds. (Dominique Pelle, 2010 Aug 21) line. It's also wrong in folds. (Dominique Pelle, 2010 Aug 21)
After using <Tab> for command line completion after ":ta blah" and getting E33
(no tags file), further editing the command to e.g., ":echo 'blah'", the
command is not executed. Fix by Ian Kelling?
":help s/~" jumps to *s/\~*, while ":help s/\~" doesn't find anything. (Tim ":help s/~" jumps to *s/\~*, while ":help s/\~" doesn't find anything. (Tim
Chase) Fix by Ian Kelling, 2008 Jul 14. Chase) Fix by Ian Kelling, 2008 Jul 14.
@@ -2501,10 +2368,6 @@ Works OK when 'cmdheight' is 2.
8 Use a mechanism similar to omni completion to figure out the kind of tab 8 Use a mechanism similar to omni completion to figure out the kind of tab
for CTRL-] and jump to the appropriate matching tag (if there are for CTRL-] and jump to the appropriate matching tag (if there are
several). several).
Alternative: be able to define a function that takes the tag name and uses
taglist() to find the right location. With indication of using CTRL-] so
that the context can be taken into account. (Robert Webb)
Patch by Christian Brabandt, 2013 May 31.
The utf class table is missing some entries: The utf class table is missing some entries:
0x2212, minus sign 0x2212, minus sign
@@ -2540,22 +2403,12 @@ Try to reproduce at work.
Patch for default choice in file changed dialog. (Bjorn Winckler, 2008 Oct 19) Patch for default choice in file changed dialog. (Bjorn Winckler, 2008 Oct 19)
Is there a way to list all the files first? Is there a way to list all the files first?
When 'smartcase' is set and using CTRL-L to add to the search pattern it may
result in no matches. Convert chars to lower case? (Erik Wognsen, 2009 Apr
16)
Fail to edit file after failed register access. Error flag remains set? Fail to edit file after failed register access. Error flag remains set?
(Lech Lorens, 2010 Aug 30) (Lech Lorens, 2010 Aug 30)
Patch for redo register. (Ben Schmidt, 2007 Oct 19)
Await response to question to make the register writable.
Problem with 'ts' set to 9 and 'showbreak' to ">>>". (Matthew Winn, 2007 Oct Problem with 'ts' set to 9 and 'showbreak' to ">>>". (Matthew Winn, 2007 Oct
1) 1)
In the swapfile dialog, add a H(elp) option that gives more info about what
each choice does. Similar to ":help swap-exists-choices"
":tab help" always opens a new tab, while ":help" re-uses an existing window. ":tab help" always opens a new tab, while ":help" re-uses an existing window.
Would be more consistent when an existing tab is re-used. (Tony Mechelynck) Would be more consistent when an existing tab is re-used. (Tony Mechelynck)
@@ -2619,19 +2472,6 @@ popup menu over it, first draw the new popup menu, remember its position and
size and then redraw the text, skipping the characters under the popup menu. size and then redraw the text, skipping the characters under the popup menu.
This should avoid flicker. Other solution by A.Politz, 2007 Aug 22. This should avoid flicker. Other solution by A.Politz, 2007 Aug 22.
When a register contains illegal bytes, writing viminfo in utf-8 and reading
it back doesn't result in utf-8. (Devin Bayer)
Command line completion: Scanning for tags doesn't check for typed key now and
then? Hangs for about 5 seconds. Appears to be caused by finding include
files with "foo/**" in 'path'. (Kalisiak, 2006 July 15)
Additional info: When using the |wildcards| ** globing, vim hangs
indefinitely on lots of directories. The |file-searching| globing, like in
":set path=/**" does not hang as often as with globing with |wildcards|, like
in ":1find /**/file". This is for files that unix "find" can find very
quickly. Merging the 2 kinds of globing might make this an easier fix. (Ian
Kelling, 2008 July 4)
When the file name has parenthesis, e.g., "foo (bar).txt", ":!ls '%'" has the When the file name has parenthesis, e.g., "foo (bar).txt", ":!ls '%'" has the
parenthesis escaped but not the space. That's inconsistent. Either escape parenthesis escaped but not the space. That's inconsistent. Either escape
neither or both. No escaping might be best, because it doesn't depend on neither or both. No escaping might be best, because it doesn't depend on
@@ -2710,11 +2550,6 @@ Cursor displayed in the wrong position when using 'numberwidth'. (James Vega,
When $VAR contains a backslash expand('$VAR') removes it. (Teemu Likonen, 2008 When $VAR contains a backslash expand('$VAR') removes it. (Teemu Likonen, 2008
Jun 18) Jun 18)
If the variable "g:x#y#z" exists completion after ":echo g:x#" doesn't work.
In debug mode, using CTRL-R = to evaluate a function causes stepping through
the function. (Hari Krishna Dara, 2006 Jun 28)
C++ indenting wrong with "=". (James Kanze, 2007 Jan 26) C++ indenting wrong with "=". (James Kanze, 2007 Jan 26)
":lockvar" should use copyID to avoid endless loop. ":lockvar" should use copyID to avoid endless loop.
@@ -2820,13 +2655,6 @@ reload it then?
For Aap: include a config.arg.example file with hints how to use config.arg. For Aap: include a config.arg.example file with hints how to use config.arg.
Command line completion when 'cmdheight' is maximum and 'wildmenu' is set,
only one buffer line displayed, causes display errors.
Completing with 'wildmenu' and using <Up> and <Down> to move through directory
tree stops unexpectedly when using ":cd " and entering a directory that
doesn't contain other directories.
Default for 'background' is wrong when using xterm with 256 colors. Default for 'background' is wrong when using xterm with 256 colors.
Table with estimates from Matteo Cavalleri, 2014 Jan 10. Table with estimates from Matteo Cavalleri, 2014 Jan 10.
@@ -3072,6 +2900,9 @@ Awaiting updated patches:
- For GUI Find/Replace dialog support using a regexp. Patch for Motif - For GUI Find/Replace dialog support using a regexp. Patch for Motif
and GTK by degreneir (nov 10 and nov 18). and GTK by degreneir (nov 10 and nov 18).
- Patch for "paranoid mode" by Kevin Collins, March 7. Needs much more work. - Patch for "paranoid mode" by Kevin Collins, March 7. Needs much more work.
- Patch for redo register. (Ben Schmidt, 2007 Oct 19)
Await response to question to make the register writable.
Better 'rightleft' or BIDI support: Better 'rightleft' or BIDI support:
- Minimal Vi with bidi support: https://github.com/aligrudi/neatvi - Minimal Vi with bidi support: https://github.com/aligrudi/neatvi
@@ -3270,7 +3101,7 @@ Win32 GUI known bugs:
the font name). the font name).
Athena and Motif: Motif:
6 New Motif toolbar button from Marcin Dalecki: 6 New Motif toolbar button from Marcin Dalecki:
- When the mouse pointer is over an Agide button the red becomes black. - When the mouse pointer is over an Agide button the red becomes black.
Something with the way colors are specified in the .xpm file. Something with the way colors are specified in the .xpm file.
@@ -3282,7 +3113,7 @@ Athena and Motif:
wrong. wrong.
9 XIM is disabled by default for SGI/IRIX. Fix XIM so that 'imdisable' can 9 XIM is disabled by default for SGI/IRIX. Fix XIM so that 'imdisable' can
be off by default. be off by default.
9 XIM doesn't work properly for Athena/Motif. (Yasuhiro Matsumoto) For now, 9 XIM doesn't work properly for Motif. (Yasuhiro Matsumoto) For now,
keep XIM active at all times when the input method has the preediting keep XIM active at all times when the input method has the preediting
flag. flag.
8 X11: A menu that contains an umlaut is truncated at that character. 8 X11: A menu that contains an umlaut is truncated at that character.
@@ -3300,27 +3131,6 @@ Athena and Motif:
current locale. Workaround: set 'langmenu'. current locale. Workaround: set 'langmenu'.
Athena GUI:
9 The first event for any button in the menu or toolbar appears to get lost.
The second click on a menu does work.
9 When dragging the scrollbar thumb very fast, focus is only obtained in
the scrollbar itself. And the thumb is no longer updated when moving
through files.
7 The file selector is not resizable. With a big font it is difficult to
read long file names. (Schroeder)
4 Re-write the widget attachments and code so that we will not have to go
through and calculate the absolute position of every widget every time the
window is refreshed/changes size. This will help the "flashing-widgets"
problem during a refresh.
5 When starting gvim with all the default colors and then typing
":hi Menu guibg=cyan", the menus change color but the background of the
pullright pixmap doesn't change colors.
If you type ":hi Menu guibg=cyan font=anyfont", then the pixmap changes
colors as it should.
Allocating a new pixmap and setting the resource doesn't change the
pullright pixmap's colors. Why? Possible Athena bug?
Motif GUI: Motif GUI:
- gui_mch_browsedir() is missing, browsedir() doesn't work nicely. - gui_mch_browsedir() is missing, browsedir() doesn't work nicely.
7 Use XmStringCreateLocalized() instead of XmStringCreateSimple()? 7 Use XmStringCreateLocalized() instead of XmStringCreateSimple()?
@@ -3508,8 +3318,6 @@ Macintosh:
8 When doing Insert mode completion a mapping cannot recursively call 8 When doing Insert mode completion a mapping cannot recursively call
edit(), because the completion information is global. Put everything in edit(), because the completion information is global. Put everything in
an allocated structure? an allocated structure?
8 Command line completion: buffers "foo.txt" and "../b/foo.txt", completing
":buf foo<Tab>" doesn't find the second one. (George V. Reilly)
7 mb_off2cells() doesn't work correctly on the tail byte of a double-byte 7 mb_off2cells() doesn't work correctly on the tail byte of a double-byte
character. (Yasuhiro Matsumoto) It should return 1 when used on a tail character. (Yasuhiro Matsumoto) It should return 1 when used on a tail
byte, like for utf-8. Store second byte of double-byte in ScreenLines2[] byte, like for utf-8. Store second byte of double-byte in ScreenLines2[]
@@ -3637,10 +3445,6 @@ Macintosh:
maximum number of open files, error messages will appear. Detect that maximum number of open files, error messages will appear. Detect that
this problem is present, and close any hidden files that don't have this problem is present, and close any hidden files that don't have
changes. changes.
8 With 'viminfo' set such that the ".viminfo" file is written on a FAT
filesystem, an illegal file name may be created: ".vim".
8 For each buffer that is opened, the viminfo file is opened and read to
check for file marks. This can be slow.
8 Core dump within signal function: gdb doesn't show stack backtrace! Option 8 Core dump within signal function: gdb doesn't show stack backtrace! Option
to skip catch_signals()? to skip catch_signals()?
9 Repeating a "cw" with "." doesn't work if the text was pasted from the 9 Repeating a "cw" with "." doesn't work if the text was pasted from the
@@ -3690,9 +3494,6 @@ Macintosh:
"initdir" is the default path to be used. "initdir" is the default path to be used.
7 When 'scrolloff' is exactly half the window height, "j" causes a scroll of 7 When 'scrolloff' is exactly half the window height, "j" causes a scroll of
two lines at a time. "k" doesn't do this. (Cory T. Echols) two lines at a time. "k" doesn't do this. (Cory T. Echols)
8 When write_viminfo() is used while there are many orphaned viminfo
tempfiles writing the viminfo file fails. Give a clear error message so
that the user knows the files have to be deleted.
I can't reproduce these (if you can, let me know how!): I can't reproduce these (if you can, let me know how!):
@@ -3801,7 +3602,7 @@ Problems that will (probably) not be solved:
Most interesting new features to be added when all bugs have been fixed: Most interesting new features to be added when all bugs have been fixed:
- Using ":exe edit fname" has escaping problems. Use ":edit ++(fname)". - Using ":exe edit fname" has escaping problems. Use ":edit ++(fname)".
Thus use "++=" to give arguments as expressions, comma separated as if Thus use "++=" to give arguments as expressions, comma-separated as if
calling a function. calling a function.
With options: ":edit ++(['!', '++enc=abc'], ['+/pat'], fname)". With options: ":edit ++(['!', '++enc=abc'], ['+/pat'], fname)".
Alternative: Make a function for Ex commands: cmd_edit(). Alternative: Make a function for Ex commands: cmd_edit().
@@ -4244,8 +4045,6 @@ Syntax highlighting:
7 CTRL-] checks the highlight group for finding out what the tag is. 7 CTRL-] checks the highlight group for finding out what the tag is.
7 Add an explanation how a list of words can be used to highlight misspelled 7 Add an explanation how a list of words can be used to highlight misspelled
words. words.
8 Add more command line completion for :syntax.
8 Add more command line completion for :highlight.
7 Should find a better way to parse the :syntax and :highlight commands. 7 Should find a better way to parse the :syntax and :highlight commands.
Use tables or lists that can be shared by parsing for execution and Use tables or lists that can be shared by parsing for execution and
completion? completion?
@@ -4303,12 +4102,6 @@ Vim script language:
restore option values. Especially useful for new options. Problem: how restore option values. Especially useful for new options. Problem: how
to avoid a performance penalty (esp. for string options)? to avoid a performance penalty (esp. for string options)?
- range for ":exec", pass it on to the executed command. (Webb) - range for ":exec", pass it on to the executed command. (Webb)
8 ":{range}source": source the lines from the current file.
You can already yank lines and use :@" to execute them.
Most of do_source() would not be used, need a new function.
It's easy when not doing breakpoints or profiling.
Requires copying the lines into a list and then creating a function to
execute lines from the list. Similar to getnextac().
7 ":include" command: just like ":source" but doesn't start a new scriptID? 7 ":include" command: just like ":source" but doesn't start a new scriptID?
Will be tricky for the list of script names. Will be tricky for the list of script names.
8 Have a look at VSEL. Would it be useful to include? (Bigham) 8 Have a look at VSEL. Would it be useful to include? (Bigham)
@@ -4835,9 +4628,6 @@ Autocommands:
CursorHoldC - CursorHold while command-line editing CursorHoldC - CursorHold while command-line editing
WinMoved - when windows have been moved around, e.g, ":wincmd J" WinMoved - when windows have been moved around, e.g, ":wincmd J"
SearchPost - After doing a search command (e.g. to do "M") SearchPost - After doing a search command (e.g. to do "M")
PreDirChanged/PostDirChanged
- Before/after ":cd" has been used (for changing the
window title)
ShutDown - when the system is about to shut down ShutDown - when the system is about to shut down
InsertCharPost - user typed a character in Insert mode, after inserting InsertCharPost - user typed a character in Insert mode, after inserting
the char. the char.
@@ -4862,6 +4652,14 @@ Autocommands:
Default: 0 = do not autosave the buffer. Default: 0 = do not autosave the buffer.
Alternative: have 'autosave' use 'updatetime' and 'updatecount' but make Alternative: have 'autosave' use 'updatetime' and 'updatecount' but make
them save the file itself besides the swapfile. them save the file itself besides the swapfile.
- Buffer autocommands are a bit inconsistent. Add a separate set of
autocommands for the buffer lifecycle:
BufIsCreated (after buffer ID exists)
BufIsLoaded (after buffer ID has content)
BufIsUnloaded (after buffer ID no longer has)
BufIsWiped (after buffer ID was wiped)
BufIsRenamed (after buffer ID gets another name)
The buffer list and windows are locked, no changes possible
Omni completion: Omni completion:
@@ -5040,6 +4838,35 @@ Command line completion:
- Add 'wildlongest' option: Key to use to find longest common match for - Add 'wildlongest' option: Key to use to find longest common match for
command line completion (default CTRL-L), like 'wildchar'. (Cregut) command line completion (default CTRL-L), like 'wildchar'. (Cregut)
Also: when there are several matches, show them line a CTRL-D. Also: when there are several matches, show them line a CTRL-D.
- With 'wildmode' set to "longest:full,full" and pressing Tab once the first
entry in wildmenu is highlighted, that shouldn't happen. (Yuki Watanabe,
2011 Feb 12)
- After using <Tab> for command line completion after ":ta blah" and getting
E33 (no tags file), further editing the command to e.g., ":echo 'blah'",
the command is not executed. Fix by Ian Kelling?
- Command line completion: Scanning for tags doesn't check for typed key now
and then? Hangs for about 5 seconds. Appears to be caused by finding
include files with "foo/**" in 'path'. (Kalisiak, 2006 July 15)
Additional info: When using the |wildcards| ** globing, vim hangs
indefinitely on lots of directories. The |file-searching| globing, like in
":set path=/**" does not hang as often as with globing with |wildcards|,
like in ":1find /**/file". This is for files that unix "find" can find
very quickly. Merging the 2 kinds of globing might make this an easier
fix. (Ian Kelling, 2008 July 4)
- Command line completion when 'cmdheight' is maximum and 'wildmenu' is set,
only one buffer line displayed, causes display errors.
- Completing with 'wildmenu' and using <Up> and <Down> to move through
directory tree stops unexpectedly when using ":cd " and entering a
directory that doesn't contain other directories.
8 Command line completion: buffers "foo.txt" and "../b/foo.txt", completing
":buf foo<Tab>" doesn't find the second one. (George V. Reilly)
8 Add more command line completion for :syntax.
8 Add more command line completion for :highlight.
- Wildmenu not deleted: "gvim -u NONE", ":set nocp wildmenu cmdheight=3
laststatus=2", CTRL-D CTRL-H CTRL-H CTRL-H. (A.Politz, 2008 April 1) Works
OK with Vim in an xterm.
- If the variable "g:x#y#z" exists completion after ":echo g:x#" doesn't
work.
Command line history: Command line history:
@@ -5504,6 +5331,19 @@ Searching:
[not in xvim:] Add option to switch on matches crossing ONE line boundary. [not in xvim:] Add option to switch on matches crossing ONE line boundary.
7 Add ":iselect", a combination of ":ilist" and ":tselect". (Aaron) (Zellner) 7 Add ":iselect", a combination of ":ilist" and ":tselect". (Aaron) (Zellner)
Also ":dselect". Also ":dselect".
- Searching for \%'> does not find anything when using line Visual
selection. Probably because it's using MAXCOL. #8238
- Regexp to search for duplicate lines does not work correctly:
/\(^.*\n\)\1 (Chris Morgan, #6239)
- Problem with upwards search on Windows (works OK on Linux). (Brett
Stahlman, 2014 Jun 8)
- Searching mixed with Visual mode doesn't redraw properly. (James Vega,
2010 Nov 22)
- Searching for composing char works, but not when inside []. (ZyX, Benjamin
R. Haskell, 2010 Aug 24)
- When 'smartcase' is set and using CTRL-L to add to the search pattern it
may result in no matches. Convert chars to lower case? (Erik Wognsen,
2009 Apr 16)
Undo: Undo:
@@ -5545,6 +5385,36 @@ Undo:
- When executing macro's: Save each line for undo only once. - When executing macro's: Save each line for undo only once.
- When doing a global substitute, causing almost all lines to be changed, - When doing a global substitute, causing almost all lines to be changed,
undo info becomes very big. Put undo info in swap file?? undo info becomes very big. Put undo info in swap file??
- MS-Windows: when writing undo file the infostreams are copied in
mch_copy_file_attribute(), that seems unnecessary. (#7925) Add a flag to
only copy attributes?
- undo result wrong: Masato Nishihata, #4798
- After recovering from a swap file the undofile should not be used, it
causes corruption. (#6631)
- When the computer crashes while writing the undofile, the contents may be
lost. Write to a temp file, fsync and rename. (#8879)
- Undo puts cursor in wrong line after "cG<Esc>" undo.
- Undo history wrong when ":next file" re-uses a buffer. (#5426) ex_next()
should pass flag to do_argfile(), then to do_ecmd(). Is there a test for
this?
- Add buffer argument to undotree(). (#4001)
- Undo problem: "g-" doesn't go back, gets stuck. (Björn Linse, 2016 Jul 18)
- Undo message is not always properly displayed. Patch by Ken Takata, 2013
oct 3. Doesn't work properly according to Yukihiro Nakadaira.
Also see #1635.
- When using ":diffput" through a mapping, undo in the target buffer isn't
synced. (Ryan Carney, 2016 Sep 14)
- The undo file name can get too long. (Issue 346)
For the path use a hash instead of dir%dir%dir%name hash%name.
- Patch to add ":undorecover", get as much text out of the undo file as
possible. (Christian Brabandt, 2014 Mar 12, update Aug 22)
- Patch to support :undo absolute jump to file save number. (Christian
Brabandt, 2010 Nov 5)
- There should be a way after an abbreviation has expanded to go back to
what was typed. CTRL-G h ? Would also undo last word or line break
inserted perhaps. And undo CTRL-W. CTRL-G l would redo.
- When using 'cryptmethod' xchaha20 the undo file is not encrypted.
Need to handle extra bytes.
Buffer list: Buffer list:
@@ -5575,6 +5445,18 @@ Buffer list:
8 Some file systems are case-sensitive, some are not. Besides 8 Some file systems are case-sensitive, some are not. Besides
'wildignorecase' there might be more parts inside 'wildignorecase' there might be more parts inside
CASE_INSENSITIVE_FILENAME that are useful on Unix. CASE_INSENSITIVE_FILENAME that are useful on Unix.
- When using ":bwipe!" also get rid of references to be buffer, e.g. in the
jumplist and alternate file.
- ":bnext" in a help buffer is supposed to go to the next help buffer, but
it goes to any buffer, and then :bnext skips help buffers, since they are
unlisted. (#4478)
- :buffer completion does not escape "+" properly and results in a regexp
error. (#5467)
- Problem with two buffers with the same name a/b, if it didn't exist before
and is created outside of Vim. (dskloetg, 2018 Jul 16, #3219)
- Add an option with file patterns, to be used when unloading a buffer: If
there is a match, remove entries for the buffer from marks, jumplist, etc.
To be used for git temp files.
Swap (.swp) files: Swap (.swp) files:
@@ -5605,6 +5487,21 @@ Swap (.swp) files:
original file. Also do this when the file is huge (>'maxmem'). We do original file. Also do this when the file is huge (>'maxmem'). We do
need to load the file once to count the number of lines? Perhaps keep a need to load the file once to count the number of lines? Perhaps keep a
cached list of which line is where. cached list of which line is where.
- 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?
- When recovering a file, put the swap file name in b:recovered_swapfile.
Then a command can delete it.
- In the ATTENTION message about an existing swap file, mention the name of
the process that is running. It might actually be some other program,
e.g. after a reboot.
- When running Vim in silent ex mode, an existing swapfile causes Vim to
wait for a user action without a prompt. (Maarten Billemont, 2012 Feb 3)
Do give the prompt? Quit with an error?
- After doing "su" $HOME can be the old user's home, thus ~root/file is not
correct. Don't use it in the swap file.
- In the swapfile dialog, add a H(elp) option that gives more info about
what each choice does. Similar to ":help swap-exists-choices"
Viminfo: Viminfo:
@@ -5631,6 +5528,21 @@ Viminfo:
same files in the windows. Use ":mksession" code? same files in the windows. Use ":mksession" code?
- Make marks present in .viminfo usable as file marks: Display a list of - Make marks present in .viminfo usable as file marks: Display a list of
"last visited files" and select one to jump to. "last visited files" and select one to jump to.
- Add the debug command line history to viminfo.
- Using "wviminfo /tmp/viminfo" does not store file marks that Vim knows
about, it only works when merging with an existing file. (Shougo, 2017
Jun 19, #1781)
- Writing nested List and Dict in viminfo gives error message and can't be
read back. (Yukihiro Nakadaira, 2010 Nov 13)
- When a register contains illegal bytes, writing viminfo in utf-8 and
reading it back doesn't result in utf-8. (Devin Bayer)
8 With 'viminfo' set such that the ".viminfo" file is written on a FAT
filesystem, an illegal file name may be created: ".vim".
8 For each buffer that is opened, the viminfo file is opened and read to
check for file marks. This can be slow.
8 When write_viminfo() is used while there are many orphaned viminfo
tempfiles writing the viminfo file fails. Give a clear error message so
that the user knows the files have to be deleted.
Modelines: Modelines:
@@ -5674,7 +5586,7 @@ Options:
7 ":with option=value | command": temporarily set an option value and 7 ":with option=value | command": temporarily set an option value and
restore it after the command has executed. restore it after the command has executed.
8 Make "old" number options that really give a number of effects into string 8 Make "old" number options that really give a number of effects into string
options that are a comma separated list. The old number values should options that are a comma-separated list. The old number values should
also be supported. also be supported.
8 Add commands to save and restore an option, which also preserves the flag 8 Add commands to save and restore an option, which also preserves the flag
that marks if the option was set. Useful to keep the effect of setting that marks if the option was set. Useful to keep the effect of setting
@@ -5849,6 +5761,23 @@ Registers:
to position of previous deleted (to swap foo and bar in " + foo") to position of previous deleted (to swap foo and bar in " + foo")
8 Should be able to yank and delete into the "/ register. 8 Should be able to yank and delete into the "/ register.
How to take care of the flags (offset, magic)? How to take care of the flags (offset, magic)?
- In Select mode the deleted text always goes into the unnamed register.
Use CTRL-R to specify the register to use. (#9531)
- When "+ register is set then "" points to it. If another Vim grabs the "+
register, then "" doesn't contain anything. Make it still follow "+.
(#6435)
- Pasting a register in Visual mode cannot be repeated. (Mahmoud Al-Qudsi,
2018 Apr 26, #2849)
- Patch to add option that tells whether small deletes go into the numbered
registers. (Aryeh Leib Taurog, 2013 Nov 18)
- With "unamedplus" in 'clipboard' pasting in Visual mode causes error for
empty register. (Michael Seiwald, 2011 Jun 28) I can't reproduce it.
- Consider making YankRing or something else that keeps a list of yanked
text part of standard Vim. The "1 to "9 registers are not sufficient.
6 When yanking into the unnamed registers several times, somehow make the
previous contents also available (like it's done for deleting). What
register names to use? g"1, g"2, etc.?
Also do this for the small delete register "-.
Debug mode: Debug mode:
@@ -5856,6 +5785,9 @@ Debug mode:
8 Add breakpoints for assigning to a variable. 8 Add breakpoints for assigning to a variable.
7 Store the history from debug mode in viminfo. 7 Store the history from debug mode in viminfo.
7 Make the debug mode history available with histget() et al. 7 Make the debug mode history available with histget() et al.
- In debug mode, using CTRL-R = to evaluate a function causes stepping
through the function. (Hari Krishna Dara, 2006 Jun 28)
Various improvements: Various improvements:
7 Add plugins for formatting? Should be able to make a choice depending on 7 Add plugins for formatting? Should be able to make a choice depending on

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 Mar 02
VIM REFERENCE MANUAL by Bram Moolenaar 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| encouraged to make a donation for needy children in Uganda. Please see |kcc|
below or visit the ICCF web site, available at these URLs: below or visit the ICCF web site, available at these URLs:
http://iccf-holland.org/ https://iccf-holland.org/
http://www.vim.org/iccf/ https://www.vim.org/iccf/
http://www.iccf.nl/ https://www.iccf.nl/
You can also sponsor the development of Vim. Vim sponsors can vote for You can also sponsor the development of Vim. Vim sponsors can vote for
features. See |sponsor|. The money goes to Uganda anyway. features. See |sponsor|. The money goes to Uganda anyway.
@@ -133,11 +133,12 @@ Kibaale Children's Centre *kcc* *Kibaale* *charity*
Kibaale Children's Centre (KCC) is located in Kibaale, a small town in the Kibaale Children's Centre (KCC) is located in Kibaale, a small town in the
south of Uganda, near Tanzania, in East Africa. The area is known as Rakai south of Uganda, near Tanzania, in East Africa. The area is known as Rakai
District. The population is mostly farmers. Although people are poor, there District. The population is mostly farmers. Although people are poor, there
is enough food. But this district is suffering from AIDS more than any other usually is enough food. But this district is suffering from AIDS more than
part of the world. Some say that it started there. Estimations are that 10 any other part of the world. Some say that it started there. Estimations are
to 30% of the Ugandans are infected with HIV. Because parents die, there are that in the past 10 to 30% of the Ugandans are infected with HIV. Because
many orphans. In this district about 60,000 children have lost one or both parents die, there are many orphans. In this district about 60,000 children
parents, out of a population of 350,000. And this is still continuing. have lost one or both parents, out of a population of 350,000. Although AIDS
is now mostly under control, the problems are still continuing.
The children need a lot of help. The KCC is working hard to provide the needy The children need a lot of help. The KCC is working hard to provide the needy
with food, medical care and education. Food and medical care to keep them with food, medical care and education. Food and medical care to keep them
@@ -169,10 +170,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. production site for cement slabs. These are used to build a good latrine.
They are sold below cost price. They are sold below cost price.
There is a small clinic at the project, which provides children and their There is a clinic at the project, which provides children and their family
family with medical help. When needed, transport to a hospital is offered. medical help. Since 2020 a maternity ward was added and 24/7 service is
Immunization programs are carried out and help is provided when an epidemic is available. When needed, transport to a hospital is offered. Immunization
breaking out (measles and cholera have been a problem). programs are carried out and help is provided when an epidemic is breaking out
(measles and cholera have been a problem).
*donate* *donate*
Summer 1994 to summer 1995 I spent a whole year at the centre, working as a 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 volunteer. I have helped to expand the centre and worked in the area of water
@@ -214,44 +216,29 @@ Check the ICCF web site for the latest information! See |iccf| for the URL.
USA: The methods mentioned below can be used. USA: The methods mentioned below can be used.
Sending a check to the Nehemiah Group Outreach Society (NGOS) If you must send a check send it to our Canadian partner:
is no longer possible, unfortunately. We are looking for https://www.kuwasha.net/
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.
Canada: Contact Kibaale Children's Fund (KCF) in Surrey, Canada. They Canada: Contact Kuwasha in Surrey, Canada. They take care of the
take care of the Canadian sponsors for the children in Canadian sponsors for the children in Kibaale. Kuwasha
Kibaale. KCF forwards 100% of the money to the project in forwards 100% of the money to the project in Uganda. You can
Uganda. You can send them a one time donation directly. send them a one time donation directly.
Please send me a note so that I know what has been donated Please send me a note so that I know what has been donated
because of Vim. Ask KCF for information about sponsorship. because of Vim. Look on their site for information about
Kibaale Children's Fund c/o Pacific Academy sponsorship: https://www.kuwasha.net/
10238-168 Street If you make a donation to Kuwasha you will receive a tax
Surrey, B.C. V4N 1Z4 receipt which can be submitted with your tax return.
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.
Holland: Transfer to the account of "Stichting ICCF Holland" in Lisse. Holland: Transfer to the account of "Stichting ICCF Holland" in
This will allow for tax deduction if you live in Holland. Amersfoort. This will allow for tax deduction if you live in
Postbank, nr. 4548774 Holland. ING bank, IBAN: NL95 INGB 0004 5487 74
IBAN: NL95 INGB 0004 5487 74
Germany: It is possible to make donations that allow for a tax return. Germany: It is possible to make donations that allow for a tax return.
Check the ICCF web site for the latest information: 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 Europe: Use a bank transfer if possible. See "Others" below for the
country, mostly from the post office. Use this name (which is swift code and IBAN number.
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.
Any other method should work. Ask for information about Any other method should work. Ask for information about
sponsorship. sponsorship.
@@ -261,28 +248,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 https://www.paypal.com/en_US/mrb/pal=XAC62PML3GF8Q
The e-mail address for sending the money to is: The e-mail address for sending the money to is:
Bram@iccf-holland.org Bram@iccf-holland.org
For amounts above 400 Euro ($500) sending a check is
preferred.
Others: Transfer to one of these accounts if possible: Others: Transfer to this account if possible:
Postbank, account 4548774 ING bank: IBAN: NL95 INGB 0004 5487 74
Swift code: INGB NL 2A Swift code: INGBNL2A
IBAN: NL95 INGB 0004 5487 74 under the name "stichting ICCF Holland", Amersfoort
under the name "stichting ICCF Holland", Lisse Checks are not accepted.
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)
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: vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -286,12 +286,12 @@ history file. E.g.: >
au BufReadPost * call ReadUndo() au BufReadPost * call ReadUndo()
au BufWritePost * call WriteUndo() au BufWritePost * call WriteUndo()
func ReadUndo() func ReadUndo()
if filereadable(expand('%:h'). '/UNDO/' . expand('%:t')) if filereadable(expand('%:h') .. '/UNDO/' .. expand('%:t'))
rundo %:h/UNDO/%:t rundo %:h/UNDO/%:t
endif endif
endfunc endfunc
func WriteUndo() func WriteUndo()
let dirname = expand('%:h') . '/UNDO' let dirname = expand('%:h') .. '/UNDO'
if !isdirectory(dirname) if !isdirectory(dirname)
call mkdir(dirname) call mkdir(dirname)
endif endif

View File

@@ -270,7 +270,7 @@ line break. Revert with ":iunmap <C-U>".
Enable using the mouse if available. See 'mouse'. Enable using the mouse if available. See 'mouse'.
> >
vnoremap _g y:exe "grep /" . escape(@", '\\/') . "/ *.c *.h"<CR> vnoremap _g y:exe "grep /" .. escape(@", '\\/') .. "/ *.c *.h"<CR>
This mapping yanks the visually selected text and searches for it in C files. This mapping yanks the visually selected text and searches for it in C files.
You can see that a mapping can be used to do quite complicated things. Still, You can see that a mapping can be used to do quite complicated things. Still,

View File

@@ -1,4 +1,4 @@
*usr_29.txt* For Vim version 8.2. Last change: 2016 Feb 27 *usr_29.txt* For Vim version 8.2. Last change: 2022 Mar 13
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar
@@ -33,10 +33,12 @@ following command: >
ctags *.c ctags *.c
"ctags" is a separate program. Most Unix systems already have it installed. "ctags" is a separate program. Most Unix systems already have it installed.
If you do not have it yet, you can find Exuberant ctags here: If you do not have it yet, you can find Universal/Exuberant ctags at:
http://ctags.io ~
http://ctags.sf.net ~ http://ctags.sf.net ~
Universal ctags is preferred, Exuberant ctags is no longer being developed.
Now when you are in Vim and you want to go to a function definition, you can Now when you are in Vim and you want to go to a function definition, you can
jump to it by using the following command: > jump to it by using the following command: >
@@ -142,15 +144,15 @@ ONE TAGS FILE
When Vim has to search many places for tags files, you can hear the disk When Vim has to search many places for tags files, you can hear the disk
rattling. It may get a bit slow. In that case it's better to spend this rattling. It may get a bit slow. In that case it's better to spend this
time while generating one big tags file. You might do this overnight. time while generating one big tags file. You might do this overnight.
This requires the Exuberant ctags program, mentioned above. It offers an This requires the Universal or Exuberant ctags program, mentioned above.
argument to search a whole directory tree: > It offers an argument to search a whole directory tree: >
cd ~/proj cd ~/proj
ctags -R . ctags -R .
The nice thing about this is that Exuberant ctags recognizes various file The nice thing about this is that Universal/Exuberant ctags recognizes various
types. Thus this doesn't work just for C and C++ programs, also for Eiffel file types. Thus this doesn't work just for C and C++ programs, also for
and even Vim scripts. See the ctags documentation to tune this. Eiffel and even Vim scripts. See the ctags documentation to tune this.
Now you only need to tell Vim where your big tags file is: > Now you only need to tell Vim where your big tags file is: >
:set tags=~/proj/tags :set tags=~/proj/tags
@@ -232,7 +234,8 @@ A TAGS BROWSER
Since CTRL-] takes you to the definition of the identifier under the cursor, Since CTRL-] takes you to the definition of the identifier under the cursor,
you can use a list of identifier names as a table of contents. Here is an you can use a list of identifier names as a table of contents. Here is an
example. example.
First create a list of identifiers (this requires Exuberant ctags): > First create a list of identifiers (this requires Universal or Exuberant
ctags): >
ctags --c-types=f -f functions *.c ctags --c-types=f -f functions *.c

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 8.2. Last change: 2022 Jan 01 *usr_41.txt* For Vim version 8.2. Last change: 2022 Apr 25
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar
@@ -162,7 +162,7 @@ and avoid errors. Such as thinking that the "-0o36" above makes the number
negative, while it is actually seen as a subtraction. negative, while it is actually seen as a subtraction.
To actually have the minus sign be used for negation, you can put the second To actually have the minus sign be used for negation, you can put the second
expression in parenthesis: > expression in parentheses: >
echo -0x7f (-0o36) echo -0x7f (-0o36)
@@ -904,6 +904,7 @@ System functions and manipulation of files:
getfperm() get the permissions of a file getfperm() get the permissions of a file
setfperm() set the permissions of a file setfperm() set the permissions of a file
getftype() get the kind of a file getftype() get the kind of a file
isabsolutepath() check if a path is absolute
isdirectory() check if a directory exists isdirectory() check if a directory exists
getfsize() get the size of a file getfsize() get the size of a file
getcwd() get the current working directory getcwd() get the current working directory
@@ -975,8 +976,12 @@ Buffers, windows and the argument list:
swapname() get the swap file path of a buffer swapname() get the swap file path of a buffer
Command line: *command-line-functions* Command line: *command-line-functions*
getcmdcompltype() get the type of the current command line
completion
getcmdline() get the current command line getcmdline() get the current command line
getcmdpos() get position of the cursor in the command line getcmdpos() get position of the cursor in the command line
getcmdscreenpos() get screen position of the cursor in the
command line
setcmdpos() set position of the cursor in the command line setcmdpos() set position of the cursor in the command line
getcmdtype() return the current command-line type getcmdtype() return the current command-line type
getcmdwintype() return the current command-line window type getcmdwintype() return the current command-line window type
@@ -1092,6 +1097,7 @@ Mappings and Menus: *mapping-functions*
hasmapto() check if a mapping exists hasmapto() check if a mapping exists
mapcheck() check if a matching mapping exists mapcheck() check if a matching mapping exists
maparg() get rhs of a mapping maparg() get rhs of a mapping
maplist() get list of all mappings
mapset() restore a mapping mapset() restore a mapping
menu_info() get information about a menu item menu_info() get information about a menu item
wildmenumode() check if the wildmode is active wildmenumode() check if the wildmode is active
@@ -1116,8 +1122,7 @@ Testing: *test-functions*
test_garbagecollect_now() free memory right now test_garbagecollect_now() free memory right now
test_garbagecollect_soon() set a flag to free memory soon test_garbagecollect_soon() set a flag to free memory soon
test_getvalue() get value of an internal variable test_getvalue() get value of an internal variable
test_gui_drop_files() drop file(s) in a window test_gui_event() generate a GUI event for testing
test_gui_mouse_event() add a GUI mouse event to the input buffer
test_ignore_error() ignore a specific error message test_ignore_error() ignore a specific error message
test_null_blob() return a null Blob test_null_blob() return a null Blob
test_null_channel() return a null Channel test_null_channel() return a null Channel
@@ -1131,7 +1136,6 @@ Testing: *test-functions*
test_setmouse() set the mouse position test_setmouse() set the mouse position
test_feedinput() add key sequence to input buffer test_feedinput() add key sequence to input buffer
test_option_not_set() reset flag indicating option was set test_option_not_set() reset flag indicating option was set
test_scrollbar() simulate scrollbar movement in the GUI
test_refcount() return an expression's reference count test_refcount() return an expression's reference count
test_srand_seed() set the seed value for srand() test_srand_seed() set the seed value for srand()
test_unknown() return a value with unknown type test_unknown() return a value with unknown type
@@ -2502,7 +2506,7 @@ When the user does ":setfiletype xyz" the effect of the previous filetype
should be undone. Set the b:undo_ftplugin variable to the commands that will should be undone. Set the b:undo_ftplugin variable to the commands that will
undo the settings in your filetype plugin. Example: > undo the settings in your filetype plugin. Example: >
b:undo_ftplugin = "setlocal fo< com< tw< commentstring<" let b:undo_ftplugin = "setlocal fo< com< tw< commentstring<"
\ .. "| unlet b:match_ignorecase b:match_words b:match_skip" \ .. "| unlet b:match_ignorecase b:match_words b:match_skip"
Using ":setlocal" with "<" after the option name resets the option to its Using ":setlocal" with "<" after the option name resets the option to its
@@ -2514,6 +2518,8 @@ continuation, as mentioned above |use-cpo-save|.
For undoing the effect of an indent script, the b:undo_indent variable should For undoing the effect of an indent script, the b:undo_indent variable should
be set accordingly. be set accordingly.
Both these variables use legacy script syntax, not |Vim9| syntax.
FILE NAME FILE NAME

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 8.2. Last change: 2022 Jan 15 *various.txt* For Vim version 8.2. Last change: 2022 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -114,6 +114,7 @@ g8 Print the hex values of the bytes used in the
:[range]P[rint] [count] [flags] :[range]P[rint] [count] [flags]
Just as ":print". Was apparently added to Vi for Just as ":print". Was apparently added to Vi for
people that keep the shift key pressed too long... people that keep the shift key pressed too long...
This command is not supported in |Vim9| script.
Note: A user command can overrule this command. Note: A user command can overrule this command.
See |ex-flags| for [flags]. See |ex-flags| for [flags].
@@ -267,7 +268,7 @@ g8 Print the hex values of the bytes used in the
name does not contain a single quote: > name does not contain a single quote: >
:!ls '%' :!ls '%'
< This should always work, but it's more typing: > < This should always work, but it's more typing: >
:exe "!ls " . shellescape(expand("%")) :exe "!ls " .. shellescape(expand("%"))
< To get a literal "%" or "#" prepend it with a < To get a literal "%" or "#" prepend it with a
backslash. For example, to list all files starting backslash. For example, to list all files starting
with "%": > with "%": >
@@ -380,7 +381,7 @@ N *+folding* |folding|
*+fork* Unix only: |fork| shell commands *+fork* Unix only: |fork| shell commands
*+float* Floating point support *+float* Floating point support
N *+gettext* message translations |multi-lang| N *+gettext* message translations |multi-lang|
*+GUI_Athena* Unix only: Athena |GUI| - *+GUI_Athena* Unix only: Athena |GUI|
*+GUI_neXtaw* Unix only: neXtaw |GUI| *+GUI_neXtaw* Unix only: neXtaw |GUI|
*+GUI_GTK* Unix only: GTK+ |GUI| *+GUI_GTK* Unix only: GTK+ |GUI|
*+GUI_Motif* Unix only: Motif |GUI| *+GUI_Motif* Unix only: Motif |GUI|
@@ -410,6 +411,7 @@ T *+mouse* Mouse handling |mouse-using|
N *+mouseshape* |'mouseshape'| N *+mouseshape* |'mouseshape'|
B *+mouse_dec* Unix only: Dec terminal mouse handling |dec-mouse| B *+mouse_dec* Unix only: Dec terminal mouse handling |dec-mouse|
N *+mouse_gpm* Unix only: Linux console mouse handling |gpm-mouse| N *+mouse_gpm* Unix only: Linux console mouse handling |gpm-mouse|
m *+mouse_gpm/dyn* Same as |+mouse_gpm| with optional library dependency |/dyn|
N *+mouse_jsbterm* JSB mouse handling |jsbterm-mouse| N *+mouse_jsbterm* JSB mouse handling |jsbterm-mouse|
B *+mouse_netterm* Unix only: netterm mouse handling |netterm-mouse| B *+mouse_netterm* Unix only: netterm mouse handling |netterm-mouse|
N *+mouse_pterm* QNX only: pterm mouse handling |qnx-terminal| N *+mouse_pterm* QNX only: pterm mouse handling |qnx-terminal|
@@ -424,7 +426,7 @@ m *+mzscheme* Mzscheme interface |mzscheme|
m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn| m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn|
m *+netbeans_intg* |netbeans| m *+netbeans_intg* |netbeans|
T *+num64* 64-bit Number support |Number| T *+num64* 64-bit Number support |Number|
Always enabled since 8.2.0271, use v:numbersize to Always enabled since 8.2.0271, use v:numbersize to
check the actual size of a Number. check the actual size of a Number.
m *+ole* Win32 GUI only: |ole-interface| m *+ole* Win32 GUI only: |ole-interface|
N *+packages* Loading |packages| N *+packages* Loading |packages|
@@ -549,7 +551,7 @@ N *+X11* Unix only: can restore window title |X11|
backward compatibility, the ">" after the register backward compatibility, the ">" after the register
name can be omitted. name can be omitted.
:redi[r] @">> Append messages to the unnamed register. :redi[r] @">> Append messages to the unnamed register.
*E1092*
:redi[r] => {var} Redirect messages to a variable. :redi[r] => {var} Redirect messages to a variable.
In legacy script: If the variable doesn't exist, then In legacy script: If the variable doesn't exist, then
it is created. If the variable exists, then it is it is created. If the variable exists, then it is
@@ -566,7 +568,7 @@ N *+X11* Unix only: can restore window title |X11|
:redi[r] =>> {var} Append messages to an existing variable. Only string :redi[r] =>> {var} Append messages to an existing variable. Only string
variables can be used. variables can be used.
*E1185*
:redi[r] END End redirecting messages. :redi[r] END End redirecting messages.
*:filt* *:filter* *:filt* *:filter*
@@ -649,7 +651,7 @@ N *+X11* Unix only: can restore window title |X11|
used. In this example |:silent| is used to avoid the used. In this example |:silent| is used to avoid the
message about reading the file and |:unsilent| to be message about reading the file and |:unsilent| to be
able to list the first line of each file. > 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* *:verb* *:verbose*

View File

@@ -1,4 +1,4 @@
*version5.txt* For Vim version 8.2. Last change: 2021 Apr 05 *version5.txt* For Vim version 8.2. Last change: 2022 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2494,7 +2494,7 @@ regexp character classes (for fast syntax highlight matching):
":set" now accepts "+=", |^=" and "-=": add or remove parts of a string ":set" now accepts "+=", |^=" and "-=": add or remove parts of a string
option, add or subtract a number from a number option. A comma is option, add or subtract a number from a number option. A comma is
automagically inserted or deleted for options that are a comma separated list. automagically inserted or deleted for options that are a comma-separated list.
Filetype feature, for autocommands. Uses a file type instead of a pattern to Filetype feature, for autocommands. Uses a file type instead of a pattern to
match a file. Currently only used for RISC OS. (Leonard) match a file. Currently only used for RISC OS. (Leonard)

View File

@@ -1,4 +1,4 @@
*version6.txt* For Vim version 8.2. Last change: 2021 Apr 05 *version6.txt* For Vim version 8.2. Last change: 2022 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -12447,7 +12447,7 @@ Solution: Make sure ".out" files are deleted when they get in the way. Add
Files: src/Make_bc5.mak, src/testdir/Make_dos.mak Files: src/Make_bc5.mak, src/testdir/Make_dos.mak
Patch 6.2.381 Patch 6.2.381
Problem: Setting 'fileencoding' to a comma separated list (confusing it Problem: Setting 'fileencoding' to a comma-separated list (confusing it
with 'fileencodings') does not result in an error message. with 'fileencodings') does not result in an error message.
Setting 'fileencoding' in an empty file marks it as modified. Setting 'fileencoding' in an empty file marks it as modified.
There is no "+" in the title after setting 'fileencoding'. There is no "+" in the title after setting 'fileencoding'.

View File

@@ -14965,7 +14965,7 @@ Solution: Adjust autoconf. (lilydjwg)
Files: src/configure.in, src/auto/configure Files: src/configure.in, src/auto/configure
Patch 7.3.806 Patch 7.3.806
Problem: Compiler warnings in Perl code when building with Visual studio Problem: Compiler warnings in Perl code when building with Visual Studio
2012. (skeept) 2012. (skeept)
Solution: Add type casts. (Christian Brabandt, 2013 Jan 30) Solution: Add type casts. (Christian Brabandt, 2013 Jan 30)
Files: src/if_perl.xs Files: src/if_perl.xs

File diff suppressed because it is too large Load Diff

26928
runtime/doc/version9.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
*vi_diff.txt* For Vim version 8.2. Last change: 2021 Jan 21 *vi_diff.txt* For Vim version 8.2. Last change: 2022 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -160,8 +160,8 @@ Graphical User Interface (GUI). |gui|
Included support for GUI: menu's, mouse, scrollbars, etc. You can Included support for GUI: menu's, mouse, scrollbars, etc. You can
define your own menus. Better support for CTRL/SHIFT/ALT keys in define your own menus. Better support for CTRL/SHIFT/ALT keys in
combination with special keys and mouse. Supported for various combination with special keys and mouse. Supported for various
platforms, such as X11 (with Motif and Athena interfaces), GTK, Win32 platforms, such as X11 with Motif, GTK, Win32 (Windows XP and later),
(Windows XP and later), Amiga and Macintosh. Amiga and Macintosh.
Multiple windows and buffers. |windows.txt| Multiple windows and buffers. |windows.txt|
Vim can split the screen into several windows, each editing a Vim can split the screen into several windows, each editing a

View File

@@ -1,4 +1,4 @@
.TH VIM 1 "2006 Apr 11" .TH VIM 1 "2021 Jun 13"
.SH 名前 .SH 名前
vim \- Vi IMproved, プログラマのテキストエディタ vim \- Vi IMproved, プログラマのテキストエディタ
.SH 書式 .SH 書式

View File

@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 8.2. Last change: 2022 Jan 23 *vim9.txt* For Vim version 8.2. Last change: 2022 Apr 28
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -56,14 +56,14 @@ 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 rewrite old scripts, they keep working as before. You may want to use a few
`:def` functions for code that needs to be fast. `: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. Evaluate and execute {cmd} using Vim9 script syntax and
Useful when typing a command and in a legacy script or semantics. Useful when typing a command and in a legacy
function. script or function.
:leg[acy] {cmd} *:leg* *:legacy* :leg[acy] {cmd} *:leg* *:legacy* *E1189* *E1234*
Execute {cmd} using legacy script syntax and semantics. Only Evaluate and execute {cmd} using legacy script syntax and
useful in a Vim9 script or a :def function. semantics. Only useful in a Vim9 script or a :def function.
Note that {cmd} cannot use local variables, since it is parsed Note that {cmd} cannot use local variables, since it is parsed
with legacy expression syntax. with legacy expression syntax.
@@ -72,7 +72,7 @@ rewrite old scripts, they keep working as before. You may want to use a few
2. Differences from legacy Vim script *vim9-differences* 2. Differences from legacy Vim script *vim9-differences*
Overview ~ Overview ~
*E1146*
Brief summary of the differences you will most often encounter when using Vim9 Brief summary of the differences you will most often encounter when using Vim9
script and `:def` functions; details are below: script and `:def` functions; details are below:
- Comments start with #, not ": > - Comments start with #, not ": >
@@ -82,7 +82,7 @@ script and `:def` functions; details are below:
.. yourName .. yourName
.. ", how are you?" .. ", how are you?"
- White space is required in many places to improve readability. - White space is required in many places to improve readability.
- Assign values without `:let`, declare variables with `:var`: > - Assign values without `:let` *E1126* , declare variables with `:var`: >
var count = 0 var count = 0
count += 3 count += 3
- Constants can be declared with `:final` and `:const`: > - Constants can be declared with `:final` and `:const`: >
@@ -94,8 +94,20 @@ script and `:def` functions; details are below:
def CallMe(count: number, message: string): bool def CallMe(count: number, message: string): bool
- Call functions without `:call`: > - Call functions without `:call`: >
writefile(['done'], 'file.txt') writefile(['done'], 'file.txt')
- You cannot use old Ex commands `:xit`, `:t`, `:k`, `:append`, `:change`, - You cannot use old Ex commands:
`:insert`, `:open`, and `:s` or `:d` with only flags. `:Print`
`:append`
`:change`
`:d` directly followed by 'd' or 'p'.
`:insert`
`:k`
`:mode`
`:open`
`:s` with only flags
`:t`
`:xit`
- Some commands, especially those used for flow control, cannot be shortened.
E.g., `:throw` cannot be written as `:th`. *E839*
- You cannot use curly-braces names. - You cannot use curly-braces names.
- A range before a command must be prefixed with a colon: > - A range before a command must be prefixed with a colon: >
:%s/this/that :%s/this/that
@@ -128,7 +140,7 @@ To improve readability there must be a space between a command and the #
that starts a comment: > that starts a comment: >
var name = value # comment var name = value # comment
var name = value# error! var name = value# error!
< *E1170*
Do not start a comment with #{, it looks like the legacy dictionary literal 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, and produces an error where this might be confusing. #{{ or #{{{ are OK,
these can be used to start a fold. these can be used to start a fold.
@@ -139,7 +151,7 @@ arguments).
Vim9 functions ~ Vim9 functions ~
*E1099*
A function defined with `:def` is compiled. Execution is many times faster, A function defined with `:def` is compiled. Execution is many times faster,
often 10 to 100 times. often 10 to 100 times.
@@ -153,7 +165,7 @@ Compilation is done when any of these is encountered:
- `:disassemble` is used for the function. - `:disassemble` is used for the function.
- a function that is compiled calls the function or uses it as a 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) 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 If compilation fails it is not tried again on the next call, instead this
error is given: "E1091: Function is not compiled: {name}". error is given: "E1091: Function is not compiled: {name}".
Compilation will fail when encountering a user command that has not been Compilation will fail when encountering a user command that has not been
@@ -172,8 +184,8 @@ For now you will need to pass the dictionary explicitly: >
def DictFunc(d: dict<any>, arg: string) def DictFunc(d: dict<any>, arg: string)
echo d[arg] echo d[arg]
enddef enddef
var d = {item: 'value', func: DictFunc} var ad = {item: 'value', func: DictFunc}
d.func(d, 'item') ad.func(ad, 'item')
You can call a legacy dict function though: > You can call a legacy dict function though: >
func Legacy() dict func Legacy() dict
@@ -183,14 +195,14 @@ You can call a legacy dict function though: >
var d = {func: Legacy, value: 'text'} var d = {func: Legacy, value: 'text'}
d.func() d.func()
enddef enddef
< *E1096* *E1174* *E1175*
The argument types and return type need to be specified. The "any" type can 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 be used, type checking will then be done at runtime, like with legacy
functions. functions.
*E1106*
Arguments are accessed by name, without "a:", just like any other language. Arguments are accessed by name, without "a:", just like any other language.
There is no "a:" dictionary or "a:000" list. There is no "a:" dictionary or "a:000" list.
*vim9-variable-arguments* *E1055* *vim9-variable-arguments* *E1055* *E1160* *E1180*
Variable arguments are defined as the last argument, with a name and have a 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: > list type, similar to TypeScript. For example, a list of numbers: >
def MyFunc(...itemlist: list<number>) def MyFunc(...itemlist: list<number>)
@@ -206,7 +218,7 @@ should use its default value. Example: >
enddef enddef
MyFunc(v:none, 'LAST') # first argument uses default value 'one' 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 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 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, argument to match the call. E.g. when using map() two arguments are passed,
@@ -219,34 +231,47 @@ be given.
Functions and variables are script-local by default ~ Functions and variables are script-local by default ~
*vim9-scopes* *vim9-scopes*
When using `:function` or `:def` to specify a new function at the script level When using `:function` or `:def` to specify a new function at the script level
in a Vim9 script, the function is local to the script, as if "s:" was in a Vim9 script, the function is local to the script. Like prefixing "s:" in
prefixed. Using the "s:" prefix is optional. To define a global function or legacy script. To define a global function or variable the "g:" prefix must
variable the "g:" prefix must be used. For functions in an autoload script be used. For functions in a script that is to be imported and in an autoload
the "name#" prefix is sufficient. > script "export" needs to be used. >
def ThisFunction() # script-local def ThisFunction() # script-local
def s:ThisFunction() # script-local
def g:ThatFunction() # global def g:ThatFunction() # global
def scriptname#function() # autoload export def Function() # for import and import autoload
< *E1058* *E1075* < *E1058* *E1075*
When using `:function` or `:def` to specify a nested function inside a `:def` When using `:function` or `:def` to specify a nested function inside a `:def`
function and no namespace was given, this nested function is local to the code 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 block it is defined in. It cannot be used in `function()` with a string
script-local function. It is possible to define a global function by using argument, pass the function reference itself: >
the "g:" prefix. def Outer()
def Inner()
echo 'inner'
enddef
var Fok = function(Inner) # OK
var Fbad = function('Inner') # does not work
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 When referring to a function and no "s:" or "g:" prefix is used, Vim will
search for the function: search for the function:
- in the function scope, in block scopes - in the function scope, in block scopes
- in the script scope, possibly imported - 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 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 start with an upper case letter even when using the "s:" prefix. In legacy
script "s:funcref" could be used, because it could not be referred to with script "s:funcref" could be used, because it could not be referred to with
"funcref". In Vim9 script it can, therefore "s:Funcref" must be used to avoid "funcref". In Vim9 script it can, therefore "s:Funcref" must be used to avoid
that the name interferes with builtin functions. that the name interferes with builtin functions.
*vim9-s-namespace*
The use of the "s:" prefix is not supported at the Vim9 script level. All
functions and variables without a prefix are script-local.
In :def functions the use of "s:" depends on the script: Script-local
variables and functions in a legacy script do use "s:", while in a Vim9 script
they do not use "s:". This matches what you see in the rest of the file.
In legacy functions the use of "s:" for script items is required, as before.
In all cases the function must be defined before used. That is when it is In all cases the function must be defined before used. That is when it is
called, when `:defcompile` causes it to be compiled, or when code that calls called, when `:defcompile` causes it to be compiled, or when code that calls
@@ -255,7 +280,7 @@ it is being compiled (to figure out the return type).
The result is that functions and variables without a namespace can usually be 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 found in the script, either defined there or imported. Global functions and
variables could be defined anywhere (good luck finding out where!). variables could be defined anywhere (good luck finding out where!).
*E1102*
Global functions can still be defined and deleted at nearly any time. In 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 Vim9 script script-local functions are defined once when the script is sourced
and cannot be deleted or replaced. and cannot be deleted or replaced.
@@ -267,7 +292,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 ~ 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 When loading a legacy Vim script a second time nothing is removed, the
commands will replace existing variables and functions and create new ones. commands will replace existing variables and functions and create new ones.
@@ -280,17 +305,20 @@ If you do want to keep items, use: >
vim9script noclear vim9script noclear
You want to use this in scripts that use a `finish` command to bail out at You want to use this in scripts that use a `finish` command to bail out at
some point when loaded again. E.g. when a buffer local option is set: > some point when loaded again. E.g. when a buffer local option is set to a
function, the function does not need to be defined more than once: >
vim9script noclear vim9script noclear
setlocal completefunc=SomeFunc setlocal completefunc=SomeFunc
if exists('*g:SomeFunc') | finish | endif if exists('*SomeFunc')
def g:SomeFunc() finish
endif
def SomeFunc()
.... ....
Variable declarations with :var, :final and :const ~ Variable declarations with :var, :final and :const ~
*vim9-declaration* *:var* *vim9-declaration* *:var* *E1079*
*E1017* *E1020* *E1054* *E1017* *E1020* *E1054* *E1087* *E1108* *E1124*
Local variables need to be declared with `:var`. Local constants need to be 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 declared with `:final` or `:const`. We refer to both as "variables" in this
section. section.
@@ -321,7 +349,7 @@ The declaration must be done earlier: >
inner = 0 inner = 0
endif endif
echo inner echo inner
< *E1025* < *E1025* *E1128*
To intentionally hide a variable from code that follows, a block can be To intentionally hide a variable from code that follows, a block can be
used: > used: >
{ {
@@ -348,23 +376,37 @@ And with autocommands: >
} }
Although using a :def function probably works better. Although using a :def function probably works better.
*E1022*
*E1022* *E1103* *E1130* *E1131* *E1133*
*E1134*
Declaring a variable with a type but without an initializer will initialize to Declaring a variable with a type but without an initializer will initialize to
false (for bool), empty (for string, list, dict, etc.) or zero (for number, 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 any, etc.). This matters especially when using the "any" type, the value will
default to the number zero. default to the number zero. For example, when declaring a list, items can be
*E1016* *E1052* *E1066* added: >
var myList: list<number>
myList->add(7)
Initializing a variable to a null value, e.g. `null_list`, differs from not
initializing the variable. This throws an error: >
var myList = null_list
myList->add(7) # E1130: Cannot add to null list
< *E1016* *E1052* *E1066*
In Vim9 script `:let` cannot be used. An existing variable is assigned to 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 without any command. The same for global, window, tab, buffer and Vim
variables, because they are not really declared. Those can also be deleted variables, because they are not really declared. Those can also be deleted
with `:unlet`. with `:unlet`.
*E1065*
You cannot use `:va` to declare a variable, it must be written with the full
name `:var`. Just to make sure it is easy to read.
*E1178*
`:lockvar` does not work on local variables. Use `:const` and `:final` `:lockvar` does not work on local variables. Use `:const` and `:final`
instead. instead.
The `exists()` and `exists_compiled()` functions do not work on local variables The `exists()` and `exists_compiled()` functions do not work on local variables
or arguments. or arguments.
*E1006* *E1041* *E1006* *E1041* *E1167* *E1168* *E1213*
Variables, functions and function arguments cannot shadow previously defined Variables, functions and function arguments cannot shadow previously defined
or imported variables and functions in the same script file. or imported variables and functions in the same script file.
Variables may shadow Ex commands, rename the variable if needed. Variables may shadow Ex commands, rename the variable if needed.
@@ -375,13 +417,12 @@ Global variables must be prefixed with "g:", also at the script level. >
g:global = 'value' g:global = 'value'
var Funcref = g:ThatFunction var Funcref = g:ThatFunction
Global functions must be prefixed with "g:" when defining them, but can be Global functions must be prefixed with "g:": >
called without "g:". >
vim9script vim9script
def g:GlobalFunc(): string def g:GlobalFunc(): string
return 'text' return 'text'
enddef enddef
echo GlobalFunc() echo g:GlobalFunc()
The "g:" prefix is not needed for auto-load functions. The "g:" prefix is not needed for auto-load functions.
*vim9-function-defined-later* *vim9-function-defined-later*
@@ -418,7 +459,7 @@ similar to how a function argument can be ignored: >
[a, _, c] = theList [a, _, c] = theList
To ignore any remaining items: > To ignore any remaining items: >
[a, b; _] = longList [a, b; _] = longList
< *E1163* *E1080*
Declaring more than one variable at a time, using the unpack notation, is 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: > possible. Each variable can have a type or infer it from the value: >
var [v1: number, v2] = GetValues() var [v1: number, v2] = GetValues()
@@ -440,7 +481,7 @@ Example: >
myList = [3, 4] # Error! myList = [3, 4] # Error!
myList[0] = 9 # Error! myList[0] = 9 # Error!
myList->add(3) # Error! myList->add(3) # Error!
< *:final* < *:final* *E1125*
`:final` is used for making only the variable a constant, the value can be `:final` is used for making only the variable a constant, the value can be
changed. This is well known from Java. Example: > changed. This is well known from Java. Example: >
final myList = [1, 2] final myList = [1, 2]
@@ -460,7 +501,7 @@ The constant only applies to the value itself, not what it refers to. >
Omitting :call and :eval ~ Omitting :call and :eval ~
*E1190*
Functions can be called without `:call`: > Functions can be called without `:call`: >
writefile(lines, 'file') writefile(lines, 'file')
Using `:call` is still possible, but this is discouraged. Using `:call` is still possible, but this is discouraged.
@@ -520,7 +561,8 @@ because of the use of argument types.
To avoid these problems Vim9 script uses a different syntax for a lambda, To avoid these problems Vim9 script uses a different syntax for a lambda,
which is similar to JavaScript: > which is similar to JavaScript: >
var Lambda = (arg) => expression 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 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 "=>" (so that Vim can tell the difference between an expression in parentheses
and lambda arguments). This is OK: > and lambda arguments). This is OK: >
@@ -536,7 +578,7 @@ But you can use a backslash to concatenate the lines before parsing: >
filter(list, (k, filter(list, (k,
\ v) \ v)
\ => v > 0) \ => v > 0)
< *vim9-lambda-arguments* < *vim9-lambda-arguments* *E1172*
In legacy script a lambda could be called with any number of extra arguments, In legacy script a lambda could be called with any number of extra arguments,
there was no way to warn for not using them. In Vim9 script the number of there was no way to warn for not using them. In Vim9 script the number of
arguments must match. If you do want to accept any arguments, or any further arguments must match. If you do want to accept any arguments, or any further
@@ -545,7 +587,7 @@ arguments, use "..._", which makes the function accept
var Callback = (..._) => 'anything' var Callback = (..._) => 'anything'
echo Callback(1, 2, 3) # displays "anything" echo Callback(1, 2, 3) # displays "anything"
< *inline-function* < *inline-function* *E1171*
Additionally, a lambda can contain statements in {}: > Additionally, a lambda can contain statements in {}: >
var Lambda = (arg) => { var Lambda = (arg) => {
g:was_called = 'yes' g:was_called = 'yes'
@@ -600,7 +642,7 @@ Also when confused with the start of a command block: >
Automatic line continuation ~ Automatic line continuation ~
*vim9-line-continuation* *vim9-line-continuation* *E1097*
In many cases it is obvious that an expression continues on the next line. In 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 those cases there is no need to prefix the line with a backslash (see
|line-continuation|). For example, when a list spans multiple lines: > |line-continuation|). For example, when a list spans multiple lines: >
@@ -708,6 +750,7 @@ second line is seen as a separate command: >
Now "exit_cb: Func})" is actually a valid command: save any changes to the 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 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. 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 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. example, after "windo echo expr" a line break inside "expr" will not be seen.
@@ -738,7 +781,7 @@ Notes:
White space ~ White space ~
*E1004* *E1068* *E1069* *E1074* *E1004* *E1068* *E1069* *E1074* *E1127* *E1202*
Vim9 script enforces proper use of white space. This is no longer allowed: > Vim9 script enforces proper use of white space. This is no longer allowed: >
var name=234 # Error! var name=234 # Error!
var name= 234 # Error! var name= 234 # Error!
@@ -772,7 +815,7 @@ White space is not allowed:
Func( Func(
arg # OK arg # OK
) )
< *E1205*
White space is not allowed in a `:set` command between the option name and a White space is not allowed in a `:set` command between the option name and a
following "&", "!", "<", "=", "+=", "-=" or "^=". following "&", "!", "<", "=", "+=", "-=" or "^=".
@@ -782,6 +825,11 @@ No curly braces expansion ~
|curly-braces-names| cannot be used. |curly-braces-names| cannot be used.
Command modifiers are not ignored ~
*E1176*
Using a command modifier for a command that does not use it gives an error.
Dictionary literals ~ Dictionary literals ~
*vim9-literal-dict* *E1014* *vim9-literal-dict* *E1014*
Traditionally Vim has supported dictionary literals with a {} syntax: > Traditionally Vim has supported dictionary literals with a {} syntax: >
@@ -803,20 +851,26 @@ use another character, use a single or double quoted string: >
var dict = {'key with space': value} var dict = {'key with space': value}
var dict = {"key\twith\ttabs": value} var dict = {"key\twith\ttabs": value}
var dict = {'': value} # empty key var dict = {'': value} # empty key
< *E1139*
In case the key needs to be an expression, square brackets can be used, just In case the key needs to be an expression, square brackets can be used, just
like in JavaScript: > like in JavaScript: >
var dict = {["key" .. nr]: value} var dict = {["key" .. nr]: value}
The key type can be string, number, bool or float. Other types result in an The key type can be string, number, bool or float. Other types result in an
error. A number can be given with and without the []: > error. Without using [] the value is used as a string, keeping leading zeros.
var dict = {123: 'without', [456]: 'with'} An expression given with [] is evaluated and then converted to a string.
Leading zeros will then be dropped: >
var dict = {000123: 'without', [000456]: 'with'}
echo dict echo dict
{'456': 'with', '123': 'without'} {'456': 'with', '000123': 'without'}
A float only works inside [] because the dot is not accepted otherwise: >
var dict = {[00.013]: 'float'}
echo dict
{'0.013': 'float'}
No :xit, :t, :k, :append, :change or :insert ~ No :xit, :t, :k, :append, :change or :insert ~
*E1100*
These commands are too easily confused with local variable names. These commands are too easily confused with local variable names.
Instead of `:x` or `:xit` you can use `:exit`. Instead of `:x` or `:xit` you can use `:exit`.
Instead of `:t` you can use `:copy`. Instead of `:t` you can use `:copy`.
@@ -826,6 +880,7 @@ Instead of `:k` you can use `:mark`.
Comparators ~ Comparators ~
The 'ignorecase' option is not used for comparators that use strings. The 'ignorecase' option is not used for comparators that use strings.
Thus "=~" works like "=~#".
Abort after error ~ Abort after error ~
@@ -840,7 +895,7 @@ error. Example: >
For loop ~ For loop ~
*E1254*
The loop variable must not be declared yet: > The loop variable must not be declared yet: >
var i = 1 var i = 1
for i in [1, 2, 3] # Error! for i in [1, 2, 3] # Error!
@@ -928,10 +983,42 @@ always converted to string: >
Simple types are Number, Float, Special and Bool. For other types |string()| Simple types are Number, Float, Special and Bool. For other types |string()|
should be used. should be used.
*false* *true* *null* *E1034* *false* *true* *null* *E1034*
In Vim9 script one can use "true" for v:true, "false" for v:false and "null" In Vim9 script one can use the following predefined values: >
for v:null. When converting a boolean to a string "false" and "true" are true
used, not "v:false" and "v:true" like in legacy script. "v:none" is not false
changed, it is only used in JSON and has no equivalent in other languages. null
null_blob
null_channel
null_dict
null_function
null_job
null_list
null_partial
null_string
`true` is the same as `v:true`, `false` the same as `v:false`, `null` the same
as `v:null`.
While `null` has the type "special", the other "null_" types have the type
indicated by their name. Quite often a null value is handled the same as an
empty value, but not always. The values can be useful to clear a script-local
variable, since they cannot be deleted with `:unlet`. E.g.: >
var theJob = job_start(...)
# let the job do its work
theJob = null_job
The values can also be useful as the default value for an argument: >
def MyFunc(b: blob = null_blob)
if b == null_blob
# b argument was not given
It is possible to compare `null` with any value, this will not give a type
error. However, comparing `null` with a number, float or bool will always
result in `false`. This is different from legacy script, where comparing
`null` with zero or `false` would return `true`.
When converting a boolean to a string `false` and `true` are used, not
`v:false` and `v:true` like in legacy script. `v:none` has no `none`
replacement, it has no equivalent in other languages.
Indexing a string with [idx] or taking a slice with [idx : idx] uses character Indexing a string with [idx] or taking a slice with [idx : idx] uses character
indexes instead of byte indexes. Composing characters are included. indexes instead of byte indexes. Composing characters are included.
@@ -1082,7 +1169,7 @@ Using ++var or --var in an expression is not supported yet.
{return-type}. When {return-type} is omitted or is {return-type}. When {return-type} is omitted or is
"void" the function is not expected to return "void" the function is not expected to return
anything. anything.
*E1077* *E1077* *E1123*
{arguments} is a sequence of zero or more argument {arguments} is a sequence of zero or more argument
declarations. There are three forms: declarations. There are three forms:
{name}: {type} {name}: {type}
@@ -1100,13 +1187,13 @@ Using ++var or --var in an expression is not supported yet.
It is possible to nest `:def` inside another `:def` or It is possible to nest `:def` inside another `:def` or
`:function` up to about 50 levels deep. `:function` up to about 50 levels deep.
*E1117*
[!] is used as with `:function`. Note that [!] is used as with `:function`. Note that
script-local functions cannot be deleted or redefined script-local functions cannot be deleted or redefined
later in Vim9 script. They can only be removed by later in Vim9 script. They can only be removed by
reloading the same script. reloading the same script.
*:enddef* *E1057* *:enddef* *E1057* *E1152* *E1173*
:enddef End of a function defined with `:def`. It should be on :enddef End of a function defined with `:def`. It should be on
a line by its own. a line by its own.
@@ -1168,6 +1255,11 @@ Closures defined in a loop will share the same context. For example: >
endfor endfor
echo range(5)->map((i, _) => flist[i]()) echo range(5)->map((i, _) => flist[i]())
# Result: [4, 4, 4, 4, 4] # Result: [4, 4, 4, 4, 4]
< *E1271*
A closure must be compiled in the context that it is defined in, so that
variables in that context can be found. This mostly happens correctly, except
when a function is marked for debugging with `breakadd` after it was compiled.
Make sure to define the breakpoint before compiling the outer function.
The "inloop" variable will exist only once, all closures put in the list refer The "inloop" variable will exist only once, all closures put in the list refer
to the same instance, which in the end will have the value 4. This is to the same instance, which in the end will have the value 4. This is
@@ -1185,6 +1277,67 @@ for each closure call a function to define it: >
echo range(5)->map((i, _) => flist[i]()) echo range(5)->map((i, _) => flist[i]())
# Result: [0, 1, 2, 3, 4] # 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* 4. Types *vim9-types*
@@ -1211,7 +1364,7 @@ Not supported yet:
These types can be used in declarations, but no simple value will actually These types can be used in declarations, but no simple value will actually
have the "void" type. Trying to use a void (e.g. a function without a have the "void" type. Trying to use a void (e.g. a function without a
return value) results in error *E1031* . return value) results in error *E1031* *E1186* .
There is no array type, use list<{type}> instead. For a list constant an 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 efficient implementation is used that avoids allocating lot of small pieces of
@@ -1288,7 +1441,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 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 becomes list<any>. An instruction is generated to check the list type before
doing the assignment, which is a bit inefficient. doing the assignment, which is a bit inefficient.
*type-casting* *type-casting* *E1104*
To avoid this, use a type cast: > To avoid this, use a type cast: >
var l: list<number> = [1, <number>g:two] var l: list<number> = [1, <number>g:two]
The compiled code will then only check that "g:two" is a number and give an The compiled code will then only check that "g:two" is a number and give an
@@ -1333,6 +1486,24 @@ Results in:
For script-local variables in Vim9 script the type is checked, also when the For script-local variables in Vim9 script the type is checked, also when the
variable was declared in a legacy function. variable was declared in a legacy function.
When a type has been declared this is attached to a List or Dictionary. 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 not declared then it is allowed to change: >
[1, 2, 3]->extend(['x']) # result: [1, 2, 3, 'x']
For a variable declaration an inferred type matters: >
var ll = [1, 2, 3]
ll->extend(['x']) # Error, 'x' is not a number
That is because the declaration looks like a list of numbers, thus is
equivalent to: >
var ll: list<number> = [1, 2, 3]
If you do want a more permissive list you need to declare the type: >
var ll: list<any = [1, 2, 3]
ll->extend(['x']) # OK
Stricter type checking ~ Stricter type checking ~
*type-checking* *type-checking*
@@ -1340,32 +1511,67 @@ In legacy Vim script, where a number was expected, a string would be
automatically converted to a number. This was convenient for an actual number 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 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 string doesn't start with a number. Quite often this leads to hard-to-find
bugs. bugs. e.g.: >
echo 123 == '123'
< 1 ~
With an accidental space: >
echo 123 == ' 123'
< 0 ~
*E1206* *E1210* *E1212*
In Vim9 script this has been made stricter. In most places it works just as 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 before if the value used matches the expected type. There will sometimes be
an error, thus breaking backwards compatibility. For example: an error, thus breaking backwards compatibility. For example:
- Using a number other than 0 or 1 where a boolean is expected. *E1023* - 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 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 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: > not change, if the type was declared. This will give an error in Vim9
echo map([1, 2, 3], (i, v) => 'item ' .. i) script: >
E1012: Type mismatch; expected number but got string var mylist: list<number> = [1, 2, 3]
Instead use |mapnew()|: > echo map(mylist, (i, v) => 'item ' .. i)
echo mapnew([1, 2, 3], (i, v) => 'item ' .. i) < E1012: Type mismatch; expected number but got string in map() ~
['item 0', 'item 1', 'item 2']
If the item type was determined to be "any" it can change to a more specific Instead use |mapnew()|, it creates a new list: >
type. E.g. when a list of mixed types gets changed to a list of strings: > var mylist: list<number> = [1, 2, 3]
echo mapnew(mylist, (i, v) => 'item ' .. i)
< ['item 0', 'item 1', 'item 2'] ~
If the item type was not declared or determined to be "any" it can change to a
more specific type. E.g. when a list of mixed types gets changed to a list of
strings: >
var mylist = [1, 2.0, '3'] var mylist = [1, 2.0, '3']
# typename(mylist) == "list<any>" # typename(mylist) == "list<any>"
map(mylist, (i, v) => 'item ' .. i) map(mylist, (i, v) => 'item ' .. i)
# typename(mylist) == "list<string>", no error # typename(mylist) == "list<string>", no error
There is a subtle difference between using a list constant directly and
through a variable declaration. Because of type inference, when using a list
constant to initialize a variable, this also sets the declared type: >
var mylist = [1, 2, 3]
# typename(mylist) == "list<number>"
echo map(mylist, (i, v) => 'item ' .. i) # Error!
When using the list constant directly, the type is not declared and is allowed
to change: >
echo map([1, 2, 3], (i, v) => 'item ' .. i) # OK
The reasoning behind this is that when a type is declared and the list is
passed around and changed, the declaration must always hold. So that you can
rely on the type to match the declared type. For a constant this is not
needed.
*E1158*
Same for |extend()|, use |extendnew()| instead, and for |flatten()|, use Same for |extend()|, use |extendnew()| instead, and for |flatten()|, use
|flattennew()| instead. |flattennew()| instead. Since |flatten()| is intended to always change the
type, it can not be used in Vim9 script.
*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.
============================================================================== ==============================================================================
@@ -1398,7 +1604,7 @@ global namespace. If a file starts with: >
var myvar = 'yes' var myvar = 'yes'
Then "myvar" will only exist in this file. While without `vim9script` it would Then "myvar" will only exist in this file. While without `vim9script` it would
be available as `g:myvar` from any other script and function. 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:" 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 variables in legacy Vim script, but the "s:" is omitted. And they cannot be
deleted. deleted.
@@ -1454,23 +1660,23 @@ be exported. {not implemented yet: class, interface}
Import ~ Import ~
*:import* *:imp* *E1094* *E1047* *:import* *:imp* *E1094* *E1047* *E1262*
*E1048* *E1049* *E1053* *E1071* *E1048* *E1049* *E1053* *E1071* *E1236*
The exported items can be imported in another Vim9 script: > The exported items can be imported in another Vim9 script: >
import "myscript.vim" import "myscript.vim"
This makes each item available as "myscript.item". This makes each item available as "myscript.item".
*:import-as* *:import-as* *E1257* *E1261*
In case the name is long or ambiguous, another name can be specified: > In case the name is long or ambiguous, another name can be specified: >
import "thatscript.vim" as that import "thatscript.vim" as that
< *E1060* < *E1060* *E1258* *E1259* *E1260*
Then you can use "that.EXPORTED_CONST", "that.someValue", etc. You are free 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 choose the name "that". Use something that will be recognized as referring
to the imported script. Avoid command names and builtin function names, to the imported script. Avoid command names, command modifiers and builtin
because the name will shadow them. If the name starts with a capital letter function names, because the name will shadow them.
it can also shadow global user commands and functions. Also, you cannot use If the name starts with a capital letter it can also shadow global user
the name for something else in the script, such as a function or variable commands and functions. Also, you cannot use the name for something else in
name. the script, such as a function or variable name.
In case the dot in the name is undesired, a local reference can be made for a In case the dot in the name is undesired, a local reference can be made for a
function: > function: >
@@ -1520,18 +1726,28 @@ line, there can be no line break: >
name # Error! name # Error!
echo that echo that
.name # Error! .name # Error!
< *:import-cycle*
The `import` commands are executed when encountered. If that script (directly To refer to a function in an imported script in a mapping, |<SID>| can be
or indirectly) imports the current script, then items defined after the used: >
`import` won't be processed yet. Therefore cyclic imports can exist, but may noremap <silent> ,a :call <SID>name.Function()<CR>
result in undefined items.
When the mapping is defined "<SID>name." will be replaced with <SNR> and the
script ID of the imported script.
*: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.
Importing an autoload script ~ Importing an autoload script ~
*vim9-autoload* *vim9-autoload*
For optimal startup speed, loading scripts should be postponed until they are For optimal startup speed, loading scripts should be postponed until they are
actually needed. Using the autoload mechanism is recommended: actually needed. Using the autoload mechanism is recommended:
*E1264*
1. In the plugin define user commands, functions and/or mappings that refer to 1. In the plugin define user commands, functions and/or mappings that refer to
items imported from an autoload script. > items imported from an autoload script. >
import autoload 'for/search.vim' import autoload 'for/search.vim'
@@ -1543,7 +1759,8 @@ actually needed. Using the autoload mechanism is recommended:
The "autoload" argument to `:import` means that the script is not loaded 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 until one of the items is actually used. The script will be found under
the "autoload" directory in 'runtimepath' instead of the "import" the "autoload" directory in 'runtimepath' instead of the "import"
directory. directory. Alternatively a relative or absolute name can be used, see
below.
2. In the autoload script put the bulk of the code. > 2. In the autoload script put the bulk of the code. >
vim9script vim9script
@@ -1557,11 +1774,20 @@ actually needed. Using the autoload mechanism is recommended:
prefix is obtained from the file name, as you would to manually in a 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 legacy autoload script. Thus the exported function can be found with
"for#search#Stuff", but you would normally use `import autoload` and not "for#search#Stuff", but you would normally use `import autoload` and not
use the prefix. use the prefix (which has the side effect of loading the autoload script
when compiling a function that encounters this name).
You can split up the functionality and import other scripts from the 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. autoload script as you like. This way you can share code between plugins.
Searching for the autoload script in all entries in 'runtimepath' can be a bit
slow. If the plugin knows where the script is located, quite often a relative
path can be used. This avoids the search and should be quite a bit faster.
Another advantage is that the script name does not need to be unique. An
absolute path is also possible. Examples: >
import autoload '../lib/implement.vim'
import autoload MyScriptsDir .. '/lib/implement.vim'
For defining a mapping that uses the imported autoload script the special key 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 |<ScriptCmd>| is useful. It allows for a command in a mapping to use the
script context of where the mapping was defined. script context of where the mapping was defined.
@@ -1569,7 +1795,17 @@ script context of where the mapping was defined.
When compiling a `:def` function and a function in an autoload script is 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. 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 This also means you get any errors only at runtime, since the argument and
return types are not known yet. return types are not known yet. If you would use the name with '#' characters
then the autoload script IS loaded.
Be careful to not refer to an item in an autoload script that does trigger
loading it unintentionally. For example, when setting an option that takes a
function name, make sure to use a string, not a function reference: >
import autoload 'qftf.vim'
&quickfixtextfunc = 'qftf.Func' # autoload script NOT loaded
&quickfixtextfunc = qftf.Func # autoload script IS loaded
On the other hand, it can be useful to load the script early, at a time when
any errors should be given.
For testing the |test_override()| function can be used to have the 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 `import autoload` load the script right away, so that the items and types can
@@ -1621,6 +1857,17 @@ threaded, connecting asynchronous operations is a natural way of allowing
plugins to do their work without blocking the user. It's a uniform way to plugins to do their work without blocking the user. It's a uniform way to
invoke callbacks and handle timeouts and errors. invoke callbacks and handle timeouts and errors.
Some commands have already been reserved:
*:class*
*:endclass*
*:abstract*
*:enum*
*:endenum*
*:interface*
*:endinterface*
*:static*
*:type*
Some examples: > Some examples: >
abstract class Person abstract class Person
@@ -1747,6 +1994,9 @@ Specific items from TypeScript we avoid:
- TypeScript has various "Readonly" types, which have limited usefulness, - TypeScript has various "Readonly" types, which have limited usefulness,
since a type cast can remove the immutable nature. Vim locks the value, since a type cast can remove the immutable nature. Vim locks the value,
which is more flexible, but is only checked at runtime. 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 ~ Declarations ~

View File

@@ -1,4 +1,4 @@
*visual.txt* For Vim version 8.2. Last change: 2022 Jan 20 *visual.txt* For Vim version 8.2. Last change: 2022 May 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -265,6 +265,7 @@ Additionally the following commands can be used:
X delete (2) |v_X| X delete (2) |v_X|
Y yank (2) |v_Y| Y yank (2) |v_Y|
p put |v_p| p put |v_p|
P put without overwriting registers |v_P|
J join (1) |v_J| J join (1) |v_J|
U make uppercase |v_U| U make uppercase |v_U|
u make lowercase |v_u| u make lowercase |v_u|

View File

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 8.2. Last change: 2022 Jan 08 *windows.txt* For Vim version 8.2. Last change: 2022 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -168,7 +168,7 @@ CTRL-W CTRL-S *CTRL-W_CTRL-S*
Note: CTRL-S does not work on all terminals and might block Note: CTRL-S does not work on all terminals and might block
further input, use CTRL-Q to get going again. further input, use CTRL-Q to get going again.
Also see |++opt| and |+cmd|. Also see |++opt| and |+cmd|.
*E242* *E242* *E1159*
Be careful when splitting a window in an autocommand, it may Be careful when splitting a window in an autocommand, it may
mess up the window layout if this happens while making other mess up the window layout if this happens while making other
window layout changes. window layout changes.
@@ -473,7 +473,7 @@ These commands can also be executed with ":wincmd":
the |CursorHold| autocommand event). Or when a Normal mode the |CursorHold| autocommand event). Or when a Normal mode
command is inconvenient. command is inconvenient.
The count can also be a window number. Example: > The count can also be a window number. Example: >
:exe nr . "wincmd w" :exe nr .. "wincmd w"
< This goes to window "nr". < This goes to window "nr".
============================================================================== ==============================================================================
@@ -892,7 +892,7 @@ windows.
*preview-popup* *preview-popup*
Alternatively, a popup window can be used by setting the 'previewpopup' Alternatively, a popup window can be used by setting the 'previewpopup'
option. When set, it overrules the 'previewwindow' and 'previewheight' option. When set, it overrules the 'previewwindow' and 'previewheight'
settings. The option is a comma separated list of values: settings. The option is a comma-separated list of values:
height maximum height of the popup height maximum height of the popup
width maximum width of the popup width maximum width of the popup
highlight highlight group of the popup (default is Pmenu) highlight highlight group of the popup (default is Pmenu)
@@ -964,12 +964,12 @@ CTRL-W g } *CTRL-W_g}*
cursor. This is less clever than using |:ptag|, but you don't cursor. This is less clever than using |:ptag|, but you don't
need a tags file and it will also find matches in system need a tags file and it will also find matches in system
include files. Example: > include files. Example: >
:au! CursorHold *.[ch] ++nested exe "silent! psearch " . expand("<cword>") :au! CursorHold *.[ch] ++nested exe "silent! psearch " .. expand("<cword>")
< Warning: This can be slow. < Warning: This can be slow.
Example *CursorHold-example* > Example *CursorHold-example* >
:au! CursorHold *.[ch] ++nested exe "silent! ptag " . expand("<cword>") :au! CursorHold *.[ch] ++nested exe "silent! ptag " .. expand("<cword>")
This will cause a ":ptag" to be executed for the keyword under the cursor, This will cause a ":ptag" to be executed for the keyword under the cursor,
when the cursor hasn't moved for the time set with 'updatetime'. The "nested" when the cursor hasn't moved for the time set with 'updatetime'. The "nested"
@@ -992,14 +992,14 @@ is no word under the cursor, and a few other things: >
: :
: " Delete any existing highlight before showing another tag : " Delete any existing highlight before showing another tag
: silent! wincmd P " jump to preview window : silent! wincmd P " jump to preview window
: if &previewwindow " if we really get there... : if &previewwindow " if we really get there...
: match none " delete existing highlight : match none " delete existing highlight
: wincmd p " back to old window : wincmd p " back to old window
: endif : endif
: :
: " Try displaying a matching tag for the word under the cursor : " Try displaying a matching tag for the word under the cursor
: try : try
: exe "ptag " . w : exe "ptag " .. w
: catch : catch
: return : return
: endtry : endtry
@@ -1011,10 +1011,10 @@ is no word under the cursor, and a few other things: >
: endif : endif
: call search("$", "b") " to end of previous line : call search("$", "b") " to end of previous line
: let w = substitute(w, '\\', '\\\\', "") : let w = substitute(w, '\\', '\\\\', "")
: call search('\<\V' . w . '\>') " position cursor on match : call search('\<\V' .. w .. '\>') " position cursor on match
: " Add a match highlight to the word at this position : " Add a match highlight to the word at this position
: hi previewWord term=bold ctermbg=green guibg=green : hi previewWord term=bold ctermbg=green guibg=green
: exe 'match previewWord "\%' . line(".") . 'l\%' . col(".") . 'c\k*"' : exe 'match previewWord "\%' .. line(".") .. 'l\%' .. col(".") .. 'c\k*"'
: wincmd p " back to old window : wincmd p " back to old window
: endif : endif
: endif : endif

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types " Vim support file to detect file types
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Jan 23 " Last Change: 2022 Apr 25
" Listen very carefully, I will say this only once " Listen very carefully, I will say this only once
if exists("did_load_filetypes") if exists("did_load_filetypes")
@@ -44,7 +44,7 @@ endif
" file name matches ft_ignore_pat. " file name matches ft_ignore_pat.
" When using this, the entry should probably be further down below with the " When using this, the entry should probably be further down below with the
" other StarSetf() calls. " other StarSetf() calls.
func! s:StarSetf(ft) func s:StarSetf(ft)
if expand("<amatch>") !~ g:ft_ignore_pat if expand("<amatch>") !~ g:ft_ignore_pat
exe 'setf ' . a:ft exe 'setf ' . a:ft
endif endif
@@ -155,14 +155,21 @@ au BufNewFile,BufRead *.asp
\ setf aspvbs | \ setf aspvbs |
\ endif \ endif
" Grub (must be before catch *.lst) " Grub (must be before pattern *.lst)
au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub
" Maxima, see:
" https://maxima.sourceforge.io/docs/manual/maxima_71.html#file_005ftype_005fmaxima
" Must be before the pattern *.mac.
" *.dem omitted - also used by gnuplot demos
" *.mc omitted - used by dist#ft#McSetf()
au BufNewFile,BufRead *.demo,*.dm{1,2,3,t},*.wxm,maxima-init.mac setf maxima
" Assembly (all kinds) " Assembly (all kinds)
" *.lst is not pure assembly, it has two extra columns (address, byte codes) " *.lst is not pure assembly, it has two extra columns (address, byte codes)
au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm() au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm()
" Macro (VAX) " Assembly - Macro (VAX)
au BufNewFile,BufRead *.mar setf vmasm au BufNewFile,BufRead *.mar setf vmasm
" Atlas " Atlas
@@ -205,11 +212,13 @@ au BufNewFile,BufRead *.iba,*.ibi setf ibasic
" FreeBasic file (similar to QBasic) " FreeBasic file (similar to QBasic)
au BufNewFile,BufRead *.fb setf freebasic au BufNewFile,BufRead *.fb setf freebasic
" Batch file for MSDOS. " Batch file for MSDOS. See dist#ft#FTsys for *.sys
au BufNewFile,BufRead *.bat,*.sys setf dosbatch au BufNewFile,BufRead *.bat setf dosbatch
" *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd. " *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd.
au BufNewFile,BufRead *.cmd au BufNewFile,BufRead *.cmd
\ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif \ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif
" ABB RAPID or Batch file for MSDOS.
au BufNewFile,BufRead *.sys\c call dist#ft#FTsys()
" Batch file for 4DOS " Batch file for 4DOS
au BufNewFile,BufRead *.btm call dist#ft#FTbtm() au BufNewFile,BufRead *.btm call dist#ft#FTbtm()
@@ -229,6 +238,9 @@ au BufNewFile,BufRead *.bib setf bib
" BibTeX Bibliography Style " BibTeX Bibliography Style
au BufNewFile,BufRead *.bst setf bst au BufNewFile,BufRead *.bst setf bst
" Bicep
au BufNewFile,BufRead *.bicep setf bicep
" BIND configuration " BIND configuration
" sudoedit uses namedXXXX.conf " sudoedit uses namedXXXX.conf
au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named
@@ -357,13 +369,8 @@ au BufNewFile,BufRead *.eni setf cl
" Clever or dtd " Clever or dtd
au BufNewFile,BufRead *.ent call dist#ft#FTent() au BufNewFile,BufRead *.ent call dist#ft#FTent()
" Clipper (or FoxPro; could also be eviews) " Clipper, FoxPro, ABB RAPID or eviews
au BufNewFile,BufRead *.prg au BufNewFile,BufRead *.prg\c call dist#ft#FTprg()
\ if exists("g:filetype_prg") |
\ exe "setf " . g:filetype_prg |
\ else |
\ setf clipper |
\ endif
" Clojure " Clojure
au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc setf clojure au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc setf clojure
@@ -394,6 +401,9 @@ au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf
" Configure scripts " Configure scripts
au BufNewFile,BufRead configure.in,configure.ac setf config au BufNewFile,BufRead configure.in,configure.ac setf config
" Cooklang
au BufNewFile,BufRead *.cook setf cook
" CUDA Compute Unified Device Architecture " CUDA Compute Unified Device Architecture
au BufNewFile,BufRead *.cu,*.cuh setf cuda au BufNewFile,BufRead *.cu,*.cuh setf cuda
@@ -417,6 +427,9 @@ au BufNewFile,BufRead *.ex call dist#ft#ExCheck()
au BufRead,BufNewFile mix.lock,*.exs setf elixir au BufRead,BufNewFile mix.lock,*.exs setf elixir
au BufRead,BufNewFile *.eex,*.leex setf eelixir au BufRead,BufNewFile *.eex,*.leex setf eelixir
" Elvish
au BufRead,BufNewFile *.elv setf elvish
" Euphoria 3 or 4 " Euphoria 3 or 4
au BufNewFile,BufRead *.eu,*.ew,*.exu,*.exw call dist#ft#EuphoriaCheck() au BufNewFile,BufRead *.eu,*.ew,*.exu,*.exw call dist#ft#EuphoriaCheck()
if has("fname_case") if has("fname_case")
@@ -438,7 +451,7 @@ au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake
au BufNewFile,BufRead *.qc setf c au BufNewFile,BufRead *.qc setf c
" Configure files " Configure files
au BufNewFile,BufRead *.cfg setf cfg au BufNewFile,BufRead *.cfg\c call dist#ft#FTcfg()
" Cucumber " Cucumber
au BufNewFile,BufRead *.feature setf cucumber au BufNewFile,BufRead *.feature setf cucumber
@@ -481,6 +494,7 @@ au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq
au BufNewFile,BufRead *.desc setf desc au BufNewFile,BufRead *.desc setf desc
" the D language or dtrace " the D language or dtrace
au BufNewFile,BufRead */dtrace/*.d setf dtrace
au BufNewFile,BufRead *.d call dist#ft#DtraceCheck() au BufNewFile,BufRead *.d call dist#ft#DtraceCheck()
" Desktop files " Desktop files
@@ -664,7 +678,7 @@ au BufNewFile,BufRead *.fs call dist#ft#FTfs()
au BufNewFile,BufRead *.fsi,*.fsx setf fsharp au BufNewFile,BufRead *.fsi,*.fsx setf fsharp
" GDB command files " GDB command files
au BufNewFile,BufRead .gdbinit,gdbinit setf gdb au BufNewFile,BufRead .gdbinit,gdbinit,.gdbearlyinit,gdbearlyinit,*.gdb setf gdb
" GDMO " GDMO
au BufNewFile,BufRead *.mo,*.gdmo setf gdmo au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
@@ -705,6 +719,9 @@ au BufNewFile,BufRead *.git/*
" Gkrellmrc " Gkrellmrc
au BufNewFile,BufRead gkrellmrc,gkrellmrc_? setf gkrellmrc au BufNewFile,BufRead gkrellmrc,gkrellmrc_? setf gkrellmrc
" Gleam
au BufNewFile,BufRead *.gleam setf gleam
" GLSL " GLSL
au BufNewFile,BufRead *.glsl setf glsl au BufNewFile,BufRead *.glsl setf glsl
@@ -727,6 +744,10 @@ au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash
au BufNewFile,BufRead gitolite.conf setf gitolite au BufNewFile,BufRead gitolite.conf setf gitolite
au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl
" Glimmer-flavored TypeScript and JavaScript
au BufNewFile,BufRead *.gts setf typescript.glimmer
au BufNewFile,BufRead *.gjs setf javascript.glimmer
" Gnuplot scripts " Gnuplot scripts
au BufNewFile,BufRead *.gpi,.gnuplot setf gnuplot au BufNewFile,BufRead *.gpi,.gnuplot setf gnuplot
@@ -803,6 +824,7 @@ au BufNewFile,BufRead *.t.html setf tilde
" HTML (.shtml and .stm for server side) " HTML (.shtml and .stm for server side)
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml() au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml()
au BufNewFile,BufRead *.cshtml setf html
" HTML with Ruby - eRuby " HTML with Ruby - eRuby
au BufNewFile,BufRead *.erb,*.rhtml setf eruby au BufNewFile,BufRead *.erb,*.rhtml setf eruby
@@ -940,6 +962,11 @@ au BufNewFile,BufRead *.jl setf julia
" Kixtart " Kixtart
au BufNewFile,BufRead *.kix setf kix au BufNewFile,BufRead *.kix setf kix
" Kuka Robot Language
au BufNewFile,BufRead *.src\c call dist#ft#FTsrc()
au BufNewFile,BufRead *.dat\c call dist#ft#FTdat()
au BufNewFile,BufRead *.sub\c setf krl
" Kimwitu[++] " Kimwitu[++]
au BufNewFile,BufRead *.k setf kwt au BufNewFile,BufRead *.k setf kwt
@@ -964,7 +991,7 @@ au BufNewFile,BufRead *.latte,*.lte setf latte
" Limits " Limits
au BufNewFile,BufRead */etc/limits,*/etc/*limits.conf,*/etc/*limits.d/*.conf setf limits au BufNewFile,BufRead */etc/limits,*/etc/*limits.conf,*/etc/*limits.d/*.conf setf limits
" LambdaProlog (*.mod too, see Modsim) " LambdaProlog (see dist#ft#FTmod for *.mod)
au BufNewFile,BufRead *.sig setf lprolog au BufNewFile,BufRead *.sig setf lprolog
" LDAP LDIF " LDAP LDIF
@@ -997,6 +1024,9 @@ au BufNewFile,BufRead *.ll setf lifelines
" Lilo: Linux loader " Lilo: Linux loader
au BufNewFile,BufRead lilo.conf setf lilo au BufNewFile,BufRead lilo.conf setf lilo
" Lilypond
au BufNewFile,BufRead *.ly,*.ily setf lilypond
" Lisp (*.el = ELisp, *.cl = Common Lisp) " Lisp (*.el = ELisp, *.cl = Common Lisp)
" *.jl was removed, it's also used for Julia, better skip than guess wrong. " *.jl was removed, it's also used for Julia, better skip than guess wrong.
if has("fname_case") if has("fname_case")
@@ -1127,18 +1157,11 @@ au BufNewFile,BufRead *.mms call dist#ft#FTmms()
" Symbian meta-makefile definition (MMP) " Symbian meta-makefile definition (MMP)
au BufNewFile,BufRead *.mmp setf mmp au BufNewFile,BufRead *.mmp setf mmp
" Modsim III (or LambdaProlog) " ABB Rapid, Modula-2, Modsim III or LambdaProlog
au BufNewFile,BufRead *.mod au BufNewFile,BufRead *.mod\c call dist#ft#FTmod()
\ if expand("<afile>") =~ '\<go.mod$' |
\ setf gomod |
\ elseif getline(1) =~ '\<module\>' |
\ setf lprolog |
\ else |
\ setf modsim3 |
\ endif
" Modula-2 (.md removed in favor of Markdown) " Modula-2 (.md removed in favor of Markdown, see dist#ft#FTmod for *.MOD)
au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.mi setf modula2 au BufNewFile,BufRead *.m2,*.DEF,*.mi setf modula2
" Modula-3 (.m3, .i3, .mg, .ig) " Modula-3 (.m3, .i3, .mg, .ig)
au BufNewFile,BufRead *.[mi][3g] setf modula3 au BufNewFile,BufRead *.[mi][3g] setf modula3
@@ -1266,19 +1289,25 @@ au BufNewFile,BufRead *.or setf openroad
" OPL " OPL
au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl
" OpenSCAD
au BufNewFile,BufRead *.scad setf openscad
" Oracle config file " Oracle config file
au BufNewFile,BufRead *.ora setf ora au BufNewFile,BufRead *.ora setf ora
" Org
au BufNewFile,BufRead *.org,*.org_archive setf org
" Packet filter conf " Packet filter conf
au BufNewFile,BufRead pf.conf setf pf au BufNewFile,BufRead pf.conf setf pf
" Pacman Config (close enough to dosini) " Pacman config
au BufNewFile,BufRead */etc/pacman.conf setf dosini au BufNewFile,BufRead */etc/pacman.conf setf conf
" Pacman hooks " Pacman hooks
au BufNewFile,BufRead *.hook au BufNewFile,BufRead *.hook
\ if getline(1) == '[Trigger]' | \ if getline(1) == '[Trigger]' |
\ setf dosini | \ setf conf |
\ endif \ endif
" Pam conf " Pam conf
@@ -1333,9 +1362,10 @@ au BufNewFile,BufRead *.pm
au BufNewFile,BufRead *.pod setf pod au BufNewFile,BufRead *.pod setf pod
" Php, php3, php4, etc. " Php, php3, php4, etc.
" Also Phtml (was used for PHP 2 in the past) " Also Phtml (was used for PHP 2 in the past).
" Also .ctp for Cake template file " Also .ctp for Cake template file.
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php " Also .phpt for php tests.
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp,*.phpt setf php
" PHP config " PHP config
au BufNewFile,BufRead php.ini-* setf dosini au BufNewFile,BufRead php.ini-* setf dosini
@@ -1547,6 +1577,9 @@ au BufNewFile,BufRead *.r,*.R call dist#ft#FTr()
" Remind " Remind
au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind
" ReScript
au BufNewFile,BufRead *.res,*.resi setf rescript
" Resolv.conf " Resolv.conf
au BufNewFile,BufRead resolv.conf setf resolv au BufNewFile,BufRead resolv.conf setf resolv
@@ -1559,6 +1592,9 @@ au BufNewFile,BufRead *.rng setf rng
" RPL/2 " RPL/2
au BufNewFile,BufRead *.rpl setf rpl au BufNewFile,BufRead *.rpl setf rpl
" Robot Framework
au BufNewFile,BufRead *.robot,*.resource setf robot
" Robots.txt " Robots.txt
au BufNewFile,BufRead robots.txt setf robots au BufNewFile,BufRead robots.txt setf robots
@@ -1618,16 +1654,22 @@ au BufNewFile,BufRead *.sass setf sass
au BufNewFile,BufRead *.sa setf sather au BufNewFile,BufRead *.sa setf sather
" Scala " Scala
au BufNewFile,BufRead *.scala,*.sc setf scala au BufNewFile,BufRead *.scala setf scala
" SBT - Scala Build Tool " SBT - Scala Build Tool
au BufNewFile,BufRead *.sbt setf sbt au BufNewFile,BufRead *.sbt setf sbt
" SuperCollider
au BufNewFile,BufRead *.sc call dist#ft#FTsc()
au BufNewFile,BufRead *.quark setf supercollider
" scdoc
au BufNewFile,BufRead *.scd call dist#ft#FTscd()
" Scilab " Scilab
au BufNewFile,BufRead *.sci,*.sce setf scilab au BufNewFile,BufRead *.sci,*.sce setf scilab
" scdoc
au BufNewFile,BufRead *.scd setf scdoc
" SCSS " SCSS
au BufNewFile,BufRead *.scss setf scss au BufNewFile,BufRead *.scss setf scss
@@ -1650,7 +1692,8 @@ au BufNewFile,BufRead *.siv,*.sieve setf sieve
" Sendmail " Sendmail
au BufNewFile,BufRead sendmail.cf setf sm au BufNewFile,BufRead sendmail.cf setf sm
" Sendmail .mc files are actually m4. Could also be MS Message text file. " Sendmail .mc files are actually m4. Could also be MS Message text file or
" Maxima.
au BufNewFile,BufRead *.mc call dist#ft#McSetf() au BufNewFile,BufRead *.mc call dist#ft#McSetf()
" Services " Services
@@ -1721,7 +1764,7 @@ au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump setf zsh
au BufNewFile,BufRead *.zsh setf zsh au BufNewFile,BufRead *.zsh setf zsh
" Scheme " Scheme
au BufNewFile,BufRead *.scm,*.ss,*.sld,*.rkt,*.rktd,*.rktl setf scheme au BufNewFile,BufRead *.scm,*.ss,*.sld,*.rkt,*.rktd,*.rktl setf scheme
" Screen RC " Screen RC
au BufNewFile,BufRead .screenrc,screenrc setf screen au BufNewFile,BufRead .screenrc,screenrc setf screen
@@ -1789,6 +1832,9 @@ au BufNewFile,BufRead *.mib,*.my setf mib
au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog
au BufNewFile,BufRead *.rules call dist#ft#FTRules() au BufNewFile,BufRead *.rules call dist#ft#FTRules()
" Solidity
au BufRead,BufNewFile *.sol setf solidity
" SPARQL queries " SPARQL queries
au BufNewFile,BufRead *.rq,*.sparql setf sparql au BufNewFile,BufRead *.rq,*.sparql setf sparql
@@ -1946,10 +1992,13 @@ au BufNewFile,BufRead texmf.cnf setf texmf
au BufNewFile,BufRead .tidyrc,tidyrc,tidy.conf setf tidy au BufNewFile,BufRead .tidyrc,tidyrc,tidy.conf setf tidy
" TF mud client " 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+ " TLA+
au BufRead,BufNewFile *.tla setf tla au BufNewFile,BufRead *.tla setf tla
" tmux configuration " tmux configuration
au BufNewFile,BufRead {.,}tmux*.conf setf tmux au BufNewFile,BufRead {.,}tmux*.conf setf tmux
@@ -1958,7 +2007,7 @@ au BufNewFile,BufRead {.,}tmux*.conf setf tmux
au BufNewFile,BufRead *.toml setf toml au BufNewFile,BufRead *.toml setf toml
" TPP - Text Presentation Program " TPP - Text Presentation Program
au BufNewFile,BufReadPost *.tpp setf tpp au BufNewFile,BufRead *.tpp setf tpp
" Treetop " Treetop
au BufRead,BufNewFile *.treetop setf treetop au BufRead,BufNewFile *.treetop setf treetop
@@ -2015,9 +2064,15 @@ au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart
au BufNewFile,BufRead */.config/upstart/*.conf setf upstart au BufNewFile,BufRead */.config/upstart/*.conf setf upstart
au BufNewFile,BufRead */.config/upstart/*.override setf upstart au BufNewFile,BufRead */.config/upstart/*.override setf upstart
" Vala
au BufNewFile,BufRead *.vala setf vala
" Vera " Vera
au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera
" Vagrant (uses Ruby syntax)
au BufNewFile,BufRead Vagrantfile setf ruby
" Verilog HDL " Verilog HDL
au BufNewFile,BufRead *.v setf verilog au BufNewFile,BufRead *.v setf verilog
@@ -2045,7 +2100,7 @@ au BufRead,BufNewFile *.hw,*.module,*.pkg
\ endif \ endif
" Visual Basic (also uses *.bas) or FORM " 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 " SaxBasic is close to Visual Basic
au BufNewFile,BufRead *.sba setf vb au BufNewFile,BufRead *.sba setf vb
@@ -2071,6 +2126,9 @@ au BufNewFile,BufRead *.wm setf webmacro
" Wget config " Wget config
au BufNewFile,BufRead .wgetrc,wgetrc setf wget au BufNewFile,BufRead .wgetrc,wgetrc setf wget
" Wget2 config
au BufNewFile,BufRead .wget2rc,wget2rc setf wget2
" Website MetaLanguage " Website MetaLanguage
au BufNewFile,BufRead *.wml setf wml au BufNewFile,BufRead *.wml setf wml
@@ -2507,7 +2565,7 @@ endif
" Function called for testing all functions defined here. These are " Function called for testing all functions defined here. These are
" script-local, thus need to be executed here. " script-local, thus need to be executed here.
" Returns a string with error messages (hopefully empty). " Returns a string with error messages (hopefully empty).
func! TestFiletypeFuncs(testlist) func TestFiletypeFuncs(testlist)
let output = '' let output = ''
for f in a:testlist for f in a:testlist
try try

View File

@@ -1,35 +1,43 @@
" Vim support file to switch on loading plugins for file types vim9script noclear
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2006 Apr 30
if exists("did_load_ftplugin") # Vim support file to switch on loading plugins for file types
#
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last change: 2022 Feb 11
if exists("g:did_load_ftplugin")
finish finish
endif endif
let did_load_ftplugin = 1 g:did_load_ftplugin = 1
augroup filetypeplugin augroup filetypeplugin
au FileType * call s:LoadFTPlugin() au FileType * call 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 augroup END
if exists('*LoadFTPlugin')
# No need to define the function again.
finish
endif
def LoadFTPlugin()
if exists("b:undo_ftplugin")
# We assume b:undo_ftplugin is using legacy script syntax
legacy 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,8 +1,10 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: ant " Language: ant
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> "
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
" Last Changed: 20 Jan 2009 " Last Changed: 20 Jan 2009
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif if exists("b:did_ftplugin") | finish | endif

View File

@@ -1,8 +1,10 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: aspvbs " Language: aspvbs
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> "
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
" Last Changed: 20 Jan 2009 " Last Changed: 20 Jan 2009
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif if exists("b:did_ftplugin") | finish | endif

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: BASIC " Language: BASIC (QuickBASIC 4.5)
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2015 Jan 10 " Last Change: 2021 Mar 16
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
finish finish
@@ -11,17 +11,46 @@ let b:did_ftplugin = 1
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo&vim set cpo&vim
setlocal comments=:REM,:' setlocal comments=:REM\ ,:Rem\ ,:rem\ ,:'
setlocal commentstring='\ %s setlocal commentstring='\ %s
setlocal formatoptions-=t formatoptions+=croql setlocal formatoptions-=t formatoptions+=croql
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") " TODO: support exit ... as middle matches?
let b:browsefilter = "BASIC Source Files (*.bas)\t*.bas\n" . if exists("loaded_matchit") && !exists("b:match_words")
\ "All Files (*.*)\t*.*\n" 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 endif
let b:undo_ftplugin = "setl fo< com< cms< sua<" . if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
\ " | unlet! 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 let &cpo = s:cpo_save
unlet s:cpo_save unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: C " Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Sep 21 " Last Change: 2022 Apr 08
" Only do this when not done yet for this buffer " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
@@ -31,7 +31,8 @@ if exists('&ofu')
endif endif
" Set 'comments' to format dashed lists in comments. " Set 'comments' to format dashed lists in comments.
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// " Also include ///, used for Doxygen.
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
" In VMS C keywords contain '$' characters. " In VMS C keywords contain '$' characters.
if has("vms") if has("vms")

View File

@@ -5,7 +5,7 @@
" Meikel Brandmeyer <mb@kotka.de> " Meikel Brandmeyer <mb@kotka.de>
" URL: https://github.com/clojure-vim/clojure.vim " URL: https://github.com/clojure-vim/clojure.vim
" License: Vim (see :h license) " License: Vim (see :h license)
" Last Change: 2021-10-26 " Last Change: 2022-03-24
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
finish finish
@@ -43,7 +43,7 @@ setlocal commentstring=;\ %s
" specially and hence are not indented specially. " specially and hence are not indented specially.
" "
" -*- LISPWORDS -*- " -*- LISPWORDS -*-
" Generated from https://github.com/clojure-vim/clojure.vim/blob/62b215f079ce0f3834fd295c7a7f6bd8cc54bcc3/clj/src/vim_clojure_static/generate.clj " Generated from https://github.com/clojure-vim/clojure.vim/blob/fd280e33e84c88e97860930557dba3ff80b1a82d/clj/src/vim_clojure_static/generate.clj
setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test
" Provide insert mode completions for special forms and clojure.core. As " Provide insert mode completions for special forms and clojure.core. As
@@ -66,10 +66,10 @@ endif
" Filter files in the browse dialog " Filter files in the browse dialog
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Clojure Source Files (*.clj)\t*.clj\n" . let b:browsefilter = "All Files\t*\n" .
\ "ClojureScript Source Files (*.cljs)\t*.cljs\n" . \ "Clojure Files\t*.clj;*.cljc;*.cljs;*.cljx\n" .
\ "Java Source Files (*.java)\t*.java\n" . \ "EDN Files\t*.edn\n" .
\ "All Files (*.*)\t*.*\n" \ "Java Files\t*.java\n"
let b:undo_ftplugin .= ' | unlet! b:browsefilter' let b:undo_ftplugin .= ' | unlet! b:browsefilter'
endif endif

View File

@@ -1,8 +1,10 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: config " Language: config
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> "
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
" Last Changed: 20 Jan 2009 " Last Changed: 20 Jan 2009
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif if exists("b:did_ftplugin") | finish | endif

View File

@@ -1,8 +1,10 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: csc " Language: csc
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> "
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
" Last Changed: 20 Jan 2009 " Last Changed: 20 Jan 2009
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1 let b:did_ftplugin = 1

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: csh " Language: csh
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> " Previous Maintainer: Dan Sharp
" Contributor: Johannes Zellner <johannes@zellner.org> " Contributor: Johannes Zellner <johannes@zellner.org>
" Last Change: 2021 Oct 15 " Last Change: 2021 Oct 15

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