Compare commits

...

134 Commits

Author SHA1 Message Date
Philip H
8b8f7d19f8 patch 9.0.1751: CI: labeler configuration not found
Problem: CI: labeler configuration not found
         (after 9.0.1748)
Solution: set configuration path

closes: #12852

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2023-08-19 15:46:11 +02:00
rhysd
0bbc1be0a3 patch 9.0.1750: CI: fails because of changed error messages
Problem: CI: fails because of changed error messages
         (after: 9.0.1741)
Solution: Adjust expected error messages

closes: #12853

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: rhysd <lin90162@yahoo.co.jp>
2023-08-19 15:42:54 +02:00
Christian Brabandt
dbeadf05b6 patch 9.0.1749: Text property highlight doesn't override a sign highlight on TAB
Problem: Text property highlight doesn't override a sign highlight over
         a tab character
Solution: Let text_property override tab highlighting

This fixes a few problems of text properties:

-  text property highlighting when override=true does not overwrite TAB
   highlighting
-  text property highlighting when override=true does not overwrite TAB
   highlighting with :set list
-  text property highlighting is used instead of sign highlight after
   the actual text ends when signs are present with linehl is set

closes: #21584
closes: #21592

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-19 15:35:04 +02:00
Philip H
6d192a4ac9 patch 9.0.1748: CI: cannot label issues automatically
Problem:  CI: cannot label issues automatically
Solution: Create CI labeler

