Compare commits

...

138 Commits

Author SHA1 Message Date
Yegappan Lakshmanan
efbfa867a1 patch 8.2.4770: cannot easily mix expression and heredoc
Problem:    Cannot easily mix expression and heredoc.
Solution:   Support  in heredoc. (Yegappan Lakshmanan, closes #10138)
2022-04-17 12:47:40 +01:00
Bram Moolenaar
68aaff4697 patch 8.2.4769: build warning with UCRT
Problem:    Build warning with UCRT.
Solution:   Adjust #ifdef for _wenviron. (John Marriott)
2022-04-17 10:57:44 +01:00
Philip H
34ffa10280 patch 8.2.4768: CI: codecov upload sometimes does not work
Problem:    CI: codecov upload sometimes does not work.
Solution:   Use action v3 instead of v2. (closes #10209)
2022-04-16 21:46:38 +01:00
salkin-mada
c360b2566c patch 8.2.4767: openscad files are not recognized
Problem:    Openscad files are not recognized.
Solution:   Add a filetype pattern. (Niklas Adam, closes #10199)
2022-04-16 21:33:54 +01:00
KnoP-01
93c7a45e86 patch 8.2.4766: KRL files using "deffct" not recognized
Problem:    KRL files using "deffct" not recognized.
Solution:   Adjust the pattern used for matching. (Patrick Meiser-Knosowski,
            closes #10200)
2022-04-16 21:14:04 +01:00
Yegappan Lakshmanan
047a7019b2 patch 8.2.4765: function matchfuzzy() sorts too many items
Problem:    Function matchfuzzy() sorts too many items.
Solution:   Only put matches in the array. (Yegappan Lakshmanan,
            closes #10208)
2022-04-16 20:42:40 +01:00
Philip H
d2edee5cf3 patch 8.2.4764: CI uses an older gcc version
Problem:    CI uses an older gcc version.
Solution:   Use GCC 11. (closes #10185)
2022-04-16 20:04:30 +01:00
Bram Moolenaar
f50808ed13 patch 8.2.4763: using invalid pointer with "V:" in Ex mode
Problem:    Using invalid pointer with "V:" in Ex mode.
Solution:   Correctly handle the command being changed to "+".
2022-04-16 18:52:17 +01:00
zeertzjq
ca7e86c237 patch 8.2.4762: using freed memory using synstack() and synID() in WinEnter
Problem:    Using freed memory when using synstack() and synID() in WinEnter.
Solution:   Check using the syntax window. (closes #10204)
2022-04-16 16:49:24 +01:00
Yegappan Lakshmanan
e0805b849c patch 8.2.4761: documentation for using LSP messages is incomplete
Problem:    Documentation for using LSP messages is incomplete.
Solution:   Update the documentation. (Yegappan Lakshmanan, closes #10206)
2022-04-16 15:18:23 +01:00
Yasuhiro Matsumoto
9029a6e993 patch 8.2.4760: using matchfuzzy() on a long list can take a while
Problem:    Using matchfuzzy() on a long list can take a while.
Solution:   Add a limit to the number of matches. (Yasuhiro Matsumoto,
            closes #10189)
2022-04-16 12:35:35 +01:00
Bram Moolenaar
693ccd1160 patch 8.2.4759: CurSearch highlight does not work for multi-line match
Problem:    CurSearch highlight does not work for multi-line match.
Solution:   Check cursor position before adjusting columns. (closes #10133)
2022-04-16 12:04:37 +01:00
Yegappan Lakshmanan
3b470ae88f patch 8.2.4758: when using an LSP channel want to get the message ID
Problem:    When using an LSP channel want to get the message ID.
Solution:   Have ch_sendexpr() return the ID. (Yegappan Lakshmanan,
            closes #10202)
2022-04-16 10:41:27 +01:00
Philip H
b9e99e58bb patch 8.2.4757: list of libraries to suppress lsan errors is outdated
Problem:    List of libraries to suppress lsan errors is outdated.
Solution:   Add another library. (closes #10201)
2022-04-16 10:08:52 +01:00
Bram Moolenaar
092e09cba7 patch 8.2.4756: build error without the +eval feature
Problem:    Build error without the +eval feature.
Solution:   Adjust #ifdefs.
2022-04-15 23:29:23 +01:00
Bram Moolenaar
12eb2eb4d7 patch 8.2.4755: cannot use <SID>FuncRef in completion spec
Problem:    Cannot use <SID>FuncRef in completion spec.
Solution:   Dereference a function name in another way. (closes #10197)
2022-04-15 22:57:09 +01:00
LemonBoy
7714231bb5 patch 8.2.4754: using cached values after unsetting some environment variables
Problem:    Still using cached values after unsetting some known environment
            variables.
Solution:   Take care of the side effects. (closes #10194)
2022-04-15 20:50:46 +01:00
Bram Moolenaar
31e5c60a68 patch 8.2.4753: error from setting an option is silently ignored
Problem:    Error from setting an option is silently ignored.
Solution:   Handle option value errors better.  Fix uses of N_().
2022-04-15 13:53:33 +01:00
zeertzjq
5dc294a7b6 patch 8.2.4752: wrong 'statusline' value can cause illegal memory access
Problem:    Wrong 'statusline' value can cause illegal memory access.
Solution:   Properly check the value. (closes #10192)
2022-04-15 13:17:57 +01:00
Bram Moolenaar
648dd88af6 patch 8.2.4751: mapping <SID>name.Func does not work for autoload script
Problem:    Mapping <SID>name.Func does not work for script in autoload
            directory.
Solution:   Use the # form for a script in the autoload directory.
            (closes #10186)
2022-04-14 21:36:15 +01:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
b836658a04 patch 8.2.4750: small pieces of dead code
Problem:    Small pieces of dead code.
Solution:   Remove the dead code. (Goc Dundar, closes #10190) Rename the
            qftf_cb struct member to avoid confusion.
2022-04-14 20:43:56 +01:00
LemonBoy
eca7c60d68 patch 8.2.4749: <script> is not expanded in autocmd context
Problem:    <script> is not expanded in autocmd context.
Solution:   Add the context to the pattern struct. (closes #10144)
            Rename AutoPatCmd to AutoPatCmd_T.
2022-04-14 15:39:43 +01:00
Bram Moolenaar
8944551534 patch 8.2.4748: cannot use an imported function in a mapping
Problem:    Cannot use an imported function in a mapping.
Solution:   Recognize <SID>name.Func.
2022-04-14 12:58:23 +01:00
KnoP-01
f420ff2440 patch 8.2.4747: no filetype override for .sys files
Problem:    No filetype override for .sys files.
Solution:   Add g:filetype_sys. (Patrick Meiser-Knosowski, closes #10181)
2022-04-13 20:46:21 +01:00
ranjithshegde
8cac20ed42 patch 8.2.4746: supercollider filetype not recognized
Problem:    Supercollider filetype not recognized.
Solution:   Match file extentions and check file contents to detect
            supercollider. (closes #10142)
2022-04-13 15:29:21 +01:00
Bram Moolenaar
aae9762b2c patch 8.2.4745: using wrong flag for using bell in the terminal
Problem:    Using wrong flag for using bell in the terminal.
Solution:   Change to use BO_TERM.
2022-04-13 14:28:07 +01:00
LemonBoy
77771d33f4 patch 8.2.4744: a terminal window can't use the bell
Problem:    A terminal window can't use the bell.
Solution:   Add bell support for the terminal window. (closes #10178)
2022-04-13 11:47:25 +01:00
Philip H
9bbe5c6b8c patch 8.2.4743: clang 14 is available on CI
Problem:    Clang 14 is available on CI.
Solution:   Switch from clang 13 to 14. (closes #10157)
2022-04-12 15:40:12 +01:00
Bram Moolenaar
c9a9a0ac1e patch 8.2.4742: there is no way to start logging very early in startup
Problem:    There is no way to start logging very early in startup.
Solution:   Add the --log argument.  Include the date in the start message in
            the log file.  Avoid a duplicate message when forking.  Log an
            executed shell command.
2022-04-12 15:09:23 +01:00
Bram Moolenaar
60895f3e36 patch 8.2.4741: startup test fails
Problem:    Startup test fails.
Solution:   Avoid an error for verbose expansion.  Fix that the "0verbose"
            command modifier doesn't work.
2022-04-12 14:23:19 +01:00
Bram Moolenaar
575445200b patch 8.2.4740: when expand() fails there is no error message
Problem:    When expand() fails there is no error message.
Solution:   When 'verbose' is set give an error message.
2022-04-12 12:54:11 +01:00
zeertzjq
d58862d18f patch 8.2.4739: accessing freed memory after WinScrolled autocmd event
Problem:    Accessing freed memory after WinScrolled autocmd event.
Solution:   Check the window pointer is still valid. (closes #10156)
            Remove the argument from may_trigger_winscrolled().
2022-04-12 11:32:48 +01:00
Bram Moolenaar
11a57dfd16 patch 8.2.4738: Esc on commandline executes command instead of abandoning it
Problem:    Esc on commandline executes command instead of abandoning it.
Solution:   Save and restore KeyTyped when removing the popup menu.
            (closes #10154)
2022-04-11 19:38:56 +01:00
Bram Moolenaar
1655619717 patch 8.2.4737: // in JavaScript string recognized as comment
Problem:    // in JavaScript string recognized as comment.
Solution:   Only check for linecomment if 'cindent' is set. (closes #10151)
2022-04-11 17:36:37 +01:00
Bram Moolenaar
825b55e695 patch 8.2.4736: build problem for Cygwin with Motif
Problem:    Build problem for Cygwin with Motif.
Solution:   Undefine ControlMask. (Kelvin Lee, closes #10152)
2022-04-11 15:28:50 +01:00
Yegappan Lakshmanan
4a7724a440 patch 8.2.4735: quickfix tests can be a bit hard to read
Problem:    Quickfix tests can be a bit hard to read.
Solution:   Use heredoc instead of strings and line continuation. (Yegappan
            Lakshmanan, closes #10145)
2022-04-11 15:11:39 +01:00
Bram Moolenaar
3caf1cce2b patch 8.2.4734: getcharpos() may change a mark position
Problem:    getcharpos() may change a mark position.
Solution:   Copy the mark position. (closes #10148)
2022-04-11 13:05:16 +01:00
Aaron Tinio
4232dff815 patch 8.2.4733: HEEx and Surface do need a separate filetype
Problem:    HEEx and Surface do need a separate filetype.
Solution:   Revert 8.2.4729. (closes #10147)
2022-04-11 11:37:13 +01:00
Bram Moolenaar
c6e0a5e98c patch 8.2.4732: duplicate code to free fuzzy matches
Problem:    Duplicate code to free fuzzy matches.
Solution:   Bring back fuzmatch_str_free().
2022-04-10 18:09:06 +01:00
LemonBoy
db0ea7f2b0 patch 8.2.4731: the changelist index is not remembered per buffer
Problem:    The changelist index is not remembered per buffer.
Solution:   Keep the changelist index per window and buffer. (closes #10135,
            closes #2173)
2022-04-10 17:59:26 +01:00
Yasuhiro Matsumoto
e08fde0073 patch 8.2.4730: MS-Windows GUI: cannot use CTRL-/
Problem:    MS-Windows GUI: cannot use CTRL-/.
Solution:   Handle the WM_KEYUP event. (Yasuhiro Matsumoto, closes #10141)
2022-04-10 12:37:48 +01:00
Aaron Tinio
fa76a24109 patch 8.2.4729: HEEx and Surface templates do not need a separate filetype
Problem:    HEEx and Surface templates do not need a separate filetype.
Solution:   Use Eelixir for the similar filetypes. (Aaron Tinio, closes #10124)
2022-04-10 12:13:56 +01:00
zeertzjq
021996ffaa patch 8.2.4728: no test that v:event cannot be modified
Problem:    No test that v:event cannot be modified.
Solution:   Add a test. (closes #10139)
2022-04-10 11:44:04 +01:00
Dominique Pelle
7765f5cf96 patch 8.2.4727: unused code
Problem:    Unused code.
Solution:   Remove code and add #ifdefs. (Dominique Pellé, closes #10136)
2022-04-10 11:26:53 +01:00
LemonBoy
6013d0045d patch 8.2.4726: cannot use expand() to get the script name
Problem:    Cannot use expand() to get the script name.
Solution:   Support expand('<script>'). (closes #10121)
2022-04-09 21:42:10 +01:00
Bram Moolenaar
2ce97ae6aa patch 8.2.4725: unused variable in tiny build
Problem:    Unused variable in tiny build.
Solution:   Add #ifdef.
2022-04-09 21:13:51 +01:00
LemonBoy
a43993897a patch 8.2.4724: current instance of last search pattern not easily spotted
Problem:    Current instance of last search pattern not easily spotted.
Solution:   Add CurSearch highlighting. (closes #10133)
2022-04-09 21:04:08 +01:00
LemonBoy
2bf52dd065 patch 8.2.4723: the ModeChanged autocmd event is inefficient
Problem:    The ModeChanged autocmd event is inefficient.
Solution:   Avoid allocating memory. (closes #10134)  Rename
            trigger_modechanged() to may_trigger_modechanged().
2022-04-09 18:17:34 +01:00
zeertzjq
81b46a6ccd patch 8.2.4722: ending recording with mapping records too much
Problem:    When a recording is ended with a mapped key that key is also
            recorded.
Solution:   Remember the previous last_recorded_len. (closes #10122)
2022-04-09 17:58:49 +01:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
36951ed1da patch 8.2.4721: cooklang files are not recognized
Problem:    Cooklang files are not recognized.
Solution:   recognize *.cook files. (Goc Dundar, closes #10120)
2022-04-09 16:08:08 +01:00
KnoP-01
b09c320039 patch 8.2.4720: ABB Rapid files are not recognized properly
Problem:    ABB Rapid files are not recognized properly.
Solution:   Add checks for ABB Rapid files. (Patrick Meiser-Knosowski,
            closes #10104)
2022-04-09 15:20:28 +01:00
Bram Moolenaar
0bbf09ca41 patch 8.2.0003: Build file dependencies are incomplete
Problem:    Build file dependencies are incomplete.
Solution:   Fix the dependencies. (Ken Takata, closes #5356)
2022-04-09 15:16:53 +01:00
Christian Brabandt
a0f659c76e patch 8.2.4719: ">" marker sometimes not displayed in the jumplist
Problem:    ">" marker sometimes not displayed in the jumplist.
Solution:   If the buffer no longer exists show "-invalid-". (Christian
            Brabandt, closes #10131, closes #10100)
2022-04-09 13:35:00 +01:00
Bram Moolenaar
cee9c844f2 patch 8.2.4718: @@@ in the last line sometimes drawn in the wrong place
Problem:    @@@ in the last line sometimes drawn in the wrong place.
Solution:   Make sure the column is valid. (closes #10130)
2022-04-09 12:40:13 +01:00
Bram Moolenaar
a016eeba7a patch 8.2.4717: for TextYankPost v:event does not contain all information
Problem:    For TextYankPost v:event does not contain information about the
            operation being inclusive or not.
Solution:   Add "inclusive" to v:event. (Justn M. Keyes, Yegappan Lakshmanan,
            closes #10125)
2022-04-09 11:37:38 +01:00
Yegappan Lakshmanan
7c7e19cf50 patch 8.2.4716: memory allocation failure not tested when defining a function
Problem:    Memory allocation failure not tested when defining a function.
Solution:   Add a test. (Yegappan Lakshmanan, closes #10127)
2022-04-09 11:09:07 +01:00
Julien Voisin
5e1792270a patch 8.2.4715: Vagrantfile not recognized
Problem:    Vagrantfile not recognized.
Solution:   Recognize Vagrantfile as ruby. (Julien Voisin, closes #10119)
2022-04-08 19:55:39 +01:00
Bram Moolenaar
cbaff5e06e Update runtime files 2022-04-08 17:45:08 +01:00
Bram Moolenaar
a8034a4886 patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Problem:    Using g:filetype_dat and g:filetype_src not tested.
Solution:   Add a test. (Patrick Meiser-Knosowski, closes #10117)
2022-04-08 17:26:26 +01:00
LemonBoy
0937182d49 patch 8.2.4713: plugins cannot track text scrolling
Problem:    Plugins cannot track text scrolling.
Solution:   Add the WinScrolled event. (closes #10102)
2022-04-08 15:18:45 +01:00
Yegappan Lakshmanan
18ee0f603e patch 8.2.4712: only get profiling information after exiting
Problem:    Only get profiling information after exiting.
Solution:   Add "profile dump" and "profile stop". (Marco Hinz, Yegappan
            Lakshmanan, closes #10107)
2022-04-08 13:23:19 +01:00
zeertzjq
3a56b6d405 patch 8.2.4711: when 'insermode' is set :edit from <Cmd> mapping misbehaves
Problem:    When 'insermode' is set :edit from <Cmd> mapping misbehaves.
Solution:   Don't set "need_start_insertmode" when already in Insert mode.
            (closes #10116)
2022-04-08 11:56:14 +01:00
Christian Brabandt
ac72c21da6 patch 8.2.4710: smart indenting does not work after completion
Problem:    Smart indenting does not work after completion.
Solution:   Set "can_si". (Christian Brabandt, closes #10113, closes #558)
2022-04-07 21:00:53 +01:00
Bram Moolenaar
5017c66bd4 patch 8.2.4709: after :redraw the statusline highlight might be used
Problem:    After :redraw the statusline highlight might be used.
Solution:   Clear the screen attribute after redrawing the screen.
            (closes #10108)
2022-04-07 18:06:08 +01:00
Julien Voisin
177847e67a patch 8.2.4708: PHP test files are not recognized
Problem:    PHP test files are not recognized.
Solution:   Add the *.phpt pattern. (Julien Voisin, closes #10112)
2022-04-07 16:01:13 +01:00
zeertzjq
8c97960850 patch 8.2.4707: redrawing could be a bit more efficient
Problem:    Redrawing could be a bit more efficient.
Solution:   Optimize redrawing. (closes #10105)
2022-04-07 15:08:01 +01:00
zeertzjq
6a06940f8a patch 8.2.4706: buffer remains active with WinClosed and tabpages
Problem:    Buffer remains active if a WinClosed event throws an exception
            when there are multiple tabpages.
Solution:   Ignore aborting() when closing the buffer. (closes #10101)
2022-04-07 14:08:29 +01:00
zeertzjq
6d4e725a34 patch 8.2.4705: jump list marker disappears
Problem:    Jump list marker disappears.
Solution:   Reset reg_executing later. (closes #10111, closes #10100)
2022-04-07 13:58:04 +01:00
=?UTF-8?q?Dundar=20G=C3=B6c?=
f26c16144d patch 8.2.4704: using "else" after return or break increases indent
Problem:    Using "else" after return or break increases indent.
Solution:   Remove "else" and reduce indent. (Goc Dundar, closes #10099)
2022-04-07 13:26:34 +01:00
Bram Moolenaar
cb49a1d934 patch 8.2.4703: memory leak in handling 'cinscopedecls'
Problem:    Memory leak in handling 'cinscopedecls'.
Solution:   Free the memory before returning.
2022-04-07 13:08:00 +01:00
Tom Praschan
3506cf34c1 patch 8.2.4702: C++ scope labels are hard-coded
Problem:    C++ scope labels are hard-coded.
Solution:   Add 'cinscopedecls' to define the labels. (Rom Praschan,
            closes #10109)
2022-04-07 12:39:08 +01:00
Bram Moolenaar
3ad2090316 patch 8.2.4701: Kuka Robot Language files not recognized
Problem:    Kuka Robot Language files not recognized.
Solution:   Recognize *.src and *.dat files. (Patrick Meiser-Knosowski,
            closes #10096)
2022-04-06 18:57:39 +01:00
Bram Moolenaar
c947b9ae41 patch 8.2.4700: buffer remains active if WinClosed event throws an exception
Problem:    Buffer remains active if a WinClosed event throws an exception.
Solution:   Ignore aborting() when closing the buffer. (closes #10097)
2022-04-06 17:59:21 +01:00
LemonBoy
75a0f3c011 patch 8.2.4699: hard to reproduce hang when reading from a channel
Problem:    Hard to reproduce hang when reading from a channel.
Solution:   Check for readahead before starting to wait. (closes #10093,
            closes #7781, closes #6364)
2022-04-05 22:03:30 +01:00
Bram Moolenaar
aa7d0c2335 patch 8.2.4698: Vim9: script variable has no flag that it was set
Problem:    Vim9: script variable has no flag that it was set.
Solution:   Add a flag that it was set, to avoid giving it a value when used.
            (closes #10088)
2022-04-05 21:40:38 +01:00
Bram Moolenaar
0d1f55c044 patch 8.2.4697: Vim9: crash when adding a duplicate key to a dictionary
Problem:    Vim9: crash when adding a duplicate key to a dictionary.
Solution:   Clear the stack item when it has been moved into the dictionary.
            (closes #10087)
2022-04-05 17:30:29 +01:00
zeertzjq
478700336d patch 8.2.4696: delete() with "rf" argument does not report a failure
Problem:    delete() with "rf" argument does not report a failure.
Solution:   Return -1 if the directory could not be removed. (closes #10078)
2022-04-05 15:31:01 +01:00
LemonBoy
beb0ef1ab2 patch 8.2.4695: JSON encoding could be faster
Problem:    JSON encoding could be faster.
Solution:   Optimize encoding JSON strings. (closes #10086)
2022-04-05 15:07:32 +01:00
ichizok
02560424bf patch 8.2.4694: avoidance of #elif causes more preproc nesting
Problem:    Avoidance of #elif causes more preproc nesting.
Solution:   Use #elif where it is useful. (Ozaki Kiichi, closes #10081)
2022-04-05 14:18:44 +01:00
Bram Moolenaar
72bb10df1f patch 8.2.4693: new regexp does not accept pattern "\%>0v"
Problem:    new regexp does not accept pattern "\%>0v".
Solution:   Do accept digit zero.
2022-04-05 14:00:32 +01:00
zeertzjq
0f68e6c07a patch 8.2.4692: no test for what 8.2.4691 fixes
Problem:    No test for what 8.2.4691 fixes.
Solution:   Add a test.  Use a more generic sotlution. (closes #10090)
2022-04-05 13:17:01 +01:00
Bram Moolenaar
ca9d8d2cb9 patch 8.2.4691: solution for <Cmd> in a mapping causes trouble
Problem:    Solution for <Cmd> in a mapping causes trouble.
Solution:   Use another solution: put back CTRL-O after reading the <Cmd>
            sequence.
2022-04-04 22:09:30 +01:00
LemonBoy
1b76a8dfe2 patch 8.2.4690: channel tests fail on MS-Windows
Problem:    Channel tests fail on MS-Windows.
Solution:   Check if the AF_UNIX attribute exists. (closes #10083)
2022-04-04 21:13:35 +01:00
Bram Moolenaar
d0fb2d8041 patch 8.2.4689: using <Cmd> in a mapping does not work for mouse keys
Problem:    Using <Cmd> in a mapping does not work for mouse keys in Insert
            mode. (Sergey Vlasov)
Solution:   When reading the <Cmd> argument do not use the stuff buffer.
            (closes #10080)
2022-04-04 21:03:52 +01:00
Bram Moolenaar
91ff3d4f52 patch 8.2.4688: new regexp engine does not give an error for "\%v"
Problem:    New regexp engine does not give an error for "\%v".
Solution:   Check for a value argument. (issue #10079)
2022-04-04 18:32:32 +01:00
Bram Moolenaar
e8a4c0d91f patch 8.2.4687: "vimgrep /\%v/ *" may cause a crash
Problem:    "vimgrep /\%v/ *" may cause a crash.
Solution:   When compiling the pattern with the old engine fails, restore the
            regprog of the new engine instead of leaving it NULL.
            (closes #10079)
2022-04-04 18:14:34 +01:00
Kelvin Lee
b471690fad patch 8.2.4686: configure doesn't find the Motif library with Cygwin
Problem:    Configure doesn't find the Motif library with Cygwin.
Solution:   Check for libXm.dll.a. (Kelvin Lee, closes #10077)
2022-04-04 17:20:01 +01:00
Bram Moolenaar
188639d75c patch 8.2.4685: when a swap file is found for a popup there is no dialog
Problem:    When a swap file is found for a popup there is no dialog and the
            buffer is loaded anyway.
Solution:   Silently load the buffer read-only. (closes #10073)
2022-04-04 16:57:21 +01:00
LemonBoy
cc766a85f4 patch 8.2.4684: cannot open a channel on a Unix domain socket
Problem:    Cannot open a channel on a Unix domain socket.
Solution:   Add Unix domain socket support. (closes #10062)
2022-04-04 15:46:58 +01:00
Yegappan Lakshmanan
4829c1c9e9 patch 8.2.4683: verbose check with dict_find() to see if a key is present
Problem:    Verbose check with dict_find() to see if a key is present.
Solution:   Add dict_has_key(). (Yegappan Lakshmanan, closes #10074)
2022-04-04 15:16:54 +01:00
Bram Moolenaar
7a411a306f patch 8.2.4682: Vim9: can use :unlockvar for const variable
Problem:    Vim9: can use :unlockvar for const variable. (Ernie Rael)
Solution:   Check whether the variable is a const.
2022-04-04 14:58:06 +01:00
Bram Moolenaar
15f74fab65 patch 8.2.4681: build fails with a combination of features
Problem:    Build fails with a combination of features.
Solution:   Remove #ifdef for alloc_clear_id(). (John Marriott)
2022-04-03 21:57:26 +01:00
Bram Moolenaar
242c152c08 patch 8.2.4680: build failure without +postscript
Problem:    Build failure without +postscript.
Solution:   Use another error message.
2022-04-03 21:52:51 +01:00
Yegappan Lakshmanan
2b74b6805b patch 8.2.4679: cannot have expandcmd() give an error message for mistakes
Problem:    Cannot have expandcmd() give an error message for mistakes.
Solution:   Add an optional argument to give errors. Fix memory leak when
            expanding files fails. (Yegappan Lakshmanan, closes #10071)
2022-04-03 21:30:32 +01:00
Bram Moolenaar
1061195057 patch 8.2.4678: Vim9: not all code is tested
Problem:    Vim9: not all code is tested.
Solution:   Add a few more tests.
2022-04-03 21:11:34 +01:00
Bram Moolenaar
0b962e5685 patch 8.2.4677: the Athena GUI support is outdated
Problem:    The Athena GUI support is outdated.
Solution:   Remove the Athena GUI code.
2022-04-03 18:02:37 +01:00
Bram Moolenaar
292e1b9f68 patch 8.2.4676: test fails with different error
Problem:    Test fails with different error.
Solution:   Add argument for :elseif.
2022-04-03 16:59:02 +01:00
Bram Moolenaar
fa010cdfb1 patch 8.2.4675: no error for missing expression after :elseif
Problem:    No error for missing expression after :elseif. (Ernie Rael)
Solution:   Check for missing expression. (closes #10068)
2022-04-03 16:13:07 +01:00
Ernie Rael
c4cb544cd5 patch 8.2.4674: cannot force getting MouseMove events
Problem:    Cannot force getting MouseMove events.
Solution:   Add the 'mousemoveevent' option with implementaiton for the GUI.
            (Ernie Rael, closes #10044)
2022-04-03 15:47:28 +01:00
Bram Moolenaar
8ef6997e2d patch 8.2.4673: redrawing a split window is slow when using CTRL-F and CTRL-B
Problem:    Redrawing a vertically split window is slow when using CTRL-F and
            CTRL-B.
Solution:   When deciding on USE_REDRAW bail out if scrolling more than three
            lines. (issue #8002)
2022-04-03 13:23:22 +01:00
Bram Moolenaar
ce416b453a patch 8.2.4672: using :normal with Ex mode may make :substitute hang
Problem:    Using :normal with Ex mode may make :substitute hang.
Solution:   When getting an empty line behave like 'q' was typed.
            (closes #10070)
2022-04-03 12:59:34 +01:00
LemonBoy
a3157a476b patch 8.2.4671: 'wildignorecase' is sometimes not used for glob()
Problem:    'wildignorecase' is sometimes not used for glob().
Solution:   Also use 'wildignorecase' when there are no wildcards.
            (closes #10066, closes #8350)
2022-04-03 11:58:31 +01:00
Yegappan Lakshmanan
72bb47e38f patch 8.2.4670: memory allocation failures for new tab page not tested
Problem:    Memory allocation failures for new tab page not tested.
Solution:   Add tests with failing memory allocation. (Yegappan Lakshmanan,
            closes #10067)
2022-04-03 11:22:38 +01:00
LemonBoy
58f331a05f patch 8.2.4669: in compiled code len('string') is not inlined
Problem:    In compiled code len('string') is not inlined.
Solution:   Compute the length at compile time if possible. (closes #10065)
2022-04-02 21:59:06 +01:00
Yegappan Lakshmanan
0dac1ab579 patch 8.2.4668: buffer allocation failures insufficiently tested
Problem:    Buffer allocation failures insufficiently tested.
Solution:   Add tests for memory allocation failures. (Yegappan Lakshmanan,
            closes #10064)
2022-04-02 21:46:19 +01:00
Yegappan Lakshmanan
5018a836c0 patch 8.2.4667: expandcmd() fails on an error
Problem:    expandcmd() fails on an error.
Solution:   On failure return the command unmodified. (yegappan Lakshmanan,
            closes #10063)
2022-04-02 21:12:21 +01:00
Bram Moolenaar
97f8c1081e patch 8.2.4666: Vim9: assignment not recognized in skipped block
Problem:    Vim9: assignment not recognized in skipped block.
Solution:   When skipping assume identifier exists. (closes #10059)
2022-04-02 19:43:57 +01:00
Bram Moolenaar
eabddc425e patch 8.2.4665: popup with "minwidth" and scrollbar not updated properly
Problem:    Popup with "minwidth" and scrollbar not updated properly.
Solution:   Adjust the computation if the window width. (closes #10061)
2022-04-02 15:32:16 +01:00
Bruno Roque
c1658a196b patch 8.2.4664: Elvish files are not recognized
Problem:    Elvish files are not recognized.
Solution:   Recognize .elv files. (Bruno Roque, closes #10058)
2022-04-02 10:48:24 +01:00
Bram Moolenaar
17fa233f6f patch 8.2.4663: occasional crash when running the GUI tests
Problem:    Occasional crash when running the GUI tests.
Solution:   Check that the line index is not too high. (closes #8681)
2022-04-01 19:44:47 +01:00
Bram Moolenaar
22ebd172e4 patch 8.2.4662: no error for using out of range list index
Problem:    No error for using out of range list index.
Solution:   Check list index at script level like in compiled function.
            (closes #10051)
2022-04-01 15:26:58 +01:00
Bram Moolenaar
ffe6e646dc patch 8.2.4661: Coverity warning for using uninitialized variable
Problem:    Coverity warning for using uninitialized variable.
Solution:   Initialize variable to NULL.
2022-04-01 13:23:47 +01:00
Bram Moolenaar
782c6744b4 patch 8.2.4660: cursorcolumn is sometimes not correct
Problem:    Cursorcolumn is sometimes not correct.
Solution:   Recompute the cursor column when entering Insert mode and the
            cursor is on a character wider than a screen cell.
2022-04-01 12:06:31 +01:00
Bram Moolenaar
96e08e028c patch 8.2.4659: invalid memory access when using printable function name
Problem:    Invalid memory access when using printable function name.
Solution:   Adjust copied name length.
2022-03-31 21:40:33 +01:00
ranjithshegde
3a6f952cc8 patch 8.2.4658: org-mode files are not recognized
Problem:    Org-mode files are not recognized.
Solution:   Add patterns to recognize "org" files. (closes #10046)
2022-03-31 20:24:35 +01:00
Bram Moolenaar
a6c18d38ca patch 8.2.4657: errors for functions are sometimes hard to read
Problem:    Errors for functions are sometimes hard to read.
Solution:   Use printable_func_name() in more places.
2022-03-31 20:02:56 +01:00
Bram Moolenaar
ccbfd4883f patch 8.2.4656: Vim9: can't use item from "import autoload" with autoload dir
Problem:    Vim9: can't use items from "import autoload" with autoload
            directory name.
Solution:   Let sn_autoload_prefix overrule sn_import_autoload.
            (closes #10054)
2022-03-31 16:18:23 +01:00
Yegappan Lakshmanan
1104a6d0c2 patch 8.2.4655: cmdline completion popup menu positioned wrong
Problem:    Command line completion popup menu positioned wrong when using a
            terminal window.
Solution:   Position the popup menu differently when editing the command line.
            (Yegappan Lakshmanan, closes #10050, closes #10035)
2022-03-31 12:34:15 +01:00
Bram Moolenaar
49d008d96b patch 8.2.4654: missing changes for import check
Problem:    Missing changes for import check.
Solution:   Add missing changes.
2022-03-31 11:51:21 +01:00
Bram Moolenaar
4dea2d92e4 patch 8.2.4653: "import autoload" does not check the file name
Problem:    "import autoload" does not check the file name.
Solution:   Give an error if the file is not readable. (closes #10049)
2022-03-31 11:37:57 +01:00
Bram Moolenaar
d1d2684c80 patch 8.2.4652: leaking memory if assignment fails
Problem:    Leaking memory if assignment fails.
Solution:   Clear assigned value on failure.
2022-03-31 10:13:47 +01:00
Bram Moolenaar
1712518f48 patch 8.2.4651: test fails because path differs
Problem:    Test fails because path differs.
Solution:   Only compare the tail of the path.
2022-03-30 21:57:50 +01:00
Bram Moolenaar
c0ceeeb839 patch 8.2.4650: "import autoload" only works with using 'runtimepath'
Problem:    "import autoload" only works with using 'runtimepath'.
Solution:   Also support a relative and absolute file name.
2022-03-30 21:12:27 +01:00
Bram Moolenaar
b4ad3b0dea patch 8.2.4649: various formatting problems
Problem:    Various formatting problems.
Solution:   Improve the code formatting.
2022-03-30 10:57:45 +01:00
Bram Moolenaar
46eea444d9 Update runtime files 2022-03-30 10:51:39 +01:00
Yegappan Lakshmanan
9247a221ce patch 8.2.4648: handling LSP messages is a bit slow
Problem:    Handling LSP messages is a bit slow.
Solution:   Included support for LSP messages. (Yegappan Lakshmanan,
            closes #10025)
2022-03-30 10:16:05 +01:00
Bram Moolenaar
2bdad61267 patch 8.2.4647: "source" can read past end of copied line
Problem:    "source" can read past end of copied line.
Solution:   Add a terminating NUL.
2022-03-29 19:52:12 +01:00
Bram Moolenaar
b55986c52d patch 8.2.4646: using buffer line after it has been freed
Problem:    Using buffer line after it has been freed in old regexp engine.
Solution:   After getting mark get the line again.
2022-03-29 13:24:58 +01:00
James Cherti
fd01280d01 patch 8.2.4645: 'shortmess' changed when session does not store options
Problem:    'shortmess' changed when session does not store options.
Solution:   Save and restore 'shortmess' if needed. (James Charti,
            closes #10037)
2022-03-29 12:02:57 +01:00
Lewis Russell
1624639ec8 patch 8.2.4644: redrawing too often when 'relativenumber' is set
Problem:    Redrawing too often when 'relativenumber' is set.
Solution:   Only redraw when the cursor line changed. (Lewis Russell,
            closes #10040)
2022-03-29 11:38:17 +01:00
Bram Moolenaar
24565cf27b patch 8.2.4643: Vim9: variable may be locked unintentionally
Problem:    Vim9: variable may be locked unintentionally.
Solution:   Clear "v_lock". (closes #10036)
2022-03-28 18:16:52 +01:00
Bram Moolenaar
859cc21c6b patch 8.2.4642: Vim9: in :def function script var cannot be null
Problem:    Vim9: in :def function script var cannot be null.
Solution:   Only initialize a script variable when not set to a null value.
            (closes #10034)
2022-03-28 15:22:35 +01:00
Bram Moolenaar
471b3aed3e patch 8.2.4641: may mark the wrong window for redrawing
Problem:    May mark the wrong window for redrawing.
Solution:   Use redraw_win_later(). (closes #10032)
2022-03-28 12:41:19 +01:00
James McCoy
8be423b7ac patch 8.2.4640: some boolean options use "long" instead of "int"
Problem:    Some boolean options use "long" instead of "int".
Solution:   Adjust the type. (James McCoy, closes #10033)
2022-03-28 11:55:12 +01:00
kylo252
9dac9b1751 patch 8.2.4639: not sufficient parenthesis in preprocessor macros
Problem:    Not sufficient parenthesis in preprocessor macros.
Solution:   Add more parenthesis. (closes #10031)
2022-03-27 20:05:17 +01:00
zeertzjq
3e559cd884 patch 8.2.4638: superfluous check if a redraw is needed for 'cursorline'
Problem:    Superfluous check if a redraw is needed for 'cursorline'.
Solution:   Remove check_redraw_cursorline(). (closes #10030, closes #10029)
2022-03-27 19:26:55 +01:00
Bram Moolenaar
565d1278cb patch 8.2.4637: warning for using uninitialized variable
Problem:    Warning for using uninitialized variable. (Tony Mechelynck)
Solution:   Initialize it.
2022-03-27 18:11:05 +01:00
Bram Moolenaar
1501b63f8d patch 8.2.4636: not using Visual range
Problem:    Not using Visual range.
Solution:   Put the command pointer back to the range.
2022-03-27 16:56:21 +01:00
310 changed files with 9317 additions and 9450 deletions

View File

@@ -21,6 +21,7 @@ jobs:
TEST: test
SRCDIR: ./src
LEAK_CFLAGS: -DEXITFREE
CFLAGS: -Wno-error=deprecated-declarations
LOG_DIR: ${{ github.workspace }}/logs
TERM: xterm
DISPLAY: ':99'
@@ -88,17 +89,25 @@ jobs:
fi
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'
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
. /etc/lsb-release
sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-13 main"
sudo apt-get install -y clang-13 llvm-13
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-13 100
sudo update-alternatives --set clang /usr/bin/clang-13
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-13 100
sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-13 100
sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-14 main"
sudo apt install -y clang-14 llvm-14
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 100
sudo update-alternatives --set clang /usr/bin/clang-14
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-14 100
- name: Set up environment
run: |
@@ -245,7 +254,7 @@ jobs:
- name: Codecov
if: matrix.coverage
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}

View File

@@ -446,10 +446,6 @@ SRC_UNIX = \
src/create_cmdidxs.vim \
src/create_nvcmdidxs.c \
src/create_nvcmdidxs.vim \
src/gui_at_fs.c \
src/gui_at_sb.c \
src/gui_at_sb.h \
src/gui_athena.c \
src/gui_gtk.c \
src/gui_gtk_f.c \
src/gui_gtk_f.h \
@@ -474,7 +470,6 @@ SRC_UNIX = \
src/osdef1.h.in \
src/osdef2.h.in \
src/pathdef.sh \
src/proto/gui_athena.pro \
src/proto/gui_gtk.pro \
src/proto/gui_gtk_x11.pro \
src/proto/gui_gtk_gresources.pro \

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last Change: 2022 Mar 05
# Last Change: 2022 Apr 06
# These functions are moved here from runtime/filetype.vim to make startup
# faster.
@@ -107,6 +107,25 @@ export def BindzoneCheck(default = '')
endif
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()
if exists("g:lpc_syntax_for_c")
var lnum = 1
@@ -168,7 +187,7 @@ enddef
export def FTent()
# 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.
var lnum = 1
while lnum < 6
@@ -410,6 +429,36 @@ export def FTmm()
setf nroff
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()
if exists("g:filetype_pl")
exe "setf " .. g:filetype_pl
@@ -526,6 +575,18 @@ export def FTpp()
endif
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()
var max = line("$") > 50 ? 50 : line("$")
@@ -572,7 +633,7 @@ export def McSetf()
return
endif
endfor
setf m4 " Default: Sendmail .mc file
setf m4 # Default: Sendmail .mc file
enddef
# Called from filetype.vim and scripts.vim.
@@ -708,6 +769,28 @@ export def SQL()
endif
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
# it is almost certainly a Perl test file.
# If the first line starts with '#' and contains 'perl' it's probably a Perl
@@ -735,6 +818,16 @@ export def FTperl(): number
return 0
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:
# 1. Check the first line of the file for "%&<format>".
# 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords.
@@ -896,6 +989,26 @@ export def FTtf()
setf tf
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
# defcompile

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 8.2. Last change: 2022 Mar 04
*autocmd.txt* For Vim version 8.2. Last change: 2022 Apr 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -402,6 +402,8 @@ Name triggered by ~
|User| to be used in combination with ":doautocmd"
|SigUSR1| after the SIGUSR1 signal has been detected
|WinScrolled| after scrolling or resizing a window
The alphabetical list of autocommand events: *autocmd-events-abc*
@@ -690,9 +692,9 @@ CursorHoldI Just like CursorHold, but in Insert mode.
CursorMoved After the cursor was moved in Normal or Visual
mode. Also when the text of the cursor line
has been changed, e.g., with "x", "rx" or "p".
Not triggered when there is typeahead, while
executing commands in a script file, when
an operator is pending or when moving to
Not always triggered when there is typeahead,
while executing commands in a script file,
when an operator is pending or when moving to
another window while remaining at the same
cursor position.
For an example see |match-parens|.
@@ -1203,6 +1205,9 @@ TextYankPost After text has been yanked or deleted in the
current buffer. The following values of
|v:event| can be used to determine the operation
that triggered this autocmd:
inclusive TRUE if the motion is
|inclusive| else the motion is
|exclusive|.
operator The operation performed.
regcontents Text that was stored in the
register, as a list of lines,
@@ -1228,7 +1233,13 @@ User Never executed automatically. To be used for
Note that when `:doautocmd User MyEvent` is
used while there are no matching autocommands,
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 After the SIGUSR1 signal has been detected.
@@ -1317,10 +1328,23 @@ WinNew When a new window was created. Not done for
the first window, when Vim has just started.
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}*
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: >
:autocmd BufRead *.txt,*.info set et
Is equivalent to: >

View File

@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 8.2. Last change: 2022 Mar 08
*builtin.txt* For Vim version 8.2. Last change: 2022 Apr 06
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}
expand({expr} [, {nosuf} [, {list}]])
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}])
List/Dict insert items of {expr2} into {expr1}
extendnew({expr1}, {expr2} [, {expr3}])
@@ -1562,14 +1563,15 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
or another valid interrupt key, confirm() returns 0.
An example: >
:let choice = confirm("What do you want?", "&Apples\n&Oranges\n&Bananas", 2)
:if choice == 0
: echo "make up your mind!"
:elseif choice == 3
: echo "tasteful"
:else
: echo "I prefer bananas myself."
:endif
let choice = confirm("What do you want?",
\ "&Apples\n&Oranges\n&Bananas", 2)
if choice == 0
echo "make up your mind!"
elseif choice == 3
echo "tasteful"
else
echo "I prefer bananas myself."
endif
< In a GUI dialog, buttons are used. The layout of the buttons
depends on the 'v' flag in 'guioptions'. If it is included,
the buttons are always put vertically. Otherwise, confirm()
@@ -1752,7 +1754,10 @@ deepcopy({expr} [, {noref}]) *deepcopy()* *E698*
delete({fname} [, {flags}]) *delete()*
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
{fname}. This fails when directory {fname} is not empty.
@@ -1762,8 +1767,6 @@ delete({fname} [, {flags}]) *delete()*
Note: on MS-Windows it is not possible to delete a directory
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
operation was successful and -1/true when the deletion failed
or partly failed.
@@ -2267,6 +2270,9 @@ expand({string} [, {nosuf} [, {list}]]) *expand()*
is not defined, an empty string is used. Using "%:p" in a
buffer with no name, results in the current directory, with a
'/' 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
expanded like a file name is expanded on the command line.
@@ -2292,16 +2298,28 @@ expand({string} [, {nosuf} [, {list}]]) *expand()*
Can also be used as a |method|: >
Getpattern()->expand()
expandcmd({string}) *expandcmd()*
expandcmd({string} [, {options}]) *expandcmd()*
Expand special items in String {string} like what is done for
an Ex command such as `:edit`. This expands special keywords,
like with |expand()|, and environment variables, anywhere in
{string}. "~user" and "~/path" are only expanded at the
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()
<
extend({expr1}, {expr2} [, {expr3}]) *extend()*
@@ -2727,7 +2745,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
allow a window to bring itself to the foreground. Use
|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}
fullcommand({name}) *fullcommand()*
@@ -4819,6 +4837,8 @@ json_encode({expr}) *json_encode()*
Note that NaN and Infinity are passed on as values. This is
missing in the JSON standard, but several implementations do
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|: >
GetObject()->json_encode()
@@ -5561,7 +5581,7 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
If {list} is a list of dictionaries, then the optional {dict}
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
string.
text_cb |Funcref| that will be called for every item
@@ -5569,6 +5589,8 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
This should accept a dictionary item as the
argument and return the text for that item to
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
matching is NOT supported. The maximum supported {str} length
@@ -5581,6 +5603,9 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
empty list is returned. If length of {str} is greater than
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
matching strings.
@@ -6009,8 +6034,10 @@ printf({fmt}, {expr1} ...) *printf()*
When used as a |method| the base is passed as the second
argument: >
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
%6S string right-aligned in 6 display cells
%6s string right-aligned in 6 bytes
@@ -6679,7 +6706,7 @@ remote_foreground({server}) *remote_foreground()*
Can also be used as a |method|: >
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}
@@ -10011,7 +10038,7 @@ footer Compiled with GUI footer support. |gui-footer|
fork Compiled to use fork()/exec() instead of system().
gettext Compiled with message translation |multi-lang|
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_gtk Compiled with GTK+ GUI (any version).
gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).

View File

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

View File

@@ -939,7 +939,7 @@ Note: these are typed literally, they are not special keys!
file name of the sourced file. *E498*
When executing a legacy function, is replaced with the call
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
*E1245* .
Note that filename-modifiers are useless when <sfile> is
@@ -951,6 +951,12 @@ Note: these are typed literally, they are not special keys!
".." in between items. E.g.:
"function {function-name1}[{lnum}]..{function-name2}[{lnum}]"
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> When executing a ":source" command, is replaced with the
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 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1224,7 +1224,7 @@ Examples: >
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
{command}. At present this works for |:e|, |:w|,
|:wall|, |:wq|, |:wqall|, |:x|, |:xall|, |:exit|,
@@ -1235,7 +1235,7 @@ If you want to always use ":confirm", set the 'confirm' option.
|:diffsplit|, |:diffpatch|, |:open|, |:pedit|,
|:redir|, |:source|, |:update|, |:visual|, |:vsplit|,
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
autocommand group exists}
When ":browse" is not possible you get an error

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 06
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 ~
*Funcref* *E695* *E718* *E1086* *E1192*
*Funcref* *E695* *E718* *E1192*
A Funcref variable is obtained with the |function()| function, the |funcref()|
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
@@ -261,7 +261,7 @@ position in the sequence.
List creation ~
*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: >
:let mylist = [1, two, 3, "four"]
:let emptylist = []
@@ -514,7 +514,7 @@ ordering.
Dictionary creation ~
*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
only appear once. Examples: >
:let mydict = {1: 'one', 2: 'two', 3: 'three'}
@@ -3224,14 +3224,32 @@ declarations and assignments do not use a command. |vim9-declaration|
*:let=<<* *:let-heredoc*
*E990* *E991* *E172* *E221* *E1145*
:let {var-name} =<< [trim] {endmarker}
:let {var-name} =<< [trim] [eval] {endmarker}
text...
text...
{endmarker}
Set internal variable {var-name} to a |List|
containing the lines of text bounded by the string
{endmarker}. The lines of text is used as a
|literal-string|.
{endmarker}.
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.
Currenty, in a compiled function {expr} is evaluated
when compiling the function, THIS WILL CHANGE.
{endmarker} must not contain white space.
{endmarker} cannot start with a lower case character.
The last line should end only with the {endmarker}
@@ -3281,6 +3299,13 @@ text...
1 2 3 4
5 6 7 8
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*
:let {var-name} .. List the value of variable {var-name}. Multiple

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 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -142,19 +142,28 @@ variables can be used to overrule the filetype used for certain extensions:
*.asm g:asmsyntax |ft-asm-syntax|
*.asp g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax|
*.bas g:filetype_bas |ft-basic-syntax|
*.cfg g:filetype_cfg
*.dat g:filetype_dat
*.frm g:filetype_frm |ft-form-syntax|
*.fs g:filetype_fs |ft-forth-syntax|
*.i g:filetype_i |ft-progress-syntax|
*.inc g:filetype_inc
*.m g:filetype_m |ft-mathematica-syntax|
*.mod g:filetype_mod
*.p g:filetype_p |ft-pascal-syntax|
*.pl g:filetype_pl
*.pp g:filetype_pp |ft-pascal-syntax|
*.prg g:filetype_prg
*.src g:filetype_src
*.sys g:filetype_sys
*.sh g:bash_is_sh |ft-sh-syntax|
*.tex g:tex_flavor |ft-tex-plugin|
*.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*
To avoid that certain files are being inspected, the g:ft_ignore_pat variable
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
@@ -559,7 +559,7 @@ the SQL completion plugin. >
< 1. After typing SELECT press <C-C>t to display a list of tables.
2. Highlight the table you need the column list for.
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.
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
@@ -613,7 +613,7 @@ your |vimrc|: >
>
omni_sql_use_tbl_alias
< - 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
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
@@ -697,9 +697,9 @@ plugin. >
<C-C>c
< - Displays a list of columns for a specific table. >
<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
< - 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. >
<Right>
< - 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
@@ -25,7 +25,7 @@ Other GUI documentation:
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
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".
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
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|.
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
text of the current cursor line.
*athena-intellimouse*
*motif-intellimouse*
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
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|
'mousemodel' what mouse button does which action
'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
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
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.
@@ -742,7 +746,7 @@ because the item will never be selected. Use a single colon to keep it
simple.
*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
default toolbar is setup in menu.vim.
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.
*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
button is pressed, if 'mousemodel' is set to popup or popup_setpos.
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's Graphical User Interface *gui-x11* *GUI-X11*
*Athena* *Motif*
*Motif*
1. Starting the X11 GUI |gui-x11-start|
2. GUI Resources |gui-resources|
3. Shell Commands |gui-pty|
@@ -64,7 +64,7 @@ flag in 'guioptions'. |-f|.
==============================================================================
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
"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).
scrollbarWidth Thickness of scrollbars.
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
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: >
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
in either Motif or Athena is through the resource: >
in Motif is through the resource: >
Vim.menuFont: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
Or, when compiled with the |+xfontset| feature: >
Vim.menuFontSet: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
@@ -255,7 +251,7 @@ For example: >
:10vmenu File.Print :w !lpr -Php3
<
*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
the builtin icon used. Unfortunately, how you should install it depends on
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.
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
fail, the GUI will be disabled.
If both fail, the GUI will be disabled.
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.
@@ -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
GTK+ 3.
Otherwise, if you are using Motif or Athena, when you have the Motif or Athena
files in a directory where configure doesn't look, edit the Makefile to enter
the names of the directories. Search for "GUI_INC_LOC" for an example to set
the Motif directories, "CONF_OPT_X" for Athena.
Otherwise, if you are using Motif, when you have the Motif files in a
directory where configure doesn't look, edit the Makefile to enter the names
of the directories. Search for "GUI_INC_LOC" for an example to set
the Motif directories.
*gui-x11-gtk*
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
reported to work fine too.
*gui-x11-athena*
The Athena version uses the Xaw widget set by default. If you have the 3D
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-athena* *gui-x11-neXtaw*
Support for the Athena GUI and neXtaw was removed in patch 8.2.4677.
*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
X11R5 with a library for X11R6 probably doesn't work (although the linking
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
@@ -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
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.
'cinkeys' Specifies which keys trigger reindenting in insert mode.
'cinoptions' Sets your preferred indent style.
'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
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*
gN Place C++ scope declarations N characters from the indent of the
block they are in. (default 'shiftwidth'). A scope declaration
can be "public:", "protected:" or "private:".
block they are in. (default 'shiftwidth'). By default, a scope
declaration is "public:", "protected:" or "private:". This can
be adjusted with the 'cinscopedecls' option.
cino= cino=g0 >
{ {

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 8.2. Last change: 2022 Mar 13
*insert.txt* For Vim version 8.2. Last change: 2022 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -272,7 +272,7 @@ CTRL-] Trigger abbreviation, without inserting a character.
*i_backspacing*
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 ~
indent allow backspacing over autoindent
@@ -800,7 +800,7 @@ If the previous expansion was split, because it got longer than 'textwidth',
then just the text in the current line will be used.
If the match found is at the end of a line, then the first word in the next
line will be inserted and the message "word from next line" displayed, if
line will be inserted and the message "Word from other line" displayed, if
this word is accepted the next CTRL-X CTRL-P or CTRL-X CTRL-N will search
for those lines starting with this word.
@@ -1196,7 +1196,7 @@ three lines, but 'previewheight' is used when it has a value of 1 or 2.
*complete-popup*
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
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:
height maximum height 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
@@ -213,7 +213,7 @@ Vim would never have become what it is now, without the help of these people!
Daniel Elstner GTK+ 2 port
Eric Fischer Mac port, 'cindent', and other improvements
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
Loic Grenie xvim (ideas for multi windows version)
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 03
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
|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->*
To map a character by its decimal, octal or hexadecimal number the <Char>
construct can be used:

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.
@@ -702,7 +702,7 @@ USING RESOURCE FILES
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.
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*fontSet: |base_font_name_list|
@@ -1280,7 +1280,7 @@ internally.
Vim has comprehensive UTF-8 support. It works well in:
- xterm with UTF-8 support enabled
- Athena, Motif and GTK GUI
- Motif and GTK GUI
- MS-Windows GUI
- several other platforms

View File

@@ -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.
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*
@@ -445,35 +446,35 @@ between Vi and Vim.
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
stops below a '}' in the first column. |exclusive|
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|
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|
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|
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 window).
The marker ">" indicates the current position in the jumplist. It may not be
shown when filtering the |:jump| command using |:filter|
You are currently in line 1167. If you then use the CTRL-O command, the
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.
@@ -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.
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,
Athena and Motif.
by gvim when it is run with one of the following GUIs: GTK, GNOME, Windows
and Motif.
*netbeans-xpm*
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.
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 13
*options.txt* For Vim version 8.2. Last change: 2022 Apr 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -87,7 +87,7 @@ achieve special effects. These options come in three forms:
:se[t] {option}+={value} *:set+=*
Add the {value} to a number option, or append 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.
If the option is a list of flags, superfluous flags
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^=*
Multiply the {value} to a number option, or prepend
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.
Also see |:set-args| above.
@@ -987,7 +987,8 @@ A jump table for the options with a short description can be found at |Q_op|.
nostop like start, except CTRL-W and CTRL-U do not stop at the start of
insert.
When the value is empty, Vi compatible backspacing is used.
When the value is empty, Vi compatible backspacing is used, none of
the ways mentioned for the items above are possible.
For backwards compatibility with version 5.4 and earlier:
value effect ~
@@ -1018,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")
global or local to buffer |global-local|
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:
"yes" make a copy of the file and overwrite the original one
@@ -1042,10 +1043,10 @@ A jump table for the options with a short description can be found at |Q_op|.
file.
- 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
is possible without side effects (the attributes can be passed on and
the file is not a link) that is used. When problems are expected, a
copy will be made.
The "auto" value is the middle way: When Vim sees that renaming the
file is possible without side effects (the attributes can be passed on
and the file is not a link) that is used. When problems are expected,
a copy will be made.
The "breaksymlink" and "breakhardlink" values can be used in
combination with any of "yes", "no" and "auto". When included, they
@@ -1064,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
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
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
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
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
@@ -1137,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
prefer using ".bak", but make sure that you don't have files with
".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
autocommand to change 'backupext' just before writing the file to
@@ -1264,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
will be silenced. This is most useful to specify specific events in
insert mode to be silenced.
You can also make it flash by using 'visualbell'.
item meaning when present ~
all All events.
@@ -1289,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|.
shell Bell from shell output |:!|.
spell Error happened on spell suggest.
term Bell from |:terminal| output.
wildmode More matches in |cmdline-completion| available
(depends on the 'wildmode' setting).
@@ -1401,7 +1404,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'browsedir'* *'bsdir'*
'browsedir' 'bsdir' string (default: "last")
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:
last Use same directory as with last file browser, where a
file was opened or saved.
@@ -1415,16 +1418,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
displayed in a window:
<empty> follow the global 'hidden' option
hide hide the buffer (don't unload it), also when 'hidden'
is not set
unload unload the buffer, also when 'hidden' is set or using
|:hide|
delete delete the buffer from the buffer list, also when
'hidden' is set or using |:hide|, like using
|:bdelete|
wipe wipe out the buffer from the buffer list, also when
'hidden' is set or using |:hide|, like using
|:bwipeout|
hide hide the buffer (don't unload it), even if 'hidden' is
not set
unload unload the buffer, even if 'hidden' is set; the
|:hide| command will also unlod the buffer
delete delete the buffer from the buffer list, even if
'hidden' is set; the |:hide| command will also delete
the buffer, making it behave like |:bdelete|
wipe wipe the buffer from the buffer list, even if
'hidden' is set; the |:hide| command will also wipe
out the buffer, making it behave like |:bwipeout|
CAREFUL: when "unload", "delete" or "wipe" is used changes in a buffer
are lost without a warning. Also, these values may break autocommands
@@ -1660,13 +1663,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:
"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"
for X-windows, "" otherwise)
global
{only in GUI versions or when the |+xterm_clipboard|
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
after that. Therefore do append an item with += but use ^= to
prepend, e.g.: >
@@ -1767,7 +1780,7 @@ A jump table for the options with a short description can be found at |Q_op|.
local to window
{not available when compiled without the |+syntax|
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
text. Will make screen redrawing slower.
The screen column can be an absolute number, or a number preceded with
@@ -1801,7 +1814,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'comments' 'com' string (default
"s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-")
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
insert a space.
@@ -1942,7 +1955,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
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
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)
w scan buffers from other windows
b scan other loaded buffers that are in the buffer list
@@ -2011,7 +2024,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'completeopt'* *'cot'*
'completeopt' 'cot' string (default: "menu,preview")
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:
menu Use a popup menu to show the possible completions. The
@@ -2627,7 +2640,7 @@ A jump table for the options with a short description can be found at |Q_op|.
local to window
{not available when compiled without the |+syntax|
feature}
Comma separated list of settings for how 'cursorline' is displayed.
Comma-separated list of settings for how 'cursorline' is displayed.
Valid values:
"line" Highlight the text line of the cursor with
CursorLine |hl-CursorLine|.
@@ -2907,7 +2920,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
|defaults.vim|)
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:
lastline When included, as much as possible of the last line
in a window will be displayed. "@@@" is put in the
@@ -3111,7 +3124,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.
When set to "all" or when "all" is one of the items, all autocommand
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
<
*'expandtab'* *'et'* *'noexpandtab'* *'noet'*
@@ -3371,7 +3384,7 @@ A jump table for the options with a short description can be found at |Q_op|.
{not available when compiled without the |+folding|
feature}
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 ~
stl:c ' ' or '^' statusline of the current window
@@ -3561,7 +3574,7 @@ A jump table for the options with a short description can be found at |Q_op|.
{not available when compiled without the |+folding|
feature}
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.
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.
@@ -3779,7 +3792,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
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:argument-list,mode-list:argument-list,..
The mode-list is a dash separated list of these modes:
@@ -3898,7 +3911,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'guioptions'* *'go'*
'guioptions' 'go' string (default "egmrLtT" (MS-Windows,
"t" is removed in |defaults.vim|),
"aegimrLtT" (GTK, Motif and Athena),
"aegimrLtT" (GTK and Motif),
)
global
{only available when compiled with GUI enabled}
@@ -3979,13 +3992,12 @@ A jump table for the options with a short description can be found at |Q_op|.
*'go-g'*
'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.
Exception: Athena will always use grey menu items.
*'go-t'*
't' Include tearoff menu items. Currently only works for Win32,
GTK+, and Motif 1.2 GUI.
*'go-T'*
'T' Include Toolbar. Currently only in Win32, GTK+, Motif, Photon
and Athena GUIs.
'T' Include Toolbar. Currently only in Win32, GTK+, Motif and
Photon GUIs.
*'go-r'*
'r' Right-hand scrollbar is always present.
*'go-R'*
@@ -4091,7 +4103,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global
{only available when compiled with the |+multi_lang|
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
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
@@ -4110,10 +4122,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
buffer becomes hidden when it is |abandon|ed. If the buffer is still
displayed in another window, it does not become hidden, of course.
The commands that move through the buffer list sometimes make a buffer
hidden although the 'hidden' option is off: When the buffer is
modified, 'autowrite' is off or writing is not possible, and the '!'
flag was used. See also |windows.txt|.
hidden even if the 'hidden' option is off when these three are true:
- the buffer is modified
- '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.
This option is set for one command with ":hide {command}" |:hide|.
WARNING: It's easy to forget that you have changes in hidden buffers.
@@ -4139,7 +4155,7 @@ A jump table for the options with a short description can be found at |Q_op|.
z:StatusLineTerm,Z:StatusLineTermNC")
global
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
use for that occasion. The occasions are:
|hl-SpecialKey| 8 Meta and special keys listed with ":map"
@@ -4151,6 +4167,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|hl-ErrorMsg| e error messages
h (obsolete, ignored)
|hl-IncSearch| i 'incsearch' highlighting
|hl-CurSearch| y current instance of last search pattern
|hl-Search| l last search pattern highlighting (see 'hlsearch')
|hl-MoreMsg| m |more-prompt|
|hl-ModeMsg| M Mode (e.g., "-- INSERT --")
@@ -4394,7 +4411,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|i_CTRL-^|.
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".
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.
You can set 'imactivatefunc' and 'imstatusfunc' to handle IME/XIM
@@ -4415,7 +4432,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|c_CTRL-^|.
The value is set to 1 when it is not -1 and setting the 'keymap'
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.
*'imstatusfunc'* *'imsf'*
@@ -4806,7 +4823,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'keymodel'* *'km'*
'keymodel' 'km' string (default "")
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:
startsel Using a shifted special key starts selection (either
Select mode or Visual mode, depending on "key" being
@@ -5007,7 +5024,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global or local to buffer |global-local|
{not available when compiled without the |+lispindent|
feature}
Comma separated list of words that influence the Lisp indenting.
Comma-separated list of words that influence the Lisp indenting.
|'lisp'|
*'list'* *'nolist'*
@@ -5031,7 +5048,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'listchars' 'lcs' string (default "eol:$")
global or local to window |global-local|
Strings to use in 'list' mode and for the |:list| command. It is a
comma separated list of string settings.
comma-separated list of string settings.
*lcs-eol*
eol:c Character to show at the end of each line. When
omitted, there is no extra character at the end of the
@@ -5516,6 +5533,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.
*'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' string (default "i-r:beam,s:updown,sd:udsizing,
vs:leftright,vd:lrsizing,m:no,
@@ -5524,7 +5553,7 @@ A jump table for the options with a short description can be found at |Q_op|.
{only available when compiled with the |+mouseshape|
feature}
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
and an argument-list:
mode-list:shape,mode-list:shape,..
@@ -6665,7 +6694,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'selectmode'* *'slm'*
'selectmode' 'slm' string (default "")
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.
Possible values:
mouse when using the mouse
@@ -7284,7 +7313,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
path, otherwise the file is placed in the current directory.
*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
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
@@ -7306,7 +7335,7 @@ A jump table for the options with a short description can be found at |Q_op|.
local to buffer
{not available when compiled without the |+syntax|
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: >
set spelllang=en_us,nl,medical
< This means US English, Dutch and medical words are recognized. Words
@@ -7351,7 +7380,7 @@ A jump table for the options with a short description can be found at |Q_op|.
local to buffer
{not available when compiled without the |+syntax|
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
separate word: every upper-case character in a word
that comes after a lower case character indicates the
@@ -7656,7 +7685,7 @@ A jump table for the options with a short description can be found at |Q_op|.
local to buffer
{not available when compiled without the
|+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: >
:set suffixesadd=.java
<
@@ -7702,7 +7731,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.
Mostly for |quickfix| commands some values are also used for other
commands, as mentioned below.
Possible values (comma separated list):
Possible values (comma-separated list):
useopen If included, jump to the first open window that
contains the specified buffer (if there is one).
Otherwise: Do not examine other windows.
@@ -8335,8 +8364,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'toolbar'* *'tb'*
'toolbar' 'tb' string (default "icons,tooltips")
global
{only for |+GUI_GTK|, |+GUI_Athena|, |+GUI_Motif| and
|+GUI_Photon|}
{only for |+GUI_GTK|, |+GUI_Motif| and |+GUI_Photon|}
The contents of this option controls various toolbar settings. The
possible values are:
icons Toolbar buttons are shown with icons.
@@ -8350,7 +8378,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
following: >
: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.
If none of the strings specified in 'toolbar' are valid or if
@@ -8669,7 +8697,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global
{not available when compiled without the |+mksession|
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:
word save and restore ~
cursor cursor position in file and in window
@@ -8699,7 +8727,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 exiting Vim (see |viminfo-file|). Except when 'viminfofile' is
"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,
followed by a number or string which specifies the value of that
parameter. If a particular character is left out, then the default
@@ -8822,7 +8850,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'virtualedit'* *'ve'*
'virtualedit' 've' string (default "")
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.
insert Allow virtual editing in Insert mode.
all Allow virtual editing in all modes.
@@ -9038,7 +9066,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'wildmode' 'wim' string (Vim default: "full")
global
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
first part specifies the behavior for the first use of 'wildchar',
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
@@ -2815,7 +2815,7 @@ your browsing preferences. (see also: |netrw-settings|)
= 2: wide listing (multiple files in columns)
= 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|)
There's some special support for git-ignore
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
@@ -271,6 +271,11 @@ popup_create({what}, {options}) *popup_create()*
'buftype' set to "popup". That buffer will be wiped out once
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.
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
@@ -643,6 +643,7 @@ Short explanation of each option: *option-list*
'cinkeys' 'cink' keys that trigger indent when 'cindent' is set
'cinoptions' 'cino' how to do indenting when 'cindent' is set
'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
'cmdheight' 'ch' number of lines to use for the command-line
'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
'mousehide' 'mh' hide mouse pointer while typing
'mousemodel' 'mousem' changes meaning of mouse buttons
'mousemoveevent' 'mousemev' report mouse moves with <MouseMove>
'mouseshape' 'mouses' shape of the mouse pointer in different modes
'mousetime' 'mouset' max time between mouse double-click
'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 Jan 21
*repeat.txt* For Vim version 8.2. Last change: 2022 Apr 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -210,22 +210,26 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
To source a range of lines that doesn't start with the
|:vim9script| command in Vim9 script context, the
|:vim9cmd| modifier can be used.
|:vim9cmd| modifier can be used. If you use a Visual
selection and type ":", the range in the form "'<,'>"
can come before it: >
:'<,'>vim9cmd source
< Otherwise the range goes after the modifier and must
have a colon prefixed, like all Vim9 ranges: >
:vim9cmd :5,9source
When a range of lines in a buffer is sourced in the
< When a range of lines in a buffer is sourced in the
Vim9 script context, the previously defined
script-local variables and functions are not cleared.
This works like the range started with the
":vim9script noclear" command. The "++clear" argument
can be used to clear the script-local variables and
functions before sourcing the script. This works like
the range started with the |:vimscript| command
the range started with the `:vim9script` command
without the "noclear" argument. See |vim9-reload| for
more information.
Examples: >
:4,5source
:vim9cmd :'<,'>source
:10,18source ++clear
*:source!*
@@ -1039,18 +1043,24 @@ For example, to profile the one_script.vim script file: >
: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.
If {fname} already exists it will be silently overwritten.
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
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
external command). Does not nest.
:prof[ile] continue
Continue profiling after ":profile pause".
Continue profiling after `:profile pause`.
:prof[ile] func {pattern}
Profile function that matches the pattern {pattern}.
@@ -1067,11 +1077,17 @@ For example, to profile the one_script.vim script file: >
after this command. A :profile command in the script itself
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*
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
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
@@ -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
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.
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
@@ -242,7 +242,7 @@ dragging the scrollbar of the current window. How many lines are scrolled
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 the X11 GUIs (Motif and GTK) scrolling the wheel generates key
presses <ScrollWheelUp>, <ScrollWheelDown>, <ScrollWheelLeft> and
<ScrollWheelRight>. For example, if you push the scroll wheel upwards a
<ScrollWheelUp> key press is generated causing the window to scroll upwards

View File

@@ -344,6 +344,12 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
Example: >
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 Debugging. Go to debugging mode when executing the first
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.
If you want to record what is typed in a human readable for
you can use |ch_logfile()|, It adds "raw key input" lines.
Also see |--log|.
*-W*
-W {scriptout} Like -w, but do not append, overwrite an existing file.

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 8.2. Last change: 2022 Mar 02
*syntax.txt* For Vim version 8.2. Last change: 2022 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4898,7 +4898,7 @@ in their own color.
:hi[ghlight] {group-name}
List one highlight group.
*highlight-clear*
*highlight-clear* *:hi-clear*
:hi[ghlight] clear Reset all highlighting to the defaults. Removes all
highlighting for groups added by the user!
Uses the current value of 'background' to decide which
@@ -4961,7 +4961,7 @@ the same syntax file on all terminals, and use the optimal highlighting.
*inverse* *italic* *standout*
*nocombine* *strikethrough*
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):
bold
underline
@@ -5145,7 +5145,7 @@ font={font-name} *highlight-font*
When setting the font for the "Normal" group, this becomes the default
font (until the 'guifont' option is changed; the last one set is
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 "Tooltip" group, the tooltips will be
changed.
@@ -5318,6 +5318,8 @@ QuickFixLine Current |quickfix| item in the quickfix window.
*hl-Search*
Search Last search pattern highlighting (see 'hlsearch').
Also used for similar items that need to stand out.
*hl-CurSearch*
CurSearch Current match for the last search pattern (see 'hlsearch').
*hl-SpecialKey*
SpecialKey Meta and special keys listed with ":map", also for text used
to show unprintable characters in the text, 'listchars'.
@@ -5382,7 +5384,7 @@ Menu Current font, background and foreground colors of the menus.
Also used for the toolbar.
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
empty, and as such it is tied to the current |:language| when
set.
@@ -5396,7 +5398,7 @@ Scrollbar Current background and foreground of the main window's
Tooltip Current font, background and foreground of the tooltips.
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
empty, and as such it is tied to the current |:language| when
set.

View File

@@ -134,6 +134,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'cinkeys' options.txt /*'cinkeys'*
'cino' options.txt /*'cino'*
'cinoptions' options.txt /*'cinoptions'*
'cinscopedecls' options.txt /*'cinscopedecls'*
'cinsd' options.txt /*'cinsd'*
'cinw' options.txt /*'cinw'*
'cinwords' options.txt /*'cinwords'*
'clipboard' options.txt /*'clipboard'*
@@ -487,7 +489,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
'mousefocus' options.txt /*'mousefocus'*
'mousehide' options.txt /*'mousehide'*
'mousem' options.txt /*'mousem'*
'mousemev' options.txt /*'mousemev'*
'mousemodel' options.txt /*'mousemodel'*
'mousemoveevent' options.txt /*'mousemoveevent'*
'mouses' options.txt /*'mouses'*
'mouseshape' options.txt /*'mouseshape'*
'mouset' options.txt /*'mouset'*
@@ -2546,6 +2550,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
:helpt helphelp.txt /*:helpt*
:helptags helphelp.txt /*:helptags*
:hi syntax.txt /*:hi*
:hi-clear syntax.txt /*:hi-clear*
:hi-default syntax.txt /*:hi-default*
:hi-link syntax.txt /*:hi-link*
:hi-normal syntax.txt /*:hi-normal*
@@ -3616,6 +3621,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
<MiddleRelease> term.txt /*<MiddleRelease>*
<Mouse> term.txt /*<Mouse>*
<MouseDown> scroll.txt /*<MouseDown>*
<MouseMove> map.txt /*<MouseMove>*
<MouseUp> scroll.txt /*<MouseUp>*
<NL> motion.txt /*<NL>*
<Nop> map.txt /*<Nop>*
@@ -3771,7 +3777,6 @@ Aleph options.txt /*Aleph*
Amiga os_amiga.txt /*Amiga*
Arabic arabic.txt /*Arabic*
Atari os_mint.txt /*Atari*
Athena gui_x11.txt /*Athena*
B motion.txt /*B*
BeBox os_beos.txt /*BeBox*
BeOS os_beos.txt /*BeOS*
@@ -5513,6 +5518,7 @@ WinClosed autocmd.txt /*WinClosed*
WinEnter autocmd.txt /*WinEnter*
WinLeave autocmd.txt /*WinLeave*
WinNew autocmd.txt /*WinNew*
WinScrolled autocmd.txt /*WinScrolled*
X change.txt /*X*
X11 options.txt /*X11*
X11-icon gui_x11.txt /*X11-icon*
@@ -5752,7 +5758,6 @@ assert_true() testing.txt /*assert_true()*
at motion.txt /*at*
atan() builtin.txt /*atan()*
atan2() builtin.txt /*atan2()*
athena-intellimouse gui.txt /*athena-intellimouse*
attr-list syntax.txt /*attr-list*
author intro.txt /*author*
auto-format change.txt /*auto-format*
@@ -6065,6 +6070,7 @@ changenr() builtin.txt /*changenr()*
changetick eval.txt /*changetick*
changing change.txt /*changing*
channel channel.txt /*channel*
channel-address channel.txt /*channel-address*
channel-callback channel.txt /*channel-callback*
channel-close channel.txt /*channel-close*
channel-close-in channel.txt /*channel-close-in*
@@ -8000,6 +8006,7 @@ lace.vim syntax.txt /*lace.vim*
lambda eval.txt /*lambda*
lang-variable eval.txt /*lang-variable*
language-mapping map.txt /*language-mapping*
language-server-protocol channel.txt /*language-server-protocol*
last-pattern pattern.txt /*last-pattern*
last-position-jump usr_05.txt /*last-position-jump*
last_buffer_nr() builtin.txt /*last_buffer_nr()*
@@ -8256,6 +8263,7 @@ moo.vim syntax.txt /*moo.vim*
more-compatible version5.txt /*more-compatible*
more-prompt message.txt /*more-prompt*
more-variables eval.txt /*more-variables*
motif-intellimouse gui.txt /*motif-intellimouse*
motion-count-multiplied motion.txt /*motion-count-multiplied*
motion.txt motion.txt /*motion.txt*
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 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -833,7 +833,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
exit the shell. 'mouse' can remain set to "a" then.
*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
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:

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
@@ -674,7 +674,7 @@ term_getsize({buf}) *term_getsize()*
term_getstatus({buf}) *term_getstatus()*
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
finished job has finished
normal in Terminal-Normal mode

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
@@ -131,8 +131,8 @@ test_gui_event({event}, {args})
forward: set to 1 for forward search.
"mouse":
Inject a mouse button click event. The supported items in
{args} are:
Inject either a mouse button click, or a mouse move, event.
The supported items in {args} are:
button: mouse button. The supported values are:
0 right mouse button
1 middle mouse button
@@ -151,6 +151,12 @@ test_gui_event({event}, {args})
4 shift is pressed
8 alt is pressed
16 ctrl is pressed
move: Optional; if used and TRUE then a mouse move
event can be generated.
Only {args} row: and col: are used and
required; they are interpreted as pixels.
Only results in an event when 'mousemoveevent'
is set or a popup uses mouse move events.
"scrollbar":
Set or drag the left, right or horizontal scrollbar. Only

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 8.2. Last change: 2022 Mar 18
*todo.txt* For Vim version 8.2. Last change: 2022 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -38,19 +38,19 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
Really drop the Athena and NeXtaw GUI? Decide end of March.
Once Vim9 is stable:
- Use Vim9 for more runtime files.
- Check code coverage, add more tests if needed.
vim9execute.c line 1900
vim9execute.c line 3500
vim9expr.c
vim9instr.c
vim9script.c
vim9type.c
- Adjust intro message to say "help version9".
Further Vim9 improvements, possibly after launch:
- Check performance with callgrind and kcachegrind.
getline()/substitute()/setline() in #5632
- Better implementation for partial and tests for that.
- when using "const" mark the variable type as const with TTFLAG_CONST, so
that an error is given at compile time when trying to change it. E.g. for a
@@ -196,7 +196,7 @@ Terminal emulator window:
- When the job only outputs lines, we could handle resizing the terminal
better: store lines separated by line breaks, instead of screen 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:
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
@@ -227,6 +227,8 @@ Add expanding <script> which works like <sfile> everywhere. #9189
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 overlapping memcpy in
test_conceal.3
@@ -305,8 +307,7 @@ inconsistent with the documentation.
Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598)
Scroll doesn't work correctly, why?
glob() and globfile() do not always honor 'wildignorecase'. #8350
globpath() does not use 'wildignorecase' at all?
globpath() does not use 'wildignorecase' at all? (related to #8350)
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
with 'termguicolors'. #1740
@@ -417,13 +418,6 @@ register, then "" doesn't contain anything. Make it still follow "+.
File marks merging has duplicates since 7.4.1925. (Ingo Karkat, #5733)
"make test_gui" crashed in submenu_change(). Fix and remove workaround in
add_pixmap_args().
Athena is OK.
Motif: Build on Ubuntu can't enter any text in dialog text fields.
Running test_gui and test_gui_init with Motif sometimes kills the window
manager. Problem with Motif?
When editing a file with ":edit" the output of :swapname is relative, while
editing it with "vim file" it is absolute. (#355)
Which one should it be?
@@ -478,11 +472,6 @@ Test loose_clipboard() by selecting text before suspending.
Undo puts cursor in wrong line after "cG<Esc>" undo.
Implement completion for "breakadd". Should expand the second argument, e.g.
"func", and then function names after ":breakadd func". Including
script-local functions.
Also for ":profile".
:unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019
Dec 19)
@@ -2401,11 +2390,6 @@ probably causes this.
'scrollbind' is not respected when deleting lines or undo. (Milan Vancura,
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
":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
@@ -2501,10 +2485,6 @@ Works OK when 'cmdheight' is 2.
8 Use a mechanism similar to omni completion to figure out the kind of tab
for CTRL-] and jump to the appropriate matching tag (if there are
several).
Alternative: be able to define a function that takes the tag name and uses
taglist() to find the right location. With indication of using CTRL-] so
that the context can be taken into account. (Robert Webb)
Patch by Christian Brabandt, 2013 May 31.
The utf class table is missing some entries:
0x2212, minus sign
@@ -3251,7 +3231,7 @@ Win32 GUI known bugs:
the font name).
Athena and Motif:
Motif:
6 New Motif toolbar button from Marcin Dalecki:
- When the mouse pointer is over an Agide button the red becomes black.
Something with the way colors are specified in the .xpm file.
@@ -3263,7 +3243,7 @@ Athena and Motif:
wrong.
9 XIM is disabled by default for SGI/IRIX. Fix XIM so that 'imdisable' can
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
flag.
8 X11: A menu that contains an umlaut is truncated at that character.
@@ -3281,27 +3261,6 @@ Athena and Motif:
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:
- gui_mch_browsedir() is missing, browsedir() doesn't work nicely.
7 Use XmStringCreateLocalized() instead of XmStringCreateSimple()?
@@ -3780,7 +3739,7 @@ Problems that will (probably) not be solved:
Most interesting new features to be added when all bugs have been fixed:
- 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.
With options: ":edit ++(['!', '++enc=abc'], ['+/pat'], fname)".
Alternative: Make a function for Ex commands: cmd_edit().
@@ -5671,7 +5630,7 @@ Options:
7 ":with option=value | command": temporarily set an option value and
restore it after the command has executed.
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.
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

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
@@ -381,7 +381,7 @@ N *+folding* |folding|
*+fork* Unix only: |fork| shell commands
*+float* Floating point support
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_GTK* Unix only: GTK+ |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
@@ -2494,7 +2494,7 @@ regexp character classes (for fast syntax highlight matching):
":set" now accepts "+=", |^=" and "-=": add or remove parts of a string
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
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
@@ -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
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.
Setting 'fileencoding' in an empty file marks it as modified.
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
@@ -160,8 +160,8 @@ Graphical User Interface (GUI). |gui|
Included support for GUI: menu's, mouse, scrollbars, etc. You can
define your own menus. Better support for CTRL/SHIFT/ALT keys in
combination with special keys and mouse. Supported for various
platforms, such as X11 (with Motif and Athena interfaces), GTK, Win32
(Windows XP and later), Amiga and Macintosh.
platforms, such as X11 with Motif, GTK, Win32 (Windows XP and later),
Amiga and Macintosh.
Multiple windows and buffers. |windows.txt|
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 18
*vim9.txt* For Vim version 8.2. Last change: 2022 Mar 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -184,8 +184,8 @@ For now you will need to pass the dictionary explicitly: >
def DictFunc(d: dict<any>, arg: string)
echo d[arg]
enddef
var d = {item: 'value', func: DictFunc}
d.func(d, 'item')
var ad = {item: 'value', func: DictFunc}
ad.func(ad, 'item')
You can call a legacy dict function though: >
func Legacy() dict
@@ -376,13 +376,23 @@ And with autocommands: >
}
Although using a :def function probably works better.
*E1022* *E1103* *E1130* *E1131* *E1133*
*E1134* *E1235*
*E1134*
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,
any, etc.). This matters especially when using the "any" type, the value will
default to the number zero.
*E1016* *E1052* *E1066*
default to the number zero. For example, when declaring a list, items can be
added: >
var myList: list<number>
myList->add(7)
Initializing a variable to a null value, e.g. `null_list`, differs from not
initializing the variable. This throws an error: >
var myList = null_list
myList->add(7) # E1130: Cannot add to null list
< *E1016* *E1052* *E1066*
In Vim9 script `:let` cannot be used. An existing variable is assigned to
without any command. The same for global, window, tab, buffer and Vim
variables, because they are not really declared. Those can also be deleted
@@ -1243,7 +1253,7 @@ Closures defined in a loop will share the same context. For example: >
A closure must be compiled in the context that it is defined in, so that
variables in that context can be found. This mostly happens correctly, except
when a function is marked for debugging with `breakadd` after it was compiled.
Make sure the define the breakpoint before compiling the outerh function.
Make sure to define the breakpoint before compiling the outer function.
The "inloop" variable will exist only once, all closures put in the list refer
to the same instance, which in the end will have the value 4. This is
@@ -1710,7 +1720,15 @@ line, there can be no line break: >
name # Error!
echo that
.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
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
@@ -1735,7 +1753,8 @@ actually needed. Using the autoload mechanism is recommended:
The "autoload" argument to `:import` means that the script is not loaded
until one of the items is actually used. The script will be found under
the "autoload" directory in 'runtimepath' instead of the "import"
directory.
directory. Alternatively a relative or absolute name can be used, see
below.
2. In the autoload script put the bulk of the code. >
vim9script
@@ -1755,6 +1774,14 @@ actually needed. Using the autoload mechanism is recommended:
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.
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
|<ScriptCmd>| is useful. It allows for a command in a mapping to use the
script context of where the mapping was defined.

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
@@ -892,7 +892,7 @@ windows.
*preview-popup*
Alternatively, a popup window can be used by setting the 'previewpopup'
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
width maximum width of the popup
highlight highlight group of the popup (default is Pmenu)

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Feb 13
" Last Change: 2022 Apr 07
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -205,11 +205,13 @@ au BufNewFile,BufRead *.iba,*.ibi setf ibasic
" FreeBasic file (similar to QBasic)
au BufNewFile,BufRead *.fb setf freebasic
" Batch file for MSDOS.
au BufNewFile,BufRead *.bat,*.sys setf dosbatch
" Batch file for MSDOS. See dist#ft#FTsys for *.sys
au BufNewFile,BufRead *.bat setf dosbatch
" *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd.
au BufNewFile,BufRead *.cmd
\ 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
au BufNewFile,BufRead *.btm call dist#ft#FTbtm()
@@ -360,13 +362,8 @@ au BufNewFile,BufRead *.eni setf cl
" Clever or dtd
au BufNewFile,BufRead *.ent call dist#ft#FTent()
" Clipper (or FoxPro; could also be eviews)
au BufNewFile,BufRead *.prg
\ if exists("g:filetype_prg") |
\ exe "setf " . g:filetype_prg |
\ else |
\ setf clipper |
\ endif
" Clipper, FoxPro, ABB RAPID or eviews
au BufNewFile,BufRead *.prg\c call dist#ft#FTprg()
" Clojure
au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc setf clojure
@@ -397,6 +394,9 @@ au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf
" Configure scripts
au BufNewFile,BufRead configure.in,configure.ac setf config
" Cooklang
au BufNewFile,BufRead *.cook setf cook
" CUDA Compute Unified Device Architecture
au BufNewFile,BufRead *.cu,*.cuh setf cuda
@@ -420,6 +420,9 @@ au BufNewFile,BufRead *.ex call dist#ft#ExCheck()
au BufRead,BufNewFile mix.lock,*.exs setf elixir
au BufRead,BufNewFile *.eex,*.leex setf eelixir
" Elvish
au BufRead,BufNewFile *.elv setf elvish
" Euphoria 3 or 4
au BufNewFile,BufRead *.eu,*.ew,*.exu,*.exw call dist#ft#EuphoriaCheck()
if has("fname_case")
@@ -441,7 +444,7 @@ au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake
au BufNewFile,BufRead *.qc setf c
" Configure files
au BufNewFile,BufRead *.cfg setf cfg
au BufNewFile,BufRead *.cfg\c call dist#ft#FTcfg()
" Cucumber
au BufNewFile,BufRead *.feature setf cucumber
@@ -948,6 +951,11 @@ au BufNewFile,BufRead *.jl setf julia
" Kixtart
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[++]
au BufNewFile,BufRead *.k setf kwt
@@ -972,7 +980,7 @@ au BufNewFile,BufRead *.latte,*.lte setf latte
" 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
" LDAP LDIF
@@ -1135,18 +1143,11 @@ au BufNewFile,BufRead *.mms call dist#ft#FTmms()
" Symbian meta-makefile definition (MMP)
au BufNewFile,BufRead *.mmp setf mmp
" Modsim III (or LambdaProlog)
au BufNewFile,BufRead *.mod
\ if expand("<afile>") =~ '\<go.mod$' |
\ setf gomod |
\ elseif getline(1) =~ '\<module\>' |
\ setf lprolog |
\ else |
\ setf modsim3 |
\ endif
" ABB Rapid, Modula-2, Modsim III or LambdaProlog
au BufNewFile,BufRead *.mod\c call dist#ft#FTmod()
" Modula-2 (.md removed in favor of Markdown)
au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.mi setf modula2
" Modula-2 (.md removed in favor of Markdown, see dist#ft#FTmod for *.MOD)
au BufNewFile,BufRead *.m2,*.DEF,*.mi setf modula2
" Modula-3 (.m3, .i3, .mg, .ig)
au BufNewFile,BufRead *.[mi][3g] setf modula3
@@ -1274,9 +1275,15 @@ au BufNewFile,BufRead *.or setf openroad
" OPL
au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl
" OpenSCAD
au BufNewFile,BufRead *.scad setf openscad
" Oracle config file
au BufNewFile,BufRead *.ora setf ora
" Org
au BufNewFile,BufRead *.org,*.org_archive setf org
" Packet filter conf
au BufNewFile,BufRead pf.conf setf pf
@@ -1341,9 +1348,10 @@ au BufNewFile,BufRead *.pm
au BufNewFile,BufRead *.pod setf pod
" Php, php3, php4, etc.
" Also Phtml (was used for PHP 2 in the past)
" Also .ctp for Cake template file
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php
" Also Phtml (was used for PHP 2 in the past).
" Also .ctp for Cake template file.
" Also .phpt for php tests.
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp,*.phpt setf php
" PHP config
au BufNewFile,BufRead php.ini-* setf dosini
@@ -1629,16 +1637,22 @@ au BufNewFile,BufRead *.sass setf sass
au BufNewFile,BufRead *.sa setf sather
" Scala
au BufNewFile,BufRead *.scala,*.sc setf scala
au BufNewFile,BufRead *.scala setf scala
" SBT - Scala Build Tool
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
au BufNewFile,BufRead *.sci,*.sce setf scilab
" scdoc
au BufNewFile,BufRead *.scd setf scdoc
" SCSS
au BufNewFile,BufRead *.scss setf scss
@@ -1732,7 +1746,7 @@ au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump setf zsh
au BufNewFile,BufRead *.zsh setf zsh
" 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
au BufNewFile,BufRead .screenrc,screenrc setf screen
@@ -2038,6 +2052,9 @@ au BufNewFile,BufRead *.vala setf vala
" Vera
au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera
" Vagrant (uses Ruby syntax)
au BufNewFile,BufRead Vagrantfile setf ruby
" Verilog HDL
au BufNewFile,BufRead *.v setf verilog

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: C
" 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
if exists("b:did_ftplugin")
@@ -31,7 +31,8 @@ if exists('&ofu')
endif
" 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.
if has("vms")

View File

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

View File

@@ -3,7 +3,7 @@
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2020 Feb 13
" Last Change: 2022 Mar 21
if (exists("b:did_ftplugin"))
finish
@@ -53,7 +53,7 @@ endif
" TODO:
"setlocal define=^\\s*def
setlocal comments=:#
setlocal comments=b:#
setlocal commentstring=#\ %s
if !exists('g:ruby_version_paths')
@@ -87,8 +87,14 @@ endfunction
function! s:build_path(path) abort
let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',')
if &g:path !~# '\v^%(\.,)=%(/%(usr|emx)/include,)=,$'
let path = substitute(&g:path,',,$',',','') . ',' . path
if &g:path =~# '\v^%(\.,)=%(/%(usr|emx)/include,)=,$'
let path = path . ',.,,'
elseif &g:path =~# ',\.,,$'
let path = &g:path[0:-4] . path . ',.,,'
elseif &g:path =~# ',,$'
let path = &g:path[0:-2] . path . ',,'
else
let path = substitute(&g:path, '[^,]\zs$', ',', '') . path
endif
return path
endfunction
@@ -164,6 +170,8 @@ let b:undo_ftplugin .= "| sil! cunmap <buffer> <Plug><ctag>| sil! cunmap <buffer
if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
nmap <buffer><script> <SID>: :<C-U>
nmap <buffer><script> <SID>c: :<C-U><C-R>=v:count ? v:count : ''<CR>
cmap <buffer> <SID><cfile> <Plug><cfile>
cmap <buffer> <SID><ctag> <Plug><ctag>
nnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'b','n')<CR>
nnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'','n')<CR>
@@ -210,20 +218,20 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
call s:map('c', '', '<C-R><C-F> <Plug><cfile>')
cmap <buffer><script><expr> <SID>tagzv &foldopen =~# 'tag' ? '<Bar>norm! zv' : ''
call s:map('n', '<silent>', '<C-]> <SID>:exe v:count1."tag <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', 'g<C-]> <SID>:exe "tjump <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', 'g] <SID>:exe "tselect <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>] <SID>:exe v:count1."stag <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W><C-]> <SID>:exe v:count1."stag <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>g<C-]> <SID>:exe "stjump <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>g] <SID>:exe "stselect <Plug><ctag>"<SID>tagzv<CR>')
call s:map('n', '<silent>', '<C-W>} <SID>:exe v:count1."ptag <Plug><ctag>"<CR>')
call s:map('n', '<silent>', '<C-W>g} <SID>:exe "ptjump <Plug><ctag>"<CR>')
call s:map('n', '<script><silent>', '<C-]> <SID>:exe v:count1."tag <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<script><silent>', 'g<C-]> <SID>:exe "tjump <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<script><silent>', 'g] <SID>:exe "tselect <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<script><silent>', '<C-W>] <SID>:exe v:count1."stag <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<script><silent>', '<C-W><C-]> <SID>:exe v:count1."stag <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<script><silent>', '<C-W>g<C-]> <SID>:exe "stjump <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<script><silent>', '<C-W>g] <SID>:exe "stselect <SID><ctag>"<SID>tagzv<CR>')
call s:map('n', '<script><silent>', '<C-W>} <SID>:exe v:count1."ptag <SID><ctag>"<CR>')
call s:map('n', '<script><silent>', '<C-W>g} <SID>:exe "ptjump <SID><ctag>"<CR>')
call s:map('n', '<silent>', 'gf <SID>c:find <Plug><cfile><CR>')
call s:map('n', '<silent>', '<C-W>f <SID>c:sfind <Plug><cfile><CR>')
call s:map('n', '<silent>', '<C-W><C-F> <SID>c:sfind <Plug><cfile><CR>')
call s:map('n', '<silent>', '<C-W>gf <SID>c:tabfind <Plug><cfile><CR>')
call s:map('n', '<script><silent>', 'gf <SID>c:find <SID><cfile><CR>')
call s:map('n', '<script><silent>', '<C-W>f <SID>c:sfind <SID><cfile><CR>')
call s:map('n', '<script><silent>', '<C-W><C-F> <SID>c:sfind <SID><cfile><CR>')
call s:map('n', '<script><silent>', '<C-W>gf <SID>c:tabfind <SID><cfile><CR>')
endif
let &cpo = s:cpo_save

View File

@@ -16,6 +16,7 @@
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested to save on spaces
" 19.09.2007 NO g: missing before ada#Comment
" 2022 April: b:undo_indent added by Doug Kearns
" Help Page: ft-vim-indent
"------------------------------------------------------------------------------
" ToDo:
@@ -35,6 +36,8 @@ setlocal indentexpr=GetAdaIndent()
setlocal indentkeys-=0{,0}
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.
if exists("*GetAdaIndent")
finish

View File

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

View File

@@ -1,7 +1,7 @@
" Description: Comshare Dimension Definition Language (CDL)
" Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net> (Invalid email address)
" 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")
"finish
@@ -12,6 +12,8 @@ setlocal indentexpr=CdlGetIndent(v:lnum)
setlocal indentkeys&
setlocal indentkeys+==~else,=~endif,=~then,;,),=
let b:undo_indent = "setl inde< indk<"
" Only define the function once.
if exists("*CdlGetIndent")
"finish

View File

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

View File

@@ -5,7 +5,7 @@
" Meikel Brandmeyer <mb@kotka.de>
" URL: https://github.com/clojure-vim/clojure.vim
" License: Vim (see :h license)
" Last Change: 2021-10-26
" Last Change: 2022-03-24
if exists("b:did_indent")
finish

View File

@@ -3,7 +3,7 @@
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>
" Maintainer: Dimitri Merejkowsky <d.merej@gmail.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
" https://cmake.org/licensing
@@ -17,6 +17,8 @@ let b:did_indent = 1
setlocal indentexpr=CMakeGetIndent(v:lnum)
setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE(
let b:undo_indent = "setl inde< indk<"
" Only define the function once.
if exists("*CMakeGetIndent")
finish

View File

@@ -2,7 +2,7 @@
" Language: D
" Maintainer: Jason Mills <jmills@cs.mun.ca> (Invalid email address)
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2005 Nov 22
" Last Change: 2022 Apr 06
" Version: 0.1
"
" 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.
setlocal cindent
let b:undo_indent = "setl cin<"
" vim: ts=8 noet

View File

@@ -1,7 +1,7 @@
" Vim indent file
" Language: dict(1) configuration file
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-12-20
" Last Change: 2022 Apr 06
if exists("b:did_indent")
finish
@@ -11,3 +11,5 @@ let b:did_indent = 1
setlocal indentkeys=0{,0},!^F,o,O cinwords= autoindent smartindent
setlocal nosmartindent
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 nosmartindent
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)
" Doug Kearns <dougkearns@gmail.com>
" Version: 0.01
" Last Change: 2017 Jun 13
" Last Change: 2022 Apr 06
" Only load this indent file when no other was loaded.
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
setlocal indentexpr=DylanGetIndent()
let b:undo_indent = "setl inde< indk<"
if exists("*DylanGetIndent")
finish
endif

View File

@@ -3,6 +3,7 @@
" Maintainer: Steven Oliver <oliver.steven@gmail.com>
" Website: https://steveno@github.com/steveno/falconpl-vim.git
" 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
" ============
@@ -20,6 +21,8 @@ setlocal indentexpr=FalconGetIndent(v:lnum)
setlocal indentkeys=0{,0},0),0],!^F,o,O,e
setlocal indentkeys+==~case,=~catch,=~default,=~elif,=~else,=~end,=~\"
let b:undo_indent = "setl inde< indk< si<"
" Define the appropriate indent function but only once
if exists("*FalconGetIndent")
finish

View File

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

View File

@@ -2,7 +2,7 @@
" Language: IDL (ft=idlang)
" Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com> (Invalid email address)
" 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.
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)
let b:undo_indent = "setl inde< indk<"
" Only define the function once.
if exists("*GetIdlangIndent")
finish

View File

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

View File

@@ -3,6 +3,7 @@
" Maintainer: Steve Layland <layland@wolfram.com> (Invalid email address)
" Doug Kearns <dougkearns@gmail.com>
" 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
" http://members.wolfram.com/layland/vim/indent/mma.vim
"
@@ -26,6 +27,8 @@ setlocal indentexpr=GetMmaIndent()
setlocal indentkeys+=0[,0],0(,0)
setlocal nosi "turn off smart indent so we don't over analyze } blocks
let b:undo_indent = "setl inde< indk< si<"
if exists("*GetMmaIndent")
finish
endif

View File

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

View File

@@ -1,9 +1,7 @@
" Vim indent file
" Language: Objective-C
" 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.
if exists("b:did_indent")
@@ -19,6 +17,8 @@ setlocal indentexpr=GetObjCIndent()
setlocal indentkeys-=:
setlocal indentkeys+=<:>
let b:undo_indent = "setl cin< inde< indk<"
" Only define the function once.
if exists("*GetObjCIndent")
finish

View File

@@ -2,7 +2,7 @@
" Language: occam
" Maintainer: Mario Schweigler <ms44@kent.ac.uk> (Invalid email address)
" 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.
if exists("b:did_indent")
@@ -17,6 +17,8 @@ setlocal indentexpr=GetOccamIndent()
setlocal indentkeys=o,O,0=:
"}}}
let b:undo_indent = "setl inde< indk<"
" Only define the function once
if exists("*GetOccamIndent")
finish

View File

@@ -2,8 +2,8 @@
" Language: PostScript
" Maintainer: Mike Williams <mrw@netcomuk.co.uk> (Invalid email address)
" 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.
if exists("b:did_indent")
@@ -14,6 +14,8 @@ let b:did_indent = 1
setlocal indentexpr=PostscrIndentGet(v:lnum)
setlocal indentkeys+=0],0=>>,0=%%,0=end,0=restore,0=grestore indentkeys-=:,0#,e
let b:undo_indent = "setl inde< indk<"
" Catch multiple instantiations
if exists("*PostscrIndentGet")
finish

View File

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

View File

@@ -4,7 +4,7 @@
" Previous Maintainer: Nikolai Weibull <now at bitwi.se>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Feb 03
" Last Change: 2022 Mar 22
" 0. Initialization {{{1
" =================
@@ -40,9 +40,11 @@ setlocal nosmartindent
" Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetRubyIndent(v:lnum)
setlocal indentkeys=0{,0},0),0],!^F,o,O,e,:,.
setlocal indentkeys+==end,=else,=elsif,=when,=ensure,=rescue,==begin,==end
setlocal indentkeys+==end,=else,=elsif,=when,=in\ ,=ensure,=rescue,==begin,==end
setlocal indentkeys+==private,=protected,=public
let b:undo_indent = "setlocal indentexpr< indentkeys< smartindent<"
" Only define the function once.
if exists("*GetRubyIndent")
finish
@@ -85,14 +87,17 @@ let s:skip_expr =
" Regex used for words that, at the start of a line, add a level of indent.
let s:ruby_indent_keywords =
\ '^\s*\zs\<\%(module\|class\|if\|for' .
\ '\|while\|until\|else\|elsif\|case\|when\|unless\|begin\|ensure\|rescue' .
\ '\|while\|until\|else\|elsif\|case\|when\|in\|unless\|begin\|ensure\|rescue' .
\ '\|\%(\K\k*[!?]\?\s\+\)\=def\):\@!\>' .
\ '\|\%([=,*/%+-]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(if\|for\|while\|until\|case\|unless\|begin\):\@!\>'
" Def without an end clause: def method_call(...) = <expression>
let s:ruby_endless_def = '\<def\s\+\k\+[!?]\=\%((.*)\|\s\)\s*='
" Regex used for words that, at the start of a line, remove a level of indent.
let s:ruby_deindent_keywords =
\ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|end\):\@!\>'
\ '^\s*\zs\<\%(ensure\|else\|rescue\|elsif\|when\|in\|end\):\@!\>'
" Regex that defines the start-match for the 'end' keyword.
"let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>'
@@ -104,15 +109,31 @@ let s:end_start_regex =
\ '\|\%(^\|[^.:@$]\)\@<=\<do:\@!\>'
" Regex that defines the middle-match for the 'end' keyword.
let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue:\@!\>\|when\|elsif\):\@!\>'
let s:end_middle_regex = '\<\%(ensure\|else\|\%(\%(^\|;\)\s*\)\@<=\<rescue:\@!\>\|when\|\%(\%(^\|;\)\s*\)\@<=\<in\|elsif\):\@!\>'
" Regex that defines the end-match for the 'end' keyword.
let s:end_end_regex = '\%(^\|[^.:@$]\)\@<=\<end:\@!\>'
" Expression used for searchpair() call for finding match for 'end' keyword.
let s:end_skip_expr = s:skip_expr .
\ ' || (expand("<cword>") == "do"' .
\ ' && getline(".") =~ "^\\s*\\<\\(while\\|until\\|for\\):\\@!\\>")'
" Expression used for searchpair() call for finding a match for an 'end' keyword.
function! s:EndSkipExpr()
if eval(s:skip_expr)
return 1
elseif expand('<cword>') == 'do'
\ && getline(".") =~ '^\s*\<\(while\|until\|for\):\@!\>'
return 1
elseif getline('.') =~ s:ruby_endless_def
return 1
elseif getline('.') =~ '\<def\s\+\k\+[!?]\=([^)]*$'
" Then it's a `def method(` with a possible `) =` later
call search('\<def\s\+\k\+\zs(', 'W', line('.'))
normal! %
return getline('.') =~ ')\s*='
else
return 0
endif
endfunction
let s:end_skip_expr = function('s:EndSkipExpr')
" Regex that defines continuation lines, not including (, {, or [.
let s:non_bracket_continuation_regex =
@@ -572,6 +593,11 @@ function! s:AfterUnbalancedBracket(pline_info) abort
call cursor(info.plnum, closing.pos + 1)
normal! %
if strpart(info.pline, closing.pos) =~ '^)\s*='
" special case: the closing `) =` of an endless def
return indent(s:GetMSL(line('.')))
endif
if s:Match(line('.'), s:ruby_indent_keywords)
return indent('.') + info.sw
else
@@ -610,7 +636,7 @@ function! s:AfterIndentKeyword(pline_info) abort
let info = a:pline_info
let col = s:Match(info.plnum, s:ruby_indent_keywords)
if col > 0
if col > 0 && s:Match(info.plnum, s:ruby_endless_def) <= 0
call cursor(info.plnum, col)
let ind = virtcol('.') - 1 + info.sw
" TODO: make this better (we need to count them) (or, if a searchpair
@@ -657,7 +683,7 @@ function! s:IndentingKeywordInMSL(msl_info) abort
" TODO: this does not take into account contrived things such as
" module Foo; class Bar; end
let col = s:Match(info.plnum_msl, s:ruby_indent_keywords)
if col > 0
if col > 0 && s:Match(info.plnum_msl, s:ruby_endless_def) <= 0
let ind = indent(info.plnum_msl) + info.sw
if s:Match(info.plnum_msl, s:end_end_regex)
let ind = ind - info.sw

View File

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

View File

@@ -7,10 +7,11 @@
" Mike Leary <leary@nwlink.com>
" Markus Mottl <markus@oefai.at>
" 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 Oct 28 - Fixed bug with indentation of ']' (MM)
" 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.
if exists("b:did_indent")
@@ -26,6 +27,8 @@ setlocal nosmartindent
setlocal textwidth=80
setlocal shiftwidth=2
let b:undo_indent = "setl et< inde< indk< lisp< si< sw< tw<"
" Comment formatting
if (has("comments"))
set comments=sr:(*,mb:*,ex:*)

View File

@@ -2,6 +2,7 @@
" Language: SystemVerilog
" Maintainer: kocha <kocha.lsifrontend@gmail.com>
" 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.
if exists("b:did_indent")
@@ -16,6 +17,8 @@ setlocal indentkeys+==endclass,=endpackage,=endsequence,=endclocking
setlocal indentkeys+==endinterface,=endgroup,=endprogram,=endproperty,=endchecker
setlocal indentkeys+==`else,=`endif
let b:undo_indent = "setl inde< indk<"
" Only define the function once.
if exists("*SystemVerilogIndent")
finish

View File

@@ -1,7 +1,7 @@
" These commands create the option window.
"
" 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.
let buf = bufnr('option-window')
@@ -624,6 +624,8 @@ call <SID>BinOptionG("scf", &scf)
if has("gui")
call <SID>AddOption("mousehide", gettext("hide the mouse pointer while typing"))
call <SID>BinOptionG("mh", &mh)
call <SID>AddOption("mousemoveevent", gettext("report mouse movement events"))
call <SID>BinOptionG("mousemev", &mousemev)
endif
call <SID>AddOption("mousemodel", gettext("\"extend\", \"popup\" or \"popup_setpos\"; what the right\nmouse button is used for"))
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 append("$", "\t" .. s:local_to_buffer)
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 append("$", "\t" .. s:local_to_buffer)
call <SID>OptionL("inde")

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2021 Oct 19
" Last Change: 2022 Mar 28
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization
@@ -24,7 +24,7 @@ let s:supported = [
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'trixie', 'sid', 'rc-buggy',
\
\ 'trusty', 'xenial', 'bionic', 'focal', 'hirsute', 'impish', 'jammy',
\ 'trusty', 'xenial', 'bionic', 'focal', 'impish', 'jammy',
\ 'devel'
\ ]
let s:unsupported = [
@@ -35,7 +35,7 @@ let s:unsupported = [
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
\ 'disco', 'eoan', 'groovy'
\ 'disco', 'eoan', 'hirsute', 'groovy'
\ ]
let &cpo=s:cpo

View File

@@ -2,7 +2,7 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
" Last Change: 2021 Oct 19
" Last Change: 2022 Mar 28
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
" Standard syntax initialization
@@ -26,7 +26,7 @@ let s:supported = [
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'trixie', 'sid', 'rc-buggy',
\
\ 'trusty', 'xenial', 'bionic', 'focal', 'hirsute', 'impish', 'jammy',
\ 'trusty', 'xenial', 'bionic', 'focal', 'impish', 'jammy',
\ 'devel'
\ ]
let s:unsupported = [
@@ -37,7 +37,7 @@ let s:unsupported = [
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
\ 'disco', 'eoan', 'groovy'
\ 'disco', 'eoan', 'hirsute', 'groovy'
\ ]
let &cpo=s:cpo

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Debian DEP3 Patch headers
" 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
"
" 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="^\%(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="^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 match dep3patchHTTPUrl contained "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"

View File

@@ -3,9 +3,9 @@
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2018 Jul 04
" Last Change: 2022 Mar 18
if &syntax !~# '\<eruby\>' || get(b:, 'current_syntax') =~# '\<eruby\>'
if exists("b:current_syntax")
finish
endif
@@ -19,8 +19,6 @@ endif
if &filetype =~ '^eruby\.'
let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+')
elseif &filetype =~ '^.*\.eruby\>'
let b:eruby_subtype = matchstr(&filetype,'^.\{-\}\ze\.eruby\>')
elseif !exists("b:eruby_subtype") && main_syntax == 'eruby'
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+')
@@ -54,10 +52,10 @@ if !b:eruby_nest_level
let b:eruby_nest_level = 1
endif
if get(b:, 'eruby_subtype', '') !~# '^\%(eruby\)\=$' && &syntax =~# '^eruby\>'
if exists("b:eruby_subtype") && b:eruby_subtype != '' && b:eruby_subtype !=? 'eruby'
exe "runtime! syntax/".b:eruby_subtype.".vim"
unlet! b:current_syntax
endif
unlet! b:current_syntax
syn include @rubyTop syntax/ruby.vim
syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment
@@ -72,7 +70,7 @@ exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:erub
hi def link erubyDelimiter PreProc
hi def link erubyComment Comment
let b:current_syntax = matchstr(&syntax, '^.*\<eruby\>')
let b:current_syntax = 'eruby'
if main_syntax == 'eruby'
unlet main_syntax

View File

@@ -2,7 +2,7 @@
" Language: Lua 4.0, Lua 5.0, Lua 5.1 and Lua 5.2
" Maintainer: Marcus Aurelius Farias <masserahguard-lua 'at' yahoo com>
" 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
" lua_subversion = 0 (4.0, 5.0) or 1 (5.1) or 2 (5.2)
" default 5.2
@@ -319,6 +319,15 @@ elseif lua_version == 5
syn match luaFunc /\<debug\.upvalueid\>/
syn match luaFunc /\<debug\.upvaluejoin\>/
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
" Define the default highlighting.

View File

@@ -2,10 +2,10 @@
" Language: NeoMutt setup files
" Maintainer: Richard Russon <rich@flatcap.org>
" Previous Maintainer: Guillaume Brogi <gui-gui@netcourrier.com>
" Last Change: 2020-06-21
" Last Change: 2022-04-08
" Original version based on syntax/muttrc.vim
" This file covers NeoMutt 2020-06-19
" This file covers NeoMutt 2022-04-08
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -115,6 +115,8 @@ syntax region muttrcIndexFormatStr contained skipwhite keepend start=+"+ sk
syntax region muttrcIndexFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcIndexFormatEscapes,muttrcIndexFormatConditionals,muttrcFormatErrors,muttrcTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
syntax region muttrcMixFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
syntax region muttrcMixFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcMixFormatEscapes,muttrcMixFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
syntax region muttrcPatternFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPatternFormatEscapes,muttrcPatternFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
syntax region muttrcPatternFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPatternFormatEscapes,muttrcPatternFormatConditionals,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
syntax region muttrcPGPCmdFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
syntax region muttrcPGPCmdFormatStr contained skipwhite keepend start=+'+ skip=+\\'+ end=+'+ contains=muttrcPGPCmdFormatEscapes,muttrcPGPCmdFormatConditionals,muttrcVariable,muttrcFormatErrors nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
syntax region muttrcPGPFormatStr contained skipwhite keepend start=+"+ skip=+\\"+ end=+"+ contains=muttrcPGPFormatEscapes,muttrcPGPFormatConditionals,muttrcFormatErrors,muttrcPGPTimeEscapes nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
@@ -144,35 +146,37 @@ function! s:escapesConditionals(baseName, sequence, padding, conditional)
endif
endfunction
" CHECKED 2020-06-21
" Ref: alias_format_str() in alias/dlgalias.c
" CHECKED 2022-04-08
" Ref: alias_format_str() in alias/dlg_alias.c
call s:escapesConditionals('AliasFormat', '[acfnrt]', 1, 0)
" Ref: attach_format_str() in recvattach.c
" Ref: attach_format_str() in attach/dlg_attach.c
call s:escapesConditionals('AttachFormat', '[CcDdeFfIMmnQsTtuX]', 1, 1)
" Ref: compose_format_str() in compose.c
" Ref: compose_format_str() in compose/cbar.c
call s:escapesConditionals('ComposeFormat', '[ahlv]', 1, 1)
" Ref: folder_format_str() in browser.c
" Ref: folder_format_str() in browser/browser.c
call s:escapesConditionals('FolderFormat', '[CDdFfgilmNnstu]', 1, 0)
" Ref: group_index_format_str() in browser.c
" Ref: group_index_format_str() in nntp/browse.c
call s:escapesConditionals('GroupIndexFormat', '[CdfMNns]', 1, 1)
" Ref: index_format_str() in hdrline.c
call s:escapesConditionals('IndexFormat', '[AaBbCDdEefgHIiJKLlMmNnOPqRrSsTtuvWXxYyZ(<[{]\|@\i\+@\|G[a-zA-Z]\+\|Fp\=\|z[cst]\|cr\=', 1, 1)
" Ref: mix_format_str() in remailer.c
call s:escapesConditionals('MixFormat', '[acns]', 1, 0)
" Ref: pattern_format_str() in pattern/dlg_pattern.c
call s:escapesConditionals('PatternFormat', '[den]', 1, 0)
" Ref: pgp_command_format_str() in ncrypt/pgpinvoke.c
call s:escapesConditionals('PGPCmdFormat', '[afprs]', 0, 1)
" Ref: crypt_format_str() in ncrypt/crypt_gpgme.c
" Ref: pgp_entry_format_str() in ncrypt/pgpkey.c
" Ref: crypt_format_str() in ncrypt/dlg_gpgme.c
" Ref: pgp_entry_format_str() in ncrypt/dlg_pgp.c
" Note: crypt_format_str() supports 'p', but pgp_entry_fmt() does not
call s:escapesConditionals('PGPFormat', '[AaCcFfKkLlnptu[]', 0, 0)
" Ref: query_format_str() in alias/dlgquery.c
" Ref: query_format_str() in alias/dlg_query.c
call s:escapesConditionals('QueryFormat', '[acent]', 1, 1)
" Ref: sidebar_format_str() in sidebar.c
" Ref: sidebar_format_str() in sidebar/window.c
call s:escapesConditionals('SidebarFormat', '[!BDdFLNnorStZ]', 1, 1)
" Ref: smime_command_format_str() in ncrypt/smime.c
call s:escapesConditionals('SmimeFormat', '[aCcdfiks]', 0, 1)
" Ref: status_format_str() in status.c
call s:escapesConditionals('StatusFormat', '[bDdFfhLlMmnoPpRrSstuVv]', 1, 1)
call s:escapesConditionals('StatusFormat', '[bDdFfhLlMmnoPpRrSsTtuVv]', 1, 1)
syntax region muttrcPGPTimeEscapes contained start=+%\[+ end=+\]+ contains=muttrcStrftimeEscapes
syntax region muttrcTimeEscapes contained start=+%(+ end=+)+ contains=muttrcStrftimeEscapes
@@ -187,6 +191,7 @@ syntax match muttrcVarEqualsFolderFmt contained skipwhite "=" nextgroup=mutt
syntax match muttrcVarEqualsGrpIdxFmt contained skipwhite "=" nextgroup=muttrcGroupIndexFormatStr
syntax match muttrcVarEqualsIdxFmt contained skipwhite "=" nextgroup=muttrcIndexFormatStr
syntax match muttrcVarEqualsMixFmt contained skipwhite "=" nextgroup=muttrcMixFormatStr
syntax match muttrcVarEqualsPatternFmt contained skipwhite "=" nextgroup=muttrcPatternFormatStr
syntax match muttrcVarEqualsPGPCmdFmt contained skipwhite "=" nextgroup=muttrcPGPCmdFormatStr
syntax match muttrcVarEqualsPGPFmt contained skipwhite "=" nextgroup=muttrcPGPFormatStr
syntax match muttrcVarEqualsQueryFmt contained skipwhite "=" nextgroup=muttrcQueryFormatStr
@@ -197,9 +202,9 @@ syntax match muttrcVarEqualsStrftimeFmt contained skipwhite "=" nextgroup=mutt
syntax match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
" CHECKED 2020-06-21
" List of the different screens in mutt (see Menus in keymap.c)
syntax keyword muttrcMenu contained alias attach browser compose editor generic index key_select_pgp key_select_smime mix pager pgp postpone query smime
" CHECKED 2022-04-08
" List of the different screens in NeoMutt (see MenuNames in menu/type.c)
syntax keyword muttrcMenu contained alias attach autocrypt browser compose editor generic index key_select_pgp key_select_smime mix pager pgp postpone query smime
syntax match muttrcMenuList "\S\+" contained contains=muttrcMenu
syntax match muttrcMenuCommas /,/ contained
@@ -234,12 +239,12 @@ syntax match muttrcEscapedVariable contained "\\\$[a-zA-Z_-]\+"
syntax match muttrcBadAction contained "[^<>]\+" contains=muttrcEmail
syntax match muttrcAction contained "<[^>]\{-}>" contains=muttrcBadAction,muttrcFunction,muttrcKeyName
" CHECKED 2020-06-21
" First, functions that take regular expressions:
" CHECKED 2022-04-08
" First, hooks that take regular expressions:
syntax match muttrcRXHookNot contained /!\s*/ skipwhite nextgroup=muttrcRXHookString,muttrcRXHookStringNL
syntax match muttrcRXHooks /\<\%(account\|append\|close\|crypt\|folder\|mbox\|open\|pgp\)-hook\>/ skipwhite nextgroup=muttrcRXHookNot,muttrcRXHookString,muttrcRXHookStringNL
" Now, functions that take patterns
" Now, hooks that take patterns
syntax match muttrcPatHookNot contained /!\s*/ skipwhite nextgroup=muttrcPattern
syntax match muttrcPatHooks /\<\%(charset\|iconv\|index-format\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcPattern
syntax match muttrcPatHooks /\<\%(message\|reply\|send\|send2\|save\|fcc\|fcc-save\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcOptPattern
@@ -295,10 +300,10 @@ syntax match muttrcAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrc
syntax match muttrcUnAliasKey contained "\s*\w\+\s*" skipwhite nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
syntax match muttrcUnAliasNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
" CHECKED 2020-06-21
" List of letters in Flags in pattern.c
" CHECKED 2022-04-08
" List of letters in Flags in pattern/flags.c
" Parameter: none
syntax match muttrcSimplePat contained "!\?\^\?[~][ADEFGgklNOPpQRSTuUvV#$=]"
syntax match muttrcSimplePat contained "!\?\^\?[~][ADEFGgklNOPpQRSTUuVv#$=]"
" Parameter: range
syntax match muttrcSimplePat contained "!\?\^\?[~][mnXz]\s*\%([<>-][0-9]\+[kM]\?\|[0-9]\+[kM]\?[-]\%([0-9]\+[kM]\?\)\?\)"
" Parameter: date
@@ -306,7 +311,7 @@ syntax match muttrcSimplePat contained "!\?\^\?[~][dr]\s*\%(\%(-\?[0-9]\{1,2}\%(
" Parameter: regex
syntax match muttrcSimplePat contained "!\?\^\?[~][BbCcefHhIiLMstwxYy]\s*" nextgroup=muttrcSimplePatRXContainer
" Parameter: pattern
syntax match muttrcSimplePat contained "!\?\^\?[%][bBcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString
syntax match muttrcSimplePat contained "!\?\^\?[%][BbCcefHhiLstxy]\s*" nextgroup=muttrcSimplePatString
" Parameter: pattern
syntax match muttrcSimplePat contained "!\?\^\?[=][bcCefhHiLstxy]\s*" nextgroup=muttrcSimplePatString
syntax region muttrcSimplePat contained keepend start=+!\?\^\?[~](+ end=+)+ contains=muttrcSimplePat
@@ -369,8 +374,8 @@ syntax keyword muttrcMonoAttrib contained bold none normal reverse standout unde
syntax keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField,muttrcColorCompose
syntax match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono
" CHECKED 2020-06-21
" List of fields in Fields in color.c
" CHECKED 2022-04-08
" List of fields in ColorFields in color/commmand.c
syntax keyword muttrcColorField skipwhite contained
\ attachment attach_headers body bold error hdrdefault header index index_author
\ index_collapsed index_date index_flags index_label index_number index_size index_subject
@@ -383,8 +388,8 @@ syntax match muttrcColorField contained "\<quoted\d\=\>"
syntax match muttrcColorCompose skipwhite contained /\s*compose\s*/ nextgroup=muttrcColorComposeField
" CHECKED 2020-06-21
" List of fields in ComposeFields in color.c
" CHECKED 2022-04-08
" List of fields in ComposeColorFields in color/command.c
syntax keyword muttrcColorComposeField skipwhite contained
\ header security_both security_encrypt security_none security_sign
\ nextgroup=muttrcColorFG,muttrcColorFGNL
@@ -411,20 +416,21 @@ function! s:boolQuadGen(type, vars, deprecated)
endfunction
" CHECKED 2020-06-21
" CHECKED 2022-04-08
" List of DT_BOOL in MuttVars in mutt_config.c
call s:boolQuadGen('Bool', [
\ 'abort_backspace', 'allow_8bit', 'allow_ansi', 'arrow_cursor', 'ascii_chars', 'askbcc',
\ 'askcc', 'ask_follow_up', 'ask_x_comment_to', 'attach_save_without_prompting',
\ 'attach_split', 'autocrypt', 'autocrypt_reply', 'autoedit', 'auto_subscribe', 'auto_tag',
\ 'abort_backspace', 'allow_8bit', 'allow_ansi', 'arrow_cursor', 'ascii_chars', 'ask_bcc',
\ 'ask_cc', 'ask_follow_up', 'ask_x_comment_to', 'attach_save_without_prompting',
\ 'attach_split', 'autocrypt', 'autocrypt_reply', 'auto_edit', 'auto_subscribe', 'auto_tag',
\ 'beep', 'beep_new', 'bounce_delivered', 'braille_friendly',
\ 'browser_abbreviate_mailboxes', 'change_folder_next', 'check_mbox_size', 'check_new',
\ 'collapse_all', 'collapse_flagged', 'collapse_unread', 'confirmappend', 'confirmcreate',
\ 'crypt_autoencrypt', 'crypt_autopgp', 'crypt_autosign', 'crypt_autosmime',
\ 'crypt_confirmhook', 'crypt_opportunistic_encrypt',
\ 'collapse_all', 'collapse_flagged', 'collapse_unread', 'compose_show_user_headers',
\ 'confirm_append', 'confirm_create', 'copy_decode_weed', 'count_alternatives',
\ 'crypt_auto_encrypt', 'crypt_auto_pgp', 'crypt_auto_sign', 'crypt_auto_smime',
\ 'crypt_confirm_hook', 'crypt_opportunistic_encrypt',
\ 'crypt_opportunistic_encrypt_strong_keys', 'crypt_protected_headers_read',
\ 'crypt_protected_headers_save', 'crypt_protected_headers_write', 'crypt_replyencrypt',
\ 'crypt_replysign', 'crypt_replysignencrypted', 'crypt_timestamp', 'crypt_use_gpgme',
\ 'crypt_protected_headers_save', 'crypt_protected_headers_write', 'crypt_reply_encrypt',
\ 'crypt_reply_sign', 'crypt_reply_sign_encrypted', 'crypt_timestamp', 'crypt_use_gpgme',
\ 'crypt_use_pka', 'delete_untag', 'digest_collapse', 'duplicate_threads', 'edit_headers',
\ 'encode_from', 'fast_reply', 'fcc_before_send', 'fcc_clear', 'flag_safe', 'followup_to',
\ 'force_name', 'forward_decode', 'forward_decrypt', 'forward_quote', 'forward_references',
@@ -433,45 +439,52 @@ call s:boolQuadGen('Bool', [
\ 'history_remove_dups', 'honor_disposition', 'idn_decode', 'idn_encode',
\ 'ignore_list_reply_to', 'imap_check_subscribed', 'imap_condstore', 'imap_deflate',
\ 'imap_idle', 'imap_list_subscribed', 'imap_passive', 'imap_peek', 'imap_qresync',
\ 'imap_rfc5161', 'imap_servernoise', 'implicit_autoview', 'include_encrypted',
\ 'include_onlyfirst', 'keep_flagged', 'mailcap_sanitize', 'maildir_check_cur',
\ 'maildir_header_cache_verify', 'maildir_trash', 'mail_check_recent', 'mail_check_stats',
\ 'markers', 'mark_old', 'menu_move_off', 'menu_scroll', 'message_cache_clean', 'meta_key',
\ 'metoo', 'mh_purge', 'mime_forward_decode', 'mime_subject', 'mime_type_query_first',
\ 'narrow_tree', 'nm_record', 'nntp_listgroup', 'nntp_load_description', 'pager_stop',
\ 'pgp_autoinline', 'pgp_auto_decode', 'pgp_check_exit', 'pgp_check_gpg_decrypt_status_fd',
\ 'pgp_ignore_subkeys', 'pgp_long_ids', 'pgp_replyinline', 'pgp_retainable_sigs',
\ 'imap_rfc5161', 'imap_server_noise', 'implicit_autoview', 'include_encrypted',
\ 'include_only_first', 'keep_flagged', 'local_date_header', 'mailcap_sanitize',
\ 'maildir_check_cur', 'maildir_header_cache_verify', 'maildir_trash', 'mail_check_recent',
\ 'mail_check_stats', 'markers', 'mark_old', 'menu_move_off', 'menu_scroll',
\ 'message_cache_clean', 'meta_key', 'me_too', 'mh_purge', 'mime_forward_decode',
\ 'mime_type_query_first', 'narrow_tree', 'nm_query_window_enable', 'nm_record',
\ 'nntp_listgroup', 'nntp_load_description', 'pager_stop', 'pgp_auto_decode',
\ 'pgp_auto_inline', 'pgp_check_exit', 'pgp_check_gpg_decrypt_status_fd',
\ 'pgp_ignore_subkeys', 'pgp_long_ids', 'pgp_reply_inline', 'pgp_retainable_sigs',
\ 'pgp_self_encrypt', 'pgp_show_unusable', 'pgp_strict_enc', 'pgp_use_gpg_agent',
\ 'pipe_decode', 'pipe_split', 'pop_auth_try_all', 'pop_last', 'postpone_encrypt',
\ 'print_decode', 'print_split', 'prompt_after', 'read_only', 'reflow_space_quotes',
\ 'reflow_text', 'reply_self', 'reply_with_xorig', 'resolve', 'resume_draft_files',
\ 'resume_edited_draft_files', 'reverse_alias', 'reverse_name', 'reverse_realname',
\ 'rfc2047_parameters', 'save_address', 'save_empty', 'save_name', 'save_unsubscribed',
\ 'score', 'show_new_news', 'show_only_unread', 'sidebar_folder_indent',
\ 'sidebar_new_mail_only', 'sidebar_next_new_wrap', 'sidebar_non_empty_mailbox_only',
\ 'sidebar_on_right', 'sidebar_short_path', 'sidebar_visible', 'sig_dashes', 'sig_on_top',
\ 'size_show_bytes', 'size_show_fractions', 'size_show_mb', 'size_units_on_left',
\ 'smart_wrap', 'smime_ask_cert_label', 'smime_decrypt_use_default_key', 'smime_is_default',
\ 'smime_self_encrypt', 'sort_re', 'ssl_force_tls', 'ssl_usesystemcerts', 'ssl_use_sslv2',
\ 'ssl_use_sslv3', 'ssl_use_tlsv1', 'ssl_use_tlsv1_1', 'ssl_use_tlsv1_2', 'ssl_use_tlsv1_3',
\ 'pipe_decode', 'pipe_decode_weed', 'pipe_split', 'pop_auth_try_all', 'pop_last',
\ 'postpone_encrypt', 'print_decode', 'print_decode_weed', 'print_split', 'prompt_after',
\ 'read_only', 'reflow_space_quotes', 'reflow_text', 'reply_self', 'reply_with_xorig',
\ 'resolve', 'resume_draft_files', 'resume_edited_draft_files', 'reverse_alias',
\ 'reverse_name', 'reverse_real_name', 'rfc2047_parameters', 'save_address', 'save_empty',
\ 'save_name', 'save_unsubscribed', 'score', 'show_new_news', 'show_only_unread',
\ 'sidebar_folder_indent', 'sidebar_new_mail_only', 'sidebar_next_new_wrap',
\ 'sidebar_non_empty_mailbox_only', 'sidebar_on_right', 'sidebar_short_path',
\ 'sidebar_visible', 'sig_dashes', 'sig_on_top', 'size_show_bytes', 'size_show_fractions',
\ 'size_show_mb', 'size_units_on_left', 'smart_wrap', 'smime_ask_cert_label',
\ 'smime_decrypt_use_default_key', 'smime_is_default', 'smime_self_encrypt', 'sort_re',
\ 'ssl_force_tls', 'ssl_use_sslv2', 'ssl_use_sslv3', 'ssl_use_system_certs',
\ 'ssl_use_tlsv1', 'ssl_use_tlsv1_1', 'ssl_use_tlsv1_2', 'ssl_use_tlsv1_3',
\ 'ssl_verify_dates', 'ssl_verify_host', 'ssl_verify_partial_chains', 'status_on_top',
\ 'strict_threads', 'suspend', 'text_flowed', 'thorough_search', 'thread_received', 'tilde',
\ 'ts_enabled', 'uncollapse_jump', 'uncollapse_new', 'user_agent', 'use_8bitmime',
\ 'use_domain', 'use_envelope_from', 'use_from', 'use_ipv6', 'virtual_spoolfile',
\ 'wait_key', 'weed', 'wrap_search', 'write_bcc', 'x_comment_to'
\ 'ts_enabled', 'tunnel_is_secure', 'uncollapse_jump', 'uncollapse_new', 'user_agent',
\ 'use_8bit_mime', 'use_domain', 'use_envelope_from', 'use_from', 'use_ipv6',
\ 'virtual_spool_file', 'wait_key', 'weed', 'wrap_search', 'write_bcc', 'x_comment_to'
\ ], 0)
" CHECKED 2020-06-21
" CHECKED 2022-04-08
" Deprecated Bools
" List of DT_SYNONYM or DT_DEPRECATED Bools in MuttVars in mutt_config.c
call s:boolQuadGen('Bool', [
\ 'edit_hdrs', 'envelope_from', 'forw_decode', 'forw_decrypt', 'forw_quote',
\ 'header_cache_compress', 'ignore_linear_white_space', 'pgp_autoencrypt', 'pgp_autosign',
\ 'pgp_auto_traditional', 'pgp_create_traditional', 'pgp_replyencrypt', 'pgp_replysign',
\ 'pgp_replysignencrypted', 'xterm_set_titles'
\ 'askbcc', 'askcc', 'autoedit', 'confirmappend', 'confirmcreate', 'crypt_autoencrypt',
\ 'crypt_autopgp', 'crypt_autosign', 'crypt_autosmime', 'crypt_confirmhook',
\ 'crypt_replyencrypt', 'crypt_replysign', 'crypt_replysignencrypted', 'edit_hdrs',
\ 'envelope_from', 'forw_decode', 'forw_decrypt', 'forw_quote', 'header_cache_compress',
\ 'ignore_linear_white_space', 'imap_servernoise', 'include_onlyfirst', 'metoo',
\ 'mime_subject', 'pgp_autoencrypt', 'pgp_autoinline', 'pgp_autosign',
\ 'pgp_auto_traditional', 'pgp_create_traditional', 'pgp_replyencrypt', 'pgp_replyinline',
\ 'pgp_replysign', 'pgp_replysignencrypted', 'reverse_realname', 'ssl_usesystemcerts',
\ 'use_8bitmime', 'virtual_spoolfile', 'xterm_set_titles'
\ ], 1)
" CHECKED 2020-06-21
" CHECKED 2022-04-08
" List of DT_QUAD in MuttVars in mutt_config.c
call s:boolQuadGen('Quad', [
\ 'abort_noattach', 'abort_nosubject', 'abort_unmodified', 'bounce', 'catchup_newsgroup',
@@ -481,31 +494,32 @@ call s:boolQuadGen('Quad', [
\ 'post_moderated', 'print', 'quit', 'recall', 'reply_to', 'ssl_starttls',
\ ], 0)
" CHECKED 2020-06-21
" CHECKED 2022-04-08
" Deprecated Quads
" List of DT_SYNONYM or DT_DEPRECATED Quads in MuttVars in mutt_config.c
call s:boolQuadGen('Quad', [
\ 'mime_fwd', 'pgp_encrypt_self', 'pgp_verify_sig', 'smime_encrypt_self'
\ ], 1)
" CHECKED 2020-06-21
" CHECKED 2022-04-08
" List of DT_NUMBER or DT_LONG in MuttVars in mutt_config.c
syntax keyword muttrcVarNum skipwhite contained
\ connect_timeout debug_level header_cache_compress_level history
\ imap_fetch_chunk_size imap_keepalive imap_pipeline_depth imap_poll_timeout mail_check
\ mail_check_stats_interval menu_context net_inc nm_db_limit nm_open_timeout
\ nm_query_window_current_position nm_query_window_duration nntp_context nntp_poll
\ pager_context pager_index_lines pgp_timeout pop_checkinterval read_inc reflow_wrap
\ save_history score_threshold_delete score_threshold_flag score_threshold_read
\ search_context sendmail_wait sidebar_component_depth sidebar_width skip_quoted_offset
\ sleep_time smime_timeout ssl_min_dh_prime_bits timeout time_inc toggle_quoted_show_levels
\ wrap wrap_headers write_inc
\ connect_timeout debug_level header_cache_compress_level history imap_fetch_chunk_size
\ imap_keepalive imap_pipeline_depth imap_poll_timeout mail_check mail_check_stats_interval
\ menu_context net_inc nm_db_limit nm_open_timeout nm_query_window_current_position
\ nm_query_window_duration nntp_context nntp_poll pager_context pager_index_lines
\ pager_read_delay pager_skip_quoted_context pgp_timeout pop_check_interval read_inc
\ reflow_wrap save_history score_threshold_delete score_threshold_flag score_threshold_read
\ search_context sendmail_wait sidebar_component_depth sidebar_width sleep_time
\ smime_timeout ssl_min_dh_prime_bits timeout time_inc toggle_quoted_show_levels wrap
\ wrap_headers write_inc
\ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
" CHECKED 2022-04-08
" Deprecated Numbers
syntax keyword muttrcVarDeprecatedNum contained skipwhite
\ header_cache_pagesize wrapmargin
\ nextgroup=muttrcSetNumAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
\ header_cache_pagesize pop_checkinterval skip_quoted_offset
" CHECKED 2020-06-21
" CHECKED 2022-04-08
" List of DT_STRING in MuttVars in mutt_config.c
" Special cases first, and all the rest at the end
" Formats themselves must be updated in their respective groups
@@ -517,19 +531,19 @@ syntax keyword muttrcVarStr contained skipwhite compose_format nextgroup=muttrcV
syntax keyword muttrcVarStr contained skipwhite folder_format vfolder_format nextgroup=muttrcVarEqualsFolderFmt
syntax keyword muttrcVarStr contained skipwhite attribution forward_format index_format message_format pager_format nextgroup=muttrcVarEqualsIdxFmt
syntax keyword muttrcVarStr contained skipwhite mix_entry_format nextgroup=muttrcVarEqualsMixFmt
syntax keyword muttrcVarStr contained skipwhite pattern_format nextgroup=muttrcVarEqualsPatternFmt
syntax keyword muttrcVarStr contained skipwhite
\ pgp_clearsign_command pgp_decode_command pgp_decrypt_command
\ pgp_encrypt_only_command pgp_encrypt_sign_command pgp_export_command pgp_getkeys_command
\ pgp_import_command pgp_list_pubring_command pgp_list_secring_command
\ pgp_sign_command pgp_verify_command pgp_verify_key_command
\ pgp_clear_sign_command pgp_decode_command pgp_decrypt_command pgp_encrypt_only_command
\ pgp_encrypt_sign_command pgp_export_command pgp_get_keys_command pgp_import_command
\ pgp_list_pubring_command pgp_list_secring_command pgp_sign_command pgp_verify_command
\ pgp_verify_key_command
\ nextgroup=muttrcVarEqualsPGPCmdFmt
syntax keyword muttrcVarStr contained skipwhite pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt
syntax keyword muttrcVarStr contained skipwhite query_format nextgroup=muttrcVarEqualsQueryFmt
syntax keyword muttrcVarStr contained skipwhite
\ smime_decrypt_command smime_encrypt_command smime_get_cert_command
\ smime_get_cert_email_command smime_get_signer_cert_command
\ smime_import_cert_command smime_pk7out_command smime_sign_command
\ smime_verify_command smime_verify_opaque_command
\ smime_get_cert_email_command smime_get_signer_cert_command smime_import_cert_command
\ smime_pk7out_command smime_sign_command smime_verify_command smime_verify_opaque_command
\ nextgroup=muttrcVarEqualsSmimeFmt
syntax keyword muttrcVarStr contained skipwhite status_format ts_icon_format ts_status_format nextgroup=muttrcVarEqualsStatusFmt
syntax keyword muttrcVarStr contained skipwhite date_format nextgroup=muttrcVarEqualsStrftimeFmt
@@ -538,64 +552,66 @@ syntax keyword muttrcVarStr contained skipwhite sidebar_format nextgroup=muttrcV
syntax keyword muttrcVarStr contained skipwhite
\ abort_key arrow_string assumed_charset attach_charset attach_sep attribution_locale
\ autocrypt_acct_format charset config_charset content_type crypt_protected_headers_subject
\ default_hook dsn_notify dsn_return empty_subject escape forward_attribution_intro
\ forward_attribution_trailer header_cache_backend header_cache_compress_method hidden_tags
\ hostname imap_authenticators imap_delim_chars imap_headers imap_login imap_pass imap_user
\ indent_string mailcap_path mark_macro_prefix mh_seq_flagged mh_seq_replied mh_seq_unseen
\ newsgroups_charset news_server nm_default_url nm_exclude_tags nm_flagged_tag nm_query_type
\ nm_query_window_current_search nm_query_window_timebase nm_record_tags nm_replied_tag
\ nm_unread_tag nntp_authenticators nntp_pass nntp_user pgp_default_key pgp_sign_as pipe_sep
\ pop_authenticators pop_host pop_pass pop_user postpone_encrypt_as post_indent_string
\ preconnect preferred_languages realname send_charset show_multipart_alternative
\ sidebar_delim_chars sidebar_divider_char sidebar_indent_string simple_search
\ smime_default_key smime_encrypt_with smime_sign_as smime_sign_digest_alg
\ smtp_authenticators smtp_pass smtp_url smtp_user spam_separator ssl_ciphers
\ default_hook dsn_notify dsn_return empty_subject forward_attribution_intro
\ forward_attribution_trailer greeting header_cache_backend header_cache_compress_method
\ hidden_tags hostname imap_authenticators imap_delim_chars imap_headers imap_login
\ imap_pass imap_user indent_string mailcap_path mark_macro_prefix mh_seq_flagged
\ mh_seq_replied mh_seq_unseen newsgroups_charset news_server nm_default_url nm_exclude_tags
\ nm_flagged_tag nm_query_type nm_query_window_current_search nm_query_window_or_terms
\ nm_query_window_timebase nm_record_tags nm_replied_tag nm_unread_tag nntp_authenticators
\ nntp_pass nntp_user pgp_default_key pgp_sign_as pipe_sep pop_authenticators pop_host
\ pop_pass pop_user postpone_encrypt_as post_indent_string preconnect preferred_languages
\ real_name send_charset show_multipart_alternative sidebar_delim_chars sidebar_divider_char
\ sidebar_indent_string simple_search smime_default_key smime_encrypt_with smime_sign_as
\ smime_sign_digest_alg smtp_authenticators smtp_pass smtp_url smtp_user spam_separator
\ ssl_ciphers
\ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
" Deprecated strings
syntax keyword muttrcVarDeprecatedStr
\ abort_noattach_regexp attach_keyword forw_format hdr_format indent_str msg_format
\ nm_default_uri pgp_self_encrypt_as post_indent_str print_cmd quote_regexp reply_regexp
\ smime_self_encrypt_as xterm_icon xterm_title
\ abort_noattach_regexp attach_keyword escape forw_format hdr_format indent_str msg_format
\ nm_default_uri pgp_clearsign_command pgp_getkeys_command pgp_self_encrypt_as
\ post_indent_str print_cmd quote_regexp realname reply_regexp smime_self_encrypt_as
\ spoolfile visual xterm_icon xterm_title
" CHECKED 2020-06-21
" CHECKED 2022-04-08
" List of DT_ADDRESS
syntax keyword muttrcVarStr contained skipwhite envelope_from_address from nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
" List of DT_ENUM
syntax keyword muttrcVarStr contained skipwhite mbox_type nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
syntax keyword muttrcVarStr contained skipwhite mbox_type use_threads nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
" List of DT_MBTABLE
syntax keyword muttrcVarStr contained skipwhite crypt_chars flag_chars from_chars status_chars to_chars nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
" CHECKED 2020-06-21
" List of DT_PATH
" CHECKED 2022-04-08
" List of DT_PATH or DT_MAILBOX
syntax keyword muttrcVarStr contained skipwhite
\ alias_file attach_save_dir autocrypt_dir certificate_file debug_file
\ entropy_file folder header_cache history_file mbox message_cachedir newsrc
\ news_cache_dir postponed record signature smime_ca_location
\ smime_certificates smime_keys spoolfile ssl_ca_certificates_file
\ ssl_client_cert tmpdir trash
\ smime_certificates smime_keys spool_file ssl_ca_certificates_file ssl_client_cert
\ tmpdir trash
\ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
" List of DT_COMMAND (excluding pgp_*_command and smime_*_command)
syntax keyword muttrcVarStr contained skipwhite
\ display_filter editor inews ispell mixmaster new_mail_command pager
\ print_command query_command sendmail shell visual external_search_command
\ print_command query_command sendmail shell external_search_command
\ imap_oauth_refresh_command pop_oauth_refresh_command
\ mime_type_query_command smtp_oauth_refresh_command tunnel
\ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
" CHECKED 2020-06-21
" CHECKED 2022-04-08
" List of DT_REGEX
syntax keyword muttrcVarStr contained skipwhite
\ abort_noattach_regex gecos_mask mask pgp_decryption_okay pgp_good_sign
\ quote_regex reply_regex smileys
\ abort_noattach_regex gecos_mask mask pgp_decryption_okay pgp_good_sign quote_regex
\ reply_regex smileys
\ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
" List of DT_SORT
syntax keyword muttrcVarStr contained skipwhite
\ pgp_sort_keys sidebar_sort_method sort sort_alias sort_aux sort_browser
\ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr
" CHECKED 2020-06-21
" List of commands in Commands in mutt_config.c
" CHECKED 2022-04-08
" List of commands in mutt_commands in mutt_commands.c
" Remember to remove hooks, they have already been dealt with
syntax keyword muttrcCommand skipwhite alias nextgroup=muttrcAliasGroupDef,muttrcAliasKey,muttrcAliasNL
syntax keyword muttrcCommand skipwhite bind nextgroup=muttrcBindMenuList,muttrcBindMenuListNL
@@ -607,14 +623,12 @@ syntax keyword muttrcCommand skipwhite spam nextgroup=muttrcSpamPattern
syntax keyword muttrcCommand skipwhite unalias nextgroup=muttrcUnAliasKey,muttrcUnAliasNL
syntax keyword muttrcCommand skipwhite unhook nextgroup=muttrcHooks
syntax keyword muttrcCommand skipwhite
\ alternative_order attachments auto_view finish hdr_order ifdef ifndef
\ ignore lua lua-source mailboxes mailto_allow mime_lookup my_hdr push score
\ setenv sidebar_whitelist source subjectrx subscribe-to tag-formats
\ tag-transforms unalternative_order unattachments unauto_view uncolor
\ unhdr_order unignore unmailboxes unmailto_allow unmime_lookup unmono
\ unmy_hdr unscore unsetenv unsidebar_whitelist unsubjectrx unsubscribe-from
\ unvirtual-mailboxes virtual-mailboxes named-mailboxes
\ echo unbind unmacro
\ alternative_order attachments auto_view cd echo finish hdr_order ifdef ifndef ignore lua
\ lua-source mailboxes mailto_allow mime_lookup my_hdr named-mailboxes push score setenv
\ sidebar_whitelist source subjectrx subscribe-to tag-formats tag-transforms
\ unalternative_order unattachments unauto_view unbind uncolor unhdr_order unignore unmacro
\ unmailboxes unmailto_allow unmime_lookup unmono unmy_hdr unscore unsetenv
\ unsidebar_whitelist unsubjectrx unsubscribe-from unvirtual-mailboxes virtual-mailboxes
function! s:genFunctions(functions)
for f in a:functions
@@ -622,66 +636,68 @@ function! s:genFunctions(functions)
endfor
endfunction
" CHECKED 2020-06-21
" CHECKED 2022-04-08
" List of functions in functions.c
" Note: 'noop' is included but is elsewhere in the source
call s:genFunctions(['noop',
\ 'accept', 'append', 'attach-file', 'attach-key', 'attach-message', 'attach-news-message',
\ 'autocrypt-acct-menu', 'autocrypt-menu', 'backspace', 'backward-char', 'backward-word',
\ 'bol', 'bottom-page', 'bottom', 'bounce-message', 'break-thread', 'buffy-cycle',
\ 'buffy-list', 'capitalize-word', 'catchup', 'chain-next', 'chain-prev', 'change-dir',
\ 'change-folder-readonly', 'change-folder', 'change-newsgroup-readonly',
\ 'change-newsgroup', 'change-vfolder', 'check-new', 'check-stats',
\ 'accept', 'alias-dialog', 'append', 'attach-file', 'attach-key', 'attach-message',
\ 'attach-news-message', 'autocrypt-acct-menu', 'autocrypt-menu', 'backspace',
\ 'backward-char', 'backward-word', 'bol', 'bottom', 'bottom-page', 'bounce-message',
\ 'break-thread', 'buffy-cycle', 'buffy-list', 'capitalize-word', 'catchup', 'chain-next',
\ 'chain-prev', 'change-dir', 'change-folder', 'change-folder-readonly', 'change-newsgroup',
\ 'change-newsgroup-readonly', 'change-vfolder', 'check-new', 'check-stats',
\ 'check-traditional-pgp', 'clear-flag', 'collapse-all', 'collapse-parts',
\ 'collapse-thread', 'complete-query', 'complete', 'compose-to-sender', 'copy-file',
\ 'collapse-thread', 'complete', 'complete-query', 'compose-to-sender', 'copy-file',
\ 'copy-message', 'create-account', 'create-alias', 'create-mailbox', 'current-bottom',
\ 'current-middle', 'current-top', 'decode-copy', 'decode-save', 'decrypt-copy',
\ 'decrypt-save', 'delete-account', 'delete-char', 'delete-entry', 'delete-mailbox',
\ 'delete-message', 'delete-pattern', 'delete-subthread', 'delete-thread', 'delete',
\ 'decrypt-save', 'delete', 'delete-account', 'delete-char', 'delete-entry',
\ 'delete-mailbox', 'delete-message', 'delete-pattern', 'delete-subthread', 'delete-thread',
\ 'descend-directory', 'detach-file', 'display-address', 'display-filename',
\ 'display-message', 'display-toggle-weed', 'downcase-word', 'edit-bcc', 'edit-cc',
\ 'edit-description', 'edit-encoding', 'edit-fcc', 'edit-file', 'edit-followup-to',
\ 'edit-from', 'edit-headers', 'edit-label', 'edit-language', 'edit-message', 'edit-mime',
\ 'edit-newsgroups', 'edit-or-view-raw-message', 'edit-raw-message', 'edit-reply-to',
\ 'edit-subject', 'edit-to', 'edit-type', 'edit-x-comment-to', 'edit', 'end-cond',
\ 'enter-command', 'enter-mask', 'entire-thread', 'eol', 'exit', 'extract-keys',
\ 'fetch-mail', 'filter-entry', 'first-entry', 'flag-message', 'followup-message',
\ 'forget-passphrase', 'forward-char', 'forward-message', 'forward-to-group',
\ 'forward-word', 'get-attachment', 'get-children', 'get-message', 'get-parent',
\ 'goto-folder', 'goto-parent', 'group-alternatives', 'group-chat-reply',
\ 'group-multilingual', 'group-reply', 'half-down', 'half-up', 'help', 'history-down',
\ 'history-search', 'history-up', 'imap-fetch-mail', 'imap-logout-all', 'insert', 'ispell',
\ 'jump', 'kill-eol', 'kill-eow', 'kill-line', 'kill-word', 'last-entry',
\ 'limit-current-thread', 'limit', 'link-threads', 'list-reply', 'mail-key',
\ 'mailbox-cycle', 'mailbox-list', 'mail', 'mark-as-new', 'mark-message', 'middle-page',
\ 'mix', 'modify-labels-then-hide', 'modify-labels', 'modify-tags-then-hide',
\ 'modify-tags', 'move-down', 'move-up', 'new-mime', 'next-entry', 'next-line',
\ 'next-new-then-unread', 'next-new', 'next-page', 'next-subthread', 'next-thread',
\ 'next-undeleted', 'next-unread-mailbox', 'next-unread', 'parent-message', 'pgp-menu',
\ 'pipe-entry', 'pipe-message', 'post-message', 'postpone-message', 'previous-entry',
\ 'previous-line', 'previous-new-then-unread', 'previous-new', 'previous-page',
\ 'previous-subthread', 'previous-thread', 'previous-undeleted', 'previous-unread',
\ 'print-entry', 'print-message', 'purge-message', 'purge-thread', 'quasi-delete',
\ 'query-append', 'query', 'quit', 'quote-char', 'read-subthread', 'read-thread',
\ 'recall-message', 'reconstruct-thread', 'redraw-screen', 'refresh', 'reload-active',
\ 'rename-attachment', 'rename-file', 'rename-mailbox', 'reply', 'resend-message',
\ 'root-message', 'save-entry', 'save-message', 'search-next', 'search-opposite',
\ 'search-reverse', 'search-toggle', 'search', 'select-entry', 'select-new',
\ 'display-message', 'display-toggle-weed', 'downcase-word', 'edit', 'edit-bcc', 'edit-cc',
\ 'edit-content-id', 'edit-description', 'edit-encoding', 'edit-fcc', 'edit-file',
\ 'edit-followup-to', 'edit-from', 'edit-headers', 'edit-label', 'edit-language',
\ 'edit-message', 'edit-mime', 'edit-newsgroups', 'edit-or-view-raw-message',
\ 'edit-raw-message', 'edit-reply-to', 'edit-subject', 'edit-to', 'edit-type',
\ 'edit-x-comment-to', 'end-cond', 'enter-command', 'enter-mask', 'entire-thread', 'eol',
\ 'error-history', 'exit', 'extract-keys', 'fetch-mail', 'filter-entry', 'first-entry',
\ 'flag-message', 'followup-message', 'forget-passphrase', 'forward-char',
\ 'forward-message', 'forward-to-group', 'forward-word', 'get-attachment', 'get-children',
\ 'get-message', 'get-parent', 'goto-folder', 'goto-parent', 'group-alternatives',
\ 'group-chat-reply', 'group-multilingual', 'group-related', 'group-reply', 'half-down',
\ 'half-up', 'help', 'history-down', 'history-search', 'history-up', 'imap-fetch-mail',
\ 'imap-logout-all', 'insert', 'ispell', 'jump', 'kill-eol', 'kill-eow', 'kill-line',
\ 'kill-word', 'last-entry', 'limit', 'limit-current-thread', 'link-threads', 'list-reply',
\ 'list-subscribe', 'list-unsubscribe', 'mail', 'mail-key', 'mailbox-cycle', 'mailbox-list',
\ 'mark-as-new', 'mark-message', 'middle-page', 'mix', 'modify-labels',
\ 'modify-labels-then-hide', 'modify-tags', 'modify-tags-then-hide', 'move-down', 'move-up',
\ 'new-mime', 'next-entry', 'next-line', 'next-new', 'next-new-then-unread', 'next-page',
\ 'next-subthread', 'next-thread', 'next-undeleted', 'next-unread', 'next-unread-mailbox',
\ 'parent-message', 'pgp-menu', 'pipe-entry', 'pipe-message', 'post-message',
\ 'postpone-message', 'previous-entry', 'previous-line', 'previous-new',
\ 'previous-new-then-unread', 'previous-page', 'previous-subthread', 'previous-thread',
\ 'previous-undeleted', 'previous-unread', 'print-entry', 'print-message', 'purge-message',
\ 'purge-thread', 'quasi-delete', 'query', 'query-append', 'quit', 'quote-char',
\ 'read-subthread', 'read-thread', 'recall-message', 'reconstruct-thread', 'redraw-screen',
\ 'refresh', 'reload-active', 'rename-attachment', 'rename-file', 'rename-mailbox', 'reply',
\ 'resend-message', 'root-message', 'save-entry', 'save-message', 'search', 'search-next',
\ 'search-opposite', 'search-reverse', 'search-toggle', 'select-entry', 'select-new',
\ 'send-message', 'set-flag', 'shell-escape', 'show-limit', 'show-log-messages',
\ 'show-version', 'sidebar-next-new', 'sidebar-first', 'sidebar-last', 'sidebar-next',
\ 'sidebar-open', 'sidebar-page-down', 'sidebar-page-up', 'sidebar-prev-new',
\ 'sidebar-prev', 'sidebar-toggle-virtual', 'sidebar-toggle-visible', 'skip-quoted',
\ 'smime-menu', 'sort-mailbox', 'sort-reverse', 'sort', 'subscribe-pattern',
\ 'sync-mailbox', 'tag-entry', 'tag-message', 'tag-pattern', 'tag-prefix-cond',
\ 'tag-prefix', 'tag-subthread', 'tag-thread', 'toggle-active', 'toggle-disposition',
\ 'toggle-mailboxes', 'toggle-new', 'toggle-prefer-encrypt', 'toggle-quoted',
\ 'toggle-read', 'toggle-recode', 'toggle-subscribed', 'toggle-unlink', 'toggle-write',
\ 'top-page', 'top', 'transpose-chars', 'uncatchup', 'undelete-entry', 'undelete-message',
\ 'undelete-pattern', 'undelete-subthread', 'undelete-thread', 'unsubscribe-pattern',
\ 'untag-pattern', 'upcase-word', 'update-encoding', 'verify-key',
\ 'vfolder-from-query-readonly', 'vfolder-from-query', 'vfolder-window-backward',
\ 'vfolder-window-forward', 'view-attachments', 'view-attach', 'view-file', 'view-mailcap',
\ 'view-name', 'view-raw-message', 'view-text', 'what-key', 'write-fcc'
\ 'show-version', 'sidebar-first', 'sidebar-last', 'sidebar-next', 'sidebar-next-new',
\ 'sidebar-open', 'sidebar-page-down', 'sidebar-page-up', 'sidebar-prev',
\ 'sidebar-prev-new', 'sidebar-toggle-virtual', 'sidebar-toggle-visible', 'skip-headers',
\ 'skip-quoted', 'smime-menu', 'sort', 'sort-alias', 'sort-alias-reverse', 'sort-mailbox',
\ 'sort-reverse', 'subscribe', 'subscribe-pattern', 'sync-mailbox', 'tag-entry',
\ 'tag-message', 'tag-pattern', 'tag-prefix', 'tag-prefix-cond', 'tag-subthread',
\ 'tag-thread', 'toggle-active', 'toggle-disposition', 'toggle-mailboxes', 'toggle-new',
\ 'toggle-prefer-encrypt', 'toggle-quoted', 'toggle-read', 'toggle-recode',
\ 'toggle-subscribed', 'toggle-unlink', 'toggle-write', 'top', 'top-page',
\ 'transpose-chars', 'uncatchup', 'undelete-entry', 'undelete-message', 'undelete-pattern',
\ 'undelete-subthread', 'undelete-thread', 'ungroup-attachment', 'unsubscribe',
\ 'unsubscribe-pattern', 'untag-pattern', 'upcase-word', 'update-encoding', 'verify-key',
\ 'vfolder-from-query', 'vfolder-from-query-readonly', 'vfolder-window-backward',
\ 'vfolder-window-forward', 'vfolder-window-reset', 'view-attach', 'view-attachments',
\ 'view-file', 'view-mailcap', 'view-name', 'view-pager', 'view-raw-message', 'view-text',
\ 'what-key', 'write-fcc'
\ ])
" Define the default highlighting.
@@ -758,6 +774,7 @@ highlight def link muttrcFolderFormatEscapes muttrcEscape
highlight def link muttrcGroupIndexFormatEscapes muttrcEscape
highlight def link muttrcIndexFormatEscapes muttrcEscape
highlight def link muttrcMixFormatEscapes muttrcEscape
highlight def link muttrcPatternFormatEscapes muttrcEscape
highlight def link muttrcPGPCmdFormatEscapes muttrcEscape
highlight def link muttrcPGPFormatEscapes muttrcEscape
highlight def link muttrcPGPTimeEscapes muttrcEscape
@@ -774,6 +791,7 @@ highlight def link muttrcComposeFormatConditionals muttrcFormatConditionals2
highlight def link muttrcFolderFormatConditionals muttrcFormatConditionals2
highlight def link muttrcIndexFormatConditionals muttrcFormatConditionals2
highlight def link muttrcMixFormatConditionals muttrcFormatConditionals2
highlight def link muttrcPatternFormatConditionals muttrcFormatConditionals2
highlight def link muttrcPGPCmdFormatConditionals muttrcFormatConditionals2
highlight def link muttrcPGPFormatConditionals muttrcFormatConditionals2
highlight def link muttrcSmimeFormatConditionals muttrcFormatConditionals2
@@ -789,6 +807,7 @@ highlight def link muttrcFolderFormatStr muttrcString
highlight def link muttrcGroupIndexFormatStr muttrcString
highlight def link muttrcIndexFormatStr muttrcString
highlight def link muttrcMixFormatStr muttrcString
highlight def link muttrcPatternFormatStr muttrcString
highlight def link muttrcPGPCmdFormatStr muttrcString
highlight def link muttrcPGPFormatStr muttrcString
highlight def link muttrcQueryFormatStr muttrcString

View File

@@ -3,7 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Jun 06
" Last Change: 2021 Nov 03
" ----------------------------------------------------------------------------
"
" Previous Maintainer: Mirko Nasato
@@ -66,7 +66,7 @@ endfunction
com! -nargs=* SynFold call s:run_syntax_fold(<q-args>)
" Not-Top Cluster {{{1
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyParentheses,@Spell
syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyDoubleQuoteSymbolDelimiter,rubySingleQuoteSymbolDelimiter,rubyParentheses,@Spell
" Whitespace Errors {{{1
if exists("ruby_space_errors")
@@ -364,6 +364,9 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
SynFold 'class' syn region rubyClassBlock start="\<class\>" matchgroup=rubyClass skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop
SynFold 'module' syn region rubyModuleBlock start="\<module\>" matchgroup=rubyModule skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop
" endless def
syn match rubyDefine "\<def\s\+\ze[^[:space:];#(]\+\%(\s\+\|\s*(.*)\s*\)=" nextgroup=rubyMethodDeclaration skipwhite
" modifiers
syn match rubyLineContinuation "\\$" nextgroup=@rubyModifier skipwhite skipnl
syn match rubyConditionalModifier "\<\%(if\|unless\)\>"
@@ -430,9 +433,10 @@ endif
" Comments and Documentation {{{1
syn match rubySharpBang "\%^#!.*" display
syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE HACK REVIEW XXX todo contained
syn match rubyEncoding "[[:alnum:]-]\+" contained display
syn match rubyEncoding "[[:alnum:]-_]\+" contained display
syn match rubyMagicComment "\c\%<3l#\s*\zs\%(coding\|encoding\):" contained nextgroup=rubyEncoding skipwhite
syn match rubyMagicComment "\c\%<10l#\s*\zs\%(frozen_string_literal\|warn_indent\|warn_past_scope\):" contained nextgroup=rubyBoolean skipwhite
syn match rubyMagicComment "\c\%<10l#\s*\zs\%(shareable_constant_value\):" contained nextgroup=rubyEncoding skipwhite
syn match rubyComment "#.*" contains=@rubyCommentSpecial,rubySpaceError,@Spell
syn cluster rubyCommentSpecial contains=rubySharpBang,rubyTodo,rubyMagicComment
@@ -465,6 +469,10 @@ syn match rubyDefinedOperator "\%#=1\<defined?" display
syn match rubySymbol "\%(\w\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]\=::\@!"he=e-1 contained containedin=rubyBlockParameterList,rubyCurlyBlock
syn match rubySymbol "[]})\"':]\@1<!\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="he=e-1
syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="hs=s+1,he=e-1
syn match rubySingleQuoteSymbolDelimiter "'" contained
syn match rubySymbol "'\%(\\.\|[^']\)*'::\@!"he=e-1 contains=rubyQuoteEscape,rubyBackslashEscape,rubySingleQuoteSymbolDelimiter
syn match rubyDoubleQuoteSymbolDelimiter "\"" contained
syn match rubySymbol "\"\%(\\.\|[^\"]\)*\"::\@!"he=e-1 contains=@rubyStringSpecial,rubyDoubleQuoteSymbolDelimiter
" __END__ Directive {{{1
SynFold '__END__' syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$"
@@ -565,6 +573,8 @@ hi def link rubyHeredocDelimiter rubyStringDelimiter
hi def link rubyPercentRegexpDelimiter rubyRegexpDelimiter
hi def link rubyPercentStringDelimiter rubyStringDelimiter
hi def link rubyPercentSymbolDelimiter rubySymbolDelimiter
hi def link rubyDoubleQuoteSymbolDelimiter rubySymbolDelimiter
hi def link rubySingleQuoteSymbolDelimiter rubySymbolDelimiter
hi def link rubyRegexpDelimiter rubyStringDelimiter
hi def link rubySymbolDelimiter rubySymbol
hi def link rubyString String

View File

@@ -1,9 +1,10 @@
" Vim syntax file
" Language: SML
" Filenames: *.sml *.sig
" Maintainers: Markus Mottl <markus.mottl@gmail.com>
" Fabrizio Zeno Cornelli <zeno@filibusta.crema.unimi.it>
" Last Change: 2021 Oct 04
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
" Previous Maintainer: Fabrizio Zeno Cornelli
" <zeno@filibusta.crema.unimi.it> (invalid)
" Last Change: 2022 Apr 01
" 2015 Aug 31 - Fixed opening of modules (Ramana Kumar)
" 2006 Oct 23 - Fixed character highlighting bug (MM)

View File

@@ -37,7 +37,7 @@ fun! s:SynSet()
unlet b:current_syntax
endif
let s = expand("<amatch>")
0verbose let s = expand("<amatch>")
if s == "ON"
" :set syntax=ON
if &filetype == ""

View File

@@ -28,8 +28,9 @@ endif
" Set up the connection between FileType and Syntax autocommands.
" This makes the syntax automatically set when the file type is detected.
" Avoid an error when 'verbose' is set and <amatch> expansion fails.
augroup syntaxset
au! FileType * exe "set syntax=" . expand("<amatch>")
au! FileType * 0verbose exe "set syntax=" . expand("<amatch>")
augroup END

View File

@@ -1,5 +1,5 @@
" Language: tmux(1) configuration file
" Version: 3.2a (git-44ada9cd)
" Version: 3.3-rc (git-964deae4)
" URL: https://github.com/ericpruitt/tmux.vim/
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
" License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
@@ -18,40 +18,49 @@ syntax iskeyword @,48-57,_,192-255,-
syntax case match
syn keyword tmuxAction none any current other
syn keyword tmuxBoolean off on
syn keyword tmuxBoolean off on yes no
syn keyword tmuxTodo FIXME NOTE TODO XXX contained
syn match tmuxColour /\<colour[0-9]\+/ display
syn match tmuxColour /\<colou\?r[0-9]\+\>/ display
syn match tmuxKey /\(C-\|M-\|\^\)\+\S\+/ display
syn match tmuxNumber /\<\d\+\>/ display
syn match tmuxFlags /\s-\a\+/ display
syn match tmuxVariable /\w\+=/ display
syn match tmuxVariableExpansion /\${\=\w\+}\=/ display
syn match tmuxControl /%\(if\|elif\|else\|endif\)/
syn match tmuxVariableExpansion /\$\({[A-Za-z_]\w*}\|[A-Za-z_]\w*\)/ display
syn match tmuxControl /^\s*%\(if\|elif\|else\|endif\)\>/
syn match tmuxEscape /\\\(u\x\{4\}\|U\x\{8\}\|\o\{3\}\|[\\ernt$]\)/ display
syn region tmuxComment start=/#/ skip=/\\\@<!\\$/ end=/$/ contains=tmuxTodo,@Spell
syn region tmuxString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=tmuxFormatString,@Spell
syn region tmuxString start=+'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end='$' contains=tmuxFormatString,@Spell
syn region tmuxString start=+"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=tmuxFormatString,tmuxEscape,tmuxVariableExpansion,@Spell
syn region tmuxUninterpolatedString start=+'+ skip=+\\$+ excludenl end=+'+ end='$' contains=tmuxFormatString,@Spell
" TODO: Figure out how escaping works inside of #(...) and #{...} blocks.
syn region tmuxFormatString start=/#[#DFhHIPSTW]/ end=// contained keepend
syn region tmuxFormatString start=/#{/ skip=/#{.\{-}}/ end=/}/ keepend
syn region tmuxFormatString start=/#(/ skip=/#(.\{-})/ end=/)/ contained keepend
" At the time of this writing, the latest tmux release will parse a line
" reading "abc=xyz set-option ..." as an assignment followed by a command
" hence the presence of "\s" in the "end" argument.
syn region tmuxAssignment matchgroup=tmuxVariable start=/^\s*[A-Za-z_]\w*=\@=/ skip=/\\$\|\\\s/ end=/\s\|$/ contains=tmuxString,tmuxUninterpolatedString,tmuxVariableExpansion,tmuxControl,tmuxEscape
hi def link tmuxFormatString Identifier
hi def link tmuxAction Boolean
hi def link tmuxBoolean Boolean
hi def link tmuxCommands Keyword
hi def link tmuxControl Keyword
hi def link tmuxControl PreCondit
hi def link tmuxComment Comment
hi def link tmuxEscape Special
hi def link tmuxEscapeUnquoted Special
hi def link tmuxKey Special
hi def link tmuxNumber Number
hi def link tmuxFlags Identifier
hi def link tmuxOptions Function
hi def link tmuxString String
hi def link tmuxTodo Todo
hi def link tmuxUninterpolatedString
\ String
hi def link tmuxVariable Identifier
hi def link tmuxVariableExpansion Identifier
@@ -61,63 +70,85 @@ hi def link tmuxVariableExpansion Identifier
if get(g:, "tmux_syntax_colors", 1)
for s:i in range(0, 255)
let s:bg = (!s:i || s:i == 16 || (s:i > 231 && s:i < 235)) ? 15 : "none"
exec "syn match tmuxColour" . s:i . " /\\<colour" . s:i . "\\>/ display"
exec "syn match tmuxColour" . s:i . " /\\<colou\\?r" . s:i . "\\>/ display"
\ " | highlight tmuxColour" . s:i . " ctermfg=" . s:i . " ctermbg=" . s:bg
endfor
endif
syn keyword tmuxOptions
\ backspace buffer-limit command-alias copy-command default-terminal editor
\ escape-time exit-empty activity-action assume-paste-time base-index
\ bell-action default-command default-shell default-size destroy-unattached
\ activity-action after-bind-key after-capture-pane after-copy-mode
\ after-display-message after-display-panes after-kill-pane
\ after-list-buffers after-list-clients after-list-keys after-list-panes
\ after-list-sessions after-list-windows after-load-buffer after-lock-server
\ after-new-session after-new-window after-paste-buffer after-pipe-pane
\ after-queue after-refresh-client after-rename-session after-rename-window
\ after-resize-pane after-resize-window after-save-buffer
\ after-select-layout after-select-pane after-select-window after-send-keys
\ after-set-buffer after-set-environment after-set-hook after-set-option
\ after-show-environment after-show-messages after-show-options
\ after-split-window after-unbind-key aggressive-resize alert-activity
\ alert-bell alert-silence allow-passthrough allow-rename alternate-screen
\ assume-paste-time automatic-rename automatic-rename-format backspace
\ base-index bell-action buffer-limit client-active client-attached
\ client-detached client-focus-in client-focus-out client-resized
\ client-session-changed clock-mode-colour clock-mode-style command-alias
\ copy-command copy-mode-current-match-style copy-mode-mark-style
\ copy-mode-match-style cursor-colour cursor-style default-command
\ default-shell default-size default-terminal destroy-unattached
\ detach-on-destroy display-panes-active-colour display-panes-colour
\ display-panes-time display-time exit-unattached extended-keys focus-events
\ history-file history-limit key-table lock-after-time lock-command
\ message-command-style message-limit message-style aggressive-resize
\ allow-rename alternate-screen automatic-rename automatic-rename-format
\ clock-mode-colour clock-mode-style copy-mode-current-match-style
\ copy-mode-mark-style copy-mode-match-style main-pane-height
\ main-pane-width mode-keys mode-style monitor-activity monitor-bell
\ monitor-silence mouse other-pane-height other-pane-width
\ pane-active-border-style pane-base-index pane-border-format
\ pane-border-lines pane-border-status pane-border-style pane-colours prefix
\ prefix2 prompt-history-limit remain-on-exit renumber-windows repeat-time
\ set-clipboard set-titles set-titles-string silence-action status status-bg
\ status-fg status-format status-interval status-justify status-keys
\ status-left status-left-length status-left-style status-position
\ status-right status-right-length status-right-style status-style
\ synchronize-panes terminal-features terminal-overrides update-environment
\ user-keys visual-activity visual-bell visual-silence window-active-style
\ display-panes-time display-time editor escape-time exit-empty
\ exit-unattached extended-keys fill-character focus-events history-file
\ history-limit key-table lock-after-time lock-command main-pane-height
\ main-pane-width message-command-style message-limit message-style
\ mode-keys mode-style monitor-activity monitor-bell monitor-silence mouse
\ other-pane-height other-pane-width pane-active-border-style
\ pane-base-index pane-border-format pane-border-indicators
\ pane-border-lines pane-border-status pane-border-style pane-colours
\ pane-died pane-exited pane-focus-in pane-focus-out pane-mode-changed
\ pane-set-clipboard pane-title-changed popup-border-lines
\ popup-border-style popup-style prefix prefix2 prompt-history-limit
\ remain-on-exit remain-on-exit-format renumber-windows repeat-time
\ scroll-on-clear session-closed session-created session-renamed
\ session-window-changed set-clipboard set-titles set-titles-string
\ silence-action status status-bg status-fg status-format status-interval
\ status-justify status-keys status-left status-left-length
\ status-left-style status-position status-right status-right-length
\ status-right-style status-style synchronize-panes terminal-features
\ terminal-overrides update-environment user-keys visual-activity
\ visual-bell visual-silence window-active-style window-layout-changed
\ window-linked window-pane-changed window-renamed window-resized
\ window-size window-status-activity-style window-status-bell-style
\ window-status-current-format window-status-current-style
\ window-status-format window-status-last-style window-status-separator
\ window-status-style window-style word-separators wrap-search
\ window-status-style window-style window-unlinked word-separators
\ wrap-search xterm-keys
syn keyword tmuxCommands
\ attach attach-session bind bind-key break-pane breakp capture-pane
\ capturep choose-buffer choose-client choose-tree clear-history clearhist
\ capturep choose-buffer choose-client choose-session choose-tree
\ choose-window clear-history clear-prompt-history clearhist clearphist
\ clock-mode command-prompt confirm confirm-before copy-mode customize-mode
\ detach detach-client display display-menu display-message display-panes
\ display-popup displayp find-window findw if if-shell join-pane joinp
\ kill-pane kill-server kill-session kill-window killp has has-session killw
\ delete-buffer deleteb detach detach-client display display-menu
\ display-message display-panes display-popup displayp find-window findw has
\ has-session if if-shell info join-pane joinp kill-pane kill-server
\ kill-session kill-window killp killw last last-pane last-window lastp
\ link-window linkw list-buffers list-clients list-commands list-keys
\ list-panes list-sessions list-windows load-buffer loadb lock lock-client
\ lock-server lock-session lockc last-pane lastp locks ls last last-window
\ lsb delete-buffer deleteb lsc lscm lsk lsp lsw menu move-pane move-window
\ clear-prompt-history clearphist movep movew new new-session new-window
\ neww next next-layout next-window nextl paste-buffer pasteb pipe-pane
\ pipep popup prev previous-layout previous-window prevl refresh
\ refresh-client rename rename-session rename-window renamew resize-pane
\ resize-window resizep resizew respawn-pane respawn-window respawnp
\ respawnw rotate-window rotatew run run-shell save-buffer saveb
\ select-layout select-pane select-window selectl selectp selectw send
\ send-keys send-prefix set set-buffer set-environment set-hook set-option
\ lock-server lock-session lockc locks ls lsb lsc lscm lsk lsp lsw menu
\ move-pane move-window movep movew new new-session new-window neww next
\ next-layout next-window nextl paste-buffer pasteb pipe-pane pipep popup
\ prev previous-layout previous-window prevl refresh refresh-client rename
\ rename-session rename-window renamew resize-pane resize-window resizep
\ resizew respawn-pane respawn-window respawnp respawnw rotate-window
\ rotatew run run-shell save-buffer saveb select-layout select-pane
\ select-window selectl selectp selectw send send-keys send-prefix
\ server-info set set-buffer set-environment set-hook set-option
\ set-window-option setb setenv setw show show-buffer show-environment
\ show-hooks show-messages show-options show-prompt-history
\ show-window-options showb showenv showmsgs showphist showw source
\ source-file split-window splitw start start-server suspend-client suspendc
\ swap-pane swap-window swapp swapw switch-client switchc unbind unbind-key
\ unlink-window unlinkw wait wait-for
\ source-file split-pane split-window splitp splitw start start-server
\ suspend-client suspendc swap-pane swap-window swapp swapw switch-client
\ switchc unbind unbind-key unlink-window unlinkw wait wait-for
let &cpo = s:original_cpo
unlet! s:original_cpo s:bg s:i

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 8.2 script
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" Last Change: March 14, 2022
" Version: 8.2-29
" Last Change: April 08, 2022
" Version: 8.2-33
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
" Automatically generated keyword lists: {{{1
@@ -30,14 +30,14 @@ syn match vimCommand contained "\<z[-+^.=]\=\>"
syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Winbar XMLent XMLns
" vimOptions are caught only when contained in a vimSet {{{2
syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdh ci cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn grepprg guiligatures hf hkmap icon imc imsf inde is isprint kmp lbr listchars lsp makeencoding maxmem mh mmp more mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltype showbreak sidescroll smartindent sp spf srr statusline sw sxq tabstop tags tbs termguicolors textmode thesaurusfunc titlestring tpm ttimeoutlen ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write
syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cdhome cin clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtl guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs lm luadll makeprg maxmempattern mis mmt mouse mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shellxescape showcmd sidescrolloff smarttab spc spl ss stl swapfile syn tag tagstack tc termwinkey textwidth tildeop tl tr ttm ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany
syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cdpath cindent cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lmap lw mat maxmemtot mkspellmem mod mousef mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showfulltag signcolumn smc spell splitbelow ssl stmp swapsync synmaxcol tagbsearch tal tcldll termwinscroll tf timeout tm ts tty tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup
syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cedit cink cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco ml modeline mousefocus mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showmatch siso smd spellcapcheck splitright ssop sts swb syntax tagcase tb tenc termwinsize tfu timeoutlen to tsl ttybuiltin twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay
syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb cf cinkeys cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace loadplugins ma matchtime mef mle modelineexpr mousehide mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmode sj sn spellfile spo st su swf ta tagfunc tbi term termwintype tgc title toolbar tsr ttyfast tws ul ur ve vif vts wcr wi wildmenu winfixheight wiv wrap ws
syn keyword vimOption contained allowrevins arabic autoshelldir backupcopy bdir bh breakat bsdir cc cfu cino cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp lpl macatsui maxcombine menc mls modelines mousem msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showtabline slm so spelllang spr sta sua switchbuf tabline taglength tbidi termbidi terse tgst titlelen toolbariconsize tsrfu ttym twsl undodir ut verbose viminfo wa wd wic wildmode winfixwidth wiw wrapmargin ww
syn keyword vimOption contained altkeymap arabicshape autowrite backupdir bdlay bin breakindent bsk ccv ch cinoptions cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispwords lrm magic maxfuncdepth menuitems mm modifiable mousemodel mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess shq sm softtabstop spelloptions sps stal suffixes sws tabpagemax tagrelative tbis termencoding textauto thesaurus titleold top ttimeout ttymouse twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan xtermcodes
syn keyword vimOption contained ambiwidth ari autowriteall backupext belloff binary breakindentopt bt cd charconvert cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepformat guiheadroom helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw list ls makeef maxmapdepth mfd mmd modified mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shelltemp shortname si smartcase sol spellsuggest sr startofline suffixesadd sxe
syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdh ci cinsd cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispwords lrm magic maxfuncdepth menuitems mm modifiable mousemev mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmode sj sn spellfile spo st su swf ta taglength tbis termguicolors textmode thesaurusfunc titlestring tpm ttimeoutlen ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write
syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cdhome cin cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepformat guiheadroom helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw list ls makeef maxmapdepth mfd mmd modified mousemodel msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showtabline slm so spelllang spr sta sua switchbuf tabline tagrelative tbs termwinkey textwidth tildeop tl tr ttm ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany
syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cdpath cindent cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn grepprg guiligatures hf hkmap icon imc imsf inde is isprint kmp lbr listchars lsp makeencoding maxmem mh mmp more mousemoveevent mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess shq sm softtabstop spelloptions sps stal suffixes sws tabpagemax tags tc termwinscroll tf timeout tm ts tty tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup
syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cedit cink clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtl guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs lm luadll makeprg maxmempattern mis mmt mouse mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shelltemp shortname si smartcase sol spellsuggest sr startofline suffixesadd sxe tabstop tagstack tcldll termwinsize tfu timeoutlen to tsl ttybuiltin twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay
syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb cf cinkeys cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lmap lw mat maxmemtot mkspellmem mod mousef mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltype showbreak sidescroll smartindent sp spf srr statusline sw sxq tag tal tenc termwintype tgc title toolbar tsr ttyfast tws ul ur ve vif vts wcr wi wildmenu winfixheight wiv wrap ws
syn keyword vimOption contained allowrevins arabic autoshelldir backupcopy bdir bh breakat bsdir cc cfu cino cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lnr lz matchpairs mco ml modeline mousefocus mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shellxescape showcmd sidescrolloff smarttab spc spl ss stl swapfile syn tagbsearch tb term terse tgst titlelen toolbariconsize tsrfu ttym twsl undodir ut verbose viminfo wa wd wic wildmode winfixwidth wiw wrapmargin ww
syn keyword vimOption contained altkeymap arabicshape autowrite backupdir bdlay bin breakindent bsk ccv ch cinoptions cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace loadplugins ma matchtime mef mle modelineexpr mousehide mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showfulltag signcolumn smc spell splitbelow ssl stmp swapsync synmaxcol tagcase tbi termbidi textauto thesaurus titleold top ttimeout ttymouse twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan xtermcodes
syn keyword vimOption contained ambiwidth ari autowriteall backupext belloff binary breakindentopt bt cd charconvert cinscopedecls cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp lpl macatsui maxcombine menc mls modelines mousem mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showmatch siso smd spellcapcheck splitright ssop sts swb syntax tagfunc tbidi termencoding
" vimOptions: These are the turn-off setting variants {{{2
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoindent noautowrite noawa noballoonevalterm nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noemoji noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolisp noloadplugins nolz nomagic nomle nomodelineexpr nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscf noscrollfocus nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
@@ -67,8 +67,8 @@ syn keyword vimErrSetting contained bioskey biosk conskey consk autoprint beauti
" AutoCmd Events {{{2
syn case ignore
syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufNew BufRead BufReadPost BufUnload BufWinLeave BufWrite BufWritePost CmdlineChanged CmdlineLeave CmdwinEnter ColorScheme CompleteChanged CompleteDone CompleteDonePre CursorHold CursorHoldI CursorMoved CursorMovedI DiffUpdated DirChanged DirChangedPre EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileExplorer FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave InsertLeavePre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TextChanged TextChangedI TextChangedP TextYankPost User VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew
syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNewFile BufReadCmd BufReadPre BufWinEnter BufWipeout BufWriteCmd BufWritePre CmdlineEnter CmdUndefined CmdwinLeave ColorSchemePre
syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufNew BufRead BufReadPost BufUnload BufWinLeave BufWrite BufWritePost CmdlineChanged CmdlineLeave CmdwinEnter ColorScheme CompleteChanged CompleteDonePre CursorHold CursorHoldI CursorMoved CursorMovedI DiffUpdated DirChanged DirChangedPre EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileExplorer FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave InsertLeavePre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TextChanged TextChangedI TextChangedP TextYankPost User VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew WinScrolled
syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNewFile BufReadCmd BufReadPre BufWinEnter BufWipeout BufWriteCmd BufWritePre CmdlineEnter CmdUndefined CmdwinLeave ColorSchemePre CompleteDone
" Highlight commonly used Groupnames {{{2
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
@@ -230,7 +230,7 @@ syn keyword vimAugroupKey contained aug[roup]
" Operators: {{{2
" =========
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimType,vimRegister,vimContinue,vim9Comment
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimType,vimRegister,vimContinue,vim9Comment,vimVar
syn match vimOper "||\|&&\|[-+.!]" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\|!\~#\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile
@@ -465,8 +465,9 @@ syn case match
" User Function Highlighting: {{{2
" (following Gautam Iyer's suggestion)
" ==========================
syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute
syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimCommand,vimFuncEcho,vimFuncName,vimUserFunc,vimExecute
syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimCommand,vimNotation
syn keyword vimFuncEcho contained ec ech echo
" User Command Highlighting: {{{2
"syn match vimUsrCmd '^\s*\zs\u\w*.*$'
@@ -898,6 +899,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimError Error
hi def link vimFBVar vimVar
hi def link vimFgBgAttrib vimHiAttrib
hi def link vimFuncEcho vimCommand
hi def link vimHiCtermul vimHiTerm
hi def link vimFold Folded
hi def link vimFTCmd vimCommand

View File

@@ -182,10 +182,7 @@
#Irix 6.5 cc ? 6.0 (S) David Harrison
#Irix 64 bit 4.5 (K) Jon Wright
#Linux 2.0 gcc-2.7.2 Infomagic Motif 4.3 (3) Ronald Rietman
#Linux 2.0.31 gcc +X11 +GUI Athena 5.0w (U) Darren Hiebert
#LynxOS 3.0.1 2.9-gnupro-98r2 +X11 +GUI Athena 5.7.1(O) Lorenz Hahn
#LynxOS 3.1.0 2.9-gnupro-98r2 +X11 +GUI Athena 5.7.1(O) Lorenz Hahn
#NEC UP4800 UNIX_SV 4.2MP cc +X11R6 Motif,Athena4.6b (Q) Lennart Schultz
#NEC UP4800 UNIX_SV 4.2MP cc +X11R6 Motif 4.6b (Q) Lennart Schultz
#NetBSD 1.0A gcc-2.4.5 -X11 -GUI 3.21 (X) Juergen Weigert
#QNX 4.2 wcc386-10.6 -X11 4.2 (D) G.F. Desrochers
#QNX 4.23 Watcom -X11 4.2 (F) John Oleynick
@@ -199,14 +196,12 @@
#Solaris 2.4 (Sparc) cc +X11 +GUI 3.29 (9) Glauber
#Solaris 2.4/2.5 clcc +X11 -GUI openwin 3.20 (7) Robert Colon
#Solaris 2.5 (sun4m) cc (SC4.0) +X11R6 +GUI (CDE) 4.6b (E) Andrew Large
#Solaris 2.5 cc +X11 +GUI Athena 4.2 (9) Sonia Heimann
#Solaris 2.5 gcc 2.5.6 +X11 Motif 5.0m (R) Ant. Colombo
#Solaris 2.6 gcc 2.8.1 ncurses 5.3 (G) Larry W. Virden
#Solaris with -lthread 5.5 (W) K. Nagano
#Solaris gcc (b) Riccardo
#SunOS 4.1.x +X11 -GUI 5.1b (J) Bram Moolenaar
#SunOS 4.1.3_U1 (sun4c) gcc +X11 +GUI Athena 5.0w (J) Darren Hiebert
#SUPER-UX 6.2 (NEC SX-4) cc +X11R6 Motif,Athena4.6b (P) Lennart Schultz
#SUPER-UX 6.2 (NEC SX-4) cc +X11R6 Motif 4.6b (P) Lennart Schultz
#Tandem/NSK (c) Matthew Woehlke
#Unisys 6035 cc +X11 Motif 5.3 (8) Glauber Ribeiro
#ESIX V4.2 cc +X11 6.0 (a) Reinhard Wobst
@@ -1342,8 +1337,8 @@ HAIKUGUI_TESTTARGET = gui
HAIKUGUI_BUNDLE =
# All GUI files
ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c gui_haiku.cc
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w32.pro gui_photon.pro gui_haiku.pro
ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_gtk_x11.c gui_x11.c gui_haiku.cc
ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_gtk_x11.pro gui_x11.pro gui_w32.pro gui_photon.pro gui_haiku.pro
# }}}
@@ -3245,15 +3240,6 @@ objects/help.o: help.c
objects/gui.o: gui.c
$(CCC) -o $@ gui.c
objects/gui_at_fs.o: gui_at_fs.c
$(CCC) -o $@ gui_at_fs.c
objects/gui_at_sb.o: gui_at_sb.c
$(CCC) -o $@ gui_at_sb.c
objects/gui_athena.o: gui_athena.c
$(CCC) -o $@ gui_athena.c
objects/beval.o: beval.c
$(CCC) -o $@ beval.c
@@ -4182,25 +4168,6 @@ objects/gui_xmebw.o: gui_xmebw.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h gui_xmebwp.h gui_xmebw.h
objects/gui_athena.o: gui_athena.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h gui_at_sb.h gui_x11_pm.h \
../pixmaps/tb_new.xpm ../pixmaps/tb_open.xpm ../pixmaps/tb_close.xpm \
../pixmaps/tb_save.xpm ../pixmaps/tb_print.xpm ../pixmaps/tb_cut.xpm \
../pixmaps/tb_copy.xpm ../pixmaps/tb_paste.xpm ../pixmaps/tb_find.xpm \
../pixmaps/tb_find_next.xpm ../pixmaps/tb_find_prev.xpm \
../pixmaps/tb_find_help.xpm ../pixmaps/tb_exit.xpm \
../pixmaps/tb_undo.xpm ../pixmaps/tb_redo.xpm ../pixmaps/tb_help.xpm \
../pixmaps/tb_macro.xpm ../pixmaps/tb_make.xpm \
../pixmaps/tb_save_all.xpm ../pixmaps/tb_jump.xpm \
../pixmaps/tb_ctags.xpm ../pixmaps/tb_load_session.xpm \
../pixmaps/tb_save_session.xpm ../pixmaps/tb_new_session.xpm \
../pixmaps/tb_blank.xpm ../pixmaps/tb_maximize.xpm \
../pixmaps/tb_split.xpm ../pixmaps/tb_minimize.xpm \
../pixmaps/tb_shell.xpm ../pixmaps/tb_replace.xpm \
../pixmaps/tb_vsplit.xpm ../pixmaps/tb_maxwidth.xpm \
../pixmaps/tb_minwidth.xpm
objects/gui_gtk_x11.o: gui_gtk_x11.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
@@ -4211,14 +4178,6 @@ objects/gui_x11.o: gui_x11.c vim.h protodef.h auto/config.h feature.h os_unix.h
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h ../runtime/vim32x32.xpm \
../runtime/vim16x16.xpm ../runtime/vim48x48.xpm
objects/gui_at_sb.o: gui_at_sb.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h gui_at_sb.h
objects/gui_at_fs.o: gui_at_fs.c vim.h protodef.h auto/config.h feature.h \
os_unix.h auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
proto.h globals.h errors.h gui_at_sb.h
objects/gui_haiku.o: gui_haiku.cc vim.h protodef.h auto/config.h feature.h \
os_unix.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \

View File

@@ -180,7 +180,6 @@ alloc_clear(size_t size)
return p;
}
#if defined(FEAT_SIGNS) || defined(PROTO)
/*
* Same as alloc_clear() but with allocation id for testing
*/
@@ -193,7 +192,6 @@ alloc_clear_id(size_t size, alloc_id_T id UNUSED)
#endif
return alloc_clear(size);
}
#endif
/*
* Allocate memory like lalloc() and set all bytes to zero.
@@ -721,6 +719,20 @@ ga_grow(garray_T *gap, int n)
return OK;
}
/*
* Same as ga_grow() but uses an allocation id for testing.
*/
int
ga_grow_id(garray_T *gap, int n, alloc_id_T id UNUSED)
{
#ifdef FEAT_EVAL
if (alloc_fail_id == id && alloc_does_fail(sizeof(list_T)))
return FAIL;
#endif
return ga_grow(gap, n);
}
int
ga_grow_inner(garray_T *gap, int n)
{

View File

@@ -40,5 +40,10 @@ typedef enum {
aid_sign_getplaced_list,
aid_insert_sign,
aid_sign_getinfo,
aid_newbuf_bvars,
aid_newwin_wvars,
aid_newtabpage_tvars,
aid_blob_alloc,
aid_get_func,
aid_last
} alloc_id_T;

4
src/auto/configure vendored
View File

@@ -10212,12 +10212,12 @@ $as_echo "no" >&6; }
GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
$as_echo_n "checking for location of Motif GUI libs... " >&6; }
gui_libs="`echo $x_libraries|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/lib/g` /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu `echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC"
GUI_LIB_LOC=
for try in $gui_libs; do
for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
for libtry in "$try"/libXm.a "$try"/libXm.dll.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
if test -f "$libtry"; then
GUI_LIB_LOC=$try
fi

View File

@@ -55,7 +55,7 @@ typedef struct AutoCmd
char once; // "One shot": removed after execution
char nested; // If autocommands nest here.
char last; // last command in list
sctx_T script_ctx; // script context where defined
sctx_T script_ctx; // script context where it is defined
struct AutoCmd *next; // next AutoCmd in list
} AutoCmd;
@@ -190,6 +190,7 @@ static struct event_name
{"WinClosed", EVENT_WINCLOSED},
{"WinEnter", EVENT_WINENTER},
{"WinLeave", EVENT_WINLEAVE},
{"WinScrolled", EVENT_WINSCROLLED},
{"VimResized", EVENT_VIMRESIZED},
{"TextYankPost", EVENT_TEXTYANKPOST},
{"VimSuspend", EVENT_VIMSUSPEND},
@@ -233,12 +234,13 @@ struct AutoPatCmd_S
char_u *sfname; // sfname to match with
char_u *tail; // tail of fname
event_T event; // current event
sctx_T script_ctx; // script context where it is defined
int arg_bufnr; // Initially equal to <abuf>, set to zero when
// buf is deleted.
AutoPatCmd *next; // chain of active apc-s for auto-invalidation
AutoPatCmd_T *next; // chain of active apc-s for auto-invalidation
};
static AutoPatCmd *active_apc_list = NULL; // stack of active autocommands
static AutoPatCmd_T *active_apc_list = NULL; // stack of active autocommands
// Macro to loop over all the patterns for an autocmd event
#define FOR_ALL_AUTOCMD_PATTERNS(event, ap) \
@@ -263,7 +265,7 @@ static char_u *event_nr2name(event_T event);
static int au_get_grouparg(char_u **argp);
static int do_autocmd_event(event_T event, char_u *pat, int once, int nested, char_u *cmd, int forceit, int group, int flags);
static int apply_autocmds_group(event_T event, char_u *fname, char_u *fname_io, int force, int group, buf_T *buf, exarg_T *eap);
static void auto_next_pat(AutoPatCmd *apc, int stop_at_last);
static void auto_next_pat(AutoPatCmd_T *apc, int stop_at_last);
static int au_find_group(char_u *name);
static event_T last_event;
@@ -452,9 +454,9 @@ au_cleanup(void)
void
aubuflocal_remove(buf_T *buf)
{
AutoPat *ap;
event_T event;
AutoPatCmd *apc;
AutoPat *ap;
event_T event;
AutoPatCmd_T *apc;
// invalidate currently executing autocommands
for (apc = active_apc_list; apc; apc = apc->next)
@@ -1239,18 +1241,17 @@ do_autocmd_event(
// need to initialize last_mode for the first ModeChanged
// autocmd
if (event == EVENT_MODECHANGED && !has_modechanged())
{
typval_T rettv;
typval_T tv[2];
tv[0].v_type = VAR_NUMBER;
tv[0].vval.v_number = 1;
tv[1].v_type = VAR_UNKNOWN;
f_mode(tv, &rettv);
STRCPY(last_mode, rettv.vval.v_string);
vim_free(rettv.vval.v_string);
}
get_mode(last_mode);
#endif
// Initialize the fields checked by the WinScrolled trigger to
// stop it from firing right after the first autocmd is defined.
if (event == EVENT_WINSCROLLED && !has_winscrolled())
{
curwin->w_last_topline = curwin->w_topline;
curwin->w_last_leftcol = curwin->w_leftcol;
curwin->w_last_width = curwin->w_width;
curwin->w_last_height = curwin->w_height;
}
if (is_buflocal)
{
@@ -1782,6 +1783,15 @@ trigger_cursorhold(void)
return FALSE;
}
/*
* Return TRUE when there is a WinScrolled autocommand defined.
*/
int
has_winscrolled(void)
{
return (first_autopat[(int)EVENT_WINSCROLLED] != NULL);
}
/*
* Return TRUE when there is a CursorMoved autocommand defined.
*/
@@ -1905,7 +1915,7 @@ apply_autocmds_group(
int save_autocmd_busy;
int save_autocmd_nested;
static int nesting = 0;
AutoPatCmd patcmd;
AutoPatCmd_T patcmd;
AutoPat *ap;
sctx_T save_current_sctx;
#ifdef FEAT_EVAL
@@ -2078,7 +2088,8 @@ apply_autocmds_group(
|| event == EVENT_DIRCHANGEDPRE
|| event == EVENT_MODECHANGED
|| event == EVENT_USER
|| event == EVENT_WINCLOSED)
|| event == EVENT_WINCLOSED
|| event == EVENT_WINSCROLLED)
{
fname = vim_strsave(fname);
autocmd_fname_full = TRUE; // don't expand it later
@@ -2163,15 +2174,14 @@ apply_autocmds_group(
tail = gettail(fname);
// Find first autocommand that matches
CLEAR_FIELD(patcmd);
patcmd.curpat = first_autopat[(int)event];
patcmd.nextcmd = NULL;
patcmd.group = group;
patcmd.fname = fname;
patcmd.sfname = sfname;
patcmd.tail = tail;
patcmd.event = event;
patcmd.arg_bufnr = autocmd_bufnr;
patcmd.next = NULL;
auto_next_pat(&patcmd, FALSE);
// found one, start executing the autocommands
@@ -2353,16 +2363,21 @@ is_autocmd_blocked(void)
*/
static void
auto_next_pat(
AutoPatCmd *apc,
AutoPatCmd_T *apc,
int stop_at_last) // stop when 'last' flag is set
{
AutoPat *ap;
AutoCmd *cp;
char_u *name;
char *s;
char_u **sourcing_namep = &SOURCING_NAME;
estack_T *entry;
char_u *namep;
VIM_CLEAR(*sourcing_namep);
entry = ((estack_T *)exestack.ga_data) + exestack.ga_len - 1;
// Clear the exestack entry for this ETYPE_AUCMD entry.
VIM_CLEAR(entry->es_name);
entry->es_info.aucmd = NULL;
for (ap = apc->curpat; ap != NULL && !got_int; ap = ap->next)
{
@@ -2382,20 +2397,22 @@ auto_next_pat(
{
name = event_nr2name(apc->event);
s = _("%s Autocommands for \"%s\"");
*sourcing_namep = alloc(STRLEN(s)
+ STRLEN(name) + ap->patlen + 1);
if (*sourcing_namep != NULL)
namep = alloc(STRLEN(s) + STRLEN(name) + ap->patlen + 1);
if (namep != NULL)
{
sprintf((char *)*sourcing_namep, s,
(char *)name, (char *)ap->pat);
sprintf((char *)namep, s, (char *)name, (char *)ap->pat);
if (p_verbose >= 8)
{
verbose_enter();
smsg(_("Executing %s"), *sourcing_namep);
smsg(_("Executing %s"), namep);
verbose_leave();
}
}
// Update the exestack entry for this autocmd.
entry->es_name = namep;
entry->es_info.aucmd = apc;
apc->curpat = ap;
apc->nextcmd = ap->cmds;
// mark last command
@@ -2412,6 +2429,15 @@ auto_next_pat(
}
}
/*
* Get the script context where autocommand "acp" is defined.
*/
sctx_T *
acp_script_ctx(AutoPatCmd_T *acp)
{
return &acp->script_ctx;
}
/*
* Get next autocommand command.
* Called by do_cmdline() to get the next line for ":if".
@@ -2424,7 +2450,7 @@ getnextac(
int indent UNUSED,
getline_opt_T options UNUSED)
{
AutoPatCmd *acp = (AutoPatCmd *)cookie;
AutoPatCmd_T *acp = (AutoPatCmd_T *)cookie;
char_u *retval;
AutoCmd *ac;
@@ -2471,6 +2497,7 @@ getnextac(
au_del_cmd(ac);
autocmd_nested = ac->nested;
current_sctx = ac->script_ctx;
acp->script_ctx = current_sctx;
if (ac->last)
acp->nextcmd = NULL;
else

View File

@@ -22,7 +22,7 @@
blob_T *
blob_alloc(void)
{
blob_T *blob = ALLOC_CLEAR_ONE(blob_T);
blob_T *blob = ALLOC_CLEAR_ONE_ID(blob_T, aid_blob_alloc);
if (blob != NULL)
ga_init2(&blob->bv_ga, 1, 100);

View File

@@ -150,7 +150,8 @@ buffer_ensure_loaded(buf_T *buf)
aco_save_T aco;
aucmd_prepbuf(&aco, buf);
swap_exists_action = SEA_NONE;
if (swap_exists_action != SEA_READONLY)
swap_exists_action = SEA_NONE;
open_buffer(FALSE, NULL, 0);
aucmd_restbuf(&aco);
}
@@ -1053,10 +1054,12 @@ goto_buffer(
int count)
{
bufref_T old_curbuf;
int save_sea = swap_exists_action;
set_bufref(&old_curbuf, curbuf);
swap_exists_action = SEA_DIALOG;
if (swap_exists_action == SEA_NONE)
swap_exists_action = SEA_DIALOG;
(void)do_buffer(*eap->cmd == 's' ? DOBUF_SPLIT : DOBUF_GOTO,
start, dir, count, eap->forceit);
if (swap_exists_action == SEA_QUIT && *eap->cmd == 's')
@@ -1071,7 +1074,7 @@ goto_buffer(
// Quitting means closing the split window, nothing else.
win_close(curwin, TRUE);
swap_exists_action = SEA_NONE;
swap_exists_action = save_sea;
swap_exists_did_quit = TRUE;
#if defined(FEAT_EVAL)
@@ -2093,7 +2096,7 @@ buflist_new(
}
#ifdef FEAT_EVAL
// init b: variables
buf->b_vars = dict_alloc();
buf->b_vars = dict_alloc_id(aid_newbuf_bvars);
if (buf->b_vars == NULL)
{
vim_free(ffname);
@@ -2350,6 +2353,7 @@ free_buf_options(
#ifdef FEAT_CINDENT
clear_string_option(&buf->b_p_cink);
clear_string_option(&buf->b_p_cino);
clear_string_option(&buf->b_p_cinsd);
#endif
#if defined(FEAT_CINDENT) || defined(FEAT_SMARTINDENT)
clear_string_option(&buf->b_p_cinw);
@@ -3072,6 +3076,8 @@ buflist_setfpos(
wip->wi_fpos.lnum = lnum;
wip->wi_fpos.col = col;
}
if (win != NULL)
wip->wi_changelistidx = win->w_changelistidx;
if (copy_options && win != NULL)
{
// Save the window-specific option values.
@@ -3206,6 +3212,8 @@ get_winopts(buf_T *buf)
}
else
copy_winopt(&curwin->w_allbuf_opt, &curwin->w_onebuf_opt);
if (wip != NULL)
curwin->w_changelistidx = wip->wi_changelistidx;
#ifdef FEAT_FOLDING
// Set 'foldlevel' to 'foldlevelstart' if it's not negative.

View File

@@ -640,9 +640,13 @@ changed_common(
if (hasAnyFolding(wp))
set_topline(wp, wp->w_topline);
#endif
// Relative numbering may require updating more.
if (wp->w_p_rnu)
redraw_win_later(wp, SOME_VALID);
// If lines have been added or removed, relative numbering always
// requires a redraw.
if (wp->w_p_rnu && xtra != 0)
{
wp->w_last_cursor_lnum_rnu = 0;
redraw_win_later(wp, VALID);
}
#ifdef FEAT_SYN_HL
// Cursor line highlighting probably need to be updated with
// "VALID" if it's below the change.
@@ -1655,7 +1659,7 @@ open_line(
lead_len = get_leader_len(saved_line, &lead_flags,
dir == BACKWARD, TRUE);
#ifdef FEAT_CINDENT
if (lead_len == 0 && do_cindent && dir == FORWARD)
if (lead_len == 0 && curbuf->b_p_cin && do_cindent && dir == FORWARD)
{
// Check for a line comment after code.
comment_start = check_linecomment(saved_line);

View File

@@ -44,11 +44,18 @@
# define sock_write(sd, buf, len) send((SOCKET)sd, buf, len, 0)
# define sock_read(sd, buf, len) recv((SOCKET)sd, buf, len, 0)
# define sock_close(sd) closesocket((SOCKET)sd)
// Support for Unix-domain sockets was added in Windows SDK 17061.
# define UNIX_PATH_MAX 108
typedef struct sockaddr_un {
ADDRESS_FAMILY sun_family;
char sun_path[UNIX_PATH_MAX];
} SOCKADDR_UN, *PSOCKADDR_UN;
#else
# include <netdb.h>
# include <netinet/in.h>
# include <arpa/inet.h>
# include <sys/socket.h>
# include <sys/un.h>
# ifdef HAVE_LIBGEN_H
# include <libgen.h>
# endif
@@ -171,7 +178,10 @@ ch_logfile(char_u *fname, char_u *opt)
if (log_fd != NULL)
{
fprintf(log_fd, "==== start log session ====\n");
fprintf(log_fd, "==== start log session %s ====\n",
get_ctime(time(NULL), FALSE));
// flush now, if fork/exec follows it could be written twice
fflush(log_fd);
#ifdef FEAT_RELTIME
profile_start(&log_start);
#endif
@@ -928,6 +938,67 @@ channel_connect(
return sd;
}
/*
* Open a socket channel to the UNIX socket at "path".
* Returns the channel for success.
* Returns NULL for failure.
*/
static channel_T *
channel_open_unix(
const char *path,
void (*nb_close_cb)(void))
{
channel_T *channel = NULL;
int sd = -1;
size_t path_len = STRLEN(path);
struct sockaddr_un server;
size_t server_len;
int waittime = -1;
if (*path == NUL || path_len >= sizeof(server.sun_path))
{
semsg(_(e_invalid_argument_str), path);
return NULL;
}
channel = add_channel();
if (channel == NULL)
{
ch_error(NULL, "Cannot allocate channel.");
return NULL;
}
CLEAR_FIELD(server);
server.sun_family = AF_UNIX;
STRNCPY(server.sun_path, path, sizeof(server.sun_path) - 1);
ch_log(channel, "Trying to connect to %s", path);
server_len = offsetof(struct sockaddr_un, sun_path) + path_len + 1;
sd = channel_connect(channel, (struct sockaddr *)&server, (int)server_len,
&waittime);
if (sd < 0)
{
channel_free(channel);
return NULL;
}
ch_log(channel, "Connection made");
channel->CH_SOCK_FD = (sock_T)sd;
channel->ch_nb_close_cb = nb_close_cb;
channel->ch_hostname = (char *)vim_strsave((char_u *)path);
channel->ch_port = 0;
channel->ch_to_be_closed |= (1U << PART_SOCK);
#ifdef FEAT_GUI
channel_gui_register_one(channel, PART_SOCK);
#endif
return channel;
}
/*
* Open a socket channel to "hostname":"port".
* "waittime" is the time in msec to wait for the connection.
@@ -1112,8 +1183,9 @@ prepare_buffer(buf_T *buf)
buf_copy_options(buf, BCO_ENTER);
curbuf = buf;
#ifdef FEAT_QUICKFIX
set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL);
set_option_value((char_u *)"bh", 0L, (char_u *)"hide", OPT_LOCAL);
set_option_value_give_err((char_u *)"bt",
0L, (char_u *)"nofile", OPT_LOCAL);
set_option_value_give_err((char_u *)"bh", 0L, (char_u *)"hide", OPT_LOCAL);
#endif
if (curbuf->b_ml.ml_mfp == NULL)
ml_open(curbuf);
@@ -1301,8 +1373,9 @@ channel_open_func(typval_T *argvars)
char_u *address;
char_u *p;
char *rest;
int port;
int port = 0;
int is_ipv6 = FALSE;
int is_unix = FALSE;
jobopt_T opt;
channel_T *channel = NULL;
@@ -1319,8 +1392,18 @@ channel_open_func(typval_T *argvars)
return NULL;
}
// parse address
if (*address == '[')
if (*address == NUL)
{
semsg(_(e_invalid_argument_str), address);
return NULL;
}
if (!STRNCMP(address, "unix:", 5))
{
is_unix = TRUE;
address += 5;
}
else if (*address == '[')
{
// ipv6 address
is_ipv6 = TRUE;
@@ -1333,6 +1416,7 @@ channel_open_func(typval_T *argvars)
}
else
{
// ipv4 address
p = vim_strchr(address, ':');
if (p == NULL)
{
@@ -1340,27 +1424,32 @@ channel_open_func(typval_T *argvars)
return NULL;
}
}
port = strtol((char *)(p + 1), &rest, 10);
if (*address == NUL || port <= 0 || port >= 65536 || *rest != NUL)
if (!is_unix)
{
semsg(_(e_invalid_argument_str), address);
return NULL;
port = strtol((char *)(p + 1), &rest, 10);
if (port <= 0 || port >= 65536 || *rest != NUL)
{
semsg(_(e_invalid_argument_str), address);
return NULL;
}
if (is_ipv6)
{
// strip '[' and ']'
++address;
*(p - 1) = NUL;
}
else
*p = NUL;
}
if (is_ipv6)
{
// strip '[' and ']'
++address;
*(p - 1) = NUL;
}
else
*p = NUL;
// parse options
clear_job_options(&opt);
opt.jo_mode = MODE_JSON;
opt.jo_timeout = 2000;
if (get_job_options(&argvars[1], &opt,
JO_MODE_ALL + JO_CB_ALL + JO_WAITTIME + JO_TIMEOUT_ALL, 0) == FAIL)
JO_MODE_ALL + JO_CB_ALL + JO_TIMEOUT_ALL
+ (is_unix? 0 : JO_WAITTIME), 0) == FAIL)
goto theend;
if (opt.jo_timeout < 0)
{
@@ -1368,7 +1457,10 @@ channel_open_func(typval_T *argvars)
goto theend;
}
channel = channel_open((char *)address, port, opt.jo_waittime, NULL);
if (is_unix)
channel = channel_open_unix((char *)address, NULL);
else
channel = channel_open((char *)address, port, opt.jo_waittime, NULL);
if (channel != NULL)
{
opt.jo_set = JO_ALL;
@@ -2111,6 +2203,83 @@ channel_fill(js_read_T *reader)
return TRUE;
}
/*
* Process the HTTP header in a Language Server Protocol (LSP) message.
*
* The message format is described in the LSP specification:
* https://microsoft.github.io/language-server-protocol/specification
*
* It has the following two fields:
*
* Content-Length: ...
* Content-Type: application/vscode-jsonrpc; charset=utf-8
*
* Each field ends with "\r\n". The header ends with an additional "\r\n".
*
* Returns OK if a valid header is received and FAIL if some fields in the
* header are not correct. Returns MAYBE if a partial header is received and
* need to wait for more data to arrive.
*/
static int
channel_process_lsp_http_hdr(js_read_T *reader)
{
char_u *line_start;
char_u *p;
int_u hdr_len;
int payload_len = -1;
int_u jsbuf_len;
// We find the end once, to avoid calling strlen() many times.
jsbuf_len = (int_u)STRLEN(reader->js_buf);
reader->js_end = reader->js_buf + jsbuf_len;
p = reader->js_buf;
// Process each line in the header till an empty line is read (header
// separator).
while (TRUE)
{
line_start = p;
while (*p != NUL && *p != '\n')
p++;
if (*p == NUL) // partial header
return MAYBE;
p++;
// process the content length field (if present)
if ((p - line_start > 16)
&& STRNICMP(line_start, "Content-Length: ", 16) == 0)
{
errno = 0;
payload_len = strtol((char *)line_start + 16, NULL, 10);
if (errno == ERANGE || payload_len < 0)
// invalid length, discard the payload
return FAIL;
}
if ((p - line_start) == 2 && line_start[0] == '\r' &&
line_start[1] == '\n')
// reached the empty line
break;
}
if (payload_len == -1)
// Content-Length field is not present in the header
return FAIL;
hdr_len = p - reader->js_buf;
// if the entire payload is not received, wait for more data to arrive
if (jsbuf_len < hdr_len + payload_len)
return MAYBE;
reader->js_used += hdr_len;
// recalculate the end based on the length read from the header.
reader->js_end = reader->js_buf + hdr_len + payload_len;
return OK;
}
/*
* Use the read buffer of "channel"/"part" and parse a JSON message that is
* complete. The messages are added to the queue.
@@ -2124,7 +2293,7 @@ channel_parse_json(channel_T *channel, ch_part_T part)
jsonq_T *item;
chanpart_T *chanpart = &channel->ch_part[part];
jsonq_T *head = &chanpart->ch_json_head;
int status;
int status = OK;
int ret;
if (channel_peek(channel, part) == NULL)
@@ -2136,19 +2305,31 @@ channel_parse_json(channel_T *channel, ch_part_T part)
reader.js_cookie = channel;
reader.js_cookie_arg = part;
if (chanpart->ch_mode == MODE_LSP)
status = channel_process_lsp_http_hdr(&reader);
// When a message is incomplete we wait for a short while for more to
// arrive. After the delay drop the input, otherwise a truncated string
// or list will make us hang.
// Do not generate error messages, they will be written in a channel log.
++emsg_silent;
status = json_decode(&reader, &listtv,
chanpart->ch_mode == MODE_JS ? JSON_JS : 0);
--emsg_silent;
if (status == OK)
{
++emsg_silent;
status = json_decode(&reader, &listtv,
chanpart->ch_mode == MODE_JS ? JSON_JS : 0);
--emsg_silent;
}
if (status == OK)
{
// Only accept the response when it is a list with at least two
// items.
if (listtv.v_type != VAR_LIST || listtv.vval.v_list->lv_len < 2)
if (chanpart->ch_mode == MODE_LSP && listtv.v_type != VAR_DICT)
{
ch_error(channel, "Did not receive a LSP dict, discarding");
clear_tv(&listtv);
}
else if (chanpart->ch_mode != MODE_LSP &&
(listtv.v_type != VAR_LIST || listtv.vval.v_list->lv_len < 2))
{
if (listtv.v_type != VAR_LIST)
ch_error(channel, "Did not receive a list, discarding");
@@ -2375,11 +2556,38 @@ channel_get_json(
while (item != NULL)
{
list_T *l = item->jq_value->vval.v_list;
list_T *l;
typval_T *tv;
CHECK_LIST_MATERIALIZE(l);
tv = &l->lv_first->li_tv;
if (channel->ch_part[part].ch_mode != MODE_LSP)
{
l = item->jq_value->vval.v_list;
CHECK_LIST_MATERIALIZE(l);
tv = &l->lv_first->li_tv;
}
else
{
dict_T *d;
dictitem_T *di;
// LSP message payload is a JSON-RPC dict.
// For RPC requests and responses, the 'id' item will be present.
// For notifications, it will not be present.
if (id > 0)
{
if (item->jq_value->v_type != VAR_DICT)
goto nextitem;
d = item->jq_value->vval.v_dict;
if (d == NULL)
goto nextitem;
di = dict_find(d, (char_u *)"id", -1);
if (di == NULL)
goto nextitem;
tv = &di->di_tv;
}
else
tv = item->jq_value;
}
if ((without_callback || !item->jq_no_callback)
&& ((id > 0 && tv->v_type == VAR_NUMBER && tv->vval.v_number == id)
@@ -2395,6 +2603,7 @@ channel_get_json(
remove_json_node(head, item);
return OK;
}
nextitem:
item = item->jq_next;
}
return FAIL;
@@ -2762,6 +2971,7 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
callback_T *callback = NULL;
buf_T *buffer = NULL;
char_u *p;
int called_otc; // one time callbackup
if (channel->ch_nb_close_cb != NULL)
// this channel is handled elsewhere (netbeans)
@@ -2788,7 +2998,7 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
buffer = NULL;
}
if (ch_mode == MODE_JSON || ch_mode == MODE_JS)
if (ch_mode == MODE_JSON || ch_mode == MODE_JS || ch_mode == MODE_LSP)
{
listitem_T *item;
int argc = 0;
@@ -2802,29 +3012,47 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
return FALSE;
}
for (item = listtv->vval.v_list->lv_first;
item != NULL && argc < CH_JSON_MAX_ARGS;
item = item->li_next)
argv[argc++] = item->li_tv;
while (argc < CH_JSON_MAX_ARGS)
argv[argc++].v_type = VAR_UNKNOWN;
if (argv[0].v_type == VAR_STRING)
if (ch_mode == MODE_LSP)
{
// ["cmd", arg] or ["cmd", arg, arg] or ["cmd", arg, arg, arg]
channel_exe_cmd(channel, part, argv);
free_tv(listtv);
return TRUE;
}
dict_T *d = listtv->vval.v_dict;
dictitem_T *di;
if (argv[0].v_type != VAR_NUMBER)
{
ch_error(channel,
"Dropping message with invalid sequence number type");
free_tv(listtv);
return FALSE;
seq_nr = 0;
if (d != NULL)
{
di = dict_find(d, (char_u *)"id", -1);
if (di != NULL && di->di_tv.v_type == VAR_NUMBER)
seq_nr = di->di_tv.vval.v_number;
}
argv[1] = *listtv;
}
else
{
for (item = listtv->vval.v_list->lv_first;
item != NULL && argc < CH_JSON_MAX_ARGS;
item = item->li_next)
argv[argc++] = item->li_tv;
while (argc < CH_JSON_MAX_ARGS)
argv[argc++].v_type = VAR_UNKNOWN;
if (argv[0].v_type == VAR_STRING)
{
// ["cmd", arg] or ["cmd", arg, arg] or ["cmd", arg, arg, arg]
channel_exe_cmd(channel, part, argv);
free_tv(listtv);
return TRUE;
}
if (argv[0].v_type != VAR_NUMBER)
{
ch_error(channel,
"Dropping message with invalid sequence number type");
free_tv(listtv);
return FALSE;
}
seq_nr = argv[0].vval.v_number;
}
seq_nr = argv[0].vval.v_number;
}
else if (channel_peek(channel, part) == NULL)
{
@@ -2906,24 +3134,35 @@ may_invoke_callback(channel_T *channel, ch_part_T part)
argv[1].vval.v_string = msg;
}
called_otc = FALSE;
if (seq_nr > 0)
{
int done = FALSE;
// JSON or JS mode: invoke the one-time callback with the matching nr
// JSON or JS or LSP mode: invoke the one-time callback with the
// matching nr
for (cbitem = cbhead->cq_next; cbitem != NULL; cbitem = cbitem->cq_next)
if (cbitem->cq_seq_nr == seq_nr)
{
invoke_one_time_callback(channel, cbhead, cbitem, argv);
done = TRUE;
called_otc = TRUE;
break;
}
if (!done)
}
if (seq_nr > 0 && (ch_mode != MODE_LSP || called_otc))
{
if (!called_otc)
{
// If the 'drop' channel attribute is set to 'never' or if
// ch_evalexpr() is waiting for this response message, then don't
// drop this message.
if (channel->ch_drop_never)
{
// message must be read with ch_read()
channel_push_json(channel, part, listtv);
// Change the type to avoid the value being freed.
listtv->v_type = VAR_NUMBER;
free_tv(listtv);
listtv = NULL;
}
else
@@ -3006,7 +3245,7 @@ channel_has_readahead(channel_T *channel, ch_part_T part)
{
ch_mode_T ch_mode = channel->ch_part[part].ch_mode;
if (ch_mode == MODE_JSON || ch_mode == MODE_JS)
if (ch_mode == MODE_JSON || ch_mode == MODE_JS || ch_mode == MODE_LSP)
{
jsonq_T *head = &channel->ch_part[part].ch_json_head;
@@ -3092,6 +3331,7 @@ channel_part_info(channel_T *channel, dict_T *dict, char *name, ch_part_T part)
case MODE_RAW: s = "RAW"; break;
case MODE_JSON: s = "JSON"; break;
case MODE_JS: s = "JS"; break;
case MODE_LSP: s = "LSP"; break;
}
dict_add_string(dict, namebuf, (char_u *)s);
@@ -3120,8 +3360,14 @@ channel_info(channel_T *channel, dict_T *dict)
if (channel->ch_hostname != NULL)
{
dict_add_string(dict, "hostname", (char_u *)channel->ch_hostname);
dict_add_number(dict, "port", channel->ch_port);
if (channel->ch_port)
{
dict_add_string(dict, "hostname", (char_u *)channel->ch_hostname);
dict_add_number(dict, "port", channel->ch_port);
}
else
// Unix-domain socket.
dict_add_string(dict, "path", (char_u *)channel->ch_hostname);
channel_part_info(channel, dict, "sock", PART_SOCK);
}
else
@@ -3755,6 +4001,11 @@ channel_read_json_block(
if (channel_parse_messages())
continue;
// channel_parse_messages() may fill the queue with new data to
// process.
if (channel_has_readahead(channel, part))
continue;
// Wait for up to the timeout. If there was an incomplete message
// use the deadline for that.
timeout = timeout_arg;
@@ -4269,6 +4520,7 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
ch_part_T part_read;
jobopt_T opt;
int timeout;
int callback_present = FALSE;
// return an empty string by default
rettv->v_type = VAR_STRING;
@@ -4291,9 +4543,60 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
return;
}
id = ++channel->ch_last_msg_id;
text = json_encode_nr_expr(id, &argvars[1],
(ch_mode == MODE_JS ? JSON_JS : 0) | JSON_NL);
if (ch_mode == MODE_LSP)
{
dict_T *d;
dictitem_T *di;
// return an empty dict by default
rettv_dict_alloc(rettv);
if (argvars[1].v_type != VAR_DICT)
{
semsg(_(e_dict_required_for_argument_nr), 2);
return;
}
d = argvars[1].vval.v_dict;
di = dict_find(d, (char_u *)"id", -1);
if (di != NULL && di->di_tv.v_type != VAR_NUMBER)
{
// only number type is supported for the 'id' item
semsg(_(e_invalid_value_for_argument_str), "id");
return;
}
if (argvars[2].v_type == VAR_DICT)
if (dict_has_key(argvars[2].vval.v_dict, "callback"))
callback_present = TRUE;
if (eval || callback_present)
{
// When evaluating an expression or sending an expression with a
// callback, always assign a generated ID
id = ++channel->ch_last_msg_id;
if (di == NULL)
dict_add_number(d, "id", id);
else
di->di_tv.vval.v_number = id;
}
else
{
// When sending an expression, if the message has an 'id' item,
// then use it.
id = 0;
if (di != NULL)
id = di->di_tv.vval.v_number;
}
if (!dict_has_key(d, "jsonrpc"))
dict_add_string(d, "jsonrpc", (char_u *)"2.0");
text = json_encode_lsp_msg(&argvars[1]);
}
else
{
id = ++channel->ch_last_msg_id;
text = json_encode_nr_expr(id, &argvars[1],
(ch_mode == MODE_JS ? JSON_JS : 0) | JSON_NL);
}
if (text == NULL)
return;
@@ -4309,16 +4612,34 @@ ch_expr_common(typval_T *argvars, typval_T *rettv, int eval)
if (channel_read_json_block(channel, part_read, timeout, id, &listtv)
== OK)
{
list_T *list = listtv->vval.v_list;
if (ch_mode == MODE_LSP)
{
*rettv = *listtv;
// Change the type to avoid the value being freed.
listtv->v_type = VAR_NUMBER;
free_tv(listtv);
}
else
{
list_T *list = listtv->vval.v_list;
// Move the item from the list and then change the type to
// avoid the value being freed.
*rettv = list->lv_u.mat.lv_last->li_tv;
list->lv_u.mat.lv_last->li_tv.v_type = VAR_NUMBER;
free_tv(listtv);
// Move the item from the list and then change the type to
// avoid the value being freed.
*rettv = list->lv_u.mat.lv_last->li_tv;
list->lv_u.mat.lv_last->li_tv.v_type = VAR_NUMBER;
free_tv(listtv);
}
}
}
free_job_options(&opt);
if (ch_mode == MODE_LSP && !eval && callback_present)
{
// if ch_sendexpr() is used to send a LSP message and a callback
// function is specified, then return the generated identifier for the
// message. The user can use this to cancel the request (if needed).
if (rettv->vval.v_dict != NULL)
dict_add_number(rettv->vval.v_dict, "id", id);
}
}
/*

View File

@@ -423,20 +423,37 @@ cin_islabel_skip(char_u **s)
* Recognize a "public/private/protected" scope declaration label.
*/
static int
cin_isscopedecl(char_u *s)
cin_isscopedecl(char_u *p)
{
int i;
size_t cinsd_len;
char_u *cinsd_buf;
char_u *cinsd;
size_t len;
char_u *skip;
char_u *s = cin_skipcomment(p);
int found = FALSE;
s = cin_skipcomment(s);
if (STRNCMP(s, "public", 6) == 0)
i = 6;
else if (STRNCMP(s, "protected", 9) == 0)
i = 9;
else if (STRNCMP(s, "private", 7) == 0)
i = 7;
else
cinsd_len = STRLEN(curbuf->b_p_cinsd) + 1;
cinsd_buf = alloc(cinsd_len);
if (cinsd_buf == NULL)
return FALSE;
return (*(s = cin_skipcomment(s + i)) == ':' && s[1] != ':');
for (cinsd = curbuf->b_p_cinsd; *cinsd; )
{
len = copy_option_part(&cinsd, cinsd_buf, cinsd_len, ",");
if (STRNCMP(s, cinsd_buf, len) == 0)
{
skip = cin_skipcomment(s + len);
if (*skip == ':' && skip[1] != ':')
{
found = TRUE;
break;
}
}
}
vim_free(cinsd_buf);
return found;
}
/*

View File

@@ -1354,7 +1354,7 @@ check_clipboard_option(void)
/*
* Open the application context (if it hasn't been opened yet).
* Used for Motif and Athena GUI and the xterm clipboard.
* Used for Motif GUI and the xterm clipboard.
*/
void
open_app_context(void)

View File

@@ -378,6 +378,7 @@ int cmdline_pum_active(void)
void cmdline_pum_remove(void)
{
int save_p_lz = p_lz;
int save_KeyTyped = KeyTyped;
pum_undisplay();
VIM_CLEAR(compl_match_array);
@@ -385,6 +386,10 @@ void cmdline_pum_remove(void)
update_screen(0);
p_lz = save_p_lz;
redrawcmd();
// When a function is called (e.g. for 'foldtext') KeyTyped might be reset
// as a side effect.
KeyTyped = save_KeyTyped;
}
void cmdline_pum_cleanup(cmdline_info_T *cclp)
@@ -2877,13 +2882,7 @@ ExpandGeneric(
ga_clear_strings(&ga);
return FAIL;
}
for (i = 0; i < ga.ga_len; ++i)
{
fuzmatch = &((fuzmatch_str_T *)ga.ga_data)[i];
vim_free(fuzmatch->str);
}
ga_clear(&ga);
fuzmatch_str_free(ga.ga_data, ga.ga_len);
return FAIL;
}

View File

@@ -2965,11 +2965,12 @@ if test -z "$SKIP_MOTIF"; then
dnl Ubuntu has libXm.so in /usr/lib/i386-linux-gnu and elsewhere. The
dnl linker will figure out which one to use, we only check if one exists.
dnl Cygwin uses the .dll.a extension.
AC_MSG_CHECKING(for location of Motif GUI libs)
gui_libs="`echo $x_libraries|sed 's%/[^/][^/]*$%%'` `echo "$gui_XXX" | sed s/XXX/lib/g` /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu `echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC"
GUI_LIB_LOC=
for try in $gui_libs; do
for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
for libtry in "$try"/libXm.a "$try"/libXm.dll.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
if test -f "$libtry"; then
GUI_LIB_LOC=$try
fi

View File

@@ -752,7 +752,7 @@ crypt_check_swapfile_curbuf(void)
// encryption uses padding and MAC, that does not work very well with
// swap and undo files, so disable them
mf_close_file(curbuf, TRUE); // remove the swap file
set_option_value((char_u *)"swf", 0, NULL, OPT_LOCAL);
set_option_value_give_err((char_u *)"swf", 0, NULL, OPT_LOCAL);
msg_scroll = TRUE;
msg(_("Note: Encryption of swapfile not supported, disabling swap file"));
}
@@ -807,7 +807,7 @@ crypt_get_key(
if (store)
{
set_option_value((char_u *)"key", 0L, p1, OPT_LOCAL);
set_option_value_give_err((char_u *)"key", 0L, p1, OPT_LOCAL);
crypt_free_key(p1);
p1 = curbuf->b_p_key;
#ifdef FEAT_SODIUM

View File

@@ -648,6 +648,15 @@ dict_find(dict_T *d, char_u *key, int len)
return HI2DI(hi);
}
/*
* Returns TRUE if "key" is present in Dictionary "d".
*/
int
dict_has_key(dict_T *d, char *key)
{
return dict_find(d, (char_u *)key, -1) != NULL;
}
/*
* Get a typval_T item from a dictionary and copy it into "rettv".
* Returns FAIL if the entry doesn't exist or out of memory.
@@ -1582,8 +1591,8 @@ f_has_key(typval_T *argvars, typval_T *rettv)
if (argvars[0].vval.v_dict == NULL)
return;
rettv->vval.v_number = dict_find(argvars[0].vval.v_dict,
tv_get_string(&argvars[1]), -1) != NULL;
rettv->vval.v_number = dict_has_key(argvars[0].vval.v_dict,
(char *)tv_get_string(&argvars[1]));
}
#endif // defined(FEAT_EVAL)

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