Compare commits

...

254 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
ce001a337e Update runtime files 2022-04-27 15:25:03 +01:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
75ab590f85 Update runtime files 2022-04-18 15:36:40 +01:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
cbaff5e06e Update runtime files 2022-04-08 17:45:08 +01:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
377 changed files with 17343 additions and 13807 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"

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: |
@ -245,7 +254,7 @@ jobs:
- name: Codecov - name: Codecov
if: matrix.coverage if: matrix.coverage
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v3.1.0
with: with:
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }} flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
@ -355,6 +364,8 @@ jobs:
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'
@ -501,7 +512,7 @@ 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 COVERAGE=${{ matrix.coverage }} STATIC_STDCPLUS=yes COVERAGE=${{ matrix.coverage }}
@ -591,14 +602,14 @@ jobs:
- name: Codecov (gVim) - name: Codecov (gVim)
if: matrix.coverage if: matrix.coverage
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v3.1.0
with: with:
directory: src directory: src
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}-gui flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}-gui
- name: Codecov (Vim) - name: Codecov (Vim)
if: matrix.coverage if: matrix.coverage
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v3.1.0
with: with:
directory: src2 directory: src2
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }} flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}

View File

@ -446,10 +446,6 @@ SRC_UNIX = \
src/create_cmdidxs.vim \ src/create_cmdidxs.vim \
src/create_nvcmdidxs.c \ src/create_nvcmdidxs.c \
src/create_nvcmdidxs.vim \ src/create_nvcmdidxs.vim \
src/gui_at_fs.c \
src/gui_at_sb.c \
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 \
@ -474,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 \
@ -727,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 \

View File

@ -403,6 +403,9 @@ 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 SetOutPath $0\bitmaps
File ${VIMSRC}\vim.ico File ${VIMSRC}\vim.ico
@ -1044,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

@ -3,7 +3,7 @@ vim9script
# Vim functions for file type detection # Vim functions for file type detection
# #
# Maintainer: Bram Moolenaar <Bram@vim.org> # Maintainer: Bram Moolenaar <Bram@vim.org>
# Last Change: 2022 Mar 05 # Last Change: 2022 Apr 13
# These functions are moved here from runtime/filetype.vim to make startup # These functions are moved here from runtime/filetype.vim to make startup
# faster. # faster.
@ -107,6 +107,25 @@ export def BindzoneCheck(default = '')
endif endif
enddef enddef
# Returns true if file content looks like RAPID
def IsRapid(sChkExt: string = ""): bool
if sChkExt == "cfg"
return getline(1) =~? '\v^%(EIO|MMC|MOC|PROC|SIO|SYS):CFG'
endif
# called from FTmod, FTprg or FTsys
return getline(nextnonblank(1)) =~? '\v^\s*%(\%{3}|module\s+\k+\s*%(\(|$))'
enddef
export def FTcfg()
if exists("g:filetype_cfg")
exe "setf " .. g:filetype_cfg
elseif IsRapid("cfg")
setf rapid
else
setf cfg
endif
enddef
export def FTlpc() export def FTlpc()
if exists("g:lpc_syntax_for_c") if exists("g:lpc_syntax_for_c")
var lnum = 1 var lnum = 1
@ -168,7 +187,7 @@ enddef
export def FTent() export def FTent()
# This function checks for valid cl syntax in the first five lines. # This function checks for valid cl syntax in the first five lines.
# Look for either an opening comment, '#', or a block start, '{". # Look for either an opening comment, '#', or a block start, '{'.
# If not found, assume SGML. # If not found, assume SGML.
var lnum = 1 var lnum = 1
while lnum < 6 while lnum < 6
@ -410,6 +429,36 @@ export def FTmm()
setf nroff setf nroff
enddef enddef
# Returns true if file content looks like LambdaProlog
def IsLProlog(): bool
# skip apparent comments and blank lines, what looks like
# LambdaProlog comment may be RAPID header
var l: number = nextnonblank(1)
while l > 0 && l < line('$') && getline(l) =~ '^\s*%' # LambdaProlog comment
l = nextnonblank(l + 1)
endwhile
# this pattern must not catch a go.mod file
return getline(l) =~ '\<module\s\+\w\+\s*\.\s*\(%\|$\)'
enddef
# Determine if *.mod is ABB RAPID, LambdaProlog, Modula-2, Modsim III or go.mod
export def FTmod()
if exists("g:filetype_mod")
exe "setf " .. g:filetype_mod
elseif IsLProlog()
setf lprolog
elseif getline(nextnonblank(1)) =~ '\%(\<MODULE\s\+\w\+\s*;\|^\s*(\*\)'
setf modula2
elseif IsRapid()
setf rapid
elseif expand("<afile>") =~ '\<go.mod$'
setf gomod
else
# Nothing recognized, assume modsim3
setf modsim3
endif
enddef
export def FTpl() export def FTpl()
if exists("g:filetype_pl") if exists("g:filetype_pl")
exe "setf " .. g:filetype_pl exe "setf " .. g:filetype_pl
@ -526,6 +575,18 @@ export def FTpp()
endif endif
enddef enddef
# Determine if *.prg is ABB RAPID. Can also be Clipper, FoxPro or eviews
export def FTprg()
if exists("g:filetype_prg")
exe "setf " .. g:filetype_prg
elseif IsRapid()
setf rapid
else
# Nothing recognized, assume Clipper
setf clipper
endif
enddef
export def FTr() export def FTr()
var max = line("$") > 50 ? 50 : line("$") var max = line("$") > 50 ? 50 : line("$")
@ -572,7 +633,7 @@ export def McSetf()
return return
endif endif
endfor endfor
setf m4 " Default: Sendmail .mc file setf m4 # Default: Sendmail .mc file
enddef enddef
# Called from filetype.vim and scripts.vim. # Called from filetype.vim and scripts.vim.
@ -708,6 +769,28 @@ export def SQL()
endif endif
enddef enddef
# This function checks the first 25 lines of file extension "sc" to resolve
# detection between scala and SuperCollider
export def FTsc()
for lnum in range(1, min([line("$"), 25]))
if getline(lnum) =~# '[A-Za-z0-9]*\s:\s[A-Za-z0-9]\|var\s<\|classvar\s<\|\^this.*\||\w*|\|+\s\w*\s{\|\*ar\s'
setf supercollider
return
endif
endfor
setf scala
enddef
# This function checks the first line of file extension "scd" to resolve
# detection between scdoc and SuperCollider
export def FTscd()
if getline(1) =~# '\%^\S\+(\d[0-9A-Za-z]*)\%(\s\+\"[^"]*\"\%(\s\+\"[^"]*\"\)\=\)\=$'
setf scdoc
else
setf supercollider
endif
enddef
# If the file has an extension of 't' and is in a directory 't' or 'xt' then # If the file has an extension of 't' and is in a directory 't' or 'xt' then
# it is almost certainly a Perl test file. # it is almost certainly a Perl test file.
# If the first line starts with '#' and contains 'perl' it's probably a Perl # If the first line starts with '#' and contains 'perl' it's probably a Perl
@ -735,6 +818,16 @@ export def FTperl(): number
return 0 return 0
enddef enddef
export def FTsys()
if exists("g:filetype_sys")
exe "setf " .. g:filetype_sys
elseif IsRapid()
setf rapid
else
setf bat
endif
enddef
# Choose context, plaintex, or tex (LaTeX) based on these rules: # Choose context, plaintex, or tex (LaTeX) based on these rules:
# 1. Check the first line of the file for "%&<format>". # 1. Check the first line of the file for "%&<format>".
# 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords. # 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords.
@ -896,6 +989,26 @@ export def FTtf()
setf tf setf tf
enddef enddef
var ft_krl_header = '\&\w+'
# Determine if a *.src file is Kuka Robot Language
export def FTsrc()
var ft_krl_def_or_deffct = '%(global\s+)?def%(fct)?>'
if exists("g:filetype_src")
exe "setf " .. g:filetype_src
elseif getline(nextnonblank(1)) =~? '\v^\s*%(' .. ft_krl_header .. '|' .. ft_krl_def_or_deffct .. ')'
setf krl
endif
enddef
# Determine if a *.dat file is Kuka Robot Language
export def FTdat()
var ft_krl_defdat = 'defdat>'
if exists("g:filetype_dat")
exe "setf " .. g:filetype_dat
elseif getline(nextnonblank(1)) =~? '\v^\s*%(' .. ft_krl_header .. '|' .. ft_krl_defdat .. ')'
setf krl
endif
enddef
# Uncomment this line to check for compilation errors early # Uncomment this line to check for compilation errors early
# defcompile # defcompile

View File

@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.2. Last change: 2022 Mar 27 *autocmd.txt* For Vim version 8.2. Last change: 2022 Apr 17
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -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
@ -402,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*
@ -471,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|
@ -705,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 ']
@ -735,35 +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|.
*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.
*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.
@ -1203,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,
@ -1228,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.
@ -1317,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: >

View File

