Compare commits

...

125 Commits

Author SHA1 Message Date
Anton Sharonov
6b568b1cc7 patch 9.0.0120: MS-Windows GUI: cannot use AltGr + Space
Problem:    MS-Windows GUI: cannot use AltGr + Space.
Solution:   Check for VK_MENU instead of VK_LMENU. (Anton Sharonov,
            closes #10820, closes #10753)
2022-07-31 12:26:05 +01:00
K.Takata
dbdcc79910 patch 9.0.0119: tiny chance that creating a backup file fails
Problem:    Tiny chance that creating a backup file fails.
Solution:   Check for EEXIST error. (Ken Takata, closes #10821)
2022-07-31 11:50:42 +01:00
zeertzjq
750209459c patch 9.0.0118: no test for what patch 9.0.0155 fixes
Problem:    No test for what patch 9.0.0155 fixes.
Solution:   Add a test. Fix typos.  (closes #10822)
2022-07-31 11:37:20 +01:00
Bram Moolenaar
3a4cd39d47 patch 9.0.0117: text of removed textprop with text is not freed
Problem:    Text of removed textprop with text is not freed.
Solution:   Free the text when the property is removed.  Reduce the array size
            to ignore NULLs at the end.
2022-07-30 22:17:18 +01:00
Bram Moolenaar
711483cd13 patch 9.0.0116: virtual text not displayed if 'signcolumn' is "yes"
Problem:    Virtual text not displayed if 'signcolumn' is "yes".
Solution:   Set c_extra and c_final to NUL.
2022-07-30 21:33:46 +01:00
Bram Moolenaar
6747cf1671 patch 9.0.0115: when 'cmdheight' is zero pressing ':' may scroll a window
Problem:    When 'cmdheight' is zero pressing ':' may scroll a window.
Solution:   Add the made_cmdheight_nonzero flag and set 'scrolloff' to zero.
2022-07-30 19:10:06 +01:00
Shougo Matsushita
f39cfb7262 patch 9.0.0114: the command line takes up space even when not used
Problem:    The command line takes up space even when not used.
Solution:   Allow for 'cmdheight' to be set to zero. (Shougo Matsushita,
            closes #10675, closes #940)
2022-07-30 16:54:05 +01:00
K.Takata
d90f91fe30 patch 9.0.0113: has() is not strict about parsing the patch version
Problem:    has() is not strict about parsing the patch version.
Solution:   Check the version more strictly. (Ken Takata, closes #10752)
2022-07-30 15:43:59 +01:00
Bram Moolenaar
0f823c3609 patch 9.0.0112: MS-Windows: test fails because file already exists
Problem:    MS-Windows: test fails because file already exists.
Solution:   Wait a little while until the file is gone.
2022-07-30 15:35:12 +01:00
Bram Moolenaar
de78632c41 patch 9.0.0111: "nocombine" is missing from synIDattr()
Problem:    "nocombine" is missing from synIDattr().
Solution:   Add "nocombine". (Muni Tanjim, closes #10816)
2022-07-30 14:56:17 +01:00
Carlo Teubner
ddab3ce345 patch 9.0.0110: help tag generation picks up words in code examples
Problem:    Help tag generation picks up words in code examples.
Solution:   Skip over examples. (Carlo Teubner, closes #10813)
2022-07-30 12:03:16 +01:00
Bram Moolenaar
1eead4cf1d patch 9.0.0109: writing over the end of a buffer on stack
Problem:    Writing over the end of a buffer on stack when making list of
            spell suggestions.
Solution:   Make sure suggested word is not too long. (closes #10812)
2022-07-30 11:39:57 +01:00
Bram Moolenaar
5f6cae8b8a patch 9.0.0108: configure check for timer_create may give wrong error
Problem:    Configure check for timer_create may give wrong error.
Solution:   Give a warning instead of an error.
2022-07-30 11:00:50 +01:00
Bram Moolenaar
2ecbe53f45 Update runtime files 2022-07-29 21:36:21 +01:00
Bram Moolenaar
72981ac94f patch 9.0.0107: condition always has the same value
Problem:    Condition always has the same value.
Solution:   Remove the condition.
2022-07-29 19:50:41 +01:00
Bram Moolenaar
cb36c2a3cd patch 9.0.0106: illegal byte regexp test doesn't fail when fix is reversed
Problem:    Illegal byte regexp test doesn't fail when fix is reversed.
Solution:   Make sure illegal bytes end up in sourced script file.
2022-07-29 18:32:20 +01:00
Bram Moolenaar
f50940531d patch 9.0.0105: illegal memory access when pattern starts with illegal byte
Problem:    Illegal memory access when pattern starts with illegal byte.
Solution:   Do not match a character with an illegal byte.
2022-07-29 16:22:25 +01:00
Bram Moolenaar
1e56bda904 patch 9.0.0104: going beyond allocated memory when evaluating string constant
Problem:    Going beyond allocated memory when evaluating string constant.
Solution:   Properly skip over <Key> form.
2022-07-29 15:28:27 +01:00
Bram Moolenaar
efffa5360e patch 9.0.0103: if running configure with cached results -lrt may be missing
Problem:    If running configure with cached results -lrt may be missing.
Solution:   Use two cache variables, one without and one with -lrt.
            (closes #10799)  Swap checks to avoid adding -lrt unnecessarily.
2022-07-28 22:39:54 +01:00
Bram Moolenaar
a6f9e30016 patch 9.0.0102: reading past end of line with insert mode completion
Problem:    Reading past end of line with insert mode completion.
Solution:   Check text length.
2022-07-28 21:51:37 +01:00
Bram Moolenaar
4e677b9c40 patch 9.0.0101: invalid memory access in diff mode with "dp" and undo
Problem:    Invalid memory access in diff mode with "dp" and undo.
Solution:   Make sure the line number does not go below one.
2022-07-28 18:44:27 +01:00
Bram Moolenaar
cb5ed4d625 patch 9.0.0100: get hit-enter prompt for system() when '!' is in 'guioptions'
Problem:    Get hit-enter prompt for system() when '!' is in 'guioptions'.
Solution:   Do not call wait_return() when not redrawing. (closes #3327)
2022-07-28 12:54:08 +01:00
zeertzjq
46af7bc08d patch 9.0.0099: scrollback can be wrong after redrawing the command line
Problem:    Scrollback can be wrong after redrawing the command line.
Solution:   Clear unfinished scrollback when redrawing. (closes #10807)
2022-07-28 12:34:09 +01:00
Bram Moolenaar
5748b7f2c8 patch 9.0.0098: missing include file in timer_create configure check
Problem:    missing include file in timer_create configure check.
Solution:   Inlucde stdlib.h.
2022-07-28 12:09:04 +01:00
Bram Moolenaar
5f30e26f69 patch 9.0.0097: long quickfix line is truncated for :clist
Problem:    Long quickfix line is truncated for :clist.
Solution:   Allocate a buffer if needed.
2022-07-28 11:56:01 +01:00
zeertzjq
f6782732ab patch 9.0.0096: flag "new_value_alloced" is always true
Problem:    Flag "new_value_alloced" is always true.
Solution:   Remove "new_value_alloced". (closes #10792)
2022-07-27 18:26:03 +01:00
zeertzjq
122dea7007 patch 9.0.0095: conditions are always true
Problem:    Conditions are always true.
Solution:   Remove useless conditions. (closes #10802)
2022-07-27 15:48:45 +01:00
Bram Moolenaar
3d6ee8bda0 patch 9.0.0094: cursor restored unexpected with nested autocommand
Problem:    Cursor restored unexpected with nested autocommand.
Solution:   Do not restore the cursor when it was moved intentionally.
            (closes #10780)
2022-07-27 15:23:35 +01:00
James Eapen
7abd1c6d8e patch 9.0.0093: sway config files are recognized as i3config
Problem:    Sway config files are recognized as i3config.
Solution:   Recognize swayconfig separately. (James Eapen, closes #10672)
2022-07-27 15:07:06 +01:00
Shougo Matsushita
61021aa318 patch 9.0.0092: plugins cannot change v:completed_item
Problem:    Plugins cannot change v:completed_item.
Solution:   Make v:completed_item writeable. (Shougo Matsushita,
            closes #10801)
2022-07-27 14:40:00 +01:00
Bram Moolenaar
34d1773bd4 patch 9.0.0091: duplicate error number
Problem:    Duplicate error number.
Solution:   Use unique error number.
2022-07-27 13:18:14 +01:00
Bram Moolenaar
28f84e17b0 patch 9.0.0090: no error when assigning bool to a string option
Problem:    No error when assigning bool to a string option with setwinvar().
Solution:   Give an error (closes #10766)
2022-07-27 12:30:13 +01:00
Yegappan Lakshmanan
7db3a8e329 patch 9.0.0089: fuzzy argument completion doesn't work for shell commands
Problem:    Fuzzy argument completion doesn't work for shell commands.
Solution:   Check for cmdidx not being CMD_bang. (Yegappan Lakshmanan,
            closes #10769)
2022-07-26 22:01:36 +01:00
Gregory Anders
30e212dac1 patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Problem:    Pattern for detecting bitbake files is not sufficient.
Solution:   Adjust the pattern. (Gregory Anders, closes #10743)
2022-07-26 21:42:03 +01:00
Anton Sharonov
3f0266739d patch 9.0.0087: MS-Windows: CTRL-[ on Belgian keyboard does not work like Esc
Problem:    MS-Windows: CTRL-[ on Belgian keyboard does not work like Esc.
Solution:   Figure out what the key code means. (Anton Sharonov,
            closes #10687, closes #10454)
2022-07-26 21:26:18 +01:00
zeertzjq
6791adca53 patch 9.0.0086: tabline is not redrawn when entering command line
Problem:    Tabline is not redrawn when entering command line.
Solution:   Set "redraw_tabline". (closes #10771)
2022-07-26 20:42:25 +01:00
ii14
1f0dc5e84f patch 9.0.0085: ":write" fails after ":file name" and the ":edit"
Problem:    ":write" fails after ":file name" and the ":edit".
Solution:   Reset BF_NOTEDITED when using ":edit". (closes #10790)
2022-07-26 19:44:56 +01:00
Bram Moolenaar
15b87b6610 patch 9.0.0084: using "terraform" filetype for .tfvars file is bad
Problem:    Using "terraform" filetype for .tfvars file is bad.
Solution:   use "terraform-vars", so that different completion and other
            mechanisms can be used. (Radek Simko, closes #10755)
2022-07-26 19:18:28 +01:00
zeertzjq
c9e8fd6fc7 patch 9.0.0083: ModeChanged event not triggered when leaving cmdline window
Problem:    ModeChanged event not triggered when leaving the cmdline window.
Solution:   Call may_trigger_modechanged(). (closes #10791)
2022-07-26 18:12:38 +01:00
zeertzjq
3cfae39b08 patch 9.0.0082: cannot interrupt global command from command line
Problem:    Cannot interrupt global command from command line.
Solution:   Reset got_int in another place. (closes #10739)
2022-07-26 17:48:13 +01:00
Bram Moolenaar
c2842adfb2 patch 9.0.0081: command line completion of user command may have duplicates
Problem:    Command line completion of user command may have duplicates.
            (Dani Dickstein)
Solution:   Skip global user command if an identical buffer-local one is
            defined. (closes #10797)
2022-07-26 17:23:47 +01:00
Mike Williams
0494789ece patch 9.0.0080: compiler warning for size_t to int conversion
Problem:    Compiler warning for size_t to int conversion.
Solution:   Add type casts. (Mike Williams, closes #10795)
2022-07-26 16:03:42 +01:00
Bram Moolenaar
6809ff978a patch 9.0.0079: error in autoload script not reported for 'foldexpr'
Problem:    Error in autoload script not reported for 'foldexpr'.
Solution:   Reset "emsg_off" when auto-loading a script. (closes #10685)
2022-07-26 15:10:56 +01:00
Ernie Rael
559f230fd6 patch 9.0.0078: star register is unexpectedly changed when deleting
Problem:    Star register is changed when deleting and both "unnamed" and
            "unnamedplus" are in 'clipboard'.
Solution:   Make the use of the star register work as documented. (Ernie Rael,
            closes #10669)
2022-07-26 14:44:36 +01:00
Bram Moolenaar
b03950fafa patch 9.0.0077: wrong restored cursor position when switching window in autocmd
Problem:    When switching window in autocmd the restored cursor position may
            be wrong.
Solution:   Do not restore the cursor if it was not set. (closes #10775)
2022-07-26 13:47:13 +01:00
zeertzjq
92a1678d48 patch 9.0.0076: no test for what patch 8.1.1424 fixes
Problem:    No test for what patch 8.1.1424 fixes.
Solution:   Add a test. (closes #10789)
2022-07-26 12:24:41 +01:00
Bram Moolenaar
be3dbda871 patch 9.0.0075: some compilers warn for using an uninitialized variable
Problem:    Some compilers warn for using an uninitialized variable. (Tony
            Mechelynck)
Solution:   Initialize the variable.
2022-07-26 11:42:34 +01:00
Bram Moolenaar
34a1f77979 patch 9.0.0074: Coverity warns for double free
Problem:    Coverity warns for double free.
Solution:   Reset cts_text_prop_count when freeing cts_text_props.
2022-07-26 11:20:48 +01:00
Martin Tournoij
1b67f07f76 patch 9.0.0073: too many files recognized as bsdl
Problem:    Too many files recognized as bsdl.
Solution:   Use pattern "*.bsd" instead of "*bsd". (Martin Tournoij,
            closes #10783)
2022-07-25 21:40:06 +01:00
Bram Moolenaar
6d023f98df patch 9.0.0072: compiler warning for uninitialized variable
Problem:    Compiler warning for uninitialized variable.
Solution:   Initialize it. (John Marriott)
2022-07-25 21:15:45 +01:00
zeertzjq
ecdc82e74e patch 9.0.0071: command overlaps with printed text in scrollback
Problem:    Command overlaps with printed text in scrollback.
Solution:   Clear until end-of-line and use correct message chunk.
            (closes #10765, closes #10764)
2022-07-25 19:50:57 +01:00
zeertzjq
4dc513a22c patch 9.0.0070: using utfc_ptr2char_len() when length is negative
Problem:    Using utfc_ptr2char_len() when length is negative.
Solution:   Check value of length. (closes #10760)
2022-07-25 19:42:02 +01:00
Bram Moolenaar
0c740e745a patch 9.0.0069: leaking memory when using text prop with inserted text
Problem:    Leaking memory when using text prop with inserted text.
Solution:   Clear the growarray with text.
2022-07-25 19:07:04 +01:00
Bram Moolenaar
fe3fb6e1e6 patch 9.0.0068: build fails with tiny features
Problem:    Build fails with tiny features.
Solution:   Add #ifdef.
2022-07-25 18:35:15 +01:00
Bram Moolenaar
7f9969c559 patch 9.0.0067: cannot show virtual text
Problem:    Cannot show virtual text.
Solution:   Initial changes for virtual text support, using text properties.
2022-07-25 18:13:54 +01:00
Bram Moolenaar
b529cfbd04 Update runtime files 2022-07-25 15:42:07 +01:00
zeertzjq
cd6ad6439d patch 9.0.0066: switching window uneccarily when getting buffer options
Problem:    Switching window uneccarily when getting buffer options.
Solution:   Do not switch window when getting buffer options. (closes #10767)
2022-07-25 12:28:09 +01:00
Richard Purdie
509695c1c3 patch 9.0.0065: cross-compiling doesn't work because of timer_create check
Problem:    Cross-compiling doesn't work because of timer_create check.
Solution:   Use AC_CACHE_CHECK(). (Richard Purdie, closes #10777)
2022-07-24 20:48:00 +01:00
Bram Moolenaar
c963ec31a0 patch 9.0.0064: confusing error when using "q:" in command line window
Problem:    Confusing error when using "q:" in command line window.
Solution:   Check for the situation and give a better error message.
            (closes #10756)
2022-07-24 20:08:01 +01:00
Bram Moolenaar
d61efa50f8 patch 9.0.0063: too many type casts for dict_get functions
Problem:    Too many type casts for dict_get functions.
Solution:   Change the key argument from "char_u *" to "char *".
2022-07-23 09:52:04 +01:00
Bram Moolenaar
5ac50de83f patch 9.0.0062: compiler warnings for signed/unsigned char
Problem:    Compiler warnings for signed/unsigned char.
Solution:   Add type casts. (John Marriott)
2022-07-23 09:22:47 +01:00
Bram Moolenaar
5fa9f23a63 patch 9.0.0061: ml_get error with nested autocommand
Problem:    ml_get error with nested autocommand.
Solution:   Also check line numbers for a nested autocommand. (closes #10761)
2022-07-23 09:06:48 +01:00
Bram Moolenaar
b9e717367c patch 9.0.0060: accessing uninitialized memory when completing long line
Problem:    Accessing uninitialized memory when completing long line.
Solution:   Terminate string with NUL.
2022-07-23 06:53:08 +01:00
zeertzjq
bb404f5ad5 patch 9.0.0059: test file has wrong name
Problem:    Test file has wrong name.
Solution:   Rename the file.  Various small fixes. (closes #10674)
2022-07-23 06:25:29 +01:00
Yegappan Lakshmanan
81a3ff97e2 patch 9.0.0058: Win32: cannot test low level events
Problem:    Win32: cannot test low level events.
Solution:   Add "sendevent" to test_gui_event(). (Yegappan Lakshmanan,
            closes #10679)
2022-07-23 05:04:16 +01:00
Bram Moolenaar
5154a88800 patch 9.0.0057: has('patch-xxx') returns true
Problem:    has('patch-xxx') returns true.
Solution:   Check for digit. (closes #10751)
2022-07-18 20:48:50 +01:00
Bram Moolenaar
bd683e3a79 patch 9.0.0056: wrong line number reported when :cexpr fails in :def function
Problem:    Wrong line number reported when :cexpr fails in :def function.
Solution:   Set line_number before executing :cexpr. (closes #10735)
2022-07-18 17:49:03 +01:00
Gregory Anders
fa49eb4827 patch 9.0.0055: bitbake files are not detected
Problem:    Bitbake files are not detected.
Solution:   Add bitbake filetype detection by file name and contents. (Gregory
            Anders, closes #10697)
2022-07-16 17:46:47 +01:00
Bram Moolenaar
c7bd2f08e5 patch 9.0.0054: compiler warning for size_t to int conversion
Problem:    Compiler warning for size_t to int conversion.
Solution:   Add type cast. (Mike Williams, closes #10741)
2022-07-15 20:45:20 +01:00
Dominique Pelle
3a393790a4 patch 9.0.0053: E1281 not tested with the old regexp engine
Problem:    E1281 not tested with the old regexp engine.
Solution:   Loop over the values of 'regexp'. (Dominique Pellé, closes #10695)
2022-07-14 17:40:49 +01:00
K.Takata
2ebcc35826 patch 9.0.0052: "zG" may throw an error if invalid character follows
Problem:    "zG" may throw an error if invalid character follows.
Solution:   Pass the word length to valid_spell_word(). (Ken Takata,
            closes #10737)
2022-07-14 17:25:14 +01:00
zeertzjq
f754fe6a3d patch 9.0.0051: using CTRL-C wih :append may hang Vim
Problem:    Using CTRL-C wih :append may hang Vim.
Solution:   Reset got_int. (closes #10729, closes #10728)
2022-07-14 17:06:12 +01:00
Bram Moolenaar
b26592a84c patch 9.0.0050: split else-of is confusing
Problem:    Split else-of is confusing.
Solution:   Join the lines. (closes #10696)
2022-07-12 17:34:31 +01:00
Leandro Lourenci
99af91e582 patch 9.0.0049: csv and tsv files are not recognized
Problem:    Csv and tsv files are not recognized.
Solution:   Add patterns fo csv and tsv files. (Leandro Lourenci,
            closes #10680)
2022-07-09 20:27:07 +01:00
Bram Moolenaar
b90818867c patch 9.0.0048: cursor in wrong column with mouse click after concealed text
Problem:    Cursor in wrong column with mouse click after concealed text.
Solution:   Store the text column when drawing text.
2022-07-09 04:56:24 +01:00
Bram Moolenaar
fee0c4aa99 Runtime files update 2022-07-07 22:31:59 +01:00
Bram Moolenaar
32acf1f1a7 patch 9.0.0047: using freed memory with recursive substitute
Problem:    Using freed memory with recursive substitute.
Solution:   Always make a copy for reg_prev_sub.
2022-07-07 22:20:31 +01:00
Bram Moolenaar
baefde1455 patch 9.0.0046: reading past end of completion with duplicate match
Problem:    Reading past end of completion with duplicate match.
Solution:   Check string length
2022-07-07 19:59:49 +01:00
Bram Moolenaar
caea66442d patch 9.0.0045: reading past end of completion with a long line
Problem:    Reading past end of completion with a long line and 'infercase'
            set.
Solution:   Allocate the string if needed.
2022-07-07 19:42:04 +01:00
Bram Moolenaar
b8329db36a patch 9.0.0044: typos in comments, wrapping lines
Problem:    Typos in comments, wrapping lines.
Solution:   Adjust comments.  Wrap lines.
2022-07-06 13:31:28 +01:00
Bram Moolenaar
5ed11535e0 Update runtime files 2022-07-06 13:18:11 +01:00
zeertzjq
cf34434b5e patch 9.0.0043: insufficient testing for bracket commands
Problem:    Insufficient testing for bracket commands.
Solution:   Add a few more tests. (closes #10668)
2022-07-06 12:57:31 +01:00
Bram Moolenaar
3244780379 patch 9.0.0042: missing change for filetype detection
Problem:    Missing change for filetype detection.
Solution:   Include change to detect guile from shebang line.
2022-07-05 21:56:39 +01:00
smjonas
704988f0c3 patch 9.0.0041: a couple of filetype patterns do not have "*" before "/etc"
Problem:    A couple of filetype patterns do not have "*" before "/etc".
Solution:   Add the star. (Jonas Strittmatter, closes #10662)
2022-07-05 18:42:56 +01:00
Bram Moolenaar
b67f0c8e49 patch 9.0.0040: use of set_chars_option() is confusing
Problem:    Use of set_chars_option() is confusing.
Solution:   Add "apply" argument to store the result or not.  Merge similar
            code.
2022-07-04 21:03:36 +01:00
Bram Moolenaar
4c99e622dd patch 9.0.0039: not all systems have GDK_KEY_dead_circumflex
Problem:    Not all systems have GDK_KEY_dead_circumflex. (Hisashi T Fujinaka)
Solution:   Add an #ifdef.
2022-07-04 19:58:17 +01:00
Bram Moolenaar
5ed26faace patch 9.0.0038: 'listchars' test fails
Problem:    'listchars' test fails.
Solution:   Use window-local value after setting the global value
2022-07-04 18:05:51 +01:00
Bram Moolenaar
510f03738d patch 9.0.0037: build error
Problem:    Build error.
Solution:   Add missing change.
2022-07-04 17:46:22 +01:00
Bram Moolenaar
96ba25ac01 patch 9.0.0036: 'fillchars' cannot have window-local values
Problem:    'fillchars' cannot have window-local values.
Solution:   Make 'fillchars' global-local. (closes #5206)
2022-07-04 17:34:33 +01:00
Bram Moolenaar
54e5fed6d2 patch 9.0.0035: spell dump may go beyond end of an array
Problem:    Spell dump may go beyond end of an array.
Solution:   Limit the word length.
2022-07-04 13:37:07 +01:00
zeertzjq
288ed23e39 patch 9.0.0034: spell tests do not always clear the word list
Problem:    Spell tests do not always clear the word list.
Solution:   Clear the word list in TearDown(). (closes #10659)
2022-07-04 11:03:07 +01:00
Anton Sharonov
4dd9252d6f patch 9.0.0033: on a Belgian keyboard CTRL-[ does not work
Problem:    On a Belgian keyboard CTRL-[ does not work.
Solution:   Handle GDK_KEY_dead_circumflex. (Anton Sharonov, closes #10658)
2022-07-04 10:47:31 +01:00
Bram Moolenaar
7fe956d176 patch 9.0.0032: in the quickfix window 'cursorline' overrules QuickFixLine
Problem:    In the quickfix window 'cursorline' overrules QuickFixLine
            highlighting.
Solution:   Combine the attributes.  Add a test. (closes #10654)
2022-07-03 14:21:09 +01:00
zeertzjq
9359e8a6d9 patch 9.0.0031: <cmod> of user command does not have correct verbose value
Problem:    <cmod> of user command does not have correct verbose value.
Solution:   Use the value from the command modifier. (closes #10651)
2022-07-03 13:16:09 +01:00
Bram Moolenaar
22e7e867e2 patch 9.0.0030: matchfuzzy test depends on path of current directory
Problem:    Matchfuzzy test depends on path of current directory.
Solution:   Use fnamemodify() to remove the path. (Robin Becker,
            closes #10650)
2022-07-02 20:48:01 +01:00
Bram Moolenaar
daaca8a128 patch 9.0.0029: the bitmaps/vim.ico file is not in the distribution
Problem:    The bitmaps/vim.ico file is not in the distribution.
Solution:   Add it back to the distribution.  Adjust the build rules to have
            it end up in the right place.
2022-07-02 17:58:23 +01:00
Bram Moolenaar
022f9ef16c patch 9.0.0028: MS-Windows: tests fail if there is a "runtime" directory
Problem:    MS-Windows: tests fail if there is a stray "runtime" directory.
Solution:   Only use a "runtime" directory if it contains "defaults.vim".
2022-07-02 17:36:31 +01:00
Bram Moolenaar
2d29501982 patch 9.0.0027: the command line test is getting quite big
Problem:    The command line test is getting quite big.
Solution:   Move command line window tests to a separate file.
2022-07-02 16:29:34 +01:00
Bram Moolenaar
c5274dd122 patch 9.0.0026: accessing freed memory with diff put
Problem:    Accessing freed memory with diff put.
Solution:   Bail out when diff pointer is no longer valid.
2022-07-02 15:10:00 +01:00
Bram Moolenaar
c6fdb15d42 patch 9.0.0025: accessing beyond allocated memory with the cmdline window
Problem:    Accessing beyond allocated memory when using the cmdline window in
            Ex mode.
Solution:   Use "*" instead of "'<,'>" for Visual mode.
2022-07-02 13:43:21 +01:00
Bram Moolenaar
af043e12d9 patch 9.0.0024: may access part of typeahead buf that isn't filled
Problem:    May access part of typeahead buf that isn't filled.
Solution:   Check length of typeahead.
2022-07-02 12:08:16 +01:00
Bram Moolenaar
f2ce76a8c0 patch 9.0.0023: on Solaris timer_create() exists but does not work
Problem:    On Solaris timer_create() exists but does not work.
Solution:   Adjust the configure check to run the test program.
            (closes #10647)
2022-07-02 11:40:40 +01:00
Bram Moolenaar
95afae6d17 patch 9.0.0022: spell test fails
Problem:    Spell test fails.
Solution:   Expect new error is given.
2022-07-01 22:44:19 +01:00
Bram Moolenaar
5e59ea54c0 patch 9.0.0021: invalid memory access when adding word to spell word list
Problem:    Invalid memory access when adding word with a control character to
            the internal spell word list.
Solution:   Disallow adding a word with control characters or a trailing
            slash.
2022-07-01 22:26:20 +01:00
Bram Moolenaar
f12129f171 patch 9.0.0020: with some completion reading past end of string
Problem:    With some completion reading past end of string.
Solution:   Check the length of the string.
2022-07-01 19:58:30 +01:00
zeertzjq
eb273cd7b0 patch 9.0.0019: timers test not run where possible
Problem:    Timers test not run where possible.
Solution:   Adjust platform checks. (closes #10645)
2022-07-01 19:11:23 +01:00
Bram Moolenaar
0d878b95d8 Update runtime files 2022-07-01 18:45:04 +01:00
Bram Moolenaar
27efc62f5d patch 9.0.0018: going over the end of the typahead
Problem:    Going over the end of the typahead.
Solution:   Put a NUL after the typeahead.
2022-07-01 16:35:45 +01:00
Bram Moolenaar
3d51ce18ab patch 9.0.0017: accessing memory beyond the end of the line
Problem:    Accessing memory beyond the end of the line.
Solution:   Stop Visual mode when closing a window.
2022-07-01 15:26:15 +01:00
Bram Moolenaar
c2a79b87fc patch 9.0.0016: comparing line pointer for 'breakindent' is not reliable
Problem:    Comparing line pointer for 'breakindent' is not reliable.
Solution:   Make a copy of the line.
2022-07-01 13:15:35 +01:00
zeertzjq
79ae152697 patch 9.0.0015: with EXITFREE defined terminal menus are not cleared
Problem:    With EXITFREE defined terminal menus are not cleared.
Solution:   Also clear terminal menus. Remove condition that is always true.
            (closes #10641)
2022-07-01 12:13:15 +01:00
Bram Moolenaar
9610f94510 patch 9.0.0014: missing part of the test override change
Problem:    Missing part of the test override change.
Solution:   Add the missing part.
2022-06-30 22:28:08 +01:00
Bram Moolenaar
fa4873ccfc patch 9.0.0013: reproducing memory access errors can be difficult
Problem:    Reproducing memory access errors can be difficult.
Solution:   When testing, copy each line to allocated memory, so that valgrind
            can detect accessing memory before and/or after it.  Fix uncovered
            problems.
2022-06-30 22:13:59 +01:00
Bram Moolenaar
cdbfc6dbab patch 9.0.0012: signature files not detected properly
Problem:    Signature files not detected properly.
Solution:   Add a function to better detect signature files. (Doug Kearns)
2022-06-30 16:25:21 +01:00
Bram Moolenaar
d25f003342 patch 9.0.0011: reading beyond the end of the line with put command
Problem:    Reading beyond the end of the line with put command.
Solution:   Adjust the end mark position.
2022-06-30 12:30:19 +01:00
Bram Moolenaar
b0375d466e patch 9.0.0010: returning 0 for has('patch-9.0.0') is inconsistent
Problem:    Returning 0 for has('patch-9.0.0') is inconsistent.
Solution:   Make it return 1. (closes #10640)
2022-06-30 11:03:39 +01:00
Bram Moolenaar
083692d598 patch 9.0.0009: going past the end of a menu item with only modifier
Problem:    Going past the end of a menu item with only modifier.
Solution:   Check for NUL.
2022-06-29 21:16:58 +01:00
David Gow
83e11800cc patch 9.0.0008: cannot specify the variable name for "xxd -i"
Problem:    Cannot specify the variable name for "xxd -i".
Solution:   Add the "-name" argument. (David Gow, closes #10599)
2022-06-29 20:24:49 +01:00
Bram Moolenaar
84f5463630 patch 9.0.0007: no support for double, dotted and dashed underlines
Problem:    No support for double, dotted and dashed underlines.
Solution:   Add the termcap entries and highlight modes. (closes #9553)
2022-06-29 18:39:11 +01:00
Bram Moolenaar
8b5901e2f9 patch 9.0.0006: not all Visual Basic files are recognized
Problem:    Not all Visual Basic files are recognized.
Solution:   Change detection of *.cls files. (Doug Kearns)
2022-06-29 14:39:12 +01:00
Hugo Osvaldo Barrera
040674129f patch 9.0.0005: hare files are not recognized
Problem:    Hare files are not recognized.
Solution:   Add a filetype pattern. (Hugo Osvaldo Barrera, closes #10630)
2022-06-29 13:48:49 +01:00
Matvey Tarasov
d14bb1aef9 patch 9.0.0004: plural messages not translated properly
Problem:    Plural messages not translated properly.
Solution:   Use ngettext() in a few more places. (Matvey Tarasov,
            closes #10606)
2022-06-29 13:18:27 +01:00
Yegappan Lakshmanan
ee47eaceaa patch 9.0.0003: functions are global while they could be local
Problem:    Functions are global while they could be local.
Solution:   Add "static".  Add a few tests. (Yegappan Lakshmanan,
            closes #10612)
2022-06-29 12:55:36 +01:00
zeertzjq
c207fd2535 patch 9.0.0002: map functionality outside of map.c
Problem:    Map functionality outside of map.c.
Solution:   Move f_hasmapto() to map.c.  Rename a function. (closes #10611)
2022-06-29 10:37:40 +01:00
Bram Moolenaar
75417d960b patch 9.0.0001: Travis CI is no longer used
Problem:    Travis CI is no longer used.
Solution:   Delete the Travis CI configuration. (Hugo Osvaldo Barrera,
            closes #10636)
2022-06-28 20:07:42 +01:00
252 changed files with 19770 additions and 10578 deletions

10
.github/CODEOWNERS vendored
View File

@@ -109,11 +109,15 @@ runtime/ftplugin/css.vim @dkearns
runtime/ftplugin/cucumber.vim @tpope
runtime/ftplugin/dosbatch.vim @mrdubya
runtime/ftplugin/eiffel.vim @dkearns
runtime/ftplugin/expect.vim @dkearns
runtime/ftplugin/erlang.vim @hcs42
runtime/ftplugin/eruby.vim @tpope @dkearns
runtime/ftplugin/fennel.vim @gpanders
runtime/ftplugin/fetchmail.vim @dkearns
runtime/ftplugin/fpcmake.vim @dkearns
runtime/ftplugin/freebasic.vim @dkearns
runtime/ftplugin/fstab.vim @rid9
runtime/ftplugin/gdb.vim @xeyownt
runtime/ftplugin/git.vim @tpope
runtime/ftplugin/gitcommit.vim @tpope
runtime/ftplugin/gitconfig.vim @tpope
@@ -123,6 +127,7 @@ runtime/ftplugin/go.vim @dbarnett
runtime/ftplugin/gprof.vim @dpelle
runtime/ftplugin/haml.vim @tpope
runtime/ftplugin/hgcommit.vim @k-takata
runtime/ftplugin/html.vim @dkearns
runtime/ftplugin/i3config.vim @hiqua
runtime/ftplugin/icon.vim @dkearns
runtime/ftplugin/indent.vim @dkearns
@@ -296,10 +301,14 @@ runtime/syntax/eiffel.vim @jocelyn
runtime/syntax/elmfilt.vim @cecamp
runtime/syntax/erlang.vim @hcs42
runtime/syntax/eruby.vim @tpope @dkearns
runtime/syntax/expect.vim @dkearns
runtime/syntax/exports.vim @cecamp
runtime/syntax/falcon.vim @steveno
runtime/syntax/fennel.vim @gpanders
runtime/syntax/fetchmail.vim @dkearns
runtime/syntax/forth.vim @jkotlinski
runtime/syntax/fpcmake.vim @dkearns
runtime/syntax/freebasic.vim @dkearns
runtime/syntax/fstab.vim @rid9
runtime/syntax/git.vim @tpope
runtime/syntax/gitcommit.vim @tpope
@@ -313,6 +322,7 @@ runtime/syntax/groff.vim @jmarshall
runtime/syntax/haml.vim @tpope
runtime/syntax/haskell.vim @coot
runtime/syntax/hgcommit.vim @k-takata
runtime/syntax/html.vim @dkearns
runtime/syntax/i3config.vim @hiqua
runtime/syntax/icon.vim @dkearns
runtime/syntax/indent.vim @dkearns

View File

@@ -1,288 +0,0 @@
language: c
env:
global:
- BUILD=yes TEST=test CONFOPT= LEAK_CFLAGS="-DEXITFREE" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no LOG_DIR="$TRAVIS_BUILD_DIR/logs"
_anchors:
envs:
- &tiny-nogui
FEATURES=tiny TEST=testtiny CONFOPT="--disable-gui"
- &tiny
FEATURES=tiny TEST=testtiny
- &small
FEATURES=small TEST=testtiny
- &normal
FEATURES=normal
- &linux-huge
FEATURES=huge TEST="scripttests test_libvterm"
CONFOPT="--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
- &osx-huge # macOS build
FEATURES=huge
CONFOPT="--enable-perlinterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
- &unittests
BUILD=no TEST=unittests FEATURES=huge CHECK_AUTOCONF=yes
- &coverage
CFLAGS="--coverage -DUSE_GCOV_FLUSH" LDFLAGS=--coverage
- &asan # ASAN build
SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
ASAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/asan" UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
- &shadowopt
SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow
linux: &linux
os: linux
dist: bionic
addons:
apt:
packages: &apt-packages
- autoconf
- clang
- lcov
- gettext
- libcanberra-dev
- libperl-dev
- python-dev
- python3-dev
- liblua5.3-dev
- lua5.3
- ruby-dev
- tcl-dev
- cscope
- libgtk2.0-dev
- desktop-file-utils
- libtool-bin
services:
- xvfb
before_install:
- rvm reset
# Use llvm-cov instead of gcov when compiler is clang.
- |
if [[ "${CC}" = "clang" ]]; then
ln -sf "$(command -v llvm-cov)" /home/travis/bin/gcov
fi
# Setup lua5.3 manually since its package doesn't provide alternative.
# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
- |
if [[ "${CONFOPT}" =~ luainterp ]]; then
sudo update-alternatives --install /usr/bin/lua lua /usr/bin/lua5.3 10
fi
before_script:
- sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
# It appears we can load "snd-dummy" on only amd64.
- |
if [[ "${TRAVIS_CPU_ARCH}" = amd64 ]]; then
sudo bash ci/load-snd-dummy.sh || true
fi
- sudo usermod -a -G audio $USER
- do_test() { sg audio "sg $(id -gn) '$*'"; }
osx: &osx
os: osx
before_script:
- do_test() { "$@"; }
homebrew: &osx-homebrew
addons:
homebrew:
packages:
- lua
update: true
cache:
directories:
- /usr/local/Homebrew/Library/Homebrew/vendor/
- /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/
before_install:
- rvm reset
# Lua is not installed on macOS
- export LUA_PREFIX=/usr/local
coverage: &eval-coverage
# needed for https support for coveralls building cffi only works with gcc,
# not with clang
- CC=gcc pip install --user cpp-coveralls pyopenssl ndg-httpsclient pyasn1
- ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8
- (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
asan_symbolize: &asan_symbolize
# Update pyenv to fix the error "/opt/pyenv/libexec/pyenv: line 43: cd: asan_symbolize-6.0: Not a directory".
# https://github.com/pyenv/pyenv/issues/580
- (cd "${PYENV_ROOT}" && git fetch -p origin && git checkout "$(git rev-list --tags -n1)") &>/dev/null || true
- for f in $(grep -l '#[[:digit:]]* *0x[[:digit:]a-fA-F]*' "$LOG_DIR"/*); do asan_symbolize-11 -l "$f"; done
branches:
except:
- /^v[0-9]/
script:
- mkdir -p "$LOG_DIR"
- NPROC=$(getconf _NPROCESSORS_ONLN)
- set -o errexit
- echo -e "\\033[33;1mConfiguring Vim\\033[0m" && echo -en "travis_fold:start:configure\\r\\033[0K"
- |
if [[ "${CHECK_AUTOCONF}" = "yes" ]] && [[ "${CC}" = "gcc" ]]; then
make -C src autoconf
fi
- |
if [[ -n "${SHADOWOPT}" ]]; then
make -C src shadow
fi
# "./configure" changes its working directory into "$SRCDIR".
- ./configure --with-features=${FEATURES} ${CONFOPT} --enable-fail-if-missing
- echo -en "travis_fold:end:configure\\r\\033[0K"
- echo -e "\\033[33;1mBuilding Vim\\033[0m" && echo -en "travis_fold:start:build\\r\\033[0K"
- |
if [[ "${BUILD}" = "yes" ]]; then
# Append various warning flags to CFLAGS.
# BSD sed needs backup extension specified.
sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
if [[ "${TRAVIS_OS_NAME}" = "osx" ]] || [[ "${CC}" = "clang-11" ]]; then
# On macOS, the entity of gcc is clang.
sed -i.bak -f ci/config.mk.clang.sed ${SRCDIR}/auto/config.mk
else
sed -i.bak -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
fi
make ${SHADOWOPT} -j${NPROC}
fi
- echo -en "travis_fold:end:build\\r\\033[0K"
- set +o errexit
# Show Vim version and also if_xx versions.
- |
if [[ "${BUILD}" = "yes" ]]; then
"${SRCDIR}"/vim --version
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
fi
- echo -e "\\033[33;1mTesting Vim\\033[0m" && echo -en "travis_fold:start:test\\r\\033[0K"
- do_test make ${SHADOWOPT} ${TEST} && FOLD_MARKER=travis_fold
- echo -en "${FOLD_MARKER}:end:test\\r\\033[0K"
- |
# Not all sanitizers will cause the tests to fail. This helps since we can
# see all the failures instead of just the first one, but we still want the
# test phase to fail if any sanitizer issues are detected.
if [[ -n "${ASAN_OPTIONS}" ]]; then
if grep -q '#[[:digit:]]* *0x[[:digit:]a-fA-F]*' "$LOG_DIR"/*; then
false
fi
fi
# Instead of using all environments with both compilers on both systems,
# exclude some builds on mac os x and linux.
# On mac os x "tiny" is always without GUI, use 2 compilers in 2 environments.
# Linux: 2 compilers on some of the environments + gcc on os390
jobs:
include:
#- <<: *osx
# name: tiny-nogui/clang
# compiler: clang
# env: *tiny-nogui
#- <<: *osx
# name: tiny-nogui/gcc
# compiler: gcc
# env: *tiny-nogui
#- <<: *osx
# <<: *osx-homebrew
# name: huge/clang
# compiler: clang
# env: *osx-huge
#- <<: *osx
# <<: *osx-homebrew
# name: huge/gcc
# compiler: gcc
# env: *osx-huge
#- <<: *linux
# name: tiny-nogui/clang
# compiler: clang
# env: *tiny-nogui
#- <<: *linux
# name: tiny-nogui/gcc
# compiler: gcc
# env: *tiny-nogui
#- <<: *linux
# name: tiny/clang
# compiler: clang
# env: *tiny
#- <<: *linux
# name: tiny/gcc
# compiler: gcc
# env: *tiny
#- <<: *linux
# name: small/gcc
# compiler: gcc
# env: *small
#- <<: *linux
# name: normal+shadow/clang
# compiler: clang
# env:
# - *normal
# - *shadowopt
#- <<: *linux
# name: normal+shadow/gcc
# compiler: gcc
# env:
# - *normal
# - *shadowopt
- <<: *linux
arch: s390x
name: huge/gcc-s390x
compiler: gcc
env: *linux-huge
services: []
- <<: *linux
arch: arm64
name: huge/gcc-arm64
compiler: gcc
env: *linux-huge
services: []
#- <<: *linux
# name: huge+coverage/clang
# compiler: clang
# env:
# - *linux-huge
# - *coverage
# after_success: *eval-coverage
#- <<: *linux
# name: huge+coverage/gcc
# compiler: gcc
# env:
# - *linux-huge
# - *coverage
# after_success: *eval-coverage
#- <<: *linux # ASAN
# name: huge+asan/clang
# compiler: clang-11
# addons:
# apt:
# sources:
# - sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
# key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
# packages:
# - *apt-packages
# - clang-11
# env:
# - *linux-huge
# - *asan
# after_failure: *asan_symbolize
#- <<: *linux
# name: huge-testgui+coverage/gcc
# compiler: gcc
# env:
# - *linux-huge
# - *coverage
# - TEST="-C src testgui"
# after_success: *eval-coverage
#- <<: *linux
# name: unittests+coverage/gcc
# compiler: gcc
# env:
# - *unittests
# - *coverage
# after_success: *eval-coverage
#- <<: *linux
# name: vimtags/gcc
# compiler: gcc
# env:
# - *normal
# - TEST="-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
# vim:set sts=2 sw=2 tw=0 et:

View File

@@ -65,9 +65,6 @@ If the maintainer does not respond, contact the vim-dev maillist.
# Translations
Translations of this CONTRIBUTING file:
[Korean](https://github.com/cjw1359/opensource/blob/master/Vim/CONTRIBUTING_ko.md)
Translating messages and runtime files is very much appreciated! These things
can be translated:
* Messages in Vim, see [src/po/README.txt][1]

View File

@@ -15,7 +15,6 @@ SRC_ALL = \
.gitignore \
.hgignore \
.lgtm.yml \
.travis.yml \
.appveyor.yml \
.codecov.yml \
ci/appveyor.bat \
@@ -625,6 +624,7 @@ SRC_DOS_BIN = \
src/xpm/x86/lib-vc14/libXpm.lib \
src/xpm/x86/lib/libXpm.a \
src/xpm/x86/lib/libXpm.lib \
runtime/bitmaps/vim.ico \
nsis/icons.zip \
# source files for Amiga, DOS, etc. (also in the extra archive)
@@ -1017,6 +1017,7 @@ LANG_GEN = \
runtime/spell/??/*.diff \
runtime/spell/??/main.aap \
runtime/spell/sr/README_sr.txt \
runtime/spell/sr/convert.vim \
runtime/spell/tet/*.diff \
runtime/spell/tet/main.aap \
runtime/spell/check/main.aap \

View File

@@ -414,6 +414,7 @@ dossrc: dist no_title.vim dist/$(COMMENT_SRC) \
tar cf - \
$(SRC_ALL) \
$(SRC_DOS) \
$(SRC_DOS_BIN) \
$(SRC_AMI_DOS) \
$(SRC_DOS_UNIX) \
runtime/doc/uganda.nsis.txt \
@@ -423,9 +424,6 @@ dossrc: dist no_title.vim dist/$(COMMENT_SRC) \
rmdir dist/vim/$(VIMRTDIR)/runtime
# This file needs to be in dos fileformat for NSIS.
$(VIM) -e -X -u no_title.vim -c ":set tx|wq" dist/vim/$(VIMRTDIR)/doc/uganda.nsis.txt
tar cf - \
$(SRC_DOS_BIN) \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC)
runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt

View File

@@ -1,6 +1,6 @@
[![Vim Logo](https://github.com/vim/vim/raw/master/runtime/vimlogo.gif)](https://www.vim.org)
[![Github Build status](https://github.com/vim/vim/workflows/GitHub%20CI/badge.svg)](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [![Travis Build Status](https://travis-ci.com/vim/vim.svg?branch=master)](https://travis-ci.com/github/vim/vim) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim) [![Cirrus Build Status](https://api.cirrus-ci.com/github/vim/vim.svg)](https://cirrus-ci.com/github/vim/vim) [![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master) [![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim) [![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp) [![Debian CI](https://badges.debian.net/badges/debian/testing/vim/version.svg)](https://buildd.debian.org/vim) [![Packages](https://repology.org/badge/tiny-repos/vim.svg)](https://repology.org/metapackage/vim) [![Fossies codespell report](https://fossies.org/linux/test/vim-master.tar.gz/codespell.svg)](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
[![Github Build status](https://github.com/vim/vim/workflows/GitHub%20CI/badge.svg)](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim) [![Cirrus Build Status](https://api.cirrus-ci.com/github/vim/vim.svg)](https://cirrus-ci.com/github/vim/vim) [![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master) [![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim) [![Language Grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/vim/vim.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/vim/vim/context:cpp) [![Debian CI](https://badges.debian.net/badges/debian/testing/vim/version.svg)](https://buildd.debian.org/vim) [![Packages](https://repology.org/badge/tiny-repos/vim.svg)](https://repology.org/metapackage/vim) [![Fossies codespell report](https://fossies.org/linux/test/vim-master.tar.gz/codespell.svg)](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
<sub>For translations of this README see the end.</sub>
@@ -128,6 +128,8 @@ If you would like to help making Vim better, see the
## Information ##
If you are on macOS, you can use [Macvim](https://macvim-dev.github.io/macvim/).
The latest news about Vim can be found on the Vim home page:
https://www.vim.org/
@@ -150,8 +152,3 @@ Send any other comments, patches, flowers and suggestions to:
This is `README.md` for version 9.0 of Vim: Vi IMproved.
## Translations of this README ##
[Korean](https://github.com/cjw1359/opensource/blob/master/Vim/README_ko.md)

View File

@@ -0,0 +1,95 @@
" Support for bitbake indenting, see runtime/indent/bitbake.vim
function s:is_bb_python_func_def(lnum)
let stack = synstack(a:lnum, 1)
if len(stack) == 0
return 0
endif
return synIDattr(stack[0], "name") == "bbPyFuncDef"
endfunction
function bitbake#Indent(lnum)
if !has('syntax_items')
return -1
endif
let stack = synstack(a:lnum, 1)
if len(stack) == 0
return -1
endif
let name = synIDattr(stack[0], "name")
" TODO: support different styles of indentation for assignments. For now,
" we only support like this:
" VAR = " \
" value1 \
" value2 \
" "
"
" i.e. each value indented by shiftwidth(), with the final quote " completely unindented.
if name == "bbVarValue"
" Quote handling is tricky. kernel.bbclass has this line for instance:
" EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" " HOSTCPP="${BUILD_CPP}""
" Instead of trying to handle crazy cases like that, just assume that a
" double-quote on a line by itself (following an assignment) means the
" user is closing the assignment, and de-dent.
if getline(a:lnum) =~ '^\s*"$'
return 0
endif
let prevstack = synstack(a:lnum - 1, 1)
if len(prevstack) == 0
return -1
endif
let prevname = synIDattr(prevstack[0], "name")
" Only indent if there was actually a continuation character on
" the previous line, to avoid misleading indentation.
let prevlinelastchar = synIDattr(synID(a:lnum - 1, col([a:lnum - 1, "$"]) - 1, 1), "name")
let prev_continued = prevlinelastchar == "bbContinue"
" Did the previous line introduce an assignment?
if index(["bbVarDef", "bbVarFlagDef"], prevname) != -1
if prev_continued
return shiftwidth()
endif
endif
if !prev_continued
return 0
endif
" Autoindent can take it from here
return -1
endif
if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1
let ret = python#GetIndent(a:lnum, function('s:is_bb_python_func_def'))
" Should normally always be indented by at least one shiftwidth; but allow
" return of -1 (defer to autoindent) or -2 (force indent to 0)
if ret == 0
return shiftwidth()
elseif ret == -2
return 0
endif
return ret
endif
" TODO: GetShIndent doesn't detect tasks prepended with 'fakeroot'
" Need to submit a patch upstream to Vim to provide an extension point.
" Unlike the Python indenter, the Sh indenter is way too large to copy and
" modify here.
if name == "bbShFuncRegion"
return GetShIndent()
endif
" TODO:
" + heuristics for de-denting out of a bbPyDefRegion? e.g. when the user
" types an obvious BB keyword like addhandler or addtask, or starts
" writing a shell task. Maybe too hard to implement...
return -1
endfunction

View File

@@ -72,22 +72,35 @@ export def FTbas()
# most frequent FreeBASIC-specific keywords in distro files
var fb_keywords = '\c^\s*\%(extern\|var\|enum\|private\|scope\|union\|byref\|operator\|constructor\|delete\|namespace\|public\|property\|with\|destructor\|using\)\>\%(\s*[:=(]\)\@!'
var fb_preproc = '\c^\s*\%(#\a\+\|option\s\+\%(byval\|dynamic\|escape\|\%(no\)\=gosub\|nokeyword\|private\|static\)\>\)'
var fb_preproc = '\c^\s*\%(' ..
# preprocessor
'#\s*\a\+\|' ..
# compiler option
'option\s\+\%(byval\|dynamic\|escape\|\%(no\)\=gosub\|nokeyword\|private\|static\)\>\|' ..
# metacommand
'\%(''\|rem\)\s*\$lang\>\|' ..
# default datatype
'def\%(byte\|longint\|short\|ubyte\|uint\|ulongint\|ushort\)\>' ..
'\)'
var fb_comment = "^\\s*/'"
# OPTION EXPLICIT, without the leading underscore, is common to many dialects
var qb64_preproc = '\c^\s*\%($\a\+\|option\s\+\%(_explicit\|_\=explicitarray\)\>\)'
var lines = getline(1, min([line("$"), 100]))
if match(lines, fb_preproc) > -1 || match(lines, fb_comment) > -1 || match(lines, fb_keywords) > -1
setf freebasic
elseif match(lines, qb64_preproc) > -1
setf qb64
elseif match(lines, ft_visual_basic_content) > -1
setf vb
else
setf basic
endif
for lnum in range(1, min([line("$"), 100]))
var line = getline(lnum)
if line =~ ft_visual_basic_content
setf vb
return
elseif line =~ fb_preproc || line =~ fb_comment || line =~ fb_keywords
setf freebasic
return
elseif line =~ qb64_preproc
setf qb64
return
endif
endfor
setf basic
enddef
export def FTbtm()
@@ -126,6 +139,23 @@ export def FTcfg()
endif
enddef
export def FTcls()
if exists("g:filetype_cls")
exe "setf " .. g:filetype_cls
return
endif
if getline(1) =~ '^%'
setf tex
elseif getline(1)[0] == '#' && getline(1) =~ 'rexx'
setf rexx
elseif getline(1) == 'VERSION 1.0 CLASS'
setf vb
else
setf st
endif
enddef
export def FTlpc()
if exists("g:lpc_syntax_for_c")
var lnum = 1
@@ -429,7 +459,7 @@ export def FTmm()
setf nroff
enddef
# Returns true if file content looks like LambdaProlog
# Returns true if file content looks like LambdaProlog module
def IsLProlog(): bool
# skip apparent comments and blank lines, what looks like
# LambdaProlog comment may be RAPID header
@@ -489,12 +519,14 @@ export def FTinc()
# headers so assume POV-Ray
elseif lines =~ '^\s*\%({\|(\*\)' || lines =~? ft_pascal_keywords
setf pascal
elseif lines =~# '\<\%(require\|inherit\)\>' || lines =~# '[A-Z][A-Za-z0-9_:${}]*\s\+\%(??\|[?:+]\)\?= '
setf bitbake
else
FTasmsyntax()
if exists("b:asmsyntax")
exe "setf " .. fnameescape(b:asmsyntax)
exe "setf " .. fnameescape(b:asmsyntax)
else
setf pov
setf pov
endif
endif
endif
@@ -818,6 +850,27 @@ export def FTperl(): number
return 0
enddef
# LambdaProlog and Standard ML signature files
export def FTsig()
if exists("g:filetype_sig")
exe "setf " .. g:filetype_sig
return
endif
var lprolog_comment = '^\s*\%(/\*\|%\)'
var lprolog_keyword = '^\s*sig\s\+\a'
var sml_comment = '^\s*(\*'
var sml_keyword = '^\s*\%(signature\|structure\)\s\+\a'
var line = getline(nextnonblank(1))
if line =~ lprolog_comment || line =~# lprolog_keyword
setf lprolog
elseif line =~ sml_comment || line =~# sml_keyword
setf sml
endif
enddef
export def FTsys()
if exists("g:filetype_sys")
exe "setf " .. g:filetype_sys

View File

@@ -193,6 +193,10 @@ def DetectFromHashBang(firstline: string)
elseif name =~ 'icon\>'
set ft=icon
# Guile
elseif name =~ 'guile'
set ft=scheme
endif
enddef

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: FreeBASIC
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Mar 16
" Last Change: 2022 June 24
" Dialects can be one of fb, qb, fblite, or deprecated
" Precedence is forcelang > #lang > lang
@@ -18,17 +18,16 @@ function! freebasic#GetDialect() abort
" override with #lang directive or metacommand
let skip = "has('syntax_items') && synIDattr(synID(line('.'), col('.'), 1), 'name') =~ 'Comment$'"
let pat = '\c^\s*\%(#\s*lang\s\+\|''\s*$lang\s*:\s*\)"\([^"]*\)"'
let save_cursor = getcurpos()
call cursor(1, 1)
let lnum = search(pat, 'n', '', '', skip)
let lnum = search(pat, 'cn')
call setpos('.', save_cursor)
if lnum
let word = matchlist(getline(lnum), pat)[1]
if word =~? '\%(fb\|deprecated\|fblite\|qb\)'
if word =~? '\<\%(fb\|deprecated\|fblite\|qb\)\>'
let dialect = word
else
echomsg "freebasic#GetDialect: Invalid lang, found '" .. word .. "' at line " .. lnum .. " " .. getline(lnum)

228
runtime/autoload/python.vim Normal file
View File

@@ -0,0 +1,228 @@
" Support for Python indenting, see runtime/indent/python.vim
let s:keepcpo= &cpo
set cpo&vim
" See if the specified line is already user-dedented from the expected value.
function s:Dedented(lnum, expected)
return indent(a:lnum) <= a:expected - shiftwidth()
endfunction
let s:maxoff = 50 " maximum number of lines to look backwards for ()
" Some other filetypes which embed Python have slightly different indent
" rules (e.g. bitbake). Those filetypes can pass an extra funcref to this
" function which is evaluated below.
function python#GetIndent(lnum, ...)
let ExtraFunc = a:0 > 0 ? a:1 : 0
" If this line is explicitly joined: If the previous line was also joined,
" line it up with that one, otherwise add two 'shiftwidth'
if getline(a:lnum - 1) =~ '\\$'
if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$'
return indent(a:lnum - 1)
endif
return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwidth() * 2))
endif
" If the start of the line is in a string don't change the indent.
if has('syntax_items')
\ && synIDattr(synID(a:lnum, 1, 1), "name") =~ "String$"
return -1
endif
" Search backwards for the previous non-empty line.
let plnum = prevnonblank(v:lnum - 1)
if plnum == 0
" This is the first non-empty line, use zero indent.
return 0
endif
call cursor(plnum, 1)
" Identing inside parentheses can be very slow, regardless of the searchpair()
" timeout, so let the user disable this feature if he doesn't need it
let disable_parentheses_indenting = get(g:, "pyindent_disable_parentheses_indenting", 0)
if disable_parentheses_indenting == 1
let plindent = indent(plnum)
let plnumstart = plnum
else
" searchpair() can be slow sometimes, limit the time to 150 msec or what is
" put in g:pyindent_searchpair_timeout
let searchpair_stopline = 0
let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150)
" If the previous line is inside parenthesis, use the indent of the starting
" line.
" Trick: use the non-existing "dummy" variable to break out of the loop when
" going too far back.
let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW',
\ "line('.') < " . (plnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if parlnum > 0
if a:0 > 0 && ExtraFunc(parlnum)
" We may have found the opening brace of a bitbake Python task, e.g. 'python do_task {'
" If so, ignore it here - it will be handled later.
let parlnum = 0
let plindent = indent(plnum)
let plnumstart = plnum
else
let plindent = indent(parlnum)
let plnumstart = parlnum
endif
else
let plindent = indent(plnum)
let plnumstart = plnum
endif
" When inside parenthesis: If at the first line below the parenthesis add
" two 'shiftwidth', otherwise same as previous line.
" i = (a
" + b
" + c)
call cursor(a:lnum, 1)
let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if p > 0
if a:0 > 0 && ExtraFunc(p)
" Currently only used by bitbake
" Handle first non-empty line inside a bitbake Python task
if p == plnum
return shiftwidth()
endif
" Handle the user actually trying to close a bitbake Python task
let line = getline(a:lnum)
if line =~ '^\s*}'
return -2
endif
" Otherwise ignore the brace
let p = 0
else
if p == plnum
" When the start is inside parenthesis, only indent one 'shiftwidth'.
let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if pp > 0
return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth())
endif
return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2))
endif
if plnumstart == p
return indent(plnum)
endif
return plindent
endif
endif
endif
" Get the line and remove a trailing comment.
" Use syntax highlighting attributes when possible.
let pline = getline(plnum)
let pline_len = strlen(pline)
if has('syntax_items')
" If the last character in the line is a comment, do a binary search for
" the start of the comment. synID() is slow, a linear search would take
" too long on a long line.
if synIDattr(synID(plnum, pline_len, 1), "name") =~ "\\(Comment\\|Todo\\)$"
let min = 1
let max = pline_len
while min < max
let col = (min + max) / 2
if synIDattr(synID(plnum, col, 1), "name") =~ "\\(Comment\\|Todo\\)$"
let max = col
else
let min = col + 1
endif
endwhile
let pline = strpart(pline, 0, min - 1)
endif
else
let col = 0
while col < pline_len
if pline[col] == '#'
let pline = strpart(pline, 0, col)
break
endif
let col = col + 1
endwhile
endif
" If the previous line ended with a colon, indent this line
if pline =~ ':\s*$'
return plindent + shiftwidth()
endif
" If the previous line was a stop-execution statement...
if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>'
" See if the user has already dedented
if s:Dedented(a:lnum, indent(plnum))
" If so, trust the user
return -1
endif
" If not, recommend one dedent
return indent(plnum) - shiftwidth()
endif
" If the current line begins with a keyword that lines up with "try"
if getline(a:lnum) =~ '^\s*\(except\|finally\)\>'
let lnum = a:lnum - 1
while lnum >= 1
if getline(lnum) =~ '^\s*\(try\|except\)\>'
let ind = indent(lnum)
if ind >= indent(a:lnum)
return -1 " indent is already less than this
endif
return ind " line up with previous try or except
endif
let lnum = lnum - 1
endwhile
return -1 " no matching "try"!
endif
" If the current line begins with a header keyword, dedent
if getline(a:lnum) =~ '^\s*\(elif\|else\)\>'
" Unless the previous line was a one-liner
if getline(plnumstart) =~ '^\s*\(for\|if\|elif\|try\)\>'
return plindent
endif
" Or the user has already dedented
if s:Dedented(a:lnum, plindent)
return -1
endif
return plindent - shiftwidth()
endif
" When after a () construct we probably want to go back to the start line.
" a = (b
" + c)
" here
if parlnum > 0
" ...unless the user has already dedented
if s:Dedented(a:lnum, plindent)
return -1
else
return plindent
endif
endif
return -1
endfunction
let &cpo = s:keepcpo
unlet s:keepcpo

BIN
runtime/bitmaps/vim.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -1275,7 +1275,7 @@ User Never executed automatically. To be used for
if exists('#User#MyEvent')
doautocmd User MyEvent
endif
<
*SigUSR1*
SigUSR1 After the SIGUSR1 signal has been detected.
Could be used if other ways of notifying Vim

View File

@@ -293,7 +293,7 @@ index({object}, {expr} [, {start} [, {ic}]])
Number index in {object} where {expr} appears
input({prompt} [, {text} [, {completion}]])
String get input from the user
inputdialog({prompt} [, {text} [, {completion}]])
inputdialog({prompt} [, {text} [, {cancelreturn}]])
String like input() but in a GUI dialog
inputlist({textlist}) Number let the user pick from a choice list
inputrestore() Number restore typeahead
@@ -1149,7 +1149,7 @@ blob2list({blob}) *blob2list()*
Can also be used as a |method|: >
GetBlob()->blob2list()
<
*browse()*
browse({save}, {title}, {initdir}, {default})
Put up a file requester. This only works when "has("browse")"
@@ -2316,7 +2316,9 @@ exists({expr}) The result is a Number, which is |TRUE| if {expr} is defined,
To check for a supported command
always check the return value to be 2.
:2match The |:2match| command.
:3match The |:3match| command.
:3match The |:3match| command (but you
probably should not use it, it is
reserved for internal usage)
#event autocommand defined for this event
#event#pattern autocommand defined for this event and
pattern (the pattern is taken
@@ -2872,6 +2874,10 @@ fnamemodify({fname}, {mods}) *fnamemodify()*
/home/user/vim/vim/src
< If {mods} is empty or an unsupported modifier is used then
{fname} is returned.
When {fname} is empty then with {mods} ":h" returns ".", so
that `:cd` can be used with it. This is different from
expand('%:h') without a buffer name, which returns an empty
string.
Note: Environment variables don't work in {fname}, use
|expand()| first then.
@@ -5769,8 +5775,10 @@ matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
message will appear and the match will not be added. An ID
is specified as a positive integer (zero excluded). IDs 1, 2
and 3 are reserved for |:match|, |:2match| and |:3match|,
respectively. If the {id} argument is not specified or -1,
|matchadd()| automatically chooses a free ID.
respectively. 3 is reserved for use by the |matchparen|
plugin.
If the {id} argument is not specified or -1, |matchadd()|
automatically chooses a free ID.
The optional {dict} argument allows for further custom
values. Currently this is used to specify a match specific
@@ -7379,7 +7387,7 @@ search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
< When {stopline} is used and it is not zero this also implies
that the search does not wrap around the end of the file.
A zero value is equal to not giving the argument.
*E1285* *E1286* *E1287* *E1288* *E1289*
When the {timeout} argument is given the search stops when
more than this many milliseconds have passed. Thus when
{timeout} is 500 the search stops after half a second.
@@ -7471,7 +7479,7 @@ searchcount([{options}]) *searchcount()*
" to 1)
let result = searchcount()
<
The function is useful to add the count to |statusline|: >
The function is useful to add the count to 'statusline': >
function! LastSearchCount() abort
let result = searchcount(#{recompute: 0})
if empty(result)
@@ -9225,6 +9233,7 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
"underline" "1" if underlined
"undercurl" "1" if undercurled
"strike" "1" if strikethrough
"nocombine" "1" if nocombine
Returns an empty string on error.

View File

@@ -802,6 +802,8 @@ When the {string} starts with "\=" it is evaluated as an expression, see
|sub-replace-expression|. You can use that for complex replacement or special
characters.
The substitution is limited in recursion to 4 levels. *E1290*
Otherwise these characters in {string} have a special meaning:
*:s%*
When {string} is equal to "%" and '/' is included with the 'cpoptions' option,

View File

@@ -27,6 +27,7 @@ The Netbeans interface also uses a channel. |netbeans|
14. Using a prompt buffer |prompt-buffer|
15. Language Server Protocol |language-server-protocol|
*E1277*
{only when compiled with the |+channel| feature for channel stuff}
You can check this with: `has('channel')`
{only when compiled with the |+job| feature for job stuff}

View File

@@ -1147,6 +1147,8 @@ character that indicates the type of command-line being edited, see
Vim will be in Normal mode when the editor is opened, except when 'insertmode'
is set.
*E1292*
Once a command-line window is open it is not possible to open another one.
The height of the window is specified with 'cmdwinheight' (or smaller if there
is no room). The window is always full width and is positioned just above the

View File

@@ -21,6 +21,8 @@ main(int argc, char **argv)
char *p1, *p2;
char *p;
FILE *fd;
int len;
int in_example;
if (argc <= 1)
{
@@ -37,22 +39,28 @@ main(int argc, char **argv)
fprintf(stderr, "Unable to open %s for reading\n", argv[0]);
continue;
}
in_example = 0;
while (fgets(line, LINELEN, fd) != NULL)
{
p1 = strchr(line, '*'); /* find first '*' */
if (in_example)
{
// skip over example; non-blank in first column ends example
if (strchr(" \t\n\r", line[0]) != NULL)
continue;
in_example = 0;
}
p1 = strchr(line, '*'); // find first '*'
while (p1 != NULL)
{
p2 = strchr(p1 + 1, '*'); /* find second '*' */
if (p2 != NULL && p2 > p1 + 1) /* skip "*" and "**" */
p2 = strchr(p1 + 1, '*'); // find second '*'
if (p2 != NULL && p2 > p1 + 1) // skip "*" and "**"
{
for (p = p1 + 1; p < p2; ++p)
if (*p == ' ' || *p == '\t' || *p == '|')
break;
/*
* Only accept a *tag* when it consists of valid
* characters, there is white space before it and is
* followed by a white character or end-of-line.
*/
// Only accept a *tag* when it consists of valid
// characters, there is white space before it and is
// followed by a white character or end-of-line.
if (p == p2
&& (p1 == line || p1[-1] == ' ' || p1[-1] == '\t')
&& (strchr(" \t\n\r", p[1]) != NULL
@@ -63,18 +71,22 @@ main(int argc, char **argv)
printf("%s\t%s\t/*", p1, argv[0]);
while (*p1)
{
/* insert backslash before '\\' and '/' */
// insert backslash before '\\' and '/'
if (*p1 == '\\' || *p1 == '/')
putchar('\\');
putchar(*p1);
++p1;
}
printf("*\n");
p2 = strchr(p2 + 1, '*'); /* find next '*' */
p2 = strchr(p2 + 1, '*'); // find next '*'
}
}
p1 = p2;
}
len = strlen(line);
if ((len == 2 && strcmp(&line[len - 2], ">\n") == 0)
|| (len >= 3 && strcmp(&line[len - 3], " >\n") == 0))
in_example = 1;
}
fclose(fd);
}

View File

@@ -1399,7 +1399,7 @@ parenthesis), or any expression in parentheses: >
base->alist[idx](args)
base->(getFuncRef())(args)
Note that in the last call the base is passed to the function resulting from
"(getFuncRef())", inserted before "args".
"(getFuncRef())", inserted before "args". *E1275*
*E274*
"->name(" must not contain white space. There can be white space before the
@@ -1559,7 +1559,7 @@ allowing the inclusion of Vim script expressions (see |expr1|). Any
expression returning a value can be enclosed between curly braces. The value
is converted to a string. All the text and results of the expressions
are concatenated to make a new string.
*E1278*
*E1278* *E1279*
To include an opening brace '{' or closing brace '}' in the string content
double it. For double quoted strings using a backslash also works. A single
closing brace '}' will result in an error.
@@ -2005,6 +2005,8 @@ v:completed_item
|Dictionary| containing the |complete-items| for the most
recently completed word after |CompleteDone|. The
|Dictionary| is empty if the completion failed.
Note: Plugins can modify the value to emulate the builtin
|CompleteDone| event behavior.
*v:count* *count-variable*
v:count The count given for the last Normal mode command. Can be used
@@ -2680,7 +2682,7 @@ See |:verbose-cmd| for more information.
Define a new function by the name {name}. The body of
the function follows in the next lines, until the
matching |:endfunction|.
*E1267*
The name must be made of alphanumeric characters and
'_', and must start with a capital or "s:" (see
above). Note that using "b:" or "g:" is not allowed.

View File

@@ -143,6 +143,7 @@ variables can be used to overrule the filetype used for certain extensions:
*.asp g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax|
*.bas g:filetype_bas |ft-basic-syntax|
*.cfg g:filetype_cfg
*.cls g:filetype_cls
*.csh g:filetype_csh |ft-csh-syntax|
*.dat g:filetype_dat
*.frm g:filetype_frm |ft-form-syntax|
@@ -156,6 +157,7 @@ variables can be used to overrule the filetype used for certain extensions:
*.pp g:filetype_pp |ft-pascal-syntax|
*.prg g:filetype_prg
*.r g:filetype_r
*.sig g:filetype_sig
*.sql g:filetype_sql |ft-sql-syntax|
*.src g:filetype_src
*.sys g:filetype_sys
@@ -554,12 +556,30 @@ For further discussion of fortran_have_tabs and the method used for the
detection of source format see |ft-fortran-syntax|.
FREEBASIC *ft-freebasic-plugin*
This plugin aims to treat the four FreeBASIC dialects, "fb", "qb", "fblite"
and "deprecated", as distinct languages.
The dialect will be set to the first name found in g:freebasic_forcelang, any
#lang directive or $lang metacommand in the file being edited, or finally
g:freebasic_lang. These global variables conceptually map to the fbc options
-forcelang and -lang. If no dialect is explicitly specified "fb" will be
used.
For example, to set the dialect to a default of "fblite" but still allow for
any #lang directive overrides, use the following command: >
let g:freebasic_lang = "fblite"
GIT COMMIT *ft-gitcommit-plugin*
One command, :DiffGitCached, is provided to show a diff of the current commit
in the preview window. It is equivalent to calling "git diff --cached" plus
any arguments given to the command.
GPROF *ft-gprof-plugin*
The gprof filetype plugin defines a mapping <C-]> to jump from a function
@@ -569,6 +589,7 @@ to the details of that function in the call graph.
The mapping can be disabled with: >
let g:no_gprof_maps = 1
MAIL *ft-mail-plugin*
Options:

View File

@@ -506,7 +506,7 @@ documentation.
Assuming you have followed the dbext-tutorial you can press <C-C>t to
display a list of tables. There is a delay while dbext is creating the table
list. After the list is displayed press <C-W>. This will remove both the
popup window and the table name already chosen when the list became active. >
popup window and the table name already chosen when the list became active.
4.3.1 Table Completion: *sql-completion-tables*
@@ -514,7 +514,7 @@ Press <C-C>t to display a list of tables from within the database you
have connected via the dbext plugin.
NOTE: All of the SQL completion popups support typing a prefix before pressing
the key map. This will limit the contents of the popup window to just items
beginning with those characters. >
beginning with those characters.
4.3.2 Column Completion: *sql-completion-columns*
@@ -587,13 +587,13 @@ popup a list of columns for the customer table. It does this by looking back
to the beginning of the select statement and finding a list of the tables
specified in the FROM clause. In this case it notes that in the string
"customer c", "c" is an alias for the customer table. The optional "AS"
keyword is also supported, "customer AS c". >
keyword is also supported, "customer AS c".
4.3.3 Procedure Completion: *sql-completion-procedures*
Similar to the table list, <C-C>p, will display a list of stored
procedures stored within the database. >
procedures stored within the database.
4.3.4 View Completion: *sql-completion-views*

View File

@@ -679,6 +679,9 @@ Of these three, Vim uses PRIMARY when reading and writing the "* register
|'clipboard'| of "autoselect"), and CLIPBOARD when reading and writing the "+
register. Vim does not access the SECONDARY selection.
This applies both to the GUI and the terminal version. For non-X11 systems
the plus and the star register both use the system clipboard.
Examples: (assuming the default option values)
- Select a URL in Visual mode in Vim. Go to your browser and click the
middle mouse button in the URL text field. The selected text will be

View File

@@ -388,10 +388,10 @@ CTRL-G CTRL-J cursor one line down, insert start column *i_CTRL-G_CTRL-J*
CTRL-O execute one command, return to Insert mode *i_CTRL-O*
CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O*
CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L*
CTRL-G u break undo sequence, start new change *i_CTRL-G_u*
CTRL-G U don't break undo with next left/right cursor *i_CTRL-G_U*
movement, if the cursor stays within the
same line
CTRL-G u close undo sequence, start new change *i_CTRL-G_u*
CTRL-G U don't start a new undo block with the next *i_CTRL-G_U*
left/right cursor movement, if the cursor
stays within the same line
-----------------------------------------------------------------------
Note: If the cursor keys take you out of Insert mode, check the 'noesckeys'
@@ -428,8 +428,8 @@ that, with CTRL-O u. Another example: >
:inoremap <CR> <C-]><C-G>u<CR>
This breaks undo at each line break. It also expands abbreviations before
this.
This starts a new undo block at each line break. It also expands
abbreviations before this.
An example for using CTRL-G U: >
@@ -443,9 +443,9 @@ An example for using CTRL-G U: >
inoremap <expr> <End> repeat('<C-G>U<Right>', col('$') - col('.'))
inoremap ( ()<C-G>U<Left>
This makes it possible to use the cursor keys in Insert mode, without breaking
the undo sequence and therefore using |.| (redo) will work as expected.
Also entering a text like (with the "(" mapping from above):
This makes it possible to use the cursor keys in Insert mode, without starting
a new undo block and therefore using |.| (redo) will work as expected. Also
entering a text like (with the "(" mapping from above):
Lorem ipsum (dolor

View File

@@ -697,7 +697,8 @@ Q Switch to "Ex" mode. This is a bit like typing ":"
line-input editing commands (<Del> or <BS> to erase,
CTRL-U to kill the whole line).
Vim will enter this mode by default if it's invoked as
"ex" on the command-line.
"ex" on the command-line or the |-e| command line
argument was used.
Use the ":vi" command |:visual| to exit "Ex" mode.
Note: In older versions of Vim "Q" formatted text,
that is now done with |gq|. But if you use the
@@ -708,7 +709,7 @@ Q Switch to "Ex" mode. This is a bit like typing ":"
gQ Switch to "Ex" mode like with "Q", but really behave
like typing ":" commands after another. All command
line editing, completion etc. is available.
Use the ":vi" command |:visual| to exit "Ex" mode.
Use the `:vi` command (`:visual`) to exit "Ex" mode.
==============================================================================
7. The window contents *window-contents*

View File

@@ -374,15 +374,17 @@ command: it is executed as if an (unrestricted) |autocommand| was invoked.
<ScriptCmd> is like <Cmd> but sets the context to the script the mapping was
defined in, for the duration of the command execution. This is especially
useful for |Vim9| script. It also works to access an import, which is useful
in a plugin using an autoload script: >
in a plugin using a, possibly autoloaded, script: >
vim9script
import autoload 'implementation.vim' as impl
nnoremap <F4> <ScriptCmd>impl.DoTheWork()<CR>
<
No matter where <F4> is typed, the "impl" import will be found in the script
context of where the mapping was defined. And since it's an autoload import,
the "implementation.vim" script will only be loaded once <F4> is typed, not
when the mapping is defined.
context of where the mapping was defined. When it's an autoload import, as in
the example, the "implementation.vim" script will only be loaded once <F4> is
typed, not when the mapping is defined.
Without <ScriptCmd> using "s:impl" would result in "E121: Undefined variable".
Note:
- Because <Cmd> and <ScriptCmd> avoid mode-changes it does not trigger
@@ -680,19 +682,22 @@ two bytes 0xc3 0xa1. You don't want the 0xc3 byte to be mapped then or
otherwise it would be impossible to type the á character.
*<Leader>* *mapleader*
To define a mapping which uses the "mapleader" variable, the special string
"<Leader>" can be used. It is replaced with the string value of "mapleader".
If "mapleader" is not set or empty, a backslash is used instead. Example: >
:map <Leader>A oanother line<Esc>
To define a mapping which uses the "g:mapleader" variable, the special string
"<Leader>" can be used. It is replaced with the string value of
"g:mapleader". If "g:mapleader" is not set or empty, a backslash is used
instead. Example: >
map <Leader>A oanother line<Esc>
Works like: >
:map \A oanother line<Esc>
But after: >
:let mapleader = ","
map \A oanother line<Esc>
But after (legacy script): >
let mapleader = ","
Or (Vim9 script): >
g:mapleader = ","
It works like: >
:map ,A oanother line<Esc>
map ,A oanother line<Esc>
Note that the value of "mapleader" is used at the moment the mapping is
defined. Changing "mapleader" after that has no effect for already defined
Note that the value of "g:mapleader" is used at the moment the mapping is
defined. Changing "g:mapleader" after that has no effect for already defined
mappings.
*<LocalLeader>* *maplocalleader*
@@ -1721,10 +1726,10 @@ The valid escape sequences are
nothing. Supported modifiers are |:aboveleft|, |:belowright|,
|:botright|, |:browse|, |:confirm|, |:hide|, |:keepalt|,
|:keepjumps|, |:keepmarks|, |:keeppatterns|, |:leftabove|,
|:lockmarks|, |:noswapfile| |:rightbelow|, |:silent|, |:tab|,
|:topleft|, |:verbose|, and |:vertical|.
Note that these are not yet supported: |:noautocmd|,
|:sandbox| and |:unsilent|.
|:lockmarks|, |:noautocmd|, |:noswapfile| |:rightbelow|,
|:sandbox|, |:silent|, |:tab|, |:topleft|, |:unsilent|,
|:verbose|, and |:vertical|.
Note that |:filter| is not supported.
Examples: >
command! -nargs=+ -complete=file MyEdit
\ for f in expand(<q-args>, 0, 1) |

View File

@@ -1677,7 +1677,7 @@ A jump table for the options with a short description can be found at |Q_op|.
feature is included}
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
after that. Therefore do not append an item with += but use ^= to
prepend, e.g.: >
set clipboard^=unnamed
< These names are recognized:
@@ -1760,12 +1760,15 @@ A jump table for the options with a short description can be found at |Q_op|.
*'cmdheight'* *'ch'*
'cmdheight' 'ch' number (default 1)
global
global or local to tab page
Number of screen lines to use for the command-line. Helps avoiding
|hit-enter| prompts.
The value of this option is stored with the tab page, so that each tab
page can have a different value.
When 'cmdheight' is zero, there is no command-line unless it is being
used. Any messages will cause the |hit-enter| prompt.
*'cmdwinheight'* *'cwh'*
'cmdwinheight' 'cwh' number (default 7)
global
@@ -3376,22 +3379,24 @@ A jump table for the options with a short description can be found at |Q_op|.
*'fillchars'* *'fcs'*
'fillchars' 'fcs' string (default "vert:|,fold:-,eob:~")
global
global or local to window |global-local|
{not available when compiled without the |+folding|
feature}
Characters to fill the statuslines and vertical separators.
It is a comma-separated list of items:
Characters to fill the statuslines, vertical separators and special
lines in the window.
It is a comma-separated list of items. Each item has a name, a colon
and the value of that item:
item default Used for ~
stl:c ' ' or '^' statusline of the current window
stlnc:c ' ' or '=' statusline of the non-current windows
vert:c '|' vertical separators |:vsplit|
fold:c '-' filling 'foldtext'
foldopen:c '-' mark the beginning of a fold
foldclose:c '+' show a closed fold
foldsep:c '|' open fold middle character
diff:c '-' deleted lines of the 'diff' option
eob:c '~' empty lines below the end of a buffer
item name default Used for ~
stl ' ' or '^' statusline of the current window
stlnc ' ' or '=' statusline of the non-current windows
vert '|' vertical separators |:vsplit|
fold '-' filling 'foldtext'
foldopen '-' mark the beginning of a fold
foldclose '+' show a closed fold
foldsep '|' open fold middle character
diff '-' deleted lines of the 'diff' option
eob '~' empty lines below the end of a buffer
Any one that is omitted will fall back to the default. For "stl" and
"stlnc" the space will be used when there is highlighting, '^' or '='
@@ -3407,13 +3412,13 @@ A jump table for the options with a short description can be found at |Q_op|.
characters are not supported.
The highlighting used for these items:
item highlight group ~
stl:c StatusLine |hl-StatusLine|
stlnc:c StatusLineNC |hl-StatusLineNC|
vert:c VertSplit |hl-VertSplit|
fold:c Folded |hl-Folded|
diff:c DiffDelete |hl-DiffDelete|
eob:c EndOfBuffer |hl-EndOfBuffer|
item name highlight group ~
stl StatusLine |hl-StatusLine|
stlnc StatusLineNC |hl-StatusLineNC|
vert VertSplit |hl-VertSplit|
fold Folded |hl-Folded|
diff DiffDelete |hl-DiffDelete|
eob EndOfBuffer |hl-EndOfBuffer|
*'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
'fixendofline' 'fixeol' boolean (default on)
@@ -4211,7 +4216,10 @@ A jump table for the options with a short description can be found at |Q_op|.
b bold (termcap entry "md" and "me")
s standout (termcap entry "so" and "se")
u underline (termcap entry "us" and "ue")
c undercurl (termcap entry "Cs" and "Ce")
c undercurl (termcap entry "Us" and "Ce")
2 double underline (termcap entry "Ds" and "Ce")
d dotted underline (termcap entry "ds" and "Ce")
= dashed underline (termcap entry "Ds" and "Ce")
t strikethrough (termcap entry "Ts" and "Te")
n no highlighting
- no highlighting
@@ -4838,7 +4846,7 @@ A jump table for the options with a short description can be found at |Q_op|.
help. (Note that previously setting the global option to the empty
value did this, which is now deprecated.)
When the first character is ":", the command is invoked as a Vim
Ex command prefixed with [count].
Ex command with [count] added as an argument if it is not zero.
When "man", "man -s" or an Ex command is used, Vim will automatically
translate a count for the "K" command and pass it as the first
argument. For "man -s" the "-s" is removed when there is no count.
@@ -6441,9 +6449,11 @@ A jump table for the options with a short description can be found at |Q_op|.
45% relative position in the file
If 'rulerformat' is set, it will determine the contents of the ruler.
Each window has its own ruler. If a window has a status line, the
ruler is shown there. Otherwise it is shown in the last line of the
screen. If the statusline is given by 'statusline' (i.e. not empty),
this option takes precedence over 'ruler' and 'rulerformat'
ruler is shown there. If a window doesn't have a status line and
'cmdheight' is zero, the ruler is not shown. Otherwise it is shown in
the last line of the screen. If the statusline is given by
'statusline' (i.e. not empty), this option takes precedence over
'ruler' and 'rulerformat'.
If the number of characters displayed is different from the number of
bytes in the text (e.g., for a TAB or a multibyte character), both
the text column (byte number) and the screen column are shown,
@@ -7093,6 +7103,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|+cmdline_info| feature}
Show (partial) command in the last line of the screen. Set this
option off if your terminal is slow.
The option has no effect when 'cmdheight' is zero.
In Visual mode the size of the selected area is shown:
- When selecting characters within a line, the number of characters.
If the number of bytes is different it is also displayed: "2-6"
@@ -7142,6 +7153,7 @@ A jump table for the options with a short description can be found at |Q_op|.
If in Insert, Replace or Visual mode put a message on the last line.
Use the 'M' flag in 'highlight' to set the type of highlighting for
this message.
The option has no effect when 'cmdheight' is zero.
When |XIM| may be used the message will include "XIM". But this
doesn't mean XIM is really active, especially when 'imactivatekey' is
not set.

View File

@@ -928,7 +928,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
becomes invalid. Vim doesn't automatically update the matches.
Similar to moving the cursor for "\%#" |/\%#|.
*/\%l* */\%>l* */\%<l* *E951* *E1204*
*/\%l* */\%>l* */\%<l* *E951* *E1204* *E1273*
\%23l Matches in a specific line.
\%<23l Matches above a specific line (lower line number).
\%>23l Matches below a specific line (higher line number).

View File

@@ -3918,7 +3918,7 @@ netrw:
* Installed |g:netrw_clipboard| setting
* Installed option bypass for |'guioptions'|
a/A settings
* Changed popup_beval() to |popup_atcursor|()
* Changed popup_beval() to |popup_atcursor()|
in netrw#ErrorMsg (lacygoill). Apparently
popup_beval doesn't reliably close the
popup when the mouse is moved.

View File

@@ -591,7 +591,7 @@ POPUP_CREATE() ARGUMENTS *popup_create-arguments*
The first argument of |popup_create()| (and the second argument to
|popup_settext()|) specifies the text to be displayed, and optionally text
properties. It is in one of four forms:
properties. It is in one of four forms: *E1284*
- a buffer number
- a string
- a list of strings

View File

@@ -568,6 +568,9 @@ pattern is used.
The |:Lfilter| command does the same as |:Cfilter| but operates on the current
location list.
The current quickfix/location list is not modified by these commands, so you
can go back to the unfiltered list using the |:colder|/|:lolder| command.
=============================================================================
2. The error window *quickfix-window*

View File

@@ -231,7 +231,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
Examples: >
:4,5source
:10,18source ++clear
<
*:source!*
:so[urce]! {file} Read Vim commands from {file}. These are commands
that are executed from Normal mode, like you type

View File

@@ -103,7 +103,7 @@ zuW *zuG* *zuW*
zuG Undo |zW| and |zG|, remove the word from the internal
word list. Count used as with |zg|.
*:spe* *:spellgood*
*:spe* *:spellgood* *E1280*
:[count]spe[llgood] {word}
Add {word} as a good word to 'spellfile', like with
|zg|. Without count the first name is used, with a

View File

@@ -1694,6 +1694,21 @@ because Fortran90 has no reserved words.
For further information related to fortran, see |ft-fortran-indent| and
|ft-fortran-plugin|.
FREEBASIC *freebasic.vim* *ft-freebasic-syntax*
FreeBASIC files will be highlighted differently for each of the four available
dialects, "fb", "qb", "fblite" and "deprecated". See |ft-freebasic-plugin|
for how to select the correct dialect.
Highlighting is further configurable via the following variables.
Variable Highlight ~
*freebasic_no_comment_fold* disable multiline comment folding
*freebasic_operators* non-alpha operators
*freebasic_space_errors* trailing white space and spaces before a <Tab>
*freebasic_type_suffixes* QuickBASIC style type suffixes
FVWM CONFIGURATION FILES *fvwm.vim* *ft-fvwm-syntax*
@@ -5002,14 +5017,18 @@ the same syntax file on all terminals, and use the optimal highlighting.
1. highlight arguments for normal terminals
*bold* *underline* *undercurl*
*inverse* *italic* *standout*
*nocombine* *strikethrough*
*underdouble* *underdotted*
*underdashed* *inverse* *italic*
*standout* *nocombine* *strikethrough*
term={attr-list} *attr-list* *highlight-term* *E418*
attr-list is a comma-separated list (without spaces) of the
following items (in any order):
bold
underline
undercurl not always available
underdouble not always available
underdotted not always available
underdashed not always available
strikethrough not always available
reverse
inverse same as reverse
@@ -5020,6 +5039,7 @@ term={attr-list} *attr-list* *highlight-term* *E418*
Note that "bold" can be used here and by using a bold font. They
have the same effect.
*underline-codes*
"undercurl" is a curly underline. When "undercurl" is not possible
then "underline" is used. In general "undercurl" and "strikethrough"
are only available in the GUI and some terminals. The color is set
@@ -5028,6 +5048,17 @@ term={attr-list} *attr-list* *highlight-term* *E418*
let &t_Cs = "\e[4:3m"
let &t_Ce = "\e[4:0m"
< "underdouble" is a double underline, "underdotted" is a dotted
underline and "underdashed" is a dashed underline. These are only
supported by some terminals. If your terminal supports them you may
have to specify the codes like this: >
let &t_Us = "\e[4:2m"
let &t_ds = "\e[4:4m"
let &t_Ds = "\e[4:5m"
< They are reset with |t_Ce|, the same as curly underline (undercurl).
When t_Us, t_ds or t_Ds is not set then underline will be used as a
fallback.
start={term-list} *highlight-start* *E422*
stop={term-list} *term-list* *highlight-stop*

View File

@@ -988,6 +988,7 @@ $quote eval.txt /*$quote*
't_Co' term.txt /*'t_Co'*
't_Cs' term.txt /*'t_Cs'*
't_DL' term.txt /*'t_DL'*
't_Ds' term.txt /*'t_Ds'*
't_EC' term.txt /*'t_EC'*
't_EI' term.txt /*'t_EI'*
't_F1' term.txt /*'t_F1'*
@@ -1044,6 +1045,7 @@ $quote eval.txt /*$quote*
't_TI' term.txt /*'t_TI'*
't_Te' term.txt /*'t_Te'*
't_Ts' term.txt /*'t_Ts'*
't_Us' term.txt /*'t_Us'*
't_VS' term.txt /*'t_VS'*
't_WP' term.txt /*'t_WP'*
't_WS' term.txt /*'t_WS'*
@@ -1059,6 +1061,7 @@ $quote eval.txt /*$quote*
't_da' term.txt /*'t_da'*
't_db' term.txt /*'t_db'*
't_dl' term.txt /*'t_dl'*
't_ds' term.txt /*'t_ds'*
't_fd' term.txt /*'t_fd'*
't_fe' term.txt /*'t_fe'*
't_fs' term.txt /*'t_fs'*
@@ -4065,10 +4068,12 @@ E1079 vim9.txt /*E1079*
E108 eval.txt /*E108*
E1080 vim9.txt /*E1080*
E1081 eval.txt /*E1081*
E1082 vim9.txt /*E1082*
E1083 editing.txt /*E1083*
E1084 eval.txt /*E1084*
E1085 eval.txt /*E1085*
E1087 vim9.txt /*E1087*
E1088 vim9.txt /*E1088*
E1089 eval.txt /*E1089*
E109 eval.txt /*E109*
E1090 eval.txt /*E1090*
@@ -4266,17 +4271,36 @@ E1263 eval.txt /*E1263*
E1264 vim9.txt /*E1264*
E1265 eval.txt /*E1265*
E1266 if_pyth.txt /*E1266*
E1267 eval.txt /*E1267*
E1268 vim9.txt /*E1268*
E1269 vim9.txt /*E1269*
E127 eval.txt /*E127*
E1270 change.txt /*E1270*
E1271 vim9.txt /*E1271*
E1272 vim9.txt /*E1272*
E1273 pattern.txt /*E1273*
E1274 cmdline.txt /*E1274*
E1275 eval.txt /*E1275*
E1276 builtin.txt /*E1276*
E1277 channel.txt /*E1277*
E1278 eval.txt /*E1278*
E1279 eval.txt /*E1279*
E128 eval.txt /*E128*
E1280 spell.txt /*E1280*
E1281 pattern.txt /*E1281*
E1282 eval.txt /*E1282*
E1283 eval.txt /*E1283*
E1284 popup.txt /*E1284*
E1285 builtin.txt /*E1285*
E1286 builtin.txt /*E1286*
E1287 builtin.txt /*E1287*
E1288 builtin.txt /*E1288*
E1289 builtin.txt /*E1289*
E129 eval.txt /*E129*
E1290 change.txt /*E1290*
E1291 testing.txt /*E1291*
E1292 cmdline.txt /*E1292*
E1293 textprop.txt /*E1293*
E13 message.txt /*E13*
E131 eval.txt /*E131*
E132 eval.txt /*E132*
@@ -6875,6 +6899,11 @@ format-formatexpr change.txt /*format-formatexpr*
formatting change.txt /*formatting*
forth.vim syntax.txt /*forth.vim*
fortran.vim syntax.txt /*fortran.vim*
freebasic.vim syntax.txt /*freebasic.vim*
freebasic_no_comment_fold syntax.txt /*freebasic_no_comment_fold*
freebasic_operators syntax.txt /*freebasic_operators*
freebasic_space_errors syntax.txt /*freebasic_space_errors*
freebasic_type_suffixes syntax.txt /*freebasic_type_suffixes*
friendship intro.txt /*friendship*
frombook usr_01.txt /*frombook*
ft-abel-syntax syntax.txt /*ft-abel-syntax*
@@ -6931,6 +6960,8 @@ ft-forth-syntax syntax.txt /*ft-forth-syntax*
ft-fortran-indent indent.txt /*ft-fortran-indent*
ft-fortran-plugin filetype.txt /*ft-fortran-plugin*
ft-fortran-syntax syntax.txt /*ft-fortran-syntax*
ft-freebasic-plugin filetype.txt /*ft-freebasic-plugin*
ft-freebasic-syntax syntax.txt /*ft-freebasic-syntax*
ft-fvwm-syntax syntax.txt /*ft-fvwm-syntax*
ft-gitcommit-plugin filetype.txt /*ft-gitcommit-plugin*
ft-gprof-plugin filetype.txt /*ft-gprof-plugin*
@@ -7871,6 +7902,7 @@ if_sniff.txt if_sniff.txt /*if_sniff.txt*
if_tcl.txt if_tcl.txt /*if_tcl.txt*
ignore-errors eval.txt /*ignore-errors*
ignore-timestamp editing.txt /*ignore-timestamp*
import-legacy vim9.txt /*import-legacy*
improved-autocmds-5.4 version5.txt /*improved-autocmds-5.4*
improved-quickfix version5.txt /*improved-quickfix*
improved-sessions version5.txt /*improved-sessions*
@@ -8060,6 +8092,7 @@ lcs-space options.txt /*lcs-space*
lcs-tab options.txt /*lcs-tab*
lcs-trail options.txt /*lcs-trail*
left-right-motions motion.txt /*left-right-motions*
legacy-import vim9.txt /*legacy-import*
len() builtin.txt /*len()*
less various.txt /*less*
letter print.txt /*letter*
@@ -9726,6 +9759,7 @@ t_Ce term.txt /*t_Ce*
t_Co term.txt /*t_Co*
t_Cs term.txt /*t_Cs*
t_DL term.txt /*t_DL*
t_Ds term.txt /*t_Ds*
t_EC term.txt /*t_EC*
t_EI term.txt /*t_EI*
t_F1 term.txt /*t_F1*
@@ -9782,6 +9816,7 @@ t_TE term.txt /*t_TE*
t_TI term.txt /*t_TI*
t_Te term.txt /*t_Te*
t_Ts term.txt /*t_Ts*
t_Us term.txt /*t_Us*
t_VS term.txt /*t_VS*
t_WP term.txt /*t_WP*
t_WS term.txt /*t_WS*
@@ -9808,6 +9843,7 @@ t_da term.txt /*t_da*
t_db term.txt /*t_db*
t_dict-variable eval.txt /*t_dict-variable*
t_dl term.txt /*t_dl*
t_ds term.txt /*t_ds*
t_ed version4.txt /*t_ed*
t_el version4.txt /*t_el*
t_f1 version4.txt /*t_f1*
@@ -10204,11 +10240,16 @@ u undo.txt /*u*
uganda uganda.txt /*uganda*
uganda.txt uganda.txt /*uganda.txt*
undercurl syntax.txt /*undercurl*
underdashed syntax.txt /*underdashed*
underdotted syntax.txt /*underdotted*
underdouble syntax.txt /*underdouble*
underline syntax.txt /*underline*
underline-codes syntax.txt /*underline-codes*
undo undo.txt /*undo*
undo-blocks undo.txt /*undo-blocks*
undo-branches undo.txt /*undo-branches*
undo-break undo.txt /*undo-break*
undo-close-block undo.txt /*undo-close-block*
undo-commands undo.txt /*undo-commands*
undo-persistence undo.txt /*undo-persistence*
undo-redo undo.txt /*undo-redo*
@@ -10674,6 +10715,7 @@ vimscript-versions eval.txt /*vimscript-versions*
vimtutor usr_01.txt /*vimtutor*
virtcol() builtin.txt /*virtcol()*
virtcol2col() builtin.txt /*virtcol2col()*
virtual-text textprop.txt /*virtual-text*
visual-block visual.txt /*visual-block*
visual-change visual.txt /*visual-change*
visual-examples visual.txt /*visual-examples*

View File

@@ -372,8 +372,11 @@ OUTPUT CODES *terminal-output-codes*
Added by Vim (there are no standard codes for these):
t_AU set underline color (ANSI) *t_AU* *'t_AU'*
t_Ce undercurl end *t_Ce* *'t_Ce'*
t_Cs undercurl mode *t_Cs* *'t_Cs'*
t_Ce undercurl and underline end *t_Ce* *'t_Ce'*
t_Cs undercurl (curly underline) mode *t_Cs* *'t_Cs'*
t_Us double underline mode *t_Us* *'t_Us'*
t_ds dotted underline mode *t_ds* *'t_ds'*
t_Ds dashed underline mode *t_Ds* *'t_Ds'*
t_Te strikethrough end *t_Te* *'t_Te'*
t_Ts strikethrough mode *t_Ts* *'t_Ts'*
t_IS set icon text start *t_IS* *'t_IS'*
@@ -630,10 +633,13 @@ When the GUI is running 't_Co' is set to 16777216.
*termcap-cursor-shape* *termcap-cursor-color*
When Vim enters Insert mode the 't_SI' escape sequence is sent. When Vim
enters Replace mode the 't_SR' escape sequence is sent if it is set, otherwise
't_SI' is sent. When leaving Insert mode or Replace mode 't_EI' is used. This
can be used to change the shape or color of the cursor in Insert or Replace
mode. These are not standard termcap/terminfo entries, you need to set them
yourself.
't_SI' is sent. When leaving Insert mode or Replace mode 't_EI' is used.
Note: When 't_EI' is not set then 't_SI' and 't_SR' will not be sent. And
when 't_SI' or 't_SR' is not set then 't_EI' is sent only once.
This can be used to change the shape or color of the cursor in Insert or
Replace mode. These are not standard termcap/terminfo entries, you need to set
them yourself.
Example for an xterm, this changes the color of the cursor: >
if &term =~ "xterm"
let &t_SI = "\<Esc>]12;purple\x7"

View File

@@ -94,6 +94,7 @@ test_gui_event({event}, {args})
"findrepl" search and replace text.
"mouse" mouse button click event.
"scrollbar" move or drag the scrollbar.
"sendevent" send a low-level GUI event.
"tabline" select a tab page by mouse click.
"tabmenu" select a tabline menu entry.
@@ -177,6 +178,16 @@ test_gui_event({event}, {args})
dragging: 1 to drag the scrollbar and 0 to click in the
scrollbar.
"sendevent":
Send a low-level GUI event (e.g. key-up or down).
Currently only supported on MS-Windows.
The supported items in {args} are:
event: The supported string values are:
keyup generate a keyup event
keydown generate a keydown event
keycode: Keycode to use for a keyup or a keydown event.
*E1291*
"tabline":
Inject a mouse click event on the tabline to select a
tabpage. The supported items in {args} are:
@@ -268,6 +279,9 @@ test_override({name}, {val}) *test_override()*
Current supported values for {name} are:
{name} effect when {val} is non-zero ~
alloc_lines make a copy of every buffer line into allocated
memory, so that memory access errors can be found
by valgrind
autoload `import autoload` will load the script right
away, not postponed until an item is used
char_avail disable the char_avail() function
@@ -287,7 +301,8 @@ test_override({name}, {val}) *test_override()*
uptime overrules sysinfo.uptime
vterm_title setting the window title by a job running in a
terminal window
ALL clear all overrides ({val} is not used)
ALL clear all overrides, except alloc_lines ({val} is
not used)
"starting" is to be used when a test should behave like
startup was done. Since the tests are run by sourcing a

View File

@@ -137,7 +137,11 @@ prop_add({lnum}, {col}, {props})
bufnr buffer to add the property to; when omitted
the current buffer is used
id user defined ID for the property; must be a
number; when omitted zero is used
number, should be positive; when using "text"
then "id" must not be present and will be set
automatically to a negative number; otherwise
zero is used
text text to be displayed at {col}
type name of the text property type
All fields except "type" are optional.
@@ -157,6 +161,18 @@ prop_add({lnum}, {col}, {props})
"type" will first be looked up in the buffer the property is
added to. When not found, the global property types are used.
If not found an error is given.
*virtual-text*
When "text" is used this text will be displayed at the start
location of the text property. The text of the buffer line
will be shifted to make room. This is called "virtual text".
The text will be displayed but it is not part of the actual
buffer line, the cursor cannot be placed on it. A mouse click
in the text will move the cursor to the first character after
the text.
A negative "id" will be chosen and is returned. Once a
property with "text" has been added for a buffer then using a
negative "id" for any other property will give an error:
*E1293*
Can also be used as a |method|: >
GetLnum()->prop_add(col, props)
@@ -181,6 +197,9 @@ prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
two items {end-lnum} and {end-col} specify the position just
after the text.
It is not possible to add a text property with a "text" field
here.
Example:
call prop_add_list(#{type: 'MyProp', id: 2},
\ [[1, 4, 1, 7],

View File

@@ -38,8 +38,25 @@ browser use: https://github.com/vim/vim/issues/1234
*known-bugs*
-------------------- Known bugs and current work -----------------------
Prepare for the Vim 9.0 release:
- Update version number in help
PR to consider:
- stricter parsing for has('patch-x.y.z') #10752
- cmdheight=0 #10675 Does it work properly?
- add splitscroll #10682 Useful? Any trouble? Null Chilly says it's OK.
suggestion: names instead of numbers for the option value
problem depending on whether window is focused or not
Support virtual text: #7553
- Remove and free text when textprop is removed with negative ID.
- "gj" does not work correctly
- no virtual text when 'signcolumn' is set to "yes" #10794
- placement at the end of the line: after the text (text_align: "end"), right
aligned (text_align: "right"); choice: truncate when not enough space or
wrap to next line (text_wrap: "yes"); Also: fill with space to text wraps to
start of next screen line (text_align: "below")
Also consider an empty line, should fix #10786. Also check inserting text.
- win_lbr_chartabsize() TODO item: count screen cells
- wrong cursor position (Yegappan, July 27)
- many tests
Further Vim9 improvements, possibly after launch:
- Use Vim9 for more runtime files.
@@ -71,10 +88,16 @@ Further Vim9 improvements, possibly after launch:
- Implement as part of an expression: ++expr, --expr, expr++, expr--.
Update list of features to vote on:
- multiple cursors
- built-in LSP support
- virtual text, using text properties
- start first line halfway, scroll per screen line
- Remove Athena item (won't happen)
- Remove "add open mode" (won't happen)
- Remove "editing of a hidden buffer" (done)
- Change "add IDE features" to "improve terminal debugger"
- Change "diff/merge capability for CVS" to "CVS and git"
- Remove "pre-compile them" from "improve the performance of Vim scripts"
- Add: multiple cursors, edit text in more than one place at a time
- Add: fast syntax highlighting with parser instead of regex patterns
- Add: virtual text, text properties can insert text in the line
- Add: start first line halfway, scroll per wrapped screen line
Popup windows:
- Preview popup not properly updated when it overlaps with completion menu.
@@ -120,8 +143,6 @@ Text properties:
if the priority is above a certain value? (#7392)
Combining text property with 'cursorline' does not always work (Billie
Cleek, #5533)
- "C" works OK. "dd" fails to delete text property in a buffer with a single
line.
- Add text property that shifts text to make room for annotation (e.g.
variable type). Like the opposite of conceal. Requires fixing the cursor
positioning and mouse clicks as with conceal mode.
@@ -201,19 +222,8 @@ Terminal emulator window:
conversions.
Patches considered for including:
- make functions static if possible, add a few tests. #10612
- use ngettext() in a few more places #10606
- move f_hasmapto() to map.c #10611
- Add "-n" option to xxd. #10599 needs a test
- allow for nesting of timeout, sketch in #10595
- Add "-n" option to xxd. #10599
- Add support for "underdouble", "underdot" and "underdash". #9553
- Patch to implement the vimtutor with a plugin: #6414
Was originally written by Felipe Morales.
- Patch to make fillchars global-local. (#5206)
- Version of getchar() that does not move the cursor - #10603
Use a separate argument for the new flag.
- Improved VB filetype detection. (Doug Kearns, June 26)
- Improved FreeBasic runtime files (and a second one). (Doug Kearns, June 26)
Autoconf: must use autoconf 2.69, later version generates lots of warnings
- try using autoconf 2.71 and fix all "obsolete" warnings
@@ -234,8 +244,17 @@ entry separately. #6609
Multiplexers (screen, tmux) can request it to the underlying terminal, and
pass it on with modifications.
Using "A" and "o" in manually created fold (in empty buffer) does not behave
consistenly (James McCoy, #10698)
When scheme can't be found by configure there is no clear "not found" message:
configure:5769: checking MzScheme install prefix
configure:5781: result:
Can "CSI nr X" be used instead of outputting spaces? Is it faster? #8002
Typed keys invisible after calling interrupt() from a timer. #10631
With a window height of 6 and 'scrolloff' set to 3, using "j" does not scroll
evenly. (#10545) Need to handle this in scroll_cursor_bot().
@@ -254,6 +273,9 @@ The line number can be obtained from win->w_lines[].
MS-Windows: did path modifier :p:8 stop working? #8600
Version of getchar() that does not move the cursor - #10603 Use a separate
argument for the new flag.
test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
Information for a specific terminal (e.g. gnome, tmux, konsole, alacritty) is
@@ -295,6 +317,8 @@ inconsistent with the documentation.
globpath() does not use 'wildignorecase' at all? (related to #8350)
mksession uses :buffer instead of :edit in one place but not another. #10629
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
with 'termguicolors'. #1740
@@ -1163,9 +1187,6 @@ cmap using execute() has side effects. (Killthemule, 2016 Aug 17, #983)
Patch to order results from taglist(). (Duncan McDougall, 2016 Oct 25)
Syntax highlighting for messages with RFC3339 timestamp (#946)
Did maintainer reply?
ml_get errors when reloading file. (Chris Desjardins, 2016 Apr 19)
Also with latest version.
@@ -3761,7 +3782,10 @@ Printing:
Syntax highlighting:
Long term goal: faster, better, etc. Options:
- use treesitter, NeoVim uses it - Many people don't like it.
- use TextMate, vscode uses it. #9087 - possibly a long term solution
- use TextMate, vscode uses it. #9087 - Other people don't like it.
Vscode is asked to switch to treesitter:
https://github.com/microsoft/vscode/issues/50140
- sublime grammar?
8 Make ":syn off" use 'runtimepath' instead of $VIMRUNTIME. (Gary Johnson)
Should do the same for ":syn on" and ":syn manual".
8 Support "containedin" argument for ":syn include", so that the defined
@@ -4423,6 +4447,8 @@ GUI:
Autocommands:
9 Add WinNewPre - before creating a new window. #10635
9 When triggering WinNew provide the window ID somehow. #10633
9 Rework the code from FEAT_OSFILETYPE for autocmd-osfiletypes to use
'filetype'. Only for when the current buffer is known.
- Put autocommand event names in a hashtable for faster lookup?

View File

@@ -105,13 +105,13 @@ change again. But you can do something like this: >
After this a "u" command will undo the delete command and the previous
change.
*undo-break*
To do the opposite, break a change into two undo blocks, in Insert mode use
CTRL-G u. This is useful if you want an insert command to be undoable in
*undo-break* *undo-close-block*
To do the opposite, use a new undo block for the next change, in Insert mode
use CTRL-G u. This is useful if you want an insert command to be undoable in
parts. E.g., for each sentence. |i_CTRL-G_u|
Setting the value of 'undolevels' also breaks undo. Even when the new value
is equal to the old value. In |Vim9| script: >
Setting the value of 'undolevels' also closes the undo block. Even when the
new value is equal to the old value. In |Vim9| script: >
&undolevels = &undolevels
In legacy script: >
let &undolevels = &undolevels

View File

@@ -145,6 +145,17 @@ Do not start a comment with #{, it looks like the legacy dictionary literal
and produces an error where this might be confusing. #{{ or #{{{ are OK,
these can be used to start a fold.
When starting to read a script file Vim doesn't know it is |Vim9| script until
the `vim9script` command is found. Until that point you would need to use
legacy comments: >
" legacy comment
vim9script
# Vim9 comment
That looks ugly, better put `vim9script` in the very first line: >
vim9script
# Vim9 comment
In legacy Vim script # is also used for the alternate file name. In Vim9
script you need to use %% instead. Instead of ## use %%% (stands for all
arguments).
@@ -270,7 +281,7 @@ start with an upper case letter even when using the "s:" prefix. In legacy
script "s:funcref" could be used, because it could not be referred to with
"funcref". In Vim9 script it can, therefore "s:Funcref" must be used to avoid
that the name interferes with builtin functions.
*vim9-s-namespace*
*vim9-s-namespace* *E1268*
The use of the "s:" prefix is not supported at the Vim9 script level. All
functions and variables without a prefix are script-local.
@@ -846,6 +857,8 @@ No curly braces expansion ~
Command modifiers are not ignored ~
*E1176*
Using a command modifier for a command that does not use it gives an error.
*E1082*
Also, using a command modifier without a following command is now an error.
Dictionary literals ~
@@ -1223,6 +1236,9 @@ variables can be accessed without the "s:" prefix. They must be defined
before the function is compiled. If the script the function is defined in is
legacy script, then script-local variables must be accessed with the "s:"
prefix if they do not exist at the time of compiling.
*E1269*
Script-local variables in a |Vim9| script must be declared at the script
level. They cannot be created in a function, also not in a legacy function.
*:defc* *:defcompile*
:defc[ompile] Compile functions defined in the current script that
@@ -1481,6 +1497,8 @@ value is not actually changed. If you need to change the type, e.g. to change
it to a string, use the |string()| function. Or use |str2nr()| to convert a
string to a number.
If a type is given where it is not expected you can get *E1272* .
Type inference ~
*type-inference*
@@ -1685,23 +1703,36 @@ be exported. {not implemented yet: class, interface}
Import ~
*:import* *:imp* *E1094* *E1047* *E1262*
*E1048* *E1049* *E1053* *E1071* *E1236*
The exported items can be imported in another Vim9 script: >
*:import* *:imp* *E1094* *E1047* *E1262*
*E1048* *E1049* *E1053* *E1071* *E1088* *E1236*
The exported items can be imported in another script. The import syntax has
two forms. The simple form: >
import {filename}
<
Where {filename} is an expression that must evaluate to a string. In this
form the filename should end in ".vim" and the portion before ".vim" will
become the script local name of the namespace. For example: >
import "myscript.vim"
This makes each item available as "myscript.item".
<
This makes each exported item in "myscript.vim" available as "myscript.item".
*:import-as* *E1257* *E1261*
In case the name is long or ambiguous, another name can be specified: >
import "thatscript.vim" as that
In case the name is long or ambiguous, this form can be used to specify
another name: >
import {longfilename} as {name}
<
In this form {name} becomes a specific script local name for the imported
namespace. Therefore {name} must consist of letters, digits and '_', like
|internal-variables|. The {longfilename} expression must evaluate to any
filename. For example: >
import "thatscript.vim.v2" as that
< *E1060* *E1258* *E1259* *E1260*
Then you can use "that.EXPORTED_CONST", "that.someValue", etc. You are free
to choose the name "that". Use something that will be recognized as referring
to the imported script. Avoid command names, command modifiers and builtin
function names, because the name will shadow them.
If the name starts with a capital letter it can also shadow global user
commands and functions. Also, you cannot use the name for something else in
the script, such as a function or variable name.
Then you can use "that.item", etc. You are free to choose the name "that".
Use something that will be recognized as referring to the imported script.
Avoid command names, command modifiers and builtin function names, because the
name will shadow them. Better not start the name starts with a capital
letter, since it can then also shadow global user commands and functions.
Also, you cannot use the name for something else in the script, such as a
function or variable name.
In case the dot in the name is undesired, a local reference can be made for a
function: >
@@ -1714,15 +1745,6 @@ This does not work for variables, since the value would be copied once and
when changing the variable the copy will change, not the original variable.
You will need to use the full name, with the dot.
The full syntax of the command is:
import {filename} [as {name}]
Where {filename} is an expression that must evaluate to a string. Without the
"as {name}" part it must end in ".vim". {name} must consist of letters,
digits and '_', like |internal-variables|.
`:import` can also be used in legacy Vim script. The imported items still
become script-local, even when the "s:" prefix is not given.
`:import` can not be used in a function. Imported items are intended to exist
at the script level and only imported once.
@@ -1752,14 +1774,38 @@ line, there can be no line break: >
echo that
.name # Error!
To refer to a function in an imported script in a mapping, |<SID>| can be
used: >
When you've imported a function from one script into a vim9 script you can
refer to the imported function in a mapping by prefixing it with |<SID>|: >
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.
An even simpler solution is using |<ScriptCmd>|: >
noremap ,a <ScriptCmd>name.Function()<CR>
Note that this does not work for variables, only for functions.
*import-legacy* *legacy-import*
`:import` can also be used in legacy Vim script. The imported namespace still
becomes script-local, even when the "s:" prefix is not given. For example: >
import "myfile.vim"
call s:myfile.MyFunc()
And using the "as name" form: >
import "otherfile.vim9script" as that
call s:that.OtherFunc()
However, the namespace cannot be resolved on it's own: >
import "that.vim"
echo s:that
" ERROR: E1060: Expected dot after name: s:that
<
This also affects the use of |<SID>| in the legacy mapping context. Since
|<SID>| is only a valid prefix for a function and NOT for a namespace, you
cannot use it
to scope a function in a script local namespace. Instead of prefixing the
function with |<SID>| you should use|<ScriptCmd>|. For example: >
noremap ,a <ScriptCmd>:call s:that.OtherFunc()<CR>
<
*:import-cycle*
The `import` commands are executed when encountered. If script A imports

View File

@@ -113,6 +113,10 @@ Stop after writing
.RI < len >
octets.
.TP
.I "\-n name " | " \-name name"
Override the variable name output when \-i is used. The array is named
\fIname\fP and the length is named \fIname\fP_len.
.TP
.I \-o offset
Add
.RI < offset >

View File

@@ -46,7 +46,7 @@ OPTIONS
long line of output.
-C | -capitalize
Capitalize variable names in C include file style, when using
Capitalize variable names in C include file style, when using
-i.
-E | -EBCDIC
@@ -57,28 +57,32 @@ OPTIONS
-e Switch to little-endian hexdump. This option treats byte groups
as words in little-endian byte order. The default grouping of 4
bytes may be changed using -g. This option only applies to hex
dump, leaving the ASCII (or EBCDIC) representation unchanged.
dump, leaving the ASCII (or EBCDIC) representation unchanged.
The command line switches -r, -p, -i do not work with this mode.
-g bytes | -groupsize bytes
Separate the output of every <bytes> bytes (two hex characters
Separate the output of every <bytes> bytes (two hex characters
or eight bit-digits each) by a whitespace. Specify -g 0 to sup
press grouping. <Bytes> defaults to 2 in normal mode, 4 in lit
tle-endian mode and 1 in bits mode. Grouping does not apply to
tle-endian mode and 1 in bits mode. Grouping does not apply to
postscript or include style.
-h | -help
Print a summary of available commands and exit. No hex dumping
Print a summary of available commands and exit. No hex dumping
is performed.
-i | -include
Output in C include file style. A complete static array defini
tion is written (named after the input file), unless xxd reads
Output in C include file style. A complete static array defini
tion is written (named after the input file), unless xxd reads
from stdin.
-l len | -len len
Stop after writing <len> octets.
-n name | -name name
Override the variable name output when -i is used. The array is
named name and the length is named name_len.
-o offset
Add <offset> to the displayed file position.
@@ -91,8 +95,8 @@ OPTIONS
not writing to stdout, xxd writes into its output file without
truncating it. Use the combination -r -p to read plain hexadeci
mal dumps without line number information and without a particu
lar column layout. Additional Whitespace and line-breaks are
allowed anywhere.
lar column layout. Additional Whitespace and line-breaks are al
lowed anywhere.
-seek offset
When used after -r: revert with <offset> added to file positions
@@ -209,8 +213,8 @@ EXAMPLES
*
000fffc: 0000 0000 40 ....A
Create a 1 byte file containing a single 'A' character. The number
after '-r -s' adds to the linenumbers found in the file; in effect, the
Create a 1 byte file containing a single 'A' character. The number af
ter '-r -s' adds to the linenumbers found in the file; in effect, the
leading bytes are suppressed.
% echo "010000: 41" | xxd -r -s -0x10000 > file

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Jun 03
" Last Change: 2022 Jul 5
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -252,11 +252,14 @@ au BufNewFile,BufRead *.db call dist#ft#BindzoneCheck('')
" Blank
au BufNewFile,BufRead *.bl setf blank
" Bitbake
au BufNewFile,BufRead *.bb,*.bbappend,*.bbclass,*/build/conf/*.conf,*/meta{-*,}/conf/*.conf setf bitbake
" Blkid cache file
au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
" BSDL
au BufNewFile,BufRead *bsd,*.bsdl setf bsdl
au BufNewFile,BufRead *.bsd,*.bsdl setf bsdl
" Bazel (http://bazel.io)
autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE setf bzl
@@ -404,6 +407,9 @@ au BufNewFile,BufRead configure.in,configure.ac setf config
" Cooklang
au BufNewFile,BufRead *.cook setf cook
" CSV Files
au BufNewFile,BufRead *.csv setf csv
" CUDA Compute Unified Device Architecture
au BufNewFile,BufRead *.cu,*.cuh setf cuda
@@ -789,6 +795,9 @@ au BufNewFile,BufRead *.hsm setf hamster
" Handlebars
au BufNewFile,BufRead *.hbs setf handlebars
" Hare
au BufNewFile,BufRead *.ha setf hare
" Haskell
au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot,*.hsig setf haskell
au BufNewFile,BufRead *.lhs setf lhaskell
@@ -850,9 +859,13 @@ au BufNewFile,BufRead *.hb setf hb
" Httest
au BufNewFile,BufRead *.htt,*.htb setf httest
" i3 (and sway)
au BufNewFile,BufRead */i3/config,*/sway/config setf i3config
au BufNewFile,BufRead */.i3/config,*/.sway/config setf i3config
" i3
au BufNewFile,BufRead */i3/config setf i3config
au BufNewFile,BufRead */.i3/config setf i3config
" sway
au BufNewFile,BufRead */sway/config setf swayconfig
au BufNewFile,BufRead */.sway/config setf swayconfig
" Icon
au BufNewFile,BufRead *.icn setf icon
@@ -994,8 +1007,8 @@ au BufNewFile,BufRead *.latte,*.lte setf latte
" Limits
au BufNewFile,BufRead */etc/limits,*/etc/*limits.conf,*/etc/*limits.d/*.conf setf limits
" LambdaProlog (see dist#ft#FTmod for *.mod)
au BufNewFile,BufRead *.sig setf lprolog
" LambdaProlog or SML (see dist#ft#FTmod for *.mod)
au BufNewFile,BufRead *.sig call dist#ft#FTsig()
" LDAP LDIF
au BufNewFile,BufRead *.ldif setf ldif
@@ -1795,16 +1808,11 @@ au BufNewFile,BufRead *.il,*.ils,*.cdf setf skill
au BufNewFile,BufRead .slrnrc setf slrnrc
au BufNewFile,BufRead *.score setf slrnsc
" Smalltalk (and TeX)
" Smalltalk
au BufNewFile,BufRead *.st setf st
au BufNewFile,BufRead *.cls
\ if getline(1) =~ '^%' |
\ setf tex |
\ elseif getline(1)[0] == '#' && getline(1) =~ 'rexx' |
\ setf rexx |
\ else |
\ setf st |
\ endif
" Smalltalk (and Rexx, TeX, and Visual Basic)
au BufNewFile,BufRead *.cls call dist#ft#FTcls()
" Smarty templates
au BufNewFile,BufRead *.tpl setf smarty
@@ -1978,8 +1986,8 @@ au BufRead,BufNewFile *.ttl
" Terminfo
au BufNewFile,BufRead *.ti setf terminfo
" Terraform
au BufRead,BufNewFile *.tfvars setf terraform
" Terraform variables
au BufRead,BufNewFile *.tfvars setf terraform-vars
" TeX
au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
@@ -2030,6 +2038,9 @@ au BufNewFile,BufReadPost *.tssop setf tssop
" TSS - Command Line (temporary)
au BufNewFile,BufReadPost *.tsscl setf tsscl
" TSV Files
au BufNewFile,BufRead *.tsv setf tsv
" TWIG files
au BufNewFile,BufReadPost *.twig setf twig
@@ -2391,7 +2402,7 @@ au BufNewFile,BufRead *fvwm2rc*
au BufNewFile,BufRead */tmp/lltmp* call s:StarSetf('gedcom')
" Git
au BufNewFile,BufRead */.gitconfig.d/*,/etc/gitconfig.d/* call s:StarSetf('gitconfig')
au BufNewFile,BufRead */.gitconfig.d/*,*/etc/gitconfig.d/* call s:StarSetf('gitconfig')
" Gitolite
au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite')
@@ -2456,7 +2467,7 @@ au BufNewFile,BufRead neomuttrc*,Neomuttrc* call s:StarSetf('neomuttrc')
au BufNewFile,BufRead tmac.* call s:StarSetf('nroff')
" OpenBSD hostname.if
au BufNewFile,BufRead /etc/hostname.* call s:StarSetf('config')
au BufNewFile,BufRead */etc/hostname.* call s:StarSetf('config')
" Pam conf
au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf')

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: BASIC (QuickBASIC 4.5)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Mar 16
" Last Change: 2022 Jun 22
if exists("b:did_ftplugin")
finish
@@ -15,6 +15,8 @@ setlocal comments=:REM\ ,:Rem\ ,:rem\ ,:'
setlocal commentstring='\ %s
setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl fo< com< cms<"
" TODO: support exit ... as middle matches?
if exists("loaded_matchit") && !exists("b:match_words")
let s:line_start = '\%(^\s*\)\@<='
@@ -33,10 +35,11 @@ if exists("loaded_matchit") && !exists("b:match_words")
\ '\<while\>:\<wend\>,' ..
\ s:line_start .. 'if\%(.*\<then\s*\%($\|''\)\)\@=:\<\%(' .. s:line_start .. 'else\|elseif\)\>:\<end\s\+if\>,' ..
\ '\<lock\>:\<unlock\>'
let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string" || ' ..
\ 'strpart(getline("."), 0, col(".") ) =~? "\\<exit\\s\\+"'
let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_skip b:match_words"
unlet s:line_start s:not_end s:not_end_or_exit
endif
@@ -44,12 +47,10 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "BASIC Source Files (*.bas)\t*.bas\n" ..
\ "BASIC Include Files (*.bi, *.bm)\t*.bi;*.bm\n" ..
\ "All Files (*.*)\t*.*\n"
let b:basic_set_browsefilter = 1
let b:undo_ftplugin ..= " | unlet! b:browsefilter b:basic_set_browsefilter"
endif
let b:undo_ftplugin = "setl fo< com< cms<" ..
\ " | unlet! b:match_ignorecase b:match_skip b:match_words" ..
\ " | unlet! b:browsefilter"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -0,0 +1,16 @@
" Vim filetype plugin file
" Language: Bitbake
" Maintainer: Gregory Anders <greg@gpanders.com>
" Repository: https://github.com/openembedded/bitbake
" Latest Revision: 2022-07-23
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
setlocal commentstring=#%s
setlocal comments=:#
setlocal suffixesadd=.bb,.bbclass
let b:undo_ftplugin = "setl cms< com< sua<"

View File

@@ -1,9 +1,9 @@
" Vim filetype plugin file (GUI menu, folding and completion)
" Language: Debian Changelog
" Maintainer: Debian Vim Maintainers
" Maintainer: Debian Vim Maintainers <team+vim@tracker.debian.org>
" Former Maintainers: Michael Piefel <piefel@informatik.hu-berlin.de>
" Stefano Zacchiroli <zack@debian.org>
" Last Change: 2018-01-28
" Last Change: 2022 Jul 25
" License: Vim License
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debchangelog.vim
@@ -35,6 +35,11 @@ if exists('g:did_changelog_ftplugin')
finish
endif
" Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise
" <CR> would not be recognized. See ":help 'cpoptions'".
let s:cpo_save = &cpo
set cpo&vim
" Don't load another plugin (this is global)
let g:did_changelog_ftplugin = 1
@@ -101,13 +106,13 @@ endfunction
" These functions implement the menus
function NewVersion()
" The new entry is unfinalised and shall be changed
amenu disable Changelog.New\ Version
amenu enable Changelog.Add\ Entry
amenu enable Changelog.Close\ Bug
amenu enable Changelog.Set\ Distribution
amenu enable Changelog.Set\ Urgency
amenu disable Changelog.Unfinalise
amenu enable Changelog.Finalise
amenu disable &Changelog.&New\ Version
amenu enable &Changelog.&Add\ Entry
amenu enable &Changelog.&Close\ Bug
amenu enable &Changelog.Set\ &Distribution
amenu enable &Changelog.Set\ &Urgency
amenu disable &Changelog.U&nfinalise
amenu enable &Changelog.&Finalise
call append(0, substitute(getline(1), '-\([[:digit:]]\+\))', '-$$\1)', ''))
call append(1, '')
call append(2, '')
@@ -117,7 +122,9 @@ function NewVersion()
normal! 1G0
call search(')')
normal! h
normal! 
" ':normal' doens't support key annotation (<c-a>) directly.
" Vim's manual recommends using ':exe' to use key annotation indirectly (backslash-escaping needed though).
exe "normal! \<c-a>"
call setline(1, substitute(getline(1), '-\$\$', '-', ''))
if exists('g:debchangelog_fold_enable')
foldopen
@@ -161,13 +168,13 @@ endfunction
function <SID>UnfinaliseMenu()
" This means the entry shall be changed
amenu disable Changelog.New\ Version
amenu enable Changelog.Add\ Entry
amenu enable Changelog.Close\ Bug
amenu enable Changelog.Set\ Distribution
amenu enable Changelog.Set\ Urgency
amenu disable Changelog.Unfinalise
amenu enable Changelog.Finalise
amenu disable &Changelog.&New\ Version
amenu enable &Changelog.&Add\ Entry
amenu enable &Changelog.&Close\ Bug
amenu enable &Changelog.Set\ &Distribution
amenu enable &Changelog.Set\ &Urgency
amenu disable &Changelog.U&nfinalise
amenu enable &Changelog.&Finalise
endfunction
function Unfinalise()
@@ -179,13 +186,13 @@ endfunction
function <SID>FinaliseMenu()
" This means the entry should not be changed anymore
amenu enable Changelog.New\ Version
amenu disable Changelog.Add\ Entry
amenu disable Changelog.Close\ Bug
amenu disable Changelog.Set\ Distribution
amenu disable Changelog.Set\ Urgency
amenu enable Changelog.Unfinalise
amenu disable Changelog.Finalise
amenu enable &Changelog.&New\ Version
amenu disable &Changelog.&Add\ Entry
amenu disable &Changelog.&Close\ Bug
amenu disable &Changelog.Set\ &Distribution
amenu disable &Changelog.Set\ &Urgency
amenu enable &Changelog.U&nfinalise
amenu disable &Changelog.&Finalise
endfunction
function Finalise()
@@ -198,26 +205,26 @@ endfunction
function <SID>MakeMenu()
amenu &Changelog.&New\ Version :call NewVersion()<CR>
amenu Changelog.&Add\ Entry :call AddEntry()<CR>
amenu Changelog.&Close\ Bug :call CloseBug()<CR>
menu Changelog.-sep- <nul>
amenu &Changelog.&Add\ Entry :call AddEntry()<CR>
amenu &Changelog.&Close\ Bug :call CloseBug()<CR>
menu &Changelog.-sep- <nul>
amenu Changelog.Set\ &Distribution.&unstable :call Distribution("unstable")<CR>
amenu Changelog.Set\ Distribution.&frozen :call Distribution("frozen")<CR>
amenu Changelog.Set\ Distribution.&stable :call Distribution("stable")<CR>
menu Changelog.Set\ Distribution.-sep- <nul>
amenu Changelog.Set\ Distribution.frozen\ unstable :call Distribution("frozen unstable")<CR>
amenu Changelog.Set\ Distribution.stable\ unstable :call Distribution("stable unstable")<CR>
amenu Changelog.Set\ Distribution.stable\ frozen :call Distribution("stable frozen")<CR>
amenu Changelog.Set\ Distribution.stable\ frozen\ unstable :call Distribution("stable frozen unstable")<CR>
amenu &Changelog.Set\ &Distribution.&unstable :call Distribution("unstable")<CR>
amenu &Changelog.Set\ &Distribution.&frozen :call Distribution("frozen")<CR>
amenu &Changelog.Set\ &Distribution.&stable :call Distribution("stable")<CR>
menu &Changelog.Set\ &Distribution.-sep- <nul>
amenu &Changelog.Set\ &Distribution.frozen\ unstable :call Distribution("frozen unstable")<CR>
amenu &Changelog.Set\ &Distribution.stable\ unstable :call Distribution("stable unstable")<CR>
amenu &Changelog.Set\ &Distribution.stable\ frozen :call Distribution("stable frozen")<CR>
amenu &Changelog.Set\ &Distribution.stable\ frozen\ unstable :call Distribution("stable frozen unstable")<CR>
amenu Changelog.Set\ &Urgency.&low :call Urgency("low")<CR>
amenu Changelog.Set\ Urgency.&medium :call Urgency("medium")<CR>
amenu Changelog.Set\ Urgency.&high :call Urgency("high")<CR>
amenu &Changelog.Set\ &Urgency.&low :call Urgency("low")<CR>
amenu &Changelog.Set\ &Urgency.&medium :call Urgency("medium")<CR>
amenu &Changelog.Set\ &Urgency.&high :call Urgency("high")<CR>
menu Changelog.-sep- <nul>
amenu Changelog.U&nfinalise :call Unfinalise()<CR>
amenu Changelog.&Finalise :call Finalise()<CR>
menu &Changelog.-sep- <nul>
amenu &Changelog.U&nfinalise :call Unfinalise()<CR>
amenu &Changelog.&Finalise :call Finalise()<CR>
if <SID>Finalised()
call <SID>FinaliseMenu()
@@ -228,7 +235,7 @@ endfunction
augroup changelogMenu
au BufEnter * if &filetype == "debchangelog" | call <SID>MakeMenu() | endif
au BufLeave * if &filetype == "debchangelog" | silent! aunmenu Changelog | endif
au BufLeave * if &filetype == "debchangelog" | silent! aunmenu &Changelog | endif
augroup END
" }}}
@@ -380,4 +387,8 @@ setlocal omnifunc=DebCompleteBugs
" }}}
" Restore the previous value of 'cpoptions'.
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: set foldmethod=marker:

View File

@@ -0,0 +1,13 @@
" Vim filetype plugin file
" Language: XDG desktop entry
" Maintainer: Eisuke Kawashima ( e.kawaschima+vim AT gmail.com )
" Last Change: 2022-07-26
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = v:true
setl comments=:#
setl commentstring=#%s
let b:undo_ftplugin = 'setl com< cms<'

View File

@@ -0,0 +1,24 @@
" Vim filetype plugin file
" Language: Expect
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Jul 16
if exists("b:did_ftplugin")
finish
endif
" Syntax is similar to Tcl
runtime! ftplugin/tcl.vim
let s:cpo_save = &cpo
set cpo&vim
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Expect Command Files (*.exp)\t*.exp\n" ..
\ "All Files (*.*)\t*.*\n"
endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8

View File

@@ -1,19 +1,16 @@
" Vim filetype plugin file
" Language: fetchmail(1) RC File
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09
" Language: fetchmail(1) RC File
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2022 Jun 30
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=:# commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl com< cms< fo<"
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: FreeBASIC
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Mar 16
" Last Change: 2022 Jun 24
" Setup {{{1
if exists("b:did_ftplugin")
@@ -21,7 +21,8 @@ let &l:comments = "sO:*\ -,mO:*\ \ ,exO:*/,s1:/',mb:',ex:'/,:''," .. &l:comments
" Match words {{{1
if exists("loaded_matchit")
let s:not_end = '\%(end\s\+\)\@<!'
let s:line_start = '\%(^\s*\)\@<='
let s:not_end = '\%(end\s\+\)\@<!'
let b:match_words ..= ','
@@ -49,17 +50,32 @@ if exists("loaded_matchit")
endif
let b:match_words ..= s:not_end .. '\<enum\>:\<end\s\+enum\>,' ..
\ '^#\s*\%(if\|ifdef\|ifndef\)\>:^#\s*\%(else\|elseif\)\>:^#\s*endif\>,' ..
\ '^#\s*macro\>:^#\s*endmacro\>'
\ s:line_start .. '#\s*\%(if\|ifdef\|ifndef\)\>:' ..
\ s:line_start .. '#\s*\%(else\|elseif\)\>:' ..
\ s:line_start .. '#\s*endif\>,' ..
\ s:line_start .. '#\s*macro\>:' .. s:line_start .. '#\s*endmacro\>,' ..
\ "/':'/"
" skip "function = <retval>"
let b:match_skip ..= '|| strpart(getline("."), col(".") - 1) =~? "^\\<function\\s\\+="'
" skip "function = <retval>" and "continue { do | for | while }"
if s:dialect == "qb"
let s:continue = "__continue"
else
let s:continue = "continue"
endif
let b:match_skip ..= ' || strpart(getline("."), col(".") - 1) =~? "^\\<function\\s\\+="' ..
\ ' || strpart(getline("."), 0, col(".") ) =~? "\\<' .. s:continue .. '\\s\\+"'
unlet s:not_end
unlet s:not_end s:line_start
endif
if (has("gui_win32") || has("gui_gtk")) && exists("b:basic_set_browsefilter")
let b:browsefilter = "FreeBASIC Source Files (*.bas)\t*.bas\n" ..
\ "FreeBASIC Header Files (*.bi)\t*.bi\n" ..
\ "All Files (*.*)\t*.*\n"
endif
" Cleanup {{{1
let &cpo = s:cpo_save
unlet s:cpo_save
unlet s:cpo_save s:dialect
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:

View File

@@ -1,16 +1,14 @@
" Vim filetype plugin file
" Language: html
"
" This runtime file is looking for a new maintainer.
"
" Former maintainer: Dan Sharp
" Last Changed: 20 Jan 2009
" Language: HTML
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Dan Sharp
" Last Changed: 2022 Jul 20
if exists("b:did_ftplugin") | finish | endif
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
" Make sure the continuation lines below do not cause problems in
" compatibility mode.
let s:save_cpo = &cpo
set cpo-=C
@@ -18,36 +16,40 @@ setlocal matchpairs+=<:>
setlocal commentstring=<!--%s-->
setlocal comments=s:<!--,m:\ \ \ \ ,e:-->
if exists("g:ft_html_autocomment") && (g:ft_html_autocomment == 1)
setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setlocal comments< commentstring< matchpairs<"
if get(g:, "ft_html_autocomment", 0)
setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin ..= " | setlocal formatoptions<"
endif
if exists('&omnifunc')
setlocal omnifunc=htmlcomplete#CompleteTags
call htmlcomplete#DetectOmniFlavor()
let b:undo_ftplugin ..= " | setlocal omnifunc<"
endif
" HTML: thanks to Johannes Zellner and Benji Fisher.
if exists("loaded_matchit")
let b:match_ignorecase = 1
let b:match_words = '<:>,' .
\ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' .
\ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' .
\ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
" HTML: thanks to Johannes Zellner and Benji Fisher.
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_ignorecase = 1
let b:match_words = '<!--:-->,' ..
\ '<:>,' ..
\ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' ..
\ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' ..
\ '<\@<=\([^/!][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
let b:html_set_match_words = 1
let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words b:html_set_match_words"
endif
" Change the :browse e filter to primarily show HTML-related files.
if has("gui_win32")
let b:browsefilter="HTML Files (*.html,*.htm)\t*.htm;*.html\n" .
\ "JavaScript Files (*.js)\t*.js\n" .
\ "Cascading StyleSheets (*.css)\t*.css\n" .
\ "All Files (*.*)\t*.*\n"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "HTML Files (*.html *.htm)\t*.htm;*.html\n" ..
\ "JavaScript Files (*.js)\t*.js\n" ..
\ "Cascading StyleSheets (*.css)\t*.css\n" ..
\ "All Files (*.*)\t*.*\n"
let b:html_set_browsefilter = 1
let b:undo_ftplugin ..= " | unlet! b:browsefilter b:html_set_browsefilter"
endif
" Undo the stuff we changed.
let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc< comments< formatoptions<" .
\ " | unlet! b:match_ignorecase b:match_skip b:match_words b:browsefilter"
" Restore the saved compatibility options.
let &cpo = s:save_cpo
unlet s:save_cpo

View File

@@ -0,0 +1,16 @@
" Vim filetype plugin file
" Language: sway config file
" Original Author: James Eapen <james.eapen@vai.org>
" Maintainer: James Eapen <james.eapen@vai.org>
" Version: 0.1
" Last Change: 2022 June 07
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = "setlocal cms<"
setlocal commentstring=#\ %s

View File

@@ -16,7 +16,7 @@ set cpo&vim
if !exists('*VimFtpluginUndo')
func VimFtpluginUndo()
setl fo< isk< com< tw< commentstring<
setl fo< isk< com< tw< commentstring< include< define<
if exists('b:did_add_maps')
silent! nunmap <buffer> [[
silent! vunmap <buffer> [[
@@ -59,6 +59,11 @@ else
setlocal commentstring=\"%s
endif
" set 'include' to recognize import commands
setlocal include=\\v^\\s*import\\s*(autoload)?
" set 'define' to recognize export commands
setlocal define=\\v^\\s*export\\s*(def\|const\|var\|final)
" Format comments to be up to 78 characters long
if &tw == 0

24
runtime/ftplugin/vue.vim Normal file
View File

@@ -0,0 +1,24 @@
" Vim filetype plugin file
" Language: vue
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
" Make sure the continuation lines below do not cause problems in
" compatibility mode.
let s:save_cpo = &cpo
set cpo-=C
" Copied from ftplugin/html.vim
" Original thanks to Johannes Zellner and Benji Fisher.
if exists("loaded_matchit")
let b:match_ignorecase = 1
let b:match_words = '<:>,'
\ .. '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,'
\ .. '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,'
\ .. '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
endif
" Restore the saved compatibility options.
let &cpo = s:save_cpo
unlet s:save_cpo

View File

@@ -0,0 +1,22 @@
" Vim indent file
" Language: BitBake
" Copyright: Copyright (C) 2019 Agilent Technologies, Inc.
" Maintainer: Chris Laplante <chris.laplante@agilent.com>
" License: You may redistribute this under the same terms as Vim itself
if exists("b:did_indent")
finish
endif
runtime! indent/sh.vim
setlocal indentexpr=bitbake#Indent(v:lnum)
setlocal autoindent
setlocal nolisp
setlocal shiftwidth=4
setlocal expandtab
setlocal indentkeys+=<:>,=elif,=except,0=\"
let b:undo_indent .= ' inde< ai< lisp< sw< et< indk<'
let b:did_indent = 1

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

@@ -0,0 +1,11 @@
" Vim indent file
" Language: Expect
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Jul 16
if exists("b:did_indent")
finish
endif
" Syntax is similar to Tcl
runtime! indent/tcl.vim

View File

@@ -600,7 +600,7 @@ func s:Alien3()
endif
if b:hi_indent.scripttype == "javascript"
" indent for further lines
return eval(b:hi_js1indent) + GetJavascriptIndent()
return GetJavascriptIndent()
else
return -1
endif

View File

@@ -473,6 +473,12 @@ function GetJavascriptIndent()
elseif num
return s:Nat(num_ind + get(l:,'case_offset',s:sw()) + l:switch_offset + b_l + is_op)
endif
let nest = get(get(b:, 'hi_indent', {}), 'blocklnr')
if nest
return indent(nextnonblank(nest + 1)) + b_l + is_op
endif
return b_l + is_op
endfunction

View File

@@ -14,7 +14,7 @@ let b:did_indent = 1
setlocal nolisp " Make sure lisp indenting doesn't supersede us
setlocal autoindent " indentexpr isn't much help otherwise
setlocal indentexpr=GetPythonIndent(v:lnum)
setlocal indentexpr=python#GetIndent(v:lnum)
setlocal indentkeys+=<:>,=elif,=except
let b:undo_indent = "setl ai< inde< indk< lisp<"
@@ -23,206 +23,11 @@ let b:undo_indent = "setl ai< inde< indk< lisp<"
if exists("*GetPythonIndent")
finish
endif
let s:keepcpo= &cpo
set cpo&vim
" Come here when loading the script the first time.
let s:maxoff = 50 " maximum number of lines to look backwards for ()
" See if the specified line is already user-dedented from the expected value.
function s:Dedented(lnum, expected)
return indent(a:lnum) <= a:expected - shiftwidth()
endfunction
" Keep this for backward compatibility, new scripts should use
" python#GetIndent()
function GetPythonIndent(lnum)
" If this line is explicitly joined: If the previous line was also joined,
" line it up with that one, otherwise add two 'shiftwidth'
if getline(a:lnum - 1) =~ '\\$'
if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$'
return indent(a:lnum - 1)
endif
return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwidth() * 2))
endif
" If the start of the line is in a string don't change the indent.
if has('syntax_items')
\ && synIDattr(synID(a:lnum, 1, 1), "name") =~ "String$"
return -1
endif
" Search backwards for the previous non-empty line.
let plnum = prevnonblank(v:lnum - 1)
if plnum == 0
" This is the first non-empty line, use zero indent.
return 0
endif
call cursor(plnum, 1)
" Identing inside parentheses can be very slow, regardless of the searchpair()
" timeout, so let the user disable this feature if he doesn't need it
let disable_parentheses_indenting = get(g:, "pyindent_disable_parentheses_indenting", 0)
if disable_parentheses_indenting == 1
let plindent = indent(plnum)
let plnumstart = plnum
else
" searchpair() can be slow sometimes, limit the time to 150 msec or what is
" put in g:pyindent_searchpair_timeout
let searchpair_stopline = 0
let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150)
" If the previous line is inside parenthesis, use the indent of the starting
" line.
" Trick: use the non-existing "dummy" variable to break out of the loop when
" going too far back.
let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW',
\ "line('.') < " . (plnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if parlnum > 0
let plindent = indent(parlnum)
let plnumstart = parlnum
else
let plindent = indent(plnum)
let plnumstart = plnum
endif
" When inside parenthesis: If at the first line below the parenthesis add
" two 'shiftwidth', otherwise same as previous line.
" i = (a
" + b
" + c)
call cursor(a:lnum, 1)
let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if p > 0
if p == plnum
" When the start is inside parenthesis, only indent one 'shiftwidth'.
let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if pp > 0
return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth())
endif
return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2))
endif
if plnumstart == p
return indent(plnum)
endif
return plindent
endif
endif
" Get the line and remove a trailing comment.
" Use syntax highlighting attributes when possible.
let pline = getline(plnum)
let pline_len = strlen(pline)
if has('syntax_items')
" If the last character in the line is a comment, do a binary search for
" the start of the comment. synID() is slow, a linear search would take
" too long on a long line.
if synIDattr(synID(plnum, pline_len, 1), "name") =~ "\\(Comment\\|Todo\\)$"
let min = 1
let max = pline_len
while min < max
let col = (min + max) / 2
if synIDattr(synID(plnum, col, 1), "name") =~ "\\(Comment\\|Todo\\)$"
let max = col
else
let min = col + 1
endif
endwhile
let pline = strpart(pline, 0, min - 1)
endif
else
let col = 0
while col < pline_len
if pline[col] == '#'
let pline = strpart(pline, 0, col)
break
endif
let col = col + 1
endwhile
endif
" If the previous line ended with a colon, indent this line
if pline =~ ':\s*$'
return plindent + shiftwidth()
endif
" If the previous line was a stop-execution statement...
if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>'
" See if the user has already dedented
if s:Dedented(a:lnum, indent(plnum))
" If so, trust the user
return -1
endif
" If not, recommend one dedent
return indent(plnum) - shiftwidth()
endif
" If the current line begins with a keyword that lines up with "try"
if getline(a:lnum) =~ '^\s*\(except\|finally\)\>'
let lnum = a:lnum - 1
while lnum >= 1
if getline(lnum) =~ '^\s*\(try\|except\)\>'
let ind = indent(lnum)
if ind >= indent(a:lnum)
return -1 " indent is already less than this
endif
return ind " line up with previous try or except
endif
let lnum = lnum - 1
endwhile
return -1 " no matching "try"!
endif
" If the current line begins with a header keyword, dedent
if getline(a:lnum) =~ '^\s*\(elif\|else\)\>'
" Unless the previous line was a one-liner
if getline(plnumstart) =~ '^\s*\(for\|if\|elif\|try\)\>'
return plindent
endif
" Or the user has already dedented
if s:Dedented(a:lnum, plindent)
return -1
endif
return plindent - shiftwidth()
endif
" When after a () construct we probably want to go back to the start line.
" a = (b
" + c)
" here
if parlnum > 0
" ...unless the user has already dedented
if s:Dedented(a:lnum, plindent)
return -1
else
return plindent
endif
endif
return -1
return python#GetIndent(a:lnum)
endfunction
let &cpo = s:keepcpo
unlet s:keepcpo
" vim:sw=2

View File

@@ -0,0 +1,19 @@
# vim: set filetype=bitbake :
# START_INDENT
FOO = " \
bar \
baz \
qux \
"
do_configure() {
oe_conf
}
python do_task() {
def foo(x):
if y:
print(x)
}
# END_INDENT

View File

@@ -0,0 +1,19 @@
# vim: set filetype=bitbake :
# START_INDENT
FOO = " \
bar \
baz \
qux \
"
do_configure() {
oe_conf
}
python do_task() {
def foo(x):
if y:
print(x)
}
# END_INDENT

View File

@@ -22,6 +22,9 @@ all: \
menu_sr_rs.iso_8859-2.vim \
menu_sr_rs.ascii.vim \
menu_czech_czech_republic.ascii.vim \
menu_hu_hu.iso_8859-2.vim \
menu_sk_sk.iso_8859-2.vim \
# Convert menu_zh_cn.utf-8.vim to create menu_chinese_gb.936.vim.
menu_chinese_gb.936.vim: menu_zh_cn.utf-8.vim
@@ -39,7 +42,7 @@ menu_chinese_taiwan.950.vim: menu_zh_tw.utf-8.vim
menu_cs_cz.iso_8859-2.vim: menu_cs_cz.utf-8.vim
rm -f menu_cs_cz.iso_8859-2.vim
iconv -f utf-8 -t iso8859-2 menu_cs_cz.utf-8.vim | \
sed -e 's/scriptencoding utf-8/scriptencoding iso8859-2/' \
sed -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' \
-e 's/" Original translations/" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT/' \
-e 's/\(" Menu Translations:.*\)(.*)/\1(ISO8859-2)/' \
> menu_cs_cz.iso_8859-2.vim
@@ -95,7 +98,7 @@ menu_ko_kr.euckr.vim: menu_ko_kr.utf-8.vim
menu_pl_pl.iso_8859-2.vim: menu_pl_pl.utf-8.vim
rm -f menu_pl_pl.iso_8859-2.vim
iconv -f utf-8 -t iso8859-2 menu_pl_pl.utf-8.vim | \
sed -e 's/scriptencoding utf-8/scriptencoding iso8859-2/' -e 's/" Original translations/" Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT/' > menu_pl_pl.iso_8859-2.vim
sed -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' -e 's/" Original translations/" Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT/' > menu_pl_pl.iso_8859-2.vim
# Convert menu_pl_pl.utf-8.vim to create menu_polish_poland.1250.vim.
menu_polish_poland.1250.vim: menu_pl_pl.utf-8.vim
@@ -194,3 +197,15 @@ menu_uk_ua.koi8-u.vim: menu_uk_ua.utf-8.vim
rm -f menu_uk_ua.koi8-u.vim
iconv -f utf-8 -t koi8-u menu_uk_ua.utf-8.vim | \
sed -e 's/scriptencoding utf-8/scriptencoding koi8-u/' -e 's/" Original translations/" Generated from menu_uk_ua.utf-8.vim, DO NOT EDIT/' > menu_uk_ua.koi8-u.vim
# Convert menu_hu_hu.utf-8.vim to create menu_hu_hu.iso_8859-2.vim.
menu_hu_hu.iso_8859-2.vim: menu_hu_hu.utf-8.vim
rm -f menu_hu_hu.iso_8859-2.vim
iconv -f utf-8 -t iso8859-2 menu_hu_hu.utf-8.vim | \
sed -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' -e 's/" Original translations/" Generated from menu_hu_hu.utf-8.vim, DO NOT EDIT/' > menu_hu_hu.iso_8859-2.vim
# Convert menu_slovak_slovak_republic.1250.vim to create menu_sk_sk.iso_8859-2.vim.
menu_sk_sk.iso_8859-2.vim: menu_slovak_slovak_republic.1250.vim
rm -f menu_sk_sk.iso_8859-2.vim
iconv -f cp1250 -t iso8859-2 menu_slovak_slovak_republic.1250.vim | \
sed -e 's/scriptencoding cp1250/scriptencoding iso-8859-2/' -e 's/" Original translations/" Generated from menu_slovak_slovak_republic.1250.vim, DO NOT EDIT/' > menu_sk_sk.iso_8859-2.vim

View File

@@ -1,10 +1,15 @@
" Menu Translations: Simplified Chinese
" Maintainer: Shun Bai <baishunde@gmail.com>
" Previous Maintainer: Yuheng Xie <elephant@linux.net.cn>
" Last Change: 2022 Feb 19
" Maintainer: Ada (Haowen) Yu <me@yuhaowen.com>
" Previous Maintainer: Shun Bai <baishunde@gmail.com>, Yuheng Xie <elephant@linux.net.cn>
" Last Change: 2022 July 9
" Generated from menu_zh_cn.utf-8.vim, DO NOT EDIT
"
" Generated with the scripts from:
"
" https://github.com/adaext/vim-menutrans-helper
" Quit when menu translations have already been done.
if exists("did_menu_trans")
finish
endif
@@ -15,18 +20,18 @@ set cpo&vim
scriptencoding cp936
" Help menu
menutrans &Help 帮助(&H)
menutrans &Help 帮助(&H)
" Help menuitems and dialog {{{1
menutrans &Overview<Tab><F1> 概述(&O)<Tab><F1>
menutrans &User\ Manual 用户手册(&U)
menutrans &How-to\ Links 如何使用(&H)
menutrans &Find\.\.\. 查找(&F)\.\.\.
menutrans &Credits 致谢(&C)
menutrans Co&pying 版权(&P)
menutrans &Sponsor/Register 赞助/注册(&S)
menutrans O&rphans 拯救孤儿(&R)
menutrans &Version 版本(&V)
menutrans &About 关于(&A)
menutrans &Overview<Tab><F1> 概述(&O)<Tab><F1>
menutrans &User\ Manual 用户手册(&U)
menutrans &How-to\ Links 如何使用(&H)
menutrans &Find\.\.\. 查找(&F)\.\.\.
menutrans &Credits 致谢(&C)
menutrans Co&pying 版权(&P)
menutrans &Sponsor/Register 赞助/注册(&S)
menutrans O&rphans 拯救孤儿(&R)
menutrans &Version 版本(&V)
menutrans &About 关于(&A)
" fun! s:Helpfind()
if !exists("g:menutrans_help_dialog")
@@ -35,67 +40,68 @@ endif
" }}}
" File menu
menutrans &File 文件(&F)
menutrans &File 文件(&F)
" File menuitems {{{1
menutrans &Open\.\.\.<Tab>:e 打开(&O)\.\.\.<Tab>:e
menutrans Sp&lit-Open\.\.\.<Tab>:sp 在拆分窗口打开(&L)\.\.\.<Tab>:sp
menutrans Open\ Tab\.\.\.<Tab>:tabnew 在标签页打开\.\.\.<Tab>:tabnew
menutrans &New<Tab>:enew 新建(&N)<Tab>:enew
menutrans &Close<Tab>:close 关闭(&C)<Tab>:close
menutrans &Save<Tab>:w 保存(&S)<Tab>:w
menutrans Save\ &As\.\.\.<Tab>:sav 另存为(&A)\.\.\.<Tab>:sav
menutrans Split\ &Diff\ With\.\.\. 拆分窗口以对比差异(Diff)(&D)\.\.\.
menutrans Split\ Patched\ &By\.\.\. 拆分窗口以进行修补(Patch)(&B)\.\.\.
menutrans &Print 打印(&P)
menutrans Sa&ve-Exit<Tab>:wqa 保存并退出(&V)<Tab>:wqa
menutrans E&xit<Tab>:qa 退出(&X)<Tab>:qa
menutrans &Open\.\.\.<Tab>:e 打开(&O)\.\.\.<Tab>:e
menutrans Sp&lit-Open\.\.\.<Tab>:sp 在拆分窗口打开(&L)\.\.\.<Tab>:sp
menutrans Open\ Tab\.\.\.<Tab>:tabnew 在标签页打开\.\.\.<Tab>:tabnew
menutrans &New<Tab>:enew 新建(&N)<Tab>:enew
menutrans &Close<Tab>:close 关闭(&C)<Tab>:close
menutrans &Save<Tab>:w 保存(&S)<Tab>:w
menutrans Save\ &As\.\.\.<Tab>:sav 另存为(&A)\.\.\.<Tab>:sav
menutrans Split\ &Diff\ With\.\.\. 拆分窗口以对比差异(Diff)(&D)\.\.\.
menutrans Split\ Patched\ &By\.\.\. 拆分窗口以进行修补(Patch)(&B)\.\.\.
menutrans &Print 打印(&P)
menutrans Sa&ve-Exit<Tab>:wqa 保存并退出(&V)<Tab>:wqa
menutrans E&xit<Tab>:qa 退出(&X)<Tab>:qa
" }}}
" Edit menu
menutrans &Edit 编辑(&E)
menutrans &Edit 编辑(&E)
" Edit menuitems {{{1
menutrans &Undo<Tab>u 撤销(&U)<Tab>u
menutrans &Redo<Tab>^R 恢复(&R)<Tab>^R
menutrans Rep&eat<Tab>\. 重复(&E)<Tab>\.
menutrans Cu&t<Tab>"+x 剪切(&T)<Tab>"+x
menutrans &Copy<Tab>"+y 复制(&C)<Tab>"+y
menutrans &Paste<Tab>"+gP 粘贴(&P)<Tab>"+gP
menutrans Put\ &Before<Tab>[p 粘贴到光标前(&B)<Tab>[p
menutrans Put\ &After<Tab>]p 粘贴到光标后(&A)<Tab>]p
menutrans &Delete<Tab>x 删除(&D)<Tab>x
menutrans &Select\ All<Tab>ggVG 全选(&S)<Tab>ggVG
menutrans &Find\.\.\. 查找(&F)\.\.\.
menutrans Find\ and\ Rep&lace\.\.\. 查找和替换(&L)\.\.\.
menutrans &Find<Tab>/ 查找(&F)<Tab>/
menutrans Find\ and\ Rep&lace<Tab>:%s 查找和替换(&L)<Tab>:%s
menutrans Settings\ &Window 设置窗口(&W)
menutrans Startup\ &Settings 启动设置(&S)
menutrans &Undo<Tab>u 撤销(&U)<Tab>u
menutrans &Redo<Tab>^R 恢复(&R)<Tab>^R
menutrans Rep&eat<Tab>\. 重复(&E)<Tab>\.
menutrans Cu&t<Tab>"+x 剪切(&T)<Tab>"+x
menutrans &Copy<Tab>"+y 复制(&C)<Tab>"+y
menutrans &Paste<Tab>"+gP 粘贴(&P)<Tab>"+gP
menutrans Put\ &Before<Tab>[p 粘贴到光标前(&B)<Tab>[p
menutrans Put\ &After<Tab>]p 粘贴到光标后(&A)<Tab>]p
menutrans &Delete<Tab>x 删除(&D)<Tab>x
menutrans &Select\ All<Tab>ggVG 全选(&S)<Tab>ggVG
menutrans &Find\.\.\. 查找(&F)\.\.\.
menutrans Find\ and\ Rep&lace\.\.\. 查找和替换(&L)\.\.\.
menutrans &Find<Tab>/ 查找(&F)<Tab>/
menutrans Find\ and\ Rep&lace<Tab>:%s 查找和替换(&L)<Tab>:%s
menutrans Find\ and\ Rep&lace<Tab>:s 查找和替换(&L)<Tab>:s
menutrans Settings\ &Window 设置窗口(&W)
menutrans Startup\ &Settings 启动设置(&S)
" Edit/Global Settings
menutrans &Global\ Settings 全局设置(&G)
menutrans &Global\ Settings 全局设置(&G)
" Edit.Global Settings menuitems and dialogs {{{2
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! /关高亮查找内容(&H)<Tab>:set\ hls!
menutrans Toggle\ &Ignoring\ Case<Tab>:set\ ic! /关忽略大小写(&I)<Tab>:set\ ic!
menutrans Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! /关显示括号匹配(&S)<Tab>:set\ sm!
menutrans &Context\ Lines 上下文行数(&C)
menutrans &Virtual\ Edit 虚拟编辑(&V)
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! /关高亮查找内容(&H)<Tab>:set\ hls!
menutrans Toggle\ &Ignoring\ Case<Tab>:set\ ic! /关忽略大小写(&I)<Tab>:set\ ic!
menutrans Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! /关显示括号匹配(&S)<Tab>:set\ sm!
menutrans &Context\ Lines 上下文行数(&C)
menutrans &Virtual\ Edit 虚拟编辑(&V)
" Edit.Global Settings.Virtual Edit menuitems {{{3
menutrans Never 从不
menutrans Block\ Selection 只在选定矩形块时
menutrans Insert\ Mode 只在插入模式时
menutrans Block\ and\ Insert 在选定矩形块和插入模式时
menutrans Always 始终
menutrans Never 从不
menutrans Block\ Selection 只在选定矩形块时
menutrans Insert\ Mode 只在插入模式时
menutrans Block\ and\ Insert 在选定矩形块和插入模式时
menutrans Always 始终
" }}}
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! /关插入模式(&M)<Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatibility<Tab>:set\ cp! /\ Vi\ 兼容性(&O)<Tab>:set\ cp!
menutrans Search\ &Path\.\.\. 搜索路径(&P)\.\.\.
menutrans Ta&g\ Files\.\.\. 标记文件(Tags)(&G)\.\.\.
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! /关插入模式(&M)<Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatibility<Tab>:set\ cp! /\ Vi\ 兼容性(&O)<Tab>:set\ cp!
menutrans Search\ &Path\.\.\. 搜索路径(&P)\.\.\.
menutrans Ta&g\ Files\.\.\. 标记文件(Tags)(&G)\.\.\.
" GUI options
menutrans Toggle\ &Toolbar /关工具栏(&T)
menutrans Toggle\ &Bottom\ Scrollbar /关底部滚动条(&B)
menutrans Toggle\ &Left\ Scrollbar /关左侧滚动条(&L)
menutrans Toggle\ &Right\ Scrollbar /关右侧滚动条(&R)
menutrans Toggle\ &Toolbar /关工具栏(&T)
menutrans Toggle\ &Bottom\ Scrollbar /关底部滚动条(&B)
menutrans Toggle\ &Left\ Scrollbar /关左侧滚动条(&L)
menutrans Toggle\ &Right\ Scrollbar /关右侧滚动条(&R)
" fun! s:SearchP()
if !exists("g:menutrans_path_dialog")
@@ -109,23 +115,23 @@ endif
" }}}
" Edit/File Settings
menutrans F&ile\ Settings 文件设置(&I)
menutrans F&ile\ Settings 文件设置(&I)
" Edit.File Settings menuitems and dialogs {{{2
" Boolean options
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! /关行号(&N)<Tab>:set\ nu!
menutrans Toggle\ Relati&ve\ Line\ Numbering<Tab>:set\ rnu! /关相对行号(&V)<Tab>:set\ rnu!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! /关列表模式(&L)<Tab>:set\ list!
menutrans Toggle\ Line\ &Wrapping<Tab>:set\ wrap! /关换行(&W)<Tab>:set\ wrap!
menutrans Toggle\ W&rapping\ at\ Word<Tab>:set\ lbr! /关词尾换行(&R)<Tab>:set\ lbr!
menutrans Toggle\ Tab\ &Expanding<Tab>:set\ et! /关制表符扩展(&E)<Tab>:set\ et!
menutrans Toggle\ &Auto\ Indenting<Tab>:set\ ai! /关自动缩进(&A)<Tab>:set\ ai!
menutrans Toggle\ &C-Style\ Indenting<Tab>:set\ cin! /\ C\ 语言式缩进(&C)<Tab>:set\ cin!
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! /关行号(&N)<Tab>:set\ nu!
menutrans Toggle\ Relati&ve\ Line\ Numbering<Tab>:set\ rnu! /关相对行号(&V)<Tab>:set\ rnu!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! /关列表模式(&L)<Tab>:set\ list!
menutrans Toggle\ Line\ &Wrapping<Tab>:set\ wrap! /关换行(&W)<Tab>:set\ wrap!
menutrans Toggle\ W&rapping\ at\ Word<Tab>:set\ lbr! /关词尾换行(&R)<Tab>:set\ lbr!
menutrans Toggle\ Tab\ &Expanding<Tab>:set\ et! /关制表符扩展(&E)<Tab>:set\ et!
menutrans Toggle\ &Auto\ Indenting<Tab>:set\ ai! /关自动缩进(&A)<Tab>:set\ ai!
menutrans Toggle\ &C-Style\ Indenting<Tab>:set\ cin! /\ C\ 语言式缩进(&C)<Tab>:set\ cin!
" other options
menutrans &Shiftwidth 缩进宽度(&S)
menutrans Soft\ &Tabstop 软制表位宽度(Soft\ Tabstop)(&T)
menutrans Te&xt\ Width\.\.\. 文本宽度(&X)\.\.\.
menutrans &File\ Format\.\.\. 文件格式(&F)\.\.\.
menutrans &Shiftwidth 缩进宽度(&S)
menutrans Soft\ &Tabstop 软制表位宽度(Soft\ Tabstop)(&T)
menutrans Te&xt\ Width\.\.\. 文本宽度(&X)\.\.\.
menutrans &File\ Format\.\.\. 文件格式(&F)\.\.\.
" fun! s:TextWidth()
if !exists("g:menutrans_textwidth_dialog")
@@ -140,36 +146,36 @@ if !exists("g:menutrans_fileformat_choices")
let g:menutrans_fileformat_choices = "&Unix\n&Dos\n&Mac\n取消(&C)"
endif
" }}}
menutrans Show\ C&olor\ Schemes\ in\ Menu 在菜单中显示配色方案(&O)
menutrans C&olor\ Scheme 配色方案(&O)
menutrans Show\ &Keymaps\ in\ Menu 在菜单中显示键盘映射(&K)
menutrans &Keymap 键盘映射(&K)
menutrans Select\ Fo&nt\.\.\. 选择字体(&N)\.\.\.
menutrans Show\ C&olor\ Schemes\ in\ Menu 在菜单中显示配色方案(&O)
menutrans C&olor\ Scheme 配色方案(&O)
menutrans Show\ &Keymaps\ in\ Menu 在菜单中显示键盘映射(&K)
menutrans &Keymap 键盘映射(&K)
menutrans Select\ Fo&nt\.\.\. 选择字体(&N)\.\.\.
" }}}
" Programming menu
menutrans &Tools 工具(&T)
menutrans &Tools 工具(&T)
" Tools menuitems {{{1
menutrans &Jump\ to\ This\ Tag<Tab>g^] 跳转到这个标记(Tag)(&J)<Tab>g^]
menutrans Jump\ &Back<Tab>^T 跳转回(&B)<Tab>^T
menutrans Build\ &Tags\ File 生成标记文件(Tags)(&T)
menutrans &Jump\ to\ This\ Tag<Tab>g^] 跳转到这个标记(Tag)(&J)<Tab>g^]
menutrans Jump\ &Back<Tab>^T 跳转回(&B)<Tab>^T
menutrans Build\ &Tags\ File 生成标记文件(Tags)(&T)
" Tools.Spelling Menu
menutrans &Spelling 拼写检查(&S)
menutrans &Spelling 拼写检查(&S)
" Tools.Spelling menuitems and dialog {{{2
menutrans &Spell\ Check\ On 打开拼写检查(&S)
menutrans Spell\ Check\ &Off 关闭拼写检查(&O)
menutrans To\ &Next\ Error<Tab>]s 上一个错误(&N)<Tab>]s
menutrans To\ &Previous\ Error<Tab>[s 下一个错误(&P)<Tab>[s
menutrans Suggest\ &Corrections<Tab>z= 更正建议(&C)<Tab>z=
menutrans &Repeat\ Correction<Tab>:spellrepall 更正全部同类错误(&R)<Tab>:spellrepall
menutrans Set\ Language\ to\ "en" 设置语言为\ "en"
menutrans Set\ Language\ to\ "en_au" 设置语言为\ "en_au"
menutrans Set\ Language\ to\ "en_ca" 设置语言为\ "en_ca"
menutrans Set\ Language\ to\ "en_gb" 设置语言为\ "en_gb"
menutrans Set\ Language\ to\ "en_nz" 设置语言为\ "en_nz"
menutrans Set\ Language\ to\ "en_us" 设置语言为\ "en_us"
menutrans &Find\ More\ Languages 查找更多语言(&F)
menutrans &Spell\ Check\ On 打开拼写检查(&S)
menutrans Spell\ Check\ &Off 关闭拼写检查(&O)
menutrans To\ &Next\ Error<Tab>]s 上一个错误(&N)<Tab>]s
menutrans To\ &Previous\ Error<Tab>[s 下一个错误(&P)<Tab>[s
menutrans Suggest\ &Corrections<Tab>z= 更正建议(&C)<Tab>z=
menutrans &Repeat\ Correction<Tab>:spellrepall 更正全部同类错误(&R)<Tab>:spellrepall
menutrans Set\ Language\ to\ "en" 设置语言为\ "en"
menutrans Set\ Language\ to\ "en_au" 设置语言为\ "en_au"
menutrans Set\ Language\ to\ "en_ca" 设置语言为\ "en_ca"
menutrans Set\ Language\ to\ "en_gb" 设置语言为\ "en_gb"
menutrans Set\ Language\ to\ "en_nz" 设置语言为\ "en_nz"
menutrans Set\ Language\ to\ "en_us" 设置语言为\ "en_us"
menutrans &Find\ More\ Languages 查找更多语言(&F)
" func! s:SpellLang()
if !exists("g:menutrans_set_lang_to")
@@ -178,113 +184,113 @@ endif
" }}}
" Tools.Fold Menu
menutrans &Folding 折叠(&F)
menutrans &Folding 折叠(&F)
" Tools.Fold menuitems {{{2
" open close folds
menutrans &Enable/Disable\ Folds<Tab>zi 启用/禁用折叠(&E)<Tab>zi
menutrans &View\ Cursor\ Line<Tab>zv 展开光标所在行(&V)<Tab>zv
menutrans Vie&w\ Cursor\ Line\ Only<Tab>zMzx 只展开光标所在行(&W)<Tab>zMzx
menutrans C&lose\ More\ Folds<Tab>zm 折叠一级(&L)<Tab>zm
menutrans &Close\ All\ Folds<Tab>zM 折叠全部(&C)<Tab>zM
menutrans O&pen\ More\ Folds<Tab>zr 展开一级(&P)<Tab>zr
menutrans &Open\ All\ Folds<Tab>zR 展开全部(&O)<Tab>zR
menutrans &Enable/Disable\ Folds<Tab>zi 启用/禁用折叠(&E)<Tab>zi
menutrans &View\ Cursor\ Line<Tab>zv 展开光标所在行(&V)<Tab>zv
menutrans Vie&w\ Cursor\ Line\ Only<Tab>zMzx 只展开光标所在行(&W)<Tab>zMzx
menutrans C&lose\ More\ Folds<Tab>zm 折叠一级(&L)<Tab>zm
menutrans &Close\ All\ Folds<Tab>zM 折叠全部(&C)<Tab>zM
menutrans O&pen\ More\ Folds<Tab>zr 展开一级(&P)<Tab>zr
menutrans &Open\ All\ Folds<Tab>zR 展开全部(&O)<Tab>zR
" fold method
menutrans Fold\ Met&hod 折叠方式(&H)
menutrans Fold\ Met&hod 折叠方式(&H)
" Tools.Fold.Fold Method menuitems {{{3
menutrans M&anual 手动(&A)
menutrans I&ndent 缩进(&N)
menutrans E&xpression 表达式(&X)
menutrans S&yntax 语法(&Y)
menutrans &Diff 差异(Diff)(&D)
menutrans Ma&rker 记号(Marker)(&R)
menutrans M&anual 手动(&A)
menutrans I&ndent 缩进(&N)
menutrans E&xpression 表达式(&X)
menutrans S&yntax 语法(&Y)
menutrans &Diff 差异(Diff)(&D)
menutrans Ma&rker 记号(Marker)(&R)
" }}}
" create and delete folds
menutrans Create\ &Fold<Tab>zf 创建折叠(&F)<Tab>zf
menutrans &Delete\ Fold<Tab>zd 删除折叠(&D)<Tab>zd
menutrans Delete\ &All\ Folds<Tab>zD 删除全部折叠(&A)<Tab>zD
menutrans Create\ &Fold<Tab>zf 创建折叠(&F)<Tab>zf
menutrans &Delete\ Fold<Tab>zd 删除折叠(&D)<Tab>zd
menutrans Delete\ &All\ Folds<Tab>zD 删除全部折叠(&A)<Tab>zD
" moving around in folds
menutrans Fold\ Col&umn\ Width 折叠操作栏宽度(&W)
menutrans Fold\ Col&umn\ Width 折叠操作栏宽度(&W)
" }}}
" Tools.Diff Menu
menutrans &Diff 差异(Diff)(&D)
menutrans &Diff 差异(Diff)(&D)
" Tools.Diff menuitems {{{2
menutrans &Update 刷新(&U)
menutrans &Get\ Block 采用对侧文本块(&G)
menutrans &Put\ Block 采用本侧文本块(&P)
menutrans &Update 刷新(&U)
menutrans &Get\ Block 采用对侧文本块(&G)
menutrans &Put\ Block 采用本侧文本块(&P)
" }}}
menutrans &Make<Tab>:make 生成(Make)(&M)<Tab>:make
menutrans &List\ Errors<Tab>:cl 列出错误(&L)<Tab>:cl
menutrans L&ist\ Messages<Tab>:cl! 列出消息(&I)<Tab>:cl!
menutrans &Next\ Error<Tab>:cn 下一个错误(&N)<Tab>:cn
menutrans &Previous\ Error<Tab>:cp 上一个错误(&P)<Tab>:cp
menutrans &Older\ List<Tab>:cold 较旧的错误列表(&O)<Tab>:cold
menutrans N&ewer\ List<Tab>:cnew 较新的错误列表(&E)<Tab>:cnew
menutrans Error\ &Window 错误窗口(&W)
menutrans &Make<Tab>:make 生成(Make)(&M)<Tab>:make
menutrans &List\ Errors<Tab>:cl 列出错误(&L)<Tab>:cl
menutrans L&ist\ Messages<Tab>:cl! 列出消息(&I)<Tab>:cl!
menutrans &Next\ Error<Tab>:cn 下一个错误(&N)<Tab>:cn
menutrans &Previous\ Error<Tab>:cp 上一个错误(&P)<Tab>:cp
menutrans &Older\ List<Tab>:cold 较旧的错误列表(&O)<Tab>:cold
menutrans N&ewer\ List<Tab>:cnew 较新的错误列表(&E)<Tab>:cnew
menutrans Error\ &Window 错误窗口(&W)
" Tools.Error Window menuitems {{{2
menutrans &Update<Tab>:cwin 刷新(&U)<Tab>:cwin
menutrans &Open<Tab>:copen 打开(&O)<Tab>:copen
menutrans &Close<Tab>:cclose 关闭(&C)<Tab>:cclose
menutrans &Update<Tab>:cwin 刷新(&U)<Tab>:cwin
menutrans &Open<Tab>:copen 打开(&O)<Tab>:copen
menutrans &Close<Tab>:cclose 关闭(&C)<Tab>:cclose
" }}}
menutrans Show\ Compiler\ Se&ttings\ in\ Menu 在菜单中显示编译器设置(&T)
menutrans Se&t\ Compiler 设置编译器(&T)
menutrans &Convert\ to\ HEX<Tab>:%!xxd 转换成十六进制(&C)<Tab>:%!xxd
menutrans Conve&rt\ Back<Tab>:%!xxd\ -r 转换回(&R)<Tab>:%!xxd\ -r
menutrans Show\ Compiler\ Se&ttings\ in\ Menu 在菜单中显示编译器设置(&T)
menutrans Se&t\ Compiler 设置编译器(&T)
menutrans &Convert\ to\ HEX<Tab>:%!xxd 转换成十六进制(&C)<Tab>:%!xxd
menutrans Conve&rt\ Back<Tab>:%!xxd\ -r 转换回(&R)<Tab>:%!xxd\ -r
" }}}
" Buffer menu
menutrans &Buffers 缓冲区(&B)
menutrans &Buffers 缓冲区(&B)
" Buffer menuitems and dialog {{{1
menutrans &Refresh\ Menu 刷新本菜单(&R)
menutrans &Delete 删除(&D)
menutrans &Alternate 切换(&A)
menutrans &Next 下一个(&N)
menutrans &Previous 上一个(&P)
menutrans &Refresh\ Menu 刷新本菜单(&R)
menutrans &Delete 删除(&D)
menutrans &Alternate 切换(&A)
menutrans &Next 下一个(&N)
menutrans &Previous 上一个(&P)
" func! s:BMMunge(fname, bnum)
" func! s:BMMunge(fname, bnum)
if !exists("g:menutrans_no_file")
let g:menutrans_no_file = "[无文件]"
endif
" }}}
" Window menu
menutrans &Window 窗口(&W)
menutrans &Window 窗口(&W)
" Window menuitems {{{1
menutrans &New<Tab>^Wn 新建(&N)<Tab>^Wn
menutrans S&plit<Tab>^Ws 拆分(&P)<Tab>^Ws
menutrans Sp&lit\ To\ #<Tab>^W^^ 拆分并显示缓冲区\ #(&L)<Tab>^W^^
menutrans Split\ &Vertically<Tab>^Wv 垂直拆分(&V)<Tab>^Wv
menutrans Split\ File\ E&xplorer 拆分并打开文件浏览器(&X)
menutrans &Close<Tab>^Wc 关闭(&C)<Tab>^Wc
menutrans Close\ &Other(s)<Tab>^Wo 除此之外全部关闭(&O)<Tab>^Wo
menutrans Move\ &To 移动到(&T)
menutrans &Top<Tab>^WK 顶端(&T)<Tab>^WK
menutrans &Bottom<Tab>^WJ 底端(&B)<Tab>^WJ
menutrans &Left\ Side<Tab>^WH 左边(&L)<Tab>^WH
menutrans &Right\ Side<Tab>^WL 右边(&R)<Tab>^WL
menutrans Rotate\ &Up<Tab>^WR 向上轮换(&U)<Tab>^WR
menutrans Rotate\ &Down<Tab>^Wr 向下轮换(&D)<Tab>^Wr
menutrans &Equal\ Size<Tab>^W= 平均分布(&E)<Tab>^W=
menutrans &Max\ Height<Tab>^W_ 最大高度(&M)<Tab>^W
menutrans M&in\ Height<Tab>^W1_ 最小高度(&I)<Tab>^W1_
menutrans Max\ &Width<Tab>^W\| 最大宽度(&W)<Tab>^W\|
menutrans Min\ Widt&h<Tab>^W1\| 最小宽度(&H)<Tab>^W1\|
menutrans &New<Tab>^Wn 新建(&N)<Tab>^Wn
menutrans S&plit<Tab>^Ws 拆分(&P)<Tab>^Ws
menutrans Sp&lit\ To\ #<Tab>^W^^ 拆分并显示缓冲区\ #(&L)<Tab>^W^^
menutrans Split\ &Vertically<Tab>^Wv 垂直拆分(&V)<Tab>^Wv
menutrans Split\ File\ E&xplorer 拆分并打开文件浏览器(&X)
menutrans &Close<Tab>^Wc 关闭(&C)<Tab>^Wc
menutrans Close\ &Other(s)<Tab>^Wo 除此之外全部关闭(&O)<Tab>^Wo
menutrans Move\ &To 移动到(&T)
menutrans &Top<Tab>^WK 顶端(&T)<Tab>^WK
menutrans &Bottom<Tab>^WJ 底端(&B)<Tab>^WJ
menutrans &Left\ Side<Tab>^WH 左边(&L)<Tab>^WH
menutrans &Right\ Side<Tab>^WL 右边(&R)<Tab>^WL
menutrans Rotate\ &Up<Tab>^WR 向上轮换(&U)<Tab>^WR
menutrans Rotate\ &Down<Tab>^Wr 向下轮换(&D)<Tab>^Wr
menutrans &Equal\ Size<Tab>^W= 平均分布(&E)<Tab>^W=
menutrans &Max\ Height<Tab>^W_ 最大高度(&M)<Tab>^W
menutrans M&in\ Height<Tab>^W1_ 最小高度(&I)<Tab>^W1_
menutrans Max\ &Width<Tab>^W\| 最大宽度(&W)<Tab>^W\|
menutrans Min\ Widt&h<Tab>^W1\| 最小宽度(&H)<Tab>^W1\|
" }}}
" The popup menu {{{1
menutrans &Undo 撤销(&U)
menutrans Cu&t 剪切(&T)
menutrans &Copy 复制(&C)
menutrans &Paste 粘贴(&P)
menutrans &Delete 删除(&D)
menutrans Select\ Blockwise 改为选定矩形块
menutrans Select\ &Word 选定单词(&W)
menutrans Select\ &Sentence 选定句(&S)
menutrans Select\ Pa&ragraph 选定段落(&R)
menutrans Select\ &Line 选定行(&L)
menutrans Select\ &Block 选定矩形块(&B)
menutrans Select\ &All 全选(&A)
menutrans &Undo 撤销(&U)
menutrans Cu&t 剪切(&T)
menutrans &Copy 复制(&C)
menutrans &Paste 粘贴(&P)
menutrans &Delete 删除(&D)
menutrans Select\ Blockwise 改为选定矩形块
menutrans Select\ &Word 选定单词(&W)
menutrans Select\ &Sentence 选定句(&S)
menutrans Select\ Pa&ragraph 选定段落(&R)
menutrans Select\ &Line 选定行(&L)
menutrans Select\ &Block 选定矩形块(&B)
menutrans Select\ &All 全选(&A)
" func! <SID>SpellPopup()
if !exists("g:menutrans_spell_change_ARG_to")
@@ -305,148 +311,260 @@ if has("toolbar")
endif
fun Do_toolbar_tmenu()
let did_toolbar_tmenu = 1
tmenu ToolBar.Open 打开文件
tmenu ToolBar.Save 保存当前文件
tmenu ToolBar.SaveAll 全部保存
tmenu ToolBar.Print 打印
tmenu ToolBar.Undo 撤销
tmenu ToolBar.Redo 恢复
tmenu ToolBar.Cut 剪切到剪贴板
tmenu ToolBar.Copy 复制到剪贴板
tmenu ToolBar.Paste 从剪贴板粘贴
tmenu ToolBar.Open 打开文件
tmenu ToolBar.Save 保存当前文件
tmenu ToolBar.SaveAll 全部保存
tmenu ToolBar.Print 打印
tmenu ToolBar.Undo 撤销
tmenu ToolBar.Redo 恢复
tmenu ToolBar.Cut 剪切到剪贴板
tmenu ToolBar.Copy 复制到剪贴板
tmenu ToolBar.Paste 从剪贴板粘贴
if !has("gui_athena")
tmenu ToolBar.Replace 查找和替换...
tmenu ToolBar.FindNext 查找下一个
tmenu ToolBar.FindPrev 查找上一个
tmenu ToolBar.Replace 查找和替换...
tmenu ToolBar.FindNext 查找下一个
tmenu ToolBar.FindPrev 查找上一个
endif
tmenu ToolBar.LoadSesn 加载会话
tmenu ToolBar.SaveSesn 保存当前会话
tmenu ToolBar.RunScript 运行 Vim 脚本
tmenu ToolBar.Make 生成当前项目 (:make)
tmenu ToolBar.RunCtags 在当前目录生成标记(Tags) (!ctags -R .)
tmenu ToolBar.TagJump 跳转到光标所在标记(Tag)
tmenu ToolBar.Help Vim 帮助
tmenu ToolBar.FindHelp Vim 帮助中查找
tmenu ToolBar.LoadSesn 加载会话
tmenu ToolBar.SaveSesn 保存当前会话
tmenu ToolBar.RunScript 运行 Vim 脚本
tmenu ToolBar.Make 生成当前项目 (:make)
tmenu ToolBar.RunCtags 在当前目录生成标记(Tags) (!ctags -R .)
tmenu ToolBar.TagJump 跳转到光标所在标记(Tag)
tmenu ToolBar.Help Vim 帮助
tmenu ToolBar.FindHelp Vim 帮助中查找
endfun
endif
" }}}
" Syntax menu
menutrans &Syntax 语法(&S)
menutrans &Syntax 语法(&S)
" Syntax menuitems {{{1
menutrans &Show\ File\ Types\ in\ Menu 在菜单中显示文件类型(&S)
menutrans &Off 关闭(&O)
menutrans &Manual 手动(&M)
menutrans A&utomatic 自动(&U)
menutrans On/Off\ for\ &This\ File 只对这个文件开/(&T)
menutrans Co&lor\ Test 色彩测试(&L)
menutrans &Highlight\ Test 高亮测试(&H)
menutrans &Convert\ to\ HTML 转换成\ HTML(&C)
menutrans &Show\ File\ Types\ in\ Menu 在菜单中显示文件类型(&S)
menutrans &Off 关闭(&O)
menutrans &Manual 手动(&M)
menutrans A&utomatic 自动(&U)
menutrans On/Off\ for\ &This\ File 只对这个文件开/(&T)
menutrans Co&lor\ Test 色彩测试(&L)
menutrans &Highlight\ Test 高亮测试(&H)
menutrans &Convert\ to\ HTML 转换成\ HTML(&C)
" From synmenu.vim
menutrans Set\ '&syntax'\ Only 只设置\ 'syntax'(&S)
menutrans Set\ '&filetype'\ Too 也设置\ 'filetype'(&F)
menutrans Set\ '&syntax'\ Only 只设置\ 'syntax'(&S)
menutrans Set\ '&filetype'\ Too 也设置\ 'filetype'(&F)
menutrans Oracle\ config Oracle\ 配置文件
menutrans Vim\ help\ file Vim\ 帮助文件
menutrans Vim\ script Vim\ 脚本
menutrans Viminfo\ file Vim\ 信息文件
menutrans Virata\ config Virata\ 配置文件
menutrans Whitespace\ (add) 增加加亮空格
" }}}
" Netrw menu {{{1
" Plugin loading may be after menu translation
" So giveup testing if Netrw Plugin is loaded
" if exists("g:loaded_netrwPlugin")
menutrans Help<tab><F1> 帮助<tab><F1>
menutrans Bookmarks 书签
menutrans History 历史记录
menutrans Go\ Up\ Directory<tab>- 向上一级<tab>-
menutrans Apply\ Special\ Viewer<tab>x 用默认程序打开<tab>x
menutrans Bookmarks\ and\ History 书签和历史记录
menutrans Help<tab><F1> 帮助<tab><F1>
menutrans Bookmarks 书签
menutrans History 历史记录
menutrans Go\ Up\ Directory<tab>- 向上一级<tab>-
menutrans Apply\ Special\ Viewer<tab>x 用默认程序打开<tab>x
menutrans Bookmarks\ and\ History 书签和历史记录
" Netrw.Bookmarks and History menuitems {{{2
menutrans Bookmark\ Current\ Directory<tab>mb 添加书签<tab>mb
menutrans Bookmark\ Delete 移除书签
menutrans Goto\ Prev\ Dir\ (History)<tab>u 后退(历史记录)<tab>u
menutrans Goto\ Next\ Dir\ (History)<tab>U 前进(历史记录)<tab>U
menutrans List<tab>qb 完整列表<tab>qb
menutrans Bookmark\ Current\ Directory<tab>mb 添加书签<tab>mb
menutrans Bookmark\ Delete 移除书签
menutrans Goto\ Prev\ Dir\ (History)<tab>u 后退(历史记录)<tab>u
menutrans Goto\ Next\ Dir\ (History)<tab>U 前进(历史记录)<tab>U
menutrans List<tab>qb 完整列表<tab>qb
" }}}
menutrans Browsing\ Control 控制
menutrans Browsing\ Control 控制
" Netrw.Browsing Control menuitems {{{2
menutrans Horizontal\ Split<tab>o 在拆分窗口打开<tab>o
menutrans Vertical\ Split<tab>v 在垂直拆分窗口打开<tab>v
menutrans New\ Tab<tab>t 在标签页打开<tab>t
menutrans Preview<tab>p 预览<tab>p
menutrans Edit\ File\ Hiding\ List<tab><ctrl-h> 编辑隐藏条件(Hiding\ List)<tab><ctrl-h>
menutrans Edit\ Sorting\ Sequence<tab>S 编辑排序条件(Sorting\ Sequence)<tab>S
menutrans Quick\ Hide/Unhide\ Dot\ Files<tab>gh 快速隐藏/显示以\.开头的文件<tab>gh
menutrans Refresh\ Listing<tab><ctrl-l> 刷新<tab><ctrl-l>
menutrans Settings/Options<tab>:NetrwSettings 设置/选项<tab>:NetrwSettings
menutrans Horizontal\ Split<tab>o 在拆分窗口打开<tab>o
menutrans Vertical\ Split<tab>v 在垂直拆分窗口打开<tab>v
menutrans New\ Tab<tab>t 在标签页打开<tab>t
menutrans Preview<tab>p 预览<tab>p
menutrans Edit\ File\ Hiding\ List<tab><ctrl-h> 编辑隐藏条件(Hiding\ List)<tab><ctrl-h>
menutrans Edit\ Sorting\ Sequence<tab>S 编辑排序条件(Sorting\ Sequence)<tab>S
menutrans Quick\ Hide/Unhide\ Dot\ Files<tab>gh 快速隐藏/显示以\.开头的文件<tab>gh
menutrans Refresh\ Listing<tab><ctrl-l> 刷新<tab><ctrl-l>
menutrans Settings/Options<tab>:NetrwSettings 设置/选项<tab>:NetrwSettings
" }}}
menutrans Delete\ File/Directory<tab>D 删除文件/目录<tab>D
menutrans Edit\ File/Dir 编辑文件/目录
menutrans Delete\ File/Directory<tab>D 删除文件/目录<tab>D
menutrans Edit\ File/Dir 编辑文件/目录
" Netrw.Edit File menuitems {{{2
menutrans Create\ New\ File<tab>% 新建文件<tab>%
menutrans In\ Current\ Window<tab><cr> 在当前窗口<tab><cr>
menutrans Preview\ File/Directory<tab>p 预览文件/目录<tab>p
menutrans In\ Previous\ Window<tab>P 在上一个窗口<tab>P
menutrans In\ New\ Window<tab>o 在新窗口<tab>o
menutrans In\ New\ Tab<tab>t 在新标签页<tab>t
menutrans In\ New\ Vertical\ Window<tab>v 在新垂直窗口<tab>v
menutrans Create\ New\ File<tab>% 新建文件<tab>%
menutrans In\ Current\ Window<tab><cr> 在当前窗口<tab><cr>
menutrans Preview\ File/Directory<tab>p 预览文件/目录<tab>p
menutrans In\ Previous\ Window<tab>P 在上一个窗口<tab>P
menutrans In\ New\ Window<tab>o 在新窗口<tab>o
menutrans In\ New\ Tab<tab>t 在新标签页<tab>t
menutrans In\ New\ Vertical\ Window<tab>v 在新垂直窗口<tab>v
" }}}
menutrans Explore 浏览
menutrans Explore 浏览
" Netrw.Explore menuitems {{{2
menutrans Directory\ Name 指定目录名
menutrans Filenames\ Matching\ Pattern\ (curdir\ only)<tab>:Explore\ */ 匹配指定文件名模式(当前目录)<tab>:Explore\ */
menutrans Filenames\ Matching\ Pattern\ (+subdirs)<tab>:Explore\ **/ 匹配指定文件名模式(含子目录)<tab>:Explore\ **/
menutrans Files\ Containing\ String\ Pattern\ (curdir\ only)<tab>:Explore\ *// 内容包含指定字符串模式(当前目录)<tab>:Explore\ *//
menutrans Files\ Containing\ String\ Pattern\ (+subdirs)<tab>:Explore\ **// 内容包含指定字符串模式(含子目录)<tab>:Explore\ **//
menutrans Next\ Match<tab>:Nexplore 下一个匹配项<tab>:Nexplore
menutrans Prev\ Match<tab>:Pexplore 上一个匹配项<tab>:Pexplore
menutrans Directory\ Name 指定目录名
menutrans Filenames\ Matching\ Pattern\ (curdir\ only)<tab>:Explore\ */ 匹配指定文件名模式(当前目录)<tab>:Explore\ */
menutrans Filenames\ Matching\ Pattern\ (+subdirs)<tab>:Explore\ **/ 匹配指定文件名模式(含子目录)<tab>:Explore\ **/
menutrans Files\ Containing\ String\ Pattern\ (curdir\ only)<tab>:Explore\ *// 内容包含指定字符串模式(当前目录)<tab>:Explore\ *//
menutrans Files\ Containing\ String\ Pattern\ (+subdirs)<tab>:Explore\ **// 内容包含指定字符串模式(含子目录)<tab>:Explore\ **//
menutrans Next\ Match<tab>:Nexplore 下一个匹配项<tab>:Nexplore
menutrans Prev\ Match<tab>:Pexplore 上一个匹配项<tab>:Pexplore
" }}}
menutrans Make\ Subdirectory<tab>d 新建子目录<tab>d
menutrans Marked\ Files 选定的(Marked)文件
menutrans Make\ Subdirectory<tab>d 新建子目录<tab>d
menutrans Marked\ Files 选定的(Marked)文件
" Netrw.Marked Files menuitems {{{2
menutrans Mark\ File<tab>mf 选定(Mark)/取消<tab>mf
menutrans Mark\ Files\ by\ Regexp<tab>mr 用正则表达式(Regexp)选定<tab>mr
menutrans Hide-Show-List\ Control<tab>a 隐藏/显示<tab>a
menutrans Copy\ To\ Target<tab>mc 复制到目标<tab>mc
menutrans Delete<tab>D 删除<tab>D
menutrans Diff<tab>md 差异(Diff)<tab>md
menutrans Edit<tab>me 编辑<tab>me
menutrans Exe\ Cmd<tab>mx 作为参数运行命令<tab>mx
menutrans Move\ To\ Target<tab>mm 移动到目标<tab>mm
menutrans Obtain<tab>O 获取<tab>O
menutrans Print<tab>mp 打印<tab>mp
menutrans Replace<tab>R 替换<tab>R
menutrans Set\ Target<tab>mt 设置目标<tab>mt
menutrans Tag<tab>mT 生成标记文件(Tags)<tab>mT
menutrans Zip/Unzip/Compress/Uncompress<tab>mz 压缩/解压缩<tab>mz
menutrans Mark\ File<tab>mf 选定(Mark)/取消<tab>mf
menutrans Mark\ Files\ by\ Regexp<tab>mr 用正则表达式(Regexp)选定<tab>mr
menutrans Hide-Show-List\ Control<tab>a 隐藏/显示<tab>a
menutrans Copy\ To\ Target<tab>mc 复制到目标<tab>mc
menutrans Delete<tab>D 删除<tab>D
menutrans Diff<tab>md 差异(Diff)<tab>md
menutrans Edit<tab>me 编辑<tab>me
menutrans Exe\ Cmd<tab>mx 作为参数运行命令<tab>mx
menutrans Move\ To\ Target<tab>mm 移动到目标<tab>mm
menutrans Obtain<tab>O 获取<tab>O
menutrans Print<tab>mp 打印<tab>mp
menutrans Replace<tab>R 替换<tab>R
menutrans Set\ Target<tab>mt 设置目标<tab>mt
menutrans Tag<tab>mT 生成标记文件(Tags)<tab>mT
menutrans Zip/Unzip/Compress/Uncompress<tab>mz 压缩/解压缩<tab>mz
" }}}
menutrans Obtain\ File<tab>O 获取文件<tab>O
menutrans Style 显示风格
menutrans Obtain\ File<tab>O 获取文件<tab>O
menutrans Style 显示风格
" Netrw.Style menuitems {{{2
menutrans Listing 列表形式
menutrans Listing 列表形式
" Netrw.Style.Listing menuitems {{{3
menutrans thin<tab>i 紧凑<thin)<tab>i
menutrans long<tab>i 详细(long)<tab>i
menutrans wide<tab>i 多列(wide)<tab>i
menutrans tree<tab>i 树状(tree)<tab>i
menutrans thin<tab>i 紧凑<thin)<tab>i
menutrans long<tab>i 详细(long)<tab>i
menutrans wide<tab>i 多列(wide)<tab>i
menutrans tree<tab>i 树状(tree)<tab>i
" }}}
menutrans Normal-Hide-Show 显示/隐藏
menutrans Normal-Hide-Show 显示/隐藏
" Netrw.Style.Normal-Hide_show menuitems {{{3
menutrans Show\ All<tab>a 显示全部
menutrans Normal<tab>a 不显示隐藏文件
menutrans Hidden\ Only<tab>a 只显示隐藏文件
menutrans Show\ All<tab>a 显示全部
menutrans Normal<tab>a 不显示隐藏文件
menutrans Hidden\ Only<tab>a 只显示隐藏文件
" }}}
menutrans Reverse\ Sorting\ Order<tab>r 升序/降序<tab>r
menutrans Sorting\ Method 排序方式
menutrans Reverse\ Sorting\ Order<tab>r 升序/降序<tab>r
menutrans Sorting\ Method 排序方式
" Netrw.Style.Sorting Method menuitems {{{3
menutrans Name<tab>s 文件名<tab>s
menutrans Time<tab>s 修改时间<tab>s
menutrans Size<tab>s 大小<tab>s
menutrans Exten<tab>s 扩展名<tab>s
menutrans Name<tab>s 文件名<tab>s
menutrans Time<tab>s 修改时间<tab>s
menutrans Size<tab>s 大小<tab>s
menutrans Exten<tab>s 扩展名<tab>s
" }}}
" }}}
menutrans Rename\ File/Directory<tab>R 重命名文件/目录<tab>R
menutrans Set\ Current\ Directory<tab>c 设置\ Vim\ 工作目录<tab>c
menutrans Targets 目标
menutrans Rename\ File/Directory<tab>R 重命名文件/目录<tab>R
menutrans Set\ Current\ Directory<tab>c 设置\ Vim\ 工作目录<tab>c
menutrans Targets 目标
" endif
" }}}
" Shellmenu menu
" Shellmenu menuitems {{{1
" From shellmenu.vim
menutrans ShellMenu Shell\ 菜单
menutrans Statements 语句
menutrans Test 测试
menutrans Existence 存在
menutrans Existence\ -\ file 存在\ -\ 文件
menutrans Existence\ -\ file\ (not\ empty) 存在\ -\ 文件(非空)
menutrans Existence\ -\ directory 存在\ -\ 目录
menutrans Existence\ -\ executable 存在\ -\ 可执行
menutrans Existence\ -\ readable 存在\ -\ 可读
menutrans Existence\ -\ writable 存在\ -\ 可写
menutrans String\ is\ empty 字符串为空
menutrans String\ is\ not\ empty 字符串非空
menutrans Strings\ are\ equal 字符串值相等
menutrans Strings\ are\ not\ equal 字符串值不相等
menutrans Value\ is\ greater\ than 值大于
menutrans Value\ is\ greater\ equal 值大于等于
menutrans Values\ are\ equal 值相等
menutrans Values\ are\ not\ equal 值不相等
menutrans Value\ is\ less\ than 值小于
menutrans Value\ is\ less\ equal 值小于等于
menutrans ParmSub 参数替换
menutrans Substitute\ word\ if\ parm\ not\ set 如果参数没设置就替换该词
menutrans Set\ parm\ to\ word\ if\ not\ set 参数未设置就设为该词
menutrans Substitute\ word\ if\ parm\ set\ else\ nothing 如果参数设置就替换该词否则什么都不做
menutrans If\ parm\ not\ set\ print\ word\ and\ exit 如果参数没有设置就打印该词并退出
menutrans SpShVars Shell\ 特殊变量
menutrans Number\ of\ positional\ parameters 位置参数的数目
menutrans All\ positional\ parameters\ (quoted\ spaces) 所有位置参数(quoted\ spaces)
menutrans All\ positional\ parameters\ (unquoted\ spaces) 所有位置参数(unquoted\ spaces)
menutrans Flags\ set 设置标志
menutrans Return\ code\ of\ last\ command 返回前一条命令的代码
menutrans Process\ number\ of\ this\ shell shell\ 自身进程号
menutrans Process\ number\ of\ last\ background\ command 前一条后台命令的进程号
menutrans Environ 环境变量
menutrans Mark\ created\ or\ modified\ variables\ for\ export 标记修改的或者创建的变量为导出
menutrans Exit\ when\ command\ returns\ non-zero\ status 当命令返回非零状态时退出
menutrans Disable\ file\ name\ expansion 禁用文件名拓展
menutrans Locate\ and\ remember\ commands\ when\ being\ looked\ up 当查询命令时定位并记住该命令
menutrans All\ assignment\ statements\ are\ placed\ in\ the\ environment\ for\ a\ command 所有的赋值参数被放在命令的环境中
menutrans Read\ commands\ but\ do\ not\ execute\ them 读命令但是不要执行
menutrans Exit\ after\ reading\ and\ executing\ one\ command 读并执行一个命令之后退出
menutrans Treat\ unset\ variables\ as\ an\ error\ when\ substituting 替换时把未设置命令视为错误
menutrans Print\ shell\ input\ lines\ as\ they\ are\ read \ shell\ 输入行的时候打印
menutrans Print\ commands\ and\ their\ arguments\ as\ they\ are\ executed 被执行时打印命令和参数
" }}}
" termdebug menu
" termdebug menuitems {{{1
" From termdebug.vim
menutrans Set\ breakpoint 设置断点
menutrans Clear\ breakpoint 清除断点
menutrans Run\ until 运行到
menutrans Evaluate 求值
menutrans WinBar 工具条
menutrans Step 单步
menutrans Next 下一个
menutrans Finish 结束
menutrans Cont 继续
menutrans Stop 停止
" }}}
" debchangelog menu
" debchangelog menuitems {{{1
" From debchangelog.vim
menutrans &Changelog 更新日志(&C)
menutrans &New\ Version 新版本(&N)
menutrans &Add\ Entry 添加条目(&A)
menutrans &Close\ Bug 关闭\ Bug(&C)
menutrans Set\ &Distribution 设置发行版(&D)
menutrans &unstable 不稳定(&U)
menutrans Set\ &Urgency 设置紧急(&U)
menutrans &low (&L)
menutrans &medium (&M)
menutrans &high (&H)
menutrans U&nfinalise 未完成(&N)
menutrans &Finalise 完成(&F)
" }}}
" ada menu
" ada menuitems {{{1
" From ada.vim
menutrans Tag 标签
menutrans List 列表
menutrans Jump 跳转
menutrans Create\ File 创建文件
menutrans Create\ Dir 创建目录
menutrans Highlight 高亮
menutrans Toggle\ Space\ Errors 切换空格错误
menutrans Toggle\ Lines\ Errors 切换行错误
menutrans Toggle\ Rainbow\ Color 切换彩虹颜色
menutrans Toggle\ Standard\ Types 切换标准类型
" }}}
" gnat menu
" gnat menuitems {{{1
" From gnat.vim
menutrans Build 构建
menutrans Pretty\ Print 重新格式化代码
menutrans Find 查找
menutrans Set\ Projectfile\.\.\. 设置项目文件\.\.\.
" }}}
let &cpo = s:keepcpo
unlet s:keepcpo

View File

@@ -2,26 +2,10 @@
" Original Translation: Zoltán Árpádffy
" Maintained By: Kontra Gergely <kgergely@mcl.hu>
" Last Change: 2020 Apr 23
" Original translations
" I'm working on defining (unaccented) hotkeys for everything.
" I want to remove y and z hotkeys, because on the hungarian keymap they're at
" a differrent place.
" I also want to avoid g and j shortcuts, because you cannot see, wheter
" they're underlined or not.
" If the hotkeys are not uniq (pressing the hotkey doesn't executes the menu,
" just one menupoint is selected), or you find any other undesired behaviour,
" please report it to me.
" All kind of feedback is welcome.
"
" Igyekeztem mindenhez gyorsbillentyût rendelni, lehetõleg nem ékezeteset.
" További tennivaló az y és z gyorsbillentyûk kiirtása, ezenkívül a g, j
" billentyûk irtása is, mivel ez utóbbiak aláhúzott változatát nem könnyû
" felismerni.
" Amennyiben valahol nem egyértelmûk a gyorsbillentyûk (a gyorsbillentyût
" leütve nem hajtódik végre a kiszemelt menüpont, hanem csak kiválasztódik,
" vagy másik menüpont választódik ki), vagy egyéb hibát találsz, kérlek jelezd
" nekem a fenti email címen.
" Mindennemû visszajelzést szívesen fogadok.
" This file was converted from menu_hu_hu.iso_8859-2.vim. See there for
" remarks.
" Generated from menu_hu_hu.utf-8.vim, DO NOT EDIT
" Quit when menu translations have already been done.
if exists("did_menu_trans")

View File

@@ -1,7 +1,7 @@
" Menu Translations: Slovak
" Translated By: Martin Lacko <lacko@host.sk>
" Last Change: 2020 Apr 23
" Original translations
" Generated from menu_slovak_slovak_republic.1250.vim, DO NOT EDIT
" Quit when menu translations have already been done.
if exists("did_menu_trans")

View File

@@ -1,10 +1,15 @@
" Menu Translations: Simplified Chinese
" Maintainer: Shun Bai <baishunde@gmail.com>
" Previous Maintainer: Yuheng Xie <elephant@linux.net.cn>
" Last Change: 2022 Feb 19
" Maintainer: Ada (Haowen) Yu <me@yuhaowen.com>
" Previous Maintainer: Shun Bai <baishunde@gmail.com>, Yuheng Xie <elephant@linux.net.cn>
" Last Change: 2022 July 9
" Original translations
"
" Generated with the scripts from:
"
" https://github.com/adaext/vim-menutrans-helper
" Quit when menu translations have already been done.
if exists("did_menu_trans")
finish
endif
@@ -15,18 +20,18 @@ set cpo&vim
scriptencoding utf-8
" Help menu
menutrans &Help 帮助(&H)
menutrans &Help 帮助(&H)
" Help menuitems and dialog {{{1
menutrans &Overview<Tab><F1> 概述(&O)<Tab><F1>
menutrans &User\ Manual 用户手册(&U)
menutrans &How-to\ Links 如何使用(&H)
menutrans &Find\.\.\. 查找(&F)\.\.\.
menutrans &Credits 致谢(&C)
menutrans Co&pying 版权(&P)
menutrans &Sponsor/Register 赞助/注册(&S)
menutrans O&rphans 拯救孤儿(&R)
menutrans &Version 版本(&V)
menutrans &About 关于(&A)
menutrans &Overview<Tab><F1> 概述(&O)<Tab><F1>
menutrans &User\ Manual 用户手册(&U)
menutrans &How-to\ Links 如何使用(&H)
menutrans &Find\.\.\. 查找(&F)\.\.\.
menutrans &Credits 致谢(&C)
menutrans Co&pying 版权(&P)
menutrans &Sponsor/Register 赞助/注册(&S)
menutrans O&rphans 拯救孤儿(&R)
menutrans &Version 版本(&V)
menutrans &About 关于(&A)
" fun! s:Helpfind()
if !exists("g:menutrans_help_dialog")
@@ -35,67 +40,68 @@ endif
" }}}
" File menu
menutrans &File 文件(&F)
menutrans &File 文件(&F)
" File menuitems {{{1
menutrans &Open\.\.\.<Tab>:e 打开(&O)\.\.\.<Tab>:e
menutrans Sp&lit-Open\.\.\.<Tab>:sp 在拆分窗口打开(&L)\.\.\.<Tab>:sp
menutrans Open\ Tab\.\.\.<Tab>:tabnew 在标签页打开\.\.\.<Tab>:tabnew
menutrans &New<Tab>:enew 新建(&N)<Tab>:enew
menutrans &Close<Tab>:close 关闭(&C)<Tab>:close
menutrans &Save<Tab>:w 保存(&S)<Tab>:w
menutrans Save\ &As\.\.\.<Tab>:sav 另存为(&A)\.\.\.<Tab>:sav
menutrans Split\ &Diff\ With\.\.\. 拆分窗口以对比差异(Diff)(&D)\.\.\.
menutrans Split\ Patched\ &By\.\.\. 拆分窗口以进行修补(Patch)(&B)\.\.\.
menutrans &Print 打印(&P)
menutrans Sa&ve-Exit<Tab>:wqa 保存并退出(&V)<Tab>:wqa
menutrans E&xit<Tab>:qa 退出(&X)<Tab>:qa
menutrans &Open\.\.\.<Tab>:e 打开(&O)\.\.\.<Tab>:e
menutrans Sp&lit-Open\.\.\.<Tab>:sp 在拆分窗口打开(&L)\.\.\.<Tab>:sp
menutrans Open\ Tab\.\.\.<Tab>:tabnew 在标签页打开\.\.\.<Tab>:tabnew
menutrans &New<Tab>:enew 新建(&N)<Tab>:enew
menutrans &Close<Tab>:close 关闭(&C)<Tab>:close
menutrans &Save<Tab>:w 保存(&S)<Tab>:w
menutrans Save\ &As\.\.\.<Tab>:sav 另存为(&A)\.\.\.<Tab>:sav
menutrans Split\ &Diff\ With\.\.\. 拆分窗口以对比差异(Diff)(&D)\.\.\.
menutrans Split\ Patched\ &By\.\.\. 拆分窗口以进行修补(Patch)(&B)\.\.\.
menutrans &Print 打印(&P)
menutrans Sa&ve-Exit<Tab>:wqa 保存并退出(&V)<Tab>:wqa
menutrans E&xit<Tab>:qa 退出(&X)<Tab>:qa
" }}}
" Edit menu
menutrans &Edit 编辑(&E)
menutrans &Edit 编辑(&E)
" Edit menuitems {{{1
menutrans &Undo<Tab>u 撤销(&U)<Tab>u
menutrans &Redo<Tab>^R 恢复(&R)<Tab>^R
menutrans Rep&eat<Tab>\. 重复(&E)<Tab>\.
menutrans Cu&t<Tab>"+x 剪切(&T)<Tab>"+x
menutrans &Copy<Tab>"+y 复制(&C)<Tab>"+y
menutrans &Paste<Tab>"+gP 粘贴(&P)<Tab>"+gP
menutrans Put\ &Before<Tab>[p 粘贴到光标前(&B)<Tab>[p
menutrans Put\ &After<Tab>]p 粘贴到光标后(&A)<Tab>]p
menutrans &Delete<Tab>x 删除(&D)<Tab>x
menutrans &Select\ All<Tab>ggVG 全选(&S)<Tab>ggVG
menutrans &Find\.\.\. 查找(&F)\.\.\.
menutrans Find\ and\ Rep&lace\.\.\. 查找和替换(&L)\.\.\.
menutrans &Find<Tab>/ 查找(&F)<Tab>/
menutrans Find\ and\ Rep&lace<Tab>:%s 查找和替换(&L)<Tab>:%s
menutrans Settings\ &Window 设置窗口(&W)
menutrans Startup\ &Settings 启动设置(&S)
menutrans &Undo<Tab>u 撤销(&U)<Tab>u
menutrans &Redo<Tab>^R 恢复(&R)<Tab>^R
menutrans Rep&eat<Tab>\. 重复(&E)<Tab>\.
menutrans Cu&t<Tab>"+x 剪切(&T)<Tab>"+x
menutrans &Copy<Tab>"+y 复制(&C)<Tab>"+y
menutrans &Paste<Tab>"+gP 粘贴(&P)<Tab>"+gP
menutrans Put\ &Before<Tab>[p 粘贴到光标前(&B)<Tab>[p
menutrans Put\ &After<Tab>]p 粘贴到光标后(&A)<Tab>]p
menutrans &Delete<Tab>x 删除(&D)<Tab>x
menutrans &Select\ All<Tab>ggVG 全选(&S)<Tab>ggVG
menutrans &Find\.\.\. 查找(&F)\.\.\.
menutrans Find\ and\ Rep&lace\.\.\. 查找和替换(&L)\.\.\.
menutrans &Find<Tab>/ 查找(&F)<Tab>/
menutrans Find\ and\ Rep&lace<Tab>:%s 查找和替换(&L)<Tab>:%s
menutrans Find\ and\ Rep&lace<Tab>:s 查找和替换(&L)<Tab>:s
menutrans Settings\ &Window 设置窗口(&W)
menutrans Startup\ &Settings 启动设置(&S)
" Edit/Global Settings
menutrans &Global\ Settings 全局设置(&G)
menutrans &Global\ Settings 全局设置(&G)
" Edit.Global Settings menuitems and dialogs {{{2
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! /关高亮查找内容(&H)<Tab>:set\ hls!
menutrans Toggle\ &Ignoring\ Case<Tab>:set\ ic! /关忽略大小写(&I)<Tab>:set\ ic!
menutrans Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! /关显示括号匹配(&S)<Tab>:set\ sm!
menutrans &Context\ Lines 上下文行数(&C)
menutrans &Virtual\ Edit 虚拟编辑(&V)
menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! /关高亮查找内容(&H)<Tab>:set\ hls!
menutrans Toggle\ &Ignoring\ Case<Tab>:set\ ic! /关忽略大小写(&I)<Tab>:set\ ic!
menutrans Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! /关显示括号匹配(&S)<Tab>:set\ sm!
menutrans &Context\ Lines 上下文行数(&C)
menutrans &Virtual\ Edit 虚拟编辑(&V)
" Edit.Global Settings.Virtual Edit menuitems {{{3
menutrans Never 从不
menutrans Block\ Selection 只在选定矩形块时
menutrans Insert\ Mode 只在插入模式时
menutrans Block\ and\ Insert 在选定矩形块和插入模式时
menutrans Always 始终
menutrans Never 从不
menutrans Block\ Selection 只在选定矩形块时
menutrans Insert\ Mode 只在插入模式时
menutrans Block\ and\ Insert 在选定矩形块和插入模式时
menutrans Always 始终
" }}}
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! /关插入模式(&M)<Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatibility<Tab>:set\ cp! /\ Vi\ 兼容性(&O)<Tab>:set\ cp!
menutrans Search\ &Path\.\.\. 搜索路径(&P)\.\.\.
menutrans Ta&g\ Files\.\.\. 标记文件(Tags)(&G)\.\.\.
menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! /关插入模式(&M)<Tab>:set\ im!
menutrans Toggle\ Vi\ C&ompatibility<Tab>:set\ cp! /\ Vi\ 兼容性(&O)<Tab>:set\ cp!
menutrans Search\ &Path\.\.\. 搜索路径(&P)\.\.\.
menutrans Ta&g\ Files\.\.\. 标记文件(Tags)(&G)\.\.\.
" GUI options
menutrans Toggle\ &Toolbar /关工具栏(&T)
menutrans Toggle\ &Bottom\ Scrollbar /关底部滚动条(&B)
menutrans Toggle\ &Left\ Scrollbar /关左侧滚动条(&L)
menutrans Toggle\ &Right\ Scrollbar /关右侧滚动条(&R)
menutrans Toggle\ &Toolbar /关工具栏(&T)
menutrans Toggle\ &Bottom\ Scrollbar /关底部滚动条(&B)
menutrans Toggle\ &Left\ Scrollbar /关左侧滚动条(&L)
menutrans Toggle\ &Right\ Scrollbar /关右侧滚动条(&R)
" fun! s:SearchP()
if !exists("g:menutrans_path_dialog")
@@ -109,23 +115,23 @@ endif
" }}}
" Edit/File Settings
menutrans F&ile\ Settings 文件设置(&I)
menutrans F&ile\ Settings 文件设置(&I)
" Edit.File Settings menuitems and dialogs {{{2
" Boolean options
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! /关行号(&N)<Tab>:set\ nu!
menutrans Toggle\ Relati&ve\ Line\ Numbering<Tab>:set\ rnu! /关相对行号(&V)<Tab>:set\ rnu!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! /关列表模式(&L)<Tab>:set\ list!
menutrans Toggle\ Line\ &Wrapping<Tab>:set\ wrap! /关换行(&W)<Tab>:set\ wrap!
menutrans Toggle\ W&rapping\ at\ Word<Tab>:set\ lbr! /关词尾换行(&R)<Tab>:set\ lbr!
menutrans Toggle\ Tab\ &Expanding<Tab>:set\ et! /关制表符扩展(&E)<Tab>:set\ et!
menutrans Toggle\ &Auto\ Indenting<Tab>:set\ ai! /关自动缩进(&A)<Tab>:set\ ai!
menutrans Toggle\ &C-Style\ Indenting<Tab>:set\ cin! /\ C\ 语言式缩进(&C)<Tab>:set\ cin!
menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! /关行号(&N)<Tab>:set\ nu!
menutrans Toggle\ Relati&ve\ Line\ Numbering<Tab>:set\ rnu! /关相对行号(&V)<Tab>:set\ rnu!
menutrans Toggle\ &List\ Mode<Tab>:set\ list! /关列表模式(&L)<Tab>:set\ list!
menutrans Toggle\ Line\ &Wrapping<Tab>:set\ wrap! /关换行(&W)<Tab>:set\ wrap!
menutrans Toggle\ W&rapping\ at\ Word<Tab>:set\ lbr! /关词尾换行(&R)<Tab>:set\ lbr!
menutrans Toggle\ Tab\ &Expanding<Tab>:set\ et! /关制表符扩展(&E)<Tab>:set\ et!
menutrans Toggle\ &Auto\ Indenting<Tab>:set\ ai! /关自动缩进(&A)<Tab>:set\ ai!
menutrans Toggle\ &C-Style\ Indenting<Tab>:set\ cin! /\ C\ 语言式缩进(&C)<Tab>:set\ cin!
" other options
menutrans &Shiftwidth 缩进宽度(&S)
menutrans Soft\ &Tabstop 软制表位宽度(Soft\ Tabstop)(&T)
menutrans Te&xt\ Width\.\.\. 文本宽度(&X)\.\.\.
menutrans &File\ Format\.\.\. 文件格式(&F)\.\.\.
menutrans &Shiftwidth 缩进宽度(&S)
menutrans Soft\ &Tabstop 软制表位宽度(Soft\ Tabstop)(&T)
menutrans Te&xt\ Width\.\.\. 文本宽度(&X)\.\.\.
menutrans &File\ Format\.\.\. 文件格式(&F)\.\.\.
" fun! s:TextWidth()
if !exists("g:menutrans_textwidth_dialog")
@@ -140,36 +146,36 @@ if !exists("g:menutrans_fileformat_choices")
let g:menutrans_fileformat_choices = "&Unix\n&Dos\n&Mac\n取消(&C)"
endif
" }}}
menutrans Show\ C&olor\ Schemes\ in\ Menu 在菜单中显示配色方案(&O)
menutrans C&olor\ Scheme 配色方案(&O)
menutrans Show\ &Keymaps\ in\ Menu 在菜单中显示键盘映射(&K)
menutrans &Keymap 键盘映射(&K)
menutrans Select\ Fo&nt\.\.\. 选择字体(&N)\.\.\.
menutrans Show\ C&olor\ Schemes\ in\ Menu 在菜单中显示配色方案(&O)
menutrans C&olor\ Scheme 配色方案(&O)
menutrans Show\ &Keymaps\ in\ Menu 在菜单中显示键盘映射(&K)
menutrans &Keymap 键盘映射(&K)
menutrans Select\ Fo&nt\.\.\. 选择字体(&N)\.\.\.
" }}}
" Programming menu
menutrans &Tools 工具(&T)
menutrans &Tools 工具(&T)
" Tools menuitems {{{1
menutrans &Jump\ to\ This\ Tag<Tab>g^] 跳转到这个标记(Tag)(&J)<Tab>g^]
menutrans Jump\ &Back<Tab>^T 跳转回(&B)<Tab>^T
menutrans Build\ &Tags\ File 生成标记文件(Tags)(&T)
menutrans &Jump\ to\ This\ Tag<Tab>g^] 跳转到这个标记(Tag)(&J)<Tab>g^]
menutrans Jump\ &Back<Tab>^T 跳转回(&B)<Tab>^T
menutrans Build\ &Tags\ File 生成标记文件(Tags)(&T)
" Tools.Spelling Menu
menutrans &Spelling 拼写检查(&S)
menutrans &Spelling 拼写检查(&S)
" Tools.Spelling menuitems and dialog {{{2
menutrans &Spell\ Check\ On 打开拼写检查(&S)
menutrans Spell\ Check\ &Off 关闭拼写检查(&O)
menutrans To\ &Next\ Error<Tab>]s 上一个错误(&N)<Tab>]s
menutrans To\ &Previous\ Error<Tab>[s 下一个错误(&P)<Tab>[s
menutrans Suggest\ &Corrections<Tab>z= 更正建议(&C)<Tab>z=
menutrans &Repeat\ Correction<Tab>:spellrepall 更正全部同类错误(&R)<Tab>:spellrepall
menutrans Set\ Language\ to\ "en" 设置语言为\ "en"
menutrans Set\ Language\ to\ "en_au" 设置语言为\ "en_au"
menutrans Set\ Language\ to\ "en_ca" 设置语言为\ "en_ca"
menutrans Set\ Language\ to\ "en_gb" 设置语言为\ "en_gb"
menutrans Set\ Language\ to\ "en_nz" 设置语言为\ "en_nz"
menutrans Set\ Language\ to\ "en_us" 设置语言为\ "en_us"
menutrans &Find\ More\ Languages 查找更多语言(&F)
menutrans &Spell\ Check\ On 打开拼写检查(&S)
menutrans Spell\ Check\ &Off 关闭拼写检查(&O)
menutrans To\ &Next\ Error<Tab>]s 上一个错误(&N)<Tab>]s
menutrans To\ &Previous\ Error<Tab>[s 下一个错误(&P)<Tab>[s
menutrans Suggest\ &Corrections<Tab>z= 更正建议(&C)<Tab>z=
menutrans &Repeat\ Correction<Tab>:spellrepall 更正全部同类错误(&R)<Tab>:spellrepall
menutrans Set\ Language\ to\ "en" 设置语言为\ "en"
menutrans Set\ Language\ to\ "en_au" 设置语言为\ "en_au"
menutrans Set\ Language\ to\ "en_ca" 设置语言为\ "en_ca"
menutrans Set\ Language\ to\ "en_gb" 设置语言为\ "en_gb"
menutrans Set\ Language\ to\ "en_nz" 设置语言为\ "en_nz"
menutrans Set\ Language\ to\ "en_us" 设置语言为\ "en_us"
menutrans &Find\ More\ Languages 查找更多语言(&F)
" func! s:SpellLang()
if !exists("g:menutrans_set_lang_to")
@@ -178,113 +184,113 @@ endif
" }}}
" Tools.Fold Menu
menutrans &Folding 折叠(&F)
menutrans &Folding 折叠(&F)
" Tools.Fold menuitems {{{2
" open close folds
menutrans &Enable/Disable\ Folds<Tab>zi 启用/禁用折叠(&E)<Tab>zi
menutrans &View\ Cursor\ Line<Tab>zv 展开光标所在行(&V)<Tab>zv
menutrans Vie&w\ Cursor\ Line\ Only<Tab>zMzx 只展开光标所在行(&W)<Tab>zMzx
menutrans C&lose\ More\ Folds<Tab>zm 折叠一级(&L)<Tab>zm
menutrans &Close\ All\ Folds<Tab>zM 折叠全部(&C)<Tab>zM
menutrans O&pen\ More\ Folds<Tab>zr 展开一级(&P)<Tab>zr
menutrans &Open\ All\ Folds<Tab>zR 展开全部(&O)<Tab>zR
menutrans &Enable/Disable\ Folds<Tab>zi 启用/禁用折叠(&E)<Tab>zi
menutrans &View\ Cursor\ Line<Tab>zv 展开光标所在行(&V)<Tab>zv
menutrans Vie&w\ Cursor\ Line\ Only<Tab>zMzx 只展开光标所在行(&W)<Tab>zMzx
menutrans C&lose\ More\ Folds<Tab>zm 折叠一级(&L)<Tab>zm
menutrans &Close\ All\ Folds<Tab>zM 折叠全部(&C)<Tab>zM
menutrans O&pen\ More\ Folds<Tab>zr 展开一级(&P)<Tab>zr
menutrans &Open\ All\ Folds<Tab>zR 展开全部(&O)<Tab>zR
" fold method
menutrans Fold\ Met&hod 折叠方式(&H)
menutrans Fold\ Met&hod 折叠方式(&H)
" Tools.Fold.Fold Method menuitems {{{3
menutrans M&anual 手动(&A)
menutrans I&ndent 缩进(&N)
menutrans E&xpression 表达式(&X)
menutrans S&yntax 语法(&Y)
menutrans &Diff 差异(Diff)(&D)
menutrans Ma&rker 记号(Marker)(&R)
menutrans M&anual 手动(&A)
menutrans I&ndent 缩进(&N)
menutrans E&xpression 表达式(&X)
menutrans S&yntax 语法(&Y)
menutrans &Diff 差异(Diff)(&D)
menutrans Ma&rker 记号(Marker)(&R)
" }}}
" create and delete folds
menutrans Create\ &Fold<Tab>zf 创建折叠(&F)<Tab>zf
menutrans &Delete\ Fold<Tab>zd 删除折叠(&D)<Tab>zd
menutrans Delete\ &All\ Folds<Tab>zD 删除全部折叠(&A)<Tab>zD
menutrans Create\ &Fold<Tab>zf 创建折叠(&F)<Tab>zf
menutrans &Delete\ Fold<Tab>zd 删除折叠(&D)<Tab>zd
menutrans Delete\ &All\ Folds<Tab>zD 删除全部折叠(&A)<Tab>zD
" moving around in folds
menutrans Fold\ Col&umn\ Width 折叠操作栏宽度(&W)
menutrans Fold\ Col&umn\ Width 折叠操作栏宽度(&W)
" }}}
" Tools.Diff Menu
menutrans &Diff 差异(Diff)(&D)
menutrans &Diff 差异(Diff)(&D)
" Tools.Diff menuitems {{{2
menutrans &Update 刷新(&U)
menutrans &Get\ Block 采用对侧文本块(&G)
menutrans &Put\ Block 采用本侧文本块(&P)
menutrans &Update 刷新(&U)
menutrans &Get\ Block 采用对侧文本块(&G)
menutrans &Put\ Block 采用本侧文本块(&P)
" }}}
menutrans &Make<Tab>:make 生成(Make)(&M)<Tab>:make
menutrans &List\ Errors<Tab>:cl 列出错误(&L)<Tab>:cl
menutrans L&ist\ Messages<Tab>:cl! 列出消息(&I)<Tab>:cl!
menutrans &Next\ Error<Tab>:cn 下一个错误(&N)<Tab>:cn
menutrans &Previous\ Error<Tab>:cp 上一个错误(&P)<Tab>:cp
menutrans &Older\ List<Tab>:cold 较旧的错误列表(&O)<Tab>:cold
menutrans N&ewer\ List<Tab>:cnew 较新的错误列表(&E)<Tab>:cnew
menutrans Error\ &Window 错误窗口(&W)
menutrans &Make<Tab>:make 生成(Make)(&M)<Tab>:make
menutrans &List\ Errors<Tab>:cl 列出错误(&L)<Tab>:cl
menutrans L&ist\ Messages<Tab>:cl! 列出消息(&I)<Tab>:cl!
menutrans &Next\ Error<Tab>:cn 下一个错误(&N)<Tab>:cn
menutrans &Previous\ Error<Tab>:cp 上一个错误(&P)<Tab>:cp
menutrans &Older\ List<Tab>:cold 较旧的错误列表(&O)<Tab>:cold
menutrans N&ewer\ List<Tab>:cnew 较新的错误列表(&E)<Tab>:cnew
menutrans Error\ &Window 错误窗口(&W)
" Tools.Error Window menuitems {{{2
menutrans &Update<Tab>:cwin 刷新(&U)<Tab>:cwin
menutrans &Open<Tab>:copen 打开(&O)<Tab>:copen
menutrans &Close<Tab>:cclose 关闭(&C)<Tab>:cclose
menutrans &Update<Tab>:cwin 刷新(&U)<Tab>:cwin
menutrans &Open<Tab>:copen 打开(&O)<Tab>:copen
menutrans &Close<Tab>:cclose 关闭(&C)<Tab>:cclose
" }}}
menutrans Show\ Compiler\ Se&ttings\ in\ Menu 在菜单中显示编译器设置(&T)
menutrans Se&t\ Compiler 设置编译器(&T)
menutrans &Convert\ to\ HEX<Tab>:%!xxd 转换成十六进制(&C)<Tab>:%!xxd
menutrans Conve&rt\ Back<Tab>:%!xxd\ -r 转换回(&R)<Tab>:%!xxd\ -r
menutrans Show\ Compiler\ Se&ttings\ in\ Menu 在菜单中显示编译器设置(&T)
menutrans Se&t\ Compiler 设置编译器(&T)
menutrans &Convert\ to\ HEX<Tab>:%!xxd 转换成十六进制(&C)<Tab>:%!xxd
menutrans Conve&rt\ Back<Tab>:%!xxd\ -r 转换回(&R)<Tab>:%!xxd\ -r
" }}}
" Buffer menu
menutrans &Buffers 缓冲区(&B)
menutrans &Buffers 缓冲区(&B)
" Buffer menuitems and dialog {{{1
menutrans &Refresh\ Menu 刷新本菜单(&R)
menutrans &Delete 删除(&D)
menutrans &Alternate 切换(&A)
menutrans &Next 下一个(&N)
menutrans &Previous 上一个(&P)
menutrans &Refresh\ Menu 刷新本菜单(&R)
menutrans &Delete 删除(&D)
menutrans &Alternate 切换(&A)
menutrans &Next 下一个(&N)
menutrans &Previous 上一个(&P)
" func! s:BMMunge(fname, bnum)
" func! s:BMMunge(fname, bnum)
if !exists("g:menutrans_no_file")
let g:menutrans_no_file = "[无文件]"
endif
" }}}
" Window menu
menutrans &Window 窗口(&W)
menutrans &Window 窗口(&W)
" Window menuitems {{{1
menutrans &New<Tab>^Wn 新建(&N)<Tab>^Wn
menutrans S&plit<Tab>^Ws 拆分(&P)<Tab>^Ws
menutrans Sp&lit\ To\ #<Tab>^W^^ 拆分并显示缓冲区\ #(&L)<Tab>^W^^
menutrans Split\ &Vertically<Tab>^Wv 垂直拆分(&V)<Tab>^Wv
menutrans Split\ File\ E&xplorer 拆分并打开文件浏览器(&X)
menutrans &Close<Tab>^Wc 关闭(&C)<Tab>^Wc
menutrans Close\ &Other(s)<Tab>^Wo 除此之外全部关闭(&O)<Tab>^Wo
menutrans Move\ &To 移动到(&T)
menutrans &Top<Tab>^WK 顶端(&T)<Tab>^WK
menutrans &Bottom<Tab>^WJ 底端(&B)<Tab>^WJ
menutrans &Left\ Side<Tab>^WH 左边(&L)<Tab>^WH
menutrans &Right\ Side<Tab>^WL 右边(&R)<Tab>^WL
menutrans Rotate\ &Up<Tab>^WR 向上轮换(&U)<Tab>^WR
menutrans Rotate\ &Down<Tab>^Wr 向下轮换(&D)<Tab>^Wr
menutrans &Equal\ Size<Tab>^W= 平均分布(&E)<Tab>^W=
menutrans &Max\ Height<Tab>^W_ 最大高度(&M)<Tab>^W
menutrans M&in\ Height<Tab>^W1_ 最小高度(&I)<Tab>^W1_
menutrans Max\ &Width<Tab>^W\| 最大宽度(&W)<Tab>^W\|
menutrans Min\ Widt&h<Tab>^W1\| 最小宽度(&H)<Tab>^W1\|
menutrans &New<Tab>^Wn 新建(&N)<Tab>^Wn
menutrans S&plit<Tab>^Ws 拆分(&P)<Tab>^Ws
menutrans Sp&lit\ To\ #<Tab>^W^^ 拆分并显示缓冲区\ #(&L)<Tab>^W^^
menutrans Split\ &Vertically<Tab>^Wv 垂直拆分(&V)<Tab>^Wv
menutrans Split\ File\ E&xplorer 拆分并打开文件浏览器(&X)
menutrans &Close<Tab>^Wc 关闭(&C)<Tab>^Wc
menutrans Close\ &Other(s)<Tab>^Wo 除此之外全部关闭(&O)<Tab>^Wo
menutrans Move\ &To 移动到(&T)
menutrans &Top<Tab>^WK 顶端(&T)<Tab>^WK
menutrans &Bottom<Tab>^WJ 底端(&B)<Tab>^WJ
menutrans &Left\ Side<Tab>^WH 左边(&L)<Tab>^WH
menutrans &Right\ Side<Tab>^WL 右边(&R)<Tab>^WL
menutrans Rotate\ &Up<Tab>^WR 向上轮换(&U)<Tab>^WR
menutrans Rotate\ &Down<Tab>^Wr 向下轮换(&D)<Tab>^Wr
menutrans &Equal\ Size<Tab>^W= 平均分布(&E)<Tab>^W=
menutrans &Max\ Height<Tab>^W_ 最大高度(&M)<Tab>^W
menutrans M&in\ Height<Tab>^W1_ 最小高度(&I)<Tab>^W1_
menutrans Max\ &Width<Tab>^W\| 最大宽度(&W)<Tab>^W\|
menutrans Min\ Widt&h<Tab>^W1\| 最小宽度(&H)<Tab>^W1\|
" }}}
" The popup menu {{{1
menutrans &Undo 撤销(&U)
menutrans Cu&t 剪切(&T)
menutrans &Copy 复制(&C)
menutrans &Paste 粘贴(&P)
menutrans &Delete 删除(&D)
menutrans Select\ Blockwise 改为选定矩形块
menutrans Select\ &Word 选定单词(&W)
menutrans Select\ &Sentence 选定句(&S)
menutrans Select\ Pa&ragraph 选定段落(&R)
menutrans Select\ &Line 选定行(&L)
menutrans Select\ &Block 选定矩形块(&B)
menutrans Select\ &All 全选(&A)
menutrans &Undo 撤销(&U)
menutrans Cu&t 剪切(&T)
menutrans &Copy 复制(&C)
menutrans &Paste 粘贴(&P)
menutrans &Delete 删除(&D)
menutrans Select\ Blockwise 改为选定矩形块
menutrans Select\ &Word 选定单词(&W)
menutrans Select\ &Sentence 选定句(&S)
menutrans Select\ Pa&ragraph 选定段落(&R)
menutrans Select\ &Line 选定行(&L)
menutrans Select\ &Block 选定矩形块(&B)
menutrans Select\ &All 全选(&A)
" func! <SID>SpellPopup()
if !exists("g:menutrans_spell_change_ARG_to")
@@ -305,148 +311,260 @@ if has("toolbar")
endif
fun Do_toolbar_tmenu()
let did_toolbar_tmenu = 1
tmenu ToolBar.Open 打开文件
tmenu ToolBar.Save 保存当前文件
tmenu ToolBar.SaveAll 全部保存
tmenu ToolBar.Print 打印
tmenu ToolBar.Undo 撤销
tmenu ToolBar.Redo 恢复
tmenu ToolBar.Cut 剪切到剪贴板
tmenu ToolBar.Copy 复制到剪贴板
tmenu ToolBar.Paste 从剪贴板粘贴
tmenu ToolBar.Open 打开文件
tmenu ToolBar.Save 保存当前文件
tmenu ToolBar.SaveAll 全部保存
tmenu ToolBar.Print 打印
tmenu ToolBar.Undo 撤销
tmenu ToolBar.Redo 恢复
tmenu ToolBar.Cut 剪切到剪贴板
tmenu ToolBar.Copy 复制到剪贴板
tmenu ToolBar.Paste 从剪贴板粘贴
if !has("gui_athena")
tmenu ToolBar.Replace 查找和替换...
tmenu ToolBar.FindNext 查找下一个
tmenu ToolBar.FindPrev 查找上一个
tmenu ToolBar.Replace 查找和替换...
tmenu ToolBar.FindNext 查找下一个
tmenu ToolBar.FindPrev 查找上一个
endif
tmenu ToolBar.LoadSesn 加载会话
tmenu ToolBar.SaveSesn 保存当前会话
tmenu ToolBar.RunScript 运行 Vim 脚本
tmenu ToolBar.Make 生成当前项目 (:make)
tmenu ToolBar.RunCtags 在当前目录生成标记(Tags) (!ctags -R .)
tmenu ToolBar.TagJump 跳转到光标所在标记(Tag)
tmenu ToolBar.Help Vim 帮助
tmenu ToolBar.FindHelp Vim 帮助中查找
tmenu ToolBar.LoadSesn 加载会话
tmenu ToolBar.SaveSesn 保存当前会话
tmenu ToolBar.RunScript 运行 Vim 脚本
tmenu ToolBar.Make 生成当前项目 (:make)
tmenu ToolBar.RunCtags 在当前目录生成标记(Tags) (!ctags -R .)
tmenu ToolBar.TagJump 跳转到光标所在标记(Tag)
tmenu ToolBar.Help Vim 帮助
tmenu ToolBar.FindHelp Vim 帮助中查找
endfun
endif
" }}}
" Syntax menu
menutrans &Syntax 语法(&S)
menutrans &Syntax 语法(&S)
" Syntax menuitems {{{1
menutrans &Show\ File\ Types\ in\ Menu 在菜单中显示文件类型(&S)
menutrans &Off 关闭(&O)
menutrans &Manual 手动(&M)
menutrans A&utomatic 自动(&U)
menutrans On/Off\ for\ &This\ File 只对这个文件开/(&T)
menutrans Co&lor\ Test 色彩测试(&L)
menutrans &Highlight\ Test 高亮测试(&H)
menutrans &Convert\ to\ HTML 转换成\ HTML(&C)
menutrans &Show\ File\ Types\ in\ Menu 在菜单中显示文件类型(&S)
menutrans &Off 关闭(&O)
menutrans &Manual 手动(&M)
menutrans A&utomatic 自动(&U)
menutrans On/Off\ for\ &This\ File 只对这个文件开/(&T)
menutrans Co&lor\ Test 色彩测试(&L)
menutrans &Highlight\ Test 高亮测试(&H)
menutrans &Convert\ to\ HTML 转换成\ HTML(&C)
" From synmenu.vim
menutrans Set\ '&syntax'\ Only 只设置\ 'syntax'(&S)
menutrans Set\ '&filetype'\ Too 也设置\ 'filetype'(&F)
menutrans Set\ '&syntax'\ Only 只设置\ 'syntax'(&S)
menutrans Set\ '&filetype'\ Too 也设置\ 'filetype'(&F)
menutrans Oracle\ config Oracle\ 配置文件
menutrans Vim\ help\ file Vim\ 帮助文件
menutrans Vim\ script Vim\ 脚本
menutrans Viminfo\ file Vim\ 信息文件
menutrans Virata\ config Virata\ 配置文件
menutrans Whitespace\ (add) 增加加亮空格
" }}}
" Netrw menu {{{1
" Plugin loading may be after menu translation
" So giveup testing if Netrw Plugin is loaded
" if exists("g:loaded_netrwPlugin")
menutrans Help<tab><F1> 帮助<tab><F1>
menutrans Bookmarks 书签
menutrans History 历史记录
menutrans Go\ Up\ Directory<tab>- 向上一级<tab>-
menutrans Apply\ Special\ Viewer<tab>x 用默认程序打开<tab>x
menutrans Bookmarks\ and\ History 书签和历史记录
menutrans Help<tab><F1> 帮助<tab><F1>
menutrans Bookmarks 书签
menutrans History 历史记录
menutrans Go\ Up\ Directory<tab>- 向上一级<tab>-
menutrans Apply\ Special\ Viewer<tab>x 用默认程序打开<tab>x
menutrans Bookmarks\ and\ History 书签和历史记录
" Netrw.Bookmarks and History menuitems {{{2
menutrans Bookmark\ Current\ Directory<tab>mb 添加书签<tab>mb
menutrans Bookmark\ Delete 移除书签
menutrans Goto\ Prev\ Dir\ (History)<tab>u 后退(历史记录)<tab>u
menutrans Goto\ Next\ Dir\ (History)<tab>U 前进(历史记录)<tab>U
menutrans List<tab>qb 完整列表<tab>qb
menutrans Bookmark\ Current\ Directory<tab>mb 添加书签<tab>mb
menutrans Bookmark\ Delete 移除书签
menutrans Goto\ Prev\ Dir\ (History)<tab>u 后退(历史记录)<tab>u
menutrans Goto\ Next\ Dir\ (History)<tab>U 前进(历史记录)<tab>U
menutrans List<tab>qb 完整列表<tab>qb
" }}}
menutrans Browsing\ Control 控制
menutrans Browsing\ Control 控制
" Netrw.Browsing Control menuitems {{{2
menutrans Horizontal\ Split<tab>o 在拆分窗口打开<tab>o
menutrans Vertical\ Split<tab>v 在垂直拆分窗口打开<tab>v
menutrans New\ Tab<tab>t 在标签页打开<tab>t
menutrans Preview<tab>p 预览<tab>p
menutrans Edit\ File\ Hiding\ List<tab><ctrl-h> 编辑隐藏条件(Hiding\ List)<tab><ctrl-h>
menutrans Edit\ Sorting\ Sequence<tab>S 编辑排序条件(Sorting\ Sequence)<tab>S
menutrans Quick\ Hide/Unhide\ Dot\ Files<tab>gh 快速隐藏/显示以\.开头的文件<tab>gh
menutrans Refresh\ Listing<tab><ctrl-l> 刷新<tab><ctrl-l>
menutrans Settings/Options<tab>:NetrwSettings 设置/选项<tab>:NetrwSettings
menutrans Horizontal\ Split<tab>o 在拆分窗口打开<tab>o
menutrans Vertical\ Split<tab>v 在垂直拆分窗口打开<tab>v
menutrans New\ Tab<tab>t 在标签页打开<tab>t
menutrans Preview<tab>p 预览<tab>p
menutrans Edit\ File\ Hiding\ List<tab><ctrl-h> 编辑隐藏条件(Hiding\ List)<tab><ctrl-h>
menutrans Edit\ Sorting\ Sequence<tab>S 编辑排序条件(Sorting\ Sequence)<tab>S
menutrans Quick\ Hide/Unhide\ Dot\ Files<tab>gh 快速隐藏/显示以\.开头的文件<tab>gh
menutrans Refresh\ Listing<tab><ctrl-l> 刷新<tab><ctrl-l>
menutrans Settings/Options<tab>:NetrwSettings 设置/选项<tab>:NetrwSettings
" }}}
menutrans Delete\ File/Directory<tab>D 删除文件/目录<tab>D
menutrans Edit\ File/Dir 编辑文件/目录
menutrans Delete\ File/Directory<tab>D 删除文件/目录<tab>D
menutrans Edit\ File/Dir 编辑文件/目录
" Netrw.Edit File menuitems {{{2
menutrans Create\ New\ File<tab>% 新建文件<tab>%
menutrans In\ Current\ Window<tab><cr> 在当前窗口<tab><cr>
menutrans Preview\ File/Directory<tab>p 预览文件/目录<tab>p
menutrans In\ Previous\ Window<tab>P 在上一个窗口<tab>P
menutrans In\ New\ Window<tab>o 在新窗口<tab>o
menutrans In\ New\ Tab<tab>t 在新标签页<tab>t
menutrans In\ New\ Vertical\ Window<tab>v 在新垂直窗口<tab>v
menutrans Create\ New\ File<tab>% 新建文件<tab>%
menutrans In\ Current\ Window<tab><cr> 在当前窗口<tab><cr>
menutrans Preview\ File/Directory<tab>p 预览文件/目录<tab>p
menutrans In\ Previous\ Window<tab>P 在上一个窗口<tab>P
menutrans In\ New\ Window<tab>o 在新窗口<tab>o
menutrans In\ New\ Tab<tab>t 在新标签页<tab>t
menutrans In\ New\ Vertical\ Window<tab>v 在新垂直窗口<tab>v
" }}}
menutrans Explore 浏览
menutrans Explore 浏览
" Netrw.Explore menuitems {{{2
menutrans Directory\ Name 指定目录名
menutrans Filenames\ Matching\ Pattern\ (curdir\ only)<tab>:Explore\ */ 匹配指定文件名模式(当前目录)<tab>:Explore\ */
menutrans Filenames\ Matching\ Pattern\ (+subdirs)<tab>:Explore\ **/ 匹配指定文件名模式(含子目录)<tab>:Explore\ **/
menutrans Files\ Containing\ String\ Pattern\ (curdir\ only)<tab>:Explore\ *// 内容包含指定字符串模式(当前目录)<tab>:Explore\ *//
menutrans Files\ Containing\ String\ Pattern\ (+subdirs)<tab>:Explore\ **// 内容包含指定字符串模式(含子目录)<tab>:Explore\ **//
menutrans Next\ Match<tab>:Nexplore 下一个匹配项<tab>:Nexplore
menutrans Prev\ Match<tab>:Pexplore 上一个匹配项<tab>:Pexplore
menutrans Directory\ Name 指定目录名
menutrans Filenames\ Matching\ Pattern\ (curdir\ only)<tab>:Explore\ */ 匹配指定文件名模式(当前目录)<tab>:Explore\ */
menutrans Filenames\ Matching\ Pattern\ (+subdirs)<tab>:Explore\ **/ 匹配指定文件名模式(含子目录)<tab>:Explore\ **/
menutrans Files\ Containing\ String\ Pattern\ (curdir\ only)<tab>:Explore\ *// 内容包含指定字符串模式(当前目录)<tab>:Explore\ *//
menutrans Files\ Containing\ String\ Pattern\ (+subdirs)<tab>:Explore\ **// 内容包含指定字符串模式(含子目录)<tab>:Explore\ **//
menutrans Next\ Match<tab>:Nexplore 下一个匹配项<tab>:Nexplore
menutrans Prev\ Match<tab>:Pexplore 上一个匹配项<tab>:Pexplore
" }}}
menutrans Make\ Subdirectory<tab>d 新建子目录<tab>d
menutrans Marked\ Files 选定的(Marked)文件
menutrans Make\ Subdirectory<tab>d 新建子目录<tab>d
menutrans Marked\ Files 选定的(Marked)文件
" Netrw.Marked Files menuitems {{{2
menutrans Mark\ File<tab>mf 选定(Mark)/取消<tab>mf
menutrans Mark\ Files\ by\ Regexp<tab>mr 用正则表达式(Regexp)选定<tab>mr
menutrans Hide-Show-List\ Control<tab>a 隐藏/显示<tab>a
menutrans Copy\ To\ Target<tab>mc 复制到目标<tab>mc
menutrans Delete<tab>D 删除<tab>D
menutrans Diff<tab>md 差异(Diff)<tab>md
menutrans Edit<tab>me 编辑<tab>me
menutrans Exe\ Cmd<tab>mx 作为参数运行命令<tab>mx
menutrans Move\ To\ Target<tab>mm 移动到目标<tab>mm
menutrans Obtain<tab>O 获取<tab>O
menutrans Print<tab>mp 打印<tab>mp
menutrans Replace<tab>R 替换<tab>R
menutrans Set\ Target<tab>mt 设置目标<tab>mt
menutrans Tag<tab>mT 生成标记文件(Tags)<tab>mT
menutrans Zip/Unzip/Compress/Uncompress<tab>mz 压缩/解压缩<tab>mz
menutrans Mark\ File<tab>mf 选定(Mark)/取消<tab>mf
menutrans Mark\ Files\ by\ Regexp<tab>mr 用正则表达式(Regexp)选定<tab>mr
menutrans Hide-Show-List\ Control<tab>a 隐藏/显示<tab>a
menutrans Copy\ To\ Target<tab>mc 复制到目标<tab>mc
menutrans Delete<tab>D 删除<tab>D
menutrans Diff<tab>md 差异(Diff)<tab>md
menutrans Edit<tab>me 编辑<tab>me
menutrans Exe\ Cmd<tab>mx 作为参数运行命令<tab>mx
menutrans Move\ To\ Target<tab>mm 移动到目标<tab>mm
menutrans Obtain<tab>O 获取<tab>O
menutrans Print<tab>mp 打印<tab>mp
menutrans Replace<tab>R 替换<tab>R
menutrans Set\ Target<tab>mt 设置目标<tab>mt
menutrans Tag<tab>mT 生成标记文件(Tags)<tab>mT
menutrans Zip/Unzip/Compress/Uncompress<tab>mz 压缩/解压缩<tab>mz
" }}}
menutrans Obtain\ File<tab>O 获取文件<tab>O
menutrans Style 显示风格
menutrans Obtain\ File<tab>O 获取文件<tab>O
menutrans Style 显示风格
" Netrw.Style menuitems {{{2
menutrans Listing 列表形式
menutrans Listing 列表形式
" Netrw.Style.Listing menuitems {{{3
menutrans thin<tab>i 紧凑<thin)<tab>i
menutrans long<tab>i 详细(long)<tab>i
menutrans wide<tab>i 多列(wide)<tab>i
menutrans tree<tab>i 树状(tree)<tab>i
menutrans thin<tab>i 紧凑<thin)<tab>i
menutrans long<tab>i 详细(long)<tab>i
menutrans wide<tab>i 多列(wide)<tab>i
menutrans tree<tab>i 树状(tree)<tab>i
" }}}
menutrans Normal-Hide-Show 显示/隐藏
menutrans Normal-Hide-Show 显示/隐藏
" Netrw.Style.Normal-Hide_show menuitems {{{3
menutrans Show\ All<tab>a 显示全部
menutrans Normal<tab>a 不显示隐藏文件
menutrans Hidden\ Only<tab>a 只显示隐藏文件
menutrans Show\ All<tab>a 显示全部
menutrans Normal<tab>a 不显示隐藏文件
menutrans Hidden\ Only<tab>a 只显示隐藏文件
" }}}
menutrans Reverse\ Sorting\ Order<tab>r 升序/降序<tab>r
menutrans Sorting\ Method 排序方式
menutrans Reverse\ Sorting\ Order<tab>r 升序/降序<tab>r
menutrans Sorting\ Method 排序方式
" Netrw.Style.Sorting Method menuitems {{{3
menutrans Name<tab>s 文件名<tab>s
menutrans Time<tab>s 修改时间<tab>s
menutrans Size<tab>s 大小<tab>s
menutrans Exten<tab>s 扩展名<tab>s
menutrans Name<tab>s 文件名<tab>s
menutrans Time<tab>s 修改时间<tab>s
menutrans Size<tab>s 大小<tab>s
menutrans Exten<tab>s 扩展名<tab>s
" }}}
" }}}
menutrans Rename\ File/Directory<tab>R 重命名文件/目录<tab>R
menutrans Set\ Current\ Directory<tab>c 设置\ Vim\ 工作目录<tab>c
menutrans Targets 目标
menutrans Rename\ File/Directory<tab>R 重命名文件/目录<tab>R
menutrans Set\ Current\ Directory<tab>c 设置\ Vim\ 工作目录<tab>c
menutrans Targets 目标
" endif
" }}}
" Shellmenu menu
" Shellmenu menuitems {{{1
" From shellmenu.vim
menutrans ShellMenu Shell\ 菜单
menutrans Statements 语句
menutrans Test 测试
menutrans Existence 存在
menutrans Existence\ -\ file 存在\ -\ 文件
menutrans Existence\ -\ file\ (not\ empty) 存在\ -\ 文件(非空)
menutrans Existence\ -\ directory 存在\ -\ 目录
menutrans Existence\ -\ executable 存在\ -\ 可执行
menutrans Existence\ -\ readable 存在\ -\ 可读
menutrans Existence\ -\ writable 存在\ -\ 可写
menutrans String\ is\ empty 字符串为空
menutrans String\ is\ not\ empty 字符串非空
menutrans Strings\ are\ equal 字符串值相等
menutrans Strings\ are\ not\ equal 字符串值不相等
menutrans Value\ is\ greater\ than 值大于
menutrans Value\ is\ greater\ equal 值大于等于
menutrans Values\ are\ equal 值相等
menutrans Values\ are\ not\ equal 值不相等
menutrans Value\ is\ less\ than 值小于
menutrans Value\ is\ less\ equal 值小于等于
menutrans ParmSub 参数替换
menutrans Substitute\ word\ if\ parm\ not\ set 如果参数没设置就替换该词
menutrans Set\ parm\ to\ word\ if\ not\ set 参数未设置就设为该词
menutrans Substitute\ word\ if\ parm\ set\ else\ nothing 如果参数设置就替换该词否则什么都不做
menutrans If\ parm\ not\ set\ print\ word\ and\ exit 如果参数没有设置就打印该词并退出
menutrans SpShVars Shell\ 特殊变量
menutrans Number\ of\ positional\ parameters 位置参数的数目
menutrans All\ positional\ parameters\ (quoted\ spaces) 所有位置参数(quoted\ spaces)
menutrans All\ positional\ parameters\ (unquoted\ spaces) 所有位置参数(unquoted\ spaces)
menutrans Flags\ set 设置标志
menutrans Return\ code\ of\ last\ command 返回前一条命令的代码
menutrans Process\ number\ of\ this\ shell shell\ 自身进程号
menutrans Process\ number\ of\ last\ background\ command 前一条后台命令的进程号
menutrans Environ 环境变量
menutrans Mark\ created\ or\ modified\ variables\ for\ export 标记修改的或者创建的变量为导出
menutrans Exit\ when\ command\ returns\ non-zero\ status 当命令返回非零状态时退出
menutrans Disable\ file\ name\ expansion 禁用文件名拓展
menutrans Locate\ and\ remember\ commands\ when\ being\ looked\ up 当查询命令时定位并记住该命令
menutrans All\ assignment\ statements\ are\ placed\ in\ the\ environment\ for\ a\ command 所有的赋值参数被放在命令的环境中
menutrans Read\ commands\ but\ do\ not\ execute\ them 读命令但是不要执行
menutrans Exit\ after\ reading\ and\ executing\ one\ command 读并执行一个命令之后退出
menutrans Treat\ unset\ variables\ as\ an\ error\ when\ substituting 替换时把未设置命令视为错误
menutrans Print\ shell\ input\ lines\ as\ they\ are\ read \ shell\ 输入行的时候打印
menutrans Print\ commands\ and\ their\ arguments\ as\ they\ are\ executed 被执行时打印命令和参数
" }}}
" termdebug menu
" termdebug menuitems {{{1
" From termdebug.vim
menutrans Set\ breakpoint 设置断点
menutrans Clear\ breakpoint 清除断点
menutrans Run\ until 运行到
menutrans Evaluate 求值
menutrans WinBar 工具条
menutrans Step 单步
menutrans Next 下一个
menutrans Finish 结束
menutrans Cont 继续
menutrans Stop 停止
" }}}
" debchangelog menu
" debchangelog menuitems {{{1
" From debchangelog.vim
menutrans &Changelog 更新日志(&C)
menutrans &New\ Version 新版本(&N)
menutrans &Add\ Entry 添加条目(&A)
menutrans &Close\ Bug 关闭\ Bug(&C)
menutrans Set\ &Distribution 设置发行版(&D)
menutrans &unstable 不稳定(&U)
menutrans Set\ &Urgency 设置紧急(&U)
menutrans &low (&L)
menutrans &medium (&M)
menutrans &high (&H)
menutrans U&nfinalise 未完成(&N)
menutrans &Finalise 完成(&F)
" }}}
" ada menu
" ada menuitems {{{1
" From ada.vim
menutrans Tag 标签
menutrans List 列表
menutrans Jump 跳转
menutrans Create\ File 创建文件
menutrans Create\ Dir 创建目录
menutrans Highlight 高亮
menutrans Toggle\ Space\ Errors 切换空格错误
menutrans Toggle\ Lines\ Errors 切换行错误
menutrans Toggle\ Rainbow\ Color 切换彩虹颜色
menutrans Toggle\ Standard\ Types 切换标准类型
" }}}
" gnat menu
" gnat menuitems {{{1
" From gnat.vim
menutrans Build 构建
menutrans Pretty\ Print 重新格式化代码
menutrans Find 查找
menutrans Set\ Projectfile\.\.\. 设置项目文件\.\.\.
" }}}
let &cpo = s:keepcpo
unlet s:keepcpo

View File

@@ -1,62 +1,72 @@
" cfilter.vim: Plugin to filter entries from a quickfix/location list
" Last Change: Aug 23, 2018
" Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
" Version: 1.1
"
" Commands to filter the quickfix list:
" :Cfilter[!] /{pat}/
" Create a new quickfix list from entries matching {pat} in the current
" quickfix list. Both the file name and the text of the entries are
" matched against {pat}. If ! is supplied, then entries not matching
" {pat} are used. The pattern can be optionally enclosed using one of
" the following characters: ', ", /. If the pattern is empty, then the
" last used search pattern is used.
" :Lfilter[!] /{pat}/
" Same as :Cfilter but operates on the current location list.
"
if exists("loaded_cfilter")
finish
endif
let loaded_cfilter = 1
vim9script
func s:Qf_filter(qf, searchpat, bang)
if a:qf
let Xgetlist = function('getqflist')
let Xsetlist = function('setqflist')
let cmd = ':Cfilter' . a:bang
else
let Xgetlist = function('getloclist', [0])
let Xsetlist = function('setloclist', [0])
let cmd = ':Lfilter' . a:bang
endif
# cfilter.vim: Plugin to filter entries from a quickfix/location list
# Last Change: Jun 30, 2022
# Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
# Version: 2.0
#
# Commands to filter the quickfix list:
# :Cfilter[!] /{pat}/
# Create a new quickfix list from entries matching {pat} in the current
# quickfix list. Both the file name and the text of the entries are
# matched against {pat}. If ! is supplied, then entries not matching
# {pat} are used. The pattern can be optionally enclosed using one of
# the following characters: ', ", /. If the pattern is empty, then the
# last used search pattern is used.
# :Lfilter[!] /{pat}/
# Same as :Cfilter but operates on the current location list.
#
let firstchar = a:searchpat[0]
let lastchar = a:searchpat[-1:]
if firstchar == lastchar &&
\ (firstchar == '/' || firstchar == '"' || firstchar == "'")
let pat = a:searchpat[1:-2]
if pat == ''
" Use the last search pattern
let pat = @/
endif
else
let pat = a:searchpat
endif
def Qf_filter(qf: bool, searchpat: string, bang: string)
var Xgetlist: func
var Xsetlist: func
var cmd: string
var firstchar: string
var lastchar: string
var pat: string
var title: string
var Cond: func
var items: list<any>
if qf
Xgetlist = function('getqflist')
Xsetlist = function('setqflist')
cmd = ':Cfilter' .. bang
else
Xgetlist = function('getloclist', [0])
Xsetlist = function('setloclist', [0])
cmd = ':Lfilter' .. bang
endif
firstchar = searchpat[0]
lastchar = searchpat[-1 :]
if firstchar == lastchar &&
(firstchar == '/' || firstchar == '"' || firstchar == "'")
pat = searchpat[1 : -2]
if pat == ''
return
# Use the last search pattern
pat = @/
endif
else
pat = searchpat
endif
if a:bang == '!'
let cond = 'v:val.text !~# pat && bufname(v:val.bufnr) !~# pat'
else
let cond = 'v:val.text =~# pat || bufname(v:val.bufnr) =~# pat'
endif
if pat == ''
return
endif
let items = filter(Xgetlist(), cond)
let title = cmd . ' /' . pat . '/'
call Xsetlist([], ' ', {'title' : title, 'items' : items})
endfunc
if bang == '!'
Cond = (_, val) => val.text !~# pat && bufname(val.bufnr) !~# pat
else
Cond = (_, val) => val.text =~# pat || bufname(val.bufnr) =~# pat
endif
com! -nargs=+ -bang Cfilter call s:Qf_filter(1, <q-args>, <q-bang>)
com! -nargs=+ -bang Lfilter call s:Qf_filter(0, <q-args>, <q-bang>)
items = filter(Xgetlist(), Cond)
title = cmd .. ' /' .. pat .. '/'
Xsetlist([], ' ', {title: title, items: items})
enddef
command! -nargs=+ -bang Cfilter Qf_filter(true, <q-args>, <q-bang>)
command! -nargs=+ -bang Lfilter Qf_filter(false, <q-args>, <q-bang>)
# vim: shiftwidth=2 sts=2 expandtab

View File

@@ -15,89 +15,89 @@
let s:cpo_save = &cpo
set cpo&vim
imenu Stmts.for for in <CR>do<CR><CR>done<esc>ki <esc>kk0elli
imenu Stmts.case case in<CR>) ;;<CR>esac<esc>bki <esc>k0elli
imenu Stmts.if if <CR>then<CR><CR>fi<esc>ki <esc>kk0elli
imenu Stmts.if-else if <CR>then<CR><CR>else<CR><CR>fi<esc>ki <esc>kki <esc>kk0elli
imenu Stmts.elif elif <CR>then<CR><CR><esc>ki <esc>kk0elli
imenu Stmts.while while do<CR><CR>done<esc>ki <esc>kk0elli
imenu Stmts.break break
imenu Stmts.continue continue
imenu Stmts.function () {<CR><CR>}<esc>ki <esc>k0i
imenu Stmts.return return
imenu Stmts.return-true return 0
imenu Stmts.return-false return 1
imenu Stmts.exit exit
imenu Stmts.shift shift
imenu Stmts.trap trap
imenu Test.existence [ -e ]<esc>hi
imenu Test.existence\ -\ file [ -f ]<esc>hi
imenu Test.existence\ -\ file\ (not\ empty) [ -s ]<esc>hi
imenu Test.existence\ -\ directory [ -d ]<esc>hi
imenu Test.existence\ -\ executable [ -x ]<esc>hi
imenu Test.existence\ -\ readable [ -r ]<esc>hi
imenu Test.existence\ -\ writable [ -w ]<esc>hi
imenu Test.String\ is\ empty [ x = "x$" ]<esc>hhi
imenu Test.String\ is\ not\ empty [ x != "x$" ]<esc>hhi
imenu Test.Strings\ is\ equal [ "" = "" ]<esc>hhhhhhhi
imenu Test.Strings\ is\ not\ equal [ "" != "" ]<esc>hhhhhhhhi
imenu Test.Values\ is\ greater\ than [ -gt ]<esc>hhhhhhi
imenu Test.Values\ is\ greater\ equal [ -ge ]<esc>hhhhhhi
imenu Test.Values\ is\ equal [ -eq ]<esc>hhhhhhi
imenu Test.Values\ is\ not\ equal [ -ne ]<esc>hhhhhhi
imenu Test.Values\ is\ less\ than [ -lt ]<esc>hhhhhhi
imenu Test.Values\ is\ less\ equal [ -le ]<esc>hhhhhhi
imenu ParmSub.Substitute\ word\ if\ parm\ not\ set ${:-}<esc>hhi
imenu ParmSub.Set\ parm\ to\ word\ if\ not\ set ${:=}<esc>hhi
imenu ParmSub.Substitute\ word\ if\ parm\ set\ else\ nothing ${:+}<esc>hhi
imenu ParmSub.If\ parm\ not\ set\ print\ word\ and\ exit ${:?}<esc>hhi
imenu SpShVars.Number\ of\ positional\ parameters ${#}
imenu SpShVars.All\ positional\ parameters\ (quoted\ spaces) ${*}
imenu SpShVars.All\ positional\ parameters\ (unquoted\ spaces) ${@}
imenu SpShVars.Flags\ set ${-}
imenu SpShVars.Return\ code\ of\ last\ command ${?}
imenu SpShVars.Process\ number\ of\ this\ shell ${$}
imenu SpShVars.Process\ number\ of\ last\ background\ command ${!}
imenu Environ.HOME ${HOME}
imenu Environ.PATH ${PATH}
imenu Environ.CDPATH ${CDPATH}
imenu Environ.MAIL ${MAIL}
imenu Environ.MAILCHECK ${MAILCHECK}
imenu Environ.PS1 ${PS1}
imenu Environ.PS2 ${PS2}
imenu Environ.IFS ${IFS}
imenu Environ.SHACCT ${SHACCT}
imenu Environ.SHELL ${SHELL}
imenu Environ.LC_CTYPE ${LC_CTYPE}
imenu Environ.LC_MESSAGES ${LC_MESSAGES}
imenu Builtins.cd cd
imenu Builtins.echo echo
imenu Builtins.eval eval
imenu Builtins.exec exec
imenu Builtins.export export
imenu Builtins.getopts getopts
imenu Builtins.hash hash
imenu Builtins.newgrp newgrp
imenu Builtins.pwd pwd
imenu Builtins.read read
imenu Builtins.readonly readonly
imenu Builtins.return return
imenu Builtins.times times
imenu Builtins.type type
imenu Builtins.umask umask
imenu Builtins.wait wait
imenu Set.set set
imenu Set.unset unset
imenu Set.mark\ modified\ or\ modified\ variables set -a
imenu Set.exit\ when\ command\ returns\ non-zero\ exit\ code set -e
imenu Set.Disable\ file\ name\ generation set -f
imenu Set.remember\ function\ commands set -h
imenu Set.All\ keyword\ arguments\ are\ placed\ in\ the\ environment set -k
imenu Set.Read\ commands\ but\ do\ not\ execute\ them set -n
imenu Set.Exit\ after\ reading\ and\ executing\ one\ command set -t
imenu Set.Treat\ unset\ variables\ as\ an\ error\ when\ substituting set -u
imenu Set.Print\ shell\ input\ lines\ as\ they\ are\ read set -v
imenu Set.Print\ commands\ and\ their\ arguments\ as\ they\ are\ executed set -x
imenu ShellMenu.Statements.for for in <CR>do<CR><CR>done<esc>ki <esc>kk0elli
imenu ShellMenu.Statements.case case in<CR>) ;;<CR>esac<esc>bki <esc>k0elli
imenu ShellMenu.Statements.if if <CR>then<CR><CR>fi<esc>ki <esc>kk0elli
imenu ShellMenu.Statements.if-else if <CR>then<CR><CR>else<CR><CR>fi<esc>ki <esc>kki <esc>kk0elli
imenu ShellMenu.Statements.elif elif <CR>then<CR><CR><esc>ki <esc>kk0elli
imenu ShellMenu.Statements.while while do<CR><CR>done<esc>ki <esc>kk0elli
imenu ShellMenu.Statements.break break
imenu ShellMenu.Statements.continue continue
imenu ShellMenu.Statements.function () {<CR><CR>}<esc>ki <esc>k0i
imenu ShellMenu.Statements.return return
imenu ShellMenu.Statements.return-true return 0
imenu ShellMenu.Statements.return-false return 1
imenu ShellMenu.Statements.exit exit
imenu ShellMenu.Statements.shift shift
imenu ShellMenu.Statements.trap trap
imenu ShellMenu.Test.Existence [ -e ]<esc>hi
imenu ShellMenu.Test.Existence\ -\ file [ -f ]<esc>hi
imenu ShellMenu.Test.Existence\ -\ file\ (not\ empty) [ -s ]<esc>hi
imenu ShellMenu.Test.Existence\ -\ directory [ -d ]<esc>hi
imenu ShellMenu.Test.Existence\ -\ executable [ -x ]<esc>hi
imenu ShellMenu.Test.Existence\ -\ readable [ -r ]<esc>hi
imenu ShellMenu.Test.Existence\ -\ writable [ -w ]<esc>hi
imenu ShellMenu.Test.String\ is\ empty [ x = "x$" ]<esc>hhi
imenu ShellMenu.Test.String\ is\ not\ empty [ x != "x$" ]<esc>hhi
imenu ShellMenu.Test.Strings\ are\ equal [ "" = "" ]<esc>hhhhhhhi
imenu ShellMenu.Test.Strings\ are\ not\ equal [ "" != "" ]<esc>hhhhhhhhi
imenu ShellMenu.Test.Value\ is\ greater\ than [ -gt ]<esc>hhhhhhi
imenu ShellMenu.Test.Value\ is\ greater\ equal [ -ge ]<esc>hhhhhhi
imenu ShellMenu.Test.Values\ are\ equal [ -eq ]<esc>hhhhhhi
imenu ShellMenu.Test.Values\ are\ not\ equal [ -ne ]<esc>hhhhhhi
imenu ShellMenu.Test.Value\ is\ less\ than [ -lt ]<esc>hhhhhhi
imenu ShellMenu.Test.Value\ is\ less\ equal [ -le ]<esc>hhhhhhi
imenu ShellMenu.ParmSub.Substitute\ word\ if\ parm\ not\ set ${:-}<esc>hhi
imenu ShellMenu.ParmSub.Set\ parm\ to\ word\ if\ not\ set ${:=}<esc>hhi
imenu ShellMenu.ParmSub.Substitute\ word\ if\ parm\ set\ else\ nothing ${:+}<esc>hhi
imenu ShellMenu.ParmSub.If\ parm\ not\ set\ print\ word\ and\ exit ${:?}<esc>hhi
imenu ShellMenu.SpShVars.Number\ of\ positional\ parameters ${#}
imenu ShellMenu.SpShVars.All\ positional\ parameters\ (quoted\ spaces) ${*}
imenu ShellMenu.SpShVars.All\ positional\ parameters\ (unquoted\ spaces) ${@}
imenu ShellMenu.SpShVars.Flags\ set ${-}
imenu ShellMenu.SpShVars.Return\ code\ of\ last\ command ${?}
imenu ShellMenu.SpShVars.Process\ number\ of\ this\ shell ${$}
imenu ShellMenu.SpShVars.Process\ number\ of\ last\ background\ command ${!}
imenu ShellMenu.Environ.HOME ${HOME}
imenu ShellMenu.Environ.PATH ${PATH}
imenu ShellMenu.Environ.CDPATH ${CDPATH}
imenu ShellMenu.Environ.MAIL ${MAIL}
imenu ShellMenu.Environ.MAILCHECK ${MAILCHECK}
imenu ShellMenu.Environ.PS1 ${PS1}
imenu ShellMenu.Environ.PS2 ${PS2}
imenu ShellMenu.Environ.IFS ${IFS}
imenu ShellMenu.Environ.SHACCT ${SHACCT}
imenu ShellMenu.Environ.SHELL ${SHELL}
imenu ShellMenu.Environ.LC_CTYPE ${LC_CTYPE}
imenu ShellMenu.Environ.LC_MESSAGES ${LC_MESSAGES}
imenu ShellMenu.Builtins.cd cd
imenu ShellMenu.Builtins.echo echo
imenu ShellMenu.Builtins.eval eval
imenu ShellMenu.Builtins.exec exec
imenu ShellMenu.Builtins.export export
imenu ShellMenu.Builtins.getopts getopts
imenu ShellMenu.Builtins.hash hash
imenu ShellMenu.Builtins.newgrp newgrp
imenu ShellMenu.Builtins.pwd pwd
imenu ShellMenu.Builtins.read read
imenu ShellMenu.Builtins.readonly readonly
imenu ShellMenu.Builtins.return return
imenu ShellMenu.Builtins.times times
imenu ShellMenu.Builtins.type type
imenu ShellMenu.Builtins.umask umask
imenu ShellMenu.Builtins.wait wait
imenu ShellMenu.Set.set set
imenu ShellMenu.Set.unset unset
imenu ShellMenu.Set.Mark\ created\ or\ modified\ variables\ for\ export set -a
imenu ShellMenu.Set.Exit\ when\ command\ returns\ non-zero\ status set -e
imenu ShellMenu.Set.Disable\ file\ name\ expansion set -f
imenu ShellMenu.Set.Locate\ and\ remember\ commands\ when\ being\ looked\ up set -h
imenu ShellMenu.Set.All\ assignment\ statements\ are\ placed\ in\ the\ environment\ for\ a\ command set -k
imenu ShellMenu.Set.Read\ commands\ but\ do\ not\ execute\ them set -n
imenu ShellMenu.Set.Exit\ after\ reading\ and\ executing\ one\ command set -t
imenu ShellMenu.Set.Treat\ unset\ variables\ as\ an\ error\ when\ substituting set -u
imenu ShellMenu.Set.Print\ shell\ input\ lines\ as\ they\ are\ read set -v
imenu ShellMenu.Set.Print\ commands\ and\ their\ arguments\ as\ they\ are\ executed set -x
" Restore the previous value of 'cpoptions'.
let &cpo = s:cpo_save

View File

@@ -40,6 +40,20 @@ continues monotonically after the last flag number in cyrillic .aff file.
A couple of words in cyrillic dict used a latin codepoints for 'a' and 'e',
that was also corrected.
You should be able to reproduce this with these steps:
* Save the existing sr.aff and sr.dic files, if you have them, they will be
overwritten.
* Create a subfolder "new".
* Put 4 files downloaded from LibreOffice dictionaries GitHub repository in
it: sr.aff, sr-Latn.aff, sr.dic and sr-Latn.dic
* Open Vim and cd into "new"
* Execute: :so ../convert.vim
* The resulting sr.aff and sr.dic are created in the parent spell folder
(here).
* Now one can generate spl file as usual using the merged dic and aff
files:
env LANG=sr_RS.UTF-8 vim -u NONE -e -c "set enc=utf-8" -c "mkspell! ../sr sr" -c q
Ivan Pešić
28.06.2022.

View File

@@ -0,0 +1,30 @@
:e sr.aff
:normal gg
:normal wgu$
:3d
:4d
:normal G
:normal o
:r sr-Latn.aff
:%s#^\(SFX\|PFX\).*[а-џa-ž]\zs$# .#g
:normal G
?SET
:.,+5d
:.,$s#^\(SFX\|PFX\) \zs\(\d\+\)#\= eval(submatch(2) .. ' + 1903')#
:w ../sr.aff
:bd!
:e sr.dic
:%s#a#а#g
:%s#e#е#g
:normal G
:normal o
:r sr-Latn.dic
:normal 201dd
:.,$s#/\zs\(\d\+\)\(,\(\d\+\)\)\?$#\=(submatch(2) == '') ? eval(submatch(1) + '1903') : eval(submatch(1) + '1903') .. ',' .. eval(submatch(3) + '1903')#
:normal {
:normal dd
:normal gg
:normal C502898
:w ../sr.dic
:bd!
:q!

View File

@@ -13,6 +13,10 @@ def SetSyn(name: string)
g:use_fvwm_2 = name == "fvwm2"
filetype = "fvwm"
endif
if name == "whitespace"
" do not replace the filetype but add whitespace on top
filetype = &ft .. ".whitespace"
endif
if !exists("s:syntax_menu_synonly")
exe "set ft=" .. filetype
if exists("g:syntax_manual")

View File

@@ -2,7 +2,7 @@
" Language: AutoHotkey script file
" Maintainer: Michael Wong
" https://github.com/mmikeww/autohotkey.vim
" Latest Revision: 2017-04-03
" Latest Revision: 2022-07-25
" Previous Maintainers: SungHyun Nam <goweol@gmail.com>
" Nikolai Weibull <now@bitwi.se>
@@ -31,7 +31,7 @@ syn region autohotkeyString
\ matchgroup=autohotkeyStringDelimiter
\ start=+"+
\ end=+"+
\ contains=autohotkeyEscape
\ contains=autohotkeyEscape,autohotkeyMatchClass
syn match autohotkeyVariable
\ display
@@ -49,9 +49,9 @@ syn keyword autohotkeyBuiltinVariable
\ A_Sec A_MSec A_Now A_NowUTC A_TickCount
\ A_IsSuspended A_IsPaused A_IsCritical A_BatchLines A_TitleMatchMode A_TitleMatchModeSpeed
\ A_DetectHiddenWindows A_DetectHiddenText A_AutoTrim A_StringCaseSense
\ A_FileEncoding A_FormatInteger A_FormatFloat A_KeyDelay A_WinDelay A_ControlDelay
\ A_SendMode A_SendLevel A_StoreCapsLockMode A_KeyDelay A_KeyDelayDuration
\ A_KeyDelayPlay A_KeyDelayPlayDuration A_MouseDelayPlay
\ A_FileEncoding A_FormatInteger A_FormatFloat A_WinDelay A_ControlDelay
\ A_SendMode A_SendLevel A_StoreCapsLockMode A_KeyDelay A_KeyDuration
\ A_KeyDelayPlay A_KeyDurationPlay A_MouseDelayPlay
\ A_MouseDelay A_DefaultMouseSpeed A_RegView A_IconHidden A_IconTip A_IconFile
\ A_CoordModeToolTip A_CoordModePixel A_CoordModeMouse A_CoordModeCaret A_CoordModeMenu
\ A_IconNumber
@@ -73,6 +73,7 @@ syn keyword autohotkeyBuiltinVariable
\ A_LoopFileShortName A_LoopFileDir A_LoopFileTimeModified A_LoopFileTimeCreated
\ A_LoopFileTimeAccessed A_LoopFileAttrib A_LoopFileSize A_LoopFileSizeKB A_LoopFileSizeMB
\ A_LoopRegType A_LoopRegKey A_LoopRegSubKey A_LoopRegTimeModified
\ A_TimeIdleKeyboard A_TimeIdleMouse A_ListLines A_ComSpec A_LoopFilePath A_Args
syn match autohotkeyBuiltinVariable
\ contained
@@ -118,6 +119,7 @@ syn keyword autohotkeyCommand
\ WinMinimizeAll WinMinimizeAllUndo WinMove WinRestore WinSet
\ WinSetTitle WinShow WinWait WinWaitActive WinWaitNotActive WinWaitClose
\ SetCapsLockState SetNumLockState SetScrollLockState
\ Hotstring LoadPicture MenuGetHandle MenuGetName OnError OnClipboardChange
syn keyword autohotkeyFunction
\ InStr RegExMatch RegExReplace StrLen SubStr Asc Chr Func
@@ -127,7 +129,7 @@ syn keyword autohotkeyFunction
\ IsFunc Trim LTrim RTrim IsObject Object Array FileOpen
\ ComObjActive ComObjArray ComObjConnect ComObjCreate ComObjGet
\ ComObjError ComObjFlags ComObjQuery ComObjType ComObjValue ComObject
\ Format Exception
\ Format Exception Ord InputHook
syn keyword autohotkeyStatement
\ Break Continue Exit ExitApp Gosub Goto OnExit Pause Return
@@ -140,7 +142,8 @@ syn keyword autohotkeyConditional
\ IfExist IfNotExist If IfEqual IfLess IfGreater Else
\ IfWinExist IfWinNotExist IfWinActive IfWinNotActive
\ IfNotEqual IfLessOrEqual IfGreaterOrEqual
\ while until for in try catch finally
\ while until for in try catch finally not
\ switch case default
syn match autohotkeyPreProcStart
\ nextgroup=

View File

@@ -3,7 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Allan Kelly <allan@fruitloaf.co.uk>
" Contributors: Thilo Six
" Last Change: 2021 Aug 08
" Last Change: 2022 Jun 22
" First version based on Micro$soft QBASIC circa 1989, as documented in
" 'Learn BASIC Now' by Halvorson&Rygmyr. Microsoft Press 1989.
@@ -344,7 +344,7 @@ hi def link basicCommentError Error
hi def link basicDataString basicString
hi def link basicFilenumber basicTypeSuffix " TODO: better group
hi def link basicFloat Float
hi def link basicFunction Identifier
hi def link basicFunction Function
hi def link basicKeyword Keyword
hi def link basicLineIdentifier LineNr
hi def link basicLineContinuation Special

126
runtime/syntax/bitbake.vim Normal file
View File

@@ -0,0 +1,126 @@
" Vim syntax file
" Language: BitBake bb/bbclasses/inc
" Author: Chris Larson <kergoth@handhelds.org>
" Ricardo Salveti <rsalveti@rsalveti.net>
" Copyright: Copyright (C) 2004 Chris Larson <kergoth@handhelds.org>
" Copyright (C) 2008 Ricardo Salveti <rsalveti@rsalveti.net>
"
" This file is licensed under the MIT license, see COPYING.MIT in
" this source distribution for the terms.
"
" Syntax highlighting for bb, bbclasses and inc files.
"
" It's an entirely new type, just has specific syntax in shell and python code
if v:version < 600
finish
endif
if exists("b:current_syntax")
finish
endif
syn include @python syntax/python.vim
unlet! b:current_syntax
" BitBake syntax
" Matching case
syn case match
" Indicates the error when nothing is matched
syn match bbUnmatched "."
" Comments
syn cluster bbCommentGroup contains=bbTodo,@Spell
syn keyword bbTodo COMBAK FIXME TODO XXX contained
syn match bbComment "#.*$" contains=@bbCommentGroup
" String helpers
syn match bbQuote +['"]+ contained
syn match bbDelimiter "[(){}=]" contained
syn match bbArrayBrackets "[\[\]]" contained
" BitBake strings
syn match bbContinue "\\$"
syn region bbString matchgroup=bbQuote start=+"+ skip=+\\$+ end=+"+ contained contains=bbTodo,bbContinue,bbVarDeref,bbVarPyValue,@Spell
syn region bbString matchgroup=bbQuote start=+'+ skip=+\\$+ end=+'+ contained contains=bbTodo,bbContinue,bbVarDeref,bbVarPyValue,@Spell
" Vars definition
syn match bbExport "^export" nextgroup=bbIdentifier skipwhite
syn keyword bbExportFlag export contained nextgroup=bbIdentifier skipwhite
syn match bbIdentifier "[a-zA-Z0-9\-_\.\/\+]\+" display contained
syn match bbVarDeref "${[a-zA-Z0-9\-_:\.\/\+]\+}" contained
syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)" contained nextgroup=bbVarValue
syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.\/\+][${}a-zA-Z0-9\-_:\.\/\+]*\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbOverrideOperator,bbVarDeref nextgroup=bbVarEq
syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue
syn region bbVarPyValue start=+${@+ skip=+\\$+ end=+}+ contained contains=@python
" Vars metadata flags
syn match bbVarFlagDef "^\([a-zA-Z0-9\-_\.]\+\)\(\[[a-zA-Z0-9\-_\.+]\+\]\)\@=" contains=bbIdentifier nextgroup=bbVarFlagFlag
syn region bbVarFlagFlag matchgroup=bbArrayBrackets start="\[" end="\]\s*\(:=\|=\|.=\|=.|+=\|=+\|?=\)\@=" contained contains=bbIdentifier nextgroup=bbVarEq
" Includes and requires
syn keyword bbInclude inherit include require contained
syn match bbIncludeRest ".*$" contained contains=bbString,bbVarDeref
syn match bbIncludeLine "^\(inherit\|include\|require\)\s\+" contains=bbInclude nextgroup=bbIncludeRest
" Add taks and similar
syn keyword bbStatement addtask deltask addhandler after before EXPORT_FUNCTIONS contained
syn match bbStatementRest ".*$" skipwhite contained contains=bbStatement
syn match bbStatementLine "^\(addtask\|deltask\|addhandler\|after\|before\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest
" OE Important Functions
syn keyword bbOEFunctions do_fetch do_unpack do_patch do_configure do_compile do_stage do_install do_package contained
" Generic Functions
syn match bbFunction "\h[0-9A-Za-z_\-\.]*" display contained contains=bbOEFunctions
syn keyword bbOverrideOperator append prepend remove contained
" BitBake shell metadata
syn include @shell syntax/sh.vim
unlet! b:current_syntax
syn keyword bbShFakeRootFlag fakeroot contained
syn match bbShFuncDef "^\(fakeroot\s*\)\?\([\.0-9A-Za-z_:${}\-\.]\+\)\(python\)\@<!\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbFunction,bbOverrideOperator,bbVarDeref,bbDelimiter nextgroup=bbShFuncRegion skipwhite
syn region bbShFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@shell
" Python value inside shell functions
syn region shDeref start=+${@+ skip=+\\$+ excludenl end=+}+ contained contains=@python
" BitBake python metadata
syn keyword bbPyFlag python contained
syn match bbPyFuncDef "^\(fakeroot\s*\)\?\(python\)\(\s\+[0-9A-Za-z_:${}\-\.]\+\)\?\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbPyFlag,bbFunction,bbOverrideOperator,bbVarDeref,bbDelimiter nextgroup=bbPyFuncRegion skipwhite
syn region bbPyFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@python
" BitBake 'def'd python functions
syn keyword bbPyDef def contained
syn region bbPyDefRegion start='^\(def\s\+\)\([0-9A-Za-z_-]\+\)\(\s*(.*)\s*\):\s*$' end='^\(\s\|$\)\@!' contains=@python
" Highlighting Definitions
hi def link bbUnmatched Error
hi def link bbInclude Include
hi def link bbTodo Todo
hi def link bbComment Comment
hi def link bbQuote String
hi def link bbString String
hi def link bbDelimiter Keyword
hi def link bbArrayBrackets Statement
hi def link bbContinue Special
hi def link bbExport Type
hi def link bbExportFlag Type
hi def link bbIdentifier Identifier
hi def link bbVarDeref PreProc
hi def link bbVarDef Identifier
hi def link bbVarValue String
hi def link bbShFakeRootFlag Type
hi def link bbFunction Function
hi def link bbPyFlag Type
hi def link bbPyDef Statement
hi def link bbStatement Statement
hi def link bbStatementRest Identifier
hi def link bbOEFunctions Special
hi def link bbVarPyValue PreProc
hi def link bbOverrideOperator Operator
let b:current_syntax = "bitbake"

View File

@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2022 May 01
" Last Change: 2022 Jul 25
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization
@@ -20,22 +20,22 @@ let s:binNMU='binary-only=yes'
let s:cpo = &cpo
set cpo-=C
let s:supported = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'trixie', 'sid', 'rc-buggy',
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy',
\ 'buster', 'bullseye', 'bookworm', 'trixie',
\
\ 'trusty', 'xenial', 'bionic', 'focal', 'impish', 'jammy', 'kinetic',
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic',
\ 'devel'
\ ]
let s:unsupported = [
\ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
\ 'jessie', 'stretch',
\
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
\ 'disco', 'eoan', 'hirsute', 'groovy'
\ 'disco', 'eoan', 'hirsute', 'impish', '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: 2022 May 01
" Last Change: 2022 Jul 25
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
" Standard syntax initialization
@@ -22,22 +22,22 @@ syn match debsourcesComment /#.*/ contains=@Spell
let s:cpo = &cpo
set cpo-=C
let s:supported = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'trixie', 'sid', 'rc-buggy',
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy',
\ 'buster', 'bullseye', 'bookworm', 'trixie',
\
\ 'trusty', 'xenial', 'bionic', 'focal', 'impish', 'jammy', 'kinetic',
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic',
\ 'devel'
\ ]
let s:unsupported = [
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
\ 'jessie', 'stretch',
\
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
\ 'disco', 'eoan', 'hirsute', 'groovy'
\ 'disco', 'eoan', 'hirsute', 'impish', 'groovy'
\ ]
let &cpo=s:cpo

View File

@@ -1,7 +1,10 @@
" Vim syntax file
" Language: fetchmail(1) RC File
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
" Language: fetchmail(1) RC File
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2022 Jul 02
" Version 6.4.3
if exists("b:current_syntax")
finish
@@ -10,64 +13,69 @@ endif
let s:cpo_save = &cpo
set cpo&vim
syn keyword fetchmailTodo contained FIXME TODO XXX NOTE
syn keyword fetchmailTodo contained FIXME TODO XXX NOTE
syn region fetchmailComment start='#' end='$' contains=fetchmailTodo,@Spell
syn region fetchmailComment start='#' end='$' contains=fetchmailTodo,@Spell
syn match fetchmailNumber display '\<\d\+\>'
syn match fetchmailNumber display '\<\d\+\>'
syn region fetchmailString start=+"+ skip=+\\\\\|\\"+ end=+"+
\ contains=fetchmailStringEsc
syn region fetchmailString start=+'+ skip=+\\\\\|\\'+ end=+'+
\ contains=fetchmailStringEsc
syn region fetchmailString start=+"+ skip=+\\\\\|\\"+ end=+"+
\ contains=fetchmailStringEsc
syn region fetchmailString start=+'+ skip=+\\\\\|\\'+ end=+'+
\ contains=fetchmailStringEsc
syn match fetchmailStringEsc contained '\\\([ntb]\|0\d*\|x\x\+\)'
syn match fetchmailStringEsc contained '\\\([ntb]\|0\d*\|x\x\+\)'
syn region fetchmailKeyword transparent matchgroup=fetchmailKeyword
\ start='\<poll\|skip\|defaults\>'
\ end='\<poll\|skip\|defaults\>'
\ contains=ALLBUT,fetchmailOptions,fetchmailSet
syn region fetchmailKeyword transparent matchgroup=fetchmailKeyword
\ start='\<poll\|skip\|defaults\>'
\ end='\<poll\|skip\|defaults\>'
\ contains=ALLBUT,fetchmailOptions,fetchmailSet
syn keyword fetchmailServerOpts contained via proto[col] local[domains] port
\ auth[enticate] timeout envelope qvirtual aka
\ interface monitor plugin plugout dns
\ checkalias uidl interval netsec principal
\ esmtpname esmtppassword
\ sslcertck sslcertpath sslfingerprint
\ service auth[enticate] timeout envelope
\ qvirtual aka interface monitor plugin plugout
\ dns checkalias uidl interval tracepolls
\ principal esmtpname esmtppassword
" removed in 6.3.0
syn keyword fetchmailServerOpts contained netsec
syn match fetchmailServerOpts contained '\<bad-header\>'
syn match fetchmailServerOpts contained '\<no\_s\+\(envelope\|dns\|checkalias\|uidl\)'
syn keyword fetchmailUserOpts contained user[name] is to pass[word] ssl
\ sslcert sslkey sslproto folder smtphost
\ fetchdomains smtpaddress smtpname antispam
\ mda bsmtp preconnect postconnect keep flush
\ fetchall rewrite stripcr forcecr pass8bits
\ dropstatus dropdelivered mimedecode idle
\ limit warnings batchlimit fetchlimit expunge
\ tracepolls properties
syn match fetchmailUserOpts contained '\<no\_s\+\(keep\|flush\|fetchall\|rewrite\|stripcr\|forcecr\|pass8bits\|dropstatus\|dropdelivered\|mimedecode\|noidle\)'
syn keyword fetchmailUserOpts contained user[name] is to pass[word] ssl
\ sslcert sslcertck sslcertfile sslcertpath
\ sslfingerprint sslkey sslproto folder
\ smtphost fetchdomains smtpaddress smtpname
\ antispam mda bsmtp preconnect postconnect
\ keep flush limitflush fetchall rewrite
\ stripcr forcecr pass8bits dropstatus
\ dropdelivered mimedecode idle limit warnings
\ batchlimit fetchlimit fetchsizelimit
\ fastuidl expunge properties
\ sslcommonname
syn match fetchmailUserOpts contained '\<no\_s\+\(sslcertck\|keep\|flush\|fetchall\|rewrite\|stripcr\|forcecr\|pass8bits\|dropstatus\|dropdelivered\|mimedecode\|idle\)'
syn keyword fetchmailSpecial contained here there
syn keyword fetchmailSpecial contained here there
syn keyword fetchmailNoise and with has wants options
syn match fetchmailNoise display '[:;,]'
syn keyword fetchmailNoise and with has wants options
syn match fetchmailNoise display '[:;,]'
syn keyword fetchmailSet nextgroup=fetchmailOptions skipwhite skipnl set
syn keyword fetchmailSet nextgroup=fetchmailOptions skipwhite skipnl set
syn keyword fetchmailOptions daemon postmaster bouncemail spambounce logfile
\ idfile syslog nosyslog properties
syn match fetchmailOptions '\<no\_s\+\(bouncemail\|spambounce\)'
syn keyword fetchmailOptions daemon postmaster bouncemail spambounce
\ softbounce logfile pidfile idfile syslog properties
syn match fetchmailOptions '\<no\_s\+\(bouncemail\|spambounce\|softbounce\|syslog\)'
hi def link fetchmailComment Comment
hi def link fetchmailTodo Todo
hi def link fetchmailNumber Number
hi def link fetchmailString String
hi def link fetchmailStringEsc SpecialChar
hi def link fetchmailKeyword Keyword
hi def link fetchmailComment Comment
hi def link fetchmailTodo Todo
hi def link fetchmailNumber Number
hi def link fetchmailString String
hi def link fetchmailStringEsc SpecialChar
hi def link fetchmailKeyword Keyword
hi def link fetchmailServerOpts Identifier
hi def link fetchmailUserOpts Identifier
hi def link fetchmailSpecial Special
hi def link fetchmailSet Keyword
hi def link fetchmailOptions Identifier
hi def link fetchmailUserOpts Identifier
hi def link fetchmailSpecial Special
hi def link fetchmailSet Keyword
hi def link fetchmailOptions Identifier
let b:current_syntax = "fetchmail"

View File

@@ -1,14 +1,14 @@
" Vim syntax file
" Language: FreeBasic
" Maintainer: Mark Manning <markem@sim1.us>
" Updated: 10/9/2019
" Version: 7.0b
" Language: FreeBASIC
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Mark Manning <markem@sim1.us>
" Last Change: 2022 Jun 26
"
" Description:
"
" Based originally on the work done by Allan Kelly <Allan.Kelly@ed.ac.uk>
" Updated by Mark Manning <markem@sim1.us>
" Applied FreeBasic support to the already excellent support
" Applied FreeBASIC support to the already excellent support
" for standard basic syntax (like QB).
"
" First version based on Micro$soft QBASIC circa
@@ -17,215 +17,595 @@
" not a complete implementation yet. Send suggestions to
" the maintainer.
"
" TODO: split this into separate dialect-based files, possibly with a common base
"
" Quit when a (custom) syntax file was already loaded (Taken from c.vim)
"
if exists("b:current_syntax")
finish
endif
"
" Dialect detection
"
let s:lang = freebasic#GetDialect()
"
" Whitespace Errors
"
if exists("freebasic_space_errors")
if !exists("freebasic_no_trail_space_error")
syn match freebasicSpaceError display excludenl "\s\+$"
endif
if !exists("freebasic_no_tab_space_error")
syn match freebasicSpaceError display " \+\t"me=e-1
endif
endif
"
" Be sure to turn on the "case ignore" since current versions
" of freebasic support both upper as well as lowercase
" letters. - MEM 10/1/2006
"
syn case ignore
"
" This list of keywords is taken directly from the FreeBasic
" user's guide as presented by the FreeBasic online site.
"
syn keyword freebasicArrays ERASE LBOUND REDIM PRESERVE UBOUND
syn keyword freebasicBitManipulation BIT BITRESET BITSET HIBYTE HIWORD LOBYTE LOWORD SHL SHR
syn keyword freebasicCompilerSwitches DEFBYTE DEFDBL DEFINT DEFLNG DEFLNGINT DEFSHORT DEFSNG DEFSTR
syn keyword freebasicCompilerSwitches DEFUBYTE DEFUINT DEFULNGINT DEFUSHORT
syn match freebasicCompilerSwitches "\<option\s+\(BASE\|BYVAL\|DYNAMIC\|ESCAPE\|EXPLICIT\|NOKEYWORD\)\>"
syn match freebasicCompilerSwitches "\<option\s+\(PRIVATE\|STATIC\)\>"
syn region freebasicConditional start="\son\s+" skip=".*" end="gosub"
syn region freebasicConditional start="\son\s+" skip=".*" end="goto"
syn match freebasicConditional "\<select\s+case\>"
syn keyword freebasicConditional if iif then case else elseif with
syn match freebasicConsole "\<open\s+\(CONS\|ERR\|PIPE\|SCRN\)\>"
syn keyword freebasicConsole BEEP CLS CSRLIN LOCATE PRINT POS SPC TAB VIEW WIDTH
syn keyword freebasicDataTypes BYTE AS DIM CONST DOUBLE ENUM INTEGER LONG LONGINT SHARED SHORT STRING
syn keyword freebasicDataTypes SINGLE TYPE UBYTE UINTEGER ULONGINT UNION UNSIGNED USHORT WSTRING ZSTRING
syn keyword freebasicDateTime DATE DATEADD DATEDIFF DATEPART DATESERIAL DATEVALUE DAY HOUR MINUTE
syn keyword freebasicDateTime MONTH MONTHNAME NOW SECOND SETDATE SETTIME TIME TIMESERIAL TIMEVALUE
syn keyword freebasicDateTime TIMER YEAR WEEKDAY WEEKDAYNAME
syn keyword freebasicDebug ASSERT STOP
syn keyword freebasicErrorHandling ERR ERL ERROR LOCAL RESUME
syn match freebasicErrorHandling "\<resume\s+next\>"
syn match freebasicErrorHandling "\<on\s+error\>"
syn match freebasicFiles "\<get\s+#\>"
syn match freebasicFiles "\<input\s+#\>"
syn match freebasicFiles "\<line\s+input\s+#\>"
syn match freebasicFiles "\<put\s+#\>"
syn keyword freebasicFiles ACCESS APPEND BINARY BLOAD BSAVE CLOSE EOF FREEFILE INPUT LOC
syn keyword freebasicFiles LOCK LOF OPEN OUTPUT RANDOM RESET SEEK UNLOCK WRITE
syn keyword freebasicFunctions ALIAS ANY BYREF BYVAL CALL CDECL CONSTRUCTOR DESTRUCTOR
syn keyword freebasicFunctions DECLARE FUNCTION LIB OVERLOAD PASCAL STATIC SUB STDCALL
syn keyword freebasicFunctions VA_ARG VA_FIRST VA_NEXT
syn match freebasicGraphics "\<palette\s+get\>"
syn keyword freebasicGraphics ALPHA CIRCLE CLS COLOR CUSTOM DRAW FLIP GET
syn keyword freebasicGraphics IMAGECREATE IMAGEDESTROY LINE PAINT PALETTE PCOPY PMAP POINT
syn keyword freebasicGraphics PRESET PSET PUT RGB RGBA SCREEN SCREENCOPY SCREENINFO SCREENLIST
syn keyword freebasicGraphics SCREENLOCK SCREENPTR SCREENRES SCREENSET SCREENSYNC SCREENUNLOCK
syn keyword freebasicGraphics TRANS USING VIEW WINDOW
syn match freebasicHardware "\<open\s+com\>"
syn keyword freebasicHardware INP OUT WAIT LPT LPOS LPRINT
syn keyword freebasicLogical AND EQV IMP OR NOT XOR
syn keyword freebasicMath ABS ACOS ASIN ATAN2 ATN COS EXP FIX INT LOG MOD RANDOMIZE
syn keyword freebasicMath RND SGN SIN SQR TAN
syn keyword freebasicMemory ALLOCATE CALLOCATE CLEAR DEALLOCATE FIELD FRE PEEK POKE REALLOCATE
syn keyword freebasicMisc ASM DATA LET TO READ RESTORE SIZEOF SWAP OFFSETOF
syn keyword freebasicModularizing CHAIN COMMON EXPORT EXTERN DYLIBFREE DYLIBLOAD DYLIBSYMBOL
syn keyword freebasicModularizing PRIVATE PUBLIC
syn keyword freebasicMultithreading MUTEXCREATE MUTEXDESTROY MUTEXLOCK MUTEXUNLOCK THREADCREATE THREADWAIT
syn keyword freebasicShell CHDIR DIR COMMAND ENVIRON EXEC EXEPATH KILL NAME MKDIR RMDIR RUN
syn keyword freebasicEnviron SHELL SYSTEM WINDOWTITLE POINTERS
syn keyword freebasicLoops FOR LOOP WHILE WEND DO CONTINUE STEP UNTIL next
syn match freebasicInclude "\<#\s*\(inclib\|include\)\>"
syn match freebasicInclude "\<\$\s*include\>"
syn keyword freebasicPointer PROCPTR PTR SADD STRPTR VARPTR
syn keyword freebasicPredefined __DATE__ __FB_DOS__ __FB_LINUX__ __FB_MAIN__ __FB_MIN_VERSION__
syn keyword freebasicPredefined __FB_SIGNATURE__ __FB_VERSION__ __FB_WIN32__ __FB_VER_MAJOR__
syn keyword freebasicPredefined __FB_VER_MINOR__ __FB_VER_PATCH__ __FILE__ __FUNCTION__
syn keyword freebasicPredefined __LINE__ __TIME__
syn match freebasicPreProcessor "\<^#\s*\(define\|undef\)\>"
syn match freebasicPreProcessor "\<^#\s*\(ifdef\|ifndef\|else\|elseif\|endif\|if\)\>"
syn match freebasicPreProcessor "\<#\s*error\>"
syn match freebasicPreProcessor "\<#\s*\(print\|dynamic\|static\)\>"
syn keyword freebasicPreProcessor DEFINED ONCE
syn keyword freebasicProgramFlow END EXIT GOSUB GOTO
syn keyword freebasicProgramFlow IS RETURN SCOPE SLEEP
syn keyword freebasicString INSTR LCASE LEFT LEN LSET LTRIM MID RIGHT RSET RTRIM
syn keyword freebasicString SPACE STRING TRIM UCASE ASC BIN CHR CVD CVI CVL CVLONGINT
syn keyword freebasicString CVS CVSHORT FORMAT HEX MKD MKI MKL MKLONGINT MKS MKSHORT
syn keyword freebasicString OCT STR VAL VALLNG VALINT VALUINT VALULNG
syn keyword freebasicTypeCasting CAST CBYTE CDBL CINT CLNG CLNGINT CPTR CSHORT CSIGN CSNG
syn keyword freebasicTypeCasting CUBYTE CUINT CULNGINT CUNSG CURDIR CUSHORT
syn match freebasicUserInput "\<line\s+input\>"
syn keyword freebasicUserInput GETJOYSTICK GETKEY GETMOUSE INKEY INPUT MULTIKEY SETMOUSE
"
" Do the Basic variables names first. This is because it
" is the most inclusive of the tests. Later on we change
" this so the identifiers are split up into the various
" types of identifiers like functions, basic commands and
" such. MEM 9/9/2006
"
syn match freebasicIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>"
syn match freebasicGenericFunction "\<[a-zA-Z_][a-zA-Z0-9_]*\>\s*("me=e-1,he=e-1
if s:lang =~# '\<\%(qb\|fblite\)\>'
syn iskeyword @,48-57,_,192-255,.
syn match freebasicIdentifier "\<\h\%(\w\|\.\)*\>"
syn match freebasicGenericFunction "\<\h\%(\w\|\.\)*\>\ze\s*("
else
syn iskeyword @,48-57,_,192-255
syn match freebasicIdentifier "\<\h\w*\>"
syn match freebasicGenericFunction "\<\h\w*\>\ze\s*("
endif
"
" Function list
" This list of keywords is taken directly from the FreeBASIC
" user's guide as presented by the FreeBASIC online site.
"
syn keyword freebasicTodo contained TODO
syn keyword freebasicArrays ERASE LBOUND PRESERVE REDIM UBOUND
" array.bi
syn keyword freebasicArrays ARRAYLEN ARRAYSIZE
if s:lang == "fb"
syn keyword freebasicArrays ArrayConstDescriptorPtr ArrayDescriptorPtr FBARRAY
endif
if s:lang == "qb"
syn keyword freebasicAsm __ASM
syn match freebasicAsm "\<end\s\+__asm\>"
else
syn keyword freebasicAsm ASM
syn match freebasicAsm "\<end\s\+asm\>"
endif
if s:lang == "qb"
syn keyword freebasicBitManipulation __BIT __BITRESET __BITSET __HIBYTE __HIWORD __LOBYTE __LOWORD
else
syn keyword freebasicBitManipulation BIT BITRESET BITSET HIBYTE HIWORD LOBYTE LOWORD
endif
if s:lang != "fb"
syn keyword freebasicCompilerSwitches DEFDBL DEFINT DEFLNG DEFSNG DEFSTR
endif
if s:lang == "qb"
syn keyword freebasicCompilerSwitches __DEFBYTE __DEFLONGINT __DEFSHORT __DEFUBYTE __DEFUINT __DEFULONGINT __DEFUSHORT
elseif s:lang == "fblite" || s:lang == "deprecated"
syn keyword freebasicCompilerSwitches DEFBYTE DEFLONGINT DEFSHORT DEFUBYTE DEFUINT DEFUILONGINT DEFUSHORT
endif
syn match freebasicCompilerSwitches "\<option\s\+\%(BASE\|BYVAL\|DYNAMIC\|ESCAPE\|EXPLICIT\|GOSUB\|NOGOSUB\)\>"
syn match freebasicCompilerSwitches "\<option\s\+\%(NOKEYWORD\|PRIVATE\|STATIC\)\>"
syn keyword freebasicData DATA READ RESTORE
syn keyword freebasicProgramFlow EXIT GOTO RETURN SLEEP
syn match freebasicProgramFlow "\<end\>"
if s:lang == "qb"
syn keyword freebasicProgramFlow __SLEEP
endif
if s:lang == "fblite" || s:lang == "qb"
syn keyword freebasicProgramFlow GOSUB
endif
if s:lang == "fb" || s:lang == "deprecated"
syn keyword freebasicProgramFlow SCOPE
syn match freebasicProgramFlow "\<end\s\+scope\>"
endif
if s:lang == "fblite" || s:lang == "qb"
syn region freebasicConditional matchgroup=freebasicConditional start="\<on\>" end="\<gosub\>" transparent
syn region freebasicConditional matchgroup=freebasicConditional start="\<on\>" end="\<goto\>" transparent
endif
syn keyword freebasicConditional IF THEN ELSE ELSEIF
if s:lang == "qb"
syn keyword freebasicConditional __IIF __WITH
syn match freebasicConditional "\<end\s\+__with\>"
else
syn keyword freebasicConditional IIF WITH
syn match freebasicConditional "\<end\s\+with\>"
endif
syn match freebasicConditional "\<end\s\+if\>"
syn match freebasicConditional "\<select\s\+case\>"
syn match freebasicConditional "\<case\>"
syn match freebasicConditional "\<case\s\+is\>"
syn match freebasicConditional "\<end\s\+select\>"
syn keyword freebasicConsole BEEP CLS CSRLIN LOCATE PRINT POS SPC TAB USING VIEW WIDTH
syn match freebasicConsole "?"
syn keyword freebasicDataTypes SINGLE DOUBLE INTEGER LONG
syn match freebasicDataTypes "\<string\>"
syn keyword freebasicDataTypes AS DIM CONST ENUM SHARED TYPE
syn match freebasicDataTypes "\<end\s\+enum\>"
syn match freebasicDataTypes "\<end\s\+type\>"
if s:lang == "qb"
syn keyword freebasicDataTypes __BOOLEAN __BYTE __LONGINT __SHORT __UBYTE __UINTEGER __ULONG __ULONGINT __UNSIGNED __USHORT __ZSTRING
syn match freebasicDataTypes "\<__WSTRING\>"
syn keyword freebasicDataTypes __EXPLICIT __EXTENDS __IMPLEMENTS __OBJECT __POINTER __PTR __SIZEOF __TYPEOF
syn keyword freebasicDataTypes __UNION
syn match freebasicDataTypes "\<end\s\+__union\>"
else
syn keyword freebasicDataTypes BOOLEAN BYTE LONGINT SHORT UBYTE UINTEGER ULONG ULONGINT UNSIGNED USHORT ZSTRING
syn match freebasicDataTypes "\<WSTRING\>"
syn keyword freebasicDataTypes EXPLICIT EXTENDS IMPLEMENTS OBJECT POINTER PTR SIZEOF TYPEOF
syn keyword freebasicDataTypes UNION
syn match freebasicDataTypes "\<end\s\+union\>"
endif
if s:lang == "fb"
syn keyword freebasicDataTypes BASE CLASS THIS VAR
endif
if s:lang == "qb"
syn match freebasicDateTime "\<\%(date\|time\)\$"
elseif s:lang == "fblite" || s:lang == "deprecated"
syn match freebasicDateTime "\<\%(date\|time\)\>\$\="
else " fb
syn keyword freebasicDateTime DATE TIME
endif
syn keyword freebasicDateTime SETDATE SETTIME
" datetime.bi
syn keyword freebasicDateTime DATEADD DATEDIFF DATEPART DATESERIAL DATEVALUE DAY HOUR ISDATE MINUTE
syn keyword freebasicDateTime MONTH MONTHNAME NOW SECOND TIMESERIAL TIMEVALUE
syn keyword freebasicDateTime TIMER YEAR WEEKDAY WEEKDAYNAME
syn keyword freebasicDebug STOP
if s:lang == "qb"
syn keyword freebasicDebug __ASSERT __ASSERTWARN
else
syn keyword freebasicDebug ASSERT ASSERTWARN
endif
syn keyword freebasicErrorHandling ERR ERL ERROR
if s:lang == "qb"
syn keyword freebasicErrorHandling __ERFN __ERMN
syn match freebasicErrorHandling "\<on\s\+error\>"
else
syn keyword freebasicErrorHandling ERFN ERMN
syn match freebasicErrorHandling "\<on\s\+\%(local\s\+\)\=error\>"
endif
if s:lang != "fb"
syn match freebasicErrorHandling "\<resume\%(\s\+next\)\=\>"
endif
syn match freebasicFiles "\<get\s\+#\>"
syn match freebasicFiles "\<input\s\+#\>"
syn match freebasicFiles "\<line\s\+input\s\+#\>"
syn match freebasicFiles "\<put\s\+#\>"
syn keyword freebasicFiles ACCESS APPEND BINARY CLOSE EOF FREEFILE INPUT LOC
syn keyword freebasicFiles LOCK LOF OUTPUT RANDOM RESET SEEK UNLOCK WRITE
syn match freebasicFiles "\<open\>"
if s:lang == "qb"
syn keyword freebasicFiles __ENCODING
else
syn keyword freebasicFiles ENCODING WINPUT
syn match freebasicFiles "\<open\s\+\%(cons\|err\|pipe\|scrn\)\>"
endif
" file.bi
syn keyword freebasicFiles FILEATTR FILECOPY FILEDATETIME FILEEXISTS FILEFLUSH FILELEN FILESETEOF
syn keyword freebasicFunctions ALIAS BYREF BYVAL CDECL DECLARE LIB NAKED PASCAL STATIC STDCALL
syn match freebasicFunctions "\<option\ze\s*("
if s:lang == "qb"
syn keyword freebasicFunctions __CVA_ARG __CVA_COPY __CVA_END __CVA_LIST __CVA_START
syn keyword freebasicFunctions __VA_ARG __VA_FIRST __VA_NEXT
else
syn keyword freebasicFunctions CVA_ARG CVA_COPY CVA_END CVA_LIST CVA_START
syn keyword freebasicFunctions VA_ARG VA_FIRST VA_NEXT
syn keyword freebasicFunctions ANY OVERLOAD
endif
syn keyword freebasicFunctions FUNCTION SUB
syn match freebasicFunctions "\<end\s\+function\>"
syn match freebasicFunctions "\<end\s\+sub\>"
if s:lang == "fb"
syn keyword freebasicFunctions ABSTRACT OVERRIDE VIRTUAL __THISCALL
syn keyword freebasicFunctions CONSTRUCTOR DESTRUCTOR OPERATOR PROPERTY
syn match freebasicFunctions "\<end\s\+constructor\>"
syn match freebasicFunctions "\<end\s\+destructor\>"
syn match freebasicFunctions "\<end\s\+operator\>"
syn match freebasicFunctions "\<end\s\+property\>"
else
syn keyword freebasicFunctions CALL
endif
syn match freebasicGraphics "\<palette\s\+get\>"
syn keyword freebasicGraphics ADD ALPHA BLOAD BSAVE CIRCLE CLS COLOR DRAW GET
syn keyword freebasicGraphics LINE PAINT PALETTE PCOPY PMAP POINT
syn keyword freebasicGraphics PRESET PSET PUT SCREEN
syn keyword freebasicGraphics TRANS WINDOW
if s:lang == "qb"
syn keyword freebasicGraphics __FLIP __IMAGECONVERTROW __IMAGECREATE __IMAGEDESTROY __IMAGEINFO __POINTCOORD
syn keyword freebasicGraphics __RGB __RGBA __SCREENCOPY __SCREENCONTROL __SCREENEVENT __SCREENGLPROC __SCREENINFO
syn keyword freebasicGraphics __SCREENLIST __SCREENLOCK __SCREENPTR __SCREENRES __SCREENSET __SCREENSYNC
syn keyword freebasicGraphics __SCREENUNLOCK __WINDOWTITLE
else
syn keyword freebasicGraphics CUSTOM
syn keyword freebasicGraphics FLIP IMAGECONVERTROW IMAGECREATE IMAGEDESTROY IMAGEINFO POINTCOORD
syn keyword freebasicGraphics RGB RGBA SCREENCOPY SCREENCONTROL SCREENEVENT SCREENGLPROC SCREENINFO
syn keyword freebasicGraphics SCREENLIST SCREENLOCK SCREENPTR SCREENRES SCREENSET SCREENSYNC
syn keyword freebasicGraphics SCREENUNLOCK WINDOWTITLE
endif
if s:lang != "qb"
syn match freebasicHardware "\<open\s\+\%(com\|lpt\)\>"
endif
syn keyword freebasicHardware INP OUT WAIT LPOS LPRINT
syn keyword freebasicMath ABS ATN COS EXP FIX FRAC INT LOG MOD RANDOMIZE RND SGN SIN SQR TAN
if s:lang == "qb"
syn keyword freebasicMath __ACOS __ASIN __ATAN2
else
syn keyword freebasicMath ACOS ASIN ATAN2
endif
if s:lang == "qb"
syn keyword freebasicMemory __ALLOCATE __CALLOCATE __DEALLOCATE __REALLOCATE
else
syn keyword freebasicMemory ALLOCATE CALLOCATE DEALLOCATE REALLOCATE
syn keyword freebasicMemory PEEK POKE CLEAR FB_MEMCOPY FB_MEMCOPYCLEAR FB_MEMMOVE SWAP SADD
syn keyword freebasicMemory FIELD FRE
endif
syn keyword freebasicMisc LET TO
if s:lang == "qb"
syn keyword freebasicMisc __OFFSETOF
else
syn keyword freebasicMisc OFFSETOF
endif
syn keyword freebasicModularizing CHAIN COMMON
if s:lang == "fb"
syn keyword freebasicModularizing EXTERN
syn match freebasicModularizing "\<end\s\+extern\>"
syn keyword freebasicModularizing PROTECTED
endif
if s:lang == "qb"
syn keyword freebasicModularizing __EXPORT __IMPORT __DYLIBFREE __DYLIBLOAD __DYLIBSYMBOL
else
syn keyword freebasicModularizing EXPORT IMPORT DYLIBFREE DYLIBLOAD DYLIBSYMBOL
syn keyword freebasicModularizing PRIVATE PUBLIC
syn keyword freebasicModularizing NAMESPACE
syn match freebasicModularizing "\<end\s\+namespace\>"
endif
if s:lang != "qb"
syn keyword freebasicMultithreading MUTEXCREATE MUTEXDESTROY MUTEXLOCK MUTEXUNLOCK THREADCREATE THREADWAIT
syn keyword freebasicMultithreading CONDBROADCAST CONDCREATE CONDDESTROY CONDSIGNAL CONDWAIT
syn keyword freebasicMultithreading THREADCALL THREADDETACH THREADSELF
endif
syn keyword freebasicShell CHDIR KILL NAME MKDIR RMDIR RUN SETENVIRON
if s:lang == "qb"
syn keyword freebasicShell __CURDIR __DIR __EXEC __EXEPATH
syn match freebasicString "\<\%(command\|environ\)\$"
else
" fbio.bi
syn keyword freebasicShell ISREDIRECTED
syn keyword freebasicShell CURDIR DIR EXEC EXEPATH
syn match freebasicString "\<\%(command\|environ\)\>\$\="
endif
syn keyword freebasicEnviron SHELL SYSTEM
syn keyword freebasicLoops FOR LOOP WHILE WEND DO STEP UNTIL NEXT
if s:lang == "qb"
syn keyword freebasicLoops __CONTINUE
else
syn keyword freebasicLoops CONTINUE
endif
"
" File numbers
"
syn match freebasicFilenumber "#\d\+"
syn match freebasicFilenumber "#\a[[:alpha:].]*[%&!#]\="
syn match freebasicMetacommand "$\s*\%(dynamic\|static\)"
syn match freebasicMetacommand "$\s*include\s*\%(once\)\=\s*:\s*'[^']\+'"
syn match freebasicMetacommand '$\s*include\s*\%(once\)\=\s*:\s*"[^"]\+"'
syn match freebasicMetacommand '$\s*lang\s*:\s*"[^"]\+"'
"
" Intrinsic defines
"
syn keyword freebasicPredefined __DATE__ __DATE_ISO__
syn keyword freebasicPredefined __FB_64BIT__ __FB_ARGC__ __FB_ARG_COUNT__ __FB_ARG_EXTRACT__ __FB_ARG_LEFTOF__
syn keyword freebasicPredefined __FB_ARG_RIGHTOF__ __FB_ARGV__ __FB_ARM__ __FB_ASM__ __FB_BACKEND__
syn keyword freebasicPredefined __FB_BIGENDIAN__ __FB_BUILD_DATE__ __FB_BUILD_DATE_ISO__ __FB_BUILD_SHA1__
syn keyword freebasicPredefined __FB_CYGWIN__ __FB_DARWIN__ __FB_DEBUG__ __FB_DOS__ __FB_ERR__ __FB_EVAL__
syn keyword freebasicPredefined __FB_FPMODE__ __FB_FPU__ __FB_FREEBSD__ __FB_GCC__ __FB_GUI__ __FB_JOIN__
syn keyword freebasicPredefined __FB_LANG__ __FB_LINUX__ __FB_MAIN__ __FB_MIN_VERSION__ __FB_MT__ __FB_NETBSD__
syn keyword freebasicPredefined __FB_OPENBSD__ __FB_OPTIMIZE__ __FB_OPTION_BYVAL__ __FB_OPTION_DYNAMIC__
syn keyword freebasicPredefined __FB_OPTION_ESCAPE__ __FB_OPTION_EXPLICIT__ __FB_OPTION_GOSUB__
syn keyword freebasicPredefined __FB_OPTION_PRIVATE__ __FB_OUT_DLL__ __FB_OUT_EXE__ __FB_OUT_LIB__ __FB_OUT_OBJ__
syn keyword freebasicPredefined __FB_PCOS__ __FB_PPC__ __FB_QUOTE__ __FB_SIGNATURE__ __FB_SSE__ __FB_UNIQUEID__
syn keyword freebasicPredefined __FB_UNIQUEID_POP__ __FB_UNIQUEID_PUSH__ __FB_UNIX__ __FB_UNQUOTE__
syn keyword freebasicPredefined __FB_VECTORIZE__ __FB_VER_MAJOR__ __FB_VER_MINOR__ __FB_VER_PATCH__ __FB_VERSION__
syn keyword freebasicPredefined __FB_WIN32__ __FB_X86__ __FB_XBOX__
syn keyword freebasicPredefined __FILE__ __FILE_NQ__ __FUNCTION__ __FUNCTION_NQ__
syn keyword freebasicPredefined __LINE__ __PATH__ __TIME__
"
" Preprocessor directives
"
syn match freebasicInclude "#\s*\%(inclib\|include\%(\s\+once\)\=\|libpath\)\>"
syn match freebasicPreProcessor "#\s*assert\>"
syn match freebasicPreProcessor "#\s*cmdline\>"
syn match freebasicPreProcessor "#\s*\%(define\|undef\)\>"
syn match freebasicPreProcessor "#\s*\%(if\|ifdef\|ifndef\|else\|elseif\|endif\)\>"
syn match freebasicPreProcessor "#\s*\%(macro\|endmacro\)\>"
syn match freebasicPreProcessor "#\s*error\>"
syn match freebasicPreProcessor "#\s*lang\>"
syn match freebasicPreProcessor "#\s*line\>"
syn match freebasicPreProcessor "#\s*pragma\%(\s\+reserve\)\=\>"
syn match freebasicPreProcessor "#\s*\%(print\|dynamic\|static\)\>"
syn keyword freebasicPreProcessor DEFINED
syn keyword freebasicString LEN
syn keyword freebasicString ASC
" string.bi
syn keyword freebasicString FORMAT
syn keyword freebasicString VAL
syn keyword freebasicString CVD CVI CVL CVS
syn keyword freebasicString INSTR
syn keyword freebasicString LSET RSET
if s:lang == "qb"
syn match freebasicString "\<string\$\ze\s*("
syn match freebasicString "\<__wstring\ze\s*("
syn match freebasicString "\<space\$"
syn keyword freebasicString __WSPACE
syn match freebasicString "\<chr\$"
syn keyword freebasicString __WCHR
syn keyword freebasicString __WBIN __WHEX __WOCT __WSTR
syn match freebasicString "\<\%(bin\|hex\|oct\|str\)\$"
syn keyword freebasicString __VALLNG __VALINT __VALUINT __VALULNG
syn match freebasicString "\<\%(mkd\|mki\|mkl\|mks\)\$"
syn keyword freebasicString __MKLONGINT __MKSHORT
syn keyword freebasicString __CVLONGINT __CVSHORT
syn match freebasicString "\<\%(left\|mid\|right\|lcase\|ucase\|ltrim\|rtrim\)\$"
syn keyword freebasicString __TRIM
syn keyword freebasicString __INSTRREV
else
syn match freebasicString "\<string\$\=\ze\s*("
syn match freebasicString "\<wstring\ze\s*("
syn match freebasicString "\<space\>\$\="
syn keyword freebasicString WSPACE
syn match freebasicString "\<chr\>\$\="
syn keyword freebasicString WCHR
syn keyword freebasicString WBIN WHEX WOCT WSTR
syn match freebasicString "\<\%(bin\|hex\|oct\|str\)\>\$\="
syn keyword freebasicString VALLNG VALINT VALUINT VALULNG
syn match freebasicString "\<\%(mkd\|mki\|mkl\|mks\)\>\$\="
syn match freebasicString "\<\%(mklongint\|mkshort\)\>\$\="
syn keyword freebasicString CVLONGINT CVSHORT
syn match freebasicString "\<\%(left\|mid\|right\|lcase\|ucase\|ltrim\|rtrim\)\>\$\="
syn match freebasicString "\<trim\>\$\="
syn keyword freebasicString INSTRREV
endif
syn keyword freebasicTypeCasting CDBL CINT CLNG CSNG
if s:lang == "qb"
syn keyword freebasicTypeCasting __CAST __CBOOL __CBYTE __CLNGINT __CPTR __CSHORT __CSIGN __CYBTE __CUINT __CULNG
syn keyword freebasicTypeCasting __CULNGINT __CUNSG __CUSHORT
else
syn keyword freebasicTypeCasting CAST CBOOL CBYTE CLNGINT CPTR CSHORT CSIGN CUBYTE CUINT CULNG CULNGINT CUNSG CUSHORT
endif
syn match freebasicUserInput "\<line\s\+input\>"
syn keyword freebasicUserInput INKEY INPUT
if s:lang == "qb"
syn keyword freebasicUserInput __GETJOYSTICK __GETKEY __GETMOUSE __MULTIKEY __SETMOUSE STICK STRIG
else
syn keyword freebasicUserInput GETJOYSTICK GETKEY GETMOUSE MULTIKEY SETMOUSE
endif
"
" Operators
"
" TODO: make these context sensitive to remove the overlap of common operators
" : alpha operators should probably always be highlighted
" -- DJK 20/11/19
if s:lang == "qb"
syn match freebasicArithmeticOperator "\<\%(MOD\|__SHL\|__SHR\)\>"
else
syn match freebasicArithmeticOperator "\<\%(MOD\|SHL\|SHR\)\>"
endif
syn match freebasicBitwiseOperator "\<\%(AND\|EQV\|IMP\|NOT\|OR\|XOR\)\>" " freebaseLogical?
if s:lang == "qb"
syn match freebasicAssignmentOperator "\<\%(MOD\|AND\|EQV\|IMP\|OR\|XOR\|__SHL\|__SHR\)=\@=" " exclude trailing '='
else
syn match freebasicAssignmentOperator "\<\%(MOD\|AND\|EQV\|IMP\|OR\|XOR\|SHL\|SHR\)=\@="
endif
syn match freebasicShortcircuitOperator "\<\%(ANDALSO\|ORELSE\)\>"
if s:lang == "fb"
syn match freebasicMemoryOperator '\<\%(new\|delete\)\>'
endif
syn keyword freebasicPointerOperator STRPTR VARPTR
if s:lang == "qb"
syn keyword freebasicPointerOperator __PROCPTR
else
syn keyword freebasicPointerOperator PROCPTR
endif
syn match freebasicTypeOperator '\<is\>'
syn match freebasicTypeOperator '\.' nextgroup=freebasicIdentifier skipwhite
if s:lang == "fb"
syn match freebasicTypeOperator '->' nextgroup=freebasicIdentifier skipwhite
endif
if exists("freebasic_operators")
syn match freebasicAssignmentOperator "=>\=\|[-+&/\\*^]="
if s:lang == "qb"
syn match freebasicAssignmentOperator "\<\%(MOD\|AND\|EQV\|IMP\|OR\|XOR\|__SHL\|__SHR\)=" " include trailing '='
else
syn match freebasicAssignmentOperator "\<\%(MOD\|AND\|EQV\|IMP\|OR\|XOR\|SHL\|SHR\)="
endif
syn match freebasicArithmeticOperator "[-+&/\\*^]"
" syn match freebasicIndexingOperator "[[\]()]" " FIXME
syn match freebasicRelationalOperator "=\|<>\|<=\|<\|>=\|>"
syn match freebasicPreprocessorOperator '\%(^\s*\)\@<!\%(##\|#\)\|[$!]"\@='
syn match freebasicPointerOperator '[@*]'
syn match freebasicTypeOperator '\.' nextgroup=freebasicIdentifier skipwhite
if s:lang == "fb"
syn match freebasicTypeOperator '->' nextgroup=freebasicIdentifier skipwhite
endif
endif
syn cluster freebasicOperator contains=freebasic.*Operator
"
" Catch errors caused by wrong parenthesis
"
syn region freebasicParen transparent start='(' end=')' contains=ALLBUT,@freebasicParenGroup
syn match freebasicParenError ")"
syn match freebasicInParen contained "[{}]"
syn cluster freebasicParenGroup contains=freebasicParenError,freebasicSpecial,freebasicTodo,freebasicUserCont,freebasicUserLabel,freebasicBitField
" syn region freebasicParen transparent start='(' end=')' contains=ALLBUT,@freebasicParenGroup
" syn match freebasicParenError ")"
" syn match freebasicInParen contained "[{}]"
" syn cluster freebasicParenGroup contains=freebasicParenError,freebasicSpecial,freebasicTodo,freebasicUserCont,freebasicUserLabel,freebasicBitField
"
" Integer number, or floating point number without a dot and with "f".
" Integer number
"
syn region freebasicHex start="&h" end="\W"
syn region freebasicHexError start="&h\x*[g-zG-Z]" end="\W"
syn region freebasicOctal start="&o" end="\W"
syn region freebasicOctalError start="&o[0-7]*[89a-zA-Z]" end="\W"
syn region freebasicBinary start="&b" end="\W"
syn region freebasicBinaryError start="&b[01]*[2-9a-zA-Z]" end="\W"
syn match freebasicInteger "\<\d\+\(u\=l\=\|lu\|f\)\>"
syn match freebasicHexError "&h\w*\>"
syn match freebasicOctalError "&o\w*\>"
syn match freebasicBinaryError "&b\w*\>"
syn match freebasicHex "&h\x\+\%([%L&U]\|UL\|LL\|ULL\)\=\>"
syn match freebasicOctal "&o\o\+\%([%L&U]\|UL\|LL\|ULL\)\=\>"
syn match freebasicBinary "&b[10]\+\%([%L&U]\|UL\|LL\|ULL\)\=\>"
syn match freebasicInteger "\<\d\+\%([%L&U]\|UL\|LL\|ULL\)\=\>"
"
" Floating point number, with dot, optional exponent
" Floating point
" See: https://www.freebasic.net/forum/viewtopic.php?t=20323
"
syn match freebasicFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
" Floating point number, with dot, optional exponent, optional suffix
"
" Floating point number, starting with a dot, optional exponent
syn match freebasicFloat "\<\d\+\.\d*\%([de][-+]\=\d*\)\=[f!#]\="
"
syn match freebasicFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
" Floating point number, starting with a dot, optional exponent, optional suffix
"
" Floating point number, without dot, with exponent
syn match freebasicFloat "\.\d\+\%([de][-+]\=\d*\)\=[f!#]\="
"
syn match freebasicFloat "\<\d\+e[-+]\=\d\+[fl]\=\>"
" Floating point number, without dot, with optional exponent, optional suffix
"
" Octal number
syn match freebasicFloat "\<\d\+\%([de][-+]\=\d*\)[f!#]\="
"
syn case match
syn match freebasicOctal2 "\<0\o*\>"
syn match freebasicOctal2Error "\<0\o*[89a-zA-Z]"
" Floating point number, without dot, without exponent, with suffix
"
" String and Character contstants
"
syn region freebasicString start='"' end='"' contains=freebasicSpecial,freebasicTodo
syn region freebasicString start="'" end="'" contains=freebasicSpecial,freebasicTodo
"
" Comments
"
syn match freebasicSpecial contained "\\\\."
syn region freebasicComment start="^rem" end="$" contains=freebasicSpecial,freebasicTodo
syn region freebasicComment start=":\s*rem" end="$" contains=freebasicSpecial,freebasicTodo
syn region freebasicComment start="\s*'" end="$" contains=freebasicSpecial,freebasicTodo
syn region freebasicComment start="^'" end="$" contains=freebasicSpecial,freebasicTodo
"
" Now do the comments and labels
"
syn match freebasicLabel "^\d"
syn match freebasicLabel "\<^\w+:\>"
syn region freebasicLineNumber start="^\d" end="\s"
syn match freebasicFloat "\<\d\+[f!#]"
"
" Create the clusters
"
syn cluster freebasicNumber contains=freebasicHex,freebasicOctal,freebasicOctal2,freebasicBinary,freebasicInteger,freebasicFloat
syn cluster freebasicError contains=freebasicHexError,freebasicOctalError,freebasicOctal2,freebasicBinary
syn cluster freebasicNumber contains=freebasicHex,freebasicOctal,freebasicBinary,freebasicInteger,freebasicFloat
syn cluster freebasicNumberError contains=freebasicHexError,freebasicOctalError,freebasicBinaryError
"
" Used with OPEN statement
" Booleans
"
syn match freebasicFilenumber "#\d\+"
syn match freebasicMathOperator "[\+\-\=\|\*\/\>\<\%\()[\]]" contains=freebasicParen
if s:lang != "qb"
syn keyword freebasicBoolean TRUE FALSE
endif
"
"
" String and escape sequences
"
syn match freebasicSpecial contained "\\."
syn match freebasicSpecial contained "\\\d\{1,3}"
syn match freebasicSpecial contained "\\&h\x\{1,2}"
syn match freebasicSpecial contained "\\&o\o\{1,3}"
syn match freebasicSpecial contained "\\&b[01]\{1,8}"
syn match freebasicSpecial contained "\\u\x\{1,4}"
syn region freebasicString start='"' end='"' " TODO: Toggle contains on Option Escape in fblite and qb? -- DJK 20/11/19
syn region freebasicString start='!\zs"' end='"' contains=freebasicSpecial
syn region freebasicString start='$\zs"' end='"'
"
" Line labels
"
if s:lang =~# '\<\%(qb\|fblite\)\>'
syn match freebasicLineLabel "^\s*\zs\h\%(\w\|\.\)*\ze\s*:"
else
syn match freebasicLineLabel "^\s*\zs\h\w*\ze\s*:"
endif
syn match freebasicLineNumber "^\s*\zs\d\+"
"
" Line continuations
"
" syn match freebasicLineContinuation "\<_\>" nextgroup=freebasicComment,freebasicPostLineContinuation skipwhite
syn keyword freebasicLineContinuation _ nextgroup=freebasicComment,freebasicPostLineContinuation skipwhite
syn match freebasicPostLineContinuation ".*" contained
"
"
" Type suffixes
if exists("freebasic_type_suffixes") && s:lang =~# '\<\%(qb\|fblite\)\>'
syn match freebasicTypeSuffix "\h\%(\w\|.\)*\zs[$%&!#]"
endif
"
" Comments
"
syn keyword freebasicTodo TODO FIXME XXX NOTE contained
syn region freebasicComment start="\<rem\>" end="$" contains=freebasicTodo,@Spell,freebasicMetacommand
syn region freebasicComment start="'" end="$" contains=freebasicTodo,@Spell,freebasicMetacommand
syn region freebasicDoubleComment start="''" end="$" contains=freebasicTodo,@Spell
if !exists("freebasic_no_comment_fold")
syn region freebasicMultilineComment start="/'" end="'/" contains=freebasicTodo,@Spell,freeBasicMultilineComment fold keepend extend
syn region freebasicMultilineComment2 start="^\s*'.*\n\%(\s*'\)\@=" end="^\s*'.*\n\%(\s*'\)\@!" contains=freebasicComment,freebasicDoubleComment keepend fold
else
syn region freebasicMultilineComment start="/'" end="'/" contains=freebasicTodo,@Spell,freeBasicMultilineComment
endif
syn case match
syn sync linebreaks=1
"
" The default methods for highlighting. Can be overridden later
"
hi def link freebasicArrays StorageClass
hi def link freebasicAsm Special
hi def link freebasicBitManipulation Operator
hi def link freebasicCompilerSwitches PreCondit
hi def link freebasicBoolean Boolean
if s:lang == "fb"
hi def link freebasicCompilerSwitches freebasicUnsupportedError
else
hi def link freebasicCompilerSwitches PreCondit
endif
hi def link freebasicConsole Special
hi def link freebasicData Special
hi def link freebasicDataTypes Type
hi def link freebasicDateTime Type
hi def link freebasicDebug Special
hi def link freebasicErrorHandling Special
hi def link freebasicFilenumber Special
hi def link freebasicFiles Special
hi def link freebasicFunctions Function
hi def link freebasicGraphics Function
hi def link freebasicHardware Special
hi def link freebasicLogical Conditional
hi def link freebasicLoops Repeat
hi def link freebasicMath Function
if s:lang == "fb"
hi def link freebasicMetacommand freebasicUnsupportedError
else
hi def link freebasicMetacommand SpecialComment
endif
hi def link freebasicMemory Function
hi def link freebasicMisc Special
hi def link freebasicModularizing Special
@@ -240,18 +620,55 @@ hi def link freebasicString String
hi def link freebasicTypeCasting Type
hi def link freebasicUserInput Statement
hi def link freebasicComment Comment
hi def link freebasicDoubleComment Comment
hi def link freebasicMultilineComment Comment
hi def link freebasicConditional Conditional
hi def link freebasicError Error
hi def link freebasicIdentifier Identifier
hi def link freebasicInclude Include
hi def link freebasicGenericFunction Function
hi def link freebasicLabel Label
hi def link freebasicLineNumber Label
hi def link freebasicLineContinuation Special
hi def link freebasicLineLabel LineNr
if s:lang == "fb"
hi def link freebasicLineNumber freebasicUnsupportedError
else
hi def link freebasicLineNumber LineNr
endif
hi def link freebasicMathOperator Operator
hi def link freebasicNumber Number
hi def link freebasicHex Number
hi def link freebasicOctal Number
hi def link freebasicBinary Number
hi def link freebasicInteger Number
hi def link freebasicFloat Float
hi def link freebasicHexError Error
hi def link freebasicOctalError Error
hi def link freebasicBinaryError Error
hi def link freebasicAssignmentOperator Operator
hi def link freebasicArithmeticOperator Operator
hi def link freebasicIndexingOperator Operator
hi def link freebasicRelationalOperator Operator
hi def link freebasicBitwiseOperator Operator
hi def link freebasicShortcircuitOperator Operator
hi def link freebasicPreprocessorOperator Operator
hi def link freebasicPointerOperator Operator
if exists("freebasic_operators")
hi def link freebasicTypeOperator Operator
endif
hi def link freebasicMemoryOperator Operator
hi def link freebasicSpaceError Error
hi def link freebasicSpecial Special
hi def link freebasicTodo Todo
hi def link freebasicUnsupported freebasicUnsupportedError
hi def link freebasicUnsupportedError Error
unlet s:lang
let b:current_syntax = "freebasic"
" vim: ts=8
" vim: ts=8 tw=132 fdm=marker

View File

@@ -1,12 +1,9 @@
" Vim syntax file
" Language: HTML
" Previous Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
" Repository: https://notabug.org/jorgesumle/vim-html-syntax
" Last Change: 2021 Mar 02
" Included patch #7900 to fix comments
" Included patch #7916 to fix a few more things
"
" Language: HTML
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainers: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
" Claudio Fleiner <claudio@fleiner.com>
" Last Change: 2022 Jul 20
" Please check :help html.vim for some comments and a description of the options
@@ -23,6 +20,9 @@ set cpo&vim
syntax spell toplevel
syn include @htmlXml syntax/xml.vim
unlet b:current_syntax
syn case ignore
" mark illegal characters
@@ -30,13 +30,13 @@ syn match htmlError "[<>&]"
" tags
syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc
syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError
syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc
syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError
syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
syn match htmlTagError contained "[^>]<"ms=s+1
@@ -47,13 +47,13 @@ syn keyword htmlTagName contained cite code dd dfn dir div dl dt font
syn keyword htmlTagName contained form hr html img
syn keyword htmlTagName contained input isindex kbd li link map menu
syn keyword htmlTagName contained meta ol option param pre p samp span
syn keyword htmlTagName contained select small sub sup
syn keyword htmlTagName contained select small strike sub sup
syn keyword htmlTagName contained table td textarea th tr tt ul var xmp
syn match htmlTagName contained "\<\(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>"
syn match htmlTagName contained "\<\%(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>"
" new html 4.0 tags
syn keyword htmlTagName contained abbr acronym bdo button col label
syn keyword htmlTagName contained colgroup fieldset iframe ins legend
syn keyword htmlTagName contained abbr acronym bdo button col colgroup
syn keyword htmlTagName contained del fieldset iframe ins label legend
syn keyword htmlTagName contained object optgroup q s tbody tfoot thead
" new html 5 tags
@@ -65,6 +65,15 @@ syn keyword htmlTagName contained progress rb rp rt rtc ruby section
syn keyword htmlTagName contained slot source summary template time track
syn keyword htmlTagName contained video wbr
" svg and math tags
syn keyword htmlMathTagName contained math
syn keyword htmlSvgTagName contained svg
syn region htmlMath start="<math>" end="</math>" contains=@htmlXml transparent keepend
syn region htmlSvg start="<svg>" end="</svg>" contains=@htmlXml transparent keepend
syn cluster xmlTagHook add=htmlMathTagName,htmlSvgTagName
" legal arg names
syn keyword htmlArg contained action
syn keyword htmlArg contained align alink alt archive background bgcolor
@@ -77,7 +86,7 @@ syn keyword htmlArg contained marginwidth maxlength method name prompt
syn keyword htmlArg contained rel rev rows rowspan scrolling selected shape
syn keyword htmlArg contained size src start target text type url
syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap
syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1
syn match htmlArg contained "\<\%(http-equiv\|href\|title\)="me=e-1
" aria attributes
exe 'syn match htmlArg contained "\<aria-\%(' . join([
@@ -95,15 +104,15 @@ syn keyword htmlArg contained role
" Netscape extensions
syn keyword htmlTagName contained frame noframes frameset nobr blink
syn keyword htmlTagName contained layer ilayer nolayer spacer
syn keyword htmlArg contained frameborder noresize pagex pagey above below
syn keyword htmlArg contained left top visibility clip id noshade
syn match htmlArg contained "\<z-index\>"
syn keyword htmlArg contained frameborder noresize pagex pagey above below
syn keyword htmlArg contained left top visibility clip id noshade
syn match htmlArg contained "\<z-index\>"
" Microsoft extensions
syn keyword htmlTagName contained marquee
" html 4.0 arg names
syn match htmlArg contained "\<\(accept-charset\|label\)\>"
syn match htmlArg contained "\<\%(accept-charset\|label\)\>"
syn keyword htmlArg contained abbr accept accesskey axis char charoff charset
syn keyword htmlArg contained cite classid codetype compact data datetime
syn keyword htmlArg contained declare defer dir disabled for frame
@@ -113,51 +122,57 @@ syn keyword htmlArg contained rules scheme scope span standby style
syn keyword htmlArg contained summary tabindex valuetype version
" html 5 arg names
syn keyword htmlArg contained allowfullscreen async autocomplete autofocus
syn keyword htmlArg contained autoplay challenge contenteditable contextmenu
syn keyword htmlArg contained controls crossorigin default dirname download
syn keyword htmlArg contained draggable dropzone form formaction formenctype
syn keyword htmlArg contained formmethod formnovalidate formtarget hidden
syn keyword htmlArg contained high icon inputmode keytype kind list loop low
syn keyword htmlArg contained max min minlength muted nonce novalidate open
syn keyword htmlArg contained optimum pattern placeholder poster preload
syn keyword htmlArg contained radiogroup required reversed sandbox spellcheck
syn keyword htmlArg contained sizes srcset srcdoc srclang step title translate
syn keyword htmlArg contained typemustmatch
syn keyword htmlArg contained allow autocapitalize as blocking decoding
syn keyword htmlArg contained enterkeyhint imagesizes imagesrcset inert
syn keyword htmlArg contained integrity is itemid itemprop itemref itemscope
syn keyword htmlArg contained itemtype loading nomodule ping playsinline
syn keyword htmlArg contained referrerpolicy slot allowfullscreen async
syn keyword htmlArg contained autocomplete autofocus autoplay challenge
syn keyword htmlArg contained contenteditable contextmenu controls crossorigin
syn keyword htmlArg contained default dirname download draggable dropzone form
syn keyword htmlArg contained formaction formenctype formmethod formnovalidate
syn keyword htmlArg contained formtarget hidden high icon inputmode keytype
syn keyword htmlArg contained kind list loop low max min minlength muted nonce
syn keyword htmlArg contained novalidate open optimum pattern placeholder
syn keyword htmlArg contained poster preload radiogroup required reversed
syn keyword htmlArg contained sandbox spellcheck sizes srcset srcdoc srclang
syn keyword htmlArg contained step title translate typemustmatch
syn match htmlArg contained "\<data-\h\%(\w\|[-.]\)*\%(\_s*=\)\@="
" special characters
syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
" Comments (the real ones or the old netscape ones)
if exists("html_wrong_comments")
syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
else
" The HTML 5.2 syntax 8.2.4.41: bogus comment is parser error; browser skips until next &gt
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentError keepend
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentError keepend
" Idem 8.2.4.42,51: Comment starts with <!-- and ends with -->
" Idem 8.2.4.43,44: Except <!--> and <!---> are parser errors
" Idem 8.2.4.52: dash-dash-bang (--!>) is error ignored by parser, also closes comment
syn region htmlComment matchgroup=htmlComment start=+<!--\%(-\?>\)\@!+ end=+--!\?>+ contains=htmlCommentNested,@htmlPreProc,@Spell keepend
syn region htmlComment matchgroup=htmlComment start=+<!--\%(-\?>\)\@!+ end=+--!\?>+ contains=htmlCommentNested,@htmlPreProc,@Spell keepend
" Idem 8.2.4.49: nested comment is parser error, except <!--> is all right
syn match htmlCommentNested contained "<!-->\@!"
syn match htmlCommentError contained "[^><!]"
endif
syn region htmlComment start=+<!DOCTYPE+ end=+>+ keepend
syn region htmlComment start=+<!DOCTYPE+ end=+>+ keepend
" server-parsed commands
syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr
syn match htmlPreStmt contained "<!--#\(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>"
syn match htmlPreStmt contained "<!--#\%(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>"
syn match htmlPreError contained "<!--#\S*"ms=s+4
syn match htmlPreAttr contained "\w\+=[^"]\S\+" contains=htmlPreProcAttrError,htmlPreProcAttrName
syn region htmlPreAttr contained start=+\w\+="+ skip=+\\\\\|\\"+ end=+"+ contains=htmlPreProcAttrName keepend
syn match htmlPreProcAttrError contained "\w\+="he=e-1
syn match htmlPreProcAttrName contained "\(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)="he=e-1
syn match htmlPreProcAttrName contained "\%(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)="he=e-1
if !exists("html_no_rendering")
" rendering
syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc
syn region htmlStrike start="<del\>" end="</del\_s*>"me=s-1 contains=@htmlTop
syn region htmlStrike start="<s\>" end="</s\_s*>"me=s-1 contains=@htmlTop
syn region htmlStrike start="<strike\>" end="</strike\_s*>"me=s-1 contains=@htmlTop
syn region htmlBold start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
@@ -200,26 +215,26 @@ if !exists("html_no_rendering")
syn region htmlTitle start="<title\>" end="</title\_s*>"me=s-1 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc
endif
syn keyword htmlTagName contained noscript
syn keyword htmlSpecialTagName contained script style
syn keyword htmlTagName contained noscript
syn keyword htmlSpecialTagName contained script style
if main_syntax != 'java' || exists("java_javascript")
" JAVA SCRIPT
syn include @htmlJavaScript syntax/javascript.vim
unlet b:current_syntax
syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
hi def link htmlScriptTag htmlTag
" html events (i.e. arguments that include javascript commands)
if exists("html_extended_events")
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ
else
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ keepend contains=htmlEventSQ
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ keepend contains=htmlEventDQ
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ keepend contains=htmlEventSQ
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ keepend contains=htmlEventDQ
endif
syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript
syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript
syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript
syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript
hi def link htmlEventSQ htmlEvent
hi def link htmlEventDQ htmlEvent
@@ -234,15 +249,15 @@ if main_syntax != 'java' || exists("java_vb")
syn region javaScript start=+<script \_[^>]*language *=\_[^>]*vbscript\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
endif
syn cluster htmlJavaScript add=@htmlPreproc
syn cluster htmlJavaScript add=@htmlPreproc
if main_syntax != 'java' || exists("java_css")
" embedded style sheets
syn keyword htmlArg contained media
syn keyword htmlArg contained media
syn include @htmlCss syntax/css.vim
unlet b:current_syntax
syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc
syn match htmlCssStyleComment contained "\(<!--\|-->\)"
syn match htmlCssStyleComment contained "\%(<!--\|-->\)"
syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc
hi def link htmlStyleArg htmlString
endif
@@ -258,68 +273,70 @@ if main_syntax == "html"
endif
" The default highlighting.
hi def link htmlTag Function
hi def link htmlEndTag Identifier
hi def link htmlArg Type
hi def link htmlTagName htmlStatement
hi def link htmlSpecialTagName Exception
hi def link htmlValue String
hi def link htmlSpecialChar Special
hi def link htmlTag Function
hi def link htmlEndTag Identifier
hi def link htmlArg Type
hi def link htmlTagName htmlStatement
hi def link htmlSpecialTagName Exception
hi def link htmlMathTagName htmlTagName
hi def link htmlSvgTagName htmlTagName
hi def link htmlValue String
hi def link htmlSpecialChar Special
if !exists("html_no_rendering")
hi def link htmlH1 Title
hi def link htmlH2 htmlH1
hi def link htmlH3 htmlH2
hi def link htmlH4 htmlH3
hi def link htmlH5 htmlH4
hi def link htmlH6 htmlH5
hi def link htmlHead PreProc
hi def link htmlTitle Title
hi def link htmlBoldItalicUnderline htmlBoldUnderlineItalic
hi def link htmlUnderlineBold htmlBoldUnderline
hi def link htmlUnderlineItalicBold htmlBoldUnderlineItalic
hi def link htmlUnderlineBoldItalic htmlBoldUnderlineItalic
hi def link htmlItalicUnderline htmlUnderlineItalic
hi def link htmlItalicBold htmlBoldItalic
hi def link htmlItalicBoldUnderline htmlBoldUnderlineItalic
hi def link htmlItalicUnderlineBold htmlBoldUnderlineItalic
hi def link htmlLink Underlined
hi def link htmlLeadingSpace None
hi def link htmlH1 Title
hi def link htmlH2 htmlH1
hi def link htmlH3 htmlH2
hi def link htmlH4 htmlH3
hi def link htmlH5 htmlH4
hi def link htmlH6 htmlH5
hi def link htmlHead PreProc
hi def link htmlTitle Title
hi def link htmlBoldItalicUnderline htmlBoldUnderlineItalic
hi def link htmlUnderlineBold htmlBoldUnderline
hi def link htmlUnderlineItalicBold htmlBoldUnderlineItalic
hi def link htmlUnderlineBoldItalic htmlBoldUnderlineItalic
hi def link htmlItalicUnderline htmlUnderlineItalic
hi def link htmlItalicBold htmlBoldItalic
hi def link htmlItalicBoldUnderline htmlBoldUnderlineItalic
hi def link htmlItalicUnderlineBold htmlBoldUnderlineItalic
hi def link htmlLink Underlined
hi def link htmlLeadingSpace None
if !exists("html_my_rendering")
hi def htmlBold term=bold cterm=bold gui=bold
hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline
hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
hi def htmlBold term=bold cterm=bold gui=bold
hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline
hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline
hi def htmlUnderline term=underline cterm=underline gui=underline
hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline
hi def htmlItalic term=italic cterm=italic gui=italic
hi def htmlUnderline term=underline cterm=underline gui=underline
hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline
hi def htmlItalic term=italic cterm=italic gui=italic
if v:version > 800 || v:version == 800 && has("patch1038")
hi def htmlStrike term=strikethrough cterm=strikethrough gui=strikethrough
hi def htmlStrike term=strikethrough cterm=strikethrough gui=strikethrough
else
hi def htmlStrike term=underline cterm=underline gui=underline
hi def htmlStrike term=underline cterm=underline gui=underline
endif
endif
endif
hi def link htmlPreStmt PreProc
hi def link htmlPreError Error
hi def link htmlPreProc PreProc
hi def link htmlPreAttr String
hi def link htmlPreStmt PreProc
hi def link htmlPreError Error
hi def link htmlPreProc PreProc
hi def link htmlPreAttr String
hi def link htmlPreProcAttrName PreProc
hi def link htmlPreProcAttrError Error
hi def link htmlString String
hi def link htmlStatement Statement
hi def link htmlComment Comment
hi def link htmlCommentNested htmlError
hi def link htmlCommentError htmlError
hi def link htmlTagError htmlError
hi def link htmlEvent javaScript
hi def link htmlError Error
hi def link htmlString String
hi def link htmlStatement Statement
hi def link htmlComment Comment
hi def link htmlCommentNested htmlError
hi def link htmlCommentError htmlError
hi def link htmlTagError htmlError
hi def link htmlEvent javaScript
hi def link htmlError Error
hi def link javaScript Special
hi def link javaScript Special
hi def link javaScriptExpression javaScript
hi def link htmlCssStyleComment Comment
hi def link htmlCssDefinition Special
hi def link htmlCssDefinition Special
let b:current_syntax = "html"

View File

@@ -17,6 +17,9 @@ endif
scriptencoding utf-8
" Error
syn match i3ConfigError /.*/
" Todo
syn keyword i3ConfigTodo TODO FIXME XXX contained
@@ -54,8 +57,8 @@ syn match i3ConfigInclude /^\s*include\s\+.*$/ contains=i3ConfigIncludeKeyword,i
" Gaps
syn keyword i3ConfigGapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle up down contained
syn match i3ConfigGapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(-\?\d\+\|\$.*\)\)$/ contains=i3ConfigGapStyleKeyword,i3ConfigNumber,i3ConfigVariable
syn keyword i3ConfigSmartGapKeyword on inverse_outer contained
syn match i3ConfigSmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\)\s\?$/ contains=i3ConfigSmartGapKeyword
syn keyword i3ConfigSmartGapKeyword on inverse_outer off contained
syn match i3ConfigSmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\|off\)\s\?$/ contains=i3ConfigSmartGapKeyword
syn keyword i3ConfigSmartBorderKeyword on no_gaps contained
syn match i3ConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\)\s\?$/ contains=i3ConfigSmartBorderKeyword
@@ -74,7 +77,7 @@ syn match i3ConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=i3ConfigVaria
syn keyword i3ConfigSizeSpecial x contained
syn match i3ConfigNegativeSize /-/ contained
syn match i3ConfigSize /-\?\d\+\s\?x\s\?-\?\d\+/ contained contains=i3ConfigSizeSpecial,i3ConfigNumber,i3ConfigNegativeSize
syn match i3ConfigFloating /^\s*floating_modifier\s\+\$\w\+\d\?/ contains=i3ConfigVariable
syn match i3ConfigFloatingModifier /^\s*floating_modifier\s\+\$\w\+\d\?/ contains=i3ConfigVariable
syn match i3ConfigFloating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=i3ConfigSize
" Orientation
@@ -183,6 +186,7 @@ syn region i3ConfigBlock start=+^\s*[^#]*s\?{$+ end=+^\s*[^#]*}$+ contains=i3Con
syn region i3ConfigLineCont start=/^.*\\$/ end=/^.*$/ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
" Define the highlighting.
hi def link i3ConfigError Error
hi def link i3ConfigTodo Todo
hi def link i3ConfigComment Comment
hi def link i3ConfigFontContent Type
@@ -213,6 +217,7 @@ hi def link i3ConfigTimeUnit Constant
hi def link i3ConfigModifier Constant
hi def link i3ConfigString Constant
hi def link i3ConfigNegativeSize Constant
hi def link i3ConfigInclude Constant
hi def link i3ConfigFontSeparator Special
hi def link i3ConfigVariableModifier Special
hi def link i3ConfigSizeSpecial Special
@@ -233,6 +238,7 @@ hi def link i3ConfigLayout Identifier
hi def link i3ConfigBorderStyle Identifier
hi def link i3ConfigEdge Identifier
hi def link i3ConfigFloating Identifier
hi def link i3ConfigFloatingModifier Identifier
hi def link i3ConfigCommandKeyword Identifier
hi def link i3ConfigNoFocusKeyword Identifier
hi def link i3ConfigInitializeKeyword Identifier

View File

@@ -3,7 +3,7 @@
" Maintainer: Roland Hieber <rohieb+vim-iR0jGdkV@rohieb.name>, <https://github.com/rohieb>
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: https://github.com/vim/vim/blob/master/runtime/syntax/make.vim
" Last Change: 2020 May 03
" Last Change: 2020 Oct 16
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -45,19 +45,19 @@ syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1
syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2
syn region makeTarget transparent matchgroup=makeTarget
\ start="^[~A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1
\ end=";"re=e-1,me=e-1 end="[^\\]$"
\ start="^[~A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*&\?:\?:\{1,2}[^:=]"rs=e-1
\ end="[^\\]$"
\ keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment,makeDString
\ skipnl nextGroup=makeCommands
syn match makeTarget "^[~A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$"
syn match makeTarget "^[~A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*&\?::\=\s*$"
\ contains=makeIdent,makeSpecTarget,makeComment
\ skipnl nextgroup=makeCommands,makeCommandError
syn region makeSpecTarget transparent matchgroup=makeSpecTarget
\ start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1
\ start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\|ONESHELL\)\>\s*:\{1,2}[^:=]"rs=e-1
\ end="[^\\]$" keepend
\ contains=makeIdent,makeSpecTarget,makeNextLine,makeComment skipnl nextGroup=makeCommands
syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$"
syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\|ONESHELL\)\>\s*::\=\s*$"
\ contains=makeIdent,makeComment
\ skipnl nextgroup=makeCommands,makeCommandError

View File

@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Python
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
" Last Change: 2021 Dec 10
" Last Change: 2022 Jun 28
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
"
@@ -84,13 +84,19 @@ syn keyword pythonStatement as assert break continue del global
syn keyword pythonStatement lambda nonlocal pass return with yield
syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite
syn keyword pythonConditional elif else if
syn keyword pythonConditional case match
syn keyword pythonRepeat for while
syn keyword pythonOperator and in is not or
syn keyword pythonException except finally raise try
syn keyword pythonInclude from import
syn keyword pythonAsync async await
" Soft keywords
" These keywords do not mean anything unless used in the right context
" See https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords
" for more on this.
syn match pythonConditional "^\s*\zscase\%(\s\+.*:.*$\)\@="
syn match pythonConditional "^\s*\zsmatch\%(\s\+.*:\s*\%(#.*\)\=$\)\@="
" Decorators
" A dot must be allowed because of @MyClass.myfunc decorators.
syn match pythonDecorator "@" display contained

View File

@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
" Last Change: Jun 09, 2022
" Version: 201
" Last Change: Jun 29, 2022
" Version: 202
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
" For options and settings, please use: :help ft-sh-syntax
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) and heredoc fixes from Felipe Contreras
@@ -350,7 +350,7 @@ if exists("b:is_bash")
syn cluster shCommandSubList add=bashSpecialVariables,bashStatement
syn cluster shCaseList add=bashAdminStatement,bashStatement
syn keyword bashSpecialVariables contained auto_resume BASH BASH_ALIASES BASH_ALIASES BASH_ARGC BASH_ARGC BASH_ARGV BASH_ARGV BASH_CMDS BASH_CMDS BASH_COMMAND BASH_COMMAND BASH_ENV BASH_EXECUTION_STRING BASH_EXECUTION_STRING BASH_LINENO BASH_LINENO BASHOPTS BASHOPTS BASHPID BASHPID BASH_REMATCH BASH_REMATCH BASH_SOURCE BASH_SOURCE BASH_SUBSHELL BASH_SUBSHELL BASH_VERSINFO BASH_VERSION BASH_XTRACEFD BASH_XTRACEFD CDPATH COLUMNS COLUMNS COMP_CWORD COMP_CWORD COMP_KEY COMP_KEY COMP_LINE COMP_LINE COMP_POINT COMP_POINT COMPREPLY COMPREPLY COMP_TYPE COMP_TYPE COMP_WORDBREAKS COMP_WORDBREAKS COMP_WORDS COMP_WORDS COPROC COPROC DIRSTACK EMACS EMACS ENV ENV EUID FCEDIT FIGNORE FUNCNAME FUNCNAME FUNCNEST FUNCNEST GLOBIGNORE GROUPS histchars HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HISTTIMEFORMAT HISTTIMEFORMAT HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_CTYPE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_NUMERIC LINENO LINES LINES MACHTYPE MAIL MAILCHECK MAILPATH MAPFILE MAPFILE OLDPWD OPTARG OPTERR OPTIND OSTYPE PATH PIPESTATUS POSIXLY_CORRECT POSIXLY_CORRECT PPID PROMPT_COMMAND PS1 PS2 PS3 PS4 PWD RANDOM READLINE_LINE READLINE_LINE READLINE_POINT READLINE_POINT REPLY SECONDS SHELL SHELL SHELLOPTS SHLVL TIMEFORMAT TIMEOUT TMPDIR TMPDIR UID
syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep less ls mkdir mv rm rmdir rpm sed sleep sort strip tail
syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep head less ls mkdir mv rm rmdir rpm sed sleep sort strip tail
syn keyword bashAdminStatement daemon killall killproc nice reload restart start status stop
syn keyword bashStatement command compgen
endif
@@ -359,7 +359,7 @@ if exists("b:is_kornshell") || exists("b:is_posix")
syn cluster shCommandSubList add=kshSpecialVariables,kshStatement
syn cluster shCaseList add=kshStatement
syn keyword kshSpecialVariables contained CDPATH COLUMNS EDITOR ENV ERRNO FCEDIT FPATH HISTFILE HISTSIZE HOME IFS LINENO LINES MAIL MAILCHECK MAILPATH OLDPWD OPTARG OPTIND PATH PPID PS1 PS2 PS3 PS4 PWD RANDOM REPLY SECONDS SHELL TMOUT VISUAL
syn keyword kshStatement cat chmod clear cp du egrep expr fgrep find grep killall less ls mkdir mv nice printenv rm rmdir sed sort strip stty tail tput
syn keyword kshStatement cat chmod clear cp du egrep expr fgrep find grep head killall less ls mkdir mv nice printenv rm rmdir sed sort strip stty tail tput
syn keyword kshStatement command setgroups setsenv
endif

View File

@@ -0,0 +1,92 @@
" Vim syntax file
" Language: sway window manager config
" Original Author: James Eapen <james.eapen@vai.org>
" Maintainer: James Eapen <james.eapen@vai.org>
" Version: 0.11.0
" Last Change: 2022 Jun 07
" References:
" http://i3wm.org/docs/userguide.html#configuring
" https://github.com/swaywm/sway/blob/b69d637f7a34e239e48a4267ae94a5e7087b5834/sway/sway.5.scd
" http://vimdoc.sourceforge.net/htmldoc/syntax.html
"
"
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
runtime! syntax/i3config.vim
scriptencoding utf-8
" Error
"syn match swayConfigError /.*/
" Group mode/bar
syn keyword swayConfigBlockKeyword set input contained
syn region swayConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,swayConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
" binding
syn keyword swayConfigBindKeyword bindswitch bindgesture contained
syn match swayConfigBind /^\s*\(bindswitch\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,swayConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigNumber,i3ConfigUnit,i3ConfigUnitOr,i3ConfigBindArgument,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword,i3ConfigBorderStyleKeyword
" bindgestures
syn keyword swayConfigBindGestureCommand swipe pinch hold contained
syn keyword swayConfigBindGestureDirection up down left right next prev contained
syn keyword swayConfigBindGesturePinchDirection inward outward clockwise counterclockwise contained
syn match swayConfigBindGestureHold /^\s*\(bindgesture\)\s\+hold\(:[1-5]\)\?\s\+.*$/ contains=swayConfigBindKeyword,swayConfigBindGestureCommand,swayConfigBindGestureDirection,i3ConfigWorkspaceKeyword,i3ConfigAction
syn match swayConfigBindGestureSwipe /^\s*\(bindgesture\)\s\+swipe\(:[1-5]\)\?:\(up\|down\|left\|right\)\s\+.*$/ contains=swayConfigBindKeyword,swayConfigBindGestureCommand,swayConfigBindGestureDirection,i3ConfigWorkspaceKeyword,i3ConfigAction
syn match swayConfigBindGesturePinch /^\s*\(bindgesture\)\s\+\(pinch\):.*$/ contains=swayConfigBindKeyword,swayConfigBindGestureCommand,swayConfigBindGestureDirection,swayConfigBindGesturePinchDirection,i3ConfigWorkspaceKeyword,i3ConfigAction
" floating
syn keyword swayConfigFloatingKeyword floating contained
syn match swayConfigFloating /^\s*floating\s\+\(enable\|disable\|toggle\)\s*$/ contains=swayConfigFloatingKeyword
syn clear i3ConfigFloatingModifier
syn keyword swayConfigFloatingModifier floating_modifier contained
syn match swayConfigFloatingMouseAction /^\s\?.*floating_modifier\s.*\(normal\|inverted\)$/ contains=swayConfigFloatingModifier,i3ConfigVariable
" Gaps
syn clear i3ConfigSmartBorderKeyword
syn clear i3ConfigSmartBorder
syn keyword swayConfigSmartBorderKeyword on no_gaps off contained
syn match swayConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\|off\)\s\?$/ contains=swayConfigSmartBorderKeyword
" Changing colors
syn keyword swayConfigClientColorKeyword focused_tab_title contained
syn match swayConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=i3ConfigClientColorKeyword,i3ConfigColor,i3ConfigVariable,i3ConfigClientColorKeyword,swayConfigClientColorKeyword
" set display outputs
syn match swayConfigOutput /^\s*output\s\+.*$/ contains=i3ConfigOutput
" set display focus
syn keyword swayConfigFocusKeyword focus contained
syn keyword swayConfigFocusType output contained
syn match swayConfigFocus /^\s*focus\soutput\s.*$/ contains=swayConfigFocusKeyword,swayConfigFocusType
" xwayland
syn keyword swayConfigXwaylandKeyword xwayland contained
syn match swayConfigXwaylandModifier /^\s*xwayland\s\+\(enable\|disable\|force\)\s\?$/ contains=swayConfigXwaylandKeyword
"hi def link swayConfigError Error
hi def link i3ConfigFloating Error
hi def link swayConfigFloating Type
hi def link swayConfigFloatingMouseAction Type
hi def link swayConfigFocusKeyword Type
hi def link swayConfigSmartBorderKeyword Type
hi def link swayConfigBindGestureCommand Identifier
hi def link swayConfigBindGestureDirection Constant
hi def link swayConfigBindGesturePinchDirection Constant
hi def link swayConfigBindKeyword Identifier
hi def link swayConfigBlockKeyword Identifier
hi def link swayConfigClientColorKeyword Identifier
hi def link swayConfigFloatingKeyword Identifier
hi def link swayConfigFloatingModifier Identifier
hi def link swayConfigFocusType Identifier
hi def link swayConfigSmartBorder Identifier
hi def link swayConfigXwaylandKeyword Identifier
hi def link swayConfigXwaylandModifier Type
hi def link swayConfigBindGesture PreProc
let b:current_syntax = "swayconfig"

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 8.2 script
" Language: Vim 9.0 script
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" Last Change: Jun 16, 20222
" Version: 8.2-46
" Last Change: July 01, 2022
" Version: 9.0-01
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
" Automatically generated keyword lists: {{{1
@@ -49,8 +49,8 @@ syn keyword vimOption contained invai invaltkeymap invar invarabicshape invasd i
syn keyword vimOption contained invakm invanti invarab invari invautochdir invautoshelldir invaw invballooneval invbevalterm invbk invbreakindent invcf invcindent invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invemo inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangremap invlinebreak invlnr invlrm invmacatsui invml invmodeline invmodified
" termcap codes (which can also be set) {{{2
syn keyword vimOption contained t_8b t_8u t_AF t_AL t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_EI t_F2 t_F4 t_F6 t_F8 t_fd t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_kb t_KB t_kd t_KD t_KE t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_Ri t_RI t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_Si t_SI t_so t_sr t_SR t_ST t_te t_Te t_TE t_ti t_TI t_ts t_Ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_xn t_xs t_ZH t_ZR
syn keyword vimOption contained t_8f t_AB t_al t_AU t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_fe t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_KA t_kB t_KC t_kD t_ke t_KF
syn keyword vimOption contained t_8b t_8u t_AF t_AL t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_Ds t_EI t_F2 t_F4 t_F6 t_F8 t_fd t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_kb t_KB t_kd t_KD t_KE t_KG t_KH t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_Ri t_RI t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_Si t_SI t_so t_sr t_SR t_ST t_te t_Te t_TE t_ti t_TI t_ts t_Ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_xn t_xs t_ZH t_ZR
syn keyword vimOption contained t_8f t_AB t_al t_AU t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_ds t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_fe t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_KA t_kB t_KC t_kD t_ke t_KF t_kh t_kI
syn match vimOption contained "t_%1"
syn match vimOption contained "t_#2"
syn match vimOption contained "t_#4"
@@ -400,7 +400,7 @@ syn match vimSetMod contained "&vim\=\|[!&?<]\|all&"
" Let: {{{2
" ===
syn keyword vimLet let unl[et] skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc
VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s\+\%(trim\%(\s\+eval\)\=\|eval\%(\s\+trim\)\=\)\=\s*\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$'
VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s\+\%(trim\|eval\>\)\=\s*\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$'
" Abbreviations: {{{2
" =============

View File

@@ -422,7 +422,7 @@
2. 接着把光标放在单词 lubw 的字母 u 的位置那里。
3. 然后输入 cw 以及正确的单词(在本例中是输入 ine )。
3. 然后输入 ce 以及正确的单词(在本例中是输入 ine )。
4. 最后按 <ESC> 键,然后光标定位到下一个错误第一个准备更改的字母处。

View File

@@ -402,6 +402,7 @@ free_all_mem(void)
# ifdef FEAT_MENU
// Clear menus.
do_cmdline_cmd((char_u *)"aunmenu *");
do_cmdline_cmd((char_u *)"tlunmenu *");
# ifdef FEAT_MULTI_LANG
do_cmdline_cmd((char_u *)"menutranslate clear");
# endif

113
src/auto/configure vendored
View File

@@ -13037,15 +13037,26 @@ $as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for timer_create" >&5
$as_echo_n "checking for timer_create... " >&6; }
save_LIBS="$LIBS"
LIBS="$LIBS -lrt"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for timer_create without -lrt" >&5
$as_echo_n "checking for timer_create without -lrt... " >&6; }
if ${vim_cv_timer_create+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create'" >&5
$as_echo "$as_me: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create'" >&2;}
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include<signal.h>
#include<time.h>
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#endif
#include <signal.h>
#include <time.h>
static void set_flag(union sigval sv) {}
int
@@ -13058,54 +13069,94 @@ main ()
action.sigev_notify = SIGEV_THREAD;
action.sigev_notify_function = set_flag;
timer_create(CLOCK_REALTIME, &action, &timer_id);
if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
exit(1); // cannot create a monotonic timer
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; with -lrt" >&5
$as_echo "yes; with -lrt" >&6; }; $as_echo "#define HAVE_TIMER_CREATE 1" >>confdefs.h
if ac_fn_c_try_run "$LINENO"; then :
vim_cv_timer_create=yes
else
vim_cv_timer_create=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create" >&5
$as_echo "$vim_cv_timer_create" >&6; }
if test "x$vim_cv_timer_create" = "xno" ; then
save_LIBS="$LIBS"
LIBS="$LIBS -lrt"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for timer_create with -lrt" >&5
$as_echo_n "checking for timer_create with -lrt... " >&6; }
if ${vim_cv_timer_create_with_lrt+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create_with_lrt'" >&5
$as_echo "$as_me: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create_with_lrt'" >&2;}
else
LIBS="$save_LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include<signal.h>
#include<time.h>
static void set_flag(union sigval sv) {}
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#endif
#include <signal.h>
#include <time.h>
static void set_flag(union sigval sv) {}
int
main ()
{
struct timespec ts;
struct sigevent action = {0};
timer_t timer_id;
struct timespec ts;
struct sigevent action = {0};
timer_t timer_id;
action.sigev_notify = SIGEV_THREAD;
action.sigev_notify_function = set_flag;
timer_create(CLOCK_REALTIME, &action, &timer_id);
action.sigev_notify = SIGEV_THREAD;
action.sigev_notify_function = set_flag;
if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
exit(1); // cannot create a monotonic timer
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }; $as_echo "#define HAVE_TIMER_CREATE 1" >>confdefs.h
if ac_fn_c_try_run "$LINENO"; then :
vim_cv_timer_create_with_lrt=yes
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
vim_cv_timer_create_with_lrt=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_with_lrt" >&5
$as_echo "$vim_cv_timer_create_with_lrt" >&6; }
LIBS="$save_LIBS"
else
vim_cv_timer_create_with_lrt=no
fi
if test "x$vim_cv_timer_create" = "xyes" ; then
$as_echo "#define HAVE_TIMER_CREATE 1" >>confdefs.h
fi
if test "x$vim_cv_timer_create_with_lrt" = "xyes" ; then
$as_echo "#define HAVE_TIMER_CREATE 1" >>confdefs.h
LIBS="$LIBS -lrt"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
$as_echo_n "checking whether stat() ignores a trailing slash... " >&6; }

View File

@@ -2209,9 +2209,13 @@ apply_autocmds_group(
ap->last = FALSE;
ap->last = TRUE;
// Make sure cursor and topline are valid. The first time the current
// values are saved, restored by reset_lnums(). When nested only the
// values are corrected when needed.
if (nesting == 1)
// make sure cursor and topline are valid
check_lnums(TRUE);
else
check_lnums_nested(TRUE);
save_did_emsg = did_emsg;
@@ -2829,7 +2833,7 @@ autocmd_add_or_delete(typval_T *argvars, typval_T *rettv, int delete)
}
}
group_name = dict_get_string(event_dict, (char_u *)"group", TRUE);
group_name = dict_get_string(event_dict, "group", TRUE);
if (group_name == NULL || *group_name == NUL)
// if the autocmd group name is not specified, then use the current
// autocmd group
@@ -2864,7 +2868,7 @@ autocmd_add_or_delete(typval_T *argvars, typval_T *rettv, int delete)
{
varnumber_T bnum;
bnum = dict_get_number_def(event_dict, (char_u *)"bufnr", -1);
bnum = dict_get_number_def(event_dict, "bufnr", -1);
if (bnum == -1)
continue;
@@ -2904,13 +2908,13 @@ autocmd_add_or_delete(typval_T *argvars, typval_T *rettv, int delete)
pat = (char_u *)"";
}
once = dict_get_bool(event_dict, (char_u *)"once", FALSE);
nested = dict_get_bool(event_dict, (char_u *)"nested", FALSE);
once = dict_get_bool(event_dict, "once", FALSE);
nested = dict_get_bool(event_dict, "nested", FALSE);
// if 'replace' is true, then remove all the commands associated with
// this autocmd event/group and add the new command.
replace = dict_get_bool(event_dict, (char_u *)"replace", FALSE);
replace = dict_get_bool(event_dict, "replace", FALSE);
cmd = dict_get_string(event_dict, (char_u *)"cmd", TRUE);
cmd = dict_get_string(event_dict, "cmd", TRUE);
if (cmd == NULL)
{
if (delete)
@@ -3072,8 +3076,7 @@ f_autocmd_get(typval_T *argvars, typval_T *rettv)
// return only the autocmds in the specified group
if (dict_has_key(argvars[0].vval.v_dict, "group"))
{
name = dict_get_string(argvars[0].vval.v_dict,
(char_u *)"group", TRUE);
name = dict_get_string(argvars[0].vval.v_dict, "group", TRUE);
if (name == NULL)
return;
@@ -3097,8 +3100,7 @@ f_autocmd_get(typval_T *argvars, typval_T *rettv)
{
int i;
name = dict_get_string(argvars[0].vval.v_dict,
(char_u *)"event", TRUE);
name = dict_get_string(argvars[0].vval.v_dict, "event", TRUE);
if (name == NULL)
return;
@@ -3123,8 +3125,7 @@ f_autocmd_get(typval_T *argvars, typval_T *rettv)
// return only the autocmds for the specified pattern
if (dict_has_key(argvars[0].vval.v_dict, "pattern"))
{
pat = dict_get_string(argvars[0].vval.v_dict,
(char_u *)"pattern", TRUE);
pat = dict_get_string(argvars[0].vval.v_dict, "pattern", TRUE);
if (pat == NULL)
return;
}

View File

@@ -47,7 +47,7 @@ find_word_under_cursor(
{
// Not past end of the file.
lbuf = ml_get_buf(wp->w_buffer, lnum, FALSE);
if (col <= win_linetabsize(wp, lbuf, (colnr_T)MAXCOL))
if (col <= win_linetabsize(wp, lnum, lbuf, (colnr_T)MAXCOL))
{
// Not past end of line.
if (getword)

View File

@@ -1004,8 +1004,11 @@ free_buffer_stuff(
#ifdef FEAT_NETBEANS_INTG
netbeans_file_killed(buf);
#endif
map_clear_int(buf, MAP_ALL_MODES, TRUE, FALSE); // clear local mappings
map_clear_int(buf, MAP_ALL_MODES, TRUE, TRUE); // clear local abbrevs
#ifdef FEAT_PROP_POPUP
ga_clear_strings(&buf->b_textprop_text);
#endif
map_clear_mode(buf, MAP_ALL_MODES, TRUE, FALSE); // clear local mappings
map_clear_mode(buf, MAP_ALL_MODES, TRUE, TRUE); // clear local abbrevs
VIM_CLEAR(buf->b_start_fenc);
}
@@ -4294,7 +4297,7 @@ build_stl_str_hl(
curitem = 0;
prevchar_isflag = TRUE;
prevchar_isitem = FALSE;
for (s = usefmt; *s; )
for (s = usefmt; *s != NUL; )
{
if (curitem == (int)stl_items_len)
{
@@ -4324,7 +4327,7 @@ build_stl_str_hl(
stl_items_len = new_len;
}
if (*s != NUL && *s != '%')
if (*s != '%')
prevchar_isflag = prevchar_isitem = FALSE;
/*

View File

@@ -1208,14 +1208,22 @@ buf_write(
// First find a file name that doesn't exist yet (use some
// arbitrary numbers).
STRCPY(IObuff, fname);
fd = -1;
for (i = 4913; ; i += 123)
{
sprintf((char *)gettail(IObuff), "%d", i);
if (mch_lstat((char *)IObuff, &st) < 0)
break;
}
fd = mch_open((char *)IObuff,
{
fd = mch_open((char *)IObuff,
O_CREAT|O_WRONLY|O_EXCL|O_NOFOLLOW, perm);
if (fd < 0 && errno == EEXIST)
// If the same file name is created by another
// process between lstat() and open(), find another
// name.
continue;
break;
}
}
if (fd < 0) // can't write in directory
backup_copy = TRUE;
else

View File

@@ -172,9 +172,9 @@ check_recorded_changes(
FOR_ALL_LIST_ITEMS(buf->b_recorded_changes, li)
{
prev_lnum = (linenr_T)dict_get_number(
li->li_tv.vval.v_dict, (char_u *)"lnum");
li->li_tv.vval.v_dict, "lnum");
prev_lnume = (linenr_T)dict_get_number(
li->li_tv.vval.v_dict, (char_u *)"end");
li->li_tv.vval.v_dict, "end");
if (prev_lnum >= lnum || prev_lnum > lnume || prev_lnume >= lnum)
{
// the current change is going to make the line number in
@@ -384,13 +384,13 @@ invoke_listeners(buf_T *buf)
{
varnumber_T lnum;
lnum = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"lnum");
lnum = dict_get_number(li->li_tv.vval.v_dict, "lnum");
if (start > lnum)
start = lnum;
lnum = dict_get_number(li->li_tv.vval.v_dict, (char_u *)"end");
lnum = dict_get_number(li->li_tv.vval.v_dict, "end");
if (end < lnum)
end = lnum;
added += dict_get_number(li->li_tv.vval.v_dict, (char_u *)"added");
added += dict_get_number(li->li_tv.vval.v_dict, "added");
}
argv[1].v_type = VAR_NUMBER;
argv[1].vval.v_number = start;
@@ -1535,13 +1535,17 @@ open_line(
{
// End of C comment, indent should line up
// with the line containing the start of
// the comment
// the comment.
curwin->w_cursor.col = (colnr_T)(p - ptr);
if ((pos = findmatch(NULL, NUL)) != NULL)
{
curwin->w_cursor.lnum = pos->lnum;
newindent = get_indent();
break;
}
// this may make "ptr" invalid, get it again
ptr = ml_get(curwin->w_cursor.lnum);
p = ptr + curwin->w_cursor.col;
}
}
}

View File

@@ -12,8 +12,8 @@
#if defined(HAVE_WCHAR_H)
# include <wchar.h> // for towupper() and towlower()
#endif
static int win_nolbr_chartabsize(win_T *wp, char_u *s, colnr_T col, int *headp);
static int win_nolbr_chartabsize(chartabsize_T *cts, int *headp);
static unsigned nr2hex(unsigned c);
static int chartab_initialized = FALSE;
@@ -737,8 +737,9 @@ win_chartabsize(win_T *wp, char_u *p, colnr_T col)
#endif
/*
* Return the number of characters the string 's' will take on the screen,
* Return the number of characters the string "s" will take on the screen,
* taking into account the size of a tab.
* Does not handle text properties, since "s" is not a buffer line.
*/
int
linetabsize(char_u *s)
@@ -747,32 +748,34 @@ linetabsize(char_u *s)
}
/*
* Like linetabsize(), but starting at column "startcol".
* Like linetabsize(), but "s" starts at column "startcol".
*/
int
linetabsize_col(int startcol, char_u *s)
{
colnr_T col = startcol;
char_u *line = s; // pointer to start of line, for breakindent
chartabsize_T cts;
while (*s != NUL)
col += lbr_chartabsize_adv(line, &s, col);
return (int)col;
init_chartabsize_arg(&cts, curwin, 0, startcol, s, s);
while (*cts.cts_ptr != NUL)
cts.cts_vcol += lbr_chartabsize_adv(&cts);
clear_chartabsize_arg(&cts);
return (int)cts.cts_vcol;
}
/*
* Like linetabsize(), but for a given window instead of the current one.
*/
int
win_linetabsize(win_T *wp, char_u *line, colnr_T len)
win_linetabsize(win_T *wp, linenr_T lnum, char_u *line, colnr_T len)
{
colnr_T col = 0;
char_u *s;
chartabsize_T cts;
for (s = line; *s != NUL && (len == MAXCOL || s < line + len);
MB_PTR_ADV(s))
col += win_lbr_chartabsize(wp, line, s, col, NULL);
return (int)col;
init_chartabsize_arg(&cts, wp, lnum, 0, line, line);
for ( ; *cts.cts_ptr != NUL && (len == MAXCOL || cts.cts_ptr < line + len);
MB_PTR_ADV(cts.cts_ptr))
cts.cts_vcol += win_lbr_chartabsize(&cts, NULL);
clear_chartabsize_arg(&cts);
return (int)cts.cts_vcol;
}
/*
@@ -893,25 +896,106 @@ vim_isprintc_strict(int c)
}
/*
* like chartabsize(), but also check for line breaks on the screen
* Prepare the structure passed to chartabsize functions.
* "line" is the start of the line, "ptr" is the first relevant character.
* When "lnum" is zero do not use text properties that insert text.
*/
void
init_chartabsize_arg(
chartabsize_T *cts,
win_T *wp,
linenr_T lnum,
colnr_T col,
char_u *line,
char_u *ptr)
{
cts->cts_win = wp;
cts->cts_lnum = lnum;
cts->cts_vcol = col;
cts->cts_line = line;
cts->cts_ptr = ptr;
#ifdef FEAT_PROP_POPUP
cts->cts_text_prop_count = 0;
cts->cts_has_prop_with_text = FALSE;
cts->cts_cur_text_width = 0;
if (lnum > 0)
{
char_u *prop_start;
cts->cts_text_prop_count = get_text_props(wp->w_buffer, lnum,
&prop_start, FALSE);
if (cts->cts_text_prop_count > 0)
{
// Make a copy of the properties, so that they are properly
// aligned.
cts->cts_text_props = ALLOC_MULT(textprop_T,
cts->cts_text_prop_count);
if (cts->cts_text_props == NULL)
cts->cts_text_prop_count = 0;
else
{
int i;
mch_memmove(cts->cts_text_props, prop_start,
cts->cts_text_prop_count * sizeof(textprop_T));
for (i = 0; i < cts->cts_text_prop_count; ++i)
if (cts->cts_text_props[i].tp_id < 0)
{
cts->cts_has_prop_with_text = TRUE;
break;
}
if (!cts->cts_has_prop_with_text)
{
// won't use the text properties, free them
vim_free(cts->cts_text_props);
cts->cts_text_prop_count = 0;
}
}
}
}
#endif
}
/*
* Free any allocated item in "cts".
*/
void
clear_chartabsize_arg(chartabsize_T *cts UNUSED)
{
#ifdef FEAT_PROP_POPUP
if (cts->cts_text_prop_count > 0)
{
vim_free(cts->cts_text_props);
cts->cts_text_prop_count = 0; // avoid double free
}
#endif
}
/*
* Like chartabsize(), but also check for line breaks on the screen and text
* properties that insert text.
*/
int
lbr_chartabsize(
char_u *line UNUSED, // start of the line
unsigned char *s,
colnr_T col)
lbr_chartabsize(chartabsize_T *cts)
{
#ifdef FEAT_LINEBREAK
if (!curwin->w_p_lbr && *get_showbreak_value(curwin) == NUL
&& !curwin->w_p_bri)
#if defined(FEAT_LINEBREAK) || defined(FEAT_PROP_POPUP)
if (1
# ifdef FEAT_LINEBREAK
&& !curwin->w_p_lbr && *get_showbreak_value(curwin) == NUL
&& !curwin->w_p_bri
# endif
# ifdef FEAT_PROP_POPUP
&& !cts->cts_has_prop_with_text
#endif
)
{
#endif
if (curwin->w_p_wrap)
return win_nolbr_chartabsize(curwin, s, col, NULL);
RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, s, col)
#ifdef FEAT_LINEBREAK
return win_nolbr_chartabsize(cts, NULL);
RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, cts->cts_ptr, cts->cts_vcol)
#if defined(FEAT_LINEBREAK) || defined(FEAT_PROP_POPUP)
}
return win_lbr_chartabsize(curwin, line == NULL ? s : line, s, col, NULL);
return win_lbr_chartabsize(cts, NULL);
#endif
}
@@ -919,19 +1003,19 @@ lbr_chartabsize(
* Call lbr_chartabsize() and advance the pointer.
*/
int
lbr_chartabsize_adv(
char_u *line, // start of the line
char_u **s,
colnr_T col)
lbr_chartabsize_adv(chartabsize_T *cts)
{
int retval;
retval = lbr_chartabsize(line, *s, col);
MB_PTR_ADV(*s);
retval = lbr_chartabsize(cts);
MB_PTR_ADV(cts->cts_ptr);
return retval;
}
/*
* Return the screen size of the character indicated by "cts".
* "cts->cts_cur_text_width" is set to the extra size for a text property that
* inserts text.
* This function is used very often, keep it fast!!!!
*
* If "headp" not NULL, set *headp to the size of what we for 'showbreak'
@@ -940,17 +1024,20 @@ lbr_chartabsize_adv(
*/
int
win_lbr_chartabsize(
win_T *wp,
char_u *line UNUSED, // start of the line
char_u *s,
colnr_T col,
int *headp UNUSED)
chartabsize_T *cts,
int *headp UNUSED)
{
win_T *wp = cts->cts_win;
#ifdef FEAT_PROP_POPUP
char_u *line = cts->cts_line; // start of the line
#endif
char_u *s = cts->cts_ptr;
colnr_T vcol = cts->cts_vcol;
#ifdef FEAT_LINEBREAK
int c;
int size;
colnr_T col2;
colnr_T col_adj = 0; // col + screen size of tab
colnr_T col_adj = 0; // vcol + screen size of tab
colnr_T colmax;
int added;
int mb_added = 0;
@@ -959,23 +1046,66 @@ win_lbr_chartabsize(
int tab_corr = (*s == TAB);
int n;
char_u *sbr;
#endif
#if defined(FEAT_PROP_POPUP)
cts->cts_cur_text_width = 0;
#endif
#if defined(FEAT_LINEBREAK) || defined(FEAT_PROP_POPUP)
/*
* No 'linebreak', 'showbreak' and 'breakindent': return quickly.
* No 'linebreak', 'showbreak', 'breakindent' and text properties that
* insert text: return quickly.
*/
if (!wp->w_p_lbr && !wp->w_p_bri && *get_showbreak_value(wp) == NUL)
if (1
# ifdef FEAT_LINEBREAK
&& !wp->w_p_lbr && !wp->w_p_bri && *get_showbreak_value(wp) == NUL
# endif
# ifdef FEAT_PROP_POPUP
&& !cts->cts_has_prop_with_text
# endif
)
#endif
{
if (wp->w_p_wrap)
return win_nolbr_chartabsize(wp, s, col, headp);
RET_WIN_BUF_CHARTABSIZE(wp, wp->w_buffer, s, col)
return win_nolbr_chartabsize(cts, headp);
RET_WIN_BUF_CHARTABSIZE(wp, wp->w_buffer, s, vcol)
}
#ifdef FEAT_LINEBREAK
#if defined(FEAT_LINEBREAK) || defined(FEAT_PROP_POPUP)
/*
* First get normal size, without 'linebreak'
* First get the normal size, without 'linebreak' or text properties
*/
size = win_chartabsize(wp, s, col);
size = win_chartabsize(wp, s, vcol);
# ifdef FEAT_PROP_POPUP
if (cts->cts_has_prop_with_text)
{
int i;
int col = (int)(s - line);
for (i = 0; i < cts->cts_text_prop_count; ++i)
{
textprop_T *tp = cts->cts_text_props + i;
if (tp->tp_id < 0
&& tp->tp_col - 1 >= col && tp->tp_col - 1 < col + size
&& -tp->tp_id <= wp->w_buffer->b_textprop_text.ga_len)
{
char_u *p = ((char_u **)wp->w_buffer->b_textprop_text.ga_data)[
-tp->tp_id - 1];
// TODO: count screen cells
cts->cts_cur_text_width = (int)STRLEN(p);
size += cts->cts_cur_text_width;
break;
}
if (tp->tp_col - 1 > col)
break;
}
}
# endif
# ifdef FEAT_LINEBREAK
c = *s;
if (tab_corr)
col_adj = size - 1;
@@ -995,14 +1125,14 @@ win_lbr_chartabsize(
* non-blank after a blank.
*/
numberextra = win_col_off(wp);
col2 = col;
col2 = vcol;
colmax = (colnr_T)(wp->w_width - numberextra - col_adj);
if (col >= colmax)
if (vcol >= colmax)
{
colmax += col_adj;
n = colmax + win_col_off2(wp);
if (n > 0)
colmax += (((col - colmax) / n) + 1) * n - col_adj;
colmax += (((vcol - colmax) / n) + 1) * n - col_adj;
}
for (;;)
@@ -1013,19 +1143,19 @@ win_lbr_chartabsize(
if (!(c != NUL
&& (VIM_ISBREAK(c)
|| (!VIM_ISBREAK(c)
&& (col2 == col || !VIM_ISBREAK((int)*ps))))))
&& (col2 == vcol || !VIM_ISBREAK((int)*ps))))))
break;
col2 += win_chartabsize(wp, s, col2);
if (col2 >= colmax) // doesn't fit
{
size = colmax - col + col_adj;
size = colmax - vcol + col_adj;
break;
}
}
}
else if (has_mbyte && size == 2 && MB_BYTE2LEN(*s) > 1
&& wp->w_p_wrap && in_win_border(wp, col))
&& wp->w_p_wrap && in_win_border(wp, vcol))
{
++size; // Count the ">" in the last column.
mb_added = 1;
@@ -1039,33 +1169,33 @@ win_lbr_chartabsize(
*/
added = 0;
sbr = c == NUL ? empty_option : get_showbreak_value(wp);
if ((*sbr != NUL || wp->w_p_bri) && wp->w_p_wrap && col != 0)
if ((*sbr != NUL || wp->w_p_bri) && wp->w_p_wrap && vcol != 0)
{
colnr_T sbrlen = 0;
int numberwidth = win_col_off(wp);
numberextra = numberwidth;
col += numberextra + mb_added;
if (col >= (colnr_T)wp->w_width)
vcol += numberextra + mb_added;
if (vcol >= (colnr_T)wp->w_width)
{
col -= wp->w_width;
vcol -= wp->w_width;
numberextra = wp->w_width - (numberextra - win_col_off2(wp));
if (col >= numberextra && numberextra > 0)
col %= numberextra;
if (vcol >= numberextra && numberextra > 0)
vcol %= numberextra;
if (*sbr != NUL)
{
sbrlen = (colnr_T)MB_CHARLEN(sbr);
if (col >= sbrlen)
col -= sbrlen;
if (vcol >= sbrlen)
vcol -= sbrlen;
}
if (col >= numberextra && numberextra > 0)
col = col % numberextra;
else if (col > 0 && numberextra > 0)
col += numberwidth - win_col_off2(wp);
if (vcol >= numberextra && numberextra > 0)
vcol = vcol % numberextra;
else if (vcol > 0 && numberextra > 0)
vcol += numberwidth - win_col_off2(wp);
numberwidth -= win_col_off2(wp);
}
if (col == 0 || col + size + sbrlen > (colnr_T)wp->w_width)
if (vcol == 0 || vcol + size + sbrlen > (colnr_T)wp->w_width)
{
added = 0;
if (*sbr != NUL)
@@ -1074,8 +1204,8 @@ win_lbr_chartabsize(
{
// calculate effective window width
int width = (colnr_T)wp->w_width - sbrlen - numberwidth;
int prev_width = col
? ((colnr_T)wp->w_width - (sbrlen + col)) : 0;
int prev_width = vcol
? ((colnr_T)wp->w_width - (sbrlen + vcol)) : 0;
if (width <= 0)
width = (colnr_T)1;
@@ -1091,28 +1221,32 @@ win_lbr_chartabsize(
added += get_breakindent_win(wp, line);
size += added;
if (col != 0)
if (vcol != 0)
added = 0;
}
}
if (headp != NULL)
*headp = added + mb_added;
return size;
# endif
#endif
}
/*
* Like win_lbr_chartabsize(), except that we know 'linebreak' is off and
* 'wrap' is on. This means we need to check for a double-byte character that
* doesn't fit at the end of the screen line.
* Like win_lbr_chartabsize(), except that we know 'linebreak' is off, 'wrap'
* is on and there are no properties that insert text. This means we need to
* check for a double-byte character that doesn't fit at the end of the screen
* line.
* Only uses "cts_win", "cts_ptr" and "cts_vcol" from "cts".
*/
static int
win_nolbr_chartabsize(
win_T *wp,
char_u *s,
colnr_T col,
int *headp)
chartabsize_T *cts,
int *headp)
{
win_T *wp = cts->cts_win;
char_u *s = cts->cts_ptr;
colnr_T col = cts->cts_vcol;
int n;
if (*s == TAB && (!wp->w_p_list || wp->w_lcs_chars.tab1))
@@ -1187,6 +1321,7 @@ getvcol(
#endif
int ts = wp->w_buffer->b_p_ts;
int c;
chartabsize_T cts;
vcol = 0;
line = ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
@@ -1209,15 +1344,20 @@ getvcol(
posptr -= (*mb_head_off)(line, posptr);
}
init_chartabsize_arg(&cts, wp, pos->lnum, 0, line, line);
/*
* This function is used very often, do some speed optimizations.
* When 'list', 'linebreak', 'showbreak' and 'breakindent' are not set
* use a simple loop.
* and there are no text properties with "text" use a simple loop.
* Also use this when 'list' is set but tabs take their normal size.
*/
if ((!wp->w_p_list || wp->w_lcs_chars.tab1 != NUL)
#ifdef FEAT_LINEBREAK
&& !wp->w_p_lbr && *get_showbreak_value(wp) == NUL && !wp->w_p_bri
#endif
#ifdef FEAT_PROP_POPUP
&& !cts.cts_has_prop_with_text
#endif
)
{
@@ -1274,29 +1414,39 @@ getvcol(
{
for (;;)
{
// A tab gets expanded, depending on the current column
// A tab gets expanded, depending on the current column.
// Other things also take up space.
head = 0;
incr = win_lbr_chartabsize(wp, line, ptr, vcol, &head);
incr = win_lbr_chartabsize(&cts, &head);
// make sure we don't go past the end of the line
if (*ptr == NUL)
if (*cts.cts_ptr == NUL)
{
incr = 1; // NUL at end of line only takes one column
break;
}
if (posptr != NULL && ptr >= posptr) // character at pos->col
if (posptr != NULL && cts.cts_ptr >= posptr)
// character at pos->col
break;
vcol += incr;
MB_PTR_ADV(ptr);
cts.cts_vcol += incr;
MB_PTR_ADV(cts.cts_ptr);
}
vcol = cts.cts_vcol;
ptr = cts.cts_ptr;
}
clear_chartabsize_arg(&cts);
if (start != NULL)
*start = vcol + head;
if (end != NULL)
*end = vcol + incr - 1;
if (cursor != NULL)
{
#ifdef FEAT_PROP_POPUP
// cursor is after inserted text
vcol += cts.cts_cur_text_width;
#endif
if (*ptr == TAB
&& (State & MODE_NORMAL)
&& !wp->w_p_list

View File

@@ -2267,7 +2267,8 @@ get_c_indent(void)
}
// If the start comment string doesn't match with the
// start of the comment, skip this entry. XXX
else if (STRNCMP(ml_get(comment_pos->lnum) + comment_pos->col,
else if (STRNCMP(ml_get(comment_pos->lnum)
+ comment_pos->col,
lead_start, lead_start_len) != 0)
continue;
}
@@ -2794,8 +2795,6 @@ get_c_indent(void)
break;
}
l = ml_get_curline();
// If we're in a comment or raw string now, skip to
// the start of it.
trypos = ind_find_start_CORS(NULL);
@@ -2806,6 +2805,8 @@ get_c_indent(void)
continue;
}
l = ml_get_curline();
// Skip preprocessor directives and blank lines.
if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum,
&amount))
@@ -2905,8 +2906,6 @@ get_c_indent(void)
< ourscope - FIND_NAMESPACE_LIM)
break;
l = ml_get_curline();
// If we're in a comment or raw string now, skip
// to the start of it.
trypos = ind_find_start_CORS(NULL);
@@ -2917,6 +2916,8 @@ get_c_indent(void)
continue;
}
l = ml_get_curline();
// Skip preprocessor directives and blank lines.
if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum,
&amount))
@@ -3196,11 +3197,16 @@ get_c_indent(void)
&& trypos->col < tryposBrace->col)))
trypos = NULL;
l = ml_get_curline();
// If we are looking for ',', we also look for matching
// braces.
if (trypos == NULL && terminated == ','
&& find_last_paren(l, '{', '}'))
trypos = find_start_brace();
if (trypos == NULL && terminated == ',')
{
if (find_last_paren(l, '{', '}'))
trypos = find_start_brace();
l = ml_get_curline();
}
if (trypos != NULL)
{
@@ -3233,6 +3239,7 @@ get_c_indent(void)
--curwin->w_cursor.lnum;
curwin->w_cursor.col = 0;
}
l = ml_get_curline();
}
// Get indent and pointer to text for current line,
@@ -3711,7 +3718,7 @@ term_again:
// Are we at the start of a cpp base class declaration or
// constructor initialization? XXX
n = FALSE;
if (curbuf->b_ind_cpp_baseclass != 0 && theline[0] != '{')
if (curbuf->b_ind_cpp_baseclass != 0)
{
n = cin_is_cpp_baseclass(&cache_cpp_baseclass);
l = ml_get_curline();

View File

@@ -1305,8 +1305,10 @@ set_cmd_index(char_u *cmd, exarg_T *eap, expand_T *xp, int *complp)
eap->cmdidx = excmd_get_cmdidx(cmd, len);
// User defined commands support alphanumeric characters.
// Also when doing fuzzy expansion, support alphanumeric characters.
if ((cmd[0] >= 'A' && cmd[0] <= 'Z') || (fuzzy && *p != NUL))
// Also when doing fuzzy expansion for non-shell commands, support
// alphanumeric characters.
if ((cmd[0] >= 'A' && cmd[0] <= 'Z')
|| (fuzzy && eap->cmdidx != CMD_bang && *p != NUL))
while (ASCII_ISALNUM(*p) || *p == '*') // Allow * wild card
++p;
}

View File

@@ -3805,12 +3805,16 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
AC_MSG_RESULT(no))
dnl Check for timer_create. It probably requires the 'rt' library.
AC_MSG_CHECKING([for timer_create])
save_LIBS="$LIBS"
LIBS="$LIBS -lrt"
AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include<signal.h>
#include<time.h>
dnl Run the program to find out if timer_create(CLOCK_MONOTONIC) actually
dnl works, on Solaris timer_create() exists but fails at runtime.
AC_CACHE_CHECK([for timer_create without -lrt], [vim_cv_timer_create], [
AC_RUN_IFELSE([AC_LANG_PROGRAM([
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#endif
#include <signal.h>
#include <time.h>
static void set_flag(union sigval sv) {}
], [
struct timespec ts;
@@ -3819,25 +3823,53 @@ static void set_flag(union sigval sv) {}
action.sigev_notify = SIGEV_THREAD;
action.sigev_notify_function = set_flag;
timer_create(CLOCK_REALTIME, &action, &timer_id);
if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
exit(1); // cannot create a monotonic timer
])],
AC_MSG_RESULT(yes; with -lrt); AC_DEFINE(HAVE_TIMER_CREATE),
LIBS="$save_LIBS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include<signal.h>
#include<time.h>
static void set_flag(union sigval sv) {}
], [
struct timespec ts;
struct sigevent action = {0};
timer_t timer_id;
vim_cv_timer_create=yes,
vim_cv_timer_create=no,
AC_MSG_WARN([failed to build test program; if cross-compiling please set 'vim_cv_timer_create'])
)])
action.sigev_notify = SIGEV_THREAD;
action.sigev_notify_function = set_flag;
timer_create(CLOCK_REALTIME, &action, &timer_id);
])],
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIMER_CREATE),
AC_MSG_RESULT(no)))
dnl If the previous failed, check for timer_create() and linking with -lrt.
if test "x$vim_cv_timer_create" = "xno" ; then
save_LIBS="$LIBS"
LIBS="$LIBS -lrt"
AC_CACHE_CHECK([for timer_create with -lrt], [vim_cv_timer_create_with_lrt], [
AC_RUN_IFELSE([AC_LANG_PROGRAM([
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#endif
#include <signal.h>
#include <time.h>
static void set_flag(union sigval sv) {}
], [
struct timespec ts;
struct sigevent action = {0};
timer_t timer_id;
action.sigev_notify = SIGEV_THREAD;
action.sigev_notify_function = set_flag;
if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
exit(1); // cannot create a monotonic timer
])],
vim_cv_timer_create_with_lrt=yes,
vim_cv_timer_create_with_lrt=no,
AC_MSG_WARN([failed to build test program; if cross-compiling please set 'vim_cv_timer_create_with_lrt'])
)])
LIBS="$save_LIBS"
else
vim_cv_timer_create_with_lrt=no
fi
if test "x$vim_cv_timer_create" = "xyes" ; then
AC_DEFINE(HAVE_TIMER_CREATE)
fi
if test "x$vim_cv_timer_create_with_lrt" = "xyes" ; then
AC_DEFINE(HAVE_TIMER_CREATE)
LIBS="$LIBS -lrt"
fi
AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_slash],
[

View File

@@ -73,6 +73,10 @@ typedef struct {
char_u *p2, int last);
} cryptmethod_T;
static int crypt_sodium_init(cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len);
static long crypt_sodium_buffer_decode(cryptstate_T *state, char_u *from, size_t len, char_u **buf_out, int last);
static long crypt_sodium_buffer_encode(cryptstate_T *state, char_u *from, size_t len, char_u **buf_out, int last);
// index is method_nr of cryptstate_T, CRYPT_M_*
static cryptmethod_T cryptmethods[CRYPT_M_COUNT] = {
// PK_Zip; very weak
@@ -850,7 +854,7 @@ crypt_append_msg(
}
}
int
static int
crypt_sodium_init(
cryptstate_T *state UNUSED,
char_u *key UNUSED,
@@ -1030,7 +1034,7 @@ fail:
* Encrypt "from[len]" into "to[len]".
* "from" and "to" can be equal to encrypt in place.
*/
long
static long
crypt_sodium_buffer_encode(
cryptstate_T *state UNUSED,
char_u *from UNUSED,
@@ -1080,7 +1084,7 @@ crypt_sodium_buffer_encode(
* Decrypt "from[len]" into "to[len]".
* "from" and "to" can be equal to encrypt in place.
*/
long
static long
crypt_sodium_buffer_decode(
cryptstate_T *state UNUSED,
char_u *from UNUSED,

View File

@@ -662,11 +662,11 @@ dict_has_key(dict_T *d, char *key)
* Returns FAIL if the entry doesn't exist or out of memory.
*/
int
dict_get_tv(dict_T *d, char_u *key, typval_T *rettv)
dict_get_tv(dict_T *d, char *key, typval_T *rettv)
{
dictitem_T *di;
di = dict_find(d, key, -1);
di = dict_find(d, (char_u *)key, -1);
if (di == NULL)
return FAIL;
copy_tv(&di->di_tv, rettv);
@@ -680,12 +680,12 @@ dict_get_tv(dict_T *d, char_u *key, typval_T *rettv)
* Returns NULL if the entry doesn't exist or out of memory.
*/
char_u *
dict_get_string(dict_T *d, char_u *key, int save)
dict_get_string(dict_T *d, char *key, int save)
{
dictitem_T *di;
char_u *s;
di = dict_find(d, key, -1);
di = dict_find(d, (char_u *)key, -1);
if (di == NULL)
return NULL;
s = tv_get_string(&di->di_tv);
@@ -699,7 +699,7 @@ dict_get_string(dict_T *d, char_u *key, int save)
* Returns 0 if the entry doesn't exist.
*/
varnumber_T
dict_get_number(dict_T *d, char_u *key)
dict_get_number(dict_T *d, char *key)
{
return dict_get_number_def(d, key, 0);
}
@@ -709,11 +709,11 @@ dict_get_number(dict_T *d, char_u *key)
* Returns "def" if the entry doesn't exist.
*/
varnumber_T
dict_get_number_def(dict_T *d, char_u *key, int def)
dict_get_number_def(dict_T *d, char *key, int def)
{
dictitem_T *di;
di = dict_find(d, key, -1);
di = dict_find(d, (char_u *)key, -1);
if (di == NULL)
return def;
return tv_get_number(&di->di_tv);
@@ -745,11 +745,11 @@ dict_get_number_check(dict_T *d, char_u *key)
* Returns "def" if the entry doesn't exist.
*/
varnumber_T
dict_get_bool(dict_T *d, char_u *key, int def)
dict_get_bool(dict_T *d, char *key, int def)
{
dictitem_T *di;
di = dict_find(d, key, -1);
di = dict_find(d, (char_u *)key, -1);
if (di == NULL)
return def;
return tv_get_bool(&di->di_tv);

View File

@@ -464,7 +464,10 @@ diff_mark_adjust_tp(
for (i = 0; i < DB_COUNT; ++i)
if (tp->tp_diffbuf[i] != NULL && i != idx)
{
dp->df_lnum[i] -= off;
if (dp->df_lnum[i] > off)
dp->df_lnum[i] -= off;
else
dp->df_lnum[i] = 1;
dp->df_count[i] += n;
}
}
@@ -2642,6 +2645,20 @@ nv_diffgetput(int put, long count)
ex_diffgetput(&ea);
}
/*
* Return TRUE if "diff" appears in the list of diff blocks of the current tab.
*/
static int
valid_diff(diff_T *diff)
{
diff_T *dp;
for (dp = curtab->tp_first_diff; dp != NULL; dp = dp->df_next)
if (dp == diff)
return TRUE;
return FALSE;
}
/*
* ":diffget"
* ":diffput"
@@ -2849,8 +2866,8 @@ ex_diffgetput(exarg_T *eap)
{
// remember deleting the last line of the buffer
buf_empty = curbuf->b_ml.ml_line_count == 1;
ml_delete(lnum);
--added;
if (ml_delete(lnum) == OK)
--added;
}
for (i = 0; i < dp->df_count[idx_from] - start_skip - end_skip; ++i)
{
@@ -2899,9 +2916,9 @@ ex_diffgetput(exarg_T *eap)
}
}
// Adjust marks. This will change the following entries!
if (added != 0)
{
// Adjust marks. This will change the following entries!
mark_adjust(lnum, lnum + count - 1, (long)MAXLNUM, (long)added);
if (curwin->w_cursor.lnum >= lnum)
{
@@ -2923,7 +2940,13 @@ ex_diffgetput(exarg_T *eap)
#endif
vim_free(dfree);
}
else
// mark_adjust() may have made "dp" invalid. We don't know where
// to continue then, bail out.
if (added != 0 && !valid_diff(dp))
break;
if (dfree == NULL)
// mark_adjust() may have changed the count in a wrong way
dp->df_count[idx_to] = new_count;

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