closes: #12788

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2023-08-19 14:45:26 +02:00
Viktor Szépe
b23db545ce docs: Improve Markdown in README (#12829) 2023-08-19 14:16:10 +02:00
zeertzjq
6235a109c4 patch 9.0.1747: screenpos() may cause unnecessary redraw
Problem:  screenpos() may cause unnecessary redraw.
Solution: Don't unnecessarily reset VALID_WROW flag.

VALID_WROW flag is only used by two functions: validate_cursor() and
cursor_valid(), and cursor_valid() is only used once in ex_sleep().
When adjust_plines_for_skipcol() was first added in patch 9.0.0640, it
was called in two functions: comp_botline() and curs_rows().
- comp_botline() is called in two places:
  - onepage(), which resets VALID_WROW flag immediately afterwards.
  - validate_botline_win(), where resetting a VALID_ flag is strange.
- curs_rows() is called in two places:
  - curs_columns(), which sets VALID_WROW flag afterwards.
  - validate_cline_row(), which is only used by GUI mouse focus.

Therefore resetting VALID_WROW there doesn't seem to do anything useful.
Also, a w_skipcol check (which resets VALID_WROW flag) was added to
check_cursor_moved() in patch 9.0.0734, which seems to make more sense
than resetting that flag in the middle of a computation.

While at it make adjust_plines_for_skipcol() and textpos2screenpos() a
bit less confusing:
- Make adjust_plines_for_skipcol() return "off" instead of "n - off".
- Use 0-based "row" in textpos2screenpos() until W_WINROW is added.

closes: #12832

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-19 14:12:42 +02:00
Christian Brabandt
28ae5a32fd patch 9.0.1746: vim9class compile error for char/char_u conversion
Problem: vim9class compile error for char/char_u conversion
Solution: Correctly cast to (char *)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-19 14:10:48 +02:00
zeertzjq
fc3058495d patch 9.0.1745: Missing test coverage for blockwise Visual highlight
Problem:  Missing test coverage for blockwise Visual highlight with
          virtual that starts with a double-width char.
Solution: Add a new virtual text to the test. Some other small fixes.

closes: #12835

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-19 13:27:03 +02:00
Sean Dewar
c3172fe9e4 patch 9.0.1744: Dead code in open_cmdwin()
Problem: Dead code in open_cmdwin()
Solution: Remove it

closes: #12839

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2023-08-19 13:23:50 +02:00
K.Takata
04510566b1 Translations: Update po files for zh and ja
Update po files by running `make` in `src/po/`.
Some po files were out of sync with the files in other encodings.

Related: #12749, #12787
closes: #12826
closes: #12840
2023-08-19 13:20:19 +02:00
Doug Kearns
44a6b72d7f patch 9.0.1743: Parameter of gui_gtk:gui_mch_browse incorrectly marked as UNUSED
Problem:    Parameter of gui_gtk:gui_mch_browse incorrectly marked as
            UNUSED.
Solution:   Remove UNUSED flag.

closes: #12841

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-08-19 13:13:11 +02:00
zeertzjq
9994160bfe patch 9.0.1742: wrong curswant when clicking on second cell of double-width char
Problem:  Wrong curswant when clicking and the second cell of a
          double-width char.
Solution: Don't copy virtcol of the first char to the second one.

closes: #12842

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-19 13:08:50 +02:00
LemonBoy
c5d2744c04 patch 9.0.1741: No type checking in interfaces
Problem: No type checking in interfaces
Solution: Implement member type check in vim9 interfaces

Most of the code is a small refactoring to allow the use of a where_T
for signaling the type mismatch, the type checking itself is pretty
simple.

Improve where_T error reports

Let the caller explicitly define the kind of location it's referring to
and free the WT_ARGUMENT enum from its catch-all role.

Implement type checking for interface methods

Follows closely the logic used for type-checking the members.

closes: #12844

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-08-19 13:04:53 +02:00
dkearns
56bafd7a6a Runtime: add new sed ftplugin (#12843) 2023-08-19 12:13:31 +02:00
Pierre Colin
0a07646845 patch 9.0.1740: segfault when reading invalid viminfo file
Problem: segfault when reading invalid viminfo file
Solution: Check the expected type in the viminfo file

Thanks to @yegappan for the included test.

closes: #12652
closes: #12845

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Pierre Colin <48397990+Pierre-Colin@users.noreply.github.com>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-08-19 11:56:57 +02:00
James McCoy
38ab19e00f patch 9.0.1739: Leftover files in libvterm
Problem: leftover files in libvterm
Solution: Fix cleaning of libvterm directory

Delete the libvterm/src/.libs directory and fix typo in libvterm/t/.libs
directory name.

closes: #12846

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: James McCoy <jamessan@jamessan.com>
2023-08-19 11:38:49 +02:00
zeertzjq
4dd266cb66 patch 9.0.1738: Duplicate code to reverse a string
Problem:  Duplicate code to reverse a string
Solution: Move reverse_text() to strings.c and remove string_reverse().

closes: #12847

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-19 11:35:03 +02:00
Yegappan Lakshmanan
b102728c20 patch 9.0.1737: Calling a base class method through an extended class fails
Problem: Calling a base class method through an extended class fails
Solution: Create lookup table for member index in the interface to
          to the member class implementing the interface

Create additional tests for Vim9 classes.  Fix unconvered memory leaks
and crashes found by the new tests.

closes: #12848
closes: #12089

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>author
2023-08-19 11:26:42 +02:00
Antonio Giovanni Colombo
e27578aee6 Runtime: Update Italian Translation
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Antonio Giovanni Colombo <azc100@gmail.com>
2023-08-19 11:18:30 +02:00
Christian Brabandt
07a2b61d4c patch 9.0.1736: Github Actions times out after 20 minutes
Problem: Github Actions times out after 20 minutes
Solution: Increase the timeout to 25 minutes

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-18 01:20:42 +02:00
Bruno-366
817db406bb Add TODO, FIXME to Haskell syntax file (#8055)
Adding TODO, XXX, FIXME to Haskell syntax file #8054
2023-08-18 00:04:54 +02:00
Stuart Henderson
442d1746f4 bindzone runtime: add new DNS record types (#7351)
Recognize some newer DNS record types - CAA (RFC8659, certificate authority authorization), OPENPGPKEY (RFC7929), SMIMEA (RFC8162). Sort SSHFP alphabetically while there.
2023-08-18 00:04:24 +02:00
Yuri Klimov
a5988f582e Keywords 'of' and 'yield' for Javascript. (#7873)
* Keyword 'of' in for...of statement.

* Keyword 'yield' for generator function.
2023-08-18 00:03:23 +02:00
zeertzjq
e9ef347c13 patch 9.0.1735: Rename completion specific findex var
Problem: Rename completion specific findex var
Solution: Move "findex" static variable to xp_selected in expand_T

closes: #12548

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 23:57:05 +02:00
zeertzjq
be5cdd1d63 patch 9.0.1734: :runtime completion fails for multiple args
Problem: :runtime completion fails for multiple args
Solution: Make it work

closes: #12616

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 23:48:58 +02:00
Philip H
d2af6c66fe patch 9.0.1733: CI: cannot cache linux-modules-extra
Problem: CI: cannot cache linux-modules-extra
Solution: Enable caching and reduce failed downloads

closes: #12779

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2023-08-17 23:45:08 +02:00
Christian Brabandt
d5475e8d8d patch 9.0.1732: vimexpr: shadowing variable
Problem: vimexpr: shadowing variable
Solution: Rename local variable

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-17 23:41:33 +02:00
zeertzjq
6e940d9a1d patch 9.0.1731: blockwise Visual highlight not working with virtual text
Problem: blockwise Visual highlight not working with virtual text
Solution: Reset the correct variable at the end of virtual selection and
          Check for double-width char inside virtual text.

closes: #12606

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 23:21:40 +02:00
goweol
8cfe52e6fb man.vim: Recognise hyphenated-at-eol cross-references (#12609)
Manual pages requested for output may undergo formatting
arranged by some roff-descendant program. Lines longer
than MANWIDTH or COLUMNS or real-estate width of a device
(with support for horizontal scrolling considered) can be
divided at either blank characters and/or at groups of word
characters (syllables) according to supported hyphenation
rules (although page authors are free to disable hyphenation
or prevent particular words from being hyphenated).

Groff‘s manual describes it as follows:

    5.1.2 Hyphenation

    Since the odds are not great for finding a set of words, for
    every output line, which fit nicely on a line without
    inserting excessive amounts of space between words, gtroff
    hyphenates words so that it can justify lines without
    inserting too much space between words. It uses an internal
    hyphenation algorithm (a simplified version of the algorithm
    used within TeX) to indicate which words can be hyphenated
    and how to do so. When a word is hyphenated, the first part
    of the word is added to the current filled line being output
    (with an attached hyphen), and the other portion is added to
    the next line to be filled.

It would be expedient for autoload/dist/man.vim (along with
syntax/man.vim‘s highlighting and ftplugin/man.vim‘s Ctrl-],
\K mappings) to allow for hyphenation of cross-references
to manual pages.

For example,

  # Launch Vim [v9.0; patched: 1-1378, 1499] as follows:
  MANWIDTH=80 vim --not-a-term +MANPAGER '+Man man' '+/conv(1)' '+norm B'

  # Press Ctrl-] with cursor on _m_: "... use man‐
  # conv(1) directly."_______________________[^]
  #
  # (Man v2.11.2)

  # Launch Vim as follows:
  MANWIDTH=80 vim --not-a-term +MANPAGER '+Man git' '+/config(1)' '+norm B'

  # Press Ctrl-] with cursor on _g_: "... in git-
  # config(1) for a more ..."_______________[^]
  #
  # (Git v2.39.2)

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2023-08-17 23:13:29 +02:00
goweol
6e5ab2b994 man.vim: Uniformly place cursor at the same column with Ctrl-t (#12608)
Functions col and cursor count each tab (0x9) as a byte, and
are complementary. On the other hand, the | command motion
takes into consideration how many screen columns a tab does
occupy and may move cursor to a column closer to the start
of line than col would report at that position.

The provided changes prefer the cursor function to the | command.

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2023-08-17 23:12:42 +02:00
zeertzjq
008c91537b patch 9.0.1730: passing multiple patterns to runtime not working
Problem: passing multiple patterns to runtime not working
Solution: prepend prefix to each argument separately

closes: #12617

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 23:08:53 +02:00
zeertzjq
bfe377b8f2 patch 9.0.1729: screenpos() wrong when w_skipcol and cpoptions+=n
Problem:    screenpos() wrong result with w_skipcol and cpoptions+=n
Solution:   Use adjust_plines_for_skipcol() instead of subtracting
            w_skipcol.

closes: #12625

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 22:58:53 +02:00
zeertzjq
825cf813fa patch 9.0.1728: missing winid argument for virtcol()
Problem: missing winid argument for virtcol()
Solution: Add a {winid} argument to virtcol()

Other functions col(), charcol() and virtcol2col() support a {winid}
argument, so it makes sense for virtcol() to also support than.

Also add test for virtcol2col() with 'showbreak' and {winid}.

closes: #12633

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 22:55:25 +02:00
Sean Dewar
b0efa49ed1 patch 9.0.1727: minor problems with the teapot
Problem: minor problems with the teapot()
Solution: remove the null check, update documentation

Update the builtin-function-list entry. (It implicitly returns 0, but such
functions usually use "none")

Also, tv_get_string_strict() can not return NULL, so remove that check

closes: #12647

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2023-08-17 22:48:43 +02:00
Sean Dewar
876f5fb570 patch 9.0.1726: incorrect heights in win_size_restore()
Problem: incorrect heights in win_size_restore()
Solution: avoid restoring incorrect heights in win_size_restore()

Changing 'showtabline' or 'cmdheight' in the cmdwin restores incorrect
window heights after closing the cmdwin.

This may produce a gap between the cmdline and the window above.

Solution: restore window sizes only if the number of lines available for windows
changed; subtract the rows of the tabline, cmdline and last window's statusline
from 'lines' (other statuslines don't matter).

closes: #12704

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
2023-08-17 22:40:05 +02:00
zeertzjq
e500ae8e29 patch 9.0.1725: cursor pos wrong after concealed text with 'virtualedit'
Problem:    Wrong cursor position when clicking after concealed text
            with 'virtualedit'.
Solution:   Store virtual columns in ScreenCols[] instead of text
            columns, and always use coladvance() when clicking.

This also fixes incorrect curswant when clicking on a TAB, so now
Test_normal_click_on_ctrl_char() asserts the same results as the ones
before patch 9.0.0048.

closes: #12808

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 22:35:26 +02:00
h-east
2261c89a49 patch 9.0.1724: vim9class constructor argument type checking bug
Problem: vim9class constructor argument type checking bug
Solution: fix it

closes: #12816

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
2023-08-17 22:31:10 +02:00
Ivan Pešić
5a0dd71ed9 Update sr.po (#12820) 2023-08-17 22:28:59 +02:00
Yegappan Lakshmanan
bfc461f756 Use string interpolation (#12823) 2023-08-17 22:28:33 +02:00
zeertzjq
ad0c442f1f patch 9.0.1723: Fix regression in {func} argument of reduce()
Problem: Fix regression in {func} argument of reduce()
Solution: pass function name as string again

Before patch 9.0.0548, passing a string as {func} argument of reduce()
is treated as a function name, but after patch 9.0.0548 it is treated as
an expression instead, which is useless as reduce() doesn't set any v:
variables. This PR restores the behavior of {func} before that patch.

Also correct an emsg() call, as e_string_list_or_blob_required doesn't
contain format specifiers.

closes: #12824

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 22:15:47 +02:00
zeertzjq
4f389e7c0f patch 9.0.1722: wrong error messages when passing wrong types to count()
Problem: wrong error messages when passing wrong types to count()
Solution: fix it

This fixes two problems:
1. When passing wrong type to {ic} argument of count(), two error
   messages are given, the second of which is misleading.
2. When passing wrong type to {comp} argument of count(), the error
   message doesn't mention that {comp} may be a String.

closes: #12825

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-17 22:11:16 +02:00
zeertzjq
4112acae08 patch 9.0.1721: Build failure on Windows with dynamic lua
Problem: Build failure on Windows with dynamic lua (after 9.0.1719)
Solution: move definition further down in if_lua

closes: #12811
closes: #12814
closes: #12818

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-16 20:25:10 +02:00
Yegappan Lakshmanan
a456b12011 patch 9.0.1720: Vim9 class using wrong index for overridden method
Problem: Vim9 class using wrong index for overridden method
Solution: Use correct index for overridden method

closes: #12524
closes: #12813

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-16 20:14:37 +02:00
dkearns
20b33b56ad Update FreeBASIC syntax file (#12781) 2023-08-15 23:23:40 +02:00
依云
cf8cde2e5a zh_CN: update to use reordering (#12787) 2023-08-15 23:22:48 +02:00
Jesse Pavel
8a35033782 patch 9.0.1719: if_lua: crash for for Lua functions invoked via Vim callbacks
Problem: if_lua: crash for Lua functions invoked via Vim callbacks
Solution: Use Lua registry rather than upvalues for udata cache

closes: #12785

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Jesse Pavel <jpavel@alum.mit.edu>
2023-08-15 23:21:05 +02:00
LemonBoy
e98fb643ec patch 9.0.1718: dict-completion does not respect region
Problem: dict-completion does not respect region
Solution: respect selected region in dict completion

Set do_region to zero as we don't want a complete dump of the matching
words, we want the code to filter them according to the user's selected
region.

closes: #12792
closes: #7025

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-08-15 23:14:30 +02:00
Restorer
636d32b327 The keyboard layout "russian-typograph" has been updated to version 3.3 (#12796)
Co-authored-by: RestorerZ <restorer@mail2k.ru>
2023-08-15 23:06:18 +02:00
lunasophia
10f23e10a9 Update syntax/muttrc.vim to latest mutt (#12797)
Nothing complicated, just lots of tedium keeping the lines wrapped at
reasonable lengths.
2023-08-15 23:05:36 +02:00
Ajit-Thakkar
4868f637b8 Update syntax/fortran.vim (#12798)
Several small improvements including better discrimination of "real" used as a type and as an intrinsic
2023-08-15 23:05:00 +02:00
Yegappan Lakshmanan
b209b86e66 patch 9.0.1717: virtcol2col returns last byte of a multi-byte char
Problem: virtcol2col returns last byte of a multi-byte char
Solution: Make it return the first byte for a multi-byte char

closes: #12786
closes: #12799

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-15 23:01:44 +02:00
Zdenek Dohnal
15a0a0281a patch 9.0.1716: Windows build with python 3.12 and clang fails
Problem: Windows build with python 3.12 and clang fails
Solution: Remove the PyBool_Type function pointer for python 3.12

Clang on Win doesn't like non-static functions in static struct with
Python 3.12 - removing the new obfuscated function and protecting the
old PyBool function for older Pythons fixes the issue.

closes: #12800

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Zdenek Dohnal <zdohnal@redhat.com>
2023-08-15 22:52:01 +02:00
zeertzjq
7772c93a3e patch 9.0.1715: duplicate test in message_test.c
Problem: duplicate test in message_test.c
Solution: Remove duplicate test and make functions static

closes: #12803

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-15 22:48:40 +02:00
zeertzjq
e4c79d3615 patch 9.0.1714: getcompletion() "cmdline" fails after :autocmd
Problem:  getcompletion() "cmdline" fails after :autocmd
Solution: Use set_cmd_context() instead of set_one_cmd_context().

closes: #12804

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-15 22:41:53 +02:00
Zdenek Dohnal
ba913b14dd patch 9.0.1713: Github CI fails to load snd-dummy kernel module
Problem: Github CI fails to load snd-dummy kernel module
Solution: Make installation of linux-modules-extra optional

linux-modules-extra package are not available on Ubuntu 22 at the
moment, which breaks CI runs. The change make its installation
conditional as the original `if-else` structure tried to do.

closes: #12801

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Zdenek Dohnal <zdohnal@redhat.com>
2023-08-15 22:34:45 +02:00
Jia-Ju Bai
5b0889b8bf patch 9.0.1712: missing null check in object_clear()
Problem: missing null check in object_clear()
Solution: Add null check of cl

closes: #12627

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Jia-Ju Bai <baijiaju@buaa.edu.cn>
2023-08-13 20:05:18 +02:00
zeertzjq
d3515a1e88 patch 9.0.1711: dead code in charset.c
Problem: dead code in charset.c
Solution: remove it

linetabsize_col() calls init_chartabsize_arg() with 0 as "lnum", so
cts.cts_has_prop_with_text is always FALSE.

closes: #PR

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-13 20:00:14 +02:00
Christian Brabandt
4a8eb6e7a9 patch 9.0.1710: scrolloff options work slightly different
Problem: sidescrolloff and scrolloff options work slightly
         different than other global-local options
Solution: Make it behave consistent for all global-local options

It was noticed, that sidescrolloff and scrolloff options behave
differently in comparison to other global-local window options like
'listchars'

So make those two behave like other global-local options. Also add some
extra documentation for a few special local-window options.

Add a few tests to make sure all global-local window options behave
similar

closes: #12956
closes: #12643

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-13 19:43:42 +02:00
Zdenek Dohnal
e5e4709a6a patch 9.0.1709: dynamic build with python 3.12 breaks
Problem: dynamic build with python 3.12 breaks
Solution: if_python3.c: Fix building dynamic Python3 interpreter

There are new extern global variables defined in python3 development
files, which types are within python3 library, so they break dynamic
python3 interpret Vim plugin.

Since the variables are used in macro `Py_SIZE` which is used in other
python3 headers, the dummy variables have to defined before including
Python.h.

closes: #12660

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Zdenek Dohnal <zdohnal@redhat.com>
2023-08-13 19:39:27 +02:00
Christian Brabandt
8ef1fbc0c3 patch 9.0.1708: getcompletion() failes for user-defined commands
Problem: getcompletion() failes for user-defined commands
Solution: set context for completion function

closes: #12681
closes: #12680

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-13 19:32:37 +02:00
Christian Brabandt
badeedd913 patch 9.0.1707: Cannot wrap around in popup_filter_menu()
Problem: Cannot wrap around in popup_filter_menu()
Solution: Allow to wrap around by default

Currently, it is not possible, to wrap around at the end of the list
using e.g. down (and go back to the top) or up at the beginning of the
list and go directly to the last item. This is not consistent behaviour
with e.g. how the pum-menu currently works, so let's just allow this.

Also adjust tests about it.

closes: #12689
closes: #12693

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-13 19:27:46 +02:00
Matthias Braun
02551c9de0 patch 9.0.1706: typos in the xxd manpage
Problem: typos in the xxd manpage
Solution: Fix typos and formatting

closes: #12645

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Matthias Braun <mb720@users.noreply.github.com>
2023-08-13 19:21:38 +02:00
Christian Brabandt
96d6c4aabe runtime: Remove Brams email in indent/README.txt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-13 18:17:21 +02:00
zeertzjq
b25dbb3f9b patch 9.0.1705: cursor position wrong when clicking on an unprintable char
Problem:  cursor position wrong when clicking on an unprintable char
Solution: Don't update prev_ptr when wlv.n_extra is not zero.

closes: #12664

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-13 18:11:05 +02:00
Christ van Willegen
0c6181fec4 patch 9.0.1704: Cannot use positional arguments for printf()
Problem: Cannot use positional arguments for printf()
Solution: Support positional arguments in string formatting

closes: #12140

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2023-08-13 18:06:00 +02:00
Christian Brabandt
1688938dd5 runtime: Add a few more remarks about Bram and new runtime files
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-13 17:53:07 +02:00
Yegappan Lakshmanan
74cc13cc40 patch 9.0.1703: Vim9 Calling a method in an extended class fails
Problem: Vim9 Calling a method in an extended class fails
Solution: use method index directly

closes: #12778

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-13 17:41:26 +02:00
ObserverOfTime
9ad1bf7afd runtime(pymanifest): fix mistake in syntax definition
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
2023-08-13 10:38:14 +02:00
Christian Brabandt
e978b4534a Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
* Dedicate upcoming Vim 9.1 to Bram

Also replace in a few more places Brams email address and mention new
maintainers.

* Remove Bram from any Maintainer role

* runtime: Align Header

* it's mailing list not mailinglist
2023-08-13 10:33:05 +02:00
zeertzjq
9c30f43899 patch 9.0.1702: Undo test is flaky
Problem:  Undo test is flaky.
Solution: Apply filter and change time to "1 second ago" in both dumps.

closes: #12771

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-13 10:31:27 +02:00
ObserverOfTime
2f339aad6c Add syntax & ftplugin for pymanifest (#12773) 2023-08-13 10:26:20 +02:00
ObserverOfTime
f9c4c2f97d Update iss syntax file (#11890)
- Add 'ExternalSize:' parameter
- Add 'setntfscompression' files flag
- Fix escaped left brace highlight
- Fix 'String:' parameter highlight
- Remove trailing whitespace
2023-08-13 10:25:41 +02:00
Yegappan Lakshmanan
57a02ccf4c patch 9.0.1701: vim9 crash when class member overridden
Problem: vim9 crash when class member overridden
Solution: Use method_count field instead

closes: #12676
closes: #12677

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-13 10:19:38 +02:00
K.Takata
32f586eec1 patch 9.0.1700: Cannot compile with dynamic perl < 5.38
Problem: Cannot compile with dynamic perl < 5.38 (after 9.0.1681)
Solution: Fix if_perl/dyn from perl 5.32 to 5.38

closes: #12755

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: K.Takata <kentkt@csc.jp>
2023-08-13 10:15:05 +02:00
Mike Williams
6c313bbb04 patch 9.0.1699: compile warning for xdiff/xutils on MS-Windows
Problem: compile warning for xdiff/xutils on MS-Windows
Solution: add explicit type cast from size_t to long

closes: #12531

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Mike Williams <mikew@globalgraphics.com>
2023-08-12 20:50:55 +02:00
zeertzjq
7fe1089904 patch 9.0.1698: Test_map_restore_sid fails in GUI
Problem: Test_map_restore_sid fails in GUI
Solution: Feed an unsimplified Ctrl-B

closes: #12770

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-12 20:44:21 +02:00
Christ van Willegen
73b8209266 patch 9.0.1697: incsearch test not sufficient
Problem: incsearch test not sufficient (after 9.0.1691)
Solution: add an additional test

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2023-08-12 20:17:26 +02:00
Christian Brabandt
8878653a44 patch 9.0.1696: sodium_mlock may still fail in CI
Problem: sodium_mlock may still fail in CI
Solution: Catch E1230 in testscript and skip test

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-12 09:41:23 +02:00
Christian Brabandt
f1cc4d55b9 patch 9.0.1695: Crash with overlong textprop above
Problem: Crash with overlong textprop above
Solution: Consider only positive padding

closes: #12665
closes: #12661

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-12 00:14:14 +02:00
zeertzjq
bacc83009b patch 9.0.1694: wrong mapping applied when replaying a char search
Problem: wrong mapping applied when replaying a char search
Solution: Store a NOP after the ESC

closes: #12708
closes: #6350

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-12 00:09:31 +02:00
Christian Brabandt
2d63e4b3cc patch 9.0.1693: Ctrl-Q not handled like Ctrl-V in replace mode
Problem: Ctrl-Q not handled like Ctrl-V in replace mode
Solution: Handle Ctrl-Q like Ctrl-V

closes: #12686
closes: #12684

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-12 00:03:57 +02:00
cions
db4fd29063 patch 9.0.1692: Android not handling AI_V4MAPPED ai_flag
Problem: Android not handling AI_V4MAPPED ai_flag
Solution: don't set AI_V4MAPPED flag when on Android, since
          Android's getaddrinfo returns EAI_BADFLAGS if ai_flags
          contains it

closes: #12613

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: cions <gh.cions@gmail.com>
2023-08-11 23:53:13 +02:00
zeertzjq
7b7b4cb6f2 patch 9.0.1691: wrong viewport restored for incsearch and smoothscroll
Problem: wrong viewport restored for incsearch and smoothscroll
Solution: Save and restore skipcol as well

closes: #12713

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-11 23:48:27 +02:00
Christian Brabandt
f6cdab3704 patch 9.0.1690: popup_create() not aborting on errors
Problem: popup_create() not aborting on errors
Solution: check for errors in arguments given and abort if an error
          occurred

closes: #12711

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-11 23:42:02 +02:00
Zdenek Dohnal
288bf26c53 patch 9.0.1689: python 3.12 produces warnings and fails test
Problem: python 3.12 produces warnings and fails test
Solution: Make use of raw strings in python3 tests

closes: #12765

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Zdenek Dohnal <zdohnal@redhat.com>
2023-08-11 23:32:23 +02:00
Tom Praschan
ca6ac99077 patch 9.0.1688: cannot store custom data in quickfix list
Problem: cannot store custom data in quickfix list
Solution: add `user_data` field for the quickfix list

closes: #11818

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Tom Praschan <13141438+tom-anders@users.noreply.github.com>
2023-08-11 23:26:12 +02:00
zeertzjq
7e0bae024d patch 9.0.1687: mapset() not properly handling script ID
Problem: mapset() not properly handling script ID
Solution: replace_termcodes() may accept a script ID

closes: #12699
closes: #12697

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-11 23:16:10 +02:00
Philip H
cd4e4e169a .cirrus.yml: skip pkg update for FreeBSD 13.1 (#12767) 2023-08-11 23:10:02 +02:00
Keith Smiley
d8f981138a Add commentstring for nix file format (#12696) 2023-08-11 23:07:50 +02:00
Devin J. Pohly
5fee111149 patch 9.0.1686: undotree() only works for the current buffer
Problem:    undotree() only works for the current buffer
Solution:   Add an optional "buffer number" parameter to undotree().  If
            omitted, use the current buffer for backwards compatibility.

closes: #4001
closes: #12292

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Devin J. Pohly <djpohly@gmail.com>
2023-08-11 22:53:39 +02:00
Philip H
422b9dcbfa patch 9.0.1685: silence Python 3.11 depreciations for gcc
Problem: Python 3.11 interface throws deprecation warnings
Solution: ignore those warnings for gcc and clang

Python 3.11 deprecation warnings are already silenced for clang using
the pragma
```
 # pragma clang diagnostic ignored "-Wdeprecated-declarations"
```

However those warnings are also emitted when using gcc. To avoid them
for both compilers, change use the __GNUC__ ifdef, which is defined for
gcc as well as clang.

Additionally, instead of using the "clang diagnostic ignored" pragma,
let's make use of 'GCC diagnostic ignored' which is again supported by
clang and GCC

closes: #12610

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2023-08-11 22:38:48 +02:00
zeertzjq
b00df7aa38 patch 9.0.1684: Update libvterm to rev 839
Problem: libvterm slightly outdated
Solution: Update libvterm from rev 818 to rev 839

Notable fix: libvterm now handles DECSM/DECRM with multiple arguents,
so several ncurses programs (e.g. nnn) can enable mouse properly when
run in Vim's terminal in XTerm.

closes: #12746

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-08-11 21:15:08 +02:00
dkearns
8f5a8d8a8b Update CODEOWNERS (#12760) 2023-08-11 19:30:55 +02:00
Lily Ballard
21aaff3faa Update my name and email in runtime files (#12763) 2023-08-11 19:30:27 +02:00
Hong Xu
dd0ad25988 Update syntax/dosini.vim to the latest version (#12764)
The latest version is in https://github.com/xuhdev/syntax-dosini.vim/blob/master/syntax/dosini.vim. I've sent the file to Bram at the end of June, unfortunately it wasn't able to make into the Vim repository. RIP!
2023-08-11 19:29:20 +02:00
Dragan Simic' via vim_dev
81b8bf5b4a Update the vimscript code for restoring cursor position
Using xxd(1) to filter and edit binary files causes the input files
to have dual nature, so to speak, which effectively makes restoring
the cursor position broken.  Fix that by ignoring the "xxd" file type
in the code that restores the cursor position.

Interactive rebasing in git causes files to be edited in vim, which,
similarly to commit messages, are rarely the same as the last one
edited.  Thus, also add "gitrebase" to the list of file types for
which the cursor position isn't restored.

While there, refactor the code a bit to possibly save a few CPU cycles
and to keep the line lengths in check, and use the long form of the
commands and variables, to make the code slightly more consistent and
more understandable to newcomers.

Update the relevant comments in the code and the associated parts of
the documentation, to keep them in sync with the updated code.

Remove some redundant trailing whitespace as well, as spotted.
2023-08-10 06:43:14 +02:00
Dragan Simic' via vim_dev
6a500661a9 Improve the vimscript code in ":h hex-editing"
Save and restore the view position before and after saving the buffer,
respectively, to keep the current view of the xxd(1)'s hex dump
unchanged after doing ":w", which previously caused the window to
scroll back to the very beginning of the buffer.  I believe it's
needless to say how annoying and counterproductive that was.

Get rid of the "Press ENTER or type command to continue" message, which
was previously displayed after opening larger binary files.  The use
of "silent" and "redraw" commands is tailored specifically to avoid
screen flickering, e.g. when doing ":w", which is caused by the buffer
being filtered by an external command.

Increase the number of octets per line, produced by xxd(1), from the
default value of 16 to 32.  This puts bigger chunks of the hex dump
on the screen and makes the whole thing much more usable.

While there, reformat the code to make it more readable, and use the
long form of the commands and variables to make the code slightly more
consistent and more understandable to newcomers.
2023-08-10 06:43:14 +02:00
Christian Brabandt
6efb198033 Updated runtime files
This is a collection of various PRs from github that all require a minor
patch number:

1) https://github.com/vim/vim/pull/12612

    Do not conflate dictionary key with end of block

2) https://github.com/vim/vim/pull/12729:

    When saving and restoring 'undolevels', the constructs `&undolevels` and
    `:set undolevels` are problematic.

    The construct `&undolevels` reads an unpredictable value; it will be the
    local option value (if one has been set), or the global option value
    (otherwise), making it unsuitable for saving a value for later
    restoration.

    Similarly, if a local option value has been set for 'undolevels',
    temporarily modifying the option via `:set undolevels` changes the local
    value as well as the global value, requiring extra work to restore both
    values.

    Saving and restoring the option value in one step via the construct
    `:let &undolevels = &undolevels` appears to make no changes to the
    'undolevels' option, but if a local option has been set to a different
    value than the global option, it has the unintended effect of changing
    the global 'undolevels' value to the local value.

    Update the documentation to explain these issues and recommend explicit
    use of global and local option values when saving and restoring.  Update
    some unit tests to use `g:undolevels`.

3) https://github.com/vim/vim/pull/12702:

    Problem:    Pip requirements files are not recognized.
    Solution:   Add a pattern to match pip requirements files.

4) https://github.com/vim/vim/pull/12688:

    Add indent file and tests for ABB Rapid

5) https://github.com/vim/vim/pull/12668:

    Use Lua 5.1 numeric escapes in tests and add to CI

    Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings.  Lua
    5.1 only supports decimal escapes:

    > A character in a string can also be specified by its numerical value
    > using the escape sequence \ddd, where ddd is a sequence of up to three
    > decimal digits. (Note that if a numerical escape is to be followed by a
    > digit, it must be expressed using exactly three digits.) Strings in Lua
    > can contain any 8-bit value, including embedded zeros, which can be
    > specified as '\0'.

    To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to
    run with Lua 5.1 as well as Lua 5.4

6) https://github.com/vim/vim/pull/12631:

    Add hurl filetype detection

7) https://github.com/vim/vim/pull/12573:

    Problem:   Files for haskell persistent library are not recognized
    Solution:  Add pattern persistentmodels for haskell persistent library

closes: #12612
closes: #12729
closes: #12702
closes: #12688
closes: #12668
closes: #12631
closes: #12573

Co-authored-by: lacygoill <lacygoill@lacygoill.me>
Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com>
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
Co-authored-by: James McCoy <jamessan@jamessan.com>
Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev>
Co-authored-by: Borys Lykah <lykahb@fastmail.com>
2023-08-10 06:19:18 +02:00
Christian Brabandt
6019fed0c5 patch 9.0.1682: sodium encryption is not portable
Problem: crypt: sodium encryption is not portable
Solution: use little-endian byte order for sodium encrypted files

As mentioned in #12586, sodium encryption only works on little ending
architectures, because reading and writing the sodium encryption
parameters are stored in the encrypted files in an arch-dependent way.

This of course fails for big-endian architectures like s390.

So make sure to use little-endian byte order when reading and writing
sodium encrypted files.

fixes: #12586
closes: 12655
2023-08-09 21:35:38 +02:00
Patrick Meiser-Knosowski
92f076e53e Update krl and add rapid syntax files (#12750) 2023-08-09 20:35:35 +02:00
Santos Gallegos
6ec7808c4a Add security policy (#12687)
* Add security policy

Currently is hard to find where to report security issues,
the only mention of it is in the issue template.

4c0089d696/.github/ISSUE_TEMPLATE/bug_report.yml (L12-L15)

Adding a SECURITY.md file will make it easier to find,
it will be displayed in https://github.com/vim/vim/security.

* Mention that reports are private
2023-08-09 20:11:37 +02:00
Balki
c41b3c9f95 defaults.vim: Update comment to simplify reverting augroup
closes: #12673
2023-08-09 20:07:26 +02:00
Philip H
1d7caa58e3 patch 9.0.1681: Build Failure with Perl 5.38
Problem: Build Failure with Perl 5.38
Solution: Fix Build Failure

closes: #12543, closes: #12575
2023-08-09 19:58:58 +02:00
Christian Brabandt
335c584940 patch 9.0.1680: sodium test fails in Github CI
Problem:    sodium test fails in Github CI
Solution:   Catch sodium_mlock() errors and do not error out

sodium_mlock() seems to fail consistently on the Github CI. Perhaps
[sodium_mlock()](https://libsodium.gitbook.io/doc/memory_management#text-locking-memory)
is called too often or with too much memory by the runners so
that this starts failing.

Let's just try to catch this and skip the test, when this starts
happening.

closes: #12751
2023-08-09 18:16:16 +02:00
Daniel Steinberg
c2bd205254 Change "the" to "then" under ':help bufload()' (#12662) 2023-08-09 18:10:59 +02:00
Filip Gospodinov
64dea84bb0 Manpager: apply g flag conditionally to s command (#12679)
Problem: The `s` command with `g` flag only substitutes
         one occurrence when `gdefault` is set.
Solution: Use `g` flag conditionally.
2023-08-09 18:00:36 +02:00
Christian Brabandt
bd76c89e31 update matchit (#12611) 2023-08-09 17:39:53 +02:00
zeertzjq
0401933a5b Fix alignment in filetype.txt (#12618)
There are three spaces because the "<" is concealed.
2023-08-09 17:39:05 +02:00
Dominique Pellé
077ade4f67 feat: recognize geojson extension as json filetype (#12636) 2023-08-09 17:36:40 +02:00
Max Gautier
b69b9d5e17 Add filetype detection for eyaml files (#12659)
https://github.com/voxpupuli/hiera-eyaml/ uses and produces the eyaml
format, which is simply yaml with some encrypted values.

It's convenient to edit the file without decrypting when not touching
encrypted values (or when you don't have access to the decryption key),
which is why vim should treat those files as yaml files.
2023-08-09 17:18:36 +02:00
ObserverOfTime
958e15bb1c Highlight editorconfig properties with dashes (#12691)
Problem: editorconfig properties with dashes are not highlighted
Solution: update the property pattern to include dashes
2023-08-09 17:05:39 +02:00
Turiiya
2eb413f89b detect filetype for *.vsh and *.vv files (#12692)
Co-authored-by: Turiiya <34311583+tobealive@users.noreply.github.com>
2023-08-09 17:04:59 +02:00
ObserverOfTime
44ff25d524 PyPA manifest files are not recognized (#12707)
Problem:    PyPA manifest files are not recognized.
Solution:   Add a pattern to match PyPA manifest files.
2023-08-09 16:52:33 +02:00
Anton Parkhomenko
7159ac7fec Unison support (#12715) 2023-08-09 16:50:52 +02:00
Chris Vincent
8967f6c4b9 feat(heex): borrow matchit support from html (#12717)
* feat(heex): borrow matchit support from html

Makes % support behave the same in heex as in html. For example, quickly moving the cursor between opening and closing tags.

* Remove unnecessary line; define b:undo_ftplugin first

* Remove b:html_set_match_words
2023-08-09 16:49:44 +02:00
Gergő Sályi
a13eb2b147 Add WebGPU Shading Language (WGSL) filetype (#12723)
The current W3C Working Draft for the WebGPU Shading Language (WGSL) specifies
'text/wgsl' media type for WGSL modules with the '.wgsl' file extension:
https://www.w3.org/TR/WGSL/#text-wgsl-media-type

It has also been registered at the Internet Assigned Numbers Authority (IANA):
https://www.iana.org/assignments/media-types/text/wgsl

Neovim's nvim-lspconfig already associates wgsl language servers
with 'filetype wgsl':
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#wgsl_analyzer

However currenly setting 'filetype wgsl' for *.wgsl files by defalut in Neovim
is blocked by adding this filetype to the vim project first:
https://github.com/neovim/neovim/pull/23331

This commit adds this missing wgsl filetype.
2023-08-09 16:49:01 +02:00
Linda_pp
8f566fdb1e update .wast files syntax highlighting (#12741) 2023-08-09 16:45:52 +02:00
Christian Brabandt
84bc00e9b5 patch 9.0.1679: Cleanup Tests from leftover files
Problem:    Tests may leave leftover files around
Solution:   Clean up tests and remove files

There were a few failures in 'linux (huge, gcc, testgui, true, true)'
e.g. here: https://github.com/vim/vim/actions/runs/5497376153/jobs/10018060156

,----
| Error detected while processing command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[585]..function RunTheTest[54]..Test_lvimgrep_crash[16]..TestTimeout[12]..VimLeavePre Autocommands for "*"..function EarlyExit[7]..FinishTesting:
| line   70:
| E445: Other window contains changes
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txt
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txt
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txtmalloc(): unsorted double linked list corrupted
`----

Which is puzzling, because the Xtest_stable_xxd file should have been
long gone after test_crypt.vim is run (and definitely no longer be
staying around in test_quickfix.vim).

So try to clean up properly after a test script is run, just in case any
X<file> is still around. During testing, a found a few leftover files,
which I also fixed in the relevant test-file.

Unfortunately, the test workflow 'linux (huge, gcc, testgui, true,
true)' now seems to fail with 'E1230: Encryption: sodium_mlock()' in
test_crypt.vim. Hopefully this is only temporary.
2023-08-08 20:39:55 +02:00
Christian Brabandt
9fcde94176 Merge pull request #12740 from k-takata/import-9.0.1678
Bring Bram's last patch (9.0.1678) to GitHub
2023-08-07 17:00:41 +02:00
ObserverOfTime
ad34abee25 patch 9.0.1678: blade files are not recognized
Problem:    Blade files are not recognized.
Solution:   Add a pattern for Blade files. (closes #12650)

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-08-07 03:24:20 +09:00
THARAK HEGDE
4c0089d696 patch 9.0.1677: typo in syntax test input file
Problem:    Typo in syntax test input file.
Solution:   Fix the typo and the expected dump files. (THARAK HEGDE,
            closes #12635)
2023-07-09 02:38:28 +01:00
Bram Moolenaar
16abd997c9 patch 9.0.1676: warning for buffer in use when exiting early
Problem:    Warning for buffer in use when exiting early.
Solution:   Change file names to be able to see what buffer is in use when
            exiting.
2023-07-08 00:54:06 +01:00
Bram Moolenaar
7c2beb48ef patch 9.0.1675: test may run into timeout when using valgrind
Problem:    Test may run into timeout when using valgrind.
Solution:   Use a longer timeout when using valgrind.
2023-07-08 00:25:56 +01:00
Bram Moolenaar
416bd916b4 patch 9.0.1674: help for builtin functions is not sorted properly
Problem:    Help for builtin functions is not sorted properly.
Solution:   Put err_teapot() help in the right position.
2023-07-07 23:19:18 +01:00
Bram Moolenaar
80adaa8ae8 patch 9.0.1673: cannot produce a status 418 or 503 message
Problem:    Cannot produce a status 418 or 503 message.
Solution:   Add err_teapot().
2023-07-07 18:57:40 +01:00
zeertzjq
d392a74c5a patch 9.0.1672: tabline highlight wrong after truncated double width label
Problem:    Tabline highlight wrong after truncated double width label.
Solution:   Fill up half a double width character later. (closes #12614)
2023-07-01 20:24:40 +01:00
skywind3000
e7d9ca2b3b patch 9.0.1671: Termdebug: error with more than 99 breakpoints
Problem:    Termdebug: error with more than 99 breakpoints.
Solution:   Use a different sign for breakpoint 100 and over. (closes #12589,
            closes #12588)
2023-06-28 23:27:28 +01:00
Bram Moolenaar
bf5f189e44 patch 9.0.1670: resetting local option to global value is inconsistent
Problem:    Resetting local option to global value is inconsistent.
Solution:   Handle "<" specifically for 'scrolloff' and 'sidescrolloff'.
            (closes #12594)
2023-06-27 21:51:07 +01:00
Christian Brabandt
19e6c4fd2d patch 9.0.1669: Crash syncing swapfile in new buffer when using sodium crypt
Problem:    Crash syncing swapfile in new buffer when using sodium crypt.
            (James McCoy)
Solution:   Add checks for sodium encryption. (Christian Brabandt,
            closes #12591, closes #12585)
2023-06-27 18:57:10 +01:00
ObserverOfTime
0256d76a33 patch 9.0.1668: PEM files are not recognized
Problem:    PEM files are not recognized.
Solution:   Add patterns to match PEM files. (closes #12582)
2023-06-26 22:05:37 +01:00
zeertzjq
e429893741 patch 9.0.1667: regression test doesn't fail when fix is reverted
Problem:    Regression test doesn't fail when fix is reverted.
Solution:   Add "n" to 'cpoptions' instead of using :winsize. (closes #12587,
            issue #12528)
2023-06-26 19:02:43 +01:00
Christian Brabandt
a2a90d5e20 patch 9.0.1666: compiler may warn for uninitialized variable
Problem:    Compiler may warn for uninitialized variable.
Solution:   Initialize this_props_len. (Christian Brabandt, closes #12599)
2023-06-26 18:48:09 +01:00
Christian Brabandt
590aae3557 patch 9.0.1665: empty CmdlineEnter autocommand causes errors in Ex mode
Problem:    Empty CmdlineEnter autocommand causes errors in Ex mode.
Solution:   Save and restore ex_pressedreturn. (Christian Brabandt,
            closes # 12581, closes #12578)
2023-06-25 22:34:22 +01:00
fullwaywang
8154e642aa patch 9.0.1664: divide by zero when scrolling with 'smoothscroll' set
Problem:    Divide by zero when scrolling with 'smoothscroll' set.
Solution:   Avoid using a negative width. (closes #12540, closes #12528)
2023-06-24 21:58:09 +01:00
325 changed files with 8547 additions and 2033 deletions

View File

@@ -13,7 +13,6 @@ freebsd_task:
image_family: freebsd-12-4
timeout_in: 20m
install_script:
- pkg update -f
- pkg install -y gettext
build_script:
- NPROC=$(getconf _NPROCESSORS_ONLN)

16
.github/CODEOWNERS vendored
View File

@@ -18,6 +18,7 @@ runtime/autoload/netrwFileHandlers.vim @cecamp
runtime/autoload/netrwSettings.vim @cecamp
runtime/autoload/php.vim @david-szabo97
runtime/autoload/rubycomplete.vim @segfault @dkearns
runtime/autoload/rust.vim @lilyball
runtime/autoload/tar.vim @cecamp
runtime/autoload/vimball.vim @cecamp
runtime/autoload/xmlformat.vim @chrisbra
@@ -150,7 +151,9 @@ runtime/ftplugin/go.vim @dbarnett
runtime/ftplugin/gprof.vim @dpelle
runtime/ftplugin/haml.vim @tpope
runtime/ftplugin/hare.vim @rsaihe
runtime/ftplugin/heex.vim @cvincent
runtime/ftplugin/hgcommit.vim @k-takata
runtime/ftplugin/hog.vim @wtfbbqhax
runtime/ftplugin/html.vim @dkearns
runtime/ftplugin/i3config.vim @hiqua
runtime/ftplugin/icon.vim @dkearns
@@ -180,11 +183,13 @@ runtime/ftplugin/pascal.vim @dkearns
runtime/ftplugin/pbtxt.vim @lakshayg
runtime/ftplugin/pdf.vim @tpope
runtime/ftplugin/perl.vim @petdance @dkearns
runtime/ftplugin/php.vim @dkearns
runtime/ftplugin/pod.vim @petdance @dkearns
runtime/ftplugin/poefilter.vim @ObserverOfTime
runtime/ftplugin/postscr.vim @mrdubya
runtime/ftplugin/ps1.vim @heaths
runtime/ftplugin/ps1xml.vim @heaths
runtime/ftplugin/pymanifest.vim @ObserverOfTime
runtime/ftplugin/python.vim @tpict
runtime/ftplugin/qb64.vim @dkearns
runtime/ftplugin/r.vim @jalvesaq
@@ -197,10 +202,12 @@ runtime/ftplugin/routeros.vim @zainin
runtime/ftplugin/rrst.vim @jalvesaq
runtime/ftplugin/rst.vim @marshallward
runtime/ftplugin/ruby.vim @tpope @dkearns
runtime/ftplugin/rust.vim @lilyball
runtime/ftplugin/sass.vim @tpope
runtime/ftplugin/scala.vim @derekwyatt
runtime/ftplugin/scss.vim @tpope
runtime/ftplugin/sdoc.vim @gpanders
runtime/ftplugin/sed.vim @dkearns
runtime/ftplugin/sh.vim @dkearns
runtime/ftplugin/solution.vim @dkearns
runtime/ftplugin/spec.vim @ignatenkobrain
@@ -215,6 +222,7 @@ runtime/ftplugin/toml.vim @averms
runtime/ftplugin/tt2html.vim @petdance
runtime/ftplugin/typescript.vim @dkearns
runtime/ftplugin/typescriptreact.vim @dkearns
runtime/ftplugin/unison.vim @chuwy
runtime/ftplugin/vdf.vim @ObserverOfTime
runtime/ftplugin/wast.vim @rhysd
runtime/ftplugin/wget.vim @dkearns
@@ -251,6 +259,7 @@ runtime/indent/go.vim @dbarnett
runtime/indent/gyp.vim @ObserverOfTime
runtime/indent/haml.vim @tpope
runtime/indent/hare.vim @rsaihe
runtime/indent/hog.vim @wtfbbqhax
runtime/indent/idlang.vim @dkearns
runtime/indent/j.vim @glts
runtime/indent/java.vim @xuhdev
@@ -258,6 +267,7 @@ runtime/indent/javascript.vim @bounceme
runtime/indent/json.vim @elzr
runtime/indent/jsonc.vim @izhakjakov
runtime/indent/julia.vim @carlobaldassi
runtime/indent/krl.vim @KnoP-01
runtime/indent/ld.vim @dkearns
runtime/indent/less.vim @genoma
runtime/indent/liquid.vim @tpope
@@ -276,6 +286,7 @@ runtime/indent/ps1.vim @heaths
runtime/indent/qb64.vim @dkearns
runtime/indent/r.vim @jalvesaq
runtime/indent/racket.vim @benknoble
runtime/indent/rapid.vim @KnoP-01
runtime/indent/readline.vim @dkearns
runtime/indent/rhelp.vim @jalvesaq
runtime/indent/rmd.vim @jalvesaq
@@ -377,6 +388,7 @@ runtime/syntax/hare.vim @rsaihe
runtime/syntax/haskell.vim @coot
runtime/syntax/hgcommit.vim @k-takata
runtime/syntax/hitest.vim @lacygoill
runtime/syntax/hog.vim @wtfbbqhax
runtime/syntax/hollywood.vim @sodero
runtime/syntax/html.vim @dkearns
runtime/syntax/i3config.vim @hiqua
@@ -389,6 +401,7 @@ runtime/syntax/javascript.vim @fleiner
runtime/syntax/jsonc.vim @izhakjakov
runtime/syntax/julia.vim @carlobaldassi
runtime/syntax/kconfig.vim @chrisbra
runtime/syntax/krl.vim @KnoP-01
runtime/syntax/less.vim @genoma
runtime/syntax/lex.vim @cecamp
runtime/syntax/liquid.vim @tpope
@@ -428,10 +441,12 @@ runtime/syntax/prolog.vim @XVilka
runtime/syntax/ps1.vim @heaths
runtime/syntax/ps1xml.vim @heaths
runtime/syntax/psl.vim @danielkho
runtime/syntax/pymanifest.vim @ObserverOfTime
runtime/syntax/qb64.vim @dkearns
runtime/syntax/r.vim @jalvesaq
runtime/syntax/racket.vim @benknoble
runtime/syntax/raml.vim @in3d
runtime/syntax/rapid.vim @KnoP-01
runtime/syntax/ratpoison.vim @trapd00r
runtime/syntax/rc.vim @chrisbra
runtime/syntax/rcs.vim @hdima
@@ -477,6 +492,7 @@ runtime/syntax/tt2js.vim @petdance
runtime/syntax/typescript.vim @HerringtonDarkholme
runtime/syntax/typescriptcommon.vim @HerringtonDarkholme
runtime/syntax/typescriptreact.vim @HerringtonDarkholme
runtime/syntax/unison.vim @chuwy
runtime/syntax/vdf.vim @ObserverOfTime
runtime/syntax/vim.vim @cecamp
runtime/syntax/vroom.vim @dbarnett

58
.github/labeler.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
# list of labels and minimatch globs to match to apply the label.
CI:
- any: ['.cirrus.yml']
- any: ['.github/**']
- any: ['.appveyor.yml']
- any: ['.codecov.yml']
translation:
- any: ['src/po/*.po']
if_lua:
- any: ['src/if_lua.c']
- any: ['src/proto/if_lua.pro']
- any: ['runtime/doc/if_lua.txt']
if_mzscheme:
- any: ['src/if_mzsch.c']
- any: ['src/if_mzsch.h']
- any: ['src/proto/if_mzsch.pro']
- any: ['runtime/doc/if_mzsch.txt']
if_perl:
- any: ['src/if_perl.xs']
- any: ['src/if_perlsfio.c']
- any: ['src/proto/if_perl.pro']
- any: ['src/proto/if_perlsfio.pro']
- any: ['runtime/doc/if_perl.txt']
if_python:
- any: ['src/if_py_both.h']
- any: ['runtime/doc/if_pyth.txt']
- any: ['src/if_python.c']
- any: ['src/if_python3.c']
- any: ['src/proto/if_python.pro']
- any: ['src/proto/if_python3.pro']
if_ruby:
- any: ['src/if_ruby.c']
- any: ['src/proto/if_ruby.pro']
- any: ['runtime/doc/if_ruby.txt']
if_tcl:
- any: ['src/if_tcl.c']
- any: ['src/proto/if_tcl.pro']
- any: ['runtime/doc/if_tcl.txt']
runtime:
- any: ['runtime/ftplugin']
- any: ['runtime/syntax']
- any: ['runtime/indent']
- any: ['runtime/pack/dist/opt/termdebug/plugin/termdebug.vim']
termdebug: runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
netrw:
- any: ['runtime/plugin/netrwPlugin.vim']
- any: ['runtime/autoload/netrw*']

View File

@@ -38,6 +38,7 @@ jobs:
features: [tiny, normal, huge]
compiler: [clang, gcc]
extra: [none]
luaver: [lua5.4]
include:
- features: tiny
compiler: clang
@@ -54,13 +55,18 @@ jobs:
coverage: true
extra: testgui
uchar: true
luaver: lua5.4
- features: huge
compiler: clang
extra: asan
# Lua5.1 is the most widely used version (since it's what LuaJIT is
# compatible with), so ensure it works
luaver: lua5.1
- features: huge
compiler: gcc
coverage: true
extra: unittests
luaver: lua5.4
- features: normal
compiler: gcc
extra: vimtags
@@ -85,8 +91,8 @@ jobs:
libperl-dev \
python2-dev \
python3-dev \
liblua5.4-dev \
lua5.4 \
lib${{ matrix.luaver }}-dev \
${{ matrix.luaver }} \
ruby-dev \
tcl-dev \
cscope \
@@ -178,17 +184,16 @@ jobs:
if: (!(contains(matrix.extra, 'unittests') || contains(matrix.extra, 'vimtags')))
env:
DEST_DIR: ${{ env.TMPDIR }}/linux-modules-extra-${{ env.LINUX_VERSION }}
uses: tecolicom/actions-use-apt-tools@main
with:
tools: linux-modules-extra-${{ env.LINUX_VERSION }}
path: "${DEST_DIR}"
- name: modprobe snd-dummy
if: (!(contains(matrix.extra, 'unittests') || contains(matrix.extra, 'vimtags')))
run: |
cd /lib/modules/${{ env.LINUX_VERSION }}
if apt-cache show linux-modules-extra-${{ env.LINUX_VERSION }} >/dev/null 2>&1 ; then
sudo apt-get install -d -y linux-modules-extra-${{ env.LINUX_VERSION }}
sudo dpkg -x /var/cache/apt/archives/linux-modules-extra-${{ env.LINUX_VERSION }}*.deb "${DEST_DIR}"
tar -cvC "${DEST_DIR}"/lib/modules/${{ env.LINUX_VERSION }} kernel/sound | sudo tar -x
sudo depmod --verbose
sudo modprobe --verbose snd-dummy
else
echo "Module " linux-modules-extra-${{ env.LINUX_VERSION }} "doesn't seem to exist, continue anyway"; exit 0
fi
- name: Check autoconf
if: contains(matrix.extra, 'unittests')
@@ -226,7 +231,7 @@ jobs:
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
- name: Test
timeout-minutes: 20
timeout-minutes: 25
run: |
do_test() { sg audio "sg $(id -gn) '$*'"; }
do_test make ${SHADOWOPT} ${TEST}
@@ -276,7 +281,6 @@ jobs:
run: |
brew install lua
echo "LUA_PREFIX=/usr/local" >> $GITHUB_ENV
brew uninstall perl
- name: Set up environment
run: |

24
.github/workflows/label.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler
name: Labeler
on: [pull_request_target]
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
sync-labels: ''

View File

@@ -21,8 +21,8 @@ II) It is allowed to distribute a modified (or extended) version of Vim,
maintainer will do with your changes and under what license they
will be distributed is negotiable. If there has been no negotiation
then this license, or a later version, also applies to your changes.
The current maintainer is Bram Moolenaar <Bram@vim.org>. If this
changes it will be announced in appropriate places (most likely
The current maintainers are listed here: https://github.com/orgs/vim/people.
If this changes it will be announced in appropriate places (most likely
vim.sf.net, www.vim.org and/or comp.editors). When it is completely
impossible to contact the maintainer, the obligation to send him
your changes ceases. Once the maintainer has confirmed that he has

View File

@@ -1,17 +1,21 @@
[![Vim Logo](https://github.com/vim/vim/raw/master/runtime/vimlogo.gif)](https://www.vim.org)
# [![Vim The editor](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) [![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) [![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>
[![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)
[![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)
If you find a bug or want to discuss the best way to add a new feature, please
open an [issue](https://github.com/vim/vim/issues).
[open an issue](https://github.com/vim/vim/issues/new/choose).
If you have a question or want to discuss the best way to do something with
Vim, you can use [StackExchange](https://vi.stackexchange.com/)
or one of the [Maillists](https://www.vim.org/community.php).
## What is Vim? ##
## What is Vim?
Vim is a greatly improved version of the good old UNIX editor
[Vi](https://en.wikipedia.org/wiki/Vi). Many new
@@ -35,7 +39,7 @@ Amiga DOS, Atari MiNT, BeOS, RISC OS and OS/2. These are no longer maintained.
For Vim9 script see [README_VIM9](README_VIM9.md).
## Distribution ##
## Distribution
You can often use your favorite package manager to install Vim. On Mac and
Linux a small version of Vim is pre-installed, you still need to install Vim
@@ -55,48 +59,45 @@ Some popular places to get the latest Vim:
* Get a Windows executable from the
[vim-win32-installer](https://github.com/vim/vim-win32-installer/releases) repository.
## Compiling ##
## Compiling
If you obtained a binary distribution you don't need to compile Vim. If you
obtained a source distribution, all the stuff for compiling Vim is in the
[`src`](/src) directory. See [`src/INSTALL`](src/INSTALL) for instructions.
[`src`](./src/) directory. See [`src/INSTALL`](./src/INSTALL) for instructions.
## Installation ##
## Installation
See one of these files for system-specific instructions. Either in the
[READMEdir directory](./READMEdir/) (in the repository) or
the top directory (if you unpack an archive):
README_ami.txt Amiga
README_unix.txt Unix
README_dos.txt MS-DOS and MS-Windows
README_mac.txt Macintosh
README_haiku.txt Haiku
README_vms.txt VMS
```
README_ami.txt Amiga
README_unix.txt Unix
README_dos.txt MS-DOS and MS-Windows
README_mac.txt Macintosh
README_haiku.txt Haiku
README_vms.txt VMS
```
There are other `README_*.txt` files, depending on the distribution you used.
## Documentation ##
## Documentation
The Vim tutor is a one hour training course for beginners. Often it can be
started as `vimtutor`. See `:help tutor` for more information.
The best is to use `:help` in Vim. If you don't have an executable yet, read
[`runtime/doc/help.txt`](/runtime/doc/help.txt).
[`runtime/doc/help.txt`](./runtime/doc/help.txt).
It contains pointers to the other documentation files.
The User Manual reads like a book and is recommended to learn to use
Vim. See `:help user-manual`.
## Copying ##
## Copying
Vim is Charityware. You can use and copy it as much as you like, but you are
encouraged to make a donation to help orphans in Uganda. Please read the file
[`runtime/doc/uganda.txt`](runtime/doc/uganda.txt)
[`runtime/doc/uganda.txt`](./runtime/doc/uganda.txt)
for details (do `:help uganda` inside Vim).
Summary of the license: There are no restrictions on using or distributing an
@@ -105,28 +106,25 @@ text must always be included. For modified versions, a few restrictions apply.
The license is GPL compatible, you may compile Vim with GPL libraries and
distribute it.
## Sponsoring ##
## Sponsoring
Fixing bugs and adding new features takes a lot of time and effort. To show
your appreciation for the work and motivate Bram and others to continue
working on Vim please send a donation.
Since Bram is back to a paid job the money will now be used to help children
in Uganda. See [`runtime/doc/uganda.txt`](runtime/doc/uganda.txt). But
in Uganda. See [`runtime/doc/uganda.txt`](./runtime/doc/uganda.txt). But
at the same time donations increase Bram's motivation to keep working on Vim!
For the most recent information about sponsoring look on the Vim web site:
https://www.vim.org/sponsor/
## Contributing ##
## Contributing
If you would like to help make Vim better, see the
[CONTRIBUTING.md](/CONTRIBUTING.md) file.
[CONTRIBUTING.md](./CONTRIBUTING.md) file.
## Information ##
## Information
If you are on macOS, you can use [Macvim](https://macvim-dev.github.io/macvim/).
@@ -141,14 +139,15 @@ If you still have problems or any other questions, use one of the mailing
lists to discuss them with Vim users and developers:
https://www.vim.org/maillist.php
If nothing else works, report bugs directly:
Bram Moolenaar <Bram@vim.org>
If nothing else works, report bugs directly to the vim-dev mailing list:
`<vim-dev@vim.org>`
## Main author
## Main author ##
Send any other comments, patches, flowers and suggestions to:
Bram Moolenaar <Bram@vim.org>
Most of Vim was created by Bram Moolenaar `<Bram@vim.org>`
[Bram-Moolenaar](https://vimhelp.org/version9.txt.html#Bram-Moolenaar)
Send any other comments, patches, flowers and suggestions to the vim-dev mailing list:
`<vim-dev@vim.org>`
This is `README.md` for version 9.0 of Vim: Vi IMproved.

View File

@@ -122,12 +122,14 @@ If you still have problems or any other questions, use one of the mailing
lists to discuss them with Vim users and developers:
https://www.vim.org/maillist.php
If nothing else works, report bugs directly:
Bram Moolenaar <Bram@vim.org>
If nothing else works, report bugs directly to the vim-dev mailing list:
<vim-dev@vim.org>
MAIN AUTHOR
Send any other comments, patches, flowers and suggestions to:
Most of Vim was created by Bram Moolenaar <Bram@vim.org> |Bram-Moolenaar|
Bram Moolenaar E-mail: Bram@vim.org
Send any other comments, patches, flowers and suggestions to the vim-dev mailing list:
<vim-dev@vim.org>

8
SECURITY.md Normal file
View File

@@ -0,0 +1,8 @@
# Security Policy
## Reporting a vulnerability
If you want to report a security issue, please use [huntr.dev](https://huntr.dev/bounties/disclose?target=https%3A%2F%2Fgithub.com%2Fvim%2Fvim) to privately disclose the issue to us.
They also have rewards in the form of money, swag and CVEs.
**Please don't publicly disclose the issue until it has been addressed by us.**

View File

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

View File

@@ -1,10 +1,11 @@
vim9script noclear
# Vim completion script
# Language: C
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Language: C
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Aug 10
# Rewritten in Vim9 script by github user lacygoill
# Last Change: 2022 Jan 31
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
var prepended: string
var grepCache: dict<list<dict<any>>>

View File

@@ -2,8 +2,9 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last Change: 2023 Jun 09
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Aug 10
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# These functions are moved here from runtime/filetype.vim to make startup
# faster.

View File

@@ -3,7 +3,7 @@
" Maintainer: Jason Franklin <vim@justemail.net>
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Autoload Split: Bram Moolenaar
" Last Change: 2022 Jun 18
" Last Change: 2023 Jun 28
let s:cpo_save = &cpo
set cpo-=C
@@ -21,31 +21,65 @@ catch /E145:/
" Ignore the error in restricted mode
endtry
func s:ParseIntoPageAndSection()
" Accommodate a reference that terminates in a hyphen.
"
" See init_charset_table() at
" https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/troff/input.cpp?h=1.22.4#n6794
"
" See can_break_after() at
" https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/troff/charinfo.h?h=1.22.4#n140
"
" Assumptions and limitations:
" 1) Manual-page references (in consequence of command-related filenames)
" do not contain non-ASCII HYPHENs (0x2010), any terminating HYPHEN
" must have been introduced to mark division of a word at the end of
" a line and can be discarded; whereas similar references may contain
" ASCII HYPHEN-MINUSes (0x002d) and any terminating HYPHEN-MINUS forms
" a compound word in addition to marking word division.
" 2) Well-formed manual-page references always have a section suffix, e.g.
" "git-commit(1)", therefore suspended hyphenated compounds are not
" determined, e.g. [V] (With cursor at _git-merge-_ below...)
" ".................... git-merge- and git-merge-base. (See git-cherry-
" pick(1) and git-cherry(1).)" (... look up "git-merge-pick(1)".)
"
" Note that EM DASH (0x2014), a third stooge from init_charset_table(),
" neither connects nor divides parts of a word.
let str = expand("<cWORD>")
if str =~ '\%u2010$' " HYPHEN (-1).
let str = strpart(str, 0, strridx(str, "\u2010"))
" Append the leftmost WORD (or an empty string) from the line below.
let str .= get(split(get(getbufline(bufnr('%'), line('.') + 1), 0, '')), 0, '')
elseif str =~ '-$' " HYPHEN-MINUS.
" Append the leftmost WORD (or an empty string) from the line below.
let str .= get(split(get(getbufline(bufnr('%'), line('.') + 1), 0, '')), 0, '')
endif
" According to man(1), section name formats vary (MANSECT):
" 1 n l 8 3 2 3posix 3pm 3perl 3am 5 4 9 6 7
let parts = matchlist(str, '\(\k\+\)(\(\k\+\))')
return (len(parts) > 2)
\ ? {'page': parts[1], 'section': parts[2]}
\ : {'page': matchstr(str, '\k\+'), 'section': ''}
endfunc
func dist#man#PreGetPage(cnt)
if a:cnt == 0
let old_isk = &iskeyword
if &ft == 'man'
setl iskeyword+=(,)
endif
let str = expand("<cword>")
let &l:iskeyword = old_isk
let page = substitute(str, '(*\(\k\+\).*', '\1', '')
let sect = substitute(str, '\(\k\+\)(\([^()]*\)).*', '\2', '')
if match(sect, '^[0-9 ]\+$') == -1
let sect = ""
endif
if sect == page
let sect = ""
endif
let what = s:ParseIntoPageAndSection()
let sect = what.section
let page = what.page
else
let what = s:ParseIntoPageAndSection()
let sect = a:cnt
let page = expand("<cword>")
let page = what.page
endif
call dist#man#GetPage('', sect, page)
endfunc
func s:GetCmdArg(sect, page)
if empty(a:sect)
return shellescape(a:page)
endif
@@ -75,9 +109,11 @@ func dist#man#GetPage(cmdmods, ...)
return
endif
" To support: nmap K :Man <cword>
if page == '<cword>'
let page = expand('<cword>')
" To support: nmap K :Man <cWORD><CR>
if page ==? '<cword>'
let what = s:ParseIntoPageAndSection()
let sect = what.section
let page = what.page
endif
if !exists('g:ft_man_no_sect_fallback') || (g:ft_man_no_sect_fallback == 0)
@@ -180,9 +216,10 @@ func dist#man#PopPage()
exec "let s:man_tag_buf=s:man_tag_buf_".s:man_tag_depth
exec "let s:man_tag_lin=s:man_tag_lin_".s:man_tag_depth
exec "let s:man_tag_col=s:man_tag_col_".s:man_tag_depth
exec s:man_tag_buf."b"
exec s:man_tag_lin
exec "norm! ".s:man_tag_col."|"
call cursor(s:man_tag_lin, s:man_tag_col)
exec "unlet s:man_tag_buf_".s:man_tag_depth
exec "unlet s:man_tag_lin_".s:man_tag_depth
exec "unlet s:man_tag_col_".s:man_tag_depth

View File

@@ -3,8 +3,9 @@ vim9script
# Vim function for detecting a filetype from the file contents.
# Invoked from "scripts.vim" in 'runtimepath'
#
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last Change: 2023 Jun 09
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Aug 10
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
export def DetectFiletype()
var line1 = getline(1)

View File

@@ -2,7 +2,7 @@ vim9script
# Language: Vim script
# Maintainer: github user lacygoill
# Last Change: 2023 Feb 01
# Last Change: 2023 Jun 29
# NOTE: Whenever you change the code, make sure the tests are still passing:
#
@@ -112,10 +112,6 @@ const DICT_KEY: string = '^\s*\%('
.. '\)'
.. ':\%(\s\|$\)'
# NOT_A_DICT_KEY {{{3
const NOT_A_DICT_KEY: string = ':\@!'
# END_OF_COMMAND {{{3
const END_OF_COMMAND: string = $'\s*\%($\|||\@!\|{INLINE_COMMENT}\)'
@@ -197,13 +193,13 @@ patterns =<< trim eval END
ldo\=\>!\=
tabdo\=\>
windo\>
au\%[tocmd]\>.*
com\%[mand]\>.*
au\%[tocmd]\>!\=.*
com\%[mand]\>!\=.*
g\%[lobal]!\={PATTERN_DELIMITER}.*
v\%[global]!\={PATTERN_DELIMITER}.*
END
const HIGHER_ORDER_COMMAND: string = $'\%(^\|{BAR_SEPARATION}\)\s*\<\%({patterns->join('\|')}\){NOT_A_DICT_KEY}'
const HIGHER_ORDER_COMMAND: string = $'\%(^\|{BAR_SEPARATION}\)\s*\<\%({patterns->join('\|')}\)\%(\s\|$\)\@='
# START_MIDDLE_END {{{3
@@ -254,7 +250,7 @@ START_MIDDLE_END = START_MIDDLE_END
kwds->map((_, kwd: string) => kwd == ''
? ''
: $'\%(^\|{BAR_SEPARATION}\|\<sil\%[ent]\|{HIGHER_ORDER_COMMAND}\)\s*'
.. $'\<\%({kwd}\)\>\%(\s*{OPERATOR}\)\@!'))
.. $'\<\%({kwd}\)\>\%(\s\|$\|!\)\@=\%(\s*{OPERATOR}\)\@!'))
lockvar! START_MIDDLE_END
@@ -279,7 +275,7 @@ patterns = BLOCKS
const ENDS_BLOCK_OR_CLAUSE: string = '^\s*\%(' .. patterns->join('\|') .. $'\){END_OF_COMMAND}'
.. $'\|^\s*cat\%[ch]\%(\s\+\({PATTERN_DELIMITER}\).*\1\)\={END_OF_COMMAND}'
.. $'\|^\s*elseif\=\>\%({OPERATOR}\)\@!'
.. $'\|^\s*elseif\=\>\%(\s\|$\)\@=\%(\s*{OPERATOR}\)\@!'
# STARTS_NAMED_BLOCK {{{3
@@ -296,7 +292,7 @@ patterns = []
endfor
}
const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]\s\+\)\=\%({patterns->join('\|')}\)\>{NOT_A_DICT_KEY}'
const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]\s\+\)\=\%({patterns->join('\|')}\)\>\%(\s\|$\|!\)\@='
# STARTS_CURLY_BLOCK {{{3
@@ -312,7 +308,7 @@ const STARTS_CURLY_BLOCK: string = '\%('
# STARTS_FUNCTION {{{3
const STARTS_FUNCTION: string = $'^\s*\%({MODIFIERS.def}\)\=def\>{NOT_A_DICT_KEY}'
const STARTS_FUNCTION: string = $'^\s*\%({MODIFIERS.def}\)\=def\>!\=\s\@='
# ENDS_FUNCTION {{{3

View File

@@ -1,6 +1,7 @@
" Vim autoload file for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2016 Sep 28
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" These functions are used by the gzip plugin.

View File

@@ -1,6 +1,7 @@
" Vim support file to help with paste mappings and menus
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2019 Jan 27
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Define the string to use for items that are present both in Edit, Popup and
" Toolbar menu. Also used in mswin.vim and macmap.vim.

View File

@@ -1,4 +1,4 @@
" Author: Kevin Ballard
" Author: Lily Ballard
" Description: Helper functions for Rust commands/mappings
" Last Modified: May 27, 2014
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim

View File

@@ -1,6 +1,7 @@
" Vim script to download a missing spell file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 Jul 10
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
if !exists('g:spellfile_URL')
" Always use https:// because it's secure. The certificate is for nluug.nl,

View File

@@ -1,8 +1,9 @@
:" Use this script to create the file "bugreport.txt", which contains
:" information about the environment of a possible bug in Vim.
:"
:" Maintainer: Bram Moolenaar <Bram@vim.org>
:" Last change: 2019 Jan 27
:" Maintainer: The Vim Project <https://github.com/vim/vim>
:" Last change: 2023 Aug 10
:" Former Maintainer: Bram Moolenaar <Bram@vim.org>
:"
:" To use inside Vim:
:" :so $VIMRUNTIME/bugreport.vim

View File

@@ -1,6 +1,7 @@
" Vim color file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2001 Jul 23
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" This is the default color scheme. It doesn't define the Normal
" highlighting, it uses whatever the colors used to be.

View File

@@ -8,4 +8,4 @@ If you want to write your own compiler plugin, have a look at the other files
for how to do it, the format is simple.
If you think a compiler plugin you have written is useful for others, please
send it to Bram@vim.org.
send it to the vim-dev mailing list: <vim-dev@vim.org>

View File

@@ -1,7 +1,8 @@
" Vim compiler file
" Compiler: Microsoft Visual C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2014 Sep 20
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
if exists("current_compiler")
finish

View File

@@ -1,7 +1,8 @@
" The default vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2023 May 10
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
"
" This is loaded if no vimrc file was found.
" Except when Vim is run with "-u NONE" or "-C".
@@ -97,17 +98,21 @@ if 1
filetype plugin indent on
" Put these in an autocmd group, so that you can revert them with:
" ":augroup vimStartup | exe 'au!' | augroup END"
" ":autocmd! vimStartup"
augroup vimStartup
au!
autocmd!
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid, when inside an event handler
" (happens when dropping a file on gvim) and for a commit message (it's
" likely a different one than last time).
" (happens when dropping a file on gvim), for a commit or rebase message
" (likely a different one than last time), and when using xxd(1) to filter
" and edit binary files (it transforms input files back and forth, causing
" them to have dual nature, so to speak)
autocmd BufReadPost *
\ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | exe "normal! g`\""
\ let line = line("'\"")
\ | if line >= 1 && line <= line("$") && &filetype !~# 'commit'
\ && index(['xxd', 'gitrebase'], &filetype) == -1
\ | execute "normal! g`\""
\ | endif
augroup END
@@ -115,11 +120,11 @@ if 1
" Quite a few people accidentally type "q:" instead of ":q" and get confused
" by the command line window. Give a hint about how to get out.
" If you don't like this you can put this in your vimrc:
" ":augroup vimHints | exe 'au!' | augroup END"
" ":autocmd! vimHints"
augroup vimHints
au!
autocmd CmdwinEnter *
\ echohl Todo |
\ echohl Todo |
\ echo gettext('You discovered the command-line window! You can close it with ":q".') |
\ echohl None
augroup END

View File

@@ -1,8 +1,9 @@
" This Vim script deletes all the menus, so that they can be redefined.
" Warning: This also deletes all menus defined by the user!
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2019 Dec 10
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
aunmenu *
tlunmenu *

View File

@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.0. Last change: 2023 Jun 08
*builtin.txt* For Vim version 9.0. Last change: 2023 Aug 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -156,6 +156,7 @@ digraph_setlist({digraphlist}) Boolean register multiple |digraph|s
echoraw({expr}) none output {expr} as-is
empty({expr}) Number |TRUE| if {expr} is empty
environ() Dict return environment variables
err_teapot([{expr}]) none give E418, or E503 if {expr} is |TRUE|
escape({string}, {chars}) String escape {chars} in {string} with '\'
eval({string}) any evaluate {string} into its value
eventhandler() Number |TRUE| if inside an event handler
@@ -706,13 +707,14 @@ trunc({expr}) Float truncate Float {expr}
type({expr}) Number type of value {expr}
typename({expr}) String representation of the type of {expr}
undofile({name}) String undo file name for {name}
undotree() List undo file tree
undotree([{buf}]) List undo file tree for buffer {buf}
uniq({list} [, {func} [, {dict}]])
List remove adjacent duplicates from a list
utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
Number UTF-16 index of byte {idx} in {string}
values({dict}) List values in {dict}
virtcol({expr} [, {list}]) Number or List
virtcol({expr} [, {list} [, {winid}])
Number or List
screen column of cursor or mark
virtcol2col({winid}, {lnum}, {col})
Number byte index of a character on screen
@@ -1248,7 +1250,7 @@ bufload({buf}) *bufload()*
refers to an existing file then the file is read. Otherwise
the buffer will be empty. If the buffer was already loaded
then there is no change. If the buffer is not related to a
file the no file is read (e.g., when 'buftype' is "nofile").
file then no file is read (e.g., when 'buftype' is "nofile").
If there is an existing swap file for the file of the buffer,
there will be no dialog, the buffer will be loaded anyway.
The {buf} argument is used like with |bufexists()|.
@@ -2201,6 +2203,15 @@ environ() *environ()*
use this: >
:echo index(keys(environ()), 'HOME', 0, 1) != -1
err_teapot([{expr}]) *err_teapot()*
Produce an error with number 418, needed for implementation of
RFC 2325.
If {expr} is present and it is TRUE error 503 is given,
indicating that coffee is temporarily not available.
If {expr} is present it must be a String.
escape({string}, {chars}) *escape()*
Escape the characters in {chars} that occur in {string} with a
backslash. Example: >
@@ -3992,6 +4003,9 @@ getqflist([{what}]) *getqflist()*
text description of the error
type type of the error, 'E', '1', etc.
valid |TRUE|: recognized error message
user_data
custom data associated with the item, can be
any type.
When there is no error list or it's empty, an empty list is
returned. Quickfix list entries with a non-existing buffer
@@ -6577,7 +6591,11 @@ printf({fmt}, {expr1} ...) *printf()*
The "%" starts a conversion specification. The following
arguments appear in sequence:
% [flags] [field-width] [.precision] type
% [pos-argument] [flags] [field-width] [.precision] type
pos-argument
At most one positional argument specifier. These
take the form {n$}, where n is >= 1.
flags
Zero or more of the following flags:
@@ -6649,6 +6667,13 @@ printf({fmt}, {expr1} ...) *printf()*
< This limits the length of the text used from "line" to
"width" bytes.
If the argument to be formatted is specified using a posional
argument specifier, and a '*' is used to indicate that a
number argument is to be used to specify the width or
precision, the argument(s) to be used must also be specified
using a {n$} positional argument specifier. See |printf-$|.
The conversion specifiers and their meanings are:
*printf-d* *printf-b* *printf-B* *printf-o*
@@ -6738,6 +6763,103 @@ printf({fmt}, {expr1} ...) *printf()*
of "%" items. If there are not sufficient or too many
arguments an error is given. Up to 18 arguments can be used.
*printf-$*
In certain languages, error and informative messages are
more readable when the order of words is different from the
corresponding message in English. To accomodate translations
having a different word order, positional arguments may be
used to indicate this. For instance: >
#, c-format
msgid "%s returning %s"
msgstr "waarde %2$s komt terug van %1$s"
<
In this example, the sentence has its 2 string arguments reversed
in the output. >
echo printf(
"In The Netherlands, vim's creator's name is: %1$s %2$s",
"Bram", "Moolenaar")
< In The Netherlands, vim's creator's name is: Bram Moolenaar >
echo printf(
"In Belgium, vim's creator's name is: %2$s %1$s",
"Bram", "Moolenaar")
< In Belgium, vim's creator's name is: Moolenaar Bram
Width (and precision) can be specified using the '*' specifier.
In this case, you must specify the field width position in the
argument list. >
echo printf("%1$*2$.*3$d", 1, 2, 3)
< 001 >
echo printf("%2$*3$.*1$d", 1, 2, 3)
< 2 >
echo printf("%3$*1$.*2$d", 1, 2, 3)
< 03 >
echo printf("%1$*2$.*3$g", 1.4142, 2, 3)
< 1.414
You can mix specifying the width and/or precision directly
and via positional arguments: >
echo printf("%1$4.*2$f", 1.4142135, 6)
< 1.414214 >
echo printf("%1$*2$.4f", 1.4142135, 6)
< 1.4142 >
echo printf("%1$*2$.*3$f", 1.4142135, 6, 2)
< 1.41
*E1400*
You cannot mix positional and non-positional arguments: >
echo printf("%s%1$s", "One", "Two")
< E1400: Cannot mix positional and non-positional
arguments: %s%1$s
*E1401*
You cannot skip a positional argument in a format string: >
echo printf("%3$s%1$s", "One", "Two", "Three")
< E1401: format argument 2 unused in $-style
format: %3$s%1$s
*E1402*
You can re-use a [field-width] (or [precision]) argument: >
echo printf("%1$d at width %2$d is: %01$*2$d", 1, 2)
< 1 at width 2 is: 01
However, you can't use it as a different type: >
echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2)
< E1402: Positional argument 2 used as field
width reused as different type: long int/int
*E1403*
When a positional argument is used, but not the correct number
or arguments is given, an error is raised: >
echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2)
< E1403: Positional argument 3 out of bounds:
%1$d at width %2$d is: %01$*2$.*3$d
Only the first error is reported: >
echo printf("%01$*2$.*3$d %4$d", 1, 2)
< E1403: Positional argument 3 out of bounds:
%01$*2$.*3$d %4$d
*E1404*
A positional argument can be used more than once: >
echo printf("%1$s %2$s %1$s", "One", "Two")
< One Two One
However, you can't use a different type the second time: >
echo printf("%1$s %2$s %1$d", "One", "Two")
< E1404: Positional argument 1 type used
inconsistently: int/string
*E1405*
Various other errors that lead to a format string being
wrongly formatted lead to: >
echo printf("%1$d at width %2$d is: %01$*2$.3$d", 1, 2)
< E1405: Invalid format specifier:
%1$d at width %2$d is: %01$*2$.3$d
prompt_getprompt({buf}) *prompt_getprompt()*
Returns the effective prompt text for buffer {buf}. {buf} can
@@ -8288,6 +8410,8 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
text description of the error
type single-character error type, 'E', 'W', etc.
valid recognized error message
user_data custom data associated with the item, can be
any type.
The "col", "vcol", "nr", "type" and "text" entries are
optional. Either "lnum" or "pattern" entry can be used to
@@ -10063,9 +10187,10 @@ undofile({name}) *undofile()*
Can also be used as a |method|: >
GetFilename()->undofile()
undotree() *undotree()*
Return the current state of the undo tree in a dictionary with
the following items:
undotree([{buf}]) *undotree()*
Return the current state of the undo tree for the current
buffer, or for a specific buffer if {buf} is given. The
result is a dictionary with the following items:
"seq_last" The highest undo sequence number used.
"seq_cur" The sequence number of the current position in
the undo tree. This differs from "seq_last"
@@ -10159,7 +10284,7 @@ values({dict}) *values()*
Can also be used as a |method|: >
mydict->values()
virtcol({expr} [, {list}]) *virtcol()*
virtcol({expr} [, {list} [, {winid}]]) *virtcol()*
The result is a Number, which is the screen column of the file
position given with {expr}. That is, the last screen position
occupied by the character at that position, when the screen
@@ -10191,10 +10316,13 @@ virtcol({expr} [, {list}]) *virtcol()*
returns the cursor position. Differs from |'<| in
that it's updated right away.
If {list} is present and non-zero then virtcol() returns a List
with the first and last screen position occupied by the
If {list} is present and non-zero then virtcol() returns a
List with the first and last screen position occupied by the
character.
With the optional {winid} argument the values are obtained for
that window instead of the current window.
Note that only marks in the current file can be used.
Examples: >
" With text "foo^Lbar" and cursor on the "^L":
@@ -10206,7 +10334,7 @@ virtcol({expr} [, {list}]) *virtcol()*
" With text " there", with 't at 'h':
virtcol("'t") " returns 6
< The first column is 1. 0 is returned for an error.
< The first column is 1. 0 or [0, 0] is returned for an error.
A more advanced example that echoes the maximum length of
all lines: >
echo max(map(range(1, line('$')), "virtcol([v:val, '$'])"))
@@ -10223,6 +10351,9 @@ virtcol2col({winid}, {lnum}, {col}) *virtcol2col()*
{lnum}, then the byte index of the character at the last
virtual column is returned.
For a multi-byte character, the column number of the first
byte in the character is returned.
The {winid} argument can be the window number or the
|window-ID|. If this is zero, then the current window is used.

View File

@@ -394,7 +394,7 @@ ways to change this:
You must create a new filetype plugin in a directory early in
'runtimepath'. For Unix, for example you could use this file: >
vim ~/.vim/ftplugin/fortran.vim
< You can set those settings and mappings that you would like to add. Note
< You can set those settings and mappings that you would like to add. Note
that the global plugin will be loaded after this, it may overrule the
settings that you do here. If this is the case, you need to use one of the
following two methods.
@@ -403,7 +403,7 @@ ways to change this:
You must put the copy in a directory early in 'runtimepath'. For Unix, for
example, you could do this: >
cp $VIMRUNTIME/ftplugin/fortran.vim ~/.vim/ftplugin/fortran.vim
< Then you can edit the copied file to your liking. Since the b:did_ftplugin
< Then you can edit the copied file to your liking. Since the b:did_ftplugin
variable will be set, the global plugin will not be loaded.
A disadvantage of this method is that when the distributed plugin gets
improved, you will have to copy and modify it again.
@@ -412,7 +412,7 @@ ways to change this:
You must create a new filetype plugin in a directory from the end of
'runtimepath'. For Unix, for example, you could use this file: >
vim ~/.vim/after/ftplugin/fortran.vim
< In this file you can change just those settings that you want to change.
< In this file you can change just those settings that you want to change.
==============================================================================
3. Docs for the default filetype plugins. *ftplugin-docs*

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 9.0. Last change: 2022 Nov 20
*intro.txt* For Vim version 9.0. Last change: 2023 Aug 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -129,8 +129,9 @@ There are three ways to report bugs:
3. Send bug reports to: Vim Developers <vim-dev@vim.org>
This is a maillist, you need to become a member first and many people will
see the message. If you don't want that, e.g. because it is a security
issue, send it to <bugs@vim.org>, this only goes to the Vim maintainer
(that's Bram).
issue, please contact any of the current Vim maintainers
https://github.com/orgs/vim/people (but not Bram or the vim-dev ML).
In the future, a proper process for handling security issues will be setup.
Please be brief; all the time that is spent on answering mail is subtracted
from the time that is spent on improving Vim! Always give a reproducible
@@ -181,9 +182,9 @@ The user may create scripts for Vim that use external commands. These might
introduce Y2K problems, but those are not really part of Vim itself.
==============================================================================
3. Credits *credits* *author* *Bram* *Moolenaar*
3. Credits *credits* *author*
Most of Vim was created by Bram Moolenaar <Bram@vim.org>.
Most of Vim was created by Bram Moolenaar <Bram@vim.org> |Bram-Moolenaar|
Parts of the documentation come from several Vi manuals, written by:
W.N. Joy
@@ -216,7 +217,7 @@ Vim would never have become what it is now, without the help of these people!
Bill Foster Athena GUI port (later removed)
Google Lets me work on Vim one day a week
Loic Grenie xvim (ideas for multi windows version)
Sven Guckes Vim promoter and previous WWW page maintainer
Sven Guckes Vim promoter and previous WWW page maintainer |Sven-Guckes|
Darren Hiebert Exuberant ctags
Jason Hildebrand GTK+ 2 port
Bruce Hunsaker improvements for VMS port

View File

@@ -252,6 +252,8 @@ opt+=val" the expansion is done before the adding or removing.
Handling of local options *local-options*
Note: The following also applies to |global-local| options.
Some of the options only apply to a window or buffer. Each window or buffer
has its own copy of this option, thus each can have its own value. This
allows you to set 'list' in one window but not in another. And set
@@ -301,6 +303,30 @@ The options local to a window are remembered for each buffer. This also
happens when the buffer is not loaded, but they are lost when the buffer is
wiped out |:bwipe|.
Special local window options *special-local-window-option*
The following local window options won't be copied over when new windows are
created, thus they behave slightly differently:
Option Reason ~
'previewwindow' there can only be a single one
'scroll' specific to existing window
'winfixheight' specific to existing window
'winfixwidth' specific to existing window
Special local buffer options *special-local-buffer-option*
The following local buffer options won't be copied over when new buffers are
created, thus they behave slightly differently:
Option Reason ~
'filetype' explicitly set by autocommands
'syntax' explicitly set by autocommands
'bufhidden' denote |special-buffers|
'buftype' denote |special-buffers|
'readonly' will be detected automatically
'modified' will be detected automatically
*:setl* *:setlocal*
:setl[ocal][!] ... Like ":set" but set only the value local to the
current buffer or window. Not all options have a
@@ -374,7 +400,6 @@ used. Thus it does the same as: >
Note: In the future more global options can be made |global-local|. Using
":setlocal" on a global option might work differently then.
*option-value-function*
Some options ('completefunc', 'imactivatefunc', 'imstatusfunc', 'omnifunc',
'operatorfunc', 'quickfixtextfunc', 'tagfunc' and 'thesaurusfunc') are set to
@@ -1449,7 +1474,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'bufhidden'* *'bh'*
'bufhidden' 'bh' string (default: "")
local to buffer
local to buffer |special-local-buffer-option|
This option specifies what happens when a buffer is no longer
displayed in a window:
<empty> follow the global 'hidden' option
@@ -1481,7 +1506,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'buftype'* *'bt'* *E382*
'buftype' 'bt' string (default: "")
local to buffer
local to buffer |special-local-buffer-option|
The value of this option specifies the type of a buffer:
<empty> normal buffer
nofile buffer which is not related to a file and will not be
@@ -3408,7 +3433,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'filetype'* *'ft'*
'filetype' 'ft' string (default: "")
local to buffer
local to buffer |special-local-buffer-option|
When this option is set, the FileType autocommand event is triggered.
All autocommands that match with the value of this option will be
executed. Thus the value of 'filetype' is used in place of the file
@@ -5565,7 +5590,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'modified'* *'mod'* *'nomodified'* *'nomod'*
'modified' 'mod' boolean (default off)
local to buffer
local to buffer |special-local-buffer-option|
When on, the buffer is considered to be modified. This option is set
when:
1. A change was made to the text since it was last written. Using the
@@ -6136,7 +6161,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'previewwindow'* *'nopreviewwindow'*
*'pvw'* *'nopvw'* *E590*
'previewwindow' 'pvw' boolean (default off)
local to window
local to window |special-local-window-option|
{not available when compiled without the |+quickfix|
feature}
Identifies the preview window. Only one window can have this option
@@ -6331,7 +6356,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'readonly'* *'ro'* *'noreadonly'* *'noro'*
'readonly' 'ro' boolean (default off)
local to buffer
local to buffer |special-local-buffer-option|
If on, writes fail unless you use a '!'. Protects you from
accidentally overwriting a file. Default on when Vim is started
in read-only mode ("vim -R") or when the executable is called "view".
@@ -6710,7 +6735,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'scroll'* *'scr'*
'scroll' 'scr' number (default: half the window height)
local to window
local to window |special-local-window-option|
Number of lines to scroll with CTRL-U and CTRL-D commands. Will be
set to half the number of lines in the window when the window size
changes. This may happen when enabling the |status-line| or
@@ -7972,7 +7997,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'syntax'* *'syn'*
'syntax' 'syn' string (default empty)
local to buffer
local to buffer |special-local-buffer-option|
{not available when compiled without the |+syntax|
feature}
When this option is set, the syntax with this name is loaded, unless
@@ -9420,7 +9445,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'*
'winfixheight' 'wfh' boolean (default off)
local to window
local to window |special-local-window-option|
Keep the window height when windows are opened or closed and
'equalalways' is set. Also for |CTRL-W_=|. Set by default for the
|preview-window| and |quickfix-window|.
@@ -9428,7 +9453,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'*
'winfixwidth' 'wfw' boolean (default off)
local to window
local to window |special-local-window-option|
Keep the window width when windows are opened or closed and
'equalalways' is set. Also for |CTRL-W_=|.
The width may be changed anyway when running out of room.

View File

@@ -3856,7 +3856,8 @@ BeOS os_beos.txt /*BeOS*
Blob eval.txt /*Blob*
Blobs eval.txt /*Blobs*
Boolean eval.txt /*Boolean*
Bram intro.txt /*Bram*
Bram version9.txt /*Bram*
Bram-Moolenaar version9.txt /*Bram-Moolenaar*
BufAdd autocmd.txt /*BufAdd*
BufCreate autocmd.txt /*BufCreate*
BufDelete autocmd.txt /*BufDelete*
@@ -5458,7 +5459,7 @@ Mark motion.txt /*Mark*
MenuPopup autocmd.txt /*MenuPopup*
MiNT os_mint.txt /*MiNT*
ModeChanged autocmd.txt /*ModeChanged*
Moolenaar intro.txt /*Moolenaar*
Moolenaar version9.txt /*Moolenaar*
MorphOS os_amiga.txt /*MorphOS*
Motif gui_x11.txt /*Motif*
Myspell spell.txt /*Myspell*
@@ -9707,6 +9708,8 @@ spec_chglog_format pi_spec.txt /*spec_chglog_format*
spec_chglog_prepend pi_spec.txt /*spec_chglog_prepend*
spec_chglog_release_info pi_spec.txt /*spec_chglog_release_info*
special-buffers windows.txt /*special-buffers*
special-local-buffer-option options.txt /*special-local-buffer-option*
special-local-window-option options.txt /*special-local-window-option*
specifies vim9class.txt /*specifies*
speed-up tips.txt /*speed-up*
spell spell.txt /*spell*

View File

@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 9.0. Last change: 2023 Jun 09
*terminal.txt* For Vim version 9.0. Last change: 2023 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1541,6 +1541,20 @@ If there is no g:termdebug_config you can use: >
let g:termdebug_popup = 0
Change default signs ~
*termdebug_signs*
Termdebug uses the last two characters of the breakpoint ID in the
signcolumn to represent breakpoints. For example, breakpoint ID 133
will be displayed as `33`.
If you want to customize the breakpoint signs: >
let g:termdebug_config['sign'] = '>>'
If there is no g:terminal_config yet you can use: >
let g:termdebug_config = {'sign': '>>'}
After this, breakpoints will be displayed as `>>` in the signcolumn.
Window toolbar ~
*termdebug_winbar*
By default the Termdebug plugin creates a window toolbar if the mouse is

View File

@@ -431,14 +431,26 @@ comma-separated list of extension(s) you find yourself wanting to edit: >
" vim -b : edit binary using xxd-format!
augroup Binary
au!
au BufReadPre *.bin let &bin=1
au BufReadPost *.bin if &bin | %!xxd
au BufReadPost *.bin set ft=xxd | endif
au BufWritePre *.bin if &bin | %!xxd -r
au BufWritePre *.bin endif
au BufWritePost *.bin if &bin | %!xxd
au BufWritePost *.bin set nomod | endif
autocmd!
autocmd BufReadPre *.bin set binary
autocmd BufReadPost *.bin
\ if &binary
\ | execute "silent %!xxd -c 32"
\ | set filetype=xxd
\ | redraw
\ | endif
autocmd BufWritePre *.bin
\ if &binary
\ | let s:view = winsaveview()
\ | execute "silent %!xxd -r -c 32"
\ | endif
autocmd BufWritePost *.bin
\ if &binary
\ | execute "silent %!xxd -c 32"
\ | set nomodified
\ | call winrestview(s:view)
\ | redraw
\ | endif
augroup END
==============================================================================

View File

@@ -5535,7 +5535,6 @@ Undo:
- Undo history wrong when ":next file" re-uses a buffer. (#5426) ex_next()
should pass flag to do_argfile(), then to do_ecmd(). Is there a test for
this?
- Add buffer argument to undotree(). (#4001)
- Undo problem: "g-" doesn't go back, gets stuck. (Björn Linse, 2016 Jul 18)
- Undo message is not always properly displayed. Patch by Ken Takata, 2013
oct 3. Doesn't work properly according to Yukihiro Nakadaira.

View File

@@ -46,8 +46,8 @@ II) It is allowed to distribute a modified (or extended) version of Vim,
maintainer will do with your changes and under what license they
will be distributed is negotiable. If there has been no negotiation
then this license, or a later version, also applies to your changes.
The current maintainer is Bram Moolenaar <Bram@vim.org>. If this
changes it will be announced in appropriate places (most likely
The current maintainers are listed here: https://github.com/orgs/vim/people.
If this changes it will be announced in appropriate places (most likely
vim.sf.net, www.vim.org and/or comp.editors). When it is completely
impossible to contact the maintainer, the obligation to send him
your changes ceases. Once the maintainer has confirmed that he has

View File

@@ -111,9 +111,19 @@ 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 closes the undo block. Even when the
new value is equal to the old value. In |Vim9| script: >
&undolevels = &undolevels
new value is equal to the old value. Use `g:undolevels` to explicitly read
and write only the global value of 'undolevels'. In |Vim9| script: >
&g:undolevels = &g:undolevels
In legacy script: >
let &g:undolevels = &g:undolevels
Note that the similar-looking assignment `let &undolevels=&undolevels` does not
preserve the global option value of 'undolevels' in the event that the local
option has been set to a different value. For example: >
" Start with different global and local values for 'undolevels'.
let &g:undolevels = 1000
let &l:undolevels = 2000
" This assignment changes the global option to 2000:
let &undolevels = &undolevels
==============================================================================
@@ -366,12 +376,20 @@ undo is possible. Use this if you are running out of memory.
When you set 'undolevels' to -1 the undo information is not immediately
cleared, this happens at the next change. To force clearing the undo
information you can use these commands: >
:let old_undolevels = &undolevels
:set undolevels=-1
:let old_undolevels = &l:undolevels
:setlocal undolevels=-1
:exe "normal a \<BS>\<Esc>"
:let &undolevels = old_undolevels
:let &l:undolevels = old_undolevels
:unlet old_undolevels
Note use of `&l:undolevels` to explicitly read the local value of 'undolevels'
and the use of `:setlocal` to change only the local option (which takes
precedence over the corresponding global option value). Saving the option value
via the use of `&undolevels` is unpredictable; it reads either the local value
(if one has been set) or the global value (otherwise). Also, if a local value
has been set, changing the option via `:set undolevels` will change both the
global and local values, requiring extra work to save and restore both values.
Marks for the buffer ('a to 'z) are also saved and restored, together with the
text.

View File

@@ -308,17 +308,27 @@ This switches on three very clever mechanisms:
*restore-cursor* *last-position-jump* >
autocmd BufReadPost *
\ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit'
\ | exe "normal! g`\""
\ | endif
augroup RestoreCursor
autocmd!
autocmd BufReadPost *
\ let line = line("'\"")
\ | if line >= 1 && line <= line("$") && &filetype !~# 'commit'
\ && index(['xxd', 'gitrebase'], &filetype) == -1
\ | execute "normal! g`\""
\ | endif
augroup END
Another autocommand. This time it is used after reading any file. The
complicated stuff after it checks if the '" mark is defined, and jumps to it
if so. The backslash at the start of a line is used to continue the command
from the previous line. That avoids a line getting very long.
See |line-continuation|. This only works in a Vim script file, not when
typing commands at the command-line.
if so. It doesn't do that for a commit or rebase message, which are likely
a different one than last time, and when using xxd(1) to filter and edit
binary files, which transforms input files back and forth, causing them to
have dual nature, so to speak. See also |using-xxd|.
The backslash at the start of a line is used to continue the command from the
previous line. That avoids a line getting very long. See |line-continuation|.
This only works in a Vim script file, not when typing commands at the
command line.
>
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis

View File

@@ -1232,6 +1232,7 @@ Inter-process communication: *channel-functions*
json_decode() decode a JSON string to Vim types
js_encode() encode an expression to a JSON string
js_decode() decode a JSON string to Vim types
err_teapot() give error 418 or 503
Jobs: *job-functions*
job_start() start a job
@@ -1372,7 +1373,7 @@ Various: *various-functions*
libcallnr() idem, returning a number
undofile() get the name of the undo file
undotree() return the state of the undo tree
undotree() return the state of the undo tree for a buffer
shiftwidth() effective value of 'shiftwidth'

View File

@@ -4627,7 +4627,7 @@ using an #ifdef. (Sergey Khorev)
Mzscheme interface didn't link, missing function. Changed order of libraries
in the configure script.
Ruby interface didn't compile on Mac. Changed #ifdef. (Kevin Ballard)
Ruby interface didn't compile on Mac. Changed #ifdef. (Lily Ballard)
Patch 7.1b.001 (extra)
Problem: Random text in a source file. No idea how it got there.

View File

@@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.0. Last change: 2022 Nov 23
*version9.txt* For Vim version 9.0. Last change: 2023 Aug 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -43,6 +43,17 @@ when the release was being prepared. Sven was a long time supporter of Vim.
He registered the vim.org domain and created the first Vim website. We will
remember him!
*Bram* *Moolenaar* *Bram-Moolenaar*
Vim version 9.1 is dedicated to Bram Moolenaar, who passed away on August 3rd 2023
while still working full-time on Vim. The Vim project would not exist without
his ongoing passion to lead and develop Vim and the community for more than 30
years. Bram was also passionate about his |ICCF| foundation to help children
in Uganda. If you enjoy using Vim, please consider donating!
We will miss his guidance, passion and leadership.
Obituary Articles: https://github.com/vim/vim/discussions/12742
Say Farewell: https://github.com/vim/vim/discussions/12737
==============================================================================
NEW FEATURES *new-9*

View File

@@ -6,7 +6,7 @@
.\" Changes by Bram Moolenaar <Bram@vim.org>
.SH NAME
.I xxd
\- make a hexdump or do the reverse.
\- make a hex dump or do the reverse.
.SH SYNOPSIS
.B xxd
\-h[elp]
@@ -57,20 +57,20 @@ are all equivalent.
.PP
.TP
.IR \-a " | " \-autoskip
Toggle autoskip: A single '*' replaces nul-lines. Default off.
Toggle autoskip: A single '*' replaces NUL-lines. Default off.
.TP
.IR \-b " | " \-bits
Switch to bits (binary digits) dump, rather than hexdump.
Switch to bits (binary digits) dump, rather than hex dump.
This option writes octets as eight digits "1"s and "0"s instead of a normal
hexadecimal dump. Each line is preceded by a line number in hexadecimal and
followed by an ascii (or ebcdic) representation. The command line switches
followed by an ASCII (or EBCDIC) representation. The command line switches
\-r, \-p, \-i do not work with this mode.
.TP
.IR "\-c cols " | " \-cols cols"
Format
.RI < cols >
octets per line. Default 16 (\-i: 12, \-ps: 30, \-b: 6). Max 256.
No maxmimum for \-ps. With \-ps, 0 results in one long line of output.
No maximum for \-ps. With \-ps, 0 results in one long line of output.
.TP
.IR \-C " | " \-capitalize
Capitalize variable names in C include file style, when using \-i.
@@ -81,11 +81,11 @@ This does not change the hexadecimal representation. The option is
meaningless in combinations with \-r, \-p or \-i.
.TP
.IR \-e
Switch to little-endian hexdump.
Switch to little-endian hex dump.
This option treats byte groups as words in little-endian byte order.
The default grouping of 4 bytes may be changed using
.RI "" \-g .
This option only applies to hexdump, leaving the ASCII (or EBCDIC)
This option only applies to the hex dump, leaving the ASCII (or EBCDIC)
representation unchanged.
The command line switches
\-r, \-p, \-i do not work with this mode.
@@ -93,13 +93,13 @@ The command line switches
.IR "\-g bytes " | " \-groupsize bytes"
Separate the output of every
.RI < bytes >
bytes (two hex characters or eight bit-digits each) by a whitespace.
bytes (two hex characters or eight bit digits each) by a whitespace.
Specify
.I \-g 0
to suppress grouping.
.RI < Bytes "> defaults to " 2
in normal mode, \fI4\fP in little-endian mode and \fI1\fP in bits mode.
Grouping does not apply to postscript or include style.
Grouping does not apply to PostScript or include style.
.TP
.IR \-h " | " \-help
Print a summary of available commands and exit. No hex dumping is performed.
@@ -123,16 +123,16 @@ Add
to the displayed file position.
.TP
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
Output in postscript continuous hexdump style. Also known as plain hexdump
Output in PostScript continuous hex dump style. Also known as plain hex dump
style.
.TP
.IR \-r " | " \-revert
Reverse operation: convert (or patch) hexdump into binary.
Reverse operation: convert (or patch) hex dump into binary.
If not writing to stdout, xxd writes into its output file without truncating
it. Use the combination
.I \-r \-p
to read plain hexadecimal dumps without line number information and without a
particular column layout. Additional Whitespace and line-breaks are allowed
particular column layout. Additional whitespace and line breaks are allowed
anywhere.
.TP
.I \-seek offset
@@ -140,7 +140,7 @@ When used after
.IR \-r :
revert with
.RI < offset >
added to file positions found in hexdump.
added to file positions found in hex dump.
.TP
.I \-s [+][\-]seek
Start at
@@ -153,28 +153,28 @@ should be that many characters from the end of the input (or if combined with
Without \-s option, xxd starts at the current file position.
.TP
.I \-u
Use upper case hex letters. Default is lower case.
Use upper-case hex letters. Default is lower-case.
.TP
.IR \-v " | " \-version
Show version string.
.SH CAVEATS
.PP
.I xxd \-r
has some builtin magic while evaluating line number information.
If the output file is seekable, then the linenumbers at the start of each
hexdump line may be out of order, lines may be missing, or overlapping. In
has some built-in magic while evaluating line number information.
If the output file is seekable, then the line numbers at the start of each
hex dump line may be out of order, lines may be missing, or overlapping. In
these cases xxd will lseek(2) to the next position. If the output file is not
seekable, only gaps are allowed, which will be filled by null-bytes.
.PP
.I xxd \-r
never generates parse errors. Garbage is silently skipped.
.PP
When editing hexdumps, please note that
When editing hex dumps, please note that
.I xxd \-r
skips everything on the input line after reading enough columns of hexadecimal
data (see option \-c). This also means, that changes to the printable ascii (or
ebcdic) columns are always ignored. Reverting a plain (or postscript) style
hexdump with xxd \-r \-p does not depend on the correct number of columns. Here anything that looks like a pair of hex-digits is interpreted.
data (see option \-c). This also means that changes to the printable ASCII (or
EBCDIC) columns are always ignored. Reverting a plain (or PostScript) style
hex dump with xxd \-r \-p does not depend on the correct number of columns. Here, anything that looks like a pair of hex digits is interpreted.
.PP
Note the difference between
.br
@@ -190,20 +190,20 @@ may be different from
as lseek(2) is used to "rewind" input. A '+'
makes a difference if the input source is stdin, and if stdin's file position
is not at the start of the file by the time xxd is started and given its input.
The following examples may help to clarify (or further confuse!)...
The following examples may help to clarify (or further confuse!):
.PP
Rewind stdin before reading; needed because the `cat' has already read to the
end of stdin.
.br
\fI% sh \-c "cat > plain_copy; xxd \-s 0 > hex_copy" < file\fR
.PP
Hexdump from file position 0x480 (=1024+128) onwards.
Hex dump from file position 0x480 (=1024+128) onwards.
The `+' sign means "relative to the current position", thus the `128' adds to
the 1k where dd left off.
.br
\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet" < file\fR
.PP
Hexdump from file position 0x100 ( = 1024\-768) on.
Hex dump from file position 0x100 (=1024\-768) onwards.
.br
\fI% sh \-c "dd of=plain_snippet bs=1k count=1; xxd \-s +\-768 > hex_snippet" < file\fR
.PP
@@ -224,7 +224,7 @@ Print 3 lines (hex 0x30 bytes) from the end of
\fI% xxd \-s \-0x30 file\fR
.PP
.br
Print 120 bytes as continuous hexdump with 20 octets per line.
Print 120 bytes as a continuous hex dump with 20 octets per line.
.br
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
.br
@@ -242,7 +242,7 @@ Print 120 bytes as continuous hexdump with 20 octets per line.
.br
.br
Hexdump the first 120 bytes of this man page with 12 octets per line.
Hex dump the first 120 bytes of this man page with 12 octets per line.
.br
\fI% xxd \-l 120 \-c 12 xxd.1\fR
.br
@@ -299,7 +299,7 @@ except for the last one which is 'A' (hex 0x41).
\fI% echo "010000: 41" | xxd \-r > file\fR
.PP
.br
Hexdump this file with autoskip.
Hex dump this file with autoskip.
.br
\fI% xxd \-a \-c 12 file\fR
.br
@@ -310,26 +310,26 @@ Hexdump this file with autoskip.
000fffc: 0000 0000 40 ....A
.PP
Create a 1 byte file containing a single 'A' character.
The number after '\-r \-s' adds to the linenumbers found in the file;
The number after '\-r \-s' adds to the line numbers found in the file;
in effect, the leading bytes are suppressed.
.br
\fI% echo "010000: 41" | xxd \-r \-s \-0x10000 > file\fR
.PP
Use xxd as a filter within an editor such as
.B vim(1)
to hexdump a region marked between `a' and `z'.
to hex dump a region marked between `a' and `z'.
.br
\fI:'a,'z!xxd\fR
.PP
Use xxd as a filter within an editor such as
.B vim(1)
to recover a binary hexdump marked between `a' and `z'.
to recover a binary hex dump marked between `a' and `z'.
.br
\fI:'a,'z!xxd \-r\fR
.PP
Use xxd as a filter within an editor such as
.B vim(1)
to recover one line of a hexdump. Move the cursor over the line and type:
to recover one line of a hex dump. Move the cursor over the line and type:
.br
\fI!!xxd \-r\fR
.PP
@@ -348,8 +348,9 @@ The following error values are returned:
no errors encountered.
.TP
\-1
operation not supported (
.I xxd \-r \-i
operation not supported
\%(\c
.I \%xxd \-r \-i
still impossible).
.TP
1
@@ -367,7 +368,7 @@ desired seek position is unreachable.
uuencode(1), uudecode(1), patch(1)
.br
.SH WARNINGS
The tools weirdness matches its creators brain.
The tool's weirdness matches its creator's brain.
Use entirely at your own risk. Copy files. Trace it. Become a wizard.
.br
.SH VERSION

View File

@@ -1,6 +1,7 @@
" Vim script for Evim key bindings
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 May 10
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Don't use Vi-compatible mode.
set nocompatible

View File

@@ -1,7 +1,8 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2023 Jun 09
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -254,6 +255,9 @@ au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named
au BufNewFile,BufRead named.root setf bindzone
au BufNewFile,BufRead *.db call dist#ft#BindzoneCheck('')
" Blade
au BufNewFile,BufRead *.blade.php setf blade
" Blank
au BufNewFile,BufRead *.bl setf blank
@@ -891,6 +895,7 @@ if exists('$XDG_CONFIG_HOME')
endif
au BufNewFile,BufRead $HOME/.config/cabal/config setf cabalconfig
au BufNewFile,BufRead cabal.config setf cabalconfig
au BufNewFile,BufRead *.persistentmodels setf haskellpersistent
" Haste
au BufNewFile,BufRead *.ht setf haste
@@ -945,6 +950,9 @@ au BufNewFile,BufRead */etc/host.conf setf hostconf
" Hosts access
au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess
" Hurl
au BufRead,BufNewFile *.hurl setf hurl
" Hyper Builder
au BufNewFile,BufRead *.hb setf hb
@@ -1057,6 +1065,9 @@ au BufNewFile,BufRead *.json5 setf json5
" JSON Patch (RFC 6902)
au BufNewFile,BufRead *.json-patch setf json
" Geojson is also json
au BufNewFile,BufRead *.geojson setf json
" Jupyter Notebook is also json
au BufNewFile,BufRead *.ipynb setf json
@@ -1511,6 +1522,9 @@ au BufNewFile,BufRead *.pdf setf pdf
" PCMK - HAE - crm configure edit
au BufNewFile,BufRead *.pcmk setf pcmk
" PEM (Privacy-Enhanced Mail)
au BufNewFile,BufRead *.pem,*.cer,*.crt,*.csr setf pem
" Perl
if has("fname_case")
au BufNewFile,BufRead *.pl,*.PL call dist#ft#FTpl()
@@ -1555,6 +1569,10 @@ au BufNewFile,BufRead *.rcp setf pilrc
" Pine config
au BufNewFile,BufRead .pinerc,pinerc,.pinercex,pinercex setf pine
" Pip requirements
au BufNewFile,BufRead *.pip setf requirements
au BufNewFile,BufRead requirements.txt setf requirements
" Pipenv Pipfiles
au BufNewFile,BufRead Pipfile setf toml
au BufNewFile,BufRead Pipfile.lock setf json
@@ -1673,6 +1691,9 @@ au BufNewFile,BufRead *.pk setf poke
" Protocols
au BufNewFile,BufRead */etc/protocols setf protocols
" PyPA manifest files
au BufNewFile,BufRead MANIFEST.in setf pymanifest
" Pyret
au BufNewFile,BufRead *.arr setf pyret
@@ -2311,6 +2332,9 @@ au BufNewFile,BufRead */.config/upstart/*.override setf upstart
" URL shortcut
au BufNewFile,BufRead *.url setf urlshortcut
" V
au BufNewFile,BufRead *.vsh,*.vv setf v
" Vala
au BufNewFile,BufRead *.vala setf vala
@@ -2393,6 +2417,9 @@ au BufNewFile,BufRead .wgetrc,wgetrc setf wget
" Wget2 config
au BufNewFile,BufRead .wget2rc,wget2rc setf wget2
" WebGPU Shading Language (WGSL)
au BufNewFile,BufRead *.wgsl setf wgsl
" Website MetaLanguage
au BufNewFile,BufRead *.wml setf wml
@@ -2481,6 +2508,9 @@ au BufNewFile,BufRead *.fsproj,*.fsproj.user setf xml
" VBPROJ files are Visual Studio.NET's XML-based Visual Basic project config files
au BufNewFile,BufRead *.vbproj,*.vbproj.user setf xml
" Unison Language
au BufNewFile,BufRead *.u,*.uu setf unison
" Qt Linguist translation source and Qt User Interface Files are XML
" However, for .ts TypeScript is more common.
au BufNewFile,BufRead *.ui setf xml
@@ -2526,7 +2556,7 @@ au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc
au BufNewFile,BufRead *.y call dist#ft#FTy()
" Yaml
au BufNewFile,BufRead *.yaml,*.yml setf yaml
au BufNewFile,BufRead *.yaml,*.yml,*.eyaml setf yaml
" Raml
au BufNewFile,BufRead *.raml setf raml

View File

@@ -1,7 +1,8 @@
" Vim support file to switch off detection of file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2001 Jun 11
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
if exists("did_load_filetypes")
unlet did_load_filetypes

View File

@@ -2,8 +2,9 @@ vim9script noclear
# Vim support file to switch on loading plugins for file types
#
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last change: 2022 Feb 11
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last change: 2023 Aug 10
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
if exists("g:did_load_ftplugin")
finish

View File

@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: Aap recipe
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Nov 14
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")

View File

@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: BTM
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2004 Jul 06
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")

View File

@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Apr 08
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")

View File

@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: C++
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 Jul 26
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")

View File

@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: Diff
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Nov 14
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")

View File

@@ -14,3 +14,14 @@ setlocal comments=:<%!--
setlocal commentstring=<%!--\ %s\ --%>
let b:undo_ftplugin = 'set sw< sts< et< com< cms<'
" 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:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
endif

View File

@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: Mail
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Oct 23
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")

View File

@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: Make
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 Oct 16
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")

17
runtime/ftplugin/nix.vim Normal file
View File

@@ -0,0 +1,17 @@
" Vim filetype plugin
" Language: nix
" Maintainer: Keith Smiley <keithbsmiley@gmail.com>
" Last Change: 2023 Jul 22
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
" Don't load another plugin for this buffer
let b:did_ftplugin = 1
let b:undo_ftplugin = "setl commentstring< comments<"
setlocal comments=:#
setlocal commentstring=#\ %s

View File

@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: Objective C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2003 Jan 15
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")

View File

@@ -0,0 +1,13 @@
" Vim filetype plugin
" Language: PyPA manifest
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
" Last Change: 2023 Aug 08
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setl comments=:# commentstring=#\ %s
let b:undo_ftplugin = 'setl com< cms<'

View File

@@ -1,7 +1,7 @@
" Language: Rust
" Description: Vim ftplugin for Rust
" Maintainer: Chris Morgan <me@chrismorgan.info>
" Maintainer: Kevin Ballard <kevin@sb.org>
" Maintainer: Lily Ballard <lily@ballards.net>
" Last Change: June 08, 2016
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim

29
runtime/ftplugin/sed.vim Normal file
View File

@@ -0,0 +1,29 @@
" Vim filetype plugin file
" Language: sed
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2020 Apr 1
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=:#
setlocal commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl com< cms< fo<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "sed Script Files (*.sed)\t*.sed\n" ..
\ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8

View File

@@ -2,7 +2,7 @@
" Language: TOML
" Homepage: https://github.com/cespare/vim-toml
" Maintainer: Aman Verma
" Author: Kevin Ballard <kevin@sb.org>
" Author: Lily Ballard <lily@ballards.net>
" Last Change: Sep 21, 2021
if exists('b:did_ftplugin')

View File

@@ -0,0 +1,14 @@
" Vim filetype plugin file
" Language: unison
" Maintainer: Anton Parkhomenko <anton@chuwy.me>
" Latest Revision: 2023-08-07
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = "setl cms< isk<"
setlocal commentstring=--\ %s
setlocal iskeyword+=!,'

View File

@@ -1,7 +1,8 @@
" Vim filetype plugin
" Language: Vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2023 Feb 07
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")

View File

@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: Zimbu
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Sep 07
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")

View File

@@ -2,8 +2,9 @@ vim9script
# Vim support file to switch off loading plugins for file types
#
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last Change: 2022 Feb 09
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Aug 10
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
if exists("g:did_load_ftplugin")
unlet g:did_load_ftplugin

View File

@@ -2,8 +2,9 @@
" The commands in this are executed when the GUI is started, after the vimrc
" has been executed.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2016 Apr 05
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
"
" To use it, copy it to
" for Unix: ~/.gvimrc

View File

@@ -1,7 +1,8 @@
" Vim support file to switch on loading indent files for file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Feb 11
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
if exists("did_indent_on")
finish

View File

@@ -6,15 +6,16 @@ at ":help indent-expression". Looking at the existing files should give you
inspiration.
If you make a new indent file which would be useful for others, please send it
to Bram@vim.org. Include instructions for detecting the file type for this
language, by file name extension or by checking a few lines in the file.
And please stick to the rules below.
to the vim-dev mailing list <vim-dev@vim.org>. Include instructions for
detecting the file type for this language, by file name extension or by
checking a few lines in the file. And please stick to the rules below.
If you have remarks about an existing file, send them to the maintainer of
that file. Only when you get no response send a message to Bram@vim.org.
that file. Only when you get no response send a message to the vim-dev
mailing list: <vim-dev@vim.org>.
If you are the maintainer of an indent file and make improvements, e-mail the
new version to Bram@vim.org.
new version to the vim-dev mailing list: <vim-dev@vim.org>.
Rules for making an indent file:

View File

@@ -1,7 +1,8 @@
" Vim indent file
" Language: Aap recipe
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Jun 24
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only load this indent file when no other was loaded.
if exists("b:did_indent")

View File

@@ -1,7 +1,8 @@
" Vim indent file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Mar 27
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only load this indent file when no other was loaded.
if exists("b:did_indent")

View File

@@ -1,7 +1,8 @@
" Vim indent file
" Language: C++
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2008 Nov 29
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only load this indent file when no other was loaded.
if exists("b:did_indent")

View File

@@ -1,7 +1,8 @@
" Vim indent file
" Language: CUDA
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2008 Nov 29
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only load this indent file when no other was loaded.
if exists("b:did_indent")

View File

@@ -1,8 +1,9 @@
" Vim indent file
" Language: Python
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Language: Python
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Original Author: David Bustos <bustos@caltech.edu>
" Last Change: 2021 Sep 26
" Only load this indent file when no other was loaded.
if exists("b:did_indent")

255
runtime/indent/rapid.vim Normal file
View File

@@ -0,0 +1,255 @@
" ABB Rapid Command indent file for Vim
" Language: ABB Rapid Command
" Maintainer: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
" Version: 2.2.7
" Last Change: 12. May 2023
" Credits: Based on indent/vim.vim
"
" Suggestions of improvement are very welcome. Please email me!
"
" Known bugs: ../doc/rapid.txt
"
" TODO
" * indent wrapped lines which do not end with an ; or special key word,
" maybe this is a better idea, but then () and [] has to be changed as
" well
"
if exists("g:rapidNoSpaceIndent")
if !exists("g:rapidSpaceIndent")
let g:rapidSpaceIndent = !g:rapidNoSpaceIndent
endif
unlet g:rapidNoSpaceIndent
endif
" Only load this indent file when no other was loaded.
if exists("b:did_indent") || get(g:,'rapidNoIndent',0)
finish
endif
let b:did_indent = 1
setlocal nolisp
setlocal nosmartindent
setlocal autoindent
setlocal indentexpr=GetRapidIndent()
if get(g:,'rapidNewStyleIndent',0)
setlocal indentkeys=!^F,o,O,0=~endmodule,0=~error,0=~undo,0=~backward,0=~endproc,0=~endrecord,0=~endtrap,0=~endfunc,0=~else,0=~endif,0=~endtest,0=~endfor,0=~endwhile,:,<[>,<]>,<(>,<)>
else
setlocal indentkeys=!^F,o,O,0=~endmodule,0=~error,0=~undo,0=~backward,0=~endproc,0=~endrecord,0=~endtrap,0=~endfunc,0=~else,0=~endif,0=~endtest,0=~endfor,0=~endwhile,:
endif
let b:undo_indent="setlocal lisp< si< ai< inde< indk<"
if get(g:,'rapidSpaceIndent',1)
" Use spaces for indention, 2 is enough.
" More or even tabs wastes space on the teach pendant.
setlocal softtabstop=2
setlocal shiftwidth=2
setlocal expandtab
setlocal shiftround
let b:undo_indent = b:undo_indent." sts< sw< et< sr<"
endif
" Only define the function once.
if exists("*GetRapidIndent")
finish
endif
let s:keepcpo= &cpo
set cpo&vim
function GetRapidIndent()
let ignorecase_save = &ignorecase
try
let &ignorecase = 0
return s:GetRapidIndentIntern()
finally
let &ignorecase = ignorecase_save
endtry
endfunction
function s:GetRapidIndentIntern() abort
let l:currentLineNum = v:lnum
let l:currentLine = getline(l:currentLineNum)
if l:currentLine =~ '^!' && !get(g:,'rapidCommentIndent',0)
" If current line is ! line comment, do not change indent
" This may be usefull if code is commented out at the first column.
return 0
endif
" Find a non-blank line above the current line.
let l:preNoneBlankLineNum = s:RapidPreNoneBlank(v:lnum - 1)
if l:preNoneBlankLineNum == 0
" At the start of the file use zero indent.
return 0
endif
let l:preNoneBlankLine = getline(l:preNoneBlankLineNum)
let l:ind = indent(l:preNoneBlankLineNum)
" Define add a 'shiftwidth' pattern
let l:addShiftwidthPattern = '\c\v^\s*('
let l:addShiftwidthPattern .= '((local|task)\s+)?(module|record|proc|func|trap)\s+\k'
let l:addShiftwidthPattern .= '|(backward|error|undo)>'
let l:addShiftwidthPattern .= ')'
"
" Define Subtract 'shiftwidth' pattern
let l:subtractShiftwidthPattern = '\c\v^\s*('
let l:subtractShiftwidthPattern .= 'end(module|record|proc|func|trap)>'
let l:subtractShiftwidthPattern .= '|(backward|error|undo)>'
let l:subtractShiftwidthPattern .= ')'
" Add shiftwidth
if l:preNoneBlankLine =~ l:addShiftwidthPattern
\|| s:RapidLenTilStr(l:preNoneBlankLineNum, "then", 0)>=0
\|| s:RapidLenTilStr(l:preNoneBlankLineNum, "else", 0)>=0
\|| s:RapidLenTilStr(l:preNoneBlankLineNum, "do", 0)>=0
\|| s:RapidLenTilStr(l:preNoneBlankLineNum, "case", 0)>=0
\|| s:RapidLenTilStr(l:preNoneBlankLineNum, "default", 0)>=0
let l:ind += &sw
endif
" Subtract shiftwidth
if l:currentLine =~ l:subtractShiftwidthPattern
\|| s:RapidLenTilStr(l:currentLineNum, "endif", 0)>=0
\|| s:RapidLenTilStr(l:currentLineNum, "endfor", 0)>=0
\|| s:RapidLenTilStr(l:currentLineNum, "endwhile", 0)>=0
\|| s:RapidLenTilStr(l:currentLineNum, "endtest", 0)>=0
\|| s:RapidLenTilStr(l:currentLineNum, "else", 0)>=0
\|| s:RapidLenTilStr(l:currentLineNum, "elseif", 0)>=0
\|| s:RapidLenTilStr(l:currentLineNum, "case", 0)>=0
\|| s:RapidLenTilStr(l:currentLineNum, "default", 0)>=0
let l:ind = l:ind - &sw
endif
" First case (or default) after a test gets the indent of the test.
if (s:RapidLenTilStr(l:currentLineNum, "case", 0)>=0 || s:RapidLenTilStr(l:currentLineNum, "default", 0)>=0) && s:RapidLenTilStr(l:preNoneBlankLineNum, "test", 0)>=0
let l:ind += &sw
endif
" continued lines with () or []
let l:OpenSum = s:RapidLoneParen(l:preNoneBlankLineNum,"(") + s:RapidLoneParen(l:preNoneBlankLineNum,"[")
if get(g:,'rapidNewStyleIndent',0)
let l:CloseSum = s:RapidLoneParen(l:preNoneBlankLineNum,")") + s:RapidLoneParen(l:currentLineNum,"]")
else
let l:CloseSum = s:RapidLoneParen(l:preNoneBlankLineNum,")") + s:RapidLoneParen(l:preNoneBlankLineNum,"]")
endif
if l:OpenSum > l:CloseSum
let l:ind += (l:OpenSum * 4 * &sw)
elseif l:OpenSum < l:CloseSum
let l:ind -= (l:CloseSum * 4 * &sw)
endif
return l:ind
endfunction
" Returns the length of the line until a:str occur outside a string or
" comment. Search starts at string index a:startIdx.
" If a:str is a word also add word bounderies and case insesitivity.
" Note: rapidTodoComment and rapidDebugComment are not taken into account.
function s:RapidLenTilStr(lnum, str, startIdx) abort
let l:line = getline(a:lnum)
let l:len = strlen(l:line)
let l:idx = a:startIdx
let l:str = a:str
if l:str =~ '^\k\+$'
let l:str = '\c\<' . l:str . '\>'
endif
while l:len > l:idx
let l:idx = match(l:line, l:str, l:idx)
if l:idx < 0
" a:str not found
return -1
endif
let l:synName = synIDattr(synID(a:lnum,l:idx+1,0),"name")
if l:synName != "rapidString"
\&& l:synName != "rapidConcealableString"
\&& (l:synName != "rapidComment" || l:str =~ '^!')
" a:str found outside string or line comment
return l:idx
endif
" a:str is part of string or line comment
let l:idx += 1 " continue search for a:str
endwhile
" a:str not found or l:len <= a:startIdx
return -1
endfunction
" a:lchar shoud be one of (, ), [, ], { or }
" returns the number of opening/closing parenthesise which have no
" closing/opening match in getline(a:lnum)
function s:RapidLoneParen(lnum,lchar) abort
if a:lchar == "(" || a:lchar == ")"
let l:opnParChar = "("
let l:clsParChar = ")"
elseif a:lchar == "[" || a:lchar == "]"
let l:opnParChar = "["
let l:clsParChar = "]"
elseif a:lchar == "{" || a:lchar == "}"
let l:opnParChar = "{"
let l:clsParChar = "}"
else
return 0
endif
let l:line = getline(a:lnum)
" look for the first ! which is not part of a string
let l:len = s:RapidLenTilStr(a:lnum,"!",0)
if l:len == 0
return 0 " first char is !; ignored
endif
let l:opnParen = 0
" count opening brakets
let l:i = 0
while l:i >= 0
let l:i = s:RapidLenTilStr(a:lnum, l:opnParChar, l:i)
if l:i >= 0
let l:opnParen += 1
let l:i += 1
endif
endwhile
let l:clsParen = 0
" count closing brakets
let l:i = 0
while l:i >= 0
let l:i = s:RapidLenTilStr(a:lnum, l:clsParChar, l:i)
if l:i >= 0
let l:clsParen += 1
let l:i += 1
endif
endwhile
if (a:lchar == "(" || a:lchar == "[" || a:lchar == "{") && l:opnParen>l:clsParen
return (l:opnParen-l:clsParen)
elseif (a:lchar == ")" || a:lchar == "]" || a:lchar == "}") && l:clsParen>l:opnParen
return (l:clsParen-l:opnParen)
endif
return 0
endfunction
" This function works almost like prevnonblank() but handles %%%-headers and
" comments like blank lines
function s:RapidPreNoneBlank(lnum) abort
let nPreNoneBlank = prevnonblank(a:lnum)
while nPreNoneBlank>0 && getline(nPreNoneBlank) =~ '\v\c^\s*(\%\%\%|!)'
" Previouse none blank line irrelevant. Look further aback.
let nPreNoneBlank = prevnonblank(nPreNoneBlank - 1)
endwhile
return nPreNoneBlank
endfunction
let &cpo = s:keepcpo
unlet s:keepcpo
" vim:sw=2 sts=2 et

View File

@@ -0,0 +1,266 @@
! vim: set ft=rapid :
! START_INDENT
%%%
VERSION:1
LANGUAGE:ENGLISH
%%%
module LowerCaseModule
task pers num n1 := 0;
local pers num n2 := 1;
var bool b1 := false;
var intnum i1;
! put some stuff in those strings that may confuse indentation
const string st1 := "endmodule (";
pers string st_Appl_Info{3,3}:=[
[
"["
,
"default"
,
"case"
],
[
"else"
,
"then"
,
"endif"
],
[
"do"
,
"}"
,
")"
],
];
pers tooldata tTool1:=[TRUE,
[
[97.4, 0, 223.1],
[0.924, 0, 0.383 ,0]
],
[5,
[23, 0, 75],
[1, 0, 0, 0], 0, 0, 0
]
];
const robtarget p1:=[
[600, 500, 225.3],
[1, 0, 0, 0],
[1, 1, 0, 0],
[ 11, 12.3, 9E9, 9E9, 9E9, 9E9]
];
record myRec
num nRecNum1
bool bRecBool1
endrecord
proc proc1(num n1,
num n2)
var string st1;
n1 := n1+1;
MoveJSync p1, vmax, z30, tool1, "proc2";
backward
MoveJSync p1, v100, fine, tool1, "proc2";
undo
n1 := n1-1;
error
trynext;
endproc
func num nFunc1(
switch s1
|switch s2
,num n1
,bool b1)
var num nVar;
if not Present(s1) return;
if Present(s1) then
Incr n1;'
elseif Present(s2) then
b1:=false;
else
while n1>0 do
Decr n1;
test n1
case 1:
test1;
case 2:
test2;
default:
WaitUntil false;
endtest
endwhile
endif
for i from 1 to 10 step 2 do
for j from 1 to 10 do
st_Appl_Info{i,j} := "";
endfor
endfor
! return 1;
return 0;
error
return -1;
endfunc
trap Trap1
Reset do1;
endtrap
endmodule
MODULE UpperCaseModule(SYSMODULE,NOSTEPIN)
TASK pers num n1 := 0;
LOCAL pers num n2 := 1;
VAR bool b1 := false;
VAR intnum i1;
LOCAL FUNC num nFunc1(
switch s1
|switch s2
,num n1
,bool b1)
VAR num nVar;
IF NOT PRESENT(s1) RETURN;
IF PRESENT(s1) THEN
INCR n1;'
ELSEIF PRESENT(s2) THEN
b1:=FALSE;
ELSE
WHILE n1>0 DO
DECR n1;
TEST n1
CASE 1:
test1;
CASE 2:
test2;
DEFAULT:
WAITUNTIL FALSE;
ENDTEST
ENDWHILE
ENDIF
FOR i FROM 1 TO 10 STEP 2 DO
FOR j FROM 1 TO 10 DO
st_Appl_Info{i,j} := "";
ENDFOR
ENDFOR
! RETURN 1;
RETURN 0;
ERROR
RETURN -1;
ENDFUNC
TRAP Trap1
Reset do1;
ENDTRAP
ENDMODULE
Module MixedCaseModule(SysModule)
Task pers num n1 := 0;
Local pers num n2 := 1;
Var bool b1 := false;
Var intnum i1;
Task Func num nFunc1(
switch s1
|switch s2
,num n1
,bool b1)
Var num nVar;
If Not Present(s1) Return;
If Present(s1) Then
Incr n1;'
ElseIf Present(s2) Then
b1:=false;
Else
While n1>0 Do
Decr n1;
Test n1
Case 1:
test1;
Case 2:
test2;
Default:
WaitUntil false;
EndTest
EndWhile
EndIf
For i From 1 To 10 Step 2 Do
For j From 1 To 10 Do
st_Appl_Info{i,j} := "";
EndFor
EndFor
! Return 1;
Return 0;
Error
Return -1;
EndFunc
Trap Trap1
Reset do1;
EndTrap
EndModule
! END_INDENT
! START_INDENT
! INDENT_EXE let g:rapidSpaceIndent = 0
! INDENT_EXE set shiftwidth=4
proc bla()
var num i;
Incr i;
endproc
! END_INDENT
! START_INDENT
! INDENT_EXE let g:rapidCommentIndent = 1
!
proc bla()
! indent this first column comment because of g:rapidCommentIndent=1
endproc
! END_INDENT
! START_INDENT
! INDENT_EXE let g:rapidNewStyleIndent = 1
pers string st_Appl_Info{3,3}:=
[
[
"["
,
"default"
,
"case"
]
,
[
"else"
,
"then"
,
"endif"
]
,
[
"do"
,
"}"
,
")"
]
,
];
! END_INDENT

View File

@@ -0,0 +1,266 @@
! vim: set ft=rapid :
! START_INDENT
%%%
VERSION:1
LANGUAGE:ENGLISH
%%%
module LowerCaseModule
task pers num n1 := 0;
local pers num n2 := 1;
var bool b1 := false;
var intnum i1;
! put some stuff in those strings that may confuse indentation
const string st1 := "endmodule (";
pers string st_Appl_Info{3,3}:=[
[
"["
,
"default"
,
"case"
],
[
"else"
,
"then"
,
"endif"
],
[
"do"
,
"}"
,
")"
],
];
pers tooldata tTool1:=[TRUE,
[
[97.4, 0, 223.1],
[0.924, 0, 0.383 ,0]
],
[5,
[23, 0, 75],
[1, 0, 0, 0], 0, 0, 0
]
];
const robtarget p1:=[
[600, 500, 225.3],
[1, 0, 0, 0],
[1, 1, 0, 0],
[ 11, 12.3, 9E9, 9E9, 9E9, 9E9]
];
record myRec
num nRecNum1
bool bRecBool1
endrecord
proc proc1(num n1,
num n2)
var string st1;
n1 := n1+1;
MoveJSync p1, vmax, z30, tool1, "proc2";
backward
MoveJSync p1, v100, fine, tool1, "proc2";
undo
n1 := n1-1;
error
trynext;
endproc
func num nFunc1(
switch s1
|switch s2
,num n1
,bool b1)
var num nVar;
if not Present(s1) return;
if Present(s1) then
Incr n1;'
elseif Present(s2) then
b1:=false;
else
while n1>0 do
Decr n1;
test n1
case 1:
test1;
case 2:
test2;
default:
WaitUntil false;
endtest
endwhile
endif
for i from 1 to 10 step 2 do
for j from 1 to 10 do
st_Appl_Info{i,j} := "";
endfor
endfor
! return 1;
return 0;
error
return -1;
endfunc
trap Trap1
Reset do1;
endtrap
endmodule
MODULE UpperCaseModule(SYSMODULE,NOSTEPIN)
TASK pers num n1 := 0;
LOCAL pers num n2 := 1;
VAR bool b1 := false;
VAR intnum i1;
LOCAL FUNC num nFunc1(
switch s1
|switch s2
,num n1
,bool b1)
VAR num nVar;
IF NOT PRESENT(s1) RETURN;
IF PRESENT(s1) THEN
INCR n1;'
ELSEIF PRESENT(s2) THEN
b1:=FALSE;
ELSE
WHILE n1>0 DO
DECR n1;
TEST n1
CASE 1:
test1;
CASE 2:
test2;
DEFAULT:
WAITUNTIL FALSE;
ENDTEST
ENDWHILE
ENDIF
FOR i FROM 1 TO 10 STEP 2 DO
FOR j FROM 1 TO 10 DO
st_Appl_Info{i,j} := "";
ENDFOR
ENDFOR
! RETURN 1;
RETURN 0;
ERROR
RETURN -1;
ENDFUNC
TRAP Trap1
Reset do1;
ENDTRAP
ENDMODULE
Module MixedCaseModule(SysModule)
Task pers num n1 := 0;
Local pers num n2 := 1;
Var bool b1 := false;
Var intnum i1;
Task Func num nFunc1(
switch s1
|switch s2
,num n1
,bool b1)
Var num nVar;
If Not Present(s1) Return;
If Present(s1) Then
Incr n1;'
ElseIf Present(s2) Then
b1:=false;
Else
While n1>0 Do
Decr n1;
Test n1
Case 1:
test1;
Case 2:
test2;
Default:
WaitUntil false;
EndTest
EndWhile
EndIf
For i From 1 To 10 Step 2 Do
For j From 1 To 10 Do
st_Appl_Info{i,j} := "";
EndFor
EndFor
! Return 1;
Return 0;
Error
Return -1;
EndFunc
Trap Trap1
Reset do1;
EndTrap
EndModule
! END_INDENT
! START_INDENT
! INDENT_EXE let g:rapidSpaceIndent = 0
! INDENT_EXE set shiftwidth=4
proc bla()
var num i;
Incr i;
endproc
! END_INDENT
! START_INDENT
! INDENT_EXE let g:rapidCommentIndent = 1
!
proc bla()
! indent this first column comment because of g:rapidCommentIndent=1
endproc
! END_INDENT
! START_INDENT
! INDENT_EXE let g:rapidNewStyleIndent = 1
pers string st_Appl_Info{3,3}:=
[
[
"["
,
"default"
,
"case"
]
,
[
"else"
,
"then"
,
"endif"
]
,
[
"do"
,
"}"
,
")"
]
,
];
! END_INDENT

View File

@@ -483,6 +483,13 @@ endif
endif
" END_INDENT
" START_INDENT
if true
var d = {
end: 0}
endif
" END_INDENT
" START_INDENT
nunmap <buffer> (
nunmap <buffer> )

View File

@@ -483,6 +483,13 @@ if true
endif
" END_INDENT
" START_INDENT
if true
var d = {
end: 0}
endif
" END_INDENT
" START_INDENT
nunmap <buffer> (
nunmap <buffer> )

View File

@@ -2,8 +2,9 @@ vim9script
# Vim indent file
# Language: Vim script
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last Change: 2023 Feb 02
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Aug 10
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# Only load this indent file when no other was loaded.
if exists('b:did_indent')

View File

@@ -1,7 +1,8 @@
" Vim indent file
" Language: XHTML
" Maintainer: Bram Moolenaar <Bram@vim.org> (for now)
" Last Change: 2005 Jun 24
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only load this indent file when no other was loaded.
if exists("b:did_indent")

View File

@@ -1,7 +1,8 @@
" Vim indent file
" Language: Zimbu
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Sep 26
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Only load this indent file when no other was loaded.
if exists("b:did_indent")

View File

@@ -1,7 +1,8 @@
" Vim support file to switch off loading indent files for file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2001 Jun 11
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
if exists("did_indent_on")
unlet did_indent_on

View File

@@ -1,54 +1,140 @@
" Vim Keymap file for Russian characters
" layout English-US standard 104 key 'QWERTY', 'JCUKEN'
" layout English-US 104 key 'QWERTY'
"
" Maintainer: Restorer <restorers@users.sourceforge.net>
" Last Changed: 20 Jan 2019
" Description: Раскладка сделана на основе раскладки «русская машинопись»
" (KBDRU1.DLL), поставляемой в составе ОС MS Windows. Эта раскладка позволяет
" печать практически все знаки препинания используя цифровой ряд и не требуя при
" этом нажатия дополнительных клавиш, ну и также удобное расположение буквы «Ё».
" Однако были внесены некоторые дополнения (улучшения?), в частности:
" раздельные символы круглых скобок (), расположены на тех же позициях, что и
" в US-International;
" раздельные символы типографских кавычек «», расположены на клавишах «3» и
" «4» соответственно;
" на этих же клавишах находятся внутренние кавычки “лапки”, набираемые при
" нажатой клавише «ALT»;
" возможность набирать символы, отсутствующие в русской раскладке клавиатуры,
" а именно @#$^&*{}[]"'`~<>, которые расположены на тех же местах, что и раньше.
" Для этого не требуется переключаться в латинскую раскладку клавиатуры, а
" оставаясь в русской, использовать для этого дополнительные клавиши «SHIFT» и
" «ALT»;
" и ещё несколько удобств, которые позволяют быстро и с минимальными усилиями
" набирать текст.
" Maintainer: Restorer <restorer@mail2k.ru>
" Last Changed: 25 Apr 2023
" Version: 3.3
" Description: описание дано после изображений клавиатуры
scriptencoding utf-8
" Расположение символов для русского языка при подключенном файле с раскладкой
" клавиатуры «русская типографская» (russian-typograph.vim). Версия 3.3
" Переключение языка ввода со стандартного сочетания <CTRL+^> на указанные ниже
" Для режимов вставки и замены
""или SHIFT+SPACE
" inoremap <S-Space> <C-^>
""или CTRL+SPACE"
" inoremap <C-Space> <C-^>
" Для режима командной строки
""или SHIFT+SPACE
" cnoremap <S-Space> <C-^>
""или CTRL+SPACE"
" cnoremap <C-Space> <C-^>
" Одной командой для режимов вставки, замены и командной строки
" noremap! <S-Space> <C-^>
" noremap! <C-Space> <C-^>
" Ни одна из клавиш модификаторов не нажата
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
" | % | ! | — | « | » | : | , | . | ? | ( | ) | | ; | <--- |
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
" | ->| | й | ц | у | к | е | н | г | ш | щ | з | х | ъ | / |
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
" | Caps | ф | ы | в | а | п | р | о | л | д | ж | э | Enter |
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
" | Shift | я | ч | с | м | и | т | ь | б | ю | ё | Shift |
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
" | Ctrl | | Alt | | Alt | | Ctrl |
" '------' '-----'--------------------------'------' '------'
" Нажата клавиша SHIFT
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
" | = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | <--- |
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
" | ->| | Й | Ц | У | К | Е | Н | Г | Ш | Щ | З | Х | Ъ | § |
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
" | Caps | Ф | Ы | В | А | П | Р | О | Л | Д | Ж | Э | Enter |
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
" | SHIFT | Я | Ч | С | М | И | Т | Ь | Б | Ю | Ё | SHIFT |
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
" | Ctrl | | Alt | | Alt | | Ctrl |
" '------' '-----'--------------------------'------' '------'
" Нажата клавиша ALT
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
" | ` | № | | „ | “ | | | … | | | | | ± | <--- |
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
" | ->| | | | | | | | | | | | [ | ] | \ |
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
" | Caps | | | | | | ₽ | | | | | ' | Enter |
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
" | Shift | | | | | | | | | | | Shift |
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
" | Ctrl | | ALT | NNBSP | ALT | | Ctrl |
" '------' '-----'--------------------------'------' '------'
" Нажаты клавиши SHIFT и ALT
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
" | ~ | | @ | # | $ | | ^ | & | * | | | _ | | <--- |
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
" | ->| | | | | | | | | | | | { | } | | |
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
" | Caps | | | | | | | | | | | " | Enter |
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
" | SHIFT | | | | | | | | < | > | | SHIFT |
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
" | Ctrl | | ALT | | ALT | | Ctrl |
" '------' '-----'--------------------------'------' '------'
" Нажаты клавиши SHIFT и CTRL
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
" | | | | | | | | | | | | | | <--- |
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
" | ->| | | | | | | | | | | | | | |
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
" | Caps | | | | | | | | | | | | Enter |
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
" | SHIFT | | | | | | | | | | | SHIFT |
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
" | CTRL | | Alt | NBSP | Alt | | CTRL |
" '------' '-----'--------------------------'------' '------'
" Нажаты клавиши ALT и CTRL
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
" | | | | | | | | | | | | | | <--- |
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
" | ->| | | | у́ | | е́ | | | | | | | | |
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
" | Caps | | ы́ | | а́ | | | о́ | | | | э́ | Enter |
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
" | Shift | я́ | | | | и́ | | | | ю́ | | Shift |
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
" | CTRL | | ALT | | ALT | | CTRL |
" '------' '-----'--------------------------'------' '------'
" Нажаты клавиши SHIFT, ALT и CTRL
" ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------,
" | | | | | | | | | | | | | | <--- |
" |---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----|
" | ->| | | | У́ | | Е́ | | | | | | | | |
" |-----',--',--',--',--',--',--',--',--',--',--',--',--'-----|
" | Caps | | Ы́ | | А́ | | | О́ | | | | Э́ | Enter |
" |------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------|
" | SHIFT | Я́ | | | | И́ | | | | Ю́ | | SHIFT |
" |------,-',--'--,'---'---'---'---'---'---'-,-'---',--,------|
" | CTRL | | ALT | | ALT | | CTRL |
" '------' '-----'--------------------------'------' '------'
" Раскладка сделана на основе раскладки «русская машинопись» (KBDRU1.DLL),
" поставляемой в составе ОС MS Windows.
"
" Стандартное переключение по CTRL+^ после этих переназначений также сохраняется
" Как видите, принцип достаточно простой, — при наборе русского текста все
" буквы, знаки пунктуации и большинство специальных символов находятся под
" пальцами и их набор не требует нажатия каких-то дополнительных клавиш. При
" наборе символов, которые отсутствуют в русской раскладке, но есть в раскладке
" US-International, требуется нажать или клавишу <ALT>, если в английской
" раскладке они набираются без модификаторов, или нажать <ALT>+<SHIFT>, если они
" набираются с модификатором <SHIFT>.
" scriptencoding utf-8
let b:keymap_name ="RUS"
loadkeymap
" DIGITAL ROW
" DIGITAL ROW
" The Shift key is not pressed
"
" None of the modifier keys are pressed
<char-0x0060> <char-0x0025> " PERCENT SIGN
<char-0x0031> <char-0x0021> " EXCLAMATION MARK
<char-0x0032> <char-0x2014> " EM DASH
@@ -63,8 +149,7 @@ loadkeymap
<char-0x002d> <char-0x2010> " HYPHEN
<char-0x003d> <char-0x003b> " SEMICOLON
" The Shift key is pressed
" The SHIFT key is pressed
<char-0x007e> <char-0x003d> " EQUALS SIGN
<char-0x0021> <char-0x0031> " DIGIT ONE
<char-0x0040> <char-0x0032> " DIGIT TWO
@@ -79,112 +164,188 @@ loadkeymap
<char-0x005f> <char-0x002d> " HYPHEN-MINUS
<char-0x002b> <char-0x002b> " PLUS SIGN
" ALPHABETICAL 1st ROW
<char-0x0071> <char-0x0439> " CYRILLIC SMALL LETTER SHORT I
<char-0x0051> <char-0x0419> " CYRILLIC CAPITAL LETTER SHORT I
<char-0x0077> <char-0x0446> " CYRILLIC SMALL LETTER TSE
<char-0x0057> <char-0x0426> " CYRILLIC CAPITAL LETTER TSE
<char-0x0065> <char-0x0443> " CYRILLIC SMALL LETTER U
<char-0x0045> <char-0x0423> " CYRILLIC CAPITAL LETTER U
<char-0x0072> <char-0x043a> " CYRILLIC SMALL LETTER KA
<char-0x0052> <char-0x041a> " CYRILLIC CAPITAL LETTER KA
<char-0x0074> <char-0x0435> " CYRILLIC SMALL LETTER IE
<char-0x0054> <char-0x0415> " CYRILLIC CAPITAL LETTER IE
<char-0x0079> <char-0x043d> " CYRILLIC SMALL LETTER EN
<char-0x0059> <char-0x041d> " CYRILLIC CAPITAL LETTER EN
<char-0x0075> <char-0x0433> " CYRILLIC SMALL LETTER GHE
<char-0x0055> <char-0x0413> " CYRILLIC CAPITAL LETTER GHE
<char-0x0069> <char-0x0448> " CYRILLIC SMALL LETTER SHA
<char-0x0049> <char-0x0428> " CYRILLIC CAPITAL LETTER SHA
<char-0x006f> <char-0x0449> " CYRILLIC SMALL LETTER SHCHA
<char-0x004f> <char-0x0429> " CYRILLIC CAPITAL LETTER SHCHA
<char-0x0070> <char-0x0437> " CYRILLIC SMALL LETTER ZE
<char-0x0050> <char-0x0417> " CYRILLIC CAPITAL LETTER ZE
<char-0x005b> <char-0x0445> " CYRILLIC SMALL LETTER HA
<char-0x007b> <char-0x0425> " CYRILLIC CAPITAL LETTER HA
<char-0x005d> <char-0x044a> " CYRILLIC SMALL LETTER HARD SIGN
<char-0x007d> <char-0x042a> " CYRILLIC CAPITAL LETTER HARD SIGN
" ALPHABETIC 2nd ROW
<char-0x0061> <char-0x0444> " CYRILLIC SMALL LETTER EF
<char-0x0041> <char-0x0424> " CYRILLIC CAPITAL LETTER EF
<char-0x0073> <char-0x044b> " CYRILLIC SMALL LETTER YERU
<char-0x0053> <char-0x042b> " CYRILLIC CAPITAL LETTER YERU
<char-0x0064> <char-0x0432> " CYRILLIC SMALL LETTER VE
<char-0x0044> <char-0x0412> " CYRILLIC CAPITAL LETTER VE
<char-0x0066> <char-0x0430> " CYRILLIC SMALL LETTER A
<char-0x0046> <char-0x0410> " CYRILLIC CAPITAL LETTER A
<char-0x0067> <char-0x043f> " CYRILLIC SMALL LETTER PE
<char-0x0047> <char-0x041f> " CYRILLIC CAPITAL LETTER PE
<char-0x0068> <char-0x0440> " CYRILLIC SMALL LETTER ER
<char-0x0048> <char-0x0420> " CYRILLIC CAPITAL LETTER ER
<char-0x006a> <char-0x043e> " CYRILLIC SMALL LETTER O
<char-0x004a> <char-0x041e> " CYRILLIC CAPITAL LETTER O
<char-0x006b> <char-0x043b> " CYRILLIC SMALL LETTER EL
<char-0x004b> <char-0x041b> " CYRILLIC CAPITAL LETTER EL
<char-0x006c> <char-0x0434> " CYRILLIC SMALL LETTER DE
<char-0x004c> <char-0x0414> " CYRILLIC CAPITAL LETTER DE
<char-0x003b> <char-0x0436> " CYRILLIC SMALL LETTER ZHE
<char-0x003a> <char-0x0416> " CYRILLIC CAPITAL LETTER ZHE
<char-0x0027> <char-0x044d> " CYRILLIC SMALL LETTER E
<char-0x0022> <char-0x042d> " CYRILLIC CAPITAL LETTER E
" ALPHABETIC 3rd ROW
<char-0x007a> <char-0x044f> " CYRILLIC SMALL LETTER YA
<char-0x005a> <char-0x042f> " CYRILLIC CAPITAL LETTER YA
<char-0x0078> <char-0x0447> " CYRILLIC SMALL LETTER CHE
<char-0x0058> <char-0x0427> " CYRILLIC CAPITAL LETTER CHE
<char-0x0063> <char-0x0441> " CYRILLIC SMALL LETTER ES
<char-0x0043> <char-0x0421> " CYRILLIC CAPITAL LETTER ES
<char-0x0076> <char-0x043c> " CYRILLIC SMALL LETTER EM
<char-0x0056> <char-0x041c> " CYRILLIC CAPITAL LETTER EM
<char-0x0062> <char-0x0438> " CYRILLIC SMALL LETTER I
<char-0x0042> <char-0x0418> " CYRILLIC CAPITAL LETTER I
<char-0x006e> <char-0x0442> " CYRILLIC SMALL LETTER TE
<char-0x004e> <char-0x0422> " CYRILLIC CAPITAL LETTER TE
<char-0x006d> <char-0x044c> " CYRILLIC SMALL LETTER SOFT SIGN
<char-0x004d> <char-0x042c> " CYRILLIC CAPITAL LETTER SOFT SIGN
<char-0x002c> <char-0x0431> " CYRILLIC SMALL LETTER BE
<char-0x003c> <char-0x0411> " CYRILLIC CAPITAL LETTER BE
<char-0x002e> <char-0x044e> " CYRILLIC SMALL LETTER YU
<char-0x003e> <char-0x042e> " CYRILLIC CAPITAL LETTER YU
<char-0x002f> <char-0x0451> " CYRILLIC SMALL LETTER IO
<char-0x003f> <char-0x0401> " CYRILLIC CAPITAL LETTER IO
" VK_OEM_5 key (scan code 2b)
" The Shift key is not pressed
<char-0x005c> <char-0x002f> " SOLIDUS
" The Shift key is pressed
<char-0x007c> <char-0x005c> " REVERSE SOLIDUS
" Alt key pressed
" The ALT key pressed
<A-char-0x0060> <char-0x0060> " GRAVE ACCENT
<A-char-0x0031> <char-0x2116> " NUMERO SIGN
<A-char-0x0033> <char-0x201c> " LEFT DOUBLE QUOTATION MARK
<A-char-0x0034> <char-0x201d> " RIGHT DOUBLE QUOTATION MARK
<A-char-0x0032> <char-0x2013> " EN DASH
<A-char-0x0033> <char-0x201e> " DOUBLE LOW-9 QUOTATION MARK
<A-char-0x0034> <char-0x201c> " LEFT DOUBLE QUOTATION MARK
<A-char-0x0037> <char-0x2026> " HORIZONTAL ELLIPSIS
<A-char-0x002d> <char-0x2011> " NON-BREAKING HYPHEN
<A-char-0x003d> <char-0x00b1> " PLUS-MINUS SIGN
" The SHIFT and ALT keys pressed
<A-char-0x007e> <char-0x007e> " TILDE
<A-char-0x0040> <char-0x0040> " COMMERCIAL AT
<A-char-0x0023> <char-0x0023> " NUMBER SIGN
<A-char-0x0024> <char-0x0024> " DOLLAR SIGN
<A-char-0x005e> <char-0x005e> " CIRCUMFLEX ACCENT
<A-char-0x0026> <char-0x0026> " AMPERSAND
<A-char-0x002a> <char-0x002a> " ASTERISK
<A-char-0x005f> <char-0x005f> " LOW LINE
" ALPHABETICAL 1st ROW
" None of the modifier keys are pressed
<char-0x0071> <char-0x0439> " CYRILLIC SMALL LETTER SHORT I
<char-0x0077> <char-0x0446> " CYRILLIC SMALL LETTER TSE
<char-0x0065> <char-0x0443> " CYRILLIC SMALL LETTER U
<char-0x0072> <char-0x043a> " CYRILLIC SMALL LETTER KA
<char-0x0074> <char-0x0435> " CYRILLIC SMALL LETTER IE
<char-0x0079> <char-0x043d> " CYRILLIC SMALL LETTER EN
<char-0x0075> <char-0x0433> " CYRILLIC SMALL LETTER GHE
<char-0x0069> <char-0x0448> " CYRILLIC SMALL LETTER SHA
<char-0x006f> <char-0x0449> " CYRILLIC SMALL LETTER SHCHA
<char-0x0070> <char-0x0437> " CYRILLIC SMALL LETTER ZE
<char-0x005b> <char-0x0445> " CYRILLIC SMALL LETTER HA
<char-0x005d> <char-0x044a> " CYRILLIC SMALL LETTER HARD SIGN
" The SHIFT key is pressed
<char-0x0051> <char-0x0419> " CYRILLIC CAPITAL LETTER SHORT I
<char-0x0057> <char-0x0426> " CYRILLIC CAPITAL LETTER TSE
<char-0x0045> <char-0x0423> " CYRILLIC CAPITAL LETTER U
<char-0x0052> <char-0x041a> " CYRILLIC CAPITAL LETTER KA
<char-0x0054> <char-0x0415> " CYRILLIC CAPITAL LETTER IE
<char-0x0059> <char-0x041d> " CYRILLIC CAPITAL LETTER EN
<char-0x0055> <char-0x0413> " CYRILLIC CAPITAL LETTER GHE
<char-0x0049> <char-0x0428> " CYRILLIC CAPITAL LETTER SHA
<char-0x004f> <char-0x0429> " CYRILLIC CAPITAL LETTER SHCHA
<char-0x0050> <char-0x0417> " CYRILLIC CAPITAL LETTER ZE
<char-0x007b> <char-0x0425> " CYRILLIC CAPITAL LETTER HA
<char-0x007d> <char-0x042a> " CYRILLIC CAPITAL LETTER HARD SIGN
" The ALT key pressed
<A-char-0x005b> <char-0x005b> " LEFT SQUARE BRACKET
<A-char-0x005d> <char-0x005d> " RIGHT SQUARE BRACKET
<A-char-0x0027> <char-0x0027> " APOSTROPHE
" Alt and Shift keys pressed
<A-char-0x007e> <char-0x007e> " TILDE
<A-char-0x0040> <char-0x0040> " COMMERCIAL AT
<A-char-0x0023> <char-0x0023> " NUMBER SIGN
<A-char-0x0024> <char-0x0024> " DOLLAR SIGN
<A-char-0x005e> <char-0x005e> " CIRCUMFLEX ACCENT
<A-char-0x0026> <char-0x0026> " AMPERSAND
<A-char-0x002a> <char-0x002a> " ASTERISK
<A-char-0x005f> <char-0x005f> " LOW LINE
" The SHIFT and ALT keys pressed
<A-char-0x007b> <char-0x007b> " LEFT CURLY BRACKET
<A-char-0x007d> <char-0x007d> " RIGHT CURLY BRACKET
" The ALT and CTRL key pressed
<A-C-char-0x0065> <char-0x0443><char-0x0301> " CYRILLIC SMALL LETTER U with COMBINING ACUTE ACCENT
<A-C-char-0x0074> <char-0x0435><char-0x0301> " CYRILLIC SMALL LETTER IE with COMBINING ACUTE ACCENT
" The SHIFT and ALT and CTRL keys pressed
<S-A-C-char-0x0045> <char-0x0423><char-0x0301> " CYRILLIC CAPITAL LETTER U with COMBINING ACUTE ACCENT
<S-A-C-char-0x0054> <char-0x0415><char-0x0301> " CYRILLIC CAPITAL LETTER IE with COMBINING ACUTE ACCENT
" ALPHABETIC 2st ROW
" None of the modifier keys are pressed
<char-0x0061> <char-0x0444> " CYRILLIC SMALL LETTER EF
<char-0x0073> <char-0x044b> " CYRILLIC SMALL LETTER YERU
<char-0x0064> <char-0x0432> " CYRILLIC SMALL LETTER VE
<char-0x0066> <char-0x0430> " CYRILLIC SMALL LETTER A
<char-0x0067> <char-0x043f> " CYRILLIC SMALL LETTER PE
<char-0x0068> <char-0x0440> " CYRILLIC SMALL LETTER ER
<char-0x006a> <char-0x043e> " CYRILLIC SMALL LETTER O
<char-0x006b> <char-0x043b> " CYRILLIC SMALL LETTER EL
<char-0x006c> <char-0x0434> " CYRILLIC SMALL LETTER DE
<char-0x003b> <char-0x0436> " CYRILLIC SMALL LETTER ZHE
<char-0x0027> <char-0x044d> " CYRILLIC SMALL LETTER E
" The SHIFT key is pressed
<char-0x0041> <char-0x0424> " CYRILLIC CAPITAL LETTER EF
<char-0x0053> <char-0x042b> " CYRILLIC CAPITAL LETTER YERU
<char-0x0044> <char-0x0412> " CYRILLIC CAPITAL LETTER VE
<char-0x0046> <char-0x0410> " CYRILLIC CAPITAL LETTER A
<char-0x0047> <char-0x041f> " CYRILLIC CAPITAL LETTER PE
<char-0x0048> <char-0x0420> " CYRILLIC CAPITAL LETTER ER
<char-0x004a> <char-0x041e> " CYRILLIC CAPITAL LETTER O
<char-0x004b> <char-0x041b> " CYRILLIC CAPITAL LETTER EL
<char-0x004c> <char-0x0414> " CYRILLIC CAPITAL LETTER DE
<char-0x003a> <char-0x0416> " CYRILLIC CAPITAL LETTER ZHE
<char-0x0022> <char-0x042d> " CYRILLIC CAPITAL LETTER E
" The ALT key pressed
<A-char-0x0027> <char-0x0027> " APOSTROPHE
<A-char-0x0068> <char-0x20bd> " RUBLE SIGN
" The SHIFT and ALT keys pressed
<A-char-0x0022> <char-0x0022> " QUOTATION MARK
" The ALT and CTRL key pressed
<A-C-char-0x0073> <char-0x044b><char-0x0301> " CYRILLIC SMALL LETTER YERU with COMBINING ACUTE ACCENT
<A-C-char-0x0066> <char-0x0430><char-0x0301> " CYRILLIC SMALL LETTER A with COMBINING ACUTE ACCENT
<A-C-char-0x006a> <char-0x043e><char-0x0301> " CYRILLIC SMALL LETTER O with COMBINING ACUTE ACCENT
<A-C-char-0x0027> <char-0x044d><char-0x0301> " CYRILLIC SMALL LETTER E with COMBINING ACUTE ACCENT
" The SHIFT and ALT and CTRL keys pressed
<S-A-C-char-0x0053> <char-0x042b><char-0x0301> " CYRILLIC CAPITAL LETTER YERU with COMBINING ACUTE ACCENT
<S-A-C-char-0x0046> <char-0x0410><char-0x0301> " CYRILLIC CAPITAL LETTER A with COMBINING ACUTE ACCENT
<S-A-C-char-0x004a> <char-0x041e><char-0x0301> " CYRILLIC CAPITAL LETTER O with COMBINING ACUTE ACCENT
<S-A-C-char-0x0022> <char-0x042d><char-0x0301> " CYRILLIC CAPITAL LETTER E with COMBINING ACUTE ACCENT
" ALPHABETIC 3st ROW
" None of the modifier keys are pressed
<char-0x007a> <char-0x044f> " CYRILLIC SMALL LETTER YA
<char-0x0078> <char-0x0447> " CYRILLIC SMALL LETTER CHE
<char-0x0063> <char-0x0441> " CYRILLIC SMALL LETTER ES
<char-0x0076> <char-0x043c> " CYRILLIC SMALL LETTER EM
<char-0x0062> <char-0x0438> " CYRILLIC SMALL LETTER I
<char-0x006e> <char-0x0442> " CYRILLIC SMALL LETTER TE
<char-0x006d> <char-0x044c> " CYRILLIC SMALL LETTER SOFT SIGN
<char-0x002c> <char-0x0431> " CYRILLIC SMALL LETTER BE
<char-0x002e> <char-0x044e> " CYRILLIC SMALL LETTER YU
<char-0x002f> <char-0x0451> " CYRILLIC SMALL LETTER IO
" The SHIFT key is pressed
<char-0x005a> <char-0x042f> " CYRILLIC CAPITAL LETTER YA
<char-0x0058> <char-0x0427> " CYRILLIC CAPITAL LETTER CHE
<char-0x0043> <char-0x0421> " CYRILLIC CAPITAL LETTER ES
<char-0x0056> <char-0x041c> " CYRILLIC CAPITAL LETTER EM
<char-0x0042> <char-0x0418> " CYRILLIC CAPITAL LETTER I
<char-0x004e> <char-0x0422> " CYRILLIC CAPITAL LETTER TE
<char-0x004d> <char-0x042c> " CYRILLIC CAPITAL LETTER SOFT SIGN
<char-0x003c> <char-0x0411> " CYRILLIC CAPITAL LETTER BE
<char-0x003e> <char-0x042e> " CYRILLIC CAPITAL LETTER YU
<char-0x003f> <char-0x0401> " CYRILLIC CAPITAL LETTER IO
" The ALT key pressed
" The SHIFT and ALT keys pressed
<A-char-0x003c> <char-0x003c> " LESS-THAN SIGN
<A-char-0x003e> <char-0x003e> " GREATER-THAN SIGN
" The ALT and CTRL key pressed
<A-C-char-0x007a> <char-0x044f><char-0x0301> " CYRILLIC SMALL LETTER YA with COMBINING ACUTE ACCENT
<A-C-char-0x0062> <char-0x0438><char-0x0301> " CYRILLIC SMALL LETTER I with COMBINING ACUTE ACCENT
<A-C-char-0x002e> <char-0x044e><char-0x0301> " CYRILLIC SMALL LETTER YU with COMBINING ACUTE ACCENT
" The SHIFT and ALT and CTRL keys pressed
<S-A-C-char-0x005a> <char-0x042f><char-0x0301> " CYRILLIC CAPITAL LETTER YA with COMBINING ACUTE ACCENT
<S-A-C-char-0x0042> <char-0x0418><char-0x0301> " CYRILLIC CAPITAL LETTER I with COMBINING ACUTE ACCENT
<S-A-C-char-0x003e> <char-0x042e><char-0x0301> " CYRILLIC CAPITAL LETTER Y with COMBINING ACUTE ACCENT
" VK_OEM_5 key (scan code 2b)
" None of the modifier keys are pressed
<char-0x005c> <char-0x002f> " SOLIDUS
" The SHIFT key is pressed
<char-0x007c> <char-0x00a7> " SECTION SIGN
" The ALT key is pressed
<A-char-0x005c> <char-0x005c> " REVERSE SOLIDUS
" The SHIFT and ALT keys pressed
<A-char-0x007c> <char-0x007c> " VERTICAL LINE
" SPACE BAR key
" The ALT key pressed
<A-char-0x0020> <char-0x202f> " NARROW NO-BREAK SPACE
" The SHIFT and CTRL keys pressed
<S-C-char-0x0020> <char-0x00A0> " NO-BREAK SPACE
" \///\\

View File

@@ -1,6 +1,7 @@
" Vim script to work like "less"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2020 Dec 17
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Avoid loading this file twice, allow the user to define his own script.
if exists("loaded_less")

View File

@@ -1,8 +1,9 @@
vim9script
# Script to define the syntax menu in synmenu.vim
# Maintainer: Bram Moolenaar <Bram@vim.org>
# Last Change: 2022 Jun 27
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Aug 10
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# This is used by "make menu" in the src directory.
edit <sfile>:p:h/synmenu.vim

View File

@@ -1,8 +1,9 @@
" Vim support file to define the default menus
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2023 May 03
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.

View File

@@ -1,7 +1,8 @@
" Set options and add mapping such that Vim behaves a lot like MS-Windows
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2018 Dec 07
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Bail out if this isn't wanted.
if exists("g:skip_loading_mswin") && g:skip_loading_mswin

View File

@@ -1,7 +1,8 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Dec 16
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" If there already is an option window, jump to that one.
let buf = bufnr('option-window')

View File

@@ -1,7 +1,7 @@
vim9script
# cfilter.vim: Plugin to filter entries from a quickfix/location list
# Last Change: Jun 30, 2022
# Last Change: August 16, 2023
# Maintainer: Yegappan Lakshmanan (yegappan AT yahoo DOT com)
# Version: 2.0
#
@@ -31,11 +31,11 @@ def Qf_filter(qf: bool, searchpat: string, bang: string)
if qf
Xgetlist = function('getqflist')
Xsetlist = function('setqflist')
cmd = ':Cfilter' .. bang
cmd = $':Cfilter{bang}'
else
Xgetlist = function('getloclist', [0])
Xsetlist = function('setloclist', [0])
cmd = ':Lfilter' .. bang
cmd = $':Lfilter{bang}'
endif
firstchar = searchpat[0]
@@ -62,7 +62,7 @@ def Qf_filter(qf: bool, searchpat: string, bang: string)
endif
items = filter(Xgetlist(), Cond)
title = cmd .. ' /' .. pat .. '/'
title = $'{cmd} /{pat}/'
Xsetlist([], ' ', {title: title, items: items})
enddef

View File

@@ -1,6 +1,6 @@
" matchit.vim: (global plugin) Extended "%" matching
" autload script of matchit plugin, see ../plugin/matchit.vim
" Last Change: Jun 10, 2021
" Last Change: Jan 24, 2022
" Neovim does not support scriptversion
if has("vimscript-4")
@@ -42,6 +42,10 @@ function s:RestoreOptions()
let restore_options = " ve=" .. &ve .. restore_options
set ve=
endif
if &smartcase
let restore_options = " smartcase " .. restore_options
set nosmartcase
endif
return restore_options
endfunction
@@ -134,9 +138,6 @@ function matchit#Match_wrapper(word, forward, mode) range
let curcol = match(matchline, regexp)
" If there is no match, give up.
if curcol == -1
" Make sure macros abort properly
"exe "norm! \<esc>"
call feedkeys("\e", 'tni')
return s:CleanUp(restore_options, a:mode, startpos)
endif
let endcol = matchend(matchline, regexp)
@@ -756,15 +757,15 @@ endfun
fun! s:ParseSkip(str)
let skip = a:str
if skip[1] == ":"
if skip[0] == "s"
if skip[0] ==# "s"
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" ..
\ strpart(skip,2) .. "'"
elseif skip[0] == "S"
elseif skip[0] ==# "S"
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" ..
\ strpart(skip,2) .. "'"
elseif skip[0] == "r"
elseif skip[0] ==# "r"
let skip = "strpart(getline('.'),0,col('.'))=~'" .. strpart(skip,2) .. "'"
elseif skip[0] == "R"
elseif skip[0] ==# "R"
let skip = "strpart(getline('.'),0,col('.'))!~'" .. strpart(skip,2) .. "'"
endif
endif

View File

@@ -1,10 +1,10 @@
*matchit.txt* Extended "%" matching
*matchit.txt* Extended "%" matching
For instructions on installing this file, type
`:help matchit-install`
inside Vim.
For Vim version 8.2. Last change: 2021 Dec 24
For Vim version 9.0. Last change: 2023 June 28
VIM REFERENCE MANUAL by Benji Fisher et al
@@ -148,10 +148,6 @@ To use the matchit plugin add this line to your |vimrc|: >
The script should start working the next time you start Vim.
To use the matching plugin after startup, you can use this command (note the
omitted '!'): >
packadd matchit
To use the matchit plugin after Vim has started, execute this command: >
packadd matchit
@@ -176,6 +172,22 @@ fail to skip matching groups in comments and strings. If the |filetype|
mechanism is turned off, the |b:match_words| variable will probably not be
defined automatically.
2.1 Temporarily disable the matchit plugin *matchit-disable* *:MatchDisable*
To temporarily reset the plugins, that are setup you can run the following
command: >
:MatchDisable
This will delete all the defined key mappings to the Vim default.
Now the "%" command will work like before loading the plugin |%|
2.2 Re-enable the matchit plugin *:MatchEnable*
To re-enable the plugin, after it was disabled, use the following command: >
:MatchEnable
This will resetup the key mappings.
==============================================================================
3. Configuration *matchit-configure*
@@ -244,6 +256,9 @@ Examples:
comment character) you can >
:let b:match_skip = 'r:\(^\|[^\\]\)\(\\\\\)*%'
<
See the $VIMRUNTIME/ftplugin/vim.vim for an example that uses both
syntax and a regular expression.
==============================================================================
4. Supporting a New Language *matchit-newlang*
*b:match_words*

View File

@@ -1,7 +1,7 @@
" matchit.vim: (global plugin) Extended "%" matching
" Maintainer: Christian Brabandt
" Version: 1.18
" Last Change: 2020 Dec 23
" Version: 1.19
" Last Change: 2023, June 28th
" Repository: https://github.com/chrisbra/matchit
" Previous URL:http://www.vim.org/script.php?script_id=39
" Previous Maintainer: Benji Fisher PhD <benji@member.AMS.org>
@@ -46,44 +46,65 @@ let g:loaded_matchit = 1
let s:save_cpo = &cpo
set cpo&vim
nnoremap <silent> <Plug>(MatchitNormalForward) :<C-U>call matchit#Match_wrapper('',1,'n')<CR>
nnoremap <silent> <Plug>(MatchitNormalBackward) :<C-U>call matchit#Match_wrapper('',0,'n')<CR>
xnoremap <silent> <Plug>(MatchitVisualForward) :<C-U>call matchit#Match_wrapper('',1,'v')<CR>
\:if col("''") != col("$") \| exe ":normal! m'" \| endif<cr>gv``
xnoremap <silent> <Plug>(MatchitVisualBackward) :<C-U>call matchit#Match_wrapper('',0,'v')<CR>m'gv``
onoremap <silent> <Plug>(MatchitOperationForward) :<C-U>call matchit#Match_wrapper('',1,'o')<CR>
onoremap <silent> <Plug>(MatchitOperationBackward) :<C-U>call matchit#Match_wrapper('',0,'o')<CR>
" Analogues of [{ and ]} using matching patterns:
nnoremap <silent> <Plug>(MatchitNormalMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>
nnoremap <silent> <Plug>(MatchitNormalMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>
xnoremap <silent> <Plug>(MatchitVisualMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>m'gv``
xnoremap <silent> <Plug>(MatchitVisualMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>m'gv``
onoremap <silent> <Plug>(MatchitOperationMultiBackward) :<C-U>call matchit#MultiMatch("bW", "o")<CR>
onoremap <silent> <Plug>(MatchitOperationMultiForward) :<C-U>call matchit#MultiMatch("W", "o")<CR>
" text object:
xmap <silent> <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward)
if !exists("g:no_plugin_maps")
nmap <silent> % <Plug>(MatchitNormalForward)
nmap <silent> g% <Plug>(MatchitNormalBackward)
xmap <silent> % <Plug>(MatchitVisualForward)
xmap <silent> g% <Plug>(MatchitVisualBackward)
omap <silent> % <Plug>(MatchitOperationForward)
omap <silent> g% <Plug>(MatchitOperationBackward)
fun MatchEnable()
nnoremap <silent> <Plug>(MatchitNormalForward) :<C-U>call matchit#Match_wrapper('',1,'n')<CR>
nnoremap <silent> <Plug>(MatchitNormalBackward) :<C-U>call matchit#Match_wrapper('',0,'n')<CR>
xnoremap <silent> <Plug>(MatchitVisualForward) :<C-U>call matchit#Match_wrapper('',1,'v')<CR>
\:if col("''") != col("$") \| exe ":normal! m'" \| endif<cr>gv``
xnoremap <silent> <Plug>(MatchitVisualBackward) :<C-U>call matchit#Match_wrapper('',0,'v')<CR>m'gv``
onoremap <silent> <Plug>(MatchitOperationForward) :<C-U>call matchit#Match_wrapper('',1,'o')<CR>
onoremap <silent> <Plug>(MatchitOperationBackward) :<C-U>call matchit#Match_wrapper('',0,'o')<CR>
" Analogues of [{ and ]} using matching patterns:
nmap <silent> [% <Plug>(MatchitNormalMultiBackward)
nmap <silent> ]% <Plug>(MatchitNormalMultiForward)
xmap <silent> [% <Plug>(MatchitVisualMultiBackward)
xmap <silent> ]% <Plug>(MatchitVisualMultiForward)
omap <silent> [% <Plug>(MatchitOperationMultiBackward)
omap <silent> ]% <Plug>(MatchitOperationMultiForward)
nnoremap <silent> <Plug>(MatchitNormalMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>
nnoremap <silent> <Plug>(MatchitNormalMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>
xnoremap <silent> <Plug>(MatchitVisualMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>m'gv``
xnoremap <silent> <Plug>(MatchitVisualMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>m'gv``
onoremap <silent> <Plug>(MatchitOperationMultiBackward) :<C-U>call matchit#MultiMatch("bW", "o")<CR>
onoremap <silent> <Plug>(MatchitOperationMultiForward) :<C-U>call matchit#MultiMatch("W", "o")<CR>
" Text object
xmap a% <Plug>(MatchitVisualTextObject)
endif
" text object:
xmap <silent> <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward)
if !exists("g:no_plugin_maps")
nmap <silent> % <Plug>(MatchitNormalForward)
nmap <silent> g% <Plug>(MatchitNormalBackward)
xmap <silent> % <Plug>(MatchitVisualForward)
xmap <silent> g% <Plug>(MatchitVisualBackward)
omap <silent> % <Plug>(MatchitOperationForward)
omap <silent> g% <Plug>(MatchitOperationBackward)
" Analogues of [{ and ]} using matching patterns:
nmap <silent> [% <Plug>(MatchitNormalMultiBackward)
nmap <silent> ]% <Plug>(MatchitNormalMultiForward)
xmap <silent> [% <Plug>(MatchitVisualMultiBackward)
xmap <silent> ]% <Plug>(MatchitVisualMultiForward)
omap <silent> [% <Plug>(MatchitOperationMultiBackward)
omap <silent> ]% <Plug>(MatchitOperationMultiForward)
" Text object
xmap a% <Plug>(MatchitVisualTextObject)
endif
endfun
fun MatchDisable()
" remove all the setup keymappings
nunmap %
nunmap g%
xunmap %
xunmap g%
ounmap %
ounmap g%
nunmap [%
nunmap ]%
xunmap [%
xunmap ]%
ounmap [%
ounmap ]%
xunmap a%
endfun
" Call this function to turn on debugging information. Every time the main
" script is run, buffer variables will be saved. These can be used directly
@@ -91,6 +112,14 @@ endif
if !exists(":MatchDebug")
command! -nargs=0 MatchDebug call matchit#Match_debug()
endif
if !exists(":MatchDisable")
command! -nargs=0 MatchDisable :call MatchDisable()
endif
if !exists(":MatchEnable")
command! -nargs=0 MatchEnable :call MatchEnable()
endif
call MatchEnable()
let &cpo = s:save_cpo
unlet s:save_cpo

View File

@@ -1401,9 +1401,19 @@ func s:CreateBreakpoint(id, subid, enabled)
else
let hiName = "debugBreakpoint"
endif
let label = ''
if exists('g:termdebug_config')
let label = get(g:termdebug_config, 'sign', '')
endif
if label == ''
let label = substitute(nr, '\..*', '', '')
if strlen(label) > 2
let label = strpart(label, strlen(label) - 2)
endif
endif
call sign_define('debugBreakpoint' .. nr,
\ #{text: substitute(nr, '\..*', '', ''),
\ texthl: hiName})
\ #{text: strpart(label, 0, 2),
\ texthl: hiName})
endif
endfunc

View File

@@ -1,6 +1,7 @@
" Vim plugin for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2016 Oct 30
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Exit quickly when:
" - this plugin was already loaded

View File

@@ -30,10 +30,10 @@ function s:ManPager()
setlocal modifiable
" Emulate 'col -b'
silent! keepj keepp %s/\v(.)\b\ze\1?//ge
exe 'silent! keepj keepp %s/\v(.)\b\ze\1?//e' .. (&gdefault ? '' : 'g')
" Remove ansi sequences
silent! keepj keepp %s/\v\e\[%(%(\d;)?\d{1,2})?[mK]//ge
exe 'silent! keepj keepp %s/\v\e\[%(%(\d;)?\d{1,2})?[mK]//e' .. (&gdefault ? '' : 'g')
" Remove empty lines above the header
call cursor(1, 1)

View File

@@ -1,6 +1,7 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Dec 01
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Exit quickly when:
" - this plugin was already loaded (or disabled)

View File

@@ -1,6 +1,7 @@
" Vim plugin for downloading spell files
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Feb 01
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Exit quickly when:
" - this plugin was already loaded

View File

@@ -1,7 +1,8 @@
" Vim support file to detect file types in scripts
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2023 Jun 08
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" This file is called by an autocommand for every file that has just been
" loaded into a buffer. It checks if the type of file can be recognized by

View File

@@ -1,8 +1,9 @@
" Vim support file to define the syntax selection menu
" This file is normally sourced from menu.vim.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2022 Oct 04
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Define the SetSyn function, used for the Syntax menu entries.
" Set 'filetype' and also 'syntax' if it is manually selected.

View File

@@ -28,14 +28,16 @@ whitespace.vim View Tabs and Spaces.
If you want to write a syntax file, read the docs at ":help usr_44.txt".
If you make a new syntax file which would be useful for others, please send it
to Bram@vim.org. Include instructions for detecting the file type for this
language, by file name extension or by checking a few lines in the file.
And please write the file in a portable way, see ":help 44.12".
to the vim-dev mailing list <vim-dev@vim.org>. Include instructions for
detecting the file type for this language, by file name extension or by
checking a few lines in the file. And please write the file in a portable way,
see ":help 44.12".
If you have remarks about an existing file, send them to the maintainer of
that file. Only when you get no response send a message to Bram@vim.org.
that file. Only when you get no response send a message to the vim-dev
mailing list: <vim-dev@vim.org>.
If you are the maintainer of a syntax file and make improvements, send the new
version to Bram@vim.org.
version to the vim-dev mailing list: <vim-dev@vim.org>
For further info see ":help syntax" in Vim.

View File

@@ -1,7 +1,8 @@
" Vim syntax file
" Language: A-A-P recipe
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2004 Jun 13
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Quit when a syntax file was already loaded
if exists("b:current_syntax")

View File

@@ -33,7 +33,7 @@ syn match zoneDomain contained /[^[:space:]!"#$%&'()*+,\/:;<=>?@[\]\
syn match zoneSpecial contained /^[@*.]\s/
syn match zoneTTL contained /\s\@<=\d[0-9WwDdHhMmSs]*\(\s\|$\)\@=/ nextgroup=zoneClass,zoneRRType skipwhite
syn keyword zoneClass contained IN CHAOS CH HS HESIOD nextgroup=zoneRRType,zoneTTL skipwhite
syn keyword zoneRRType contained A AAAA CERT CNAME DNAME DNSKEY DS HINFO LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RP RRSIG SSHFP SOA SPF SRV TLSA TXT nextgroup=zoneRData skipwhite
syn keyword zoneRRType contained A AAAA CAA CERT CNAME DNAME DNSKEY DS HINFO LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM OPENPGPKEY PTR RP RRSIG SMIMEA SOA SPF SRV SSHFP TLSA TXT nextgroup=zoneRData skipwhite
syn match zoneRData contained /[^;]*/ contains=zoneDomain,zoneIPAddr,zoneIP6Addr,zoneText,zoneNumber,zoneParen,zoneUnknown
syn match zoneIPAddr contained /\<[0-9]\{1,3}\(\.[0-9]\{1,3}\)\{,3}\>/

View File

@@ -1,7 +1,8 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2023 Mar 08
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")

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