@ -1,4 +1,4 @@
*builtin.txt* For Vim version 8.2. Last change: 2022 Mar 26 *builtin.txt* For Vim version 8.2. Last change: 2022 Apr 25
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -161,7 +161,8 @@ exists_compiled({expr}) Number |TRUE| if {expr} exists at compile time
exp({expr}) Float exponential of {expr} exp({expr}) Float exponential of {expr}
expand({expr} [, {nosuf} [, {list}]]) expand({expr} [, {nosuf} [, {list}]])
any expand special keywords in {expr} any expand special keywords in {expr}
expandcmd({expr}) String expand {expr} like with `:edit` expandcmd({string} [, {options}])
String expand {string} like with `:edit`
extend({expr1}, {expr2} [, {expr3}]) extend({expr1}, {expr2} [, {expr3}])
List/Dict insert items of {expr2} into {expr1} List/Dict insert items of {expr2} into {expr1}
extendnew({expr1}, {expr2} [, {expr3}]) extendnew({expr1}, {expr2} [, {expr3}])
@ -212,8 +213,12 @@ getcharmod() Number modifiers for the last typed character
getcharpos({expr}) List position of cursor, mark, etc. getcharpos({expr}) List position of cursor, mark, etc.
getcharsearch() Dict last character search getcharsearch() Dict last character search
getcharstr([expr]) String get one character from the user getcharstr([expr]) String get one character from the user
getcmdcompltype() String return the type of the current
command-line completion
getcmdline() String return the current command-line getcmdline() String return the current command-line
getcmdpos() Number return cursor position in command-line getcmdpos() Number return cursor position in command-line
getcmdscreenpos() Number return cursor screen position in
command-line
getcmdtype() String return current command-line type getcmdtype() String return current command-line type
getcmdwintype() String return current command-line window type getcmdwintype() String return current command-line window type
getcompletion({pat}, {type} [, {filtered}]) getcompletion({pat}, {type} [, {filtered}])
@ -294,6 +299,7 @@ inputsecret({prompt} [, {text}]) String like input() but hiding the text
insert({object}, {item} [, {idx}]) List insert {item} in {object} [before {idx}] insert({object}, {item} [, {idx}]) List insert {item} in {object} [before {idx}]
interrupt() none interrupt script execution interrupt() none interrupt script execution
invert({expr}) Number bitwise invert invert({expr}) Number bitwise invert
isabsolutepath({path}) Number |TRUE| if {path} is an absolute path
isdirectory({directory}) Number |TRUE| if {directory} is a directory isdirectory({directory}) Number |TRUE| if {directory} is a directory
isinf({expr}) Number determine if {expr} is infinity value isinf({expr}) Number determine if {expr} is infinity value
(positive or negative) (positive or negative)
@ -336,6 +342,7 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]])
rhs of mapping {name} in mode {mode} rhs of mapping {name} in mode {mode}
mapcheck({name} [, {mode} [, {abbr}]]) mapcheck({name} [, {mode} [, {abbr}]])
String check for mappings matching {name} String check for mappings matching {name}
maplist([{abbr}]) List list of all mappings, a dict for each
mapnew({expr1}, {expr2}) List/Dict/Blob/String mapnew({expr1}, {expr2}) List/Dict/Blob/String
like |map()| but creates a new List or like |map()| but creates a new List or
Dictionary Dictionary
@ -1753,7 +1760,10 @@ deepcopy({expr} [, {noref}]) *deepcopy()* *E698*
delete({fname} [, {flags}]) *delete()* delete({fname} [, {flags}]) *delete()*
Without {flags} or with {flags} empty: Deletes the file by the Without {flags} or with {flags} empty: Deletes the file by the
name {fname}. This also works when {fname} is a symbolic link. name {fname}.
This also works when {fname} is a symbolic link. The symbolic
link itself is deleted, not what it points to.
When {flags} is "d": Deletes the directory by the name When {flags} is "d": Deletes the directory by the name
{fname}. This fails when directory {fname} is not empty. {fname}. This fails when directory {fname} is not empty.
@ -1763,8 +1773,6 @@ delete({fname} [, {flags}]) *delete()*
Note: on MS-Windows it is not possible to delete a directory Note: on MS-Windows it is not possible to delete a directory
that is being used. that is being used.
A symbolic link itself is deleted, not what it points to.
The result is a Number, which is 0/false if the delete The result is a Number, which is 0/false if the delete
operation was successful and -1/true when the deletion failed operation was successful and -1/true when the deletion failed
or partly failed. or partly failed.
@ -2012,8 +2020,10 @@ executable({expr}) *executable()*
On MS-Windows it only checks if the file exists and is not a On MS-Windows it only checks if the file exists and is not a
directory, not if it's really executable. directory, not if it's really executable.
On MS-Windows an executable in the same directory as Vim is On MS-Windows an executable in the same directory as Vim is
always found. Since this directory is added to $PATH it normally found. Since this directory is added to $PATH it
should also work to execute it |win32-PATH|. should also work to execute it |win32-PATH|. This can be
disabled by setting the $NoDefaultCurrentDirectoryInExePath
environment variable. *NoDefaultCurrentDirectoryInExePath*
The result is a Number: The result is a Number:
1 exists 1 exists
0 does not exist 0 does not exist
@ -2044,7 +2054,7 @@ execute({command} [, {silent}]) *execute()*
It is not possible to use `:redir` anywhere in {command}. It is not possible to use `:redir` anywhere in {command}.
To get a list of lines use |split()| on the result: > To get a list of lines use |split()| on the result: >
split(execute('args'), "\n") execute('args')->split("\n")
< To execute a command in another window than the current one < To execute a command in another window than the current one
use `win_execute()`. use `win_execute()`.
@ -2235,6 +2245,8 @@ expand({string} [, {nosuf} [, {list}]]) *expand()*
a function a function
<SID> "<SNR>123_" where "123" is the <SID> "<SNR>123_" where "123" is the
current script ID |<SID>| current script ID |<SID>|
<script> sourced script file, or script file
where the current function was defined
<stack> call stack <stack> call stack
<cword> word under the cursor <cword> word under the cursor
<cWORD> WORD under the cursor <cWORD> WORD under the cursor
@ -2268,6 +2280,9 @@ expand({string} [, {nosuf} [, {list}]]) *expand()*
is not defined, an empty string is used. Using "%:p" in a is not defined, an empty string is used. Using "%:p" in a
buffer with no name, results in the current directory, with a buffer with no name, results in the current directory, with a
'/' added. '/' added.
When 'verbose' is set then expanding '%', '#' and <> items
will result in an error message if the argument cannot be
expanded.
When {string} does not start with '%', '#' or '<', it is When {string} does not start with '%', '#' or '<', it is
expanded like a file name is expanded on the command line. expanded like a file name is expanded on the command line.
@ -2293,16 +2308,28 @@ expand({string} [, {nosuf} [, {list}]]) *expand()*
Can also be used as a |method|: > Can also be used as a |method|: >
Getpattern()->expand() Getpattern()->expand()
expandcmd({string}) *expandcmd()* expandcmd({string} [, {options}]) *expandcmd()*
Expand special items in String {string} like what is done for Expand special items in String {string} like what is done for
an Ex command such as `:edit`. This expands special keywords, an Ex command such as `:edit`. This expands special keywords,
like with |expand()|, and environment variables, anywhere in like with |expand()|, and environment variables, anywhere in
{string}. "~user" and "~/path" are only expanded at the {string}. "~user" and "~/path" are only expanded at the
start. start.
Returns the expanded string. Example: >
:echo expandcmd('make %<.o')
< Can also be used as a |method|: > The following items are supported in the {options} Dict
argument:
errmsg If set to TRUE, error messages are displayed
if an error is encountered during expansion.
By default, error messages are not displayed.
Returns the expanded string. If an error is encountered
during expansion, the unmodified {string} is returned.
Example: >
:echo expandcmd('make %<.o')
make /path/runtime/doc/builtin.o
:echo expandcmd('make %<.o', {'errmsg': v:true})
<
Can also be used as a |method|: >
GetCommand()->expandcmd() GetCommand()->expandcmd()
< <
extend({expr1}, {expr2} [, {expr3}]) *extend()* extend({expr1}, {expr2} [, {expr3}]) *extend()*
@ -2398,7 +2425,8 @@ feedkeys({string} [, {mode}]) *feedkeys()*
all typeahead will be consumed by the last call. all typeahead will be consumed by the last call.
'c' Remove any script context when executing, so that 'c' Remove any script context when executing, so that
legacy script syntax applies, "s:var" does not work, legacy script syntax applies, "s:var" does not work,
etc. etc. Note that if the keys being using set a script
context this still applies.
'!' When used with 'x' will not end Insert mode. Can be '!' When used with 'x' will not end Insert mode. Can be
used in a test when a timer is set to exit Insert mode used in a test when a timer is set to exit Insert mode
a little later. Useful for testing CursorHoldI. a little later. Useful for testing CursorHoldI.
@ -2728,7 +2756,7 @@ foreground() Move the Vim window to the foreground. Useful when sent from
On Win32 systems this might not work, the OS does not always On Win32 systems this might not work, the OS does not always
allow a window to bring itself to the foreground. Use allow a window to bring itself to the foreground. Use
|remote_foreground()| instead. |remote_foreground()| instead.
{only in the Win32, Athena, Motif and GTK GUI versions and the {only in the Win32, Motif and GTK GUI versions and the
Win32 console version} Win32 console version}
fullcommand({name}) *fullcommand()* fullcommand({name}) *fullcommand()*
@ -3184,6 +3212,13 @@ getcharstr([expr]) *getcharstr()*
Otherwise this works like |getchar()|, except that a number Otherwise this works like |getchar()|, except that a number
result is converted to a string. result is converted to a string.
getcmdcompltype() *getcmdcompltype()*
Return the type of the current command-line completion.
Only works when the command line is being edited, thus
requires use of |c_CTRL-\_e| or |c_CTRL-R_=|.
See |command-completion| for the return string.
Also see |getcmdtype()|, |setcmdpos()| and |getcmdline()|.
Returns an empty string when completion is not defined.
getcmdline() *getcmdline()* getcmdline() *getcmdline()*
Return the current command-line. Only works when the command Return the current command-line. Only works when the command
@ -3203,6 +3238,15 @@ getcmdpos() *getcmdpos()*
Returns 0 otherwise. Returns 0 otherwise.
Also see |getcmdtype()|, |setcmdpos()| and |getcmdline()|. Also see |getcmdtype()|, |setcmdpos()| and |getcmdline()|.
getcmdscreenpos() *getcmdscreenpos()*
Return the screen position of the cursor in the command line
as a byte count. The first column is 1.
Instead of |getcmdpos()|, it adds the prompt position.
Only works when editing the command line, thus requires use of
|c_CTRL-\_e| or |c_CTRL-R_=| or an expression mapping.
Returns 0 otherwise.
Also see |getcmdpos()|, |setcmdpos()|.
getcmdtype() *getcmdtype()* getcmdtype() *getcmdtype()*
Return the current command-line type. Possible return values Return the current command-line type. Possible return values
are: are:
@ -4651,6 +4695,24 @@ invert({expr}) *invert()*
< Can also be used as a |method|: > < Can also be used as a |method|: >
:let bits = bits->invert() :let bits = bits->invert()
isabsolutepath({directory}) *isabsolutepath()*
The result is a Number, which is |TRUE| when {path} is an
absolute path.
< On Unix, a path is considered absolute when it starts with '/'.
On MS-Windows, it is considered absolute when it starts with an
optional drive prefix and is followed by a '\' or '/'. UNC paths
are always absolute.
Example: >
echo isabsolutepath('/usr/share/') " 1
echo isabsolutepath('./foobar') " 0
echo isabsolutepath('C:\Windows') " 1
echo isabsolutepath('foobar') " 0
echo isabsolutepath('\\remote\file') " 1
Can also be used as a |method|: >
GetName()->isabsolutepath()
isdirectory({directory}) *isdirectory()* isdirectory({directory}) *isdirectory()*
The result is a Number, which is |TRUE| when a directory The result is a Number, which is |TRUE| when a directory
with the name {directory} exists. If {directory} doesn't with the name {directory} exists. If {directory} doesn't
@ -4820,6 +4882,8 @@ json_encode({expr}) *json_encode()*
Note that NaN and Infinity are passed on as values. This is Note that NaN and Infinity are passed on as values. This is
missing in the JSON standard, but several implementations do missing in the JSON standard, but several implementations do
allow it. If not then you will get an error. allow it. If not then you will get an error.
If a string contains an illegal character then the replacement
character 0xfffd is used.
Can also be used as a |method|: > Can also be used as a |method|: >
GetObject()->json_encode() GetObject()->json_encode()
@ -5214,7 +5278,8 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()*
When {dict} is omitted or zero: Return the rhs of mapping When {dict} is omitted or zero: Return the rhs of mapping
{name} in mode {mode}. The returned String has special {name} in mode {mode}. The returned String has special
characters translated like in the output of the ":map" command characters translated like in the output of the ":map" command
listing. listing. When {dict} is TRUE a dictionary is returned, see
below. To get a list of all mappings see |maplist()|.
When there is no mapping for {name}, an empty String is When there is no mapping for {name}, an empty String is
returned. When the mapping for {name} is empty, then "<Nop>" returned. When the mapping for {name} is empty, then "<Nop>"
@ -5241,7 +5306,7 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()*
When {dict} is there and it is |TRUE| return a dictionary When {dict} is there and it is |TRUE| return a dictionary
containing all the information of the mapping with the containing all the information of the mapping with the
following items: following items: *mapping-dict*
"lhs" The {lhs} of the mapping as it would be typed "lhs" The {lhs} of the mapping as it would be typed
"lhsraw" The {lhs} of the mapping as raw bytes "lhsraw" The {lhs} of the mapping as raw bytes
"lhsrawalt" The {lhs} of the mapping as raw bytes, alternate "lhsrawalt" The {lhs} of the mapping as raw bytes, alternate
@ -5265,6 +5330,7 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()*
"lnum" The line number in "sid", zero if unknown. "lnum" The line number in "sid", zero if unknown.
"nowait" Do not wait for other, longer mappings. "nowait" Do not wait for other, longer mappings.
(|:map-<nowait>|). (|:map-<nowait>|).
"abbr" True if this is an |abbreviation|.
The dictionary can be used to restore a mapping with The dictionary can be used to restore a mapping with
|mapset()|. |mapset()|.
@ -5315,6 +5381,18 @@ mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()*
GetKey()->mapcheck('n') GetKey()->mapcheck('n')
maplist([{abbr}]) *maplist()*
Returns a |List| of all mappings. Each List item is a |Dict|,
the same as what is returned by |maparg()|, see
|mapping-dict|. When {abbr} is there and it is |TRUE| use
abbreviations instead of mappings.
Example to show all mappings with 'MultiMatch' in rhs: >
vim9script
echo maplist()->filter(
(_, m) => match(m.rhs, 'MultiMatch') >= 0)
mapnew({expr1}, {expr2}) *mapnew()* mapnew({expr1}, {expr2}) *mapnew()*
Like |map()| but instead of replacing items in {expr1} a new Like |map()| but instead of replacing items in {expr1} a new
List or Dictionary is created and returned. {expr1} remains List or Dictionary is created and returned. {expr1} remains
@ -5323,9 +5401,18 @@ mapnew({expr1}, {expr2}) *mapnew()*
mapset({mode}, {abbr}, {dict}) *mapset()* mapset({mode}, {abbr}, {dict}) *mapset()*
Restore a mapping from a dictionary returned by |maparg()|. mapset({dict})
{mode} and {abbr} should be the same as for the call to Restore a mapping from a dictionary, possibly returned by
|maparg()|. *E460* |maparg()| or |maplist()|. A buffer mapping, when dict.buffer
is true, is set on the current buffer; it is up to the caller
to insure that the intended buffer is the current buffer. This
feature allows copying mappings from one buffer to another.
The dict.mode value may restore a single mapping that covers
more than one mode, like with mode values of '!', ' ', 'nox',
or 'v'. *E1276*
In the first form, {mode} and {abbr} should be the same as
for the call to |maparg()|. *E460*
{mode} is used to define the mode in which the mapping is set, {mode} is used to define the mode in which the mapping is set,
not the "mode" entry in {dict}. not the "mode" entry in {dict}.
Example for saving and restoring a mapping: > Example for saving and restoring a mapping: >
@ -5334,8 +5421,22 @@ mapset({mode}, {abbr}, {dict}) *mapset()*
... ...
call mapset('n', 0, save_map) call mapset('n', 0, save_map)
< Note that if you are going to replace a map in several modes, < Note that if you are going to replace a map in several modes,
e.g. with `:map!`, you need to save the mapping for all of e.g. with `:map!`, you need to save/restore the mapping for
them, since they can differ. all of them, when they might differ.
In the second form, with {dict} as the only argument, mode
and abbr are taken from the dict.
Example: >
vim9script
var save_maps = maplist()->filter(
(_, m) => m.lhs == 'K')
nnoremap K somethingelse
cnoremap K somethingelse2
# ...
unmap K
for d in save_maps
mapset(d)
endfor
match({expr}, {pat} [, {start} [, {count}]]) *match()* match({expr}, {pat} [, {start} [, {count}]]) *match()*
@ -5562,7 +5663,7 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
If {list} is a list of dictionaries, then the optional {dict} If {list} is a list of dictionaries, then the optional {dict}
argument supports the following additional items: argument supports the following additional items:
key key of the item which is fuzzy matched against key Key of the item which is fuzzy matched against
{str}. The value of this item should be a {str}. The value of this item should be a
string. string.
text_cb |Funcref| that will be called for every item text_cb |Funcref| that will be called for every item
@ -5570,6 +5671,8 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
This should accept a dictionary item as the This should accept a dictionary item as the
argument and return the text for that item to argument and return the text for that item to
use for fuzzy matching. use for fuzzy matching.
limit Maximum number of matches in {list} to be
returned. Zero means no limit.
{str} is treated as a literal string and regular expression {str} is treated as a literal string and regular expression
matching is NOT supported. The maximum supported {str} length matching is NOT supported. The maximum supported {str} length
@ -5582,6 +5685,9 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
empty list is returned. If length of {str} is greater than empty list is returned. If length of {str} is greater than
256, then returns an empty list. 256, then returns an empty list.
When {limit} is given, matchfuzzy() will find up to this
number of matches in {list} and return them in sorted order.
Refer to |fuzzy-matching| for more information about fuzzy Refer to |fuzzy-matching| for more information about fuzzy
matching strings. matching strings.
@ -6010,8 +6116,10 @@ printf({fmt}, {expr1} ...) *printf()*
When used as a |method| the base is passed as the second When used as a |method| the base is passed as the second
argument: > argument: >
Compute()->printf("result: %d") Compute()->printf("result: %d")
<
You can use `call()` to pass the items as a list.
< Often used items are: Often used items are:
%s string %s string
%6S string right-aligned in 6 display cells %6S string right-aligned in 6 display cells
%6s string right-aligned in 6 bytes %6s string right-aligned in 6 bytes
@ -6680,7 +6788,7 @@ remote_foreground({server}) *remote_foreground()*
Can also be used as a |method|: > Can also be used as a |method|: >
ServerName()->remote_foreground() ServerName()->remote_foreground()
< {only in the Win32, Athena, Motif and GTK GUI versions and the < {only in the Win32, Motif and GTK GUI versions and the
Win32 console version} Win32 console version}
@ -10012,7 +10120,7 @@ footer Compiled with GUI footer support. |gui-footer|
fork Compiled to use fork()/exec() instead of system(). fork Compiled to use fork()/exec() instead of system().
gettext Compiled with message translation |multi-lang| gettext Compiled with message translation |multi-lang|
gui Compiled with GUI enabled. gui Compiled with GUI enabled.
gui_athena Compiled with Athena GUI. gui_athena Compiled with Athena GUI (always false).
gui_gnome Compiled with Gnome support (gui_gtk is also defined). gui_gnome Compiled with Gnome support (gui_gtk is also defined).
gui_gtk Compiled with GTK+ GUI (any version). gui_gtk Compiled with GTK+ GUI (any version).
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined). gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).

View File

@ -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.
@ -1176,14 +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.)
With 'p' the previously selected text is put in the unnamed register. This is With |p| the previously selected text is put in the unnamed register (and
useful if you want to put that text somewhere else. But you cannot repeat the possibly the selection and/or clipboard). This is useful if you want to put
same change. that text somewhere else. But you cannot repeat the same change.
With 'P' the unnamed register is not changed, you can repeat the same change. With |P| the unnamed register is not changed (and neither the selection or
But the deleted text cannot be used. If you do need it you can use 'p' with clipboard), you can repeat the same change. But the deleted text cannot be
another register. E.g., yank the text to copy, Visually select the text to used. If you do need it you can use |p| with another register. E.g., yank
replace and use "0p . You can repeat this as many times as you like, and the the text to copy, Visually select the text to replace and use "0p . You can
unnamed register will be changed each time. 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
@ -1671,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
@ -1682,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
@ -1744,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: 2022 Mar 26 *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')`
@ -119,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*
@ -421,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'})
@ -525,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.
@ -579,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"
@ -625,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
@ -641,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|.
@ -691,6 +699,16 @@ ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()*
{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|. 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)
@ -1378,7 +1396,7 @@ The same in |Vim9| script: >
startinsert startinsert
============================================================================== ==============================================================================
14. Language Server Protocol *language-server-protocol* 15. Language Server Protocol *language-server-protocol*
The language server protocol specification is available at: The language server protocol specification is available at:
@ -1389,11 +1407,19 @@ payload encoded in JSON-RPC format. This is described in:
https://www.jsonrpc.org/specification https://www.jsonrpc.org/specification
For messages received on a channel with mode set to "lsp", Vim will process To encode and send a LSP request/notification message in a Vim |Dict| into a
the HTTP header and decode the payload into a Vim |Dict| type and call the LSP JSON-RPC message and to receive and decode a LSP JSON-RPC
channel callback or the specified callback function. When sending messages on response/notification message into a Vim |Dict|, connect to the LSP server
a channel using |ch_evalexpr()| or |ch_sendexpr()|, Vim will add the HTTP with the |channel-mode| set to "lsp".
header and encode the Vim expression into JSON-RPC.
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()| To open a channel using the 'lsp' mode, set the 'mode' item in the |ch_open()|
{options} argument to 'lsp'. Example: > {options} argument to 'lsp'. Example: >
@ -1403,37 +1429,79 @@ To open a channel using the 'lsp' mode, set the 'mode' item in the |ch_open()|
To open a channel using the 'lsp' mode with a job, set the 'in_mode' and 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: > 'out_mode' items in the |job_start()| {options} argument to 'lsp'. Example: >
let job = job_start(...., #{in_mode: 'lsp', out_mode: 'lsp'}) 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)
To synchronously send a JSON-RPC request to the server, use the |ch_evalexpr()| Note that if a job outputs LSP messages on stdout and non-LSP messages on
function. This function will return the response from the server. You can use 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 the 'timeout' field in the {options} argument to control the response wait
time. Example: > time. If the request times out, then an empty |Dict| is returned. Example: >
let req = {} let req = {}
let req.method = 'textDocument/definition' let req.method = 'textDocument/definition'
let req.params = {} let req.params = {}
let req.params.textDocument = #{uri: 'a.c'} let req.params.textDocument = #{uri: 'a.c'}
let req.params.position = #{line: 10, character: 3} let req.params.position = #{line: 10, character: 3}
let resp = ch_evalexpr(ch, req, #{timeout: 100}) 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 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 is specified, then Vim will overwrite the value with an internally generated
identifier. Vim currently supports only a number type for the 'id' field. 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 To send a JSON-RPC request to the server and asynchronously process the
response, use the |ch_sendexpr()| function and supply a callback function. response, use the |ch_sendexpr()| function and supply a callback function. If
Example: > 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 = {}
let req.method = 'textDocument/hover' let req.method = 'textDocument/hover'
let req.id = 200
let req.params = {} let req.params = {}
let req.params.textDocument = #{uri: 'a.c'} let req.params.textDocument = #{uri: 'a.c'}
let req.params.position = #{line: 10, character: 3} let req.params.position = #{line: 10, character: 3}
let resp = ch_sendexpr(ch, req, #{callback: 'MyFn'}) 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()| To send a JSON-RPC notification message to the server, use the |ch_sendexpr()|
function. Example: > 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'}) call ch_sendexpr(ch, #{method: 'initialized'})
@ -1449,4 +1517,68 @@ from the server request message. Example: >
The JSON-RPC notification messages from the server are delivered through the The JSON-RPC notification messages from the server are delivered through the
|channel-callback| function. |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 Feb 04 *cmdline.txt* For Vim version 8.2. Last change: 2022 Apr 09
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
@ -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

@ -1,4 +1,4 @@
*editing.txt* For Vim version 8.2. Last change: 2022 Feb 16 *editing.txt* For Vim version 8.2. Last change: 2022 Apr 16
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -445,7 +445,8 @@ 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
what you intended: >
:e `='$HOME' .. '/.vimrc'` :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
@ -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
@ -1694,7 +1695,7 @@ 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')` to check if sub-second time stamp checks are second. Use `has('nanotime')` to check if sub-second time stamp checks are
available. available.

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.2. Last change: 2022 Mar 05 *eval.txt* For Vim version 8.2. Last change: 2022 Apr 17
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -181,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* *E1086* *E1192* *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
@ -261,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 = []
@ -514,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'}
@ -1523,6 +1523,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
@ -3224,14 +3243,30 @@ declarations and assignments do not use a command. |vim9-declaration|
*:let=<<* *:let-heredoc* *:let=<<* *:let-heredoc*
*E990* *E991* *E172* *E221* *E1145* *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|. If "eval" is specified,
then any Vim expression in the form ``={expr}`` is
evaluated and the result replaces the expression.
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.
once the "`=" has been found {expr} and a backtick
must follow. {expr} cannot be empty.
{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}
@ -3281,6 +3316,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
@ -4698,7 +4740,7 @@ parentheses can be cut out from |v:exception| with the ":substitute" command.
: :
: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', "")

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,19 +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|
*.cfg g:filetype_cfg
*.csh g:filetype_csh |ft-csh-syntax|
*.dat g:filetype_dat
*.frm g:filetype_frm |ft-form-syntax| *.frm g:filetype_frm |ft-form-syntax|
*.fs g:filetype_fs |ft-forth-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

@ -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
@ -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: 2022 Mar 02 *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
@ -236,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.
@ -261,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.
@ -406,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.
@ -742,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
@ -858,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,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 @@
*indent.txt* For Vim version 8.2. Last change: 2022 Jan 31 *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 >
{ { { {

View File

@ -939,7 +939,7 @@ tag command note action in Visual mode ~
|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 |v_P| P replace highlighted area with register
contents; unnamed register is unchanged 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

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 8.2. Last change: 2022 Mar 28 *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
@ -1196,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

View File

@ -1,4 +1,4 @@
*intro.txt* For Vim version 8.2. Last change: 2022 Mar 03 *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

View File

@ -1,4 +1,4 @@
*map.txt* For Vim version 8.2. Last change: 2022 Mar 03 *map.txt* For Vim version 8.2. Last change: 2022 Apr 14
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -697,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:
@ -1320,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

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 @@
*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.
@ -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 Mar 29 *options.txt* For Vim version 8.2. Last change: 2022 Apr 13
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.
@ -1019,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
@ -1043,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
@ -1065,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
@ -1138,7 +1138,7 @@ 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
@ -1265,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.
@ -1290,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).
@ -1390,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.
@ -1416,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
@ -1661,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.: >
@ -1768,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
@ -1802,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.
@ -1943,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
@ -2012,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
@ -2628,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|.
@ -2908,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
@ -3112,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'*
@ -3372,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
@ -3562,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.
@ -3780,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:
@ -3899,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}
@ -3980,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'*
@ -4092,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
@ -4111,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.
@ -4140,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"
@ -4152,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 --")
@ -4395,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
@ -4416,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'*
@ -4807,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
@ -5008,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'*
@ -5032,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
@ -5517,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,
@ -5525,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,..
@ -6666,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
@ -7285,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
@ -7307,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
@ -7352,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
@ -7657,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
< <
@ -7703,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.
@ -8045,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'*
@ -8336,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.
@ -8351,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
@ -8670,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
@ -8700,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
@ -8823,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.
@ -9039,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.

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

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 @@
*quickref.txt* For Vim version 8.2. Last change: 2021 Dec 21 *quickref.txt* For Vim version 8.2. Last change: 2022 Apr 06
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

View File

@ -1,4 +1,4 @@
*repeat.txt* For Vim version 8.2. Last change: 2022 Mar 30 *repeat.txt* For Vim version 8.2. Last change: 2022 Apr 08
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1043,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}.
@ -1071,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 Apr 03
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

@ -1,4 +1,4 @@
*starting.txt* For Vim version 8.2. Last change: 2022 Feb 01 *starting.txt* For Vim version 8.2. Last change: 2022 Apr 12
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -344,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|
@ -564,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.

View File

@ -1,4 +1,4 @@
*syntax.txt* For Vim version 8.2. Last change: 2022 Mar 02 *syntax.txt* For Vim version 8.2. Last change: 2022 Apr 24
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -215,7 +215,7 @@ 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. The maxium length of a group name is an error when using other characters. The maximum length of a group name is
about 200 bytes. *E1249* 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
@ -2197,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
@ -4898,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
@ -4961,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
@ -5145,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.
@ -5318,6 +5327,8 @@ 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').
*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'.
@ -5382,7 +5393,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.
@ -5396,7 +5407,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.

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'*
@ -1453,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*
@ -1999,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>*
@ -2078,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*
@ -2546,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*
@ -3616,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>*
@ -3716,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>*
@ -3771,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*
@ -4052,7 +4061,6 @@ E1081 eval.txt /*E1081*
E1083 editing.txt /*E1083* E1083 editing.txt /*E1083*
E1084 eval.txt /*E1084* E1084 eval.txt /*E1084*
E1085 eval.txt /*E1085* E1085 eval.txt /*E1085*
E1086 eval.txt /*E1086*
E1087 vim9.txt /*E1087* E1087 vim9.txt /*E1087*
E1089 eval.txt /*E1089* E1089 eval.txt /*E1089*
E109 eval.txt /*E109* E109 eval.txt /*E109*
@ -4217,7 +4225,6 @@ E1231 map.txt /*E1231*
E1232 builtin.txt /*E1232* E1232 builtin.txt /*E1232*
E1233 builtin.txt /*E1233* E1233 builtin.txt /*E1233*
E1234 vim9.txt /*E1234* E1234 vim9.txt /*E1234*
E1235 vim9.txt /*E1235*
E1236 vim9.txt /*E1236* E1236 vim9.txt /*E1236*
E1237 map.txt /*E1237* E1237 map.txt /*E1237*
E1238 vim9.txt /*E1238* E1238 vim9.txt /*E1238*
@ -4255,6 +4262,7 @@ E1266 if_pyth.txt /*E1266*
E127 eval.txt /*E127* E127 eval.txt /*E127*
E1270 change.txt /*E1270* E1270 change.txt /*E1270*
E1271 vim9.txt /*E1271* 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*
@ -4775,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*
@ -5513,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*
@ -5752,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*
@ -5767,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*
@ -6065,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*
@ -6076,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*
@ -6925,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*
@ -7601,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*
@ -8164,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*
@ -8178,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*
@ -8257,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*

View File

@ -1,4 +1,4 @@
*term.txt* For Vim version 8.2. Last change: 2022 Mar 04 *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|
@ -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:

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
@ -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 Feb 10 *testing.txt* For Vim version 8.2. Last change: 2022 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -131,8 +131,8 @@ test_gui_event({event}, {args})
forward: set to 1 for forward search. forward: set to 1 for forward search.
"mouse": "mouse":
Inject a mouse button click event. The supported items in Inject either a mouse button click, or a mouse move, event.
{args} are: The supported items in {args} are:
button: mouse button. The supported values are: button: mouse button. The supported values are:
0 right mouse button 0 right mouse button
1 middle mouse button 1 middle mouse button
@ -151,6 +151,12 @@ test_gui_event({event}, {args})
4 shift is pressed 4 shift is pressed
8 alt is pressed 8 alt is pressed
16 ctrl 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": "scrollbar":
Set or drag the left, right or horizontal scrollbar. Only Set or drag the left, right or horizontal scrollbar. Only

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2022 Mar 30 *todo.txt* For Vim version 8.2. Last change: 2022 Apr 27
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -38,15 +38,10 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs* *known-bugs*
-------------------- Known bugs and current work ----------------------- -------------------- Known bugs and current work -----------------------
Allow for: "import autoload '../lib/script.vim'"
avoids going through 'runtimepath' and avoids name collisions.
Really drop the Athena and NeXtaw GUI? Decide end of March.
Once Vim9 is stable: Once Vim9 is stable:
- Use Vim9 for more runtime files. - Use Vim9 for more runtime files.
- Check code coverage, add more tests if needed. - Check code coverage, add more tests if needed.
vim9execute.c line 1900 vim9execute.c line 3500
vim9expr.c vim9expr.c
vim9instr.c vim9instr.c
vim9script.c vim9script.c
@ -55,6 +50,7 @@ Once Vim9 is stable:
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
@ -90,6 +86,8 @@ Update list of features to vote on:
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
@ -155,7 +153,6 @@ Terminal debugger:
- 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)
- 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.
@ -200,20 +197,22 @@ 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. Add autocmd functions. PR #10291
Need to handle extra bytes.
In Select mode the deleted text always goes into the unnamed register. Can deref_func_name() and deref_function_name() be merged?
Use CTRL-R to specify the register to use. (#9531)
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 Improvement in terminal configuration mess: Request the terminfo entry from
the terminal itself. The $TERM value then is only relevant for whether this 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 feature is supported or not. Replaces the xterm mechanism to request each
@ -227,10 +226,10 @@ Fails in line 64 of Ch_communicate, no exception is thrown.
Patch for Template string: #4634 Patch for Template string: #4634
Have another look at the implementation. 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
@ -251,12 +250,21 @@ Memory leaks in test_channel? (or is it because of fork())
PR to support %e and %k in 'errorformat'. #9624 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
@ -292,9 +300,6 @@ 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
@ -309,8 +314,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
@ -324,9 +328,6 @@ 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
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
to return from vgetc() to make this happen. #7011 to return from vgetc() to make this happen. #7011
@ -337,13 +338,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?
@ -375,15 +369,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.
@ -415,27 +400,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)
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?
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.
@ -473,8 +442,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.
: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)
@ -496,18 +463,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
@ -562,9 +521,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,
@ -765,9 +721,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)
@ -786,8 +739,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.
@ -870,10 +821,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
@ -924,15 +871,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)
@ -1065,9 +1007,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.
@ -1127,9 +1066,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
@ -1249,8 +1185,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.
@ -1347,10 +1281,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.
@ -1363,9 +1293,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?
@ -1653,9 +1580,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
@ -1719,12 +1643,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)
@ -1749,9 +1667,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.
@ -1801,10 +1716,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)
@ -1869,10 +1780,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)
@ -1923,10 +1830,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)
@ -1949,9 +1852,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.
@ -2056,9 +1956,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
@ -2151,9 +2048,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)
@ -2197,9 +2091,6 @@ 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)
@ -2310,10 +2201,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 +2219,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 +2236,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 +2267,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
@ -2528,22 +2397,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)
@ -2607,9 +2466,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)
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
@ -2688,9 +2544,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)
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.
@ -3041,6 +2894,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
@ -3239,7 +3095,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.
@ -3251,7 +3107,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.
@ -3269,27 +3125,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()?
@ -3604,10 +3439,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
@ -3657,9 +3488,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!):
@ -3768,7 +3596,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().
@ -4818,6 +4646,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:
@ -5489,6 +5325,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:
@ -5530,6 +5379,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:
@ -5560,6 +5439,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:
@ -5590,6 +5481,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:
@ -5616,6 +5522,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:
@ -5659,7 +5580,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
@ -5834,6 +5755,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:
@ -5841,6 +5779,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 @@
*usr_41.txt* For Vim version 8.2. Last change: 2022 Feb 11 *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
@ -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

View File

@ -1,4 +1,4 @@
*various.txt* For Vim version 8.2. Last change: 2022 Mar 04 *various.txt* For Vim version 8.2. Last change: 2022 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -381,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|

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

@ -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 @@
*vim9.txt* For Vim version 8.2. Last change: 2022 Mar 28 *vim9.txt* For Vim version 8.2. Last change: 2022 Apr 14
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -185,7 +185,7 @@ For now you will need to pass the dictionary explicitly: >
echo d[arg] echo d[arg]
enddef enddef
var ad = {item: 'value', func: DictFunc} var ad = {item: 'value', func: DictFunc}
ad.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
@ -378,7 +378,7 @@ And with autocommands: >
Although using a :def function probably works better. Although using a :def function probably works better.
*E1022* *E1103* *E1130* *E1131* *E1133* *E1022* *E1103* *E1130* *E1131* *E1133*
*E1134* *E1235* *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
@ -1720,7 +1720,15 @@ line, there can be no line break: >
name # Error! name # Error!
echo that echo that
.name # Error! .name # Error!
< *:import-cycle*
To refer to a function in an imported script in a mapping, |<SID>| can be
used: >
noremap <silent> ,a :call <SID>name.Function()<CR>
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 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. 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 At this point items in A after "import B" will not have been processed and
@ -1745,7 +1753,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
@ -1765,6 +1774,14 @@ actually needed. Using the autoload mechanism is recommended:
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.

View File

@ -265,7 +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 unnamed register overwrite |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 Feb 03 *windows.txt* For Vim version 8.2. Last change: 2022 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -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)

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 Feb 13 " 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")
@ -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()
@ -360,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
@ -397,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
@ -420,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")
@ -441,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
@ -709,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
@ -811,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
@ -948,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
@ -972,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
@ -1005,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")
@ -1135,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
@ -1274,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
@ -1341,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
@ -1570,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
@ -1629,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
@ -1661,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
@ -1732,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
@ -2038,6 +2070,9 @@ 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
@ -2091,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

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

@ -0,0 +1,11 @@
" Elixir filetype plugin
" Language: Elixir
" Maintainer: Mitchell Hanberg <vimNOSPAM@mitchellhanberg.com>
" Last Change: 2022 Apr 20
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
setlocal commentstring=#\ %s

View File

@ -1,7 +1,7 @@
" Elm filetype plugin file " Elm filetype plugin file
" Language: Elm " Language: Elm
" Maintainer: Andreas Scharf <as@99n.de> " Maintainer: Andreas Scharf <as@99n.de>
" Latest Revision: 2020-05-29 " Latest Revision: 2022-04-25
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
finish finish
@ -14,5 +14,7 @@ set cpo&vim
setlocal comments=s1fl:{-,mb:\ ,ex:-},:-- setlocal comments=s1fl:{-,mb:\ ,ex:-},:--
setlocal commentstring=--\ %s setlocal commentstring=--\ %s
let b:undo_ftplugin = "setl com< cms<"
let &cpo = s:cpo_save let &cpo = s:cpo_save
unlet s:cpo_save unlet s:cpo_save

View File

@ -0,0 +1,18 @@
" Vim filetype plugin file
" Language: Fennel
" Maintainer: Gregory Anders <greg[NOSPAM]@gpanders.com>
" Last Update: 2022 Apr 20
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal commentstring=;%s
setlocal comments=:;;,:;
setlocal formatoptions-=t
setlocal suffixesadd=.fnl
setlocal lisp
setlocal lispwords=accumulate,collect,do,doto,each,eval-compiler,fn,for,icollect,lambda,let,macro,macros,match,match-try,when,while,with-open
let b:undo_ftplugin = 'setlocal commentstring< comments< formatoptions< suffixesadd< lisp< lispwords<'

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: Microsoft Macro Assembler (80x86) " Language: Microsoft Macro Assembler (80x86)
" Maintainer: Wu Yongwei <wuyongwei@gmail.com> " Maintainer: Wu Yongwei <wuyongwei@gmail.com>
" Last Change: 2020-05-09 23:02:05 +0800 " Last Change: 2022-04-24 21:24:52 +0800
if exists("b:did_ftplugin") if exists("b:did_ftplugin")
finish finish
@ -15,5 +15,18 @@ let b:undo_ftplugin = "setl iskeyword<"
setlocal iskeyword=@,48-57,_,36,60,62,63,@-@ setlocal iskeyword=@,48-57,_,36,60,62,63,@-@
" Matchit support
if !exists('b:match_words')
let b:match_words = '^\s*\.IF\>:^\s*\.ELSEIF\>:^\s*\.ELSE\>:^\s*\.ENDIF\>,'
\ .. '^\s*\.REPEAT\>:^\s*\.UNTIL\(CXZ\)\?\>,'
\ .. '^\s*\.WHILE\>:^\s*\.ENDW\>,'
\ .. '^\s*IF\(1\|2\|E\|DEF\|NDEF\|B\|NB\|IDNI\?\|DIFI\?\)\?\>:^\s*ELSEIF\(1\|2\|E\|DEF\|NDEF\|B\|NB\|IDNI\?\|DIFI\?\)\?\>:^\s*ELSE\>:^\s*ENDIF\>,'
\ .. '\(\<MACRO\>\|^\s*%\?\s*FORC\?\>\|^\s*REPEAT\>\|^\s*WHILE\):^\s*ENDM\>,'
\ .. '\<PROC\>:\<ENDP\>,'
\ .. '\<SEGMENT\>:\<ENDS\>'
let b:match_ignorecase = 1
let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
endif
let &cpo = s:cpo_save let &cpo = s:cpo_save
unlet s:cpo_save unlet s:cpo_save

View File

@ -1,7 +1,7 @@
" Vim ftplugin file " Vim ftplugin file
" Language: Reva Forth " Language: Reva Forth
" Version: 7.1 " Version: 7.1
" Last Change: 2008/01/11 " Last Change: 2022 Apr 27
" Maintainer: Ron Aaron <ron@ronware.org> " Maintainer: Ron Aaron <ron@ronware.org>
" URL: http://ronware.org/reva/ " URL: http://ronware.org/reva/
" Filetypes: *.rf *.frt " Filetypes: *.rf *.frt
@ -23,3 +23,5 @@ setlocal com=s1:/*,mb:*,ex:*/,:\|,:\\
setlocal fo=tcrqol setlocal fo=tcrqol
setlocal matchpairs+=\::; setlocal matchpairs+=\::;
setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
let b:undo_ftplugin = "setlocal sts< sw< com< fo< mps< isk<"

View File

@ -1,18 +1,18 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: xslt " Language: XSLT
" " Maintainer: Doug Kearns <dougkearns@gmail.com>
" This runtime file is looking for a new maintainer. " Previous Maintainer: Dan Sharp
" " Last Change: 2022 Apr 25
" Former maintainer: Dan Sharp
" Last Changed: 20 Jan 2009
if exists("b:did_ftplugin") | finish | endif if exists("b:did_ftplugin")
finish
endif
runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
let b:did_ftplugin = 1 let b:did_ftplugin = 1
" Change the :browse e filter to primarily show xsd-related files. " Change the :browse e filter to primarily show xsd-related files.
if has("gui_win32") && exists("b:browsefilter") if (has("gui_win32") || has("gui_gtk")) && exists("b:browsefilter")
let b:browsefilter="XSLT Files (*.xsl,*.xslt)\t*.xsl;*.xslt\n" . b:browsefilter let b:browsefilter = "XSLT Files (*.xsl,*.xslt)\t*.xsl;*.xslt\n" . b:browsefilter
endif endif

21
runtime/import/dist/vimhelp.vim vendored Normal file
View File

@ -0,0 +1,21 @@
vim9script
# Extra functionality for displaying Vim help .
# Called when editing the doc/syntax.txt file
export def HighlightGroups()
var buf: number = bufnr('%')
var lnum: number = search('\*highlight-groups\*', 'cn')
while getline(lnum) !~ '===' && lnum < line('$')
var word: string = getline(lnum)->matchstr('^\w\+\ze\t')
if word->hlexists()
prop_type_add('help-hl-' .. word, {
bufnr: buf,
highlight: word,
combine: false,
})
prop_add(lnum, 1, {length: word->strlen(), type: 'help-hl-' .. word})
endif
++lnum
endwhile
enddef

View File

@ -31,7 +31,7 @@ Always use ":setlocal" to set 'indentexpr'. This avoids it being carried over
to other buffers. to other buffers.
To trigger the indenting after typing a word like "endif", add the word to the To trigger the indenting after typing a word like "endif", add the word to the
'cinkeys' option with "+=". 'indentkeys' option with "+=".
You normally set 'indentexpr' to evaluate a function and then define that You normally set 'indentexpr' to evaluate a function and then define that
function. That function only needs to be defined once for as long as Vim is function. That function only needs to be defined once for as long as Vim is

View File

@ -16,6 +16,7 @@
" 15.10.2006 MK Bram's suggestion for runtime integration " 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested to save on spaces " 05.11.2006 MK Bram suggested to save on spaces
" 19.09.2007 NO g: missing before ada#Comment " 19.09.2007 NO g: missing before ada#Comment
" 2022 April: b:undo_indent added by Doug Kearns
" Help Page: ft-vim-indent " Help Page: ft-vim-indent
"------------------------------------------------------------------------------ "------------------------------------------------------------------------------
" ToDo: " ToDo:
@ -35,6 +36,8 @@ setlocal indentexpr=GetAdaIndent()
setlocal indentkeys-=0{,0} setlocal indentkeys-=0{,0}
setlocal indentkeys+=0=~then,0=~end,0=~elsif,0=~when,0=~exception,0=~begin,0=~is,0=~record setlocal indentkeys+=0=~then,0=~end,0=~elsif,0=~when,0=~exception,0=~begin,0=~is,0=~record
let b:undo_indent = "setl inde< indk<"
" Only define the functions once. " Only define the functions once.
if exists("*GetAdaIndent") if exists("*GetAdaIndent")
finish finish

View File

@ -24,6 +24,7 @@
" 29-04-2002 Fixed problems in function headers and max line width " 29-04-2002 Fixed problems in function headers and max line width
" Added support for two-line if's without curly braces " Added support for two-line if's without curly braces
" Fixed hang: 2011 Aug 31 " Fixed hang: 2011 Aug 31
" 2022 April: b:undo_indent added by Doug Kearns
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -36,6 +37,8 @@ setlocal indentexpr=GetAwkIndent()
" Mmm, copied from the tcl indent program. Is this okay? " Mmm, copied from the tcl indent program. Is this okay?
setlocal indentkeys-=:,0# setlocal indentkeys-=:,0#
let b:undo_indent = "setl inde< indk<"
" Only define the function once. " Only define the function once.
if exists("*GetAwkIndent") if exists("*GetAwkIndent")
finish finish

View File

@ -1,7 +1,7 @@
" Description: Comshare Dimension Definition Language (CDL) " Description: Comshare Dimension Definition Language (CDL)
" Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net> (Invalid email address) " Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net> (Invalid email address)
" Doug Kearns <dougkearns@gmail.com> " Doug Kearns <dougkearns@gmail.com>
" Last Change: Fri Nov 30 13:35:48 2001 CST " Last Change: 2022 Apr 06
if exists("b:did_indent") if exists("b:did_indent")
"finish "finish
@ -12,6 +12,8 @@ setlocal indentexpr=CdlGetIndent(v:lnum)
setlocal indentkeys& setlocal indentkeys&
setlocal indentkeys+==~else,=~endif,=~then,;,),= setlocal indentkeys+==~else,=~endif,=~then,;,),=
let b:undo_indent = "setl inde< indk<"
" Only define the function once. " Only define the function once.
if exists("*CdlGetIndent") if exists("*CdlGetIndent")
"finish "finish

View File

@ -1,6 +1,7 @@
" Vim indent file " Vim indent file
" Language: ChaiScript " Language: ChaiScript
" Maintainer: Jason Turner <lefticus 'at' gmail com> " Maintainer: Jason Turner <lefticus 'at' gmail com>
" Last Change: 2022 Apr 06
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -11,6 +12,8 @@ let b:did_indent = 1
setlocal indentexpr=GetChaiScriptIndent() setlocal indentexpr=GetChaiScriptIndent()
setlocal autoindent setlocal autoindent
let b:undo_indent = "setl ai< inde<"
" Only define the function once. " Only define the function once.
if exists("*GetChaiScriptIndent") if exists("*GetChaiScriptIndent")
finish finish

View File

@ -3,7 +3,7 @@
" Author: Andy Cedilnik <andy.cedilnik@kitware.com> " Author: Andy Cedilnik <andy.cedilnik@kitware.com>
" Maintainer: Dimitri Merejkowsky <d.merej@gmail.com> " Maintainer: Dimitri Merejkowsky <d.merej@gmail.com>
" Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com> " Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
" Last Change: 2017 Sep 24 " Last Change: 2022 Apr 06
" "
" Licence: The CMake license applies to this file. See " Licence: The CMake license applies to this file. See
" https://cmake.org/licensing " https://cmake.org/licensing
@ -17,6 +17,8 @@ let b:did_indent = 1
setlocal indentexpr=CMakeGetIndent(v:lnum) setlocal indentexpr=CMakeGetIndent(v:lnum)
setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE( setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
let b:undo_indent = "setl inde< indk<"
" Only define the function once. " Only define the function once.
if exists("*CMakeGetIndent") if exists("*CMakeGetIndent")
finish finish

View File

@ -2,7 +2,7 @@
" Language: D " Language: D
" Maintainer: Jason Mills <jmills@cs.mun.ca> (Invalid email address) " Maintainer: Jason Mills <jmills@cs.mun.ca> (Invalid email address)
" Doug Kearns <dougkearns@gmail.com> " Doug Kearns <dougkearns@gmail.com>
" Last Change: 2005 Nov 22 " Last Change: 2022 Apr 06
" Version: 0.1 " Version: 0.1
" "
" Please email me with bugs, comments, and suggestion. Put vim in the subject " Please email me with bugs, comments, and suggestion. Put vim in the subject
@ -19,4 +19,6 @@ let b:did_indent = 1
" D indenting is a lot like the built-in C indenting. " D indenting is a lot like the built-in C indenting.
setlocal cindent setlocal cindent
let b:undo_indent = "setl cin<"
" vim: ts=8 noet " vim: ts=8 noet

View File

@ -1,7 +1,7 @@
" Vim indent file " Vim indent file
" Language: dict(1) configuration file " Language: dict(1) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-12-20 " Last Change: 2022 Apr 06
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@ -11,3 +11,5 @@ let b:did_indent = 1
setlocal indentkeys=0{,0},!^F,o,O cinwords= autoindent smartindent setlocal indentkeys=0{,0},!^F,o,O cinwords= autoindent smartindent
setlocal nosmartindent setlocal nosmartindent
inoremap <buffer> # X# inoremap <buffer> # X#
let b:undo_indent = "setl ai< cinw< indk< si< | silent! iunmap <buffer> #"

View File

@ -11,3 +11,5 @@ let b:did_indent = 1
setlocal indentkeys=0{,0},!^F,o,O cinwords= autoindent smartindent setlocal indentkeys=0{,0},!^F,o,O cinwords= autoindent smartindent
setlocal nosmartindent setlocal nosmartindent
inoremap <buffer> # X# inoremap <buffer> # X#
let b:undo_indent = "setl ai< cinw< indk< si< | silent! iunmap <buffer> #"

View File

@ -3,7 +3,7 @@
" Maintainer: Brent A. Fulgham <bfulgham@debian.org> (Invalid email address) " Maintainer: Brent A. Fulgham <bfulgham@debian.org> (Invalid email address)
" Doug Kearns <dougkearns@gmail.com> " Doug Kearns <dougkearns@gmail.com>
" Version: 0.01 " Version: 0.01
" Last Change: 2017 Jun 13 " Last Change: 2022 Apr 06
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -15,6 +15,9 @@ setlocal indentkeys+==~begin,=~block,=~case,=~cleanup,=~define,=~end,=~else,=~el
" Define the appropriate indent function but only once " Define the appropriate indent function but only once
setlocal indentexpr=DylanGetIndent() setlocal indentexpr=DylanGetIndent()
let b:undo_indent = "setl inde< indk<"
if exists("*DylanGetIndent") if exists("*DylanGetIndent")
finish finish
endif endif

View File

@ -3,6 +3,7 @@
" Maintainer: Steven Oliver <oliver.steven@gmail.com> " Maintainer: Steven Oliver <oliver.steven@gmail.com>
" Website: https://steveno@github.com/steveno/falconpl-vim.git " Website: https://steveno@github.com/steveno/falconpl-vim.git
" Credits: This is, to a great extent, a copy n' paste of ruby.vim. " Credits: This is, to a great extent, a copy n' paste of ruby.vim.
" 2022 April: b:undo_indent added by Doug Kearns
" 1. Setup {{{1 " 1. Setup {{{1
" ============ " ============
@ -20,6 +21,8 @@ setlocal indentexpr=FalconGetIndent(v:lnum)
setlocal indentkeys=0{,0},0),0],!^F,o,O,e setlocal indentkeys=0{,0},0),0],!^F,o,O,e
setlocal indentkeys+==~case,=~catch,=~default,=~elif,=~else,=~end,=~\" setlocal indentkeys+==~case,=~catch,=~default,=~elif,=~else,=~end,=~\"
let b:undo_indent = "setl inde< indk< si<"
" Define the appropriate indent function but only once " Define the appropriate indent function but only once
if exists("*FalconGetIndent") if exists("*FalconGetIndent")
finish finish

12
runtime/indent/fennel.vim Normal file
View File

@ -0,0 +1,12 @@
" Vim indent file
" Language: Fennel
" Maintainer: Gregory Anders <greg[NOSPAM]@gpanders.com>
" Last Change: 2022 Apr 20
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
" Use the Lisp indenting
runtime! indent/lisp.vim

View File

@ -4,7 +4,7 @@
" (https://raw.githubusercontent.com/sitaramc/gitolite/master/contrib/vim/indent/gitolite.vim) " (https://raw.githubusercontent.com/sitaramc/gitolite/master/contrib/vim/indent/gitolite.vim)
" Maintainer: Sitaram Chamarty <sitaramc@gmail.com> " Maintainer: Sitaram Chamarty <sitaramc@gmail.com>
" (former Maintainer: Teemu Matilainen <teemu.matilainen@iki.fi>) " (former Maintainer: Teemu Matilainen <teemu.matilainen@iki.fi>)
" Last Change: 2017 Oct 05 " Last Change: 2022 Apr 06
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@ -15,6 +15,8 @@ setlocal autoindent
setlocal indentexpr=GetGitoliteIndent() setlocal indentexpr=GetGitoliteIndent()
setlocal indentkeys=o,O,*<Return>,!^F,=repo,\",= setlocal indentkeys=o,O,*<Return>,!^F,=repo,\",=
let b:undo_indent = "setl ai< inde< indk<"
" Only define the function once. " Only define the function once.
if exists("*GetGitoliteIndent") if exists("*GetGitoliteIndent")
finish finish

View File

@ -2,7 +2,7 @@
" Language: IDL (ft=idlang) " Language: IDL (ft=idlang)
" Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com> (Invalid email address) " Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com> (Invalid email address)
" Doug Kearns <dougkearns@gmail.com> " Doug Kearns <dougkearns@gmail.com>
" Last change: 2017 Jun 13 " Last change: 2022 Apr 06
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -14,6 +14,8 @@ setlocal indentkeys=o,O,0=endif,0=ENDIF,0=endelse,0=ENDELSE,0=endwhile,0=ENDWHIL
setlocal indentexpr=GetIdlangIndent(v:lnum) setlocal indentexpr=GetIdlangIndent(v:lnum)
let b:undo_indent = "setl inde< indk<"
" Only define the function once. " Only define the function once.
if exists("*GetIdlangIndent") if exists("*GetIdlangIndent")
finish finish

130
runtime/indent/krl.vim Normal file
View File

@ -0,0 +1,130 @@
" Vim indent file
" Language: Kuka Robot Language
" Maintainer: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
" Version: 3.0.0
" Last Change: 15. Apr 2022
" Credits: Based on indent/vim.vim
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal nolisp
setlocal nocindent
setlocal nosmartindent
setlocal autoindent
setlocal indentexpr=GetKrlIndent()
setlocal indentkeys=!^F,o,O,=~end,0=~else,0=~case,0=~default,0=~until,0=~continue,=~part
let b:undo_indent = "setlocal lisp< cindent< smartindent< autoindent< indentexpr< indentkeys<"
if get(g:,'krlSpaceIndent',1)
" Use spaces, not tabs, for indention, 2 is enough.
" More or even tabs would waste valuable space on the teach pendant.
setlocal softtabstop=2
setlocal shiftwidth=2
setlocal expandtab
setlocal shiftround
let b:undo_indent = b:undo_indent." softtabstop< shiftwidth< expandtab< shiftround<"
endif
" Only define the function once.
if exists("*GetKrlIndent")
finish
endif
let s:keepcpo = &cpo
set cpo&vim
function GetKrlIndent() abort
let currentLine = getline(v:lnum)
if currentLine =~? '\v^;(\s*(end)?fold>)@!' && !get(g:, 'krlCommentIndent', 0)
" If current line has a ; in column 1 and is no fold, keep zero indent.
" This may be usefull if code is commented out at the first column.
return 0
endif
" Find a non-blank line above the current line.
let preNoneBlankLineNum = s:KrlPreNoneBlank(v:lnum - 1)
if preNoneBlankLineNum == 0
" At the start of the file use zero indent.
return 0
endif
let preNoneBlankLine = getline(preNoneBlankLineNum)
let ind = indent(preNoneBlankLineNum)
" Define add 'shiftwidth' pattern
let addShiftwidthPattern = '\v^\s*('
if get(g:, 'krlIndentBetweenDef', 1)
let addShiftwidthPattern ..= '(global\s+)?def(fct|dat)?\s+\$?\w'
let addShiftwidthPattern ..= '|'
endif
let addShiftwidthPattern ..= 'if>|while>|for>|loop>'
let addShiftwidthPattern ..= '|else>'
let addShiftwidthPattern ..= '|case>|default>'
let addShiftwidthPattern ..= '|repeat>'
let addShiftwidthPattern ..= '|skip>|(ptp_)?spline>'
let addShiftwidthPattern ..= '|time_block\s+(start|part)>'
let addShiftwidthPattern ..= '|const_vel\s+start>'
let addShiftwidthPattern ..= ')'
" Define Subtract 'shiftwidth' pattern
let subtractShiftwidthPattern = '\v^\s*('
if get(g:, 'krlIndentBetweenDef', 1)
let subtractShiftwidthPattern ..= 'end(fct|dat)?>'
let subtractShiftwidthPattern ..= '|'
endif
let subtractShiftwidthPattern ..= 'end(if|while|for|loop)>'
let subtractShiftwidthPattern ..= '|else>'
let subtractShiftwidthPattern ..= '|case>|default>|endswitch>'
let subtractShiftwidthPattern ..= '|until>'
let subtractShiftwidthPattern ..= '|end(skip|spline)>'
let subtractShiftwidthPattern ..= '|time_block\s+(part|end)>'
let subtractShiftwidthPattern ..= '|const_vel\s+end>'
let subtractShiftwidthPattern ..= ')'
" Add shiftwidth
if preNoneBlankLine =~? addShiftwidthPattern
let ind += &sw
endif
" Subtract shiftwidth
if currentLine =~? subtractShiftwidthPattern
let ind = ind - &sw
endif
" First case after a switch gets the indent of the switch.
if currentLine =~? '\v^\s*case>'
\&& preNoneBlankLine =~? '\v^\s*switch>'
let ind = ind + &sw
endif
" align continue with the following instruction
if currentLine =~? '\v^\s*continue>'
\&& getline(v:lnum + 1) =~? subtractShiftwidthPattern
let ind = ind - &sw
endif
return ind
endfunction
" This function works almost like prevnonblank() but handles &-headers,
" comments and continue instructions like blank lines
function s:KrlPreNoneBlank(lnum) abort
let nPreNoneBlank = prevnonblank(a:lnum)
while nPreNoneBlank > 0 && getline(nPreNoneBlank) =~? '\v^\s*(\&\w\+|;|continue>)'
" Previouse none blank line irrelevant. Look further aback.
let nPreNoneBlank = prevnonblank(nPreNoneBlank - 1)
endwhile
return nPreNoneBlank
endfunction
let &cpo = s:keepcpo
unlet s:keepcpo
" vim:sw=2 sts=2 et

View File

@ -2,7 +2,7 @@
" Language: Makefile " Language: Makefile
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Last Change: 24 Sep 2021 " Last Change: 2022 Apr 06
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@ -13,7 +13,7 @@ setlocal indentexpr=GetMakeIndent()
setlocal indentkeys=!^F,o,O,<:>,=else,=endif setlocal indentkeys=!^F,o,O,<:>,=else,=endif
setlocal nosmartindent setlocal nosmartindent
let b:undo_indent = "setl ai< inde< indk<" let b:undo_indent = "setl inde< indk< si<"
if exists("*GetMakeIndent") if exists("*GetMakeIndent")
finish finish

View File

@ -3,6 +3,7 @@
" Maintainer: Steve Layland <layland@wolfram.com> (Invalid email address) " Maintainer: Steve Layland <layland@wolfram.com> (Invalid email address)
" Doug Kearns <dougkearns@gmail.com> " Doug Kearns <dougkearns@gmail.com>
" Last Change: Sat May 10 18:56:22 CDT 2005 " Last Change: Sat May 10 18:56:22 CDT 2005
" 2022 April: b:undo_indent added by Doug Kearns
" Source: http://vim.sourceforge.net/scripts/script.php?script_id=1274 " Source: http://vim.sourceforge.net/scripts/script.php?script_id=1274
" http://members.wolfram.com/layland/vim/indent/mma.vim " http://members.wolfram.com/layland/vim/indent/mma.vim
" "
@ -26,6 +27,8 @@ setlocal indentexpr=GetMmaIndent()
setlocal indentkeys+=0[,0],0(,0) setlocal indentkeys+=0[,0],0(,0)
setlocal nosi "turn off smart indent so we don't over analyze } blocks setlocal nosi "turn off smart indent so we don't over analyze } blocks
let b:undo_indent = "setl inde< indk< si<"
if exists("*GetMmaIndent") if exists("*GetMmaIndent")
finish finish
endif endif

View File

@ -1,7 +1,7 @@
" Vim indent file " Vim indent file
" Language: nginx.conf " Language: nginx.conf
" Maintainer: Chris Aumann <me@chr4.org> " Maintainer: Chris Aumann <me@chr4.org>
" Last Change: Apr 15, 2017 " Last Change: 2022 Apr 06
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@ -15,3 +15,5 @@ setlocal cindent
" Just make sure that the comments are not reset as defs would be. " Just make sure that the comments are not reset as defs would be.
setlocal cinkeys-=0# setlocal cinkeys-=0#
let b:undo_indent = "setl inde< cin< cink<"

View File

@ -1,9 +1,7 @@
" Vim indent file " Vim indent file
" Language: Objective-C " Language: Objective-C
" Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com> " Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com>
" Last Change: 2004 May 16 " Last Change: 2022 Apr 06
"
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -19,6 +17,8 @@ setlocal indentexpr=GetObjCIndent()
setlocal indentkeys-=: setlocal indentkeys-=:
setlocal indentkeys+=<:> setlocal indentkeys+=<:>
let b:undo_indent = "setl cin< inde< indk<"
" Only define the function once. " Only define the function once.
if exists("*GetObjCIndent") if exists("*GetObjCIndent")
finish finish

View File

@ -2,7 +2,7 @@
" Language: occam " Language: occam
" Maintainer: Mario Schweigler <ms44@kent.ac.uk> (Invalid email address) " Maintainer: Mario Schweigler <ms44@kent.ac.uk> (Invalid email address)
" Doug Kearns <dougkearns@gmail.com> " Doug Kearns <dougkearns@gmail.com>
" Last Change: 23 April 2003 " Last Change: 2022 Apr 06
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -17,6 +17,8 @@ setlocal indentexpr=GetOccamIndent()
setlocal indentkeys=o,O,0=: setlocal indentkeys=o,O,0=:
"}}} "}}}
let b:undo_indent = "setl inde< indk<"
" Only define the function once " Only define the function once
if exists("*GetOccamIndent") if exists("*GetOccamIndent")
finish finish

View File

@ -2,8 +2,8 @@
" Language: PostScript " Language: PostScript
" Maintainer: Mike Williams <mrw@netcomuk.co.uk> (Invalid email address) " Maintainer: Mike Williams <mrw@netcomuk.co.uk> (Invalid email address)
" Doug Kearns <dougkearns@gmail.com> " Doug Kearns <dougkearns@gmail.com>
" Last Change: 2nd July 2001 " Last Change: 2022 Apr 06
"
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -14,6 +14,8 @@ let b:did_indent = 1
setlocal indentexpr=PostscrIndentGet(v:lnum) setlocal indentexpr=PostscrIndentGet(v:lnum)
setlocal indentkeys+=0],0=>>,0=%%,0=end,0=restore,0=grestore indentkeys-=:,0#,e setlocal indentkeys+=0],0=>>,0=%%,0=end,0=restore,0=grestore indentkeys-=:,0#,e
let b:undo_indent = "setl inde< indk<"
" Catch multiple instantiations " Catch multiple instantiations
if exists("*PostscrIndentGet") if exists("*PostscrIndentGet")
finish finish

View File

@ -2,6 +2,7 @@
" Language: PoV-Ray Scene Description Language " Language: PoV-Ray Scene Description Language
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
" Last Change: 2017 Jun 13 " Last Change: 2017 Jun 13
" 2022 April: b:undo_indent added by Doug Kearns
" URI: http://trific.ath.cx/Ftp/vim/indent/pov.vim " URI: http://trific.ath.cx/Ftp/vim/indent/pov.vim
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
@ -16,6 +17,8 @@ setlocal nolisp " Make sure lisp indenting doesn't supersede us.
setlocal indentexpr=GetPoVRayIndent() setlocal indentexpr=GetPoVRayIndent()
setlocal indentkeys+==else,=end,0] setlocal indentkeys+==else,=end,0]
let b:undo_indent = "setl inde< indk< lisp<"
" Only define the function once. " Only define the function once.
if exists("*GetPoVRayIndent") if exists("*GetPoVRayIndent")
finish finish

View File

@ -4,6 +4,7 @@
" Doug Kearns <dougkearns@gmail.com> " Doug Kearns <dougkearns@gmail.com>
" Revised on: 2002.02.18. 23:34:05 " Revised on: 2002.02.18. 23:34:05
" Last change by: Takuya Fujiwara, 2018 Sep 23 " Last change by: Takuya Fujiwara, 2018 Sep 23
" 2022 April: b:undo_indent added by Doug Kearns
" TODO: " TODO:
" checking with respect to syntax highlighting " checking with respect to syntax highlighting
@ -21,6 +22,8 @@ setlocal indentexpr=GetPrologIndent()
setlocal indentkeys-=:,0# setlocal indentkeys-=:,0#
setlocal indentkeys+=0%,-,0;,>,0) setlocal indentkeys+=0%,-,0;,>,0)
let b:undo_indent = "setl inde< indk<"
" Only define the function once. " Only define the function once.
"if exists("*GetPrologIndent") "if exists("*GetPrologIndent")
" finish " finish

View File

@ -2,7 +2,7 @@
" Language: SAS " Language: SAS
" Maintainer: Zhen-Huan Hu <wildkeny@gmail.com> " Maintainer: Zhen-Huan Hu <wildkeny@gmail.com>
" Version: 3.0.3 " Version: 3.0.3
" Last Change: Jun 26, 2018 " Last Change: 2022 Apr 06
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@ -12,6 +12,8 @@ let b:did_indent = 1
setlocal indentexpr=GetSASIndent() setlocal indentexpr=GetSASIndent()
setlocal indentkeys+=;,=~data,=~proc,=~macro setlocal indentkeys+=;,=~data,=~proc,=~macro
let b:undo_indent = "setl inde< indk<"
if exists("*GetSASIndent") if exists("*GetSASIndent")
finish finish
endif endif

View File

@ -7,10 +7,11 @@
" Mike Leary <leary@nwlink.com> " Mike Leary <leary@nwlink.com>
" Markus Mottl <markus@oefai.at> " Markus Mottl <markus@oefai.at>
" OCaml URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim " OCaml URL: http://www.oefai.at/~markus/vim/indent/ocaml.vim
" Last Change: 2003 Jan 04 - Adapted to SML " Last Change: 2022 Apr 06
" 2002 Nov 06 - Some fixes (JY) " 2002 Nov 06 - Some fixes (JY)
" 2002 Oct 28 - Fixed bug with indentation of ']' (MM) " 2002 Oct 28 - Fixed bug with indentation of ']' (MM)
" 2002 Oct 22 - Major rewrite (JY) " 2002 Oct 22 - Major rewrite (JY)
" 2022 April: b:undo_indent added by Doug Kearns
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -26,6 +27,8 @@ setlocal nosmartindent
setlocal textwidth=80 setlocal textwidth=80
setlocal shiftwidth=2 setlocal shiftwidth=2
let b:undo_indent = "setl et< inde< indk< lisp< si< sw< tw<"
" Comment formatting " Comment formatting
if (has("comments")) if (has("comments"))
set comments=sr:(*,mb:*,ex:*) set comments=sr:(*,mb:*,ex:*)

View File

@ -2,6 +2,7 @@
" Language: SystemVerilog " Language: SystemVerilog
" Maintainer: kocha <kocha.lsifrontend@gmail.com> " Maintainer: kocha <kocha.lsifrontend@gmail.com>
" Last Change: 05-Feb-2017 by Bilal Wasim " Last Change: 05-Feb-2017 by Bilal Wasim
" 2022 April: b:undo_indent added by Doug Kearns
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -16,6 +17,8 @@ setlocal indentkeys+==endclass,=endpackage,=endsequence,=endclocking
setlocal indentkeys+==endinterface,=endgroup,=endprogram,=endproperty,=endchecker setlocal indentkeys+==endinterface,=endgroup,=endprogram,=endproperty,=endchecker
setlocal indentkeys+==`else,=`endif setlocal indentkeys+==`else,=`endif
let b:undo_indent = "setl inde< indk<"
" Only define the function once. " Only define the function once.
if exists("*SystemVerilogIndent") if exists("*SystemVerilogIndent")
finish finish

View File

@ -0,0 +1,148 @@
; vim: set ft=krl :
; START_INDENT
def One()
int i
If i==1 then
While i>=1
For i=1 to 5 step 2
Loop
i = i+1
EndLoop
EndFor
EndWhile
Else
Repeat
Switch i
Case 1
Skip 123
i = i+1
EndSkip 123
Spline with $acc=100, $vel.cp=3
slin {x 100}
scirc {x 110, y 110}, {x 120, y 90}
slin {x 200} c_dis
Time_Block Start
slin {x 300} c_dis
Time_Block Part = 22.2
slin {y 400} c_dis
Time_Block Part = 33.3
Time_Block End = 10
slin {y 200} c_dis
Const_Vel Start +100 OnStart
slin {y 300} c_dis
slin {x 100}
Const_Vel End -5.5
slin {y 200} c_dis
EndSpline
Case 2,3
PTP_Spline with $acc=100, $vel.ptp=100
sptp {a1 0} c_ptp
sptp {a1 90}
EndSpline c_spl
Default
i = i+1
EndSwitch
Continue
Until False
EndIf
end
DEF Two()
int i
END
global def Three()
int i
end
GLOBAL DEF Four()
int i
END
Global Def Five()
int i
End
deffct bool fOne()
int i
endfct
DEFFCT bool fTwo()
int i
ENDFCT
global deffct bool fThree()
int i
endfct
GLOBAL DEFFCT bool fFour()
int i
ENDFCT
Global DefFct bool fFive()
int i
EndFct
DefDat datfile()
global int i=1
; don't indent column 1 comments unless g:krlCommentIndent is set
; global int o=2
EndDat
; END_INDENT
; START_INDENT
; INDENT_EXE let g:krlSpaceIndent = 0
; INDENT_EXE set shiftwidth=4
def bla()
int i
end
; END_INDENT
; START_INDENT
; INDENT_EXE let g:krlCommentIndent = 1
def bla()
; indent this first column comment because of g:krlCommentIndent=1
end
; END_INDENT
; START_INDENT
; INDENT_EXE let g:krlIndentBetweenDef = 0
def bla()
int i ; don't indent this line because of g:krlIndentBetweenDef=0
end
; END_INDENT
; START_INDENT
; INDENT_AT this-line
def Some()
int f
if true then
f = 1 ; this-line
endif
end
; END_INDENT
; START_INDENT
; INDENT_NEXT next-line
def Some()
int i
; next-line
i = 1 ; should get indent of line 'int i' above
end
; END_INDENT
; START_INDENT
; INDENT_PREV prev-line
def Some()
int f
if true then
f = 1
; prev-line
endif
end
; END_INDENT

View File

@ -0,0 +1,148 @@
; vim: set ft=krl :
; START_INDENT
def One()
int i
If i==1 then
While i>=1
For i=1 to 5 step 2
Loop
i = i+1
EndLoop
EndFor
EndWhile
Else
Repeat
Switch i
Case 1
Skip 123
i = i+1
EndSkip 123
Spline with $acc=100, $vel.cp=3
slin {x 100}
scirc {x 110, y 110}, {x 120, y 90}
slin {x 200} c_dis
Time_Block Start
slin {x 300} c_dis
Time_Block Part = 22.2
slin {y 400} c_dis
Time_Block Part = 33.3
Time_Block End = 10
slin {y 200} c_dis
Const_Vel Start +100 OnStart
slin {y 300} c_dis
slin {x 100}
Const_Vel End -5.5
slin {y 200} c_dis
EndSpline
Case 2,3
PTP_Spline with $acc=100, $vel.ptp=100
sptp {a1 0} c_ptp
sptp {a1 90}
EndSpline c_spl
Default
i = i+1
EndSwitch
Continue
Until False
EndIf
end
DEF Two()
int i
END
global def Three()
int i
end
GLOBAL DEF Four()
int i
END
Global Def Five()
int i
End
deffct bool fOne()
int i
endfct
DEFFCT bool fTwo()
int i
ENDFCT
global deffct bool fThree()
int i
endfct
GLOBAL DEFFCT bool fFour()
int i
ENDFCT
Global DefFct bool fFive()
int i
EndFct
DefDat datfile()
global int i=1
; don't indent column 1 comments unless g:krlCommentIndent is set
; global int o=2
EndDat
; END_INDENT
; START_INDENT
; INDENT_EXE let g:krlSpaceIndent = 0
; INDENT_EXE set shiftwidth=4
def bla()
int i
end
; END_INDENT
; START_INDENT
; INDENT_EXE let g:krlCommentIndent = 1
def bla()
; indent this first column comment because of g:krlCommentIndent=1
end
; END_INDENT
; START_INDENT
; INDENT_EXE let g:krlIndentBetweenDef = 0
def bla()
int i ; don't indent this line because of g:krlIndentBetweenDef=0
end
; END_INDENT
; START_INDENT
; INDENT_AT this-line
def Some()
int f
if true then
f = 1 ; this-line
endif
end
; END_INDENT
; START_INDENT
; INDENT_NEXT next-line
def Some()
int i
; next-line
i = 1 ; should get indent of line 'int i' above
end
; END_INDENT
; START_INDENT
; INDENT_PREV prev-line
def Some()
int f
if true then
f = 1
; prev-line
endif
end
; END_INDENT

View File

@ -17,3 +17,9 @@ map: val
map: multiline map: multiline
value value
# END_INDENT # END_INDENT
# START_INDENT
map: |
line1
line2
# END_INDENT

View File

@ -17,3 +17,9 @@ map: val
map: multiline map: multiline
value value
# END_INDENT # END_INDENT
# START_INDENT
map: |
line1
line2
# END_INDENT

View File

@ -2,7 +2,7 @@
" Language: tf (TinyFugue) " Language: tf (TinyFugue)
" Maintainer: Christian J. Robinson <heptite@gmail.com> " Maintainer: Christian J. Robinson <heptite@gmail.com>
" URL: http://www.vim.org/scripts/script.php?script_id=174 " URL: http://www.vim.org/scripts/script.php?script_id=174
" Last Change: 2017 Feb 25 " Last Change: 2022 Apr 25
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -14,6 +14,8 @@ setlocal indentexpr=GetTFIndent()
setlocal indentkeys-=0{,0} indentkeys-=0# indentkeys-=: setlocal indentkeys-=0{,0} indentkeys-=0# indentkeys-=:
setlocal indentkeys+==/endif,=/then,=/else,=/done,0; setlocal indentkeys+==/endif,=/then,=/else,=/done,0;
let b:undo_indent = "setlocal indentexpr< indentkeys<"
" Only define the function once: " Only define the function once:
if exists("*GetTFIndent") if exists("*GetTFIndent")
finish finish

View File

@ -1,7 +1,8 @@
"Description: Indent scheme for the tilde weblanguage "Description: Indent scheme for the tilde weblanguage
"Author: Tobias Rundström <tobi@tobi.nu> "Author: Tobias Rundström <tobi@tobi.nu> (Invalid email address)
"URL: http://tilde.tildesoftware.net "URL: http://tilde.tildesoftware.net
"Last Change: May 8 09:15:09 CEST 2002 "Last Change: May 8 09:15:09 CEST 2002
" 2022 April: b:undo_indent added by Doug Kearns
if exists ("b:did_indent") if exists ("b:did_indent")
finish finish
@ -13,6 +14,8 @@ setlocal autoindent
setlocal indentexpr=GetTildeIndent(v:lnum) setlocal indentexpr=GetTildeIndent(v:lnum)
setlocal indentkeys=o,O,) setlocal indentkeys=o,O,)
let b:undo_indent = "setl ai< inde< indk<"
if exists("*GetTildeIndent") if exists("*GetTildeIndent")
finish finish
endif endif

View File

@ -1,7 +1,8 @@
" Vim indent file " Vim indent file
" Language: Treetop " Language: Treetop
" Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Latest Revision: 2011-03-14 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Last Change: 2022 April 25
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@ -12,6 +13,8 @@ setlocal indentexpr=GetTreetopIndent()
setlocal indentkeys=0{,0},!^F,o,O,=end setlocal indentkeys=0{,0},!^F,o,O,=end
setlocal nosmartindent setlocal nosmartindent
let b:undo_indent = "setl inde< indk< si<"
if exists("*GetTreetopIndent") if exists("*GetTreetopIndent")
finish finish
endif endif

View File

@ -1,7 +1,8 @@
" Vim indent file " Vim indent file
" Language: XFree86 Configuration File " Language: XFree86 Configuration File
" Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Latest Revision: 2006-12-20 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Last Change: 2022 April 25
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@ -12,6 +13,8 @@ setlocal indentexpr=GetXF86ConfIndent()
setlocal indentkeys=!^F,o,O,=End setlocal indentkeys=!^F,o,O,=End
setlocal nosmartindent setlocal nosmartindent
let b:undo_indent = "setl inde< indk< si<"
if exists("*GetXF86ConfIndent") if exists("*GetXF86ConfIndent")
finish finish
endif endif

View File

@ -1,7 +1,8 @@
" Vim indent file " Vim indent file
" Language: xinetd.conf(5) configuration file " Language: xinetd.conf(5) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Latest Revision: 2006-12-20 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Last Change: 2022 April 25
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@ -12,6 +13,8 @@ setlocal indentexpr=GetXinetdIndent()
setlocal indentkeys=0{,0},!^F,o,O setlocal indentkeys=0{,0},!^F,o,O
setlocal nosmartindent setlocal nosmartindent
let b:undo_indent = "setl inde< indk< si<"
if exists("*GetXinetdIndent") if exists("*GetXinetdIndent")
finish finish
endif endif

View File

@ -1,7 +1,8 @@
" Vim indent file " Vim indent file
" Language: YACC input file " Language: YACC input file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Latest Revision: 2006-12-20 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Last Change: 2022 April 25
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
if exists("b:did_indent") if exists("b:did_indent")
@ -14,6 +15,8 @@ setlocal indentexpr=GetYaccIndent()
setlocal indentkeys=!^F,o,O setlocal indentkeys=!^F,o,O
setlocal nosmartindent setlocal nosmartindent
let b:undo_indent = "setl inde< indk< si<"
" Only define the function once. " Only define the function once.
if exists("*GetYaccIndent") if exists("*GetYaccIndent")
finish finish

View File

@ -1,7 +1,7 @@
" These commands create the option window. " These commands create the option window.
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Dec 21 " Last Change: 2022 Apr 07
" If there already is an option window, jump to that one. " If there already is an option window, jump to that one.
let buf = bufnr('option-window') let buf = bufnr('option-window')
@ -624,6 +624,8 @@ call <SID>BinOptionG("scf", &scf)
if has("gui") if has("gui")
call <SID>AddOption("mousehide", gettext("hide the mouse pointer while typing")) call <SID>AddOption("mousehide", gettext("hide the mouse pointer while typing"))
call <SID>BinOptionG("mh", &mh) call <SID>BinOptionG("mh", &mh)
call <SID>AddOption("mousemoveevent", gettext("report mouse movement events"))
call <SID>BinOptionG("mousemev", &mousemev)
endif endif
call <SID>AddOption("mousemodel", gettext("\"extend\", \"popup\" or \"popup_setpos\"; what the right\nmouse button is used for")) call <SID>AddOption("mousemodel", gettext("\"extend\", \"popup\" or \"popup_setpos\"; what the right\nmouse button is used for"))
call <SID>OptionG("mousem", &mousem) call <SID>OptionG("mousem", &mousem)
@ -927,6 +929,9 @@ if has("cindent")
call <SID>AddOption("cinwords", gettext("list of words that cause more C-indent")) call <SID>AddOption("cinwords", gettext("list of words that cause more C-indent"))
call append("$", "\t" .. s:local_to_buffer) call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("cinw") call <SID>OptionL("cinw")
call <SID>AddOption("cinscopedecls", gettext("list of scope declaration names used by cino-g"))
call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("cinsd")
call <SID>AddOption("indentexpr", gettext("expression used to obtain the indent of a line")) call <SID>AddOption("indentexpr", gettext("expression used to obtain the indent of a line"))
call append("$", "\t" .. s:local_to_buffer) call append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("inde") call <SID>OptionL("inde")

View File

@ -2,7 +2,7 @@
" "
" Author: Bram Moolenaar " Author: Bram Moolenaar
" Copyright: Vim license applies, see ":help license" " Copyright: Vim license applies, see ":help license"
" Last Change: 2022 Jan 17 " Last Change: 2022 Apr 16
" "
" WORK IN PROGRESS - The basics works stable, more to come " WORK IN PROGRESS - The basics works stable, more to come
" Note: In general you need at least GDB 7.12 because this provides the " Note: In general you need at least GDB 7.12 because this provides the
@ -445,7 +445,7 @@ endfunc
func s:StartDebugCommon(dict) func s:StartDebugCommon(dict)
" Sign used to highlight the line where the program has stopped. " Sign used to highlight the line where the program has stopped.
" There can be only one. " There can be only one.
sign define debugPC linehl=debugPC call sign_define('debugPC', #{linehl: 'debugPC'})
" Install debugger commands in the text window. " Install debugger commands in the text window.
call win_gotoid(s:sourcewin) call win_gotoid(s:sourcewin)
@ -668,7 +668,9 @@ func s:EndDebugCommon()
endif endif
endif endif
endfor endfor
exe was_buf .. "buf" if bufexists(was_buf)
exe was_buf .. "buf"
endif
call s:DeleteCommands() call s:DeleteCommands()
@ -740,8 +742,8 @@ func s:HandleDisasmMsg(msg)
let lnum = search('^' . s:asm_addr) let lnum = search('^' . s:asm_addr)
if lnum != 0 if lnum != 0
exe 'sign unplace ' . s:asm_id call sign_unplace('TermDebug', #{id: s:asm_id})
exe 'sign place ' . s:asm_id . ' line=' . lnum . ' name=debugPC' call sign_place(s:asm_id, 'TermDebug', 'debugPC', '%', #{lnum: lnum})
endif endif
call win_gotoid(curwinid) call win_gotoid(curwinid)
@ -830,6 +832,7 @@ func s:InstallCommands()
command Clear call s:ClearBreakpoint() command Clear call s:ClearBreakpoint()
command Step call s:SendResumingCommand('-exec-step') command Step call s:SendResumingCommand('-exec-step')
command Over call s:SendResumingCommand('-exec-next') command Over call s:SendResumingCommand('-exec-next')
command -nargs=? Until call s:Until(<q-args>)
command Finish call s:SendResumingCommand('-exec-finish') command Finish call s:SendResumingCommand('-exec-finish')
command -nargs=* Run call s:Run(<q-args>) command -nargs=* Run call s:Run(<q-args>)
command -nargs=* Arguments call s:SendResumingCommand('-exec-arguments ' . <q-args>) command -nargs=* Arguments call s:SendResumingCommand('-exec-arguments ' . <q-args>)
@ -866,7 +869,8 @@ func s:InstallCommands()
an 1.200 PopUp.-SEP3- <Nop> an 1.200 PopUp.-SEP3- <Nop>
an 1.210 PopUp.Set\ breakpoint :Break<CR> an 1.210 PopUp.Set\ breakpoint :Break<CR>
an 1.220 PopUp.Clear\ breakpoint :Clear<CR> an 1.220 PopUp.Clear\ breakpoint :Clear<CR>
an 1.230 PopUp.Evaluate :Evaluate<CR> an 1.230 PopUp.Run\ until :Until<CR>
an 1.240 PopUp.Evaluate :Evaluate<CR>
endif endif
endif endif
@ -894,6 +898,7 @@ func s:DeleteCommands()
delcommand Clear delcommand Clear
delcommand Step delcommand Step
delcommand Over delcommand Over
delcommand Until
delcommand Finish delcommand Finish
delcommand Run delcommand Run
delcommand Arguments delcommand Arguments
@ -937,26 +942,35 @@ func s:DeleteCommands()
aunmenu PopUp.-SEP3- aunmenu PopUp.-SEP3-
aunmenu PopUp.Set\ breakpoint aunmenu PopUp.Set\ breakpoint
aunmenu PopUp.Clear\ breakpoint aunmenu PopUp.Clear\ breakpoint
aunmenu PopUp.Run\ until
aunmenu PopUp.Evaluate aunmenu PopUp.Evaluate
endif endif
endif endif
exe 'sign unplace ' . s:pc_id call sign_unplace('TermDebug')
for [id, entries] in items(s:breakpoints)
for subid in keys(entries)
exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid)
endfor
endfor
unlet s:breakpoints unlet s:breakpoints
unlet s:breakpoint_locations unlet s:breakpoint_locations
sign undefine debugPC call sign_undefine('debugPC')
for val in s:BreakpointSigns call sign_undefine(s:BreakpointSigns->map("'debugBreakpoint' .. v:val"))
exe "sign undefine debugBreakpoint" . val
endfor
let s:BreakpointSigns = [] let s:BreakpointSigns = []
endfunc endfunc
" :Until - Execute until past a specified position or current line
func s:Until(at)
if s:stopped
" reset s:stopped here, it may take a bit of time before we get a response
let s:stopped = 0
call ch_log('assume that program is running after this command')
" Use the fname:lnum format
let at = empty(a:at) ?
\ fnameescape(expand('%:p')) . ':' . line('.') : a:at
call s:SendCommand('-exec-until ' . at)
else
call ch_log('dropping command, program is running: exec-until')
endif
endfunc
" :Break - Set a breakpoint at the cursor position. " :Break - Set a breakpoint at the cursor position.
func s:SetBreakpoint(at) func s:SetBreakpoint(at)
" Setting a breakpoint may not work while the program is running. " Setting a breakpoint may not work while the program is running.
@ -990,7 +1004,8 @@ func s:ClearBreakpoint()
" Assume this always works, the reply is simply "^done". " Assume this always works, the reply is simply "^done".
call s:SendCommand('-break-delete ' . id) call s:SendCommand('-break-delete ' . id)
for subid in keys(s:breakpoints[id]) for subid in keys(s:breakpoints[id])
exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid) call sign_unplace('TermDebug',
\ #{id: s:Breakpoint2SignNumber(id, subid)})
endfor endfor
unlet s:breakpoints[id] unlet s:breakpoints[id]
unlet s:breakpoint_locations[bploc][idx] unlet s:breakpoint_locations[bploc][idx]
@ -1205,8 +1220,8 @@ func s:GotoAsmwinOrCreateIt()
call s:SendCommand('disassemble $pc') call s:SendCommand('disassemble $pc')
endif endif
else else
exe 'sign unplace ' . s:asm_id call sign_unplace('TermDebug', #{id: s:asm_id})
exe 'sign place ' . s:asm_id . ' line=' . lnum . ' name=debugPC' call sign_place(s:asm_id, 'TermDebug', 'debugPC', '%', #{lnum: lnum})
endif endif
endif endif
endfunc endfunc
@ -1241,8 +1256,8 @@ func s:HandleCursor(msg)
if lnum == 0 if lnum == 0
call s:SendCommand('disassemble $pc') call s:SendCommand('disassemble $pc')
else else
exe 'sign unplace ' . s:asm_id call sign_unplace('TermDebug', #{id: s:asm_id})
exe 'sign place ' . s:asm_id . ' line=' . lnum . ' name=debugPC' call sign_place(s:asm_id, 'TermDebug', 'debugPC', '%', #{lnum: lnum})
endif endif
call win_gotoid(curwinid) call win_gotoid(curwinid)
@ -1279,8 +1294,9 @@ echomsg 'different fname: "' .. expand('%:p') .. '" vs "' .. fnamemodify(fname,
endif endif
exe lnum exe lnum
normal! zv normal! zv
exe 'sign unplace ' . s:pc_id call sign_unplace('TermDebug', #{id: s:pc_id})
exe 'sign place ' . s:pc_id . ' line=' . lnum . ' name=debugPC priority=110 file=' . fname call sign_place(s:pc_id, 'TermDebug', 'debugPC', fname,
\ #{lnum: lnum, priority: 110})
if !exists('b:save_signcolumn') if !exists('b:save_signcolumn')
let b:save_signcolumn = &signcolumn let b:save_signcolumn = &signcolumn
call add(s:signcolumn_buflist, bufnr()) call add(s:signcolumn_buflist, bufnr())
@ -1288,7 +1304,7 @@ echomsg 'different fname: "' .. expand('%:p') .. '" vs "' .. fnamemodify(fname,
setlocal signcolumn=yes setlocal signcolumn=yes
endif endif
elseif !s:stopped || fname != '' elseif !s:stopped || fname != ''
exe 'sign unplace ' . s:pc_id call sign_unplace('TermDebug', #{id: s:pc_id})
endif endif
call win_gotoid(wid) call win_gotoid(wid)
@ -1305,7 +1321,9 @@ func s:CreateBreakpoint(id, subid, enabled)
else else
let hiName = "debugBreakpoint" let hiName = "debugBreakpoint"
endif endif
exe "sign define debugBreakpoint" . nr . " text=" . substitute(nr, '\..*', '', '') . " texthl=" . hiName call sign_define('debugBreakpoint' .. nr,
\ #{text: substitute(nr, '\..*', '', ''),
\ texthl: hiName})
endif endif
endfunc endfunc
@ -1383,7 +1401,9 @@ endfunc
func s:PlaceSign(id, subid, entry) func s:PlaceSign(id, subid, entry)
let nr = printf('%d.%d', a:id, a:subid) let nr = printf('%d.%d', a:id, a:subid)
exe 'sign place ' . s:Breakpoint2SignNumber(a:id, a:subid) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint' . nr . ' priority=110 file=' . a:entry['fname'] call sign_place(s:Breakpoint2SignNumber(a:id, a:subid), 'TermDebug',
\ 'debugBreakpoint' .. nr, a:entry['fname'],
\ #{lnum: a:entry['lnum'], priority: 110})
let a:entry['placed'] = 1 let a:entry['placed'] = 1
endfunc endfunc
@ -1397,7 +1417,8 @@ func s:HandleBreakpointDelete(msg)
if has_key(s:breakpoints, id) if has_key(s:breakpoints, id)
for [subid, entry] in items(s:breakpoints[id]) for [subid, entry] in items(s:breakpoints[id])
if has_key(entry, 'placed') if has_key(entry, 'placed')
exe 'sign unplace ' . s:Breakpoint2SignNumber(id, subid) call sign_unplace('TermDebug',
\ #{id: s:Breakpoint2SignNumber(id, subid)})
unlet entry['placed'] unlet entry['placed']
endif endif
endfor endfor

View File

@ -3,7 +3,7 @@
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
" License: This file can be redistribued and/or modified under the same terms " License: This file can be redistribued and/or modified under the same terms
" as Vim itself. " as Vim itself.
" Last Change: 2020 Oct 07 " Last Change: 2022 Apr 25
" Notes: Last synced with apache-2.2.3, version 1.x is no longer supported " Notes: Last synced with apache-2.2.3, version 1.x is no longer supported
" TODO: see particular FIXME's scattered through the file " TODO: see particular FIXME's scattered through the file
" make it really linewise? " make it really linewise?
@ -46,6 +46,7 @@ syn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH P
syn keyword apacheMethodOption BASELINE-CONTROL CHECKIN CHECKOUT LABEL MERGE MKACTIVITY MKWORKSPACE REPORT UNCHECKOUT UPDATE VERSION-CONTROL contained syn keyword apacheMethodOption BASELINE-CONTROL CHECKIN CHECKOUT LABEL MERGE MKACTIVITY MKWORKSPACE REPORT UNCHECKOUT UPDATE VERSION-CONTROL contained
syn case ignore syn case ignore
syn match apacheSection "<\/\=\(Directory\|DirectoryMatch\|Files\|FilesMatch\|IfModule\|IfDefine\|Location\|LocationMatch\|VirtualHost\)[^>]*>" contains=apacheAnything syn match apacheSection "<\/\=\(Directory\|DirectoryMatch\|Files\|FilesMatch\|IfModule\|IfDefine\|Location\|LocationMatch\|VirtualHost\)[^>]*>" contains=apacheAnything
syn match apacheSection "<\/\=\(RequireAll\|RequireAny\|RequireNone\)>" contains=apacheAnything
syn match apacheLimitSection "<\/\=\(Limit\|LimitExcept\)[^>]*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheError syn match apacheLimitSection "<\/\=\(Limit\|LimitExcept\)[^>]*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheError
syn keyword apacheLimitSectionKeyword Limit LimitExcept contained syn keyword apacheLimitSectionKeyword Limit LimitExcept contained
syn match apacheAuthType "AuthType\s.*$" contains=apacheAuthTypeValue syn match apacheAuthType "AuthType\s.*$" contains=apacheAuthTypeValue

View File

@ -1,7 +1,7 @@
" Vim syntax file " Vim syntax file
" Language: C " Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Mar 17 " Last Change: 2022 Apr 24
" Quit when a (custom) syntax file was already loaded " Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax") if exists("b:current_syntax")
@ -11,7 +11,7 @@ endif
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo&vim set cpo&vim
let s:ft = matchstr(&ft, '^\([^.]\)\+') let s:ft = matchstr(&ft, '^\%([^.]\)\+')
" check if this was included from cpp.vim " check if this was included from cpp.vim
let s:in_cpp_family = exists("b:filetype_in_cpp_family") let s:in_cpp_family = exists("b:filetype_in_cpp_family")
@ -42,17 +42,17 @@ syn cluster cCommentGroup contains=cTodo,cBadContinuation
" String and Character constants " String and Character constants
" Highlight special characters (those which have a backslash) differently " Highlight special characters (those which have a backslash) differently
syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" syn match cSpecial display contained "\\\%(x\x\+\|\o\{1,3}\|.\|$\)"
if !exists("c_no_utf") if !exists("c_no_utf")
syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" syn match cSpecial display contained "\\\%(u\x\{4}\|U\x\{8}\)"
endif endif
if !exists("c_no_cformat") if !exists("c_no_cformat")
" Highlight % items in strings. " Highlight % items in strings.
if !exists("c_no_c99") " ISO C99 if !exists("c_no_c99") " ISO C99
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained syn match cFormat display "%\%(\d\+\$\)\=[-+' #0*]*\%(\d*\|\*\|\*\d\+\$\)\%(\.\%(\d*\|\*\|\*\d\+\$\)\)\=\%([hlLjzt]\|ll\|hh\)\=\%([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
else else
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained syn match cFormat display "%\%(\d\+\$\)\=[-+' #0*]*\%(\d*\|\*\|\*\d\+\$\)\%(\.\%(\d*\|\*\|\*\d\+\$\)\)\=\%([hlL]\|ll\)\=\%([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
endif endif
syn match cFormat display "%%" contained syn match cFormat display "%%" contained
endif endif
@ -60,8 +60,8 @@ endif
" cCppString: same as cString, but ends at end of line " cCppString: same as cString, but ends at end of line
if s:in_cpp_family && !exists("cpp_no_cpp11") && !exists("c_no_cformat") if s:in_cpp_family && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
" ISO C++11 " ISO C++11
syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend syn region cString start=+\%(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell syn region cCppString start=+\%(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat") elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat")
" ISO C99 " ISO C99
syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
@ -73,7 +73,7 @@ else
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
endif endif
syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip syn region cCppSkip contained start="^\s*\%(%:\|#\)\s*\%(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\%(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip
syn cluster cStringGroup contains=cCppString,cCppSkip syn cluster cStringGroup contains=cCppString,cCppSkip
@ -190,16 +190,16 @@ syn case ignore
syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal
" Same, but without octal error (for comments) " Same, but without octal error (for comments)
syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal
syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" syn match cNumber display contained "\d\+\%(u\=l\{0,2}\|ll\=u\)\>"
"hex number "hex number
syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" syn match cNumber display contained "0x\x\+\%(u\=l\{0,2}\|ll\=u\)\>"
" Flag the first zero of an octal number as something special " Flag the first zero of an octal number as something special
syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero syn match cOctal display contained "0\o\+\%(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero
syn match cOctalZero display contained "\<0" syn match cOctalZero display contained "\<0"
"floating point number, with dot, optional exponent "floating point number, with dot, optional exponent
syn match cFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" syn match cFloat display contained "\d\+\.\d*\%(e[-+]\=\d\+\)\=[fl]\="
"floating point number, starting with a dot, optional exponent "floating point number, starting with a dot, optional exponent
syn match cFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" syn match cFloat display contained "\.\d\+\%(e[-+]\=\d\+\)\=[fl]\=\>"
"floating point number, without dot, with exponent "floating point number, without dot, with exponent
syn match cFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" syn match cFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
if !exists("c_no_c99") if !exists("c_no_c99")
@ -219,7 +219,7 @@ if exists("c_comment_strings")
" need to use a special type of cString: cCommentString, which also ends on " need to use a special type of cString: cCommentString, which also ends on
" "*/", and sees a "*" at the start of the line as comment again. " "*/", and sees a "*" at the start of the line as comment again.
" Unfortunately this doesn't very well work for // type of comments :-( " Unfortunately this doesn't very well work for // type of comments :-(
syn match cCommentSkip contained "^\s*\*\($\|\s\+\)" syn match cCommentSkip contained "^\s*\*\%($\|\s\+\)"
syn region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip syn region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip
syn region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial syn region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,cWrongComTail,@Spell syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,cWrongComTail,@Spell
@ -376,36 +376,36 @@ if !exists("c_no_c99") " ISO C99
endif endif
" Accept %: for # (C99) " Accept %: for # (C99)
syn region cPreCondit start="^\s*\zs\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError syn region cPreCondit start="^\s*\zs\%(%:\|#\)\s*\%(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>" syn match cPreConditMatch display "^\s*\zs\%(%:\|#\)\s*\%(else\|endif\)\>"
if !exists("c_no_if0") if !exists("c_no_if0")
syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold syn region cCppOutWrapper start="^\s*\zs\%(%:\|#\)\s*if\s\+0\+\s*\%($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\%(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
if !exists("c_no_if0_fold") if !exists("c_no_if0_fold")
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
else else
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0\+\s*\%($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
endif endif
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold syn region cCppInWrapper start="^\s*\zs\%(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\%($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\%(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
if !exists("c_no_if0_fold") if !exists("c_no_if0_fold")
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
else else
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 syn region cCppInElse contained start="^\s*\%(%:\|#\)\s*\%(else\>\|elif\s\+\%(0*[1-9]\d*\s*\%($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
endif endif
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\%(%:\|#\)\s*\%(else\|elif\)\%([^/]\|/[^/*]\)*" end="^\s*\%(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip syn region cCppOutSkip contained start="^\s*\%(%:\|#\)\s*\%(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\%(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\%(%:\|#\)\s*\%(if\s\+\%(\d\+\s*\%($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\%(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
endif endif
syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
syn match cIncluded display contained "<[^>]*>" syn match cIncluded display contained "<[^>]*>"
syn match cInclude display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded syn match cInclude display "^\s*\zs\%(%:\|#\)\s*include\>\s*["<]" contains=cIncluded
"syn match cLineSkip "\\$" "syn match cLineSkip "\\$"
syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock
syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell syn region cDefine start="^\s*\zs\%(%:\|#\)\s*\%(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell syn region cPreProc start="^\s*\zs\%(%:\|#\)\s*\%(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
" Optional embedded Autodoc parsing " Optional embedded Autodoc parsing
if exists("c_autodoc") if exists("c_autodoc")

View File

@ -1,8 +1,7 @@
" Vim syntax file " Vim syntax file
" Language: ChordPro (v. 3.6.2) " Language: ChordPro 6 (https://www.chordpro.org)
" Maintainer: Niels Bo Andersen <niels@niboan.dk> " Maintainer: Niels Bo Andersen <niels@niboan.dk>
" Last Change: 2006 Apr 30 " Last Change: 2022-04-15
" Remark: Requires VIM version 6.00 or greater
" Quit when a syntax file was already loaded " Quit when a syntax file was already loaded
if exists("b:current_syntax") if exists("b:current_syntax")
@ -12,54 +11,161 @@ endif
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo&vim set cpo&vim
setlocal iskeyword+=-
syn case ignore syn case ignore
syn keyword chordproDirective contained " Include embedded abc syntax
\ start_of_chorus soc end_of_chorus eoc new_song ns no_grid ng grid g syn include @Abc syntax/abc.vim
\ new_page np new_physical_page npp start_of_tab sot end_of_tab eot
\ column_break colb
syn keyword chordproDirWithOpt contained " Lilypond and Pango syntaxes could be embedded as well, but they are not
\ comment c comment_italic ci comment_box cb title t subtitle st define " available in the distribution.
\ textfont textsize chordfont chordsize columns col
syn keyword chordproDefineKeyword contained base-fret frets " Directives without arguments
syn keyword chordproDirective contained nextgroup=chordproConditional
\ new_song ns
\ start_of_chorus soc
\ chorus
\ start_of_verse sov
\ start_of_bridge sob
\ start_of_tab sot
\ start_of_grid sog
\ start_of_abc
\ start_of_ly
\ end_of_chorus eoc
\ end_of_verse eov
\ end_of_bridge eob
\ end_of_tab eot
\ end_of_grid eog
\ end_of_abc
\ end_of_ly
\ new_page np
\ new_physical_page npp
\ column_break cb
\ grid g
\ no_grid ng
\ transpose
\ chordfont cf chordsize cs chordcolour
\ footerfont footersize footercolour
\ gridfont gridsize gridcolour
\ tabfont tabsize tabcolour
\ tocfont tocsize toccolour
\ textfont tf textsize ts textcolour
\ titlefont titlesize titlecolour
syn match chordproDirMatch /{\w*}/ contains=chordproDirective contained transparent " Directives with arguments. Some directives are in both groups, as they can
syn match chordproDirOptMatch /{\w*:/ contains=chordproDirWithOpt contained transparent " be used both with and without arguments
syn keyword chordproDirWithArg contained nextgroup=chordproConditional
\ title t
\ subtitle st
\ sorttitle
\ artist
\ composer
\ lyricist
\ arranger
\ copyright
\ album
\ year
\ key
\ time
\ tempo
\ duration
\ capo
\ comment c
\ highlight
\ comment_italic ci
\ comment_box cb
\ image
\ start_of_chorus soc
\ chorus
\ start_of_verse sov
\ start_of_bridge sob
\ start_of_tab sot
\ start_of_grid sog
\ start_of_abc
\ start_of_ly
\ define
\ chord
\ transpose
\ chordfont cf chordsize cs chordcolour
\ footerfont footersize footercolour
\ gridfont gridsize gridcolour
\ tabfont tabsize tabcolour
\ tocfont tocsize toccolour
\ textfont tf textsize ts textcolour
\ titlefont titlesize titlecolour
\ pagetype
\ titles
\ columns col
" Workaround for a bug in VIM 6, which causes incorrect coloring of the first { syn keyword chordproMetaKeyword contained meta
if version < 700 syn keyword chordproMetadata contained title sorttitle subtitle artist composer lyricist arranger copyright album year key time tempo duration capo
syn region chordproOptions start=/{\w*:/ end=/}/ contains=chordproDirOptMatch contained transparent syn keyword chordproStandardMetadata contained songindex page pages pagerange today tuning instrument user
syn region chordproOptions start=/{define:/ end=/}/ contains=chordproDirOptMatch, chordproDefineKeyword contained transparent syn match chordproStandardMetadata /instrument\.type/ contained
else syn match chordproStandardMetadata /instrument\.description/ contained
syn region chordproOptions start=/{\w*:/hs=e+1 end=/}/he=s-1 contains=chordproDirOptMatch contained syn match chordproStandardMetadata /user\.name/ contained
syn region chordproOptions start=/{define:/hs=e+1 end=/}/he=s-1 contains=chordproDirOptMatch, chordproDefineKeyword contained syn match chordproStandardMetadata /user\.fullname/ contained
endif
syn region chordproTag start=/{/ end=/}/ contains=chordproDirMatch,chordproOptions oneline syn keyword chordproDefineKeyword contained frets fingers
syn match chordproDefineKeyword /base-fret/ contained
syn match chordproArgumentsNumber /\d\+/ contained
syn match chordproCustom /x_\w\+/ contained
syn match chordproDirMatch /{\w\+\(-\w\+\)\?}/ contains=chordproDirective contained transparent
syn match chordproDirArgMatch /{\w\+\(-\w\+\)\?[: ]/ contains=chordproDirWithArg contained transparent
syn match chordproMetaMatch /{meta\(-\w\+\)\?[: ]\+\w\+/ contains=chordproMetaKeyword,chordproMetadata contained transparent
syn match chordproCustomMatch /{x_\w\+\(-\w\+\)\?[: ]/ contains=chordproCustom contained transparent
syn match chordproConditional /-\w\+/ contained
syn match chordproMetaDataOperator /[=|]/ contained
syn match chordproMetaDataValue /%{\w*/ contains=chordproMetaData,chordproStandardMetadata contained transparent
" Handles nested metadata tags, but the end of the containing chordproTag is
" not highlighted correctly, if there are more than two levels of nesting
syn region chordproMetaDataTag start=/%{\w*/ skip=/%{[^}]*}/ end=/}/ contains=chordproMetaDataValue,chordproMetaDataOperator,chordproMetadataTag contained
syn region chordproArguments start=/{\w\+\(-\w\+\)\?[: ]/hs=e+1 skip=/%{[^}]*}/ end=/}/he=s-1 contains=chordproDirArgMatch,chordproArgumentsNumber,chordproMetaDataTag contained
syn region chordproArguments start=/{\(define\|chord\)\(-\w\+\)\?[: ]/hs=e+1 end=/}/he=s-1 contains=chordproDirArgMatch,chordproDefineKeyword,chordproArgumentsNumber contained
syn region chordproArguments start=/{meta\(-\w\+\)\?[: ]/hs=e+1 skip=/%{[^}]*}/ end=/}/he=s-1 contains=chordproMetaMatch,chordproMetaDataTag contained
syn region chordproArguments start=/{x_\w\+\(-\w\+\)\?[: ]/hs=e+1 end=/}/he=s-1 contains=chordproCustomMatch contained
syn region chordproTag start=/{/ skip=/%{[^}]*}/ end=/}/ contains=chordproDirMatch,chordproArguments oneline
syn region chordproChord matchgroup=chordproBracket start=/\[/ end=/]/ oneline syn region chordproChord matchgroup=chordproBracket start=/\[/ end=/]/ oneline
syn region chordproTab start=/{start_of_tab}\|{sot}/hs=e+1 end=/{end_of_tab}\|{eot}/he=s-1 contains=chordproTag,chordproComment keepend syn region chordproAnnotation matchgroup=chordproBracket start=/\[\*/ end=/]/ oneline
syn region chordproChorus start=/{start_of_chorus}\|{soc}/hs=e+1 end=/{end_of_chorus}\|{eoc}/he=s-1 contains=chordproTag,chordproChord,chordproComment keepend syn region chordproTab start=/{start_of_tab\(-\w\+\)\?\([: ].\+\)\?}\|{sot\(-\w\+\)\?\([: ].\+\)\?}/hs=e+1 end=/{end_of_tab}\|{eot}/me=s-1 contains=chordproTag,chordproComment keepend
syn region chordproChorus start=/{start_of_chorus\(-\w\+\)\?\([: ].\+\)\?}\|{soc\(-\w\+\)\?\([: ].\+\)\?}/hs=e+1 end=/{end_of_chorus}\|{eoc}/me=s-1 contains=chordproTag,chordproChord,chordproAnnotation,chordproComment keepend
syn region chordproBridge start=/{start_of_bridge\(-\w\+\)\?\([: ].\+\)\?}\|{sob\(-\w\+\)\?\([: ].\+\)\?}/hs=e+1 end=/{end_of_bridge}\|{eob}/me=s-1 contains=chordproTag,chordproChord,chordproAnnotation,chordproComment keepend
syn region chordproAbc start=/{start_of_abc\(-\w\+\)\?\([: ].\+\)\?}/hs=e+1 end=/{end_of_abc}/me=s-1 contains=chordproTag,@Abc keepend
syn match chordproComment /^#.*/ syn match chordproComment /^#.*/
" Define the default highlighting. " Define the default highlighting.
hi def link chordproDirective Statement hi def link chordproDirective Statement
hi def link chordproDirWithOpt Statement hi def link chordproDirWithArg Statement
hi def link chordproOptions Special hi def link chordproConditional Statement
hi def link chordproCustom Statement
hi def link chordproMetaKeyword Statement
hi def link chordproMetaDataOperator Operator
hi def link chordproMetaDataTag Function
hi def link chordproArguments Special
hi def link chordproArgumentsNumber Number
hi def link chordproChord Type hi def link chordproChord Type
hi def link chordproAnnotation Identifier
hi def link chordproTag Constant hi def link chordproTag Constant
hi def link chordproTab PreProc hi def link chordproTab PreProc
hi def link chordproComment Comment hi def link chordproComment Comment
hi def link chordproBracket Constant hi def link chordproBracket Constant
hi def link chordproDefineKeyword Type hi def link chordproDefineKeyword Identifier
hi def link chordproMetadata Identifier
hi def link chordproStandardMetadata Identifier
hi def chordproChorus term=bold cterm=bold gui=bold hi def chordproChorus term=bold cterm=bold gui=bold
hi def chordproBridge term=italic cterm=italic gui=italic
let b:current_syntax = "chordpro" let b:current_syntax = "chordpro"

View File

@ -1,7 +1,7 @@
" Vim syntax file " Vim syntax file
" Language: Debian DEP3 Patch headers " Language: Debian DEP3 Patch headers
" Maintainer: Gabriel Filion <gabster@lelutin.ca> " Maintainer: Gabriel Filion <gabster@lelutin.ca>
" Last Change: 2021-01-09 " Last Change: 2022 Apr 06
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/dep3patch.vim " URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/dep3patch.vim
" "
" Specification of the DEP3 patch header format is available at: " Specification of the DEP3 patch header format is available at:
@ -28,7 +28,7 @@ syn region dep3patchMultiField matchgroup=dep3patchKey start="^Bug\%(-[[:graph:]
syn region dep3patchMultiField matchgroup=dep3patchKey start="^Forwarded\ze: *" end="$" contained contains=dep3patchHTTPUrl,dep3patchForwardedShort oneline keepend syn region dep3patchMultiField matchgroup=dep3patchKey start="^Forwarded\ze: *" end="$" contained contains=dep3patchHTTPUrl,dep3patchForwardedShort oneline keepend
syn region dep3patchMultiField matchgroup=dep3patchKey start="^\%(Author\|From\)\ze: *" end="$" contained contains=dep3patchEmail oneline keepend syn region dep3patchMultiField matchgroup=dep3patchKey start="^\%(Author\|From\)\ze: *" end="$" contained contains=dep3patchEmail oneline keepend
syn region dep3patchMultiField matchgroup=dep3patchKey start="^\%(Reviewed-by\|Acked-by\)\ze: *" end="$" contained contains=dep3patchEmail oneline keepend syn region dep3patchMultiField matchgroup=dep3patchKey start="^\%(Reviewed-by\|Acked-by\)\ze: *" end="$" contained contains=dep3patchEmail oneline keepend
syn region dep3patchMultiField matchgroup=dep3patchKey start="^Last-Updated\ze: *" end="$" contained contains=dep3patchISODate oneline keepend syn region dep3patchMultiField matchgroup=dep3patchKey start="^Last-Update\ze: *" end="$" contained contains=dep3patchISODate oneline keepend
syn region dep3patchMultiField matchgroup=dep3patchKey start="^Applied-Upstream\ze: *" end="$" contained contains=dep3patchHTTPUrl,dep3patchCommitID oneline keepend syn region dep3patchMultiField matchgroup=dep3patchKey start="^Applied-Upstream\ze: *" end="$" contained contains=dep3patchHTTPUrl,dep3patchCommitID oneline keepend
syn match dep3patchHTTPUrl contained "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" syn match dep3patchHTTPUrl contained "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"

458
runtime/syntax/krl.vim Normal file
View File

@ -0,0 +1,458 @@
" Vim syntax file
" Language: Kuka Robot Language
" Maintainer: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
" Version: 3.0.0
" Last Change: 18. Apr 2022
" Credits: Thanks for contributions to this to Michael Jagusch
" Thanks for beta testing to Thomas Baginski
"
" Note to self:
" for testing perfomance
" open a 1000 lines file.
" :syntime on
" G
" hold down CTRL-U until reaching top
" :syntime report
" Init {{{
if exists("b:current_syntax")
finish
endif
let s:keepcpo = &cpo
set cpo&vim
" if colorscheme is tortus(less)? krlGroupName defaults to 1
if get(g:, 'colors_name', " ") =~ '\<tortus'
\&& !exists("g:krlGroupName")
let g:krlGroupName=1
endif
" krlGroupName defaults to 0 if it's not initialized yet or 0
if !get(g:, "krlGroupName", 0)
let g:krlGroupName = 0
endif
" krl does ignore case
syn case ignore
" take #, $ and & into keyword (syntax only)
syn iskeyword @,48-57,_,192-255,#,$,&
" spell checking
syn spell notoplevel
" }}} init
" Comment and Folding {{{
" Special Comment
" TODO Comment
syn keyword krlTodo contained TODO FIXME XXX
highlight default link krlTodo Todo
" Debug Comment
syn keyword krlDebug contained DEBUG
highlight default link krlDebug Debug
" Comment
" none move fold comment until second ;
syn match krlFoldComment /\c\v^\s*;\s*%(end)?fold>[^;]*/ containedin=krlFold contains=krlSingleQuoteString,krlInteger,krlFloat,krlMovement,krlDelimiter,krlBoolean
highlight default link krlFoldComment Comment
" move fold comment until second ;
syn match krlMoveFoldComment /\c\v^\s*;\s*fold>[^;]*<s?%(ptp|lin|circ|spl)(_rel)?>[^;]*/ containedin=krlFold contains=krlInteger,krlFloat,krlMovement,krlDelimiter
highlight default link krlMoveFoldComment Comment
" things to highlight in a fold line
syn keyword krlFoldHighlights CONT IN SYN OUT containedin=krlFoldComment
syn match krlFoldHighlights /\c\v<(M|F|E|A|t|i|bin|binin|UP|SPSMAKRO)\d+>/ containedin=krlFoldComment
if g:krlGroupName
highlight default link krlFoldHighlights Sysvars
else
" default color for Fold Highlights
endif
syn keyword krlVkrcFoldConstants EIN AUS containedin=krlFoldComment
highlight default link krlVkrcFoldConstants Boolean
" Comment without Fold, also includes endfold lines and fold line part after second ;
syn match krlComment /\c\v;\s*%(<%(end)?fold>)@!.*$/ containedin=krlFold contains=krlTodo,krlDebug,@Spell
" Commented out Fold line: "; ;FOLD PTP..."
syn match krlComment /\c\v^\s*;\s*;.*$/ contains=krlTodo,krlDebug
highlight default link krlComment Comment
if has("conceal") && get(g:, 'krlConcealFoldTail', 1)
syn match krlConcealFoldTail /\c\v(^\s*;\s*fold[^;]*)@250<=;%(--|\s*<fold>|\s*<endfold>)@!.*$/ transparent containedin=krlComment conceal cchar=*
endif
" }}} Comment and Folding
" Header {{{
syn match krlHeader /&\a\w*/
highlight default link krlHeader PreProc
" }}} Header
" Operator {{{
" Boolean operator
syn keyword krlBoolOperator and or exor not b_and b_or b_exor b_not
highlight default link krlBoolOperator Operator
" Arithmetic operator
syn match krlArithOperator /[+-]/ containedin=krlFloat
syn match krlArithOperator /[*/]/
highlight default link krlArithOperator Operator
" Compare operator
syn match krlCompOperator /[<>=]/
highlight default link krlCompOperator Operator
" Geometric operator
" Do not move the : operator
" Must be present befor krlParamdef
syn match krlGeomOperator /[:]/
" syn match krlGeomOperator /[:]/ containedin=krlLabel,krlParamdef
highlight default link krlGeomOperator Operator
" }}} Operator
" Type, StorageClass and Typedef {{{
" Simple data types
syn keyword krlType bool char real int containedin=krlAnyType
" External program and function
syn keyword krlType ext extfct extfctp extp containedin=krlAnyType
" Communication
syn keyword krlType signal channel containedin=krlAnyType
highlight default link krlType Type
" StorageClass
syn keyword krlStorageClass decl global const struc enum
highlight default link krlStorageClass StorageClass
" .dat file public
syn keyword krlDatStorageClass public
highlight default link krlDatStorageClass StorageClass
" Parameter StorageClass
" Do not move the :in/:out
" Must be present after krlGeomOperator
syn match krlParamdef /[:]\s*in\>/
syn match krlParamdef /[:]\s*out\>/
highlight default link krlParamdef StorageClass
" Not a typedef but I like to have those highlighted
" different then types, structures or strorage classes
syn keyword krlTypedef DEF DEFFCT ENDFCT DEFDAT ENDDAT
syn match krlTypedef /^\s*END\>/
highlight default link krlTypedef Typedef
" }}} Type, StorageClass and Typedef
" Delimiter {{{
syn match krlDelimiter /[\[\](),\\]/
highlight default link krlDelimiter Delimiter
" }}} Delimiter
" Constant values {{{
" Boolean
syn keyword krlBoolean true false containedin=krlStructVal
highlight default link krlBoolean Boolean
" Binary integer
syn match krlBinaryInt /'b[01]\+'/ containedin=krlStructVal
highlight default link krlBinaryInt Number
" Hexadecimal integer
syn match krlHexInt /'h[0-9a-fA-F]\+'/ containedin=krlStructVal
highlight default link krlHexInt Number
" Integer
syn match krlInteger /\W\@1<=[+-]\?\d\+/ containedin=krlStructVal,krlFloat contains=krlArithOperator
highlight default link krlInteger Number
" Float
syn match krlFloat /\v\W@1<=[+-]?\d+\.?\d*%(\s*[eE][+-]?\d+)?/ containedin=krlStructVal
highlight default link krlFloat Float
" String
syn region krlString start=/"/ end=/"/ oneline containedin=krlStructVal contains=@Spell
highlight default link krlString String
syn match krlSpecialChar /[|]/ containedin=krlString
highlight default link krlSpecialChar SpecialChar
" String within a fold line
syn region krlSingleQuoteString start=/'/ end=/'/ oneline contained contains=@Spell
highlight default link krlSingleQuoteString String
" Enum
syn match krlEnumVal /#\s*\a\w*/ containedin=krlStructVal
highlight default link krlEnumVal Constant
" }}} Constant values
" Predefined Structure and Enum {{{
" Predefined structures and enums found in
" /r1/mada/$*.dat, /r1/steu/$*.dat and
" /r1/system/$config.dat as well as
" basisTech, gripperTech and spotTech
"
" Predefined data types found in krc1
syn keyword krlStructure servopara keymove powermodul trace techangle tech techfct techcps techfctctrl axis_inc axis_cal date display_var pro_ip con bus
syn keyword krlEnum ident_state sig_state move_state async_state emt_mode boxmode msg_prm_typ msg_typ cmd_stat asys trace_state trace_mode direction techsys techgeoref techclass techmode hpu_key_val pro_state eax transsys mode_move cosys device rotsys emstop cause_t
"
" Predefined data types found in kss functions
syn keyword krlEnum ediagstate rdc_fs_state ret_c_psync_e var_type cancel_psync_e sys_vars
syn keyword krlStructure siginf rw_rdc_file rw_mam_file diagpar_t error_t stopmess case_sense_t msgbuf_t e3pos e3axis diagopt_t
"
" Predefined structures for movement
syn keyword krlStructure frame e6pos pos e6axis axis
syn keyword krlStructure fdat ldat pdat
syn keyword krlStructure load inertia
"
" Predefined structures for shapes
syn keyword krlStructure axbox cylinder box
"
" Predefined structures and enums found in /r1/mada/$machine.dat
syn keyword krlStructure cp fra acc_car jerk_struc dhart spin trpspin ex_kin et_ax maxtool
syn keyword krlEnum individual_mames supply_voltage kinclass main_axis wrist_axis sw_onoff
"
" Predefined structures and enums found in /r1/mada/$robcor.dat
" syn keyword krlStructure
syn keyword krlEnum adap_acc model_type control_parameter eko_mode
"
" Predefined structures and enums found in /steu/mada/$custom.dat
syn keyword krlStructure pro_io_t ser ext_mod_t coop_krc ws_config bin_type coop_update_t ldc_reaction
syn keyword krlEnum axis_of_coordinates spline_para_variant target_status cp_vel_type cp_statmon
"
" Predefined structures and enums found in /steu/mada/$machine.dat
syn keyword krlStructure emstop_path boxstatesafein boxstatesafeout
syn keyword krlEnum digincode
"
" Predefined structures and enums found in /steu/mada/$option.dat
syn keyword krlStructure msg_t
" syn keyword krlEnum
"
" Predefined structures and enums found in /r1/system/$config.dat
" BasisTech
syn keyword krlStructure dig_out_type ctrl_in_t ctrl_out_t fct_out_t fct_in_t odat basis_sugg_t out_sugg_t md_state machine_def_t machine_tool_t machine_frame_t trigger_para constvel_para condstop_para adat tm_sugg_t tqm_tqdat_t sps_prog_type
syn keyword krlEnum bas_command out_modetype ipo_m_t apo_mode_t funct_type p00_command timer_actiontype
"
" GripperTech
syn keyword krlStructure grp_typ grp_types grp_sugg_t
syn keyword krlEnum on_off_typ apo_typ
"
" SpotTech
syn keyword krlStructure spot_type spot_sugg_t
syn keyword krlEnum s_command s_pair_slct command_retr
"
" VW
syn keyword krlStructure vw_mpara_typ zangentyp zangenbedingung ibszangentyp last_ibs_typ verr_typ verrcheck_t t_fb_state kollisionsdaten state_t modus_t
syn keyword krlEnum synctype dir_typ subtype ari_typ bool_typ vw_command ibgn_command vw_user_cmd move_types adv_t_type bas_type ibs_mode_typ vw_user_cmd pro_mode mode_op
"
" ProgCoop
syn keyword krlStructure ydat
" syn keyword krlEnum
"
" bas.src
syn keyword krlStructure cont
syn keyword krlEnum esys ipo_mode circ_mode circ_type ori_type var_state
"
" MsgLib.src
syn keyword krlStructure KrlMsg_T KrlMsgParType_T KrlMsgPar_T KrlMsgOpt_T KrlMsgDlgSK_T
syn keyword krlEnum EKrlMsgType
"
highlight default link krlStructure Structure
highlight default link krlEnum Structure
" }}} Predefined Structure and Enum
" System variable {{{
syn match krlSysvars /\<\$\a[a-zA-Z0-9_.]*/
if g:krlGroupName
highlight default link krlSysvars Sysvars
else
" default color for Sysvars
endif
" }}} System variable
" Statements, keywords et al {{{
" continue
syn keyword krlContinue continue
if g:krlGroupName
highlight default link krlContinue Continue
else
highlight default link krlContinue Statement
endif
" interrupt
syn match krlStatement /\v\c%(<global>\s+)?<INTERRUPT>%(\s+<decl>)?/ contains=krlStorageClass
" keywords
syn keyword krlStatement wait on off enable disable stop trigger with when distance onstart delay do prio import is minimum maximum confirm on_error_proceed
syn match krlStatement /\v\c%(<wait\s+)@7<=<sec>/
syn match krlStatement /\v\c%(<when\s+)@7<=<path>/
highlight default link krlStatement Statement
" Conditional
syn keyword krlConditional if then else endif switch case default endswitch skip endskip
highlight default link krlConditional Conditional
" Repeat
syn keyword krlRepeat for to step endfor while endwhile repeat until loop endloop exit
highlight default link krlRepeat Repeat
" Label
syn keyword krlLabel goto
syn match krlLabel /^\s*\w\+:\ze\s*\%(;.*\)\?$/
highlight default link krlLabel Label
" Keyword
syn keyword krlKeyword anin anout digin
highlight default link krlKeyword Keyword
" Exception
syn keyword krlException return resume halt
highlight default link krlException Exception
" }}} Statements, keywords et al
" special keywords for movement commands {{{
syn keyword krlMovement PTP PTP_REL LIN LIN_REL CIRC CIRC_REL SPL SPL_REL SPTP SPTP_REL SLIN SLIN_REL SCIRC SCIRC_REL
syn keyword krlMovement ASYPTP ASYCONT ASYSTOP ASYCANCEL MOVE_EMI
syn match krlMovement /\v\c^\s*<BRAKE(\s+F)?>/
if g:krlGroupName
highlight default link krlMovement Movement
else
highlight default link krlMovement Special
endif
" movement modifiers
syn match krlMoveBlockInst /\c\v^\s*TIME_BLOCK\s+(START|PART|END)/
syn match krlMoveBlockInst /\c\v^\s*CONST_VEL\s+(START|END)/
syn keyword krlMoveBlockInst ptp_spline spline endspline
highlight default link krlMoveBlockInst Statement
syn keyword krlMoveMod ca c_ptp c_dis c_vel c_ori c_spl
if g:krlGroupName
highlight default link krlMoveMod Movement
else
highlight default link krlMoveMod Special
endif
" }}} special keywords for movement commands
" Structure value {{{
" avoid coloring structure component names
syn match krlNames /\.[a-zA-Z_][.a-zA-Z0-9_$]*/
syn match krlNames contained /[a-zA-Z_][.a-zA-Z0-9_$]*/
" highlight default link krlNames None
" Structure value
syn region krlStructVal start=/{/ end=/}/ oneline containedin=krlStructVal contains=krlNames
highlight default link krlStructVal Delimiter
" }}} Structure value
" BuildInFunction {{{
syn keyword krlBuildInFunction contained Pulse
syn keyword krlBuildInFunction contained m_comment
syn keyword krlBuildInFunction contained is_key_pressed
syn keyword krlBuildInFunction contained set_opt_filter
syn keyword krlBuildInFunction contained timer_limit
syn keyword krlBuildInFunction contained tool_adj
syn keyword krlBuildInFunction contained FRand
syn keyword krlBuildInFunction contained ExecFunc eb_test EB EK EO LK mbx_rec
" safe robot
syn keyword krlbuildinfunction contained get_AxesMask get_BrakeTest_Time
" math
syn keyword krlBuildInFunction contained Abs Sin Cos Acos Tan Atan Atan2 Sqrt
syn keyword krlBuildInFunction contained Forward Inverse inv_pos
" cFoo sFoo
syn keyword krlBuildInFunction contained cClose cOpen cRead cWrite sRead sWrite
" string
syn keyword krlBuildInFunction contained StrToBool StrToInt StrToReal StrToString StrToFrame StrToPos StrToE3Pos StrToE6Pos StrToAxis StrToE3Axis StrToE6Axis
syn keyword krlBuildInFunction contained StrAdd StrClear StrCopy StrComp StrFind StrLen StrDeclLen StrToBool StrToInt StrToReal StrToString
" diag
syn keyword krlBuildInFunction contained diag_start diag_stop get_DiagState
" rdc mam pid
syn keyword krlBuildInFunction contained CheckPidOnRdc check_mam_on_rdc get_rdc_fs_state
syn keyword krlBuildInFunction contained set_mam_on_hd copy_mam_hd_to_rdc copy_mam_rdc_to_hd
syn keyword krlBuildInFunction contained PidToHd PidToRdc
syn keyword krlBuildInFunction contained cal_to_rdc rdc_file_to_hd
syn keyword krlBuildInFunction contained delete_pid_on_rdc delete_rdc_content
syn keyword krlBuildInFunction contained create_rdc_archive restore_rdc_archive
" ioctl
syn keyword krlBuildInFunction contained IOCtl cIOCtl
syn keyword krlBuildInFunction contained WSpaceGive WSpaceTake
" sync
syn keyword krlBuildInFunction contained Sync SyncCmd CancelProgSync
" remote
syn keyword krlBuildInFunction contained RemoteCmd RemoteRead
" msg/dlg
syn keyword krlBuildInFunction contained IsMessageSet clear_KrlMsg get_MsgBuffer exists_KrlDlg exists_KrlMsg set_KrlDlg set_KrlDlgAnswer set_KrlMsg
" robvers
syn keyword krlBuildInFunction contained maximize_UsedxRobvers set_UsedxRobvers
" md_foo
syn keyword krlBuildInFunction contained md_Cmd md_GetState md_SetState md_Asgn
" emi
syn keyword krlBuildInFunction contained emi_ActPos emi_EndPos emi_StartPos emi_RecState emi_RecName
" var
syn keyword krlBuildInFunction contained cast_from cast_to
syn keyword krlBuildInFunction contained GetVarsize GetCycDef get_sig_inf get_decl_place VarType VarState
" sys
syn keyword krlBuildInFunction contained GetSysState get_system_data set_system_data set_system_data_delayed
" err
syn keyword krlBuildInFunction contained err_clear err_raise
" motion
syn keyword krlBuildInFunction contained delete_backward_buffer rob_stop rob_stop_release set_brake_delay suppress_repositioning VectorMoveOn VectorMoveOff
" torque
syn keyword krlBuildInFunction contained set_torque_limits reset_torque_limits
" krc1
syn keyword krlBuildInFunction contained cLcopy cCurpos cNew cClear cRelease cKey
if g:krlGroupName
highlight default link krlBuildInFunction BuildInFunction
else
highlight default link krlBuildInFunction Function
endif
" }}} BuildInFunction
" Function {{{
syn match krlFunction /[a-zA-Z_]\w* *(/me=e-1 contains=krlBuildInFunction
highlight default link krlFunction Function
" }}} Function
" Error {{{
if get(g:, 'krlShowError', 1)
" some more or less common typos
"
" vars or funcs >24 chars are not possible in krl. a234567890123456789012345
syn match krlError0 /\w\{25,}/ containedin=krlFunction,krlNames,krlLabel,krlAnyType,krlEnumVal,krlSysvars
"
" should be interrupt (on|off) \w+
syn match krlError1 /\vinterrupt[ \t(]+[_$a-zA-Z0-9]+[_$a-zA-Z0-9.\[\]()+\-*/]*[ \t)]+o%(n|ff)>/
"
" for bla==5 to 7...
" ||
syn match krlError3 /\v%(^\s*for%(\(|\s)+[_$a-zA-Z]+[_$a-zA-Z0-9.\[\]()+\-*/ ]*\s*)@<=[:=]\=/
"
" TODO optimize performance
" wait for a=b
" |
syn match krlError4 /\v%(^\s*%(return|wait\s+for|if|while|until|%(global\s+)?interrupt\s+decl)>[^;]+[^;<>=])@<=\=[^=]/
"
" wait for a><b
" ||
syn match krlError5 /\v%(^\s*%(return|wait\s+for|if|while|until|%(global\s+)?interrupt\s+decl)>[^;]+)@<=\>\s*\</
"
" if (a==5) (b==6) ...
" |||
syn match krlError6 /\v%(^\s*%(return|wait\s+for|if|while|until|%(global\s+)?interrupt\s+decl)>[^;]+[^;])@<=\)\s*\(/
"
" TODO optimize performance
" a == b + 1
" a := b + 1
" ||
syn match krlError7 /\v%(^\s*%(return|wait\s+for|if|while|until|%(global\s+)?interrupt\s+decl)>[^;]+[^;])@1<!%(^\s*[_$a-zA-Z]+[_$a-zA-Z0-9.\[\],+\-*/]*\s*)@<=[:=]\=/
syn match krlError7 /\v\c%(^\s*%(decl\s+)%(global\s+)?%(const\s+)?\w+\s+\w+\s*)@<=[:=]\=/
syn match krlError7 /\v\c%(^\s*%(decl\s+)?%(global\s+)?%(const\s+)?%(bool\s+|int\s+|real\s+|char\s+)\w+\s*)@<=[:=]\=/
"
" this one is tricky. Make sure this does not match trigger instructions; OK, next try, now search for false positives
" TODO optimize performance
" a = b and c or (int1=int2)
" |
syn match krlError8 /\v(^\s*[_$a-zA-Z]+[_$a-zA-Z0-9.\[\]()+\-*/]*\s*\=[^;]*[^;<>=])@<=\=\ze[^=]/
"
" <(distance|delay|prio)> :=
" <(distance|delay|prio)> ==
" ||
syn match krlError9 /\v(^[^;]*<(distance|delay|prio|minimum|maximum)\s*)@<=[:=]\=/
"
" 'for', 'while' or 'repeat' followed by 'do'
syn match krlError10 /\c\v^\s*(until|while|for)>[^;]*<do>/
"
highlight default link krlError0 Error
highlight default link krlError1 Error
highlight default link krlError2 Error
highlight default link krlError3 Error
highlight default link krlError4 Error
highlight default link krlError5 Error
highlight default link krlError6 Error
highlight default link krlError7 Error
highlight default link krlError8 Error
highlight default link krlError9 Error
highlight default link krlError10 Error
endif
" }}} Error
" Finish {{{
let &cpo = s:keepcpo
unlet s:keepcpo
let b:current_syntax = "krl"
" }}} Finish
" vim:sw=2 sts=2 et fdm=marker

View File

@ -2,7 +2,7 @@
" Language: Lua 4.0, Lua 5.0, Lua 5.1 and Lua 5.2 " Language: Lua 4.0, Lua 5.0, Lua 5.1 and Lua 5.2
" Maintainer: Marcus Aurelius Farias <masserahguard-lua 'at' yahoo com> " Maintainer: Marcus Aurelius Farias <masserahguard-lua 'at' yahoo com>
" First Author: Carlos Augusto Teixeira Mendes <cmendes 'at' inf puc-rio br> " First Author: Carlos Augusto Teixeira Mendes <cmendes 'at' inf puc-rio br>
" Last Change: 2012 Aug 12 " Last Change: 2022 Mar 31
" Options: lua_version = 4 or 5 " Options: lua_version = 4 or 5
" lua_subversion = 0 (4.0, 5.0) or 1 (5.1) or 2 (5.2) " lua_subversion = 0 (4.0, 5.0) or 1 (5.1) or 2 (5.2)
" default 5.2 " default 5.2
@ -319,6 +319,15 @@ elseif lua_version == 5
syn match luaFunc /\<debug\.upvalueid\>/ syn match luaFunc /\<debug\.upvalueid\>/
syn match luaFunc /\<debug\.upvaluejoin\>/ syn match luaFunc /\<debug\.upvaluejoin\>/
endif endif
if lua_subversion >= 3
"https://www.lua.org/manual/5.3/manual.html#6.5
syn match luaFunc /\<utf8\.char\>/
syn match luaFunc /\<utf8\.charpattern\>/
syn match luaFunc /\<utf8\.codes\>/
syn match luaFunc /\<utf8\.codepoint\>/
syn match luaFunc /\<utf8\.len\>/
syn match luaFunc /\<utf8\.offset\>/
endif
endif endif
" Define the default highlighting. " Define the default highlighting.

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