Compare commits

...

229 Commits

Author SHA1 Message Date
Yegappan Lakshmanan
d33518522a patch 9.0.2155: Vim9: type not kept when assigning vars
Problem:  Vim9: type not kept when assigning vars
Solution: When assigning a List or a Dict value to a variable of type
          'any', keep the type

closes: #13639
closes: #13646

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-08 21:47:22 +01:00
zeertzjq
f48558e10a patch 9.0.2154: The option[] array is not sorted
Problem:  The options[] array is not sorted alphabetically.
Solution: Sort it alphabetically.  Add a test.  Avoid unnecessary loop
          iterations in findoption().

closes: #13648

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-08 21:36:55 +01:00
laburnumT
ff0baca865 runtime(syntax): unlet b:filetype_in_cpp_family for cpp & squirrel
Update runtime/syntax/cpp.vim and runtime/syntax/squirrel.vim to unlet
b:filetype_in_cpp_family as it remains set even after updating the ft of
a file manually or through a modeline, not allowing c specific keywords
to be highlighted.

Since the variable b:filetype_in_cpp_family is only used by the c.vim
syntax script, unlet it directly after sourcing the c.vim runtime file
instead of at the end of the script.

Also update the last Change Header for both files.

closes: #13650

Signed-off-by: laburnumT <laburnumtec@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-08 21:28:44 +01:00
Christian Brabandt
e06f2b498c runtime(doc): fix typo in change.txt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-08 21:22:38 +01:00
Ajit-Thakkar
6863084d3b runtime(fortran): update syntax and ftplugins
closes: #13629

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 23:08:59 +01:00
dkearns
4e043b1fc7 runtime(vim): Update syntax file and syntax test (#13632)
Add missing assignment operators (:let*=, :let/= and :let%=).

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 22:58:40 +01:00
laburnumT
3f7855a612 runtime(doc): Sort options.txt alphabetically
Related to: vim/vim#13630

1. Sort section 3 (option-summary) of runtime/doc/options.txt in
   alphabetical order.
2. Remove double newlines in section 3 (option-summary).

I did not alphabetically sort ttimeout and ttimeoutlen because they seem
to belong with timeout and timeoutlen respectively, but I would like
some input on that decision.

Signed-off-by: laburnumT <laburnumtec@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 22:52:13 +01:00
Yegappan Lakshmanan
563e6440bf runtime(doc): update todo items (#13631)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 17:19:06 +01:00
Teppei Taguchi
0280c0b9af runtime(doc): sort option-list alphabetically (#13630)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 16:37:32 +01:00
Zoltan Arpadffy
1c8e233cb8 patch 9.0.2153: no support to build on OpenVMS
Problem:  no support to build on OpenVMS
Solution: Add OpenVMS X86_64 platform port

closes: #13623

Co-authored-by: errael <errael@raelity.com>
Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 16:04:23 +01:00
Yegappan Lakshmanan
668971958c patch 9.0.2152: Using type unknown for List/Dict containers
Problem:  Using type unknown for List/Dict containers
Solution: Use 'any' instead

fixes: #13582
closes: #13625

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 15:51:50 +01:00
zeertzjq
588f20dece patch 9.0.2151: 'breakindent' is not drawn after diff filler lines
Problem:  'breakindent' is not drawn after diff filler lines.
Solution: Correct check for whether 'breakindent' should be drawn.

closes: #13624

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 15:49:47 +01:00
Roy Orbitson
2103a56eab runtime(doc): remove non-existent parameter in shift-command (#13626)
The variant with the {count} parameter is explained in the next item.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 15:44:33 +01:00
Mike Williams
620f011694 patch 9.0.2150: Using int for errbuflen in option funcs
Problem:  Using int for errbuflen in option funcs
Solution: Use size_t for errbuflen in string option functions

Use size_t for errbuflen in string option functions

This started as size_t to int warning on Windows in
do_set_option_string().  Other option setting functions are using size_t
for errbuflen so I changed the type in the argument list and then chased
further compiler warnings into the string option functions in
optionstr.c changing ints to size_t as I went.

I also changed the type of os_errbuflen in optset_T to size_t and
updated related argument lists in optionstr.c, as well as updating
set_string_option() to also use size_t for errbuflen for consistency
with other string option setting functions.

closes: #13628

Signed-off-by: Mike Williams <mikew@globalgraphics.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 15:38:33 +01:00
Christian Brabandt
5dd41d4b63 patch 9.0.2149: [security]: use-after-free in exec_instructions()
Problem:  [security]: use-after-free in exec_instructions()
Solution: get tv pointer again

[security]: use-after-free in exec_instructions()

exec_instructions may access freed memory, if the GA_GROWS_FAILS()
re-allocates memory. When this happens, the typval tv may still point to
now already freed memory. So let's get that pointer again and compare it
with tv. If those two pointers differ, tv is now invalid and we have to
refresh the tv pointer.

closes: #13621

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-04 22:54:43 +01:00
Ronan Pigott
1e5d66408e patch 9.0.2148: Vim does not detect pacman.log file
Problem:  Vim does not detect pacman.log file
Solution: Detect pacmanlogs and add syntax highlighting

pacman.log is a filetype common to Arch Liux and related distributions.
Add some simple syntax highlighting for the pacmanlog filetype.

closes: #13618

Signed-off-by: Ronan Pigott <ronan@rjp.ie>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-04 20:46:15 +01:00
Christian Brabandt
ca2eca7c79 runtime(doc): reference 'go-!' inside os_win32.txt for !start
closes: #13583

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-04 20:41:47 +01:00
Yegappan Lakshmanan
3ee25965e4 patch 9.0.2147: Type check tests fail without the channel feature
Problem:  Type check tests fail without the channel feature
Solution: only run tests, when Vim was build with +channel

fixes: #13617
closes: #13619

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-04 20:31:14 +01:00
Christian Brabandt
0d0b3b1951 patch 9.0.2146: text-property without type errors when joining
Problem:  text-property without type errors when joining
Solution: count all text-properties, with or without type
          before joining lines

Error when joining lines with text properties without a proper type

When joining lines, we need to consider all text properties that are
attached to a line, even when those text properties are invalid and do
not have a type attached to them.

However, since patch v9.0.0993
(commit: 89469d157a)
those text properties won't be counted when joining lines and therefore
this will cause the adjustment for text properties on joining to go
wrong (and may later cause SIGABRT with an invalid free pointer)

I am not sure, why the condition to not count text properties with a
valid type was added in patch v9.0.993, because no test fails if those
condition is removed. So let's just remove this condition and add a test
that verifies, that we are able to join lines, even when the text
properties attached to it do not have a valid type.

fixes: #13609
closes: #13614

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-03 17:56:43 +01:00
zeertzjq
5b4d1fcbf0 patch 9.0.2145: wrong scrolling in insert mode with smoothscroll
Problem:  Wrong scrolling in Insert mode with 'smoothscroll' at the
          bottom of the window.
Solution: Don't use set_topline() when 'smoothscroll' is set.

fixes: #13612
closes: #13613

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-03 17:54:10 +01:00
zeertzjq
4e26a9aab6 patch 9.0.2144: Text properties causes wrong line wrapping
Problem:  Text properties causes wrong line wrapping to be drawn.
Solution: Find the index of the last text property that inserts text.

closes: #13611

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-03 17:50:47 +01:00
Christian Brabandt
c089c3816b CI: disable the test_terminal_resize2() test for GH CI in gui mode (#13615)
becaues it tends to time-out CI for unknown reasons.

related: #13566

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-03 17:48:29 +01:00
Christian Brabandt
abfa13ebe9 patch 9.0.2143: [security]: buffer-overflow in ex_substitute
Problem:  [security]: buffer-overflow in ex_substitute
Solution: clear memory after allocating

When allocating the new_start pointer in ex_substitute() the memory
pointer points to some garbage that the following for loop in
ex_cmds.c:4743 confuses and causes it to accessing the new_start pointer
beyond it's size, leading to a buffer-overlow.

So fix this by using alloc_clear() instead of alloc(), which will
clear the memory by NUL and therefore cause the loop to terminate
correctly.

Reported by @henices, thanks!

closes: #13596
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 18:58:51 +01:00
Christian Brabandt
b39b240c38 patch 9.0.2142: [security]: stack-buffer-overflow in option callback functions
Problem:  [security]: stack-buffer-overflow in option callback functions
Solution: pass size of errbuf down the call stack, use snprintf()
          instead of sprintf()

We pass the error buffer down to the option callback functions, but in
some parts of the code, we simply use sprintf(buf) to write into the error
buffer, which can overflow.

So let's pass down the length of the error buffer and use sprintf(buf, size)
instead.

Reported by @henices, thanks!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 18:58:51 +01:00
Christian Brabandt
0fb375aae6 patch 9.0.2141: [security]: buffer-overflow in suggest_trie_walk
Problem:  [security]: buffer-overflow in suggest_trie_walk
Solution: Check n before using it as index into byts array

Basically, n as an index into the byts array, can point to beyond the byts
array. So let's double check, that n is within the expected range after
incrementing it from sp->ts_curi and bail out if it would be invalid.

Reported by @henices, thanks!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 18:58:50 +01:00
Christian Brabandt
eec0c2b3a4 patch 9.0.2140: [security]: use-after-free in win-enter
Problem:  [security]: use-after-free in win-enter
Solution: validate window pointer before calling win_enter()

win_goto() may stop visual mode, if it is active. However, this may in
turn trigger the ModeChanged autocommand, which could potentially free
the wp pointer which was valid before now became stale and points to now
freed memory.

So before calling win_enter(), let's verify one more time, that the
wp pointer still points to a valid window structure.

Reported by @henices, thanks!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 18:58:50 +01:00
Peter Simonyi
9cc95aa0d8 CI: check that all files are listed in Filelist (#13601)
Sometimes patches add files that should be included in tarballs for
distribution, but are not added to Filelist (used by Makefile to build
the tar archive).  This can break the build, or it can be silently
ignored as runtime files are simply not included in the distribution.

Add a CI check to ensure all files tracked in the repository are
assigned to a variable in Filelist.  A few files were not listed because
they do not need to be included in builds and tarballs, so add an IGNORE
variable for these exceptions.

Co-authored-by: Peter Simonyi <pts@petersimonyi.ca>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 18:07:42 +01:00
Christian Brabandt
4f3480c943 patch 9.0.2139: html.angular ft is problematic
Problem:  html.angular ft is problematic
Solution: partly revert v9.0.2137

The html.angular filetype causes issues and does not trigger FileType
autocommands for the html or angular filetypes.

So let's roll back that particular change and detect this only as html
file

related: https://github.com/vim/vim/pull/13594#issuecomment-1834465890

closes: #13604

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 18:01:17 +01:00
Christian Brabandt
926c3f45a2 CI: disable the test_terminal_resize() test for GH CI in GUI (#13603)
fixes: #13566

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 17:59:32 +01:00
Ernie Rael
fda700cb04 patch 9.0.2138: Overflow logic requires long long
Problem:  Overflow logic requires long long
Solution: Define vimlong_T data type to make life easier
          for porters

closes: #13598

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-30 18:20:00 +01:00
Peter Simonyi
72314bb85f runtime(Filelist): include several missing files (#13600)
These files were discovered to be missing from Filelist, and thus
distribution tarballs:
- editorconfig plugin
- extra files for Rust support
- readme for Haiku OS builds

Co-authored-by: Peter Simonyi <pts@petersimonyi.ca>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-30 17:46:55 +01:00
ObserverOfTime
7bed263c34 patch 9.0.2137: Can't detect angular & mustache filetypes
Problem:  Can't detect angular & mustache filetypes
Solution: Detect *.mustache as Mustache filetype;
          detect *.component.html as html.angular filetype

closes: #13594

Signed-off-by: ObserverOfTime <chronobserver@disroot.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-30 17:41:19 +01:00
Christian Brabandt
110dd905dd runtime(syntax-test): ci fails, disable html test for now
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-30 17:33:32 +01:00
Shawn Hatori
8ceb99001b patch 9.0.2136: MSVC errorformat can be improved
Problem:  MSVC errorformat can be improved
Solution: parse error type and column number in MSVC errorformat

closes: #13587

Signed-off-by: Shawn Hatori <shawn.hatori@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-28 20:51:07 +01:00
zeertzjq
fcaeb3d42b patch 9.0.2135: No test for mode() when executing Ex commands
Problem:  No test for mode() when executing Ex commands
Solution: Add some test cases and simplify several other test cases.
          Also add a few more test cases for ModeChanged.

closes: #13588

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-28 20:46:29 +01:00
K.Takata
ffd6d31cb2 runtime(lang): Revise Makefile (#13589)
* Revise runtime/lang/Makefile
* Use predefined variables (`$@`, `$<`) instead of the actual file names.
  (Adding new rules should become easier.)
* Adjust spacing.
* Regenerate converted menu files

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-28 20:44:28 +01:00
dkearns
a9058440b7 runtime(html): Update syntax file (#13591)
Add missing search element and update ARIA attribute list.

Add a very basic test file to check all elements are matched.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-28 20:41:41 +01:00
Christian Brabandt
c4ffeddfe5 patch 9.0.2134: ml_get error when scrolling
Problem:  ml_get error when scrolling after delete
Solution: mark topline to be validated in main_loop
          if it is larger than current buffers line
          count

reset_lnums() is called after e.g. TextChanged autocommands and it may
accidentally cause curwin->w_topline to become invalid, e.g. if the
autocommand has deleted some lines.

So verify that curwin->w_topline points to a valid line and if not, mark
the window to have w_topline recalculated in main_loop() in
update_topline() after reset_lnums() returns.

fixes: #13568
fixes: #13578

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-27 23:25:03 +01:00
Sam-programs
d1c3ef1f47 patch 9.0.2133: Cannot detect overstrike mode in Cmdline mode
Problem:  Cannot detect overstrike mode in Cmdline mode
Solution: Make mode() return "cr" for overstrike

closes: #13569

Signed-off-by: Sam-programs <None>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-27 22:22:51 +01:00
Christian Brabandt
5c23343770 patch 9.0.2132: Duplicate Netbeans Error Message
Problem:  Duplicate Netbeans Error Message
Solution: Remove duplicate message

We have 2 error Messages used for the Netbeans interface:

- EXTERN char e_invalid_buffer_identifier_in_close[]
  INIT(= N_("E648: Invalid buffer identifier in close"));
- EXTERN char e_invalid_buffer_identifier_in_close_2[]
  INIT(= N_("E649: Invalid buffer identifier in close"));

Since the error message is exactly the same, get rid of the  second
message.

closes: #13584

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-27 20:04:24 +01:00
Daniel Buch Hansen
b9efc72c24 patch 9.0.2131: not all nushell files detected
Problem:  not all nushell files detected
Solution: use *.nu to detect nushell files

closes: #13586

Signed-off-by: Daniel Buch Hansen <boogiewasthere@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-27 20:00:56 +01:00
Christian Brabandt
c6754de5dd translation(de): Updated German translations (#13585)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-27 19:59:15 +01:00
Chris Aumann
cf40409e7d runtime(nginx): add additional nginx keywords (#13581)
* Add support for missing keywords to the nginx syntax plugin

This adds support for several keywords from
- the built-in HTTP/2 module,
- the built-in SSL module,
- the built-in uWSGI module,
- the experimental QUIC branch,
- the third-party SSL CT module,
- the third-party dynamic TLS records patch.

Co-Author: ObserverOfTime <chronobserver@disroot.org>

* Add missing http2/ http3 keywords to nginx plugin

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-26 15:06:27 +01:00
Restorer
64c6bfd8ee runtime(tutor): add Make_mvc.mak file for tutor (#13580)
* Added Make_mvc.mak file for tutor

* updated Filelist

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-26 15:01:56 +01:00
Restorer
2bad26fe2c translation(ru): updated Russian translations for tutorials (#13579)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-26 10:14:11 +01:00
Antonio Giovanni Colombo
4e7727dd88 translation(it): updated Italian translation
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-26 10:11:54 +01:00
Ken Takata
075ad70474 patch 9.0.2130: some errors with translation Makefiles
Problem:  some errors with translation Makefiles
Solution: fix issues

Update src/po/ makefiles after 9.0.2127

* Change how to check `%LANGUAGE%`.
  Check it only when needed.
* Add double quotes to where `GETTEXT_PATH` is used.
  Before 9.0.2127, this worked: `nmake -f Make_mvc.mak GETTEXT_PATH="\"C:\Program Files\Git\usr\bin\""` (which was a bit tricky.)
  9.0.2127 broke this and syntax error occurred.
  This doesn't work either in 9.0.2127: `nmake -f Make_mvc.mak GETTEXT_PATH="C:\Program Files\Git\usr\bin"`
  With this Commit, this works: `nmake -f Make_mvc.mak GETTEXT_PATH="C:\Program Files\Git\usr\bin"`
* Better error report for the `check` target.
  Show the line number of the error. (Imported from vim-jp/lang-ja.)

closes: #13567

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-25 15:51:00 +01:00
mityu
a555069b7d patch 9.0.2129: [security]: use-after-free in call_dfunc()
Problem:  [security]: use-after-free in call_dfunc()
Solution: Refresh dfunc pointer

closes: #13571

This Commit fixes a SEGV caused by a use-after-free bug in call_dfunc().
When calling check_ufunc_arg_types() from the call_dfunc() it may cause
def functions to be re-compiled and if there are too many def functions,
the def_functions array will be re-allocated.  Which means, that the
dfunc pointer in call_dfunc() now starts pointing to freed memory.

So we need to reset the dfunc pointer after calling
check_ufunc_arg_types().

Let's also add a test, to ensure we do not regress.

Signed-off-by: mityu <mityu.mail@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-25 15:41:20 +01:00
Restorer
8c14e79737 runtime(doc): Update doc Makefiles with comments from #13567 (#13577)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-25 15:39:51 +01:00
Jōshin
813a538bb3 runtime(tsx): add indentation plugin (fixes #13574) (#13576)
for now, let's just use the typescript indent file.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-25 15:38:09 +01:00
Julien Marrec
2e31065a65 patch 9.0.2128: runtime(swig): add syntax and filetype plugins
Add syntax and filetype plugins for SWIG (Simplified Wrapper Interface
Generator) description files.

The default syntax for .i files highlights comments in a reverse
color scheme which doesn't look well.  This syntax builds
on vim's c++ syntax by adding highlighting for common swig
directives and user defined directives.  For an alternative
syntax, see vimscript #1247 (which I found after writing this).

closes: #13562

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
Co-authored-by: Julien Marrec <julien.marrec@gmail.com>
Signed-off-by: Julien Marrec <julien.marrec@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-25 15:30:46 +01:00
RestorerZ
e214692718 patch 9.0.2127: translation Makefiles can be improved
Problem:  translation Makefiles can be improved
Solution: Modified and extended po-related Makefiles and
          related files

closes: #13518

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-23 20:58:32 +01:00
zeertzjq
00624a2fa0 patch 9.0.2126: unused assignments when checking 'listchars'
Problem:  Unused assignments when checking the value of 'listchars'.
Solution: Loop only once when just checking the value.  Add a test to
          check that this change doesn't cause double-free.

closes: #13559

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-23 20:47:16 +01:00
zeertzjq
40ed6711bd patch 9.0.2125: File info disappears when 'cmdheight' has decreased
Problem:  File info disappears immediately when 'cmdheight' has just
          decreased due to switching tabpage and 'shortmess' doesn't
          contain 'o' or 'O'.
Solution: Make sure msg_row isn't smaller than cmdline_row.

fixes: #13560
closes: #13561

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-23 20:37:01 +01:00
Ernie Rael
2b0882fa65 patch 9.0.2124: INT overflow detection logic can be simplified
Problem:  INT overflow logic can be simplified
Solution: introduce trim_to_int() function

closes: #13556

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-23 20:33:05 +01:00
Christian Brabandt
df63da98d8 patch 9.0.2123: Problem with initializing the length of range() lists
Problem:  Problem with initializing the length of range() lists
Solution: Set length explicitly when it shouldn't contain any items

range() may cause a wrong calculation of list length, which may later
then cause a segfault in list_find().  This is usually not a problem,
because range_list_materialize() calculates the length, when it
materializes the list.

In addition, in list_find() when the length of the range was wrongly
initialized, it may seem to be valid, so the check for list index
out-of-bounds will not be true, because it is called before the list is
actually materialized. And so we may eventually try to access a null
pointer, causing a segfault.

So this patch does 3 things:

- In f_range(), when we know that the list should be empty, explicitly
  set the list->lv_len value to zero. This should happen, when
  start is larger than end (in case the stride is positive) or
  end is larger than start when the stride is negative.
  This should fix the underlying issue properly. However,

- as a safety measure, let's check that the requested index is not
  out of range one more time, after the list has been materialized
  and return NULL in case it suddenly is.

- add a few more tests to verify the behaviour.

fixes: #13557
closes: #13563

Co-authored-by: Tim Pope <tpope@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-23 20:14:28 +01:00
Christian Brabandt
3770574e4a patch 9.0.2122: [security]: prevent overflow in indenting
Problem:  [security]: prevent overflow in indenting
Solution: use long long and remove cast to (int)

The shiftwidth option values are defined as being long. However, when
calculating the actual amount of indent, we cast down to (int), which
may cause the shiftwidth value to become negative and later it may even
cause Vim to try to allocate a huge amount of memory.

We already use long and long long variable types to calculate the indent
(and detect possible overflows), so the cast to (int) seems superfluous
and can be safely removed. So let's just remove the (int) cast and
calculate the indent using longs.

Additionally, the 'shiftwidth' option value is also used when determining
the actual 'cino' options. There it can again cause another overflow, so
make sure it is safe in parse_cino() as well.

fixes: #13554
closes: #13555

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-22 22:18:35 +01:00
Christian Brabandt
26c11c5688 patch 9.0.2121: [security]: use-after-free in ex_substitute
Problem:  [security]: use-after-free in ex_substitute
Solution: always allocate memory

closes: #13552

A recursive :substitute command could cause a heap-use-after free in Vim
(CVE-2023-48706).

The whole reproducible test is a bit tricky, I can only reproduce this
reliably when no previous substitution command has been used yet
(which is the reason, the test needs to run as first one in the
test_substitute.vim file) and as a combination of the `:~` command
together with a :s command that contains the special substitution atom `~\=`
which will make use of a sub-replace special atom and calls a vim script
function.

There was a comment in the existing :s code, that already makes the
`sub` variable allocate memory so that a recursive :s call won't be able
to cause any issues here, so this was known as a potential problem
already.  But for the current test-case that one does not work, because
the substitution does not start with `\=` but with `~\=` (and since
there does not yet exist a previous substitution atom, Vim will simply
increment the `sub` pointer (which then was not allocated dynamically)
and later one happily use a sub-replace special expression (which could
then free the `sub` var).

The following commit fixes this, by making the sub var always using
allocated memory, which also means we need to free the pointer whenever
we leave the function. Since sub is now always an allocated variable,
we also do no longer need the sub_copy variable anymore, since this one
was used to indicated when sub pointed to allocated memory (and had
therefore to be freed on exit) and when not.

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-c8qm-x72m-q53q

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-22 21:52:45 +01:00
K.Takata
8750e3cf81 runtime(netrw): Fix handling of very long filename on longlist style (#12150)
If there is a file with a very long filename (longer than
g:netrw_maxfilenamelen), and if g:netrw_liststyle is set to 1, no space
is inserted between the filename and the filesize and the file cannot be
opened because of this.

E.g.:
```
$ echo hello > 12345678901234567890123456789012	  # 32 bytes: OK
$ echo hello > 123456789012345678901234567890123  # 33 bytes: not OK
$ echo hello > 1234567890123456789012345678901234 # 34 bytes: not OK
$ echo hello > こんにちは                         # multibyte filename
$ LC_ALL=C.UTF-8 vim . --clean --cmd "set loadplugins" --cmd "let g:netrw_liststyle=1"
```

Then, it will be shown like this:
```
" ============================================================================
" Netrw Directory Listing                                        (netrw v171)
"   /cygdrive/c/work/netrw-test
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:special
" ==============================================================================
../                              0 Mon Mar 13 19:25:16 2023
./                               0 Mon Mar 13 19:44:58 2023
12345678901234567890123456789012 6 Mon Mar 13 19:29:43 2023
12345678901234567890123456789012346 Mon Mar 13 19:32:40 2023
1234567890123456789012345678901236 Mon Mar 13 19:29:49 2023
こんにちは                  6 Mon Mar 13 19:30:41 2023
```

If the length of the filename is 32 bytes, there is a space between the
filename and the filesize. However, when it is longer than 32 bytes, no
space is shown.

Also, you may find that the filesize of the multibyte named file is not
aligned.

After this patch is applied, the filelist will be shown like this:
```
" ============================================================================
" Netrw Directory Listing                                        (netrw v171)
"   /cygdrive/c/work/netrw-test
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:special
" ==============================================================================
../                                             0 Mon Mar 13 20:49:22 2023
./                                              0 Mon Mar 13 21:12:14 2023
1234567890123456789012345678901             10000 Mon Mar 13 20:57:55 2023
12345678901234567890123456789012                6 Mon Mar 13 19:29:43 2023
123456789012345678901234567890123               6 Mon Mar 13 19:29:49 2023
1234567890123456789012345678901234              6 Mon Mar 13 19:32:40 2023
1234567890123456789012345678901234567       10000 Mon Mar 13 21:03:23 2023
1234567890123456789012345678901234567890    10000 Mon Mar 13 21:03:36 2023
123456789012345678901234567890123456789012  10000 Mon Mar 13 21:03:59 2023
1234567890123456789012345678901234567890123  10000 Mon Mar 13 21:03:45 2023
1234567890123456789012345678901234567890123456  5 Mon Mar 13 21:08:15 2023
12345678901234567890123456789012345678901234567  10 Mon Mar 13 21:05:21 2023
こんにちは                                      6 Mon Mar 13 19:30:41 2023
```

Now we have 32 + 2 + 15 = 49 characters for filename and filesize.
It tries to align the filesize as much as possible.
The last line that has multibyte filename is also aligned.

Also fixed the issue that the file list is not shown correctly when
g:netrw_sort_by is set to 'size' and g:netrw_sizestyle is set to 'h' or
'H'.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-22 10:20:01 +01:00
Christian Brabandt
4e5c3cf07b patch 9.0.2120: un-used assignment in do_source_buffer_init
Problem:  un-used assignment in do_source_buffer_init
Solution: Remove it

Coverity warns about assigning NULL to line in scriptfile.c:1408,
because right after that assignment, in the next iteration of the loop,
line will be overwritten by the next value from vim_strsave().

And in case this was the last iteration, the line variable is no longer
used until the function returns. So we can safely remove that assignment.

closes: #13547

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:59:54 +01:00
Christian Brabandt
6b36645f07 patch 9.0.2119: remove dead-condition in ex_class
Problem:  remove dead-condition in ex_class()
Solution: remove the extra condition

The variable is_class must be true once we reach the

,----
| else if (has_static)
`----

in line 1750, because we break out earlier if is_class is false in line
1598 of vim9class.c. And once 'has_static = TRUE', we must be in a
class and there fore is_class is true.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:57:05 +01:00
Christian Brabandt
a5218a7330 patch 9.0.2118: [security]: avoid double-free in get_style_font_variants
Problem:  [security]: avoid double-free
Solution: Only fee plain_font, when it is not the same as bold_font

When plain_font == bold_font and bold_font is not NULL, we may end up
trying to free bold_font again, which already has been freed a few lines
above.

So only free bold_font, when the condition gui.font_can_bold is true,
which means that bold_font is not pointing to plain_font (so it needs to
be freed separately).

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:54:12 +01:00
Christian Brabandt
567cae2630 patch 9.0.2117: [security] use-after-free in qf_free_items
Problem:  [security] use-after-free in qf_free_items
Solution: only access qfpnext, if it hasn't been freed

Coverity discovered a possible use-after-free in qf_free_items. When
freeing the qfline items, we may access freed memory, when qfp ==
qfpnext.

So only access qfpnext, when it hasn't been freed.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:52:12 +01:00
Christian Brabandt
cb0c113ddc runtime(netrw): expand $COMSPEC without applying 'wildignore' (#13542)
When expanding $COMSPEC and a user has set :set wildignore=*.exe
netrw won't be able to properly cmd.exe, because it does not ignore the
wildignore setting.

So let's explicitly use expand() without applying the 'wildignore' and
'suffixes' settings to the result

closes: #13426

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:48:16 +01:00
dkearns
69866449dd runtime(vim): Improve keymap file highlighting (#13550)
- Match :loadkeymap to EOF as a region and contain only allowed items.
- Add highlighting for <Char- notation.
- add basic syntax highlighting tests

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:43:40 +01:00
zdohnal
d2c977bb7c runtime(Filelist): include new doc-Makefiles (#13551)
Tags for help files disappeared with the latest Vim update in Fedora,
which is caused by silent error (it didn't stop the build) about missing
file. I use 'make unixall' in Fedora to get the latest patchlevels and
the new files were missing from Filelist file which is used for
generating the tarball.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:42:56 +01:00
h_east
596a9f29c8 runtime(doc): Fix whitespace and formatting of some help files (#13549)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 12:24:23 +00:00
njohnston
aabca259fa runtime(doc): minor typo fixes (#13548)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-20 00:18:57 +01:00
Luuk van Baal
e670d17342 patch 9.0.2116: No test for defining sign without attribute
Problem:  No test for defining sign without attribute
Solution: Add test for defining sign without attributes

closes: #13544

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-19 10:57:02 +01:00
Christian Brabandt
6701abfb52 patch 9.0.2115: crash when callback function aborts because of recursiveness
Problem:  crash when callback function aborts because of recursiveness
Solution: correctly initialize rettv

Initialize rettv in invoke_popup_callback()

Since v9.0.2030, call_callback may exit early when the callback recurses
too much.  This meant that call_func, which would set rettv->v_type =
VAR_UNKNOWN, was not being called.

Without rettv->v_type being explicitly set, it still contained whatever
garbage was used to initialize the stack value in invoke_popup_callback.
This would lead to possible crashes when calling clear_tv(&rettv).

Rather than rely on action at a distance, explicitly initialize rettv's
type to VAR_UNKNOWN so clear_tv can tell nothing needs to be done.

closes: #13495
closes: #13545
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-19 10:52:50 +01:00
Christian Brabandt
22cbc8a4e1 patch 9.0.2114: overflow detection not accurate when adding digits
Problem:  overflow detection not accurate when adding digits
Solution: Use a helper function

Use a helper function to better detect overflows before adding integer
digits to a long or an integer variable respectively. Signal the
overflow to the caller function.

closes: #13539

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Michael Henry <vim@drmikehenry.com>
Signed-off-by: Ernie Rael <errael@raelity.com>
2023-11-19 10:47:21 +01:00
Christian Brabandt
22a97fc241 patch 9.0.2113: Coverity warns for another overflow in shift_line()
Problem:  Coverity warns for another overflow in shift_line()
Solution: Test for INT_MAX after the if condition, cast integer values
          to (long long) before multiplying.

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Michael Henry <vim@drmikehenry.com>
Signed-off-by: Ernie Rael <errael@raelity.com>
2023-11-19 10:45:24 +01:00
Restorer
ab4f27e2a8 runtime(doc): Refactor doc-Makefiles (#13519)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-18 17:12:20 +01:00
Christian Brabandt
6ffe084e6e runtime(doc): document proper notation of gVim, document vim-security list
Also, while at it, document the vim-security mailing list.

closes: #13429

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-18 10:13:13 +01:00
Ivan Pešić
cc6be3e755 translation(sr): Update Serbian messages translation (#13538)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-17 12:54:10 +01:00
Christian Brabandt
6bf131888a patch 9.0.2112: [security]: overflow in shift_line
Problem:  [security]: overflow in shift_line
Solution: allow a max indent of INT_MAX

[security]: overflow in shift_line

When shifting lines in operator pending mode and using a very large
value, we may overflow the size of integer. Fix this by using a long
variable, testing if the result would be larger than INT_MAX and if so,
indent by INT_MAX value.

Special case: We cannot use long here, since on 32bit architectures (or
on Windows?), it typically cannot take larger values than a plain int,
so we have to use long long count, decide whether the resulting
multiplication of the shiftwidth value * amount is larger than INT_MAX
and if so, we will store INT_MAX as possible larges value in the long
long count variable.

Then we can safely cast it back to int when calling the functions to set
the indent (set_indent() or change_indent()). So this should be safe.

Add a test that when using a huge value in operator pending mode for
shifting, we will shift by INT_MAX

closes: #13535

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:38 +01:00
Christian Brabandt
73b2d3790c patch 9.0.2111: [security]: overflow in get_number
Problem:  [security]: overflow in get_number
Solution: Return 0 when the count gets too large

[security]: overflow in get_number

When using the z= command, we may overflow the count with values larger
than MAX_INT. So verify that we do not overflow and in case when an
overflow is detected, simply return 0

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:38 +01:00
Christian Brabandt
060623e4a3 patch 9.0.2110: [security]: overflow in ex address parsing
Problem:  [security]: overflow in ex address parsing
Solution: Verify that lnum is positive, before substracting from
          LONG_MAX

[security]: overflow in ex address parsing

When parsing relative ex addresses one may unintentionally cause an
overflow (because LONG_MAX - lnum will overflow for negative addresses).

So verify that lnum is actually positive before doing the overflow
check.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:38 +01:00
Christian Brabandt
58f9befca1 patch 9.0.2109: [security]: overflow in nv_z_get_count
Problem:  [security]: overflow in nv_z_get_count
Solution: break out, if count is too large

When getting the count for a normal z command, it may overflow for large
counts given. So verify, that we can safely store the result in a long.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:37 +01:00
Christian Brabandt
ac63787734 patch 9.0.2108: [security]: overflow with count for :s command
Problem:  [security]: overflow with count for :s command
Solution: Abort the :s command if the count is too large

If the count after the :s command is larger than what fits into a
(signed) long variable, abort with e_value_too_large.

Adds a test with INT_MAX as count and verify it correctly fails.

It seems the return value on Windows using mingw compiler wraps around,
so the initial test using :s/./b/9999999999999999999999999990 doesn't
fail there, since the count is wrapping around several times and finally
is no longer larger than 2147483647. So let's just use 2147483647 in the
test, which hopefully will always cause a failure

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:37 +01:00
Christian Brabandt
cb0b99f067 patch 9.0.2107: [security]: FPE in adjust_plines_for_skipcol
Problem:  [security]: FPE in adjust_plines_for_skipcol
Solution: don't divide by zero, return zero

Prevent a floating point exception when calculating w_skipcol (which can
happen with a small window when the number option is set and cpo+=n).

Add a test to verify

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:37 +01:00
Christian Brabandt
25aabc2b8e patch 9.0.2106: [security]: Use-after-free in win_close()
Problem:  [security]: Use-after-free in win_close()
Solution: Check window is valid, before accessing it

If the current window structure is no longer valid (because a previous
autocommand has already freed this window), fail and return before
attempting to set win->w_closing variable.

Add a test to trigger ASAN in CI

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:00 +01:00
Christian Brabandt
67abf1592c runtime(tar): comment out strange error condition check
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-14 17:17:12 +01:00
Luuk van Baal
bb800a7907 patch 9.0.2105: skipcol not reset when topline changed
Problem:  Skipcol is not reset when topline changed scrolling cursor to top
Solution: reset skipcol

closes: #13528
closes: #13532

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-14 17:05:18 +01:00
rhysd
bc8f79d36a patch 9.0.2104: wast filetype should be replaced by wat filetype
Problem:  wast filetype should be replaced by wat filetype
Solution: start using the official wat filetype name

runtime: rename `wast` filetype to `wat` (Wasm text format)

The problem is the name of the current filetype wast. When the plugin
was initially created, the file extension for Wasm text format was not
fixed and .wast was more popular.

However, recently .wat became the official file extension for
WebAssembly text (WAT) format and .wast is now a file extension for the
unofficial WAST format, which is a superset of .wat for the convenience
to describe the Wasm specification conformance tests.

https://webassembly.js.org/docs/contrib-wat-vs-wast.html

However for now, let's keep using the `wat` filetype even for the .wast
extension, so that we at least do not lose the filetype settings and
syntax highlighting. This can be adjusted later, if it turns out to have
a separate need for.

closes: #13533

Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-14 16:46:07 +01:00
Christian Brabandt
30c762d99a runtime(doc): fix typo in pi_gzip.txt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-14 16:44:37 +01:00
Christian Brabandt
2076463e38 patch 9.0.2103: recursive callback may cause issues on some archs
Problem:  recursive callback may cause issues on some archs
Solution: Decrease the limit drastically to 20

Recursive callback limit causes problems on some architectures

Since commit 47510f3d65 we have a test
that causes a recursive popup callback function to be executed. However
it seems the current limit of 'maxfuncdepth' option value is still too
recursive for some 32bit architectures (e.g. 32bit ARM).

So instead of allowing a default limit of 100 (default value for
'maxfuncdepth'), let's reduce this limit to 20. I don't think there is a
use case where one would need such a high recursive callback limit and a
limit of 20 seems reasonable (although it is currently hard-coded).

closes: #13495
closes: #13502

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-12 16:59:29 +01:00
Christian Brabandt
9588666360 patch 9.0.2102: matchparen highlight not cleared in completion mode
Problem:  matchparen highlight not cleared in completion mode
Solution: Clear matchparen highlighting in completion mode

Remove hard-coded hack in insexpand.c to clear the :3match before
displaying the completion menu.

Add a test for matchparen highlighting. While at it, move all test tests
related to the matchparen plugin into a separate test file.

closes: #13493
closes: #13524

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-12 16:55:01 +01:00
Shane-XB-Qian
2dd613f57b runtime(termdebug): improve the breakpoint sign label (#13525)
// related #12589
// that should be the last chat (I) with Bram, r.i.p

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-12 16:53:39 +01:00
shane.xb.qian
4ae16d721a Improve CONTRIBUTING.md
closes: #13521

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-12 16:49:07 +01:00
shane.xb.qian
fdbadea4b6 patch 9.0.2101: CI: test_termdebug may still fail
Problem:  CI: test_termdebug may still fail
Solution: use term_wait() to make it more robust

closes: #13529

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-12 09:42:12 +01:00
Restorer
424da590e4 runtime(doc): Renamed "makefile_*.mak" for Vim documentation (#13517)
* Rename makefile_all.mak and makefile_mvc.mak

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 19:26:00 +01:00
dkearns
2c133f6c1a runtime(lynx): Update for Lynx 2.8.9 (#13510)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 19:06:56 +01:00
dkearns
9358b8d993 runtime(vim): Improve :let-heredoc syntax highlighting (#12923)
"trim" and "eval" are allowed in any order and whitespace is not
required after "=<<".

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 19:06:01 +01:00
Christian Brabandt
305127f9f2 patch 9.0.2100: CI: test_termdebug fails
Problem:  CI: test_termdebug fails
Solution: only test for a changed winlayout, if the window
          width actually changed

Also, include an unrelated comment (which doesn't warrant its own patch
number)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 18:59:33 +01:00
Christian Brabandt
1b08d2cd07 runtime(doc): clarify when formatoptions applies
closes: #13503

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 15:51:19 +01:00
Ivan Grimaldi
5994329667 runtime(i3config): Update for i3 4.23 (#13522)
Co-authored-by: Ivan Grimaldi <grimaldi.ivam@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 13:09:26 +01:00
Nir Lichtman
6cd2d1df92 patch 9.0.2099: win32: terminal codes clear the terminal
Problem:  Terminal control codes¹ are sent even when silent
          mode is on, causing the terminal to clear up
Solution: Block any terminal codes when silent mode is on

¹https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences

fixes: #12822
closes: #13521

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 11:33:43 +01:00
ccn
2c5240ec8b runtime(doc): Update usr_51.txt to be more inclusive (#13496)
use their instead of his as the user may not be male


Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 09:35:50 +01:00
dkearns
521fb7e143 runtime(doc): Add missing null_<type> help tags (#13498)
Problem:  Not all null_<type> values have a help tag
Solution: Add missing help tags

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 09:33:43 +01:00
Philip H
f1952d9fa8 CI: labeler.yml use all instead of any for doc detection (#13507)
fixup: https://github.com/vim/vim/pull/13506#pullrequestreview-1722013761

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 09:14:48 +01:00
ObserverOfTime
4f9074b96c patch 9.0.2098: No filetype support for xcompose files
Problem:  No filetype support for xcompose files
Solution: Add filetype detection

closes: #13508

Signed-off-by: ObserverOfTime <chronobserver@disroot.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 09:12:27 +01:00
Ernie Rael
bee966d3fe runtime(doc): clarify :help inclusion section
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 09:10:24 +01:00
K.Takata
cb5e7a2026 CI: labeler.yml: Add some more component detection rules (#13511)
Add rules for `installer`, `platform-mac`, `platform-windows`, `xxd`.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 09:04:31 +01:00
Gerrit Meier
8f0fe20ff1 patch 9.0.2097: No support for cypher files
Problem:  No support for cypher files
Solution: Add cypher filetype detection

Cypher query language support to work with (mostly) graph databases.

Already existing lsp support in Neovim's nvim-lspconfig:
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cypher_ls

closes: #13516

Signed-off-by: Gerrit Meier <meistermeier@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 08:58:26 +01:00
Ernie Rael
03042a2753 patch 9.0.2096: Vim9: confusing usage of private
Problem:  Vim9: confusing usage of private
Solution: clarify and use protected keyword instead

[vim9class] document `_` as protected instead of private

fixes #13504
closes: #13520

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 08:53:32 +01:00
Philip H
4b0018feca CI: labeler.yml: add documentation label (#13506)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-09 08:51:03 +00:00
zeertzjq
20a94f44b3 runtime(doc): fix grammar in termdebug doc, remove trailing spaces (#13505)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-09 07:21:58 +00:00
shane.xb.qian
ca48202b6f runtime(termdebug): improve window handling, shorten var types
closes #13474

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 22:03:26 +01:00
shane.xb.qian
7fbbd7fdc6 runtime(termdebug): handle buffer-local mappings properly
closes: #13475

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 21:46:30 +01:00
Christian Brabandt
6a650bf696 patch 9.0.2095: statusline may look different than expected
Problem:  statusline may look different than expected
Solution: do not check for highlighting of stl and stlnc characters

statusline fillchar may be different than expected

If the highlighting group for the statusline for the current window
|hl-StatusLine| or the non-current window |hl-StatusLineNC| are cleared
(or do not differ from each other), than Vim will use the hard-coded
fallback values '^' (for the non-current windows) or '=' (for the
current window).  I believe this was done, to make sure the statusline
will always be visible and be distinguishable from the rest of the
window.

However, this may be unexpected, if a user explicitly defined those
fillchar characters just to notice that those values are then not used
by Vim.

So, let's assume users know what they are doing and just always return
the configured stl and stlnc values.  And if they want the statusline to
be non-distinguishable from the rest of the window space, so be it.  It
is their responsibility and Vim shall not know better what to use.

fixes: #13366
closes: #13488

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 21:23:29 +01:00
Yegappan Lakshmanan
1fc47c2c9b patch 9.0.2094: Vim9: need more assignment tests
Problem:  Vim9: need more assignment tests
Solution: Add test for using different types in assignment, function
          arguments and return values

closes: #13491

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 21:10:11 +01:00
dkearns
d56f15caf6 runtime(wget): Update for Wget2 2.1.0 (#13497)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 20:53:20 +01:00
zeertzjq
4d62a2f443 patch 9.0.2093: Unsupported option causes skipping of modeline test
Problem:  Unsupported option causes rest of modeline test to be skipped.
Solution: Revert the change from patch 8.2.1432.

closes: #13499
closes: #13500

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 20:51:02 +01:00
Christian Brabandt
2a94e98792 patch 9.0.2092: tests: failure in test_arabic
Problem:  tests: failure in test_arabic
Solution: adjust the test for the changed arabic keymap

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 19:18:52 +01:00
avidseeker
caee7956a2 runtime(keymap): Switch Hindu-Arabic to Arabic numerals in arabic keymap (#13430)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 17:59:20 +01:00
Restorer
3570631dc6 translation(ru): Update the translation of Russian messages to Vim 9.0.2091 (#13490)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 17:56:14 +01:00
Christian Brabandt
3d37231437 runtime(tar): improve the error detection
Do not rely on the fact, that the last line matches warning, error,
inappropriate or unrecognized to determine if an error occurred. It
could also be a file, contains such a keyword.

So make the error detection slightly more strict and only assume an
error occured, if in addition to those 4 keywords, also a space matches
(this assumes the error message contains a space), which luckily on Unix
not many files match by default.

The whole if condition seems however slightly dubious.  In case an error
happened, this would probably already be caught in the previous if
statement, since this checks for the return code of the tar program.

There may however be tar implementations, that do not set the exit code
for some kind of error (but print an error message)? But let's keep this
check for now, not many people have noticed this behaviour until now, so
it seems to work reasonably well anyhow.

related: #6425
fixes: #13489
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 17:51:09 +01:00
Christian Brabandt
da4e433dc3 runtime(doc): document vim-script library function
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 10:45:49 +01:00
Sean Dewar
b2a4c110a5 runtime(dist): Make dist/vim.vim work properly when lacking vim9script support (#13487)
`:return` cannot be used outside of `:function` (or `:def`) in older Vims
lacking Vim9script support or in Neovim, even when evaluation is being skipped
in the dead `:else` branch.

Instead, use the pattern described in `:h vim9-mix`, which uses `:finish` to end
script processing before it reaches the vim9script stuff.

Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 10:11:37 +01:00
Yegappan Lakshmanan
6709816f78 patch 9.0.2091: Vim9: cannot convert list to string using +=
Problem:  Vim9: cannot convert list to string using +=
          (after 9.0.2072)
Solution: convert dict index to string later in compile_member()

fixes: #13485
closes: #13486

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 10:07:03 +01:00
Christian Brabandt
4f174f0de9 runtime(dist): add legacy version for central vim library
Also, enable the zip and gzip plugins by default, unless those variables
were not explicitly set by the user.

related: #13413

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 11:19:28 +01:00
D. Ben Knoble
cd8a3eaf53 runtime(dist): centralize safe executable check and add vim library (#13413)
Follow up to 816fbcc26 (patch 9.0.1833: [security] runtime file fixes,
2023-08-31) and f7ac0ef50 (runtime: don't execute external commands when
loading ftplugins, 2023-09-06).

This puts the logic for safe executable checks in a single place, by introducing
a central vim library, so all filetypes benefit from consistency.

Notable changes:
- dist#vim because the (autoload) namespace for a new runtime support
  library. Supporting functions should get documentation. It might make
  life easier for NeoVim devs to make the documentation a new file
  rather than cram it into existing files, though we may want
  cross-references to it somewhere…
- The gzip and zip plugins need to be opted into by enabling execution
  of those programs (or the global plugin_exec). This needs
  documentation or discussion.
- This fixes a bug in the zig plugin: code setting s:tmp_cwd was removed
  in f7ac0ef50 (runtime: don't execute external commands when loading
  ftplugins, 2023-09-06), but the variable was still referenced. Since
  the new function takes care of that automatically, the variable is no
  longer needed.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 10:11:17 +01:00
Christian Brabandt
08b1c61e8b runtime(doc): clarify terminal capabilities for focus reporting
closes: #13440

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 10:03:52 +01:00
Christian Brabandt
57f9ce1a09 patch 9.0.2090: complete_info() skips entries with 'noselect'
Problem:  complete_info() skips entries with 'noselect'
Solution: Check, if first entry is at original text state

Unfortunately, Commit daef8c7437
introduced a regression, that when ':set completeopt+=noselect' is set
and no completion item has been selected yet, it did not fill the
complete_info['items'] list.

This happened, because the current match item did not have the
CP_ORIGINAL_TEXT flag set and then the cp->prev pointer did point to the
original flag item, which caused the following while loop to not being
run but being skipped instead.

So when the 'noselect' is set, only start with to the previous selection
item, if the initial completion item has the CP_ORIGINAL_TEXT flag set,
else use the 2nd previous item instead.

fixes: #13451
closes: #13452

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 09:58:14 +01:00
Restorer
b23c1fc596 runtime(doc): Add Makefile for the Vim documentation on Windows (#13467)
* Makefile for the Vim documentation on Windows

* Corrected comments

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 09:57:09 +01:00
GuyBrush
15d270019e patch 9.0.2089: sound_playfile() fails when using powershell
Problem:  sound_playfile() fails when using powershell
Solution: quote filename using doublequotes, don't escape filename,
          because it doesn't use the shell

Avoiding powershell escaping because mci open command doesn't support
single quoted filenames: open 'C:\whatever\sound.wav' is not valid.

closes: #13471

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 09:54:00 +01:00
Yegappan Lakshmanan
5a53925a6e patch 9.0.2088: Vim9: still allows abstract static methods
Problem:  Vim9: still allows abstract static methods
          (after v9.0.2084, v9.0.2085 and v9.0.2087)
Solution: Disallow abstract static methods

closes: #13479

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 09:42:46 +01:00
Lucien Grondin
ce3b0136c6 runtime(sh): Update sh syntax and add shDerefOffset to shDerefVarArray for bash (#13480)
Add shDerefOffset to shDerefVarArray.

Example code:

```bash
declare -a a=({a..z})

echo "${a[@]:1:3}"
```


Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 09:41:37 +01:00
Jiri Slaby
2f54c13292 runtime(script.vim): make strace ft check less strict (#13482)
Strace output, depending on parameters (-ttf this time), can dump both
times and pid:
  1038  07:14:20.959262 execve("./e.py", ["./e.py"], 0x7ffca1422840 /* 51 vars */) = 0 <0.000150>

So loose the regexp matching this, so that the above is matched too.

Fixes #13481.

Co-authored-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 09:39:54 +01:00
Christian Brabandt
33c1da7ff4 patch 9.0.2087: build-failure in vim9class
Problem:  build-failure in vim9class
Solution: reference correct error message,
          disable non-failing test

closes: #13476
closes: #13477

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 22:45:12 +01:00
zeertzjq
deba02ddd4 patch 9.0.2086: code cleanup for option callbacks needed
Problem:  code cleanup for option callbacks needed
Solution: remove flag os_doskip, it's not necessary, as we can check,
          whether an error message was returned

Remove unnecessary field os_doskip

Callback functions for boolean options set os_doskip immediately before
returning an error message, so os_doskip isn't actually needed.

closes: #13461

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 21:01:19 +01:00
Yegappan Lakshmanan
2b358adde0 patch 9.0.2085: Vim9: abstract can be used in interface
Problem:  Vim9: abstract can be used in interface
Solution: Disallow the use of abstract in an interface

fixes: #13456
closes: #13464

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:58:58 +01:00
Yegappan Lakshmanan
ef9e3f8924 patch 9.0.2084: Vim9: abstract static methods are possible
Problem:  Vim9: abstract static methods are possible
Solution: Disallow abstract static methods

fixes: #13462
closes: #13466

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:43:57 +01:00
Lucien Grondin
1858e2b22a runtime(sh) Update sh syntax and add shDblParen to shCaseList (#13469)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:33:56 +01:00
Zdenek Dohnal
1b1c9f272d patch 9.0.2083: Perl: xsubpp may be in non-standard location
Problem:  Perl: xsubpp may be in non-standard location
Solution: Add --with-subpp configure option

configure.ac: Add --with-xsubpp configure option

Some environments (such as flatpaks) cannot count on xsubpp being
in the common Perl directory, so a configure option should be used for
clean solution.

closes: #13470

Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:19:06 +01:00
James McCoy
2b89afd5eb runtime(debversions): Add noble (24.04 LTS) as Ubuntu release name (#13472)
Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:12:29 +01:00
James McCoy
43cb8e1c3b patch 9.0.2082: test_channel may fail because of IPv6 config issue
Problem:  test_channel may fail because of IPv6 config issues
Solution: Catch and skip the test, if getaddrinfo() fails with
          'Address family not supported'

Mark tests as skipped when ch_open encounters E901

On some of the Debian build systems, the IPv6 channel tests fail because
`ch_open('[::1]:<port>', ...)` raises the error "E901: getaddrinfo() in
channel_open(): Address family for hostname not supported".

This appears to happen because getaddrinfo() can't perform the reverse
lookup for the ::1, which is a config issue on that system.  Therefore,
instead of reporting a test failure, mark the test as skipped due to the
bad network config

closes: #13473

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:05:38 +01:00
Luuk van Baal
1bf1bf569b patch 9.0.2081: smoothscroll may result in wrong cursor position
Problem:  With 'smoothscroll' set, "w_skipcol" is not reset when unsetting 'wrap'.
          Resulting in incorrect calculation of the cursor position.
Solution: Reset "w_skipcol" when unsetting 'wrap'.

fixes:  #12970
closes: #13439

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-28 21:43:31 +02:00
Lucien Grondin
a390e984db runtime(sh): add shDblParen to shLoopList for bash (#13445)
add shDblParen to shLoopList to correctly highlight
arithmetic expressions for Bash and Ksh

This should allow code such as:

```bash
declare -i i j
for i in foo bar
do ((j = 1 << j))
done
```

Signed-off-by: Lucien Grondin <grondilu@yahoo.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-28 21:40:48 +02:00
Yegappan Lakshmanan
171c50e0b0 patch 9.0.2080: vim9_script test too large
Problem:  vim9_script test too large
Solution: split vim9 type alias test into
          separate test file

Move type alias tests to a separate test file

closes: #13447

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-28 21:31:53 +02:00
dkearns
8ebdbc9e6d runtime(doc): all secure options should note this restriction in the documentation (#13448)
Problem:  Not all secure options document their status
Solution: Describe secure context :set restrictions in each help entry

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-28 21:26:19 +02:00
Doug Kearns
c1c177a47b patch 9.0.2079: Not all Dart files detected
Problem:  Not all Dart files detected
Solution: Add shebang filetype detection for Dart

closes: #13449

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-28 21:21:49 +02:00
Yegappan Lakshmanan
feaccd2395 patch 9.0.2078: several problems with type aliases
Problem:  several problems with type aliases
Solution: Check for more error conditions, add tests,
          fix issues

Check for more error conditions and add additional tests

fixes  #13434
fixes  #13437
fixes  #13438
closes #13441

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-28 15:53:55 +02:00
Christian Brabandt
87ca5e86fa patch 9.0.2077: CI fails because of trailing whitespace in test
Problem:  CI fails because of trailing whitespace in test
Solution: Remove it

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-27 19:48:38 +02:00
Yegappan Lakshmanan
ec3cebbd2b patch 9.0.2076: Vim9: No support for type aliases
Problem:  Vim9: No support for type aliases
Solution: Implement :type command

A type definition is giving a name to a type specification.  This also known
type alias.

	:type ListOfStrings = list<string>

The type alias can be used wherever a built-in type can be used.  The type
alias name must start with an upper case character.

closes: #13407

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-27 19:35:26 +02:00
Christian Brabandt
4bca4897a1 patch 9.0.2075: TextChangedI may not always trigger
Problem:  TextChangedI may not always trigger
Solution: trigger it in more cases: for insert/
          append/change operations, and when
          opening a new line,

fixes: #13367
closes: #13375

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
2023-10-27 19:26:49 +02:00
Christian Brabandt
daef8c7437 patch 9.0.2074: Completion menu may be wrong
Problem:  Completion menu may be wrong
Solution: Check for the original direction of the completion menu,
          add more tests, make it work with 'noselect'

completion: move in right direction when  filling completion_info()

When moving through the insert completion menu and switching directions,
we need to make sure we start at the correct position in the list and
move correctly forward/backwards through it, so that we do not skip
entries and the selected item points to the correct entry in the list
of completion entries generated by the completion_info() function.

The general case is this:

1) CTRL-X CTRL-N, we will traverse the list starting from
   compl_first_match and then go forwards (using the cp->next pointer)
   through the list (skipping the very first entry, which has the
   CP_ORIGINAL_TEXT flag set (since that is the empty/non-selected entry

2) CTRL-X CTRL-P, we will traverse the list starting from
   compl_first_match (which now points to the last entry). The previous
   entry will have the CP_ORIGINAL_TEXT flag set, so we need to start
   traversing the list from the second prev pointer.

There are in fact 2 special cases after starting the completion menu
with CTRL-X:

3)  CTRL-N and then going backwards by pressing CTRL-P again.
    compl_first_match will point to the same entry as in step 1 above,
    but since compl_dir_foward() has been switched by pressing CTRL-P
    to backwards we need to pretend to be in still in case 1 and still
    traverse the list in forward direction using the cp_next pointer

4)  CTRL-P and then going forwards by pressing CTRL-N again.
    compl_first_match will point to the same entry as in step 2 above,
    but since compl_dir_foward() has been switched by pressing CTRL-N
    to forwards we need to pretend to be in still in case 2 and still
    traverse the list in backward direction using the cp_prev pointer

For the 'noselect' case however, this is slightly different again. When
going backwards, we only need to go one cp_prev pointer back. And
resting of the direction works again slightly different. So we need to
take the noselect option into account when deciding in which direction
to iterate through the list of matches.

related: #13402
related: #12971
closes: #13408

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-27 19:16:26 +02:00
nwounkn
650dcfc8d1 runtime(netrw): don't echo empty lines (#13431)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-27 19:07:38 +02:00
zeertzjq
b0221819f3 patch 9.0.2073: typo in quickfix.c comments
Problem:  typo in quickfix.c comments
Solution: fix them

closes: #13422

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-26 23:15:44 +02:00
James McCoy
7b7cda67a1 runtime(debian): update debian related runtime files (#13423)
* Update Debian runtime files

Add mantic as a supported Ubuntu release and move buster/kinetic to
unsupported.

Add syntax highlighting for deb822sources filetype.

Add debsources ftplugin to set relevant comment options.

Move common version information to shared/debversions.vim

Closes #11934

Co-authored-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Co-authored-by: James Addison <jay@jp-hosting.net>
Co-authored-by: Viktor Szépe <viktor@szepe.net>
Signed-off-by: James McCoy <jamessan@jamessan.com>

* Add myself as codeowner for Debian-related runtime files

Signed-off-by: James McCoy <jamessan@jamessan.com>

---------

Signed-off-by: James McCoy <jamessan@jamessan.com>
Co-authored-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Co-authored-by: James Addison <jay@jp-hosting.net>
Co-authored-by: Viktor Szépe <viktor@szepe.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-26 23:14:30 +02:00
Yegappan Lakshmanan
c229a6ac07 patch 9.0.2072: Vim9: no nr2str conversion in list-unpack
Problem:  Vim9: no nr2str conversion in list-unpack
Solution: Generate 2STRING instruction to convert dict index to string

Generate instruction to convert dict index to a string

fixes:  #13417
closes: #13424

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-26 23:05:07 +02:00
Colin Kennedy
10407df7a9 patch 9.0.2071: objdump files not recognized
Problem:  objdump files not recognized
Solution: detect *.objdump files, add a filetype plugin

Added the objdump file/text format

closes: #13425

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
2023-10-26 23:03:15 +02:00
Christian Brabandt
6b89dd6a72 patch 9.0.2070: [security] disallow setting env in restricted mode
Problem:  [security] disallow setting env in restricted mode
Solution: Setting environment variables in restricted mode could
          potentially be used to execute shell commands. Disallow this.

restricted mode: disable allow setting of environment variables

Setting environment variables in restricted mode, may have some unwanted
consequences. So, for example by setting $GCONV_PATH in restricted mode
and then calling the iconv() function, one may be able to execute some
unwanted payload, because the `iconv_open()` function internally uses
the `$GCONV_PATH` variable to find its conversion data.

So let's disable setting environment variables, even so this is no
complete protection, since we are not clearing the existing environment.
I tried a few ways but wasn't successful :(

One could also argue to disable the iconv() function completely in
restricted mode, but who knows what other API functions can be
influenced by setting some other unrelated environment variables.
So let's leave it as it is currently.

closes: #13394
See: https://huntr.com/bounties/b0a2eda1-459c-4e36-98e6-0cc7d7faccfe/

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-26 22:24:17 +02:00
David Leadbeater
67ec655383 patch 9.0.2069: possible to escape bracketed paste mode with Ctrl-C
Problem:  possible to escape bracketed paste mode with Ctrl-C
Solution: Do not handle Ctrl-C specially when key_protocol
          is in use, makes bracketed paste mode more robust

When a key protocol is in use Ctrl-C will be sent as an escape sequence,
but a raw Ctrl-C can be sent when pasting data. Pass this through, so
that a Ctrl-C can be pasted and won't result in exiting insert mode
(where the rest of the pasted keys can cause all kind of nasty
side-effects).

Many terminals will strip control characters in paste data (and xterm
will strip ^C since version 388), but this provides some defense in
depth if users change settings like xterm's allowPasteControls.

closes: #13398

Signed-off-by: David Leadbeater <dgl@dgl.cx>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-26 22:08:41 +02:00
Christian Brabandt
9198c1f2b1 patch 9.0.2068: [security] overflow in :history
Problem:  [security] overflow in :history
Solution: Check that value fits into int

The get_list_range() function, used to parse numbers for the :history
and :clist command internally uses long variables to store the numbers.
However function arguments are integer pointers, which can then
overflow.

Check that the return value from the vim_str2nr() function is not larger
than INT_MAX and if yes, bail out with an error. I guess nobody uses a
cmdline/clist history that needs so many entries... (famous last words).

It is only a moderate vulnerability, so impact should be low.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-26 21:29:32 +02:00
Christian Brabandt
5f5131d775 runtime(doc): clarify bracketed paste mode
related: #13398

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-25 21:53:09 +02:00
Christian Brabandt
a56f02d824 runtime(doc): missing code formatting in if_pyth.txt
fixes: #13418

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-25 21:21:56 +02:00
Ken Takata
c4a4038603 patch 9.0.2067: xxd: coloring was disabled on Cygwin
Problem:  xxd: coloring was disabled on Cygwin
Solution: don't include WIN32

xxd: Fix that color was disabled on Cygwin

"windows.h" was unintentionally included on Cygwin since 9.0.1834.
This accidentally disabled coloring on Cygwin.
Stop including "windows.h" on Cygwin.

closes: #13414

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-25 21:17:35 +02:00
OldWorldOrdr
1c14030aff patch 9.0.2066: xxd: corrupting files when reversing bit dumps
Problem:  xxd: corrupting files when reversing bit dumps
Solution: handle reversing bit dump slightly differently

fixes:  #13410
closes: #13415

Co-authored-by: OldWorldOrdr <joey.t.reinhart@gmail.com>
Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: tristhaus <tristhaus@yahoo.de>
2023-10-25 20:57:30 +02:00
Doug Kearns
3932072ab4 patch 9.0.2065: EXPAND flag set for filetype option
Problem:  EXPAND flag set for filetype option
Solution: Remove P_EXPAND flag from the 'filetype' option

Remove P_EXPAND flag from the 'filetype' option

Problem:  P_EXPAND flag is erroneously set for 'filetype' option
Solution: Remove the P_EXPAND flag

This flag is used by string options that accept file path values.  See
:help set_env.

This appears to have been included in d5e8c92 and resulted from an
incorrect implementation of 'filetype' completion.

See #12900 for a small discussion.

related: #12900
closes: #13416

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-10-25 20:54:00 +02:00
Yegappan Lakshmanan
b731800522 patch 9.0.2064: cannot use buffer-number for errorformat
Problem:  cannot use buffer-number for errorformat
Solution: add support for parsing a buffer number using '%b' in
          'errorformat'

closes: #13419

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-25 20:50:28 +02:00
h_east
5985879e3c runtime(doc): Fix typos in several documents (#13420)
* Fix typos in several documents
* Update runtime/doc/terminal.txt

Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-25 14:47:05 +01:00
Christian Brabandt
50f3ec2898 please report security issues to the vim-security list
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-23 19:59:22 +02:00
Guido Cella
7d254dbc2d patch 9.0.2063: pacman hooks are detected as conf filetype
Problem:  pacman hooks are detected as conf filetype
Solution: make it consistent to pacman.conf and detect those
          hooks as confini

Because confini has much better syntax highlighting than conf.

For reference, I identified pacman.conf and pacman hooks as dosini in
https://github.com/vim/vim/pull/6335, then
https://github.com/vim/vim/pull/10213 changed them to conf, then
https://github.com/vim/vim/pull/10518 changed pacman.conf to confini but
forgot to change hooks.

closes: #13399

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Guido Cella <guido@guidocella.xyz>
2023-10-23 19:27:06 +02:00
Doug Kearns
c038427d2a patch 9.0.2062: Janet files are not recognised
Problem:  Janet files are not recognised
Solution: Add filename and shebang detection (without
          adding an extra filetype plugin)

Those are used by the Janet language:
http://www.janet-lang.org

closes: #13400

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-10-23 19:24:05 +02:00
Guido Cella
ae9021a840 patch 9.0.2061: not able to detect xkb filetypes
Problem:  not able to detect xkb filetypes
Solution: Detect files below /u/s/X11/xkb as xkb files (without adding
          an extra filetype)

Those files are used from the X11 xkb extension

closes: #13401

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Guido Cella <guido@guidocella.xyz>
2023-10-23 19:19:46 +02:00
Amaan Qureshi
84394f2be4 patch 9.0.2060: *.{gn,gni} files are not recognized
Problem:  *.{gn,gni} files are not recognized
Solution: Detect some as gn filetype (without adding an extra filetype)

Those come from: https://gn.googlesource.com/gn/

closes: #13405

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-10-23 19:16:14 +02:00
Ernie Rael
a5a1534753 runtime(doc): small updates to the documentation for varargs
- update and correct the documentation for varargs for Vim9 and make
  sure to mention that a <list> type is required.
- mention that 3match is used the matchparen plugin before 9.0.2054
  (actually this is not correct, but before that patch, Vim used the
  hardcoded id 3)

closes: #13403
closes: #13409

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-23 19:13:16 +02:00
dkearns
fea96c00e5 runtime(vim): Update ftplugin - comment motions (#13412)
Fix the pattern used by comment-motion mappings to match the start of a
block comment.

Block-comment start lines were being ignored if the previous line
contained a double-quote character anywhere in the line.  Line comments
should only be ignored if the previous line is a full-line comment and,
therefore, part of the current block comment.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-23 18:16:44 +02:00
Yegappan Lakshmanan
0ab500dede patch 9.0.2059: outstanding exceptions may be skipped
Problem:  outstanding exceptions may be skipped
Solution: When restoring exception state, process remaining outstanding
          exceptions

closes: #13386

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-21 11:59:42 +02:00
zeertzjq
a36acb7ac4 patch 9.0.2058: tests: avoid error when no swap files exist
Problem:  tests: avoid error when no swap files exist
Solution: use unlet! so that no error message is reported
          in case the variable does not exists

When s:GetSwapFileList() does not find any swapfiles, it will return an
empty list []. This means, that the variable 'name' will not be
declared, cause the following unlet command to fail and causing a 1 sec
delay on running the tests.

So let's instead use the :unlet! command which simply skips reporting an
error when the variable given as parameter does not exists.

closes: #13396

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-21 11:50:26 +02:00
Ernie Rael
3ec6c1fe3b patch 9.0.2057: Vim9: no strict type checks for funcrefs varargs
Problem:  Vim9: no strict type checks for funcrefs varargs
Solution: Perform strict type checking when declaring funcrefs
          with vararg declaration, add tests

closes: #13397

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-21 11:45:38 +02:00
Christian Brabandt
d3e277f279 matchparen: do not use hard-coded match id (#13393)
* matchparen: do not use hard-coded match id

Instead of using the hard-coded match id 3, which may also be used by
other plugins, let the matchparen plugin use whatever ids are
automatically returned when calling matchaddpos().

For backwards-compatibility, keep the `:3match` call, which will still
use the hard-coded id 3 (as mentioned in :h :3match).

closes: #13381

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-21 11:06:50 +02:00
Jonathan Wright
47416d1a74 patch 9.0.2056: no digraph for quadruple prime
Problem:  no digraph for quadruple prime
Solution: add quadruple prime digraph using 4'

closes: #13380

Signed-off-by: Jonathan Wright <quaggy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Jonathan Wright <quaggy@gmail.com>
2023-10-20 12:08:09 +02:00
Ernie Rael
d4802ec485 patch 9.0.2055: Vim9: non-consistent error messages
Problem:  Vim9: non-consistent error messages
Solution: make error messages more consistent with common structure

Adjust vim9class messages to follow common pattern.
[Variable|Method] "var-or-meth-name" ... class "class-name"

closes: #13391

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-20 11:59:00 +02:00
Ken Takata
ac709e2fc0 patch 9.0.2054: win32: iscygpty needs update
Problem:  win32: iscygpty needs update
Solution: Update iscygpty to the latest version, make use iswascii()
          API function

Import the latest version from https://github.com/k-takata/ptycheck.
This addresses #13332 for iscygpty()

closes: #13392

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-20 11:57:08 +02:00
dkearns
d5dc58aeed runtime(json5): Add new ftplugin (#13385)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-19 20:00:12 +02:00
Gregory Anders
a8c664a042 patch 9.0.2053: zig filetype detection test wrong
Problem:  zig filetype detection test wrong
Solution: Remove .zir pattern, add new test for .zon pattern

closes: #13389

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gregory Anders <greg@gpanders.com>
2023-10-19 19:57:57 +02:00
Ken Takata
c6944913f0 patch 9.0.2052: win32: using deprecated wsock32 api
Problem:  win32: using deprecated wsock32 api
Solution: Use winsock2 (ws2_32) consistently

win32: Stop using wsock32

We have already used ws2_32 (winsock2) and already dropped support for
Windows 95 and NT4.  So, we don't need to care about wsock32.

Use ws2_32 consistently.

closes: #13383

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-19 17:24:02 +02:00
Yegappan Lakshmanan
00b55370b3 patch 9.0.2051: Vim9: wrong error for non-existing object var
Problem:  Vim9: wrong error for non-existing object var
Solution: mention object or class depending on whether
          the var is an object or class variable.

closes: #13384
closes: #13387

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-19 17:18:28 +02:00
Gregory Anders
e08bfef88b runtime(zig): Update Zig runtime files (#13388)
Update runtime files from upstream (https://github.com/zig/zig.vim) at
commit 54c216e5306a5c3878a60596aacb94dca8652ab9.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-19 17:16:59 +02:00
Christian Brabandt
198734897e Remove mention of huntr.dev since they do no longer support us
They do no longer support us, since they are shifting away to AI/ML
projects only. So remove any mentioned of using huntr.dev
https://huntr.com/new-huntr-faq/

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-19 17:12:19 +02:00
Christian Brabandt
ba75507c62 Patch 9.0.2050v2: Missing change to version.c
Problem:  v9.0.2050 missed the change to version.c
Solution: include the version.c change

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-19 17:04:04 +02:00
Yegappan Lakshmanan
c59c1e0d88 patch 9.0.2050: Vim9: crash with deferred function call and exception
Problem:  Vim9: crash with deferred function call and exception
Solution: Save and restore exception state

Crash when a deferred function is called after an exception and another
exception is thrown

closes: #13376
closes: #13377

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-19 10:52:34 +02:00
Yegappan Lakshmanan
d7b616d0ad patch 9.0.2049: Vim9: not recognizing qualified class vars for infix ops
Problem:  Vim9: not recognizing qualified class vars for infix ops
Solution: Drop the class type from the stack before generating the
          CLASSMEMBER instruction

closes: #13378
closes: #13379

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-19 10:47:53 +02:00
Ken Takata
982ef16059 patch 9.0.2048: python: uninitialized warning
Problem:  python: uninitialized warning
Solution: initialize 'minor' always

win32,py3: Fix uninitialized warning

Fix the following warning:
```
if_python3.c: In function 'py3_get_system_libname':
if_python3.c:879:16: warning: 'minor' may be used uninitialized [-Wmaybe-uninitialized]
  879 |             if (minor == PY_MINOR_VERSION)
      |                ^
if_python3.c:839:24: note: 'minor' was declared here
  839 |         long    major, minor;
      |                        ^~~~~
```

closes: #13368

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-18 12:03:41 +02:00
Ken Takata
2b126a6892 patch 9.0.2047: perl: warning about inconsistent dll linkage
Problem:  perl: warning about inconsistent dll linkage
Solution: suppress warning

Suppress warning C4273 (inconsistent DLL linkage).

Also adjust inconsistent use of const.

closes: #13369

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-18 11:59:44 +02:00
Ken Takata
436f39390f patch 9.0.2046: win32,python: warning that MS_WIN64 got re-defined
Problem:  win32,python: warning that MS_WIN64 got re-defined
Solution: Do not define MS_WIN64, as it is no longer used

Suppress the following warning:
```
In file included from C:/Python312-64/include/Python.h:12,
                 from if_python3.c:79:
C:/Python312-64/include/pyconfig.h:240: warning: "MS_WIN64" redefined
  240 | #define MS_WIN64
      |
<command-line>: note: this is the location of the previous definition
```

`MS_WIN64` is not defined in `Make_mvc.mak` either.
This should be able to be safely removed.

closes: #13370

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-18 11:53:30 +02:00
zeertzjq
a0e1f06f04 patch 9.0.2045: tests: checking for swap files takes time
Problem:  tests: checking for swap files takes time
Solution: don't check for swap files  when test has been skipped

Check for swap files takes a considerable about of time, so don't do
that for skipped tests to avoid wasting time.

closes: #13371

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-18 11:50:37 +02:00
Yegappan Lakshmanan
0672595fd5 patch 9.0.2044: Vim9: exceptions confuse defered functions
Problem:  Vim9: exceptions confuse defered functions
Solution: save and restore exception state when calling defered
          functions

closes: #13364
closes: #13372

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-18 11:47:37 +02:00
Enno
5036e69852 runtime(systemd): allow for overriding systemd ftplugin settings (#13373)
closes: #13357

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-18 11:38:19 +02:00
Ernie Rael
96952b2e98 patch 9.0.2043: Vim9: issue with funcref assignmentand varargs
Problem:  Vim9: issue with funcref assignmentand varargs
Solution: Fix funcref type checking

closes: #13351

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-17 18:15:01 +02:00
Christian Brabandt
c290009e99 patch 9.0.2042: Test_cq_zero_exmode fails without channel feature
Problem:  Test_cq_zero_exmode fails without channel feature
Solution: Make the test check the channel feature

closes: #13365

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-17 18:10:13 +02:00
Illia Bobyr
8079917447 patch 9.0.2041: trim(): hard to use default mask
Problem:  trim(): hard to use default mask (partly revert v9.0.2040)
Solution: use default mask when it is empty

The default 'mask' value is pretty complex, as it includes many
characters.  Yet, if one needs to specify the trimming direction, the
third argument, 'trim()' currently requires the 'mask' value to be
provided explicitly.

Currently, an empty 'mask' will make 'trim()' call return 'text' value
that is passed in unmodified.  It is unlikely that someone is using it,
so the chances of scripts being broken by this change are low.

Also, this reverts commit 9.0.2040 (which uses v:none for the default
and requires to use an empty string instead).

closes: #13358

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2023-10-17 18:06:00 +02:00
Rolf Vidar Mazunki Hoksaas
5a33ce2a66 runtime(json5): include syntax script for json5 (#13356)
Merging syntax file from gutenye/json5.vim, modified to include proper
vim header.

See: https://github.com/vim/vim/issues/8499

Signed-off-by: Mazunki Hoksaas <rolferen@gmail.com>
Co-authored-by: Guten Ye <ywzhaifei@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-17 11:13:06 +02:00
Illia Bobyr
6e6386716f patch 9.0.2040: trim(): hard to use default mask
Problem:  trim(): hard to use default mask
Solution: Use default 'mask' when it is v:none

The default 'mask' value is pretty complex, as it includes many
characters.  Yet, if one needs to specify the trimming direction, the
third argument, 'trim()' currently requires the 'mask' value to be
provided explicitly.

'v:none' is already used to mean "use the default argument value" in
user defined functions.  See |none-function_argument| in help.

closes: #13363

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2023-10-17 11:09:45 +02:00
nwounkn
2e3cd52fa0 patch 9.0.2039: completion shows current word after completion restart
Problem:  completion shows current word after completion restart
Solution: remove the word being completed after completion restart

The word being completed is shown in a completion list after completion
restart, because it isn't removed from the current buffer before
searching for matches.

Also adjust `Test_complete_add_onechar` to match the new behavior.

closes: #13349

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: nwounkn <nwounkn@gmail.com>
2023-10-17 11:05:38 +02:00
Yegappan Lakshmanan
f3eac695bf patch 9.0.2038: Vim9: object method funcref not cleaned up after use
Problem:  Vim9: object method funcref not cleaned up after use
Solution: Clean up type stack after using object method funcref,
          remove now longer used ISN_DEFEROBJ instrunction

closes: #13360

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-17 11:00:45 +02:00
Yee Cheng Chin
209ec90b9b patch 9.0.2037: A few remaining cmdline completion issues with C-E/Y
Problem:  A few remaining cmdline completion issues with C-E/Y
Solution: Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not
          used at the end

Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not used at the end

A few places in the cmdline completion code only works properly when the
user hits Tab (or 'wildchar') at the end of the cmdline, even though
it's supposed to work even in the middle of the line.

For fuzzy search, `:e ++ff`, and `:set hl=`, fix completion code to make
sure to use `xp_pattern_len` instead of assuming the entire `xp_pattern`
is the search pattern (since it contains texts after the cursor).

Fix Ctrl-E / Ctrl-Y to not jump to the end when canceling/accepting a
wildmenu completion. Also, make them work even when not using
`set wildoptions+=pum` as there is no drawback to doing so.
(Related issue where this was brought up: #13331)

closes: #13362

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-17 10:56:25 +02:00
Yee Cheng Chin
396058acd0 patch 9.0.2036: if_python: rework python3.12 build dependency
Problem:  if_python: rework python3.12 build dependency
          (after 9.0.1996)
Solution: use PyTuple_Size instead of inlining the Py_SIZE
          into the Vim code base

Use a simpler fix for Python 3.12 build issues

Python 3.12 introduced link dependencies to their `Py_SIZE()` inline
function, which #13290 fixed by copying the inline function to Vim's
Python binding code. This works but it's fragile, as a future update may
change the implementation of `Py_SIZE` and there is no way for us to
know.

The reason we need `Py_SIZE` to begin with is that we use
`PyTuple_GET_SIZE()` which calls that. Just fix it by mapping that to
(confusingly similarly named) `PyTuple_Size()`, which we already do in
the stable ABI implementation. There's a minor performance cost in that
it's not inlined and it does error checking but that's fine as we only
call this function rarely (in an error handler).

related: #13290
closes: #13359

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-17 10:38:11 +02:00
Yee Cheng Chin
8f4fb007e4 patch 9.0.2035: [security] use-after-free with wildmenu
Problem:  [security] use-after-free with wildmenu
Solution: properly clean up the wildmenu when exiting

Fix wildchar/wildmenu/pum memory corruption with special wildchar's

Currently, using `wildchar=<Esc>` or `wildchar=<C-\>` can lead to a
memory corruption if using wildmenu+pum, or wrong states if only using
wildmenu. This is due to the code only using one single place inside the
cmdline process loop to perform wild menu clean up (by checking
`end_wildmenu`) but there are other odd situations where the loop could
have exited and we need a post-loop clean up just to be sure. If the
clean up was not done you would have a stale popup menu referring to
invalid memory, or if not using popup menu, incorrect status line (if
`laststatus=0`).

For example, if you hit `<Esc>` two times when it's wildchar, there's a
hard-coded behavior to exit command-line as a failsafe for user, and if
you hit `<C-\><C-\><C-N>` it will also exit command-line, but the clean
up code would not have hit because of specialized `<C-\>` handling.

Fix Ctrl-E / Ctrl-Y to not cancel/accept wildmenu if they are also
used for 'wildchar'/'wildcharm'. Currently they don't behave properly,
and also have potentially memory unsafe behavior as the logic is
currently not accounting for this situation and try to do both.
(Previous patch that addressed this: #11677)

Also, correctly document Escape key behavior (double-hit it to escape)
in wildchar docs as it's previously undocumented.

In addition, block known invalid chars to be set in `wildchar` option,
such as Ctrl-C and `<CR>`. This is just to make it clear to the user
they shouldn't be set, and is not required for this bug fix.

closes: #13361

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-17 10:06:56 +02:00
Christian Brabandt
5a679b2263 patch 9.0.2034: don't try to copy SMACK attribute, when none exist
Problem:  don't try to copy SMACK attribute, when none exist
Solution: return early if SMACK extended attributes do not exist or
          if they are not supported

closes: #1711
closes: #13348

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-16 10:17:13 +02:00
Ken Takata
215c3261a2 patch 9.0.2033: gcc overflow-warning for f_resolve
Problem:  gcc overflow-warning for f_resolve
Solution: use pointer p instead of pointer q[-1]

Suppress the following warning:
```
filepath.c: In function ‘f_resolve’:
filepath.c:2162:27: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 2162 |                     q[-1] = NUL;
```

Closes: #13352
closes: #13353

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-16 09:57:43 +02:00
Viktor Szépe
dbf749bd5a runtime: Fix more typos (#13354)
* Fix more typos

* Fix typos in ignored runtime/ directory

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-16 09:53:37 +02:00
zeertzjq
f5a94d5165 patch 9.0.2032: cannot get mouse click pos for tab or virt text
Problem:  Cannot accurately get mouse clicking position when clicking on
          a TAB or with virtual text.
Solution: Add a "coladd" field to getmousepos() result.

closes: #13335

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-15 10:03:30 +02:00
zeertzjq
3c81f47a05 runtime(doc): correct <PageUp>/<PageDown> behavior in 'wildmenu' (#13336)
"but don't insert it" is wrong.
Also move them just below <Up> <Down> as they are more similar.
2023-10-15 10:02:08 +02:00
Evgeni Chasnovski
d7ae263af8 patch 9.0.2031: TextChangedI may be triggered by non-insert mode change
Problem:  `TextChangedI` can trigger on entering Insert mode if there
          was previously a change not in Insert mode.
Solution: Make it trigger only when text is actually changed in Insert
          mode.

closes: #13265
closes: #13338

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
2023-10-15 09:59:00 +02:00
Christian Brabandt
47510f3d65 patch 9.0.2030: no max callback recursion limit
Problem:  no max callback recursion limit
Solution: bail out, if max call recursion for callback functions
          has been reached.

This checks the 'maxfuncdepth' setting and throws E169 when a callback
function recursively calls itself.

closes: #13337
closes: #13339

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-15 09:56:16 +02:00
Yegappan Lakshmanan
1ace49fb98 patch 9.0.2029: Vim9: no support for partials using call()
Problem:  Vim9: no support for partials using call()
Solution: Add support

closes: #13341

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-15 09:53:41 +02:00
Yee Cheng Chin
5d03525cde patch 9.0.2028: confusing build dependencies
Problem:  confusing build dependencies
Solution: clean them up, make them parallelizable

Separate vim binary and unittest dependencies, make them parallelizable

Clean up make dependencies so Vim and unit test binaries only depend on
the object files they need. This fixes an existing issue where after
running unit tests, the Vim binary would be invalidated, which results
in it having to be linked again when running script tests, even though
Vim was already previously built.

Make link.sh (script we use to link those binaries) generate namespaced
temporary files for each app to avoid them colliding with each other.
This allows `unittesttargets` to be built in parallel.

These fixes are useful when using link-time-optimization as the link
phase could now take minutes rather than a few seconds.

closes: #13344

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-15 09:50:53 +02:00
Yegappan Lakshmanan
de3295dd0c patch 9.0.2027: Vim9: no support for bitwise operators in lambda funcs
Problem:  Vim9: no support for bitwise operators in lambda funcs
Solution: move "evaluate" assignment a bit up in order to decide
          to perform bitwise operations

closes: #13342
closes: #13345

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-15 09:44:50 +02:00
Ken Takata
ae3cfa47d3 patch 9.0.2026: win32: python3 dll loading can be improved
Problem:  win32: python3 dll loading can be improved
Solution: Load DLL from registry path

Support loading python3.dll and/or python3xx.dll from the path written
in the registry.  To support Stable ABI's forwarder DLL (python3.dll),
use the `LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR` flag for `LoadLibraryExW()`
because python3xx.dll is placed in the same directory of python3.dll.

If Stable ABI is used, search the latest version from the registry (both
from HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE).  If Stable ABI is not
used, search only the matching version.

closes: #13315

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-14 11:49:09 +02:00
Yee Cheng Chin
989426be6e patch 9.0.2025: no cmdline completion for ++opt args
Problem:  no cmdline completion for ++opt args
Solution: Add cmdline completion for :e ++opt=arg and :terminal
          [++options]

closes: #13319

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-14 11:46:51 +02:00
James McCoy
bd734c3bea patch 9.0.2024: no filetype detection for Debian sources
Problem:  no filetype detection for Debian sources
Solution: Add new deb822sources filetype

closes: #13320

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: James McCoy <jamessan@jamessan.com>
2023-10-14 11:41:34 +02:00
Christian Brabandt
ba9aed4497 patch 9.0.2023: need more tests for :cq
Problem:  need more tests for :cq
Solution: Add more tests, including wraparound on linux

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14 11:39:40 +02:00
zeertzjq
b583eda703 patch 9.0.2022: getmousepos() returns wrong index for TAB char
Problem:  When clicking in the middle of a TAB, getmousepos() returns
          the column of the next char instead of the TAB.
Solution: Break out of the loop when the vcol to find is inside current
          char. Fix invalid memory access when calling virtcol2col() on
          an empty line.

closes: #13321

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-14 11:32:28 +02:00
Christian Brabandt
cd6ee69358 patch 9.0.2021: Coverity complains about change in charset
Problem:  Coverity complains about change in charset (after v9.0.2017)
Solution: check pointer t at index 0

closes: #13322

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14 11:29:28 +02:00
Ivan Pešić
5ae6f9985e translation(sr): Update Serbian messages translation (#13324)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14 11:28:05 +02:00
dkearns
7687238e1b runtime(tcsh): Update ftplugin (#13327)
Fix b:browsefilter deletion error when calling b:undo_ftplugin.

Fixes #13167

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14 11:27:27 +02:00
Ernie Rael
0f058d1320 patch 9.0.2020: Vim9: islocked() needs more work
Problem:  Vim9: islocked() needs more work
Solution: rework islocked() and remove sync_root
          from get_lval()

closes: #13329

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-14 11:25:04 +02:00
Yee Cheng Chin
2bbd0d30ee runtime(doc): Improve command-line completion docs (#13331)
* Improve command-line completion docs

Add more details about 'ignorecase' and its effect on cmdline
completion.

Make sure keys used in wildmenu are properly documented and linked in the
keys' documentation entries, and in `:h index` for proper
cross-referencing, as wildmenu popup is slightly different from
insert-mode popup menu.

* Fix docs typos

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14 11:23:45 +02:00
Yegappan Lakshmanan
29bb67f1be patch 9.0.2019: Vim9: no support for funcrefs
Problem:  Vim9: no support for funcrefs
Solution: Add support for object/class funcref members

closes: #11981 #12417 #12960 #12324 #13333

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-14 11:18:50 +02:00
LemonBoy
69fb5afb3b patch 9.0.2018: complete_info() returns wrong index
Problem:  complete_info() returns wrong index
Solution: Make order of 'info' in completion_info consistent

Start the iteration from the same point and follow the same direction as
done when assigning the completion numbers. This way we remove the
dependence on the completion direction and make the order of 'info'
consistent.

closes: #12230
closes: #12971

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-10-11 21:55:56 +02:00
Christian Brabandt
dd75fcfbdf patch 9.0.2017: linebreak applies for leading whitespace
Problem:  linebreak applies for leading whitespace
Solution: only apply linebreak, once we have found non-breakat chars in
          the line

closes: #13228
closes: #13243

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-11 21:53:52 +02:00
Yegappan Lakshmanan
1ea428883f patch 9.0.2016: Vim9: assignment operators don't work for class vars
Problem:  Vim9: assignment operators don't work for class vars
Solution: implement it

closes: #13306

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-11 21:43:52 +02:00
Ernie Rael
4c8da025ef patch 9.0.2015: Vim9: does not handle islocked() from a method correctly
Problem:  Vim9: does not handle islocked() from a method correctly
Solution: Handle islocked() builtin from a method.

- Setup `lval_root` from `f_islocked()`.
- Add function `fill_exec_lval_root()` to get info about executing method.
- `sync_root` added in get_lval to handle method member access.
- Conservative approach to reference counting.

closes: #13309

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-11 21:38:24 +02:00
Ken Takata
c97b3febc8 patch 9.0.2013: confusing ifdefs in if_<lang>.c
Problem:  confusing ifdefs in if_<lang>.c
Solution: refactor ifndefs to #ifdefs

if_x: Avoid using #ifndef - #else - #endif

Using #ifndef - #else - #endif is sometimes confusing.
Use #ifdef - #else - #endif instead.

closes: #13310

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-11 21:27:06 +02:00
Christian Brabandt
a634b92b96 patch 9.0.2013: Unicode tables outdated
Problem: Unicode tables outdated
Solution: Update Unicode tables to v15.1 (released 23.09.2023)

closes: #13311

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-11 21:24:49 +02:00
351 changed files with 16183 additions and 5591 deletions

17
.github/CODEOWNERS vendored
View File

@@ -124,6 +124,9 @@ runtime/ftplugin/cs.vim @nickspoons
runtime/ftplugin/csh.vim @dkearns
runtime/ftplugin/css.vim @dkearns
runtime/ftplugin/cucumber.vim @tpope
runtime/ftplugin/debchangelog.vim @jamessan
runtime/ftplugin/debcontrol.vim @jamessan
runtime/ftplugin/debsources.vim @jamessan
runtime/ftplugin/desktop.vim @e-kwsm
runtime/ftplugin/dosbatch.vim @mrdubya
runtime/ftplugin/eiffel.vim @dkearns
@@ -163,6 +166,8 @@ runtime/ftplugin/ishd.vim @dkearns
runtime/ftplugin/j.vim @glts
runtime/ftplugin/javascript.vim @dkearns
runtime/ftplugin/javascriptreact.vim @dkearns
runtime/ftplugin/json.vim @dbarnett
runtime/ftplugin/json5.vim @dkearns
runtime/ftplugin/jsonc.vim @izhakjakov
runtime/ftplugin/julia.vim @carlobaldassi
runtime/ftplugin/kconfig.vim @chrisbra
@@ -219,6 +224,7 @@ runtime/ftplugin/spec.vim @ignatenkobrain
runtime/ftplugin/ssa.vim @ObserverOfTime
runtime/ftplugin/swayconfig.vim @jamespeapen
runtime/ftplugin/systemverilog.vim @Kocha
runtime/ftplugin/swig.vim @jmarrec
runtime/ftplugin/tap.vim @petdance
runtime/ftplugin/tcsh.vim @dkearns
runtime/ftplugin/tidy.vim @dkearns
@@ -232,6 +238,7 @@ runtime/ftplugin/vdf.vim @ObserverOfTime
runtime/ftplugin/wast.vim @rhysd
runtime/ftplugin/wget.vim @dkearns
runtime/ftplugin/wget2.vim @dkearns
runtime/ftplugin/xcompose.vim @ObserverOfTime
runtime/ftplugin/xml.vim @chrisbra
runtime/ftplugin/xs.vim @petdance
runtime/ftplugin/zsh.vim @chrisbra
@@ -355,6 +362,12 @@ runtime/syntax/d.vim @JesseKPhillips
runtime/syntax/dart.vim @pr3d4t0r
runtime/syntax/datascript.vim @dpelle
runtime/syntax/dcl.vim @cecamp
runtime/syntax/deb822sources.vim @jamessan
runtime/syntax/debchangelog.vim @jamessan
runtime/syntax/debcontrol.vim @jamessan
runtime/syntax/debcopyright.vim @jamessan
runtime/syntax/debsources.vim @jamessan
runtime/syntax/dep3patch.vim @jamessan
runtime/syntax/desktop.vim @e-kwsm
runtime/syntax/dosbatch.vim @mrdubya
runtime/syntax/dosini.vim @xuhdev
@@ -437,6 +450,7 @@ runtime/syntax/nix.vim @equill
runtime/syntax/nroff.vim @jmarshall
runtime/syntax/nsis.vim @k-takata
runtime/syntax/openvpn.vim @ObserverOfTime
runtime/syntax/pacmanlog.vim @rpigott
runtime/syntax/pascal.vim @dkearns
runtime/syntax/pbtxt.vim @lakshayg
runtime/syntax/pdf.vim @tpope
@@ -477,6 +491,7 @@ runtime/syntax/scss.vim @tpope
runtime/syntax/sdoc.vim @gpanders
runtime/syntax/sed.vim @dkearns
runtime/syntax/sh.vim @cecamp
runtime/syntax/shared/debversions.vim @jamessan
runtime/syntax/sm.vim @cecamp
runtime/syntax/solidity.vim @cothi
runtime/syntax/spec.vim @ignatenkobrain
@@ -489,6 +504,7 @@ runtime/syntax/sshdconfig.vim @Jakuje
runtime/syntax/sudoers.vim @e-kwsm
runtime/syntax/svn.vim @hdima
runtime/syntax/swayconfig.vim @jamespeapen
runtime/syntax/swig.vim @jmarrec
runtime/syntax/systemverilog.vim @Kocha
runtime/syntax/tags.vim @cecamp
runtime/syntax/tap.vim @petdance
@@ -513,6 +529,7 @@ runtime/syntax/wdl.vim @zenmatic
runtime/syntax/wget.vim @dkearns
runtime/syntax/wget2.vim @dkearns
runtime/syntax/xbl.vim @dkearns
runtime/syntax/xcompose.vim @ObserverOfTime
runtime/syntax/xmath.vim @cecamp
runtime/syntax/xml.vim @chrisbra
runtime/syntax/xs.vim @petdance

View File

@@ -9,10 +9,10 @@ body:
value: |
Thanks for reporting issues of Vim!
If you want to report a security issue, instead of reporting it here
you can alternatively disclose it on
[huntr.dev](https://huntr.dev/bounties/disclose/?utm_campaign=vim%2Fvim&utm_medium=social&utm_source=github&target=https%3A%2F%2Fgithub.com%2Fvim%2Fvim).
They have rewards in the form of money, swag and CVEs.
If you want to report a security issue, instead of reporting it here publicly,
please disclose it privately via mail to vim-security@googlegroups.com.
(It's a private list read only by the maintainers,
but anybody can post, after moderation.)
To make it easier for us to help you please enter detailed information below.
- type: textarea

46
.github/labeler.yml vendored
View File

@@ -8,6 +8,9 @@ CI:
- any: ['.appveyor.yml']
- any: ['.codecov.yml']
documentation:
- all: ['*/doc/*']
translation:
- any: ['src/po/*.po']
@@ -47,6 +50,46 @@ if_tcl:
- any: ['src/proto/if_tcl.pro']
- any: ['runtime/doc/if_tcl.txt']
installer:
- any: ['nsis/**']
- any: ['src/dosinst.*']
- any: ['src/uninstall.c']
platform-mac:
- any: ['src/INSTALLmac.txt']
- any: ['src/os_mac*']
- any: ['src/proto/os_mac*']
platform-windows:
- any: ['nsis/**']
- any: ['src/*.bat']
- any: ['src/*.bmp']
- any: ['src/*.ico']
- any: ['src/GvimExt/*']
- any: ['src/INSTALLpc.txt']
- any: ['src/Make_cyg*.mak']
- any: ['src/Make_ming.mak']
- any: ['src/Make_mvc.mak']
- any: ['src/dosinst.*']
- any: ['src/gui_dwrite.*']
- any: ['src/gui_w32*']
- any: ['src/if_ole.*']
- any: ['src/iid_ole.c']
- any: ['src/os_mswin*']
- any: ['src/os_w32*']
- any: ['src/os_win32.*']
- any: ['src/proto/gui_w32.pro']
- any: ['src/proto/os_mswin.pro']
- any: ['src/proto/os_win32.pro']
- any: ['src/proto/winclip.pro']
- any: ['src/uninstall.c']
- any: ['src/vim.manifest']
- any: ['src/vim.rc']
- any: ['src/vimrun.c']
- any: ['src/winclip.c']
- any: ['src/xpm/**']
- any: ['src/xpm_w32.*']
runtime:
- any: ['runtime/ftplugin']
- any: ['runtime/syntax']
@@ -58,3 +101,6 @@ termdebug: runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
plugin-netrw:
- any: ['runtime/plugin/netrwPlugin.vim']
- any: ['runtime/autoload/netrw*']
xxd:
- any: ['src/xxd/*']

View File

@@ -81,6 +81,12 @@ jobs:
- name: Checkout repository from github
uses: actions/checkout@v4
- name: Check Filelist (for packaging)
run: |
# If any files in the repository are not listed in Filelist this will
# exit with an error code and list the missing entries.
make -f ci/unlisted.make
- run: sudo dpkg --add-architecture i386
if: matrix.architecture == 'i386'

View File

@@ -1,13 +1,12 @@
# Contributing to Vim
Patches are welcome in whatever form.
Discussions about patches happen on the vim-dev maillist.
Discussions about patches happen on the [vim-dev][0] mailing list.
If you create a pull request on GitHub it will be
forwarded to the vim-dev maillist. You can also send your patch there
directly. In that case an attachment with a unified diff format is preferred.
Information about the maillist can be found [on the Vim website].
[on the Vim website]: http://www.vim.org/maillist.php#vim-dev
forwarded to the vim-dev mailing list. You can also send your patch there
directly (but please note, the initial posting is subject to moderation).
In that case an attachment with a unified diff format is preferred.
Information about the mailing list can be found [on the Vim website][0]
A pull request has the advantage that it will trigger the Continuous
Integration tests, you will be warned of problems (you can ignore the coverage
@@ -22,31 +21,27 @@ Contributions will be distributed with Vim under the Vim license. Providing a
change to be included implies that you agree with this and your contribution
does not cause us trouble with trademarks or patents. There is no CLA to sign.
# Reporting issues
We use GitHub issues, but that is not a requirement. Writing to the Vim
maillist is also fine.
mailing list is also fine.
Please use the GitHub issues only for actual issues. If you are not 100% sure
that your problem is a Vim issue, please first discuss this on the Vim user
maillist. Try reproducing the problem without any of your plugins or settings:
mailing list. Try reproducing the problem without any of your plugins or settings:
vim --clean
If you report an issue, please describe exactly how to reproduce it.
For example, don't say "insert some text" but say what you did exactly:
"ahere is some text&lt;Esc&gt;".
`ahere is some text<Esc>`.
Ideally, the steps you list can be used to write a test to verify the problem
is fixed.
Feel free to report even the smallest problem, also typos in the documentation.
You can find known issues in the todo file: ":help todo".
Or open [the todo file] on GitHub to see the latest version.
[the todo file]: https://github.com/vim/vim/blob/master/runtime/doc/todo.txt
You can find known issues in the todo file: `:help todo`.
Or open [the todo file][todo list] on GitHub to see the latest version.
# Syntax, indent and other runtime files
@@ -57,11 +52,10 @@ If you find a problem with one of these files or have a suggestion for
improvement, please first try to contact the maintainer directly.
Look in the header of the file for the name and email address.
The maintainer will take care of issues and send updates to Bram for
The maintainer will take care of issues and send updates to the Vim project for
distribution with Vim.
If the maintainer does not respond, contact the vim-dev maillist.
If the maintainer does not respond, contact the [vim-dev][0] mailing list.
# Translations
@@ -77,8 +71,28 @@ can be translated:
The help files can be translated and made available separately.
See https://www.vim.org/translations.php for examples.
# How do I contribute to the project?
Please have a look at the following [discussion][6], which should give you some
ideas. Please also check the [develop.txt][7] helpfile for the recommended
style. Often it's also beneficial to check the surrounding code for the style
being used.
# I have a question
If you have some question on the style guide, please contact the [vim-dev][0]
mailing list. For other questions please use the [Vi Stack Exchange][8] website, the
[vim-use][9] mailing list or make use of the [discussion][10] feature here at github.
[todo list]: https://github.com/vim/vim/blob/master/runtime/doc/todo.txt
[0]: http://www.vim.org/maillist.php#vim-dev
[1]: https://github.com/vim/vim/blob/master/src/po/README.txt
[2]: https://github.com/vim/vim/blob/master/runtime/lang/README.txt
[3]: https://github.com/vim/vim/blob/master/runtime/tutor/README.txt
[4]: https://github.com/vim/vim/blob/master/runtime/doc/vim.1
[5]: https://github.com/vim/vim/blob/master/nsis/lang/english.nsi
[6]: https://github.com/vim/vim/discussions/13087
[7]: https://github.com/vim/vim/blob/master/runtime/doc/develop.txt
[8]: https://vi.stackexchange.com
[9]: http://www.vim.org/maillist.php#vim-use
[10]: https://github.com/vim/vim/discussions

View File

@@ -213,6 +213,7 @@ SRC_ALL = \
src/testdir/dumps/*.dump \
src/testdir/dumps/*.vim \
src/testdir/samples/*.txt \
src/testdir/samples/*.vim \
src/testdir/samples/test000 \
src/testdir/color_ramp.vim \
src/testdir/silent.wav \
@@ -698,6 +699,7 @@ RT_ALL = \
runtime/doc/*.pl \
runtime/doc/*.txt \
runtime/doc/Makefile \
runtime/doc/Make_all.mak \
runtime/doc/doctags.c \
runtime/doc/doctags.vim \
runtime/doc/test_urls.vim \
@@ -756,6 +758,17 @@ RT_ALL = \
runtime/pack/dist/opt/dvorak/dvorak/enable.vim \
runtime/pack/dist/opt/dvorak/dvorak/disable.vim \
runtime/pack/dist/opt/editexisting/plugin/editexisting.vim \
runtime/pack/dist/opt/editorconfig/.editorconfig \
runtime/pack/dist/opt/editorconfig/CONTRIBUTORS \
runtime/pack/dist/opt/editorconfig/LICENSE* \
runtime/pack/dist/opt/editorconfig/mkzip.sh \
runtime/pack/dist/opt/editorconfig/README.md \
runtime/pack/dist/opt/editorconfig/autoload/*.vim \
runtime/pack/dist/opt/editorconfig/autoload/editorconfig_core/*.vim \
runtime/pack/dist/opt/editorconfig/doc/tags \
runtime/pack/dist/opt/editorconfig/doc/editorconfig.txt \
runtime/pack/dist/opt/editorconfig/ftdetect/editorconfig.vim \
runtime/pack/dist/opt/editorconfig/plugin/editorconfig.vim \
runtime/pack/dist/opt/justify/plugin/justify.vim \
runtime/pack/dist/opt/matchit/plugin/matchit.vim \
runtime/pack/dist/opt/matchit/doc/matchit.txt \
@@ -781,7 +794,9 @@ RT_SCRIPTS = \
runtime/makemenu.vim \
runtime/autoload/*.vim \
runtime/autoload/README.txt \
runtime/autoload/cargo/*.vim \
runtime/autoload/dist/*.vim \
runtime/autoload/rust/*.vim \
runtime/autoload/xml/*.vim \
runtime/autoload/zig/*.vim \
runtime/colors/*.vim \
@@ -846,6 +861,8 @@ RT_AMI_DOS = \
# DOS runtime (also in the extra archive)
RT_DOS = \
README_dos.txt \
runtime/doc/Make_mvc.mak \
runtime/tutor/Make_mvc.mak \
vimtutor.bat \
# DOS runtime without CR-LF translation (also in the extra archive)
@@ -952,6 +969,7 @@ IN_README_DIR = \
README_bindos.txt \
README_dos.txt \
README_extra.txt \
README_haiku.txt \
README_mac.txt \
README_ole.txt \
README_os2.txt \
@@ -988,11 +1006,13 @@ LANG_GEN = \
runtime/doc/*-tr.UTF-8.1 \
runtime/lang/README.txt \
runtime/lang/Makefile \
runtime/lang/Make_all.mak \
runtime/lang/menu_*.vim \
runtime/keymap/README.txt \
runtime/keymap/*.vim \
runtime/tutor/README.*.txt \
runtime/tutor/Makefile \
runtime/tutor/Make_all.mak \
runtime/tutor/tutor.utf-8 \
runtime/tutor/tutor.?? \
runtime/tutor/tutor.??.utf-8 \
@@ -1047,10 +1067,25 @@ LANG_SRC = \
src/po/vim.desktop.in \
src/po/gvim.desktop.in \
src/po/sjiscorr.c \
src/po/big5corr.c \
src/po/*.po \
# the language files for the Win32 lang archive
LANG_DOS = \
src/po/*.mo \
runtime/lang/Make_mvc.mak \
# Files in the repository that are deliberately not listed above, and will thus
# be excluded from distribution tarballs and the like.
# This excludes them from the CI check for unlisted files.
IGNORE = \
.appveyor.yml \
.github/FUNDING.yml \
.github/labeler.yml \
.github/workflows/label.yml \
SECURITY.md \
ci/unlisted.make \
src/libvterm/CODE-MAP \
runtime/syntax/testdir/input/html_html \
# vim: set ft=make:

View File

@@ -2,7 +2,9 @@
## 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.
If you want to report a security issue, please privately disclose the issue to the vim-security mailing list
vim-security@googlegroups.com
This is a private list, read only by the maintainers, but anybody can post, after moderation.
**Please don't publicly disclose the issue until it has been addressed by us.**

49
ci/unlisted.make Normal file
View File

@@ -0,0 +1,49 @@
# vim: ft=make
SHELL = /bin/bash
# List all files that are tracked in git but not listed in Filelist.
# Exit code is 2 ("Make encountered an error") if any such files exist.
# Filelist is a Makefile that defines many variables, so we use Make itself to
# query which variables it defines, then expand them all by wrapping each name
# in $(...), importing Filelist and using $(eval).
include Filelist
$(eval all_patterns := $(shell \
make -f Filelist --question --print-data-base --no-builtin-rules \
--no-builtin-variables 2>/dev/null \
| sed -nre \
'/^# makefile .from \x27Filelist\x27,/ { \
n; \
s/ = .*//; \
T; \
s/.*/$$(\0)/; \
p; \
}'))
# In Makefile's `prepeare` target, all the IN_README_DIR files are moved from
# READMEdir to the root, so add those files in their Git-tracked location:
all_patterns := $(all_patterns) \
$(foreach readme, $(IN_README_DIR), READMEdir/$(readme))
# The result 'all_patterns' is a list of patterns (globs), which we expand with
# wildcard to get actual filenames. Note this means Filelist can list a file
# that does not exist, and it will be omitted at this step.
listed_files := $(wildcard $(all_patterns))
# Default target to actually run the comparison:
.PHONY: check
check:
@# There are too many files to list on the command line, so we write
@# that to a temporary file, one per line.
$(file > Filelist-listed-files)
$(foreach filename, $(listed_files),\
$(file >> Filelist-listed-files,$(filename)))
@# Compare the sorted lists. Delete that temporary file on both
@# success and failure, but exit with diff's exit code.
diff -u0 --label files-in-git <(git ls-files | sort) \
--label Filelist <(sort --unique Filelist-listed-files); \
RV=$$?; \
rm Filelist-listed-files; \
(($$RV != 0)) && echo "Add files to the right variable in Filelist."; \
exit $$RV

View File

@@ -590,23 +590,27 @@ export def FTprogress_cweb()
endif
enddef
export def FTprogress_asm()
# These include the leading '%' sign
var ft_swig_keywords = '^\s*%\%(addmethods\|apply\|beginfile\|clear\|constant\|define\|echo\|enddef\|endoffile\|extend\|feature\|fragment\|ignore\|import\|importfile\|include\|includefile\|inline\|insert\|keyword\|module\|name\|namewarn\|native\|newobject\|parms\|pragma\|rename\|template\|typedef\|typemap\|types\|varargs\|warn\)'
# This is the start/end of a block that is copied literally to the processor file (C/C++)
var ft_swig_verbatim_block_start = '^\s*%{'
export def FTi()
if exists("g:filetype_i")
exe "setf " .. g:filetype_i
return
endif
# This function checks for an assembly comment the first ten lines.
# This function checks for an assembly comment or a SWIG keyword or verbatim block in the first 50 lines.
# If not found, assume Progress.
var lnum = 1
while lnum <= 10 && lnum < line('$')
while lnum <= 50 && lnum < line('$')
var line = getline(lnum)
if line =~ '^\s*;' || line =~ '^\*'
FTasm()
return
elseif line !~ '^\s*$' || line =~ '^/\*'
# Not an empty line: Doesn't look like valid assembly code.
# Or it looks like a Progress /* comment
break
elseif line =~ ft_swig_keywords || line =~ ft_swig_verbatim_block_start
setf swig
return
endif
lnum += 1
endwhile

View File

@@ -217,6 +217,14 @@ export def Exe2filetype(name: string, line1: string): string
elseif name =~ '^\%(rexx\|regina\)\>'
return 'rexx'
# Janet
elseif name =~ '^janet\>'
return 'janet'
# Dart
elseif name =~ '^dart\>'
return 'dart'
endif
return ''
@@ -361,7 +369,7 @@ def DetectFromText(line1: string)
# Strace
# inaccurate fast match first, then use accurate slow match
elseif (line1 =~ 'execve(' && line1 =~ '^[0-9:.]* *execve(')
elseif (line1 =~ 'execve(' && line1 =~ '^[0-9:. ]*execve(')
|| line1 =~ '^__libc_start_main'
setl ft=strace

32
runtime/autoload/dist/vim.vim vendored Normal file
View File

@@ -0,0 +1,32 @@
" Vim runtime support library,
" runs the vim9 script version or legacy script version
" on demand (mostly for Neovim compatability)
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Nov 04
" enable the zip and gzip plugin by default, if not set
if !exists('g:zip_exec')
let g:zip_exec = 1
endif
if !exists('g:gzip_exec')
let g:gzip_exec = 1
endif
if !has('vim9script')
function dist#vim#IsSafeExecutable(filetype, executable)
let cwd = getcwd()
return get(g:, a:filetype .. '_exec', get(g:, 'plugin_exec', 0)) &&
\ (fnamemodify(exepath(a:executable), ':p:h') !=# cwd
\ || (split($PATH, has('win32') ? ';' : ':')->index(cwd) != -1 &&
\ cwd != '.'))
endfunction
finish
endif
def dist#vim#IsSafeExecutable(filetype: string, executable: string): bool
return dist#vim9#IsSafeExecutable(filetype, executable)
enddef

17
runtime/autoload/dist/vim9.vim vendored Normal file
View File

@@ -0,0 +1,17 @@
vim9script
# Vim runtime support library
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Oct 25
export def IsSafeExecutable(filetype: string, executable: string): bool
var cwd = getcwd()
return get(g:, filetype .. '_exec', get(g:, 'plugin_exec', 0))
&& (fnamemodify(exepath(executable), ':p:h') !=# cwd
|| (split($PATH, has('win32') ? ';' : ':')->index(cwd) != -1
&& cwd != '.'))
enddef
# Uncomment this line to check for compilation errors early
# defcompile

View File

@@ -11,10 +11,7 @@ fun s:check(cmd)
let name = substitute(a:cmd, '\(\S*\).*', '\1', '')
if !exists("s:have_" . name)
" safety check, don't execute anything from the current directory
let s:tmp_cwd = getcwd()
let f = (fnamemodify(exepath(name), ":p:h") !=# s:tmp_cwd
\ || (index(split($PATH,has("win32")? ';' : ':'), s:tmp_cwd) != -1 && s:tmp_cwd != '.'))
unlet s:tmp_cwd
let f = dist#vim#IsSafeExecutable('gzip', name)
if !f
echoerr "Warning: NOT executing " .. name .. " from current directory!"
endif

View File

@@ -1,7 +1,10 @@
" netrw.vim: Handles file transfer and remote directory listing across
" AUTOLOAD SECTION
" Date: May 03, 2023
" Version: 173
" Version: 173a
" Last Change:
" 2023 Nov 21 by Vim Project: ignore wildignore when expanding $COMSPEC (v173a)
" 2023 Nov 22 by Vim Project: fix handling of very long filename on longlist style (v173a)
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
@@ -400,7 +403,7 @@ if !exists("g:netrw_localcopycmd")
if g:netrw_cygwin
let g:netrw_localcopycmd= "cp"
else
let g:netrw_localcopycmd = expand("$COMSPEC")
let g:netrw_localcopycmd = expand("$COMSPEC", v:true)
let g:netrw_localcopycmdopt= " /c copy"
endif
elseif has("unix") || has("macunix")
@@ -415,7 +418,7 @@ if !exists("g:netrw_localcopydircmd")
let g:netrw_localcopydircmd = "cp"
let g:netrw_localcopydircmdopt= " -R"
else
let g:netrw_localcopydircmd = expand("$COMSPEC")
let g:netrw_localcopydircmd = expand("$COMSPEC", v:true)
let g:netrw_localcopydircmdopt= " /c xcopy /e /c /h /i /k"
endif
elseif has("unix")
@@ -436,7 +439,7 @@ if has("win32") || has("win95") || has("win64") || has("win16")
if g:netrw_cygwin
call s:NetrwInit("g:netrw_localmkdir","mkdir")
else
let g:netrw_localmkdir = expand("$COMSPEC")
let g:netrw_localmkdir = expand("$COMSPEC", v:true)
let g:netrw_localmkdiropt= " /c mkdir"
endif
else
@@ -452,7 +455,7 @@ if !exists("g:netrw_localmovecmd")
if g:netrw_cygwin
let g:netrw_localmovecmd= "mv"
else
let g:netrw_localmovecmd = expand("$COMSPEC")
let g:netrw_localmovecmd = expand("$COMSPEC", v:true)
let g:netrw_localmovecmdopt= " /c move"
endif
elseif has("unix") || has("macunix")
@@ -1166,7 +1169,6 @@ fun! netrw#Explore(indx,dosplit,style,...)
2match none
if exists("s:explore_match") | unlet s:explore_match | endif
if exists("s:explore_prvdir") | unlet s:explore_prvdir | endif
echo " "
" call Decho("cleared explore match list",'~'.expand("<slnum>"))
endif
@@ -1961,7 +1963,7 @@ endfun
" Doing this means that netrw will not come up as having changed a
" setting last when it really didn't actually change it.
"
" Used by s:NetrwOptionsRestore() to restore each netrw-senstive setting
" Used by s:NetrwOptionsRestore() to restore each netrw-sensitive setting
" keepvars are set up by s:NetrwOptionsSave
fun! s:NetrwRestoreSetting(keepvar,setting)
""" call Dfunc("s:NetrwRestoreSetting(a:keepvar<".a:keepvar."> a:setting<".a:setting.">)")
@@ -5562,7 +5564,7 @@ fun! netrw#BrowseX(fname,remote)
" cleanup: remove temporary file,
" delete current buffer if success with handler,
" return to prior buffer (directory listing)
" Feb 12, 2008: had to de-activiate removal of
" Feb 12, 2008: had to de-activate removal of
" temporary file because it wasn't getting seen.
" if remote == 1 && fname != a:fname
"" call Decho("deleting temporary file<".fname.">",'~'.expand("<slnum>"))
@@ -5730,8 +5732,6 @@ fun! s:NetrwClearExplore()
if exists("w:netrw_explore_list") |unlet w:netrw_explore_list |endif
if exists("w:netrw_explore_bufnr") |unlet w:netrw_explore_bufnr |endif
" redraw!
echo " "
echo " "
" call Dret("s:NetrwClearExplore")
endfun
@@ -11188,16 +11188,16 @@ fun! s:LocalListing()
" call Decho("pfile <".pfile.">",'~'.expand("<slnum>"))
if w:netrw_liststyle == s:LONGLIST
let longfile= printf("%-".g:netrw_maxfilenamelen."S",pfile)
let sz = getfsize(filename)
let szlen = 15 - (strdisplaywidth(longfile) - g:netrw_maxfilenamelen)
let szlen = (szlen > 0) ? szlen : 0
let fsz = printf("%".szlen."S",sz)
if g:netrw_sizestyle =~# "[hH]"
let sz= s:NetrwHumanReadable(sz)
endif
let longfile= printf("%-".g:netrw_maxfilenamelen."S",pfile)
let pfile = longfile." ".sz." ".strftime(g:netrw_timefmt,getftime(filename))
let fsz = printf("%".szlen."S",sz)
let pfile = longfile." ".fsz." ".strftime(g:netrw_timefmt,getftime(filename))
" call Decho("longlist support: sz=".sz." fsz=".fsz,'~'.expand("<slnum>"))
endif
@@ -11207,7 +11207,7 @@ fun! s:LocalListing()
" call Decho("implementing g:netrw_sort_by=".g:netrw_sort_by." (time)")
" call Decho("getftime(".filename.")=".getftime(filename),'~'.expand("<slnum>"))
let t = getftime(filename)
let ft = strpart("000000000000000000",1,18-strlen(t)).t
let ft = printf("%018d",t)
" call Decho("exe NetrwKeepj put ='".ft.'/'.pfile."'",'~'.expand("<slnum>"))
let ftpfile= ft.'/'.pfile
sil! NetrwKeepj put=ftpfile
@@ -11217,10 +11217,7 @@ fun! s:LocalListing()
" call Decho("implementing g:netrw_sort_by=".g:netrw_sort_by." (size)")
" call Decho("getfsize(".filename.")=".getfsize(filename),'~'.expand("<slnum>"))
let sz = getfsize(filename)
if g:netrw_sizestyle =~# "[hH]"
let sz= s:NetrwHumanReadable(sz)
endif
let fsz = strpart("000000000000000000",1,18-strlen(sz)).sz
let fsz = printf("%018d",sz)
" call Decho("exe NetrwKeepj put ='".fsz.'/'.filename."'",'~'.expand("<slnum>"))
let fszpfile= fsz.'/'.pfile
sil! NetrwKeepj put =fszpfile

View File

@@ -2907,7 +2907,7 @@ endfor
" builtin class information
let g:php_builtin_object_functions = {}
" When completing for 'everyting imaginable' (no class context, not a
" When completing for 'everything imaginable' (no class context, not a
" variable) we need a list of built-in classes in a format of {'classname':''}
" for performance reasons we precompile this too
let g:php_builtin_classnames = {}

View File

@@ -25,7 +25,7 @@ function! rustfmt#DetectVersion()
silent let s:rustfmt_help = system(g:rustfmt_command . " --help")
let s:rustfmt_unstable_features = s:rustfmt_help =~# "--unstable-features"
" Build a comparable rustfmt version varible out of its `--version` output:
" Build a comparable rustfmt version variable out of its `--version` output:
silent let l:rustfmt_version_full = system(g:rustfmt_command . " --version")
let l:rustfmt_version_list = matchlist(l:rustfmt_version_full,
\ '\vrustfmt ([0-9]+[.][0-9]+[.][0-9]+)')

View File

@@ -1,7 +1,7 @@
" tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION
" Date: Jan 07, 2020
" Version: 32
" Date: Nov 14, 2023
" Version: 32b (with modifications from the Vim Project)
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
" License: Vim License (see vim's :help license)
"
@@ -22,7 +22,7 @@
if &cp || exists("g:loaded_tar")
finish
endif
let g:loaded_tar= "v32"
let g:loaded_tar= "v32a"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of tar needs vim 7.2"
@@ -208,18 +208,24 @@ fun! tar#Browse(tarfile)
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
return
endif
if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~# '\c\%(warning\|error\|inappropriate\|unrecognized\)')
redraw!
echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
keepj sil! %d
let eikeep= &ei
set ei=BufReadCmd,FileReadCmd
exe "r ".fnameescape(a:tarfile)
let &ei= eikeep
keepj sil! 1d
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
return
endif
"
" The following should not be neccessary, since in case of errors the
" previous if statement should have caught the problem (because tar exited
" with a non-zero exit code).
" if line("$") == curlast || ( line("$") == (curlast + 1) &&
" \ getline("$") =~# '\c\<\%(warning\|error\|inappropriate\|unrecognized\)\>' &&
" \ getline("$") =~ '\s' )
" redraw!
" echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
" keepj sil! %d
" let eikeep= &ei
" set ei=BufReadCmd,FileReadCmd
" exe "r ".fnameescape(a:tarfile)
" let &ei= eikeep
" keepj sil! 1d
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
" return
" endif
" set up maps supported for tar
setlocal noma nomod ro

View File

@@ -97,7 +97,7 @@ enddef
# Public interface {{{
# When a TeX document is split into several source files, each source file
# may contain a "magic line" specifiying the "root" file, e.g.:
# may contain a "magic line" specifying the "root" file, e.g.:
#
# % !TEX root = main.tex
#

View File

@@ -57,14 +57,10 @@ if !exists("g:zip_extractcmd")
let g:zip_extractcmd= g:zip_unzipcmd
endif
let s:tmp_cwd = getcwd()
if (fnamemodify(exepath(g:zip_unzipcmd), ":p:h") ==# getcwd()
\ && (index(split($PATH,has("win32")? ';' : ':'), s:tmp_cwd) == -1 || s:tmp_cwd == '.'))
unlet s:tmp_cwd
if !dist#vim#IsSafeExecutable('zip', g:zip_unzipcmd)
echoerr "Warning: NOT executing " .. g:zip_unzipcmd .. " from current directory!"
finish
endif
unlet s:tmp_cwd
" ----------------
" Functions: {{{1

View File

@@ -111,11 +111,11 @@ please check the following items:
- Do not use hard coded escape sequences, these will not work in other
terminals. Always use #RRGGBB for the GUI.
- When targetting 8-16 colors terminals, don't count on "darkblue" to be blue
- When targeting 8-16 colors terminals, don't count on "darkblue" to be blue
and dark, or on "2" to be even vaguely reddish. Names are more portable
than numbers, though.
- When targetting 256 colors terminals, prefer colors 16-255 to colors 0-15
- When targeting 256 colors terminals, prefer colors 16-255 to colors 0-15
for the same reason.
- Typographic attributes (bold, italic, underline, reverse, etc.) are not

338
runtime/doc/Make_all.mak Normal file
View File

@@ -0,0 +1,338 @@
# Makefile with common components
DOCS = \
arabic.txt \
autocmd.txt \
builtin.txt \
change.txt \
channel.txt \
cmdline.txt \
debug.txt \
debugger.txt \
develop.txt \
diff.txt \
digraph.txt \
editing.txt \
eval.txt \
farsi.txt \
filetype.txt \
fold.txt \
ft_ada.txt \
ft_context.txt \
ft_mp.txt \
ft_ps1.txt \
ft_raku.txt \
ft_rust.txt \
ft_sql.txt \
gui.txt \
gui_w32.txt \
gui_x11.txt \
hangulin.txt \
hebrew.txt \
help.txt \
helphelp.txt \
howto.txt \
if_cscop.txt \
if_lua.txt \
if_mzsch.txt \
if_ole.txt \
if_perl.txt \
if_pyth.txt \
if_ruby.txt \
if_sniff.txt \
if_tcl.txt \
indent.txt \
index.txt \
insert.txt \
intro.txt \
map.txt \
mbyte.txt \
message.txt \
mlang.txt \
motion.txt \
netbeans.txt \
options.txt \
os_390.txt \
os_amiga.txt \
os_beos.txt \
os_dos.txt \
os_haiku.txt \
os_mac.txt \
os_mint.txt \
os_msdos.txt \
os_os2.txt \
os_qnx.txt \
os_risc.txt \
os_unix.txt \
os_vms.txt \
os_win32.txt \
pattern.txt \
pi_getscript.txt \
pi_gzip.txt \
pi_logipat.txt \
pi_netrw.txt \
pi_paren.txt \
pi_spec.txt \
pi_tar.txt \
pi_vimball.txt \
pi_zip.txt \
popup.txt \
print.txt \
quickfix.txt \
quickref.txt \
quotes.txt \
recover.txt \
remote.txt \
repeat.txt \
rileft.txt \
russian.txt \
scroll.txt \
sign.txt \
spell.txt \
sponsor.txt \
starting.txt \
syntax.txt \
tabpage.txt \
tagsrch.txt \
term.txt \
terminal.txt \
testing.txt \
textprop.txt \
tips.txt \
todo.txt \
uganda.txt \
undo.txt \
userfunc.txt \
usr_01.txt \
usr_02.txt \
usr_03.txt \
usr_04.txt \
usr_05.txt \
usr_06.txt \
usr_07.txt \
usr_08.txt \
usr_09.txt \
usr_10.txt \
usr_11.txt \
usr_12.txt \
usr_20.txt \
usr_21.txt \
usr_22.txt \
usr_23.txt \
usr_24.txt \
usr_25.txt \
usr_26.txt \
usr_27.txt \
usr_28.txt \
usr_29.txt \
usr_30.txt \
usr_31.txt \
usr_32.txt \
usr_40.txt \
usr_41.txt \
usr_42.txt \
usr_43.txt \
usr_44.txt \
usr_45.txt \
usr_50.txt \
usr_51.txt \
usr_52.txt \
usr_90.txt \
usr_toc.txt \
various.txt \
version4.txt \
version5.txt \
version6.txt \
version7.txt \
version8.txt \
version9.txt \
vi_diff.txt \
vim9.txt \
vim9class.txt \
visual.txt \
windows.txt \
workshop.txt
HTMLS = \
arabic.html \
autocmd.html \
builtin.html \
change.html \
channel.html \
cmdline.html \
debug.html \
debugger.html \
develop.html \
diff.html \
digraph.html \
editing.html \
eval.html \
farsi.html \
filetype.html \
fold.html \
ft_ada.html \
ft_context.html \
ft_mp.html \
ft_ps1.html \
ft_raku.html \
ft_rust.html \
ft_sql.html \
gui.html \
gui_w32.html \
gui_x11.html \
hangulin.html \
hebrew.html \
helphelp.html \
howto.html \
if_cscop.html \
if_lua.html \
if_mzsch.html \
if_ole.html \
if_perl.html \
if_pyth.html \
if_ruby.html \
if_sniff.html \
if_tcl.html \
indent.html \
index.html \
insert.html \
intro.html \
map.html \
mbyte.html \
message.html \
mlang.html \
motion.html \
netbeans.html \
options.html \
os_390.html \
os_amiga.html \
os_beos.html \
os_dos.html \
os_haiku.html \
os_mac.html \
os_mint.html \
os_msdos.html \
os_os2.html \
os_qnx.html \
os_risc.html \
os_unix.html \
os_vms.html \
os_win32.html \
pattern.html \
pi_getscript.html \
pi_gzip.html \
pi_logipat.html \
pi_netrw.html \
pi_paren.html \
pi_spec.html \
pi_tar.html \
pi_vimball.html \
pi_zip.html \
popup.html \
print.html \
quickfix.html \
quickref.html \
quotes.html \
recover.html \
remote.html \
repeat.html \
rileft.html \
russian.html \
scroll.html \
sign.html \
spell.html \
sponsor.html \
starting.html \
syntax.html \
tabpage.html \
tagsrch.html \
term.html \
terminal.html \
testing.html \
textprop.html \
tips.html \
todo.html \
uganda.html \
undo.html \
userfunc.html \
usr_01.html \
usr_02.html \
usr_03.html \
usr_04.html \
usr_05.html \
usr_06.html \
usr_07.html \
usr_08.html \
usr_09.html \
usr_10.html \
usr_11.html \
usr_12.html \
usr_20.html \
usr_21.html \
usr_22.html \
usr_23.html \
usr_24.html \
usr_25.html \
usr_26.html \
usr_27.html \
usr_28.html \
usr_29.html \
usr_30.html \
usr_31.html \
usr_32.html \
usr_40.html \
usr_41.html \
usr_42.html \
usr_43.html \
usr_44.html \
usr_45.html \
usr_50.html \
usr_51.html \
usr_52.html \
usr_90.html \
usr_toc.html \
various.html \
version4.html \
version5.html \
version6.html \
version7.html \
version8.html \
version9.html \
vi_diff.html \
vimindex.html \
vim9.html \
vim9class.html \
visual.html \
windows.html \
workshop.html
CONVERTED = \
vim-da.UTF-8.1 \
vimdiff-da.UTF-8.1 \
vimtutor-da.UTF-8.1 \
vim-de.UTF-8.1 \
vim-fr.UTF-8.1 \
evim-fr.UTF-8.1 \
vimdiff-fr.UTF-8.1 \
vimtutor-fr.UTF-8.1 \
xxd-fr.UTF-8.1 \
vim-it.UTF-8.1 \
evim-it.UTF-8.1 \
vimdiff-it.UTF-8.1 \
vimtutor-it.UTF-8.1 \
xxd-it.UTF-8.1 \
vim-pl.UTF-8.1 \
evim-pl.UTF-8.1 \
vimdiff-pl.UTF-8.1 \
vimtutor-pl.UTF-8.1 \
xxd-pl.UTF-8.1 \
vim-ru.UTF-8.1 \
evim-ru.UTF-8.1 \
vimdiff-ru.UTF-8.1 \
vimtutor-ru.UTF-8.1 \
xxd-ru.UTF-8.1 \
vim-tr.UTF-8.1 \
evim-tr.UTF-8.1 \
vimdiff-tr.UTF-8.1 \
vimtutor-tr.UTF-8.1

490
runtime/doc/Make_mvc.mak Normal file
View File

@@ -0,0 +1,490 @@
#
# Makefile for the Vim documentation on Windows
#
# 17.11.23, Restorer, <restorer@mail2k.ru>
# Common components
!INCLUDE Make_all.mak
# TODO: to think about what to use instead of awk. PowerShell?
#AWK =
# Correct the following line for the where executeable file vim is installed.
# Please do not put the path in quotes.
VIMEXE = D:\Programs\Vim\vim90\vim.exe
# Correct the following line for the directory where iconv installed.
# Please do not put the path in quotes.
ICONV_PATH = D:\Programs\GetText\bin
# In case some package like GnuWin32, UnixUtils
# or something similar is installed on the system.
# If the "touch" program is installed on the system, but it is not registered
# in the %PATH% environment variable, then specify the full path to this file.
!IF EXIST ("touch.exe")
TOUCH = "touch.exe" %1
!ELSE
TOUCH = if exist %1 ( copy /b %1+,, ) else ( type nul >%1 )
!ENDIF
# In case some package like GnuWin32, UnixUtils, gettext
# or something similar is installed on the system.
# If the "iconv" program is installed on the system, but it is not registered
# in the %PATH% environment variable, then specify the full path to this file.
!IF EXIST ("iconv.exe")
ICONV = "iconv.exe"
!ELSEIF EXIST ("$(ICONV_PATH)\iconv.exe")
ICONV = "$(ICONV_PATH)\iconv.exe"
!ENDIF
RM = del /q
.SUFFIXES :
.SUFFIXES : .c .o .txt .html
all : tags perlhtml $(CONVERTED)
# Use "doctags" to generate the tags file. Only works for English!
tags : doctags $(DOCS)
doctags.exe $(DOCS) | sort /L C /O tags
powershell -nologo -noprofile -Command \
"(Get-Content -Raw tags | Get-Unique | % {$$_ -replace \"`r\", \"\"}) \
| New-Item -Force -Path . -ItemType file -Name tags"
doctags : doctags.c
$(CC) doctags.c
# Use Vim to generate the tags file. Can only be used when Vim has been
# compiled and installed. Supports multiple languages.
vimtags : $(DOCS)
@"$(VIMEXE)" --clean -esX -V1 -u doctags.vim
uganda.nsis.txt : uganda.???
!@powershell -nologo -noprofile -Command \
$$ext=(Get-Item $?).Extension; (Get-Content $? ^| \
% {$$_ -replace '\s*\*[-a-zA-Z0-9.]*\*', '' -replace 'vim:tw=78:.*', ''}) \
^| Set-Content $*$$ext
!@powershell -nologo -noprofile -Command \
$$ext=(Get-Item $?).Extension; \
(Get-Content -Raw $(@B)$$ext).Trim() -replace '(\r\n){3,}', '$$1$$1' \
^| Set-Content $(@B)$$ext
# TODO:
#html: noerrors tags $(HTMLS)
# if exist errors.log (more errors.log)
# TODO:
#noerrors:
# $(RM) errors.log
# TODO:
#.txt.html:
# TODO:
#index.html: help.txt
# TODO:
#vimindex.html: index.txt
# TODO:
#tags.ref tags.html: tags
# Perl version of .txt to .html conversion.
# There can't be two rules to produce a .html from a .txt file.
# Just run over all .txt files each time one changes. It's fast anyway.
perlhtml : tags $(DOCS)
vim2html.pl tags $(DOCS)
# Check URLs in the help with "curl" or "powershell".
test_urls :
"$(VIMEXE)" -S test_urls.vim
clean :
$(RM) doctags.exe doctags.obj
$(RM) *.html vim-stylesheet.css
arabic.txt :
<<touch.bat $@
@$(TOUCH)
<<
farsi.txt :
<<touch.bat $@
@$(TOUCH)
<<
hebrew.txt :
<<touch.bat $@
@$(TOUCH)
<<
russian.txt :
<<touch.bat $@
@$(TOUCH)
<<
gui_w32.txt :
<<touch.bat $@
@$(TOUCH)
<<
if_ole.txt :
<<touch.bat $@
@$(TOUCH)
<<
os_390.txt :
<<touch.bat $@
@$(TOUCH)
<<
os_amiga.txt :
<<touch.bat $@
@$(TOUCH)
<<
os_beos.txt :
<<touch.bat $@
@$(TOUCH)
<<
os_dos.txt :
<<touch.bat $@
@$(TOUCH)
<<
os_haiku.txt :
<<touch.bat $@
@$(TOUCH)
<<
os_mac.txt :
<<touch.bat $@
@$(TOUCH)
<<
os_mint.txt :
<<touch.bat $@
@$(TOUCH)
<<
os_msdos.txt :
<<touch.bat $@
@$(TOUCH)
<<
os_os2.txt :
<<touch.bat $@
@$(TOUCH)
<<
os_qnx.txt :
<<touch.bat $@
@$(TOUCH)
<<
os_risc.txt :
<<touch.bat $@
@$(TOUCH)
<<
os_win32.txt :
<<touch.bat $@
@$(TOUCH)
<<
convert-all : $(CONVERTED)
!IF [powershell -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2
!ERROR The program "PowerShell" version 3.0 or higher is required to work
!ENDIF
vim-da.UTF-8.1 : vim-da.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vimdiff-da.UTF-8.1 : vimdiff-da.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vimtutor-da.UTF-8.1 : vimtutor-da.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vim-de.UTF-8.1 : vim-de.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
evim-fr.UTF-8.1 : evim-fr.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vim-fr.UTF-8.1 : vim-fr.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vimdiff-fr.UTF-8.1 : vimdiff-fr.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vimtutor-fr.UTF-8.1 : vimtutor-fr.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t utf-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
xxd-fr.UTF-8.1 : xxd-fr.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
evim-it.UTF-8.1 : evim-it.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vim-it.UTF-8.1 : vim-it.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vimdiff-it.UTF-8.1 : vimdiff-it.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vimtutor-it.UTF-8.1 : vimtutor-it.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
xxd-it.UTF-8.1 : xxd-it.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
evim-pl.UTF-8.1 : evim-pl.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vim-pl.UTF-8.1 : vim-pl.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vimdiff-pl.UTF-8.1 : vimdiff-pl.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vimtutor-pl.UTF-8.1 : vimtutor-pl.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
xxd-pl.UTF-8.1 : xxd-pl.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
evim-ru.UTF-8.1 : evim-ru.1
!IF DEFINED (ICONV)
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vim-ru.UTF-8.1 : vim-ru.1
!IF DEFINED (ICONV)
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vimdiff-ru.UTF-8.1 : vimdiff-ru.1
!IF DEFINED (ICONV)
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vimtutor-ru.UTF-8.1 : vimtutor-ru.1
!IF DEFINED (ICONV)
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
xxd-ru.UTF-8.1 : xxd-ru.1
!IF DEFINED (ICONV)
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
evim-tr.UTF-8.1 : evim-tr.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-9 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vim-tr.UTF-8.1 : vim-tr.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-9 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vimdiff-tr.UTF-8.1 : vimdiff-tr.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-9 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
vimtutor-tr.UTF-8.1 : vimtutor-tr.1
!IF DEFINED (ICONV)
$(ICONV) -f ISO-8859-9 -t UTF-8 $? >$@
!ELSE
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
powershell -nologo -noprofile -Command \
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
!ENDIF
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:

View File

@@ -13,337 +13,8 @@ VIMEXE = vim
# AWK, used for "make html". Comment this out if the include gives problems.
include ../../src/auto/config.mk
DOCS = \
arabic.txt \
autocmd.txt \
builtin.txt \
change.txt \
channel.txt \
cmdline.txt \
debug.txt \
debugger.txt \
develop.txt \
diff.txt \
digraph.txt \
editing.txt \
eval.txt \
farsi.txt \
filetype.txt \
fold.txt \
ft_ada.txt \
ft_context.txt \
ft_mp.txt \
ft_ps1.txt \
ft_raku.txt \
ft_rust.txt \
ft_sql.txt \
gui.txt \
gui_w32.txt \
gui_x11.txt \
hangulin.txt \
hebrew.txt \
help.txt \
helphelp.txt \
howto.txt \
if_cscop.txt \
if_lua.txt \
if_mzsch.txt \
if_ole.txt \
if_perl.txt \
if_pyth.txt \
if_ruby.txt \
if_sniff.txt \
if_tcl.txt \
indent.txt \
index.txt \
insert.txt \
intro.txt \
map.txt \
mbyte.txt \
message.txt \
mlang.txt \
motion.txt \
netbeans.txt \
options.txt \
os_390.txt \
os_amiga.txt \
os_beos.txt \
os_dos.txt \
os_haiku.txt \
os_mac.txt \
os_mint.txt \
os_msdos.txt \
os_os2.txt \
os_qnx.txt \
os_risc.txt \
os_unix.txt \
os_vms.txt \
os_win32.txt \
pattern.txt \
pi_getscript.txt \
pi_gzip.txt \
pi_logipat.txt \
pi_netrw.txt \
pi_paren.txt \
pi_spec.txt \
pi_tar.txt \
pi_vimball.txt \
pi_zip.txt \
popup.txt \
print.txt \
quickfix.txt \
quickref.txt \
quotes.txt \
recover.txt \
remote.txt \
repeat.txt \
rileft.txt \
russian.txt \
scroll.txt \
sign.txt \
spell.txt \
sponsor.txt \
starting.txt \
syntax.txt \
tabpage.txt \
tagsrch.txt \
term.txt \
terminal.txt \
testing.txt \
textprop.txt \
tips.txt \
todo.txt \
uganda.txt \
undo.txt \
userfunc.txt \
usr_01.txt \
usr_02.txt \
usr_03.txt \
usr_04.txt \
usr_05.txt \
usr_06.txt \
usr_07.txt \
usr_08.txt \
usr_09.txt \
usr_10.txt \
usr_11.txt \
usr_12.txt \
usr_20.txt \
usr_21.txt \
usr_22.txt \
usr_23.txt \
usr_24.txt \
usr_25.txt \
usr_26.txt \
usr_27.txt \
usr_28.txt \
usr_29.txt \
usr_30.txt \
usr_31.txt \
usr_32.txt \
usr_40.txt \
usr_41.txt \
usr_42.txt \
usr_43.txt \
usr_44.txt \
usr_45.txt \
usr_50.txt \
usr_51.txt \
usr_52.txt \
usr_90.txt \
usr_toc.txt \
various.txt \
version4.txt \
version5.txt \
version6.txt \
version7.txt \
version8.txt \
version9.txt \
vi_diff.txt \
vim9.txt \
vim9class.txt \
visual.txt \
windows.txt \
workshop.txt
HTMLS = \
arabic.html \
autocmd.html \
builtin.html \
change.html \
channel.html \
cmdline.html \
debug.html \
debugger.html \
develop.html \
diff.html \
digraph.html \
editing.html \
eval.html \
farsi.html \
filetype.html \
fold.html \
ft_ada.html \
ft_context.html \
ft_mp.html \
ft_ps1.html \
ft_raku.html \
ft_rust.html \
ft_sql.html \
gui.html \
gui_w32.html \
gui_x11.html \
hangulin.html \
hebrew.html \
helphelp.html \
howto.html \
if_cscop.html \
if_lua.html \
if_mzsch.html \
if_ole.html \
if_perl.html \
if_pyth.html \
if_ruby.html \
if_sniff.html \
if_tcl.html \
indent.html \
index.html \
insert.html \
intro.html \
map.html \
mbyte.html \
message.html \
mlang.html \
motion.html \
netbeans.html \
options.html \
os_390.html \
os_amiga.html \
os_beos.html \
os_dos.html \
os_haiku.html \
os_mac.html \
os_mint.html \
os_msdos.html \
os_os2.html \
os_qnx.html \
os_risc.html \
os_unix.html \
os_vms.html \
os_win32.html \
pattern.html \
pi_getscript.html \
pi_gzip.html \
pi_logipat.html \
pi_netrw.html \
pi_paren.html \
pi_spec.html \
pi_tar.html \
pi_vimball.html \
pi_zip.html \
popup.html \
print.html \
quickfix.html \
quickref.html \
quotes.html \
recover.html \
remote.html \
repeat.html \
rileft.html \
russian.html \
scroll.html \
sign.html \
spell.html \
sponsor.html \
starting.html \
syntax.html \
tabpage.html \
tagsrch.html \
term.html \
terminal.html \
testing.html \
textprop.html \
tips.html \
todo.html \
uganda.html \
undo.html \
userfunc.html \
usr_01.html \
usr_02.html \
usr_03.html \
usr_04.html \
usr_05.html \
usr_06.html \
usr_07.html \
usr_08.html \
usr_09.html \
usr_10.html \
usr_11.html \
usr_12.html \
usr_20.html \
usr_21.html \
usr_22.html \
usr_23.html \
usr_24.html \
usr_25.html \
usr_26.html \
usr_27.html \
usr_28.html \
usr_29.html \
usr_30.html \
usr_31.html \
usr_32.html \
usr_40.html \
usr_41.html \
usr_42.html \
usr_43.html \
usr_44.html \
usr_45.html \
usr_50.html \
usr_51.html \
usr_52.html \
usr_90.html \
usr_toc.html \
various.html \
version4.html \
version5.html \
version6.html \
version7.html \
version8.html \
version9.html \
vi_diff.html \
vimindex.html \
vim9.html \
vim9class.html \
visual.html \
windows.html \
workshop.html
CONVERTED = \
vim-fr.UTF-8.1 \
evim-fr.UTF-8.1 \
vimdiff-fr.UTF-8.1 \
vimtutor-fr.UTF-8.1 \
xxd-fr.UTF-8.1 \
vim-it.UTF-8.1 \
evim-it.UTF-8.1 \
vimdiff-it.UTF-8.1 \
vimtutor-it.UTF-8.1 \
xxd-it.UTF-8.1 \
vim-pl.UTF-8.1 \
evim-pl.UTF-8.1 \
vimdiff-pl.UTF-8.1 \
vimtutor-pl.UTF-8.1 \
xxd-pl.UTF-8.1 \
vim-ru.UTF-8.1 \
evim-ru.UTF-8.1 \
vimdiff-ru.UTF-8.1 \
vimtutor-ru.UTF-8.1 \
xxd-ru.UTF-8.1 \
vim-tr.UTF-8.1 \
evim-tr.UTF-8.1 \
vimdiff-tr.UTF-8.1 \
vimtutor-tr.UTF-8.1
# Common components
include Make_all.mak
.SUFFIXES:
.SUFFIXES: .c .o .txt .html
@@ -476,6 +147,18 @@ os_win32.txt:
# Note that $< works with GNU make while $> works for BSD make.
# Is there a solution that works for both??
vim-da.UTF-8.1: vim-da.1
iconv -f latin1 -t utf-8 $< >$@
vimdiff-da.UTF-8.1: vimdiff-da.1
iconv -f latin1 -t utf-8 $< >$@
vimtutor-da.UTF-8.1: vimtutor-da.1
iconv -f latin1 -t utf-8 $< >$@
vim-de.UTF-8.1: vim-de.1
iconv -f latin1 -t utf-8 $< >$@
vim-fr.UTF-8.1: vim-fr.1
iconv -f latin1 -t utf-8 $< >$@

View File

@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.0. Last change: 2023 Sep 27
*builtin.txt* For Vim version 9.0. Last change: 2023 Nov 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3928,6 +3928,8 @@ getmousepos() *getmousepos()*
wincol column inside "winid"
line text line inside "winid"
column text column inside "winid"
coladd offset (in screen columns) from the
start of the clicked char
All numbers are 1-based.
If not over a window, e.g. when in the command line, then only
@@ -4006,8 +4008,8 @@ 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
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
@@ -4199,7 +4201,7 @@ getscriptinfo([{opts}]) *getscriptinfo()*
Note that this is a copy, the value of
script-local variables cannot be changed using
this dictionary.
version Vimscript version (|scriptversion|)
version Vim script version (|scriptversion|)
Examples: >
:echo getscriptinfo({'name': 'myscript'})
@@ -6411,7 +6413,9 @@ mode([expr]) Return a string that indicates the current mode.
Rvx Virtual Replace mode |i_CTRL-X| completion
c Command-line editing
ct Command-line editing via Terminal-Job mode
cr Command-line editing overstrike mode |c_<Insert>|
cv Vim Ex mode |gQ|
cvr Vim Ex mode while in overstrike mode |c_<Insert>|
ce Normal Ex mode |Q|
r Hit-enter prompt
rm The -- more -- prompt
@@ -6791,96 +6795,96 @@ printf({fmt}, {expr1} ...) *printf()*
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"
#, 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. >
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 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
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
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
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
*E1500*
You cannot mix positional and non-positional arguments: >
echo printf("%s%1$s", "One", "Two")
< E1500: Cannot mix positional and non-positional
arguments: %s%1$s
echo printf("%s%1$s", "One", "Two")
< E1500: Cannot mix positional and non-positional arguments:
%s%1$s
*E1501*
You cannot skip a positional argument in a format string: >
echo printf("%3$s%1$s", "One", "Two", "Three")
< E1501: format argument 2 unused in $-style
format: %3$s%1$s
echo printf("%3$s%1$s", "One", "Two", "Three")
< E1501: format argument 2 unused in $-style format:
%3$s%1$s
*E1502*
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
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)
< E1502: Positional argument 2 used as field
width reused as different type: long int/int
echo printf("%1$d at width %2$ld is: %01$*2$d", 1, 2)
< E1502: Positional argument 2 used as field width reused as
different type: long int/int
*E1503*
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)
< E1503: Positional argument 3 out of bounds:
%1$d at width %2$d is: %01$*2$.*3$d
echo printf("%1$d at width %2$d is: %01$*2$.*3$d", 1, 2)
< E1503: 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)
< E1503: Positional argument 3 out of bounds:
%01$*2$.*3$d %4$d
echo printf("%01$*2$.*3$d %4$d", 1, 2)
< E1503: Positional argument 3 out of bounds: %01$*2$.*3$d
%4$d
*E1504*
A positional argument can be used more than once: >
echo printf("%1$s %2$s %1$s", "One", "Two")
< One Two One
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")
< E1504: Positional argument 1 type used
inconsistently: int/string
echo printf("%1$s %2$s %1$d", "One", "Two")
< E1504: Positional argument 1 type used inconsistently:
int/string
*E1505*
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)
< E1505: Invalid format specifier:
%1$d at width %2$d is: %01$*2$.3$d
echo printf("%1$d at width %2$d is: %01$*2$.3$d", 1, 2)
< E1505: Invalid format specifier: %1$d at width %2$d is:
%01$*2$.3$d
*E1507*
This internal error indicates that the logic to parse a
@@ -10117,9 +10121,9 @@ trim({text} [, {mask} [, {dir}]]) *trim()*
Return {text} as a String where any character in {mask} is
removed from the beginning and/or end of {text}.
If {mask} is not given, {mask} is all characters up to 0x20,
which includes Tab, space, NL and CR, plus the non-breaking
space character 0xa0.
If {mask} is not given, or is an empty string, {mask} is all
characters up to 0x20, which includes Tab, space, NL and CR,
plus the non-breaking space character 0xa0.
The optional {dir} argument specifies where to remove the
characters:
@@ -10175,8 +10179,8 @@ type({expr}) The result is a Number representing the type of {expr}.
Job: 8 |v:t_job|
Channel: 9 |v:t_channel|
Blob: 10 |v:t_blob|
Class 12 |v:t_class|
Object 13 |v:t_object|
Class: 12 |v:t_class|
Object: 13 |v:t_object|
For backward compatibility, this method can be used: >
:if type(myvar) == type(0)
:if type(myvar) == type("")
@@ -10376,6 +10380,8 @@ virtcol2col({winid}, {lnum}, {col}) *virtcol2col()*
character in window {winid} at buffer line {lnum} and virtual
column {col}.
If buffer line {lnum} is an empty line, 0 is returned.
If {col} is greater than the last virtual column in line
{lnum}, then the byte index of the character at the last
virtual column is returned.

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 9.0. Last change: 2023 Sep 19
*change.txt* For Vim version 9.0. Last change: 2023 Dec 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -453,7 +453,7 @@ Note that when 'nrformats' includes "octal", decimal numbers with leading
zeros cause mistakes, because they can be confused with octal numbers.
Note similarly, when 'nrformats' includes "bin", binary numbers with a leading
'0x' or '0X' can be interpreted as hexadecimal rather than binary since '0b'
'0b' or '0B' can be interpreted as hexadecimal rather than binary since '0b'
are valid hexadecimal digits.
When the number under the cursor is too big to fit into 32 or 64 bit
@@ -516,7 +516,7 @@ SHIFTING LINES LEFT OR RIGHT *shift-left-right*
lines to [indent] (default 0).
*:>*
:[range]> [flags] Shift {count} [range] lines one 'shiftwidth' right.
:[range]> [flags] Shift [range] lines one 'shiftwidth' right.
Repeat '>' for shifting multiple 'shiftwidth's.
See |ex-flags| for [flags].
@@ -644,9 +644,9 @@ For other systems the tmpnam() library function is used.
current line only. When [count] is given, replace in
[count] lines, starting with the last line in [range].
When [range] is omitted start in the current line.
*E939*
[count] must be a positive number. Also see
|cmdline-ranges|.
*E939* *E1510*
[count] must be a positive number (max 2147483647)
Also see |cmdline-ranges|.
See |:s_flags| for [flags].
The delimiter doesn't need to be /, see

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 9.0. Last change: 2023 May 20
*cmdline.txt* For Vim version 9.0. Last change: 2023 Nov 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -90,9 +90,11 @@ CTRL-SHIFT-Q Works just like CTRL-V, unless |modifyOtherKeys| is active,
In the GUI the |key-notation| is inserted without simplifying.
*c_<Left>* *c_Left*
<Left> cursor left
<Left> cursor left. See 'wildmenu' for behavior during wildmenu
completion mode.
*c_<Right>* *c_Right*
<Right> cursor right
<Right> cursor right. See 'wildmenu' for behavior during wildmenu
completion mode.
*c_<S-Left>*
<S-Left> or <C-Left> *c_<C-Left>*
cursor one WORD left
@@ -102,7 +104,8 @@ CTRL-SHIFT-Q Works just like CTRL-V, unless |modifyOtherKeys| is active,
CTRL-B or <Home> *c_CTRL-B* *c_<Home>* *c_Home*
cursor to beginning of command-line
CTRL-E or <End> *c_CTRL-E* *c_<End>* *c_End*
cursor to end of command-line
cursor to end of command-line. See 'wildmenu' for behavior
during wildmenu completion mode.
*c_<LeftMouse>*
<LeftMouse> Move the cursor to the position of the mouse click.
@@ -237,6 +240,7 @@ CTRL-\ e {expr} *c_CTRL-\_e*
CTRL-Y When there is a modeless selection, copy the selection into
the clipboard. |modeless-selection|
If there is no selection CTRL-Y is inserted as a character.
See 'wildmenu' for behavior during wildmenu completion mode.
CTRL-M or CTRL-J *c_CTRL-M* *c_CTRL-J* *c_<NL>* *c_<CR>* *c_CR*
<CR> or <NL> start entered command
@@ -252,12 +256,14 @@ CTRL-C quit command-line without executing
*c_<Up>* *c_Up*
<Up> recall older command-line from history, whose beginning
matches the current command-line (see below).
matches the current command-line (see below). See 'wildmenu'
for behavior during wildmenu completion mode.
{not available when compiled without the |+cmdline_hist|
feature}
*c_<Down>* *c_Down*
<Down> recall more recent command-line from history, whose beginning
matches the current command-line (see below).
matches the current command-line (see below). See 'wildmenu'
for behavior during wildmenu completion mode.
{not available when compiled without the |+cmdline_hist|
feature}
@@ -356,6 +362,7 @@ terminals)
A positive number represents the absolute index of an entry
as it is given in the first column of a :history listing.
This number remains fixed even if other entries are deleted.
(see |E1510|)
A negative number means the relative position of an entry,
counted from the newest entry (which has index -1) backwards.
@@ -381,6 +388,7 @@ When editing the command-line, a few commands can be used to complete the
word before the cursor. This is available for:
- Command names: At the start of the command-line.
- |++opt| values.
- Tags: Only after the ":tag" command.
- File names: Only after a command that accepts a file name or a setting for
an option that can be set to a file name. This is called file name
@@ -463,11 +471,16 @@ When repeating 'wildchar' or CTRL-N you cycle through the matches, eventually
ending up back to what was typed. If the first match is not what you wanted,
you can use <S-Tab> or CTRL-P to go straight back to what you typed.
The 'wildignorecase' option can be set to ignore case in filenames.
The 'wildmenu' option can be set to show the matches just above the command
line.
The 'wildoptions' option provides additional configuration to use a popup menu
for 'wildmenu', and to use fuzzy matching.
The 'wildignorecase' option can be set to ignore case in filenames. For
completing other texts (e.g. command names), the 'ignorecase' option is used
instead (fuzzy matching always ignores case, however).
If you like tcsh's autolist completion, you can use this mapping:
:cnoremap X <C-L><C-D>
(Where X is the command key to use, <C-L> is CTRL-L and <C-D> is CTRL-D)

View File

@@ -1,4 +1,4 @@
*digraph.txt* For Vim version 9.0. Last change: 2023 Mar 21
*digraph.txt* For Vim version 9.0. Last change: 2023 Oct 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -174,6 +174,13 @@ ROUBLE
The rouble sign was added in 2014 as 0x20bd. Vim supports the digraphs =R and
=P for this. Note that R= and P= are other characters.
QUADRUPLE PRIME
The quadruple prime using the digraph 4' was added in 2023. Although it is
not part of RFC 1345, it supplements the existing digraph implementation as
there already exist digraphs for PRIME, DOUBLE PRIME and TRIPLE PRIME using
the 1', 2' and 3' digraphs.
*digraph-table*
char digraph hex dec official name ~
^@ NU 0x00 0 NULL (NUL)
@@ -931,6 +938,7 @@ char digraph hex dec official name ~
1' 2032 8242 PRIME
″ 2' 2033 8243 DOUBLE PRIME
‴ 3' 2034 8244 TRIPLE PRIME
⁗ 4' 2057 8279 QUADRUPLE PRIME
1" 2035 8245 REVERSED PRIME
‶ 2" 2036 8246 REVERSED DOUBLE PRIME
‷ 3" 2037 8247 REVERSED TRIPLE PRIME

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 9.0. Last change: 2023 Jun 01
*eval.txt* For Vim version 9.0. Last change: 2023 Nov 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -36,6 +36,7 @@ a remark is given.
11. No +eval feature |no-eval-feature|
12. The sandbox |eval-sandbox|
13. Textlock |textlock|
14. Vim script library |vim-script-library|
Testing support is documented in |testing.txt|.
Profiling is documented at |profiling|.
@@ -4801,5 +4802,37 @@ This is not allowed when the textlock is active:
- closing a window or quitting Vim
- etc.
==============================================================================
14. Vim script library *vim-script-library*
Vim comes bundled with a Vim script library, that can be used by runtime,
script authors. Currently, it only includes very few functions, but it may
grow over time.
The functions are available as |Vim9-script| as well as using legacy Vim
script (to be used for non Vim 9.0 versions and Neovim).
*dist#vim* *dist#vim9*
The functions make use of the autoloaded prefix "dist#vim" (for legacy Vim
script and Neovim) and "dist#vim9" for Vim9 script.
The following functions are available:
dist#vim#IsSafeExecutable(filetype, executable) ~
dist#vim9#IsSafeExecutable(filetype:string, executable:string): bool ~
This function takes a filetype and an executable and checks whether it is safe
to execute the given executable. For security reasons users may not want to
have Vim execute random executables or may have forbidden to do so for
specific filetypes by setting the "<filetype>_exec" variable (|plugin_exec|).
It returns |true| or |false| to indicate whether the plugin should run the given
exectuable. It takes the following arguments:
argument type ~
filetype string
executable string
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 9.0. Last change: 2023 Sep 11
*filetype.txt* For Vim version 9.0. Last change: 2023 Dec 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -567,8 +567,9 @@ FORTRAN *ft-fortran-plugin*
Options:
'expandtab' is switched on to avoid tabs as required by the Fortran
standards unless the user has set fortran_have_tabs in .vimrc.
'textwidth' is set to 72 for fixed source format as required by the
Fortran standards and to 80 for free source format.
'textwidth' is set to 80 for fixed source format whereas it is set to 132
for free source format. Setting the fortran_extended_line_length
variable increases the width to 132 for fixed source format.
'formatoptions' is set to break code and comment lines and to preserve long
lines. You can format comments with |gq|.
For further discussion of fortran_have_tabs and the method used for the

View File

@@ -394,17 +394,25 @@ highlighting. So do these:
You can find the details in $VIMRUNTIME/syntax/help.vim
*inclusion*
Vim is for everybody, no matter race, gender or anything. Some people make a
big deal about using "he" or "his" when referring to the user, thinking it
means we assume the user is male. That is not the case, it's just a habit of
writing help text, which quite often is many years old. Also, a lot of the
text is written by contributors for whom English is not their first language.
We do not make any assumptions about the gender of the user, no matter how the
text is phrased. Some people have suggested using "they", but that is not
regular English. We do not want to spend much time on this discussion. The
goal is that the reader understands how Vim works, the exact wording is
GENDER NEUTRAL LANGUAGE
*gender-neutral* *inclusion*
Vim is for everybody, no matter race, gender or anything. For new or updated
help text, gender neutral language is recommended. Some of the help text is
many years old and there is no need to change it. We do not make any
assumptions about the gender of the user, no matter how the text is phrased.
The goal is that the reader understands how Vim works, the exact wording is
secondary.
Many online technical style guides include sections about gender neutral
language. Here are a few: >
https://developers.google.com/style/pronouns
https://techwhirl.com/gender-neutral-technical-writing/
https://www.skillsyouneed.com/write/gender-neutral-language.html
https://ualr.edu/writingcenter/avoid-sexist-language/
<
Note: gender neutral language does not require using singular "they".
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*if_ole.txt* For Vim version 9.0. Last change: 2022 Oct 08
*if_ole.txt* For Vim version 9.0. Last change: 2023 Nov 19
VIM REFERENCE MANUAL by Paul Moore
@@ -59,7 +59,7 @@ Vim exposes four methods for use by clients.
SendKeys(keys) Execute a series of keys.
This method takes a single parameter, which is a string of keystrokes. These
keystrokes are executed exactly as if they had been types in at the keyboard.
keystrokes are executed exactly as if they had been typed in at the keyboard.
Special keys can be given using their <..> names, as for the right hand side
of a mapping. Note: Execution of the Ex "normal" command is not supported -
see below |ole-normal|.

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 9.0. Last change: 2022 Feb 22
*if_pyth.txt* For Vim version 9.0. Last change: 2023 Oct 25
VIM REFERENCE MANUAL by Paul Moore
@@ -524,7 +524,7 @@ The range object methods are:
Range object type is available using "Range" attribute of vim module.
Example (assume r is the current range):
Example (assume r is the current range): >
# Send all lines in a range to the default printer
vim.command("%d,%dhardcopy!" % (r.start+1,r.end+1))
@@ -754,8 +754,10 @@ you can use Vim without this file.
MS-Windows ~
To use the Python interface the Python DLL must be in your search path. In a
console window type "path" to see what directories are used. The 'pythondll'
or 'pythonthreedll' option can be also used to specify the Python DLL.
console window type "path" to see what directories are used. If the DLL is
not found in your search path, Vim will check the registry to find the path
where Python is installed. The 'pythondll' or 'pythonthreedll' option can be
also used to specify the Python DLL.
The name of the DLL should match the Python version Vim was compiled with.
Currently the name for Python 2 is "python27.dll", that is for Python 2.7.
@@ -782,6 +784,8 @@ and failures. With Stable ABI, this restriction is relaxed, and any Python 3
library with version of at least |v:python3_version| will work. See
|has-python| for how to check if Stable ABI is supported, or see if version
output includes |+python3/dyn-stable|.
On MS-Windows, 'pythonthreedll' will be set to "python3.dll". When searching
the DLL from the registry, Vim will search the latest version of Python.
==============================================================================
10. Python 3 *python3*

View File

@@ -1,4 +1,4 @@
*indent.txt* For Vim version 9.0. Last change: 2022 Oct 10
*indent.txt* For Vim version 9.0. Last change: 2023 Dec 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -715,7 +715,7 @@ FORTRAN *ft-fortran-indent*
Block if, select case, where, and forall constructs are indented. So are
type, interface, associate, block, and enum constructs. The indenting of
subroutines, functions, modules, and program blocks is optional. Comments,
labelled statements and continuation lines are indented if the Fortran is in
labeled statements, and continuation lines are indented if the Fortran is in
free source form, whereas they are not indented if the Fortran is in fixed
source form because of the left margin requirements. Hence manual indent
corrections will be necessary for labelled statements and continuation lines
@@ -724,17 +724,16 @@ used for the detection of source format see |ft-fortran-syntax|.
Do loops ~
All do loops are left unindented by default. Do loops can be unstructured in
Fortran with (possibly multiple) loops ending on a labelled executable
Fortran with (possibly multiple) loops ending on a labeled executable
statement of almost arbitrary type. Correct indentation requires
compiler-quality parsing. Old code with do loops ending on labelled statements
of arbitrary type can be indented with elaborate programs such as Tidy
(http://www.unb.ca/chem/ajit/f_tidy.htm). Structured do/continue loops are
also left unindented because continue statements are also used for purposes
other than ending a do loop. Programs such as Tidy can convert structured
do/continue loops to the do/enddo form. Do loops of the do/enddo variety can
be indented. If you use only structured loops of the do/enddo form, you should
declare this by setting the fortran_do_enddo variable in your .vimrc as
follows >
compiler-quality parsing. Old code with do loops ending on labeled statements
of arbitrary type can be indented with elaborate programs such as Tidy.
Structured do/continue loops are also left unindented because continue
statements are used for purposes other than ending a do loop. Programs such
as Tidy can convert structured do/continue loops to the do/enddo form. Do
loops of the do/enddo variety can be indented. If you use only structured
loops of the do/enddo form, you should declare this by setting the
fortran_do_enddo variable in your .vimrc as follows >
let fortran_do_enddo=1
@@ -748,15 +747,14 @@ to get do loops indented in .f90 files and left alone in Fortran files with
other extensions such as .for.
Program units ~
The indenting of program units (subroutines, functions, modules, and program
blocks) is enabled by default but can be suppressed if a lighter, screen-width
preserving indent style is desired. To suppress the indenting of program
units for all fortran files set the global fortran_indent_less variable in
your .vimrc as follows >
Indenting of program units (subroutines, functions, modules, and program
blocks) can be increased by setting the variable fortran_indent_more and can
be decreased by setting the variable fortran_indent_less. These variables
can be set for all fortran files in your .vimrc as follows >
let fortran_indent_less=1
A finer level of suppression can be achieved by setting the corresponding
A finer level of control can be achieved by setting the corresponding
buffer-local variable as follows >
let b:fortran_indent_less=1
@@ -1236,7 +1234,7 @@ variable. It supports 3 keys, `line_continuation`, `more_in_bracket_block`,
and `searchpair_timeout`.
`line_continuation` expects a number which will be added to the indent level of
a continuation line starting with a backslash, and defaults to
`shiftwidth() * 3`. It also accepts a string, which is evaluated at runtime.
`shiftwidth() * 3` . It also accepts a string, which is evaluated at runtime.
`more_in_bracket_block` expects a boolean value; when on, an extra
`shiftwidth()` is added inside blocks surrounded with brackets. It defaults to
`v:false`.
@@ -1244,14 +1242,14 @@ a continuation line starting with a backslash, and defaults to
a timeout. Increasing the value might give more accurate results, but also
causes the indentation to take more time. It defaults to 100 (milliseconds).
Example of configuration:
Example of configuration: >
let g:vim_indent = #{
\ line_continuation: shiftwidth() * 3,
\ more_in_bracket_block: v:false,
\ searchpair_timeout: 100,
\ }
<
*g:vim_indent_cont*
This variable is equivalent to `g:vim_indent.line_continuation`.
It's supported for backward compatibility.

View File

@@ -1112,6 +1112,22 @@ tag command action in Command-line editing mode ~
|c_<Insert>| <Insert> toggle insert/overstrike mode
|c_<LeftMouse>| <LeftMouse> cursor at mouse click
commands in wildmenu mode (see 'wildmenu')
<Up> move up to parent / select the previous match
<Down> move down to submenu / select the next match
<Left> select the previous match / move up to parent
<Right> select the next match / move down to submenu
<CR> move into submenu when doing menu completion
CTRL-E stop completion and go back to original text
CTRL-Y accept selected match and stop completion
other stop completion and insert the typed character
commands in wildmenu mode with 'wildoptions' set to "pum"
<PageUp> select a match several entries back
<PageDown> select a match several entries forward
==============================================================================
5. Terminal-Job mode *terminal-job-index*

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 9.0. Last change: 2023 Aug 15
*intro.txt* For Vim version 9.0. Last change: 2023 Nov 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -43,7 +43,8 @@ document, there is a separate document for each supported system, see
*pronounce*
Vim is pronounced as one word, like Jim, not vi-ai-em. It's written with a
capital, since it's a name, again like Jim.
capital, since it's a name, again like Jim. The GUI version of Vim is written
"gVim" (or "GVim" when at the beginning of a sentence).
This manual is a reference for all the Vim commands and options. This is not
an introduction to the use of Vi or Vim, it gets a bit complicated here and
@@ -97,12 +98,14 @@ There are several mailing lists for Vim:
<vim-mac@vim.org> *vim-mac* *vim_mac*
For discussions about using and improving the Macintosh version of
Vim.
<vim-security@googlegroups.com> *vim-security*
This list is for (privately) discussing security relevant issues of Vim.
See http://www.vim.org/maillist.php for the latest information.
NOTE:
- Anyone can see the archive, e.g. on Google groups. Search this if you have
questions.
questions, except for the vim-security list.
- You can only send messages to these lists if you have subscribed!
- The first message is moderated, thus it may take a few hours to show up.
- You need to send the messages from the same location as where you subscribed
@@ -184,7 +187,7 @@ introduce Y2K problems, but those are not really part of Vim itself.
==============================================================================
3. Credits *credits* *author*
Most of Vim was created by Bram Moolenaar <Bram@vim.org> |Bram-Moolenaar|
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
@@ -217,7 +220,8 @@ Vim would never have become what it is now, without the help of these people!
Bill Foster Athena GUI port (later removed)
Google Let Bram 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|
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

@@ -1,4 +1,4 @@
*message.txt* For Vim version 9.0. Last change: 2023 May 24
*message.txt* For Vim version 9.0. Last change: 2023 Nov 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -135,6 +135,8 @@ This happens when an Ex command executes an Ex command that executes an Ex
command, etc. The limit is 200 or the value of 'maxfuncdepth', whatever is
larger. When it's more there probably is an endless loop. Probably a
|:execute| or |:source| command is involved.
Can also happen with a recursive callback function (|job-callback|).
A limit of 20 is used here.
*E254*
Cannot allocate color {name} ~

View File

@@ -1,4 +1,4 @@
*netbeans.txt* For Vim version 9.0. Last change: 2022 Apr 03
*netbeans.txt* For Vim version 9.0. Last change: 2023 Nov 26
VIM REFERENCE MANUAL by Gordon Prieur et al.
@@ -846,7 +846,7 @@ REJECT Not used.
These errors occur when a message violates the protocol:
*E627* *E628* *E629* *E632* *E633* *E634* *E635* *E636*
*E637* *E638* *E639* *E640* *E641* *E642* *E643* *E644* *E645* *E646*
*E647* *E648* *E649* *E650* *E651* *E652*
*E647* *E648* *E650* *E651* *E652*
==============================================================================

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.0. Last change: 2023 Aug 15
*options.txt* For Vim version 9.0. Last change: 2023 Nov 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -71,7 +71,7 @@ achieve special effects. These options come in three forms:
'ttytype'
Warning: This may have a lot of side effects.
*:set-args* *:set=* *E487* *E521*
*:set-args* *:set=* *E487* *E521*
:se[t] {option}={value} or
:se[t] {option}:{value}
Set string or number option to {value}.
@@ -840,53 +840,6 @@ A jump table for the options with a short description can be found at |Q_op|.
to its default (empty string).
NOTE: This option is reset when 'compatible' is set.
*'autochdir'* *'acd'* *'noautochdir'* *'noacd'*
'autochdir' 'acd' boolean (default off)
global
{only available when compiled with it, use
exists("+autochdir") to check}
When on, Vim will change the current working directory whenever you
open a file, switch buffers, delete a buffer or open/close a window.
It will change to the directory containing the file which was opened
or selected. When a buffer has no name it also has no directory, thus
the current directory won't change when navigating to it.
Note: When this option is on some plugins may not work.
*'autoshelldir'* *'asd'* *'noautoshelldir'* *'noasd'*
'autoshelldir' 'asd' boolean (default off)
global
When on, Vim will change the current working directory whenever you
change the directory of the shell running in a terminal window. You
need proper setting-up, so whenever the shell's pwd changes an OSC 7
escape sequence will be emitted. For example, on Linux, you can
source /etc/profile.d/vte.sh in your shell profile if you use bash or
zsh. For bash this should work (put it in a bash init file): >
if [[ -n "$VIM_TERMINAL" ]]; then
PROMPT_COMMAND='_vim_sync_PWD'
function _vim_sync_PWD() {
printf '\033]7;file://%s\033\\' "$PWD"
}
fi
<
Or, in a zsh init file: >
if [[ -n "$VIM_TERMINAL" ]]; then
autoload -Uz add-zsh-hook
add-zsh-hook -Uz chpwd _vim_sync_PWD
function _vim_sync_PWD() {
printf '\033]7;file://%s\033\\' "$PWD"
}
fi
<
In a fish init file: >
if test -n "$VIM_TERMINAL"
function _vim_sync_PWD --on-variable=PWD
printf '\033]7;file://%s\033\\' "$PWD"
end
end
<
You can find an alternative method at |terminal-autoshelldir|.
When the parsing of the OSC sequence fails you get *E1179* .
*'arabic'* *'arab'* *'noarabic'* *'noarab'*
'arabic' 'arab' boolean (default off)
local to window
@@ -929,6 +882,18 @@ A jump table for the options with a short description can be found at |Q_op|.
further details see |arabic.txt|.
NOTE: This option is set when 'compatible' is set.
*'autochdir'* *'acd'* *'noautochdir'* *'noacd'*
'autochdir' 'acd' boolean (default off)
global
{only available when compiled with it, use
exists("+autochdir") to check}
When on, Vim will change the current working directory whenever you
open a file, switch buffers, delete a buffer or open/close a window.
It will change to the directory containing the file which was opened
or selected. When a buffer has no name it also has no directory, thus
the current directory won't change when navigating to it.
Note: When this option is on some plugins may not work.
*'autoindent'* *'ai'* *'noautoindent'* *'noai'*
'autoindent' 'ai' boolean (default off)
local to buffer
@@ -958,6 +923,42 @@ A jump table for the options with a short description can be found at |Q_op|.
using the global value: >
:set autoread<
<
*'autoshelldir'* *'asd'* *'noautoshelldir'* *'noasd'*
'autoshelldir' 'asd' boolean (default off)
global
When on, Vim will change the current working directory whenever you
change the directory of the shell running in a terminal window. You
need proper setting-up, so whenever the shell's pwd changes an OSC 7
escape sequence will be emitted. For example, on Linux, you can
source /etc/profile.d/vte.sh in your shell profile if you use bash or
zsh. For bash this should work (put it in a bash init file): >
if [[ -n "$VIM_TERMINAL" ]]; then
PROMPT_COMMAND='_vim_sync_PWD'
function _vim_sync_PWD() {
printf '\033]7;file://%s\033\\' "$PWD"
}
fi
<
Or, in a zsh init file: >
if [[ -n "$VIM_TERMINAL" ]]; then
autoload -Uz add-zsh-hook
add-zsh-hook -Uz chpwd _vim_sync_PWD
function _vim_sync_PWD() {
printf '\033]7;file://%s\033\\' "$PWD"
}
fi
<
In a fish init file: >
if test -n "$VIM_TERMINAL"
function _vim_sync_PWD --on-variable=PWD
printf '\033]7;file://%s\033\\' "$PWD"
end
end
<
You can find an alternative method at |terminal-autoshelldir|.
When the parsing of the OSC sequence fails you get *E1179* .
*'autowrite'* *'aw'* *'noautowrite'* *'noaw'*
'autowrite' 'aw' boolean (default off)
global
@@ -1424,7 +1425,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Some applications use the BOM to recognize the encoding of the file.
Often used for UCS-2 files on MS-Windows. For other applications it
causes trouble, for example: "cat file1 file2" makes the BOM of file2
appear halfway the resulting file. Gcc doesn't accept a BOM.
appear halfway through the resulting file. Gcc doesn't accept a BOM.
When Vim reads a file and 'fileencodings' starts with "ucs-bom", a
check for the presence of the BOM is done and 'bomb' set accordingly.
Unless 'binary' is set, it is removed from the first line, so that you
@@ -1604,6 +1605,8 @@ A jump table for the options with a short description can be found at |Q_op|.
current working directory to the |$HOME| directory like in Unix.
When off, those commands just print the current directory name.
On Unix this option has no effect.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
NOTE: This option is reset when 'compatible' is set.
*'cdpath'* *'cd'* *E344* *E346*
@@ -1727,7 +1730,14 @@ A jump table for the options with a short description can be found at |Q_op|.
program. See |cinoptions-values| for the values of this option, and
|C-indenting| for info on C indenting in general.
*'cinscopedecls'* *'cinsd'*
'cinscopedecls' 'cinsd' string (default "public,protected,private")
local to buffer
Keywords that are interpreted as a C++ scope declaration by |cino-g|.
Useful e.g. for working with the Qt framework that defines additional
scope declarations "signals", "public slots" and "private slots": >
set cinscopedecls+=signals,public\ slots,private\ slots
<
*'cinwords'* *'cinw'*
'cinwords' 'cinw' string (default "if,else,while,do,for,switch")
local to buffer
@@ -1738,15 +1748,7 @@ A jump table for the options with a short description can be found at |Q_op|.
matter, include the keyword both the uppercase and lowercase:
"if,If,IF".
*'cinscopedecls'* *'cinsd'*
'cinscopedecls' 'cinsd' string (default "public,protected,private")
local to buffer
Keywords that are interpreted as a C++ scope declaration by |cino-g|.
Useful e.g. for working with the Qt framework that defines additional
scope declarations "signals", "public slots" and "private slots": >
set cinscopedecls+=signals,public\ slots,private\ slots
< *'clipboard'* *'cb'*
*'clipboard'* *'cb'*
'clipboard' 'cb' string (default "autoselect,exclude:cons\|linux"
for X-windows, "" otherwise)
global
@@ -1971,6 +1973,8 @@ A jump table for the options with a short description can be found at |Q_op|.
'delcombine' + off unicode: delete whole char combination
'digraph' + off no digraphs
'esckeys' & off no <Esc>-keys in Insert mode
this also disables |modifyOtherKeys|
and |xterm-bracketed-paste|
'expandtab' + off tabs not expanded to spaces
'fileformats' & "" no automatic file format detection,
"dos,unix" except for MS-Windows
@@ -2080,21 +2084,6 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'completeslash'* *'csl'*
'completeslash' 'csl' string (default: "")
local to buffer
{only for MS-Windows}
When this option is set it overrules 'shellslash' for completion:
- When this option is set to "slash", a forward slash is used for path
completion in insert mode. This is useful when editing HTML tag, or
Makefile with 'noshellslash' on MS-Windows.
- When this option is set to "backslash", backslash is used. This is
useful when editing a batch file with 'shellslash' set on MS-Windows.
- When this option is empty, same character is used as for
'shellslash'.
For Insert mode completion the buffer-local value is used. For
command line completion the global value is used.
*'completeopt'* *'cot'*
'completeopt' 'cot' string (default: "menu,preview")
global
@@ -2140,7 +2129,6 @@ A jump table for the options with a short description can be found at |Q_op|.
select one from the menu. Only works in combination with
"menu" or "menuone".
*'completepopup'* *'cpp'*
'completepopup' 'cpp' string (default empty)
global
@@ -2153,6 +2141,20 @@ A jump table for the options with a short description can be found at |Q_op|.
You can also use |popup_findinfo()| and then set properties for an
existing info popup with |popup_setoptions()|. See |complete-popup|.
*'completeslash'* *'csl'*
'completeslash' 'csl' string (default: "")
local to buffer
{only for MS-Windows}
When this option is set it overrules 'shellslash' for completion:
- When this option is set to "slash", a forward slash is used for path
completion in insert mode. This is useful when editing HTML tag, or
Makefile with 'noshellslash' on MS-Windows.
- When this option is set to "backslash", backslash is used. This is
useful when editing a batch file with 'shellslash' set on MS-Windows.
- When this option is empty, same character is used as for
'shellslash'.
For Insert mode completion the buffer-local value is used. For
command line completion the global value is used.
*'concealcursor'* *'cocu'*
'concealcursor' 'cocu' string (default: "")
@@ -2175,7 +2177,6 @@ A jump table for the options with a short description can be found at |Q_op|.
Keep in mind that the cursor position is not always where it's
displayed. E.g., when moving vertically it may change column.
*'conceallevel'* *'cole'*
'conceallevel' 'cole' number (default 0)
local to window
@@ -2553,7 +2554,6 @@ A jump table for the options with a short description can be found at |Q_op|.
variables overrule the terminal size values obtained
with system specific functions.
*'cryptmethod'* *'cm'*
'cryptmethod' 'cm' string (default "blowfish2")
global or local to buffer |global-local|
@@ -2621,7 +2621,6 @@ A jump table for the options with a short description can be found at |Q_op|.
the current version does not recognize it, you will get *E821* .
You need to edit this file with the later version of Vim.
*'cscopepathcomp'* *'cspc'*
'cscopepathcomp' 'cspc' number (default 0)
global
@@ -2695,7 +2694,6 @@ A jump table for the options with a short description can be found at |Q_op|.
inserted and deleted lines (though not characters within a line) are
taken into account.
*'cursorcolumn'* *'cuc'* *'nocursorcolumn'* *'nocuc'*
'cursorcolumn' 'cuc' boolean (default off)
local to window
@@ -2720,7 +2718,6 @@ A jump table for the options with a short description can be found at |Q_op|.
When Visual mode is active the highlighting isn't used to make it
easier to see the selected text.
*'cursorlineopt'* *'culopt'*
'cursorlineopt' 'culopt' string (default: "number,line")
local to window
@@ -2740,7 +2737,6 @@ A jump table for the options with a short description can be found at |Q_op|.
"line" and "screenline" cannot be used together.
*'debug'*
'debug' string (default "")
global
@@ -3215,9 +3211,9 @@ A jump table for the options with a short description can be found at |Q_op|.
won't work by default.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
NOTE: when this option is off then the |modifyOtherKeys| functionality
is disabled while in Insert mode to avoid ending Insert mode with any
key that has a modifier.
NOTE: when this option is off then the |modifyOtherKeys| and
|xterm-bracketed-paste| functionality is disabled while in Insert mode
to avoid ending Insert mode with any key that has a modifier.
*'eventignore'* *'ei'*
'eventignore' 'ei' string (default "")
@@ -3490,8 +3486,8 @@ A jump table for the options with a short description can be found at |Q_op|.
and the value of that item:
item name default Used for ~
stl ' ' or '^' statusline of the current window
stlnc ' ' or '=' statusline of the non-current windows
stl ' ' statusline of the current window
stlnc ' ' statusline of the non-current windows
vert '|' vertical separators |:vsplit|
fold '-' filling 'foldtext'
foldopen '-' mark the beginning of a fold
@@ -3501,15 +3497,11 @@ A jump table for the options with a short description can be found at |Q_op|.
eob '~' empty lines below the end of a buffer
lastline '@' 'display' contains lastline/truncate
Any one that is omitted will fall back to the default. For "stl" and
"stlnc" the space will be used when there is highlighting, '^' or '='
otherwise.
Any one that is omitted will fall back to the default.
Example: >
:set fillchars=stl:^,stlnc:=,vert:\|,fold:-,diff:-
< This is similar to the default, except that these characters will also
be used when there is highlighting.
:set fillchars=stl:\ ,stlnc:\ ,vert:\|,fold:-,diff:-
<
For the "stl", "stlnc", "foldopen", "foldclose" and "foldsep" items
single-byte and multibyte characters are supported. But double-width
characters are not supported.
@@ -3791,9 +3783,10 @@ A jump table for the options with a short description can be found at |Q_op|.
'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt")
local to buffer
This is a sequence of letters which describes how automatic
formatting is to be done. See |fo-table|. When the 'paste' option is
on, no formatting is done (like 'formatoptions' is empty). Commas can
be inserted for readability.
formatting is to be done.
See |fo-table| for possible values and |gq| for how to format text.
When the 'paste' option is on, no formatting is done (like
'formatoptions' is empty). Commas can be inserted for readability.
To avoid problems with flags that are added in the future, use the
"+=" and "-=" feature of ":set" |add-option-flags|.
NOTE: This option is set to the Vi default value when 'compatible' is
@@ -4321,8 +4314,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|hl-PmenuSel| = popup menu selected line
|hl-PmenuKind| [ popup menu "kind" normal line
|hl-PmenuKindSel| ] popup menu "kind" selected line
|hl-PmenuExtra| { popup menu "kind" normal line
|hl-PmenuExtraSel| } popup menu "kind" selected line
|hl-PmenuExtra| { popup menu "extra" normal line
|hl-PmenuExtraSel| } popup menu "extra" selected line
|hl-PmenuSbar| x popup menu scrollbar
|hl-PmenuThumb| X popup menu scrollbar thumb
@@ -4440,8 +4433,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'ignorecase'* *'ic'* *'noignorecase'* *'noic'*
'ignorecase' 'ic' boolean (default off)
global
Ignore case in search patterns. Also used when searching in the tags
file.
Ignore case in search patterns, |cmdline-completion|, when
searching in the tags file, and non-|Vim9| |expr-==|.
Also see 'smartcase' and 'tagcase'.
Can be overruled by using "\c" or "\C" in the pattern, see
|/ignorecase|.
@@ -4746,7 +4739,6 @@ A jump table for the options with a short description can be found at |Q_op|.
It is not allowed to change text or jump to another window while
evaluating 'indentexpr' |textlock|.
*'indentkeys'* *'indk'*
'indentkeys' 'indk' string (default "0{,0},0),0],:,0#,!^F,o,O,e")
local to buffer
@@ -5587,7 +5579,8 @@ A jump table for the options with a short description can be found at |Q_op|.
< If you have less than 512 Mbyte |:mkspell| may fail for some
languages, no matter what you set 'mkspellmem' to.
This option cannot be set from a |modeline| or in the |sandbox|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'modeline'* *'ml'* *'nomodeline'* *'noml'*
'modeline' 'ml' boolean (Vim default: on (off for root),
@@ -5746,7 +5739,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The 'mousemodel' option is set by the |:behave| command.
*'mousemoveevent'* *'mousemev'* *'nomousemoveevent'* *'nomousemev'*
*'mousemoveevent'* *'mousemev'* *'nomousemoveevent'* *'nomousemev'*
'mousemoveevent' 'mousemev' boolean (default off)
global
{only works in the GUI}
@@ -5831,6 +5824,16 @@ A jump table for the options with a short description can be found at |Q_op|.
time in msec between two mouse clicks for the second click to be
recognized as a multi click.
*'mzquantum'* *'mzq'*
'mzquantum' 'mzq' number (default 100)
global
{not available when compiled without the |+mzscheme|
feature}
The number of milliseconds between polls for MzScheme threads.
Negative or zero value means no thread scheduling.
NOTE: This option is set to the Vim default value when 'compatible'
is reset.
*'mzschemedll'*
'mzschemedll' string (default depends on the build)
global
@@ -5856,16 +5859,6 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'mzquantum'* *'mzq'*
'mzquantum' 'mzq' number (default 100)
global
{not available when compiled without the |+mzscheme|
feature}
The number of milliseconds between polls for MzScheme threads.
Negative or zero value means no thread scheduling.
NOTE: This option is set to the Vim default value when 'compatible'
is reset.
*'nrformats'* *'nf'*
'nrformats' 'nf' string (default "bin,octal,hex",
set to "bin,hex" in |defaults.vim|)
@@ -5956,7 +5949,6 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'opendevice'* *'odev'* *'noopendevice'* *'noodev'*
'opendevice' 'odev' boolean (default off)
global
@@ -5967,7 +5959,6 @@ A jump table for the options with a short description can be found at |Q_op|.
Note that on MS-Windows editing "aux.h", "lpt1.txt" and the like also
result in editing a device.
*'operatorfunc'* *'opfunc'*
'operatorfunc' 'opfunc' string (default: empty)
global
@@ -5979,17 +5970,16 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'osfiletype'* *'oft'*
'osfiletype' 'oft' string (default: "")
local to buffer
This option was supported on RISC OS, which has been removed.
*'packpath'* *'pp'*
'packpath' 'pp' string (default: see 'runtimepath')
Directories used to find packages. See |packages|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'paragraphs'* *'para'*
'paragraphs' 'para' string (default "IPLPPPQPP TPHPLIPpLpItpplpipbp")
@@ -6073,6 +6063,8 @@ A jump table for the options with a short description can be found at |Q_op|.
feature}
Expression which is evaluated to apply a patch to a file and generate
the resulting new version of the file. See |diff-patchexpr|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'patchmode'* *'pm'* *E205* *E206*
'patchmode' 'pm' string (default "")
@@ -7155,6 +7147,8 @@ A jump table for the options with a short description can be found at |Q_op|.
When 'shellxquote' is set to "(" then the characters listed in this
option will be escaped with a '^' character. This makes it possible
to execute most external commands with cmd.exe.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'shellxquote'* *'sxq'*
'shellxquote' 'sxq' string (default: "";
@@ -7432,7 +7426,6 @@ A jump table for the options with a short description can be found at |Q_op|.
"number" display signs in the 'number' column. If the number
column is not present, then behaves like "auto".
*'smartcase'* *'scs'* *'nosmartcase'* *'noscs'*
'smartcase' 'scs' boolean (default off)
global
@@ -7700,7 +7693,6 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'*
'splitbelow' 'sb' boolean (default off)
global
@@ -7995,7 +7987,7 @@ A jump table for the options with a short description can be found at |Q_op|.
This option controls the behavior when switching between buffers.
This option is checked, when
- jumping to errors with the |quickfix| commands (|:cc|, |:cn|, |:cp|,
etc.)
etc.).
- jumping to a tag using the |:stag| command.
- opening a file using the |CTRL-W_f| or |CTRL-W_F| command.
- jumping to a buffer using a buffer split command (e.g. |:sbuffer|,
@@ -8083,14 +8075,12 @@ A jump table for the options with a short description can be found at |Q_op|.
Keep in mind that only one of the tab pages is the current one, others
are invisible and you can't jump to their windows.
*'tabpagemax'* *'tpm'*
'tabpagemax' 'tpm' number (default 10)
global
Maximum number of tab pages to be opened by the |-p| command line
argument or the ":tab all" command. |tabpage|
*'tabstop'* *'ts'*
'tabstop' 'ts' number (default 8)
local to buffer
@@ -8211,6 +8201,8 @@ A jump table for the options with a short description can be found at |Q_op|.
function and an example. The value can be the name of a function, a
|lambda| or a |Funcref|. See |option-value-function| for more
information.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'taglength'* *'tl'*
'taglength' 'tl' number (default 0)
@@ -8508,6 +8500,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'timeout'* *'to'* *'notimeout'* *'noto'*
'timeout' 'to' boolean (default on)
global
*'ttimeout'* *'nottimeout'*
'ttimeout' boolean (default off, set in |defaults.vim|)
global
@@ -8970,12 +8963,14 @@ A jump table for the options with a short description can be found at |Q_op|.
Setting 'verbosefile' to a new value is like making it empty first.
The difference with |:redir| is that verbose messages are not
displayed when 'verbosefile' is set.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'viewdir'* *'vdir'*
'viewdir' 'vdir' string (default for Amiga "home:vimfiles/view",
'viewdir' 'vdir' string (default for Amiga: "home:vimfiles/view",
for Win32: "$HOME/vimfiles/view",
for Unix: "$HOME/.vim/view",
for macOS: "$VIM/vimfiles/view"
for macOS: "$VIM/vimfiles/view",
for VMS: "sys$login:vimfiles/view")
global
{not available when compiled without the |+mksession|
@@ -9252,6 +9247,8 @@ A jump table for the options with a short description can be found at |Q_op|.
The character is not recognized when used inside a macro. See
'wildcharm' for that.
Some keys will not work, such as CTRL-C, <CR> and Enter.
<Esc> can be used, but hitting it twice in a row will still exit
command-line as a failsafe measure.
Although 'wc' is a number option, you can set it to a special key: >
:set wc=<Tab>
< NOTE: This option is set to the Vi default value when 'compatible' is
@@ -9284,8 +9281,7 @@ A jump table for the options with a short description can be found at |Q_op|.
a pattern from the list. This avoids problems when a future version
uses another default.
*'wildignorecase'* *'wic'* *'nowildignorecase'* *'nowic'*
*'wildignorecase'* *'wic'* *'nowildignorecase'* *'nowic'*
'wildignorecase' 'wic' boolean (default off)
global
When set case is ignored when completing file names and directories.
@@ -9293,7 +9289,6 @@ A jump table for the options with a short description can be found at |Q_op|.
Does not apply when the shell is used to expand wildcards, which
happens when there are special characters.
*'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'*
'wildmenu' 'wmnu' boolean (default off, set in |defaults.vim|)
global
@@ -9314,31 +9309,34 @@ A jump table for the options with a short description can be found at |Q_op|.
as needed.
The "wildmenu" mode is abandoned when a key is hit that is not used
for selecting a completion.
While the "wildmenu" is active, not using the popup menu, the
following keys have special meanings:
<Left> <Right> - select previous/next match (like CTRL-P/CTRL-N)
<Down> - in filename/menu name completion: move into a
subdirectory or submenu.
While the "wildmenu" is active, the following keys have special
meanings:
CTRL-P - go to the previous entry
CTRL-N - go to the next entry
<CR> - in menu completion, when the cursor is just after a
dot: move into a submenu.
CTRL-E - end completion, go back to what was there before
selecting a match.
CTRL-Y - accept the currently selected match and stop
completion.
When not using the popup menu for command line completion, the
following keys have special meanings:
<Left> <Right> - select previous/next match (like CTRL-P/CTRL-N)
<Up> - in filename/menu name completion: move up into
parent directory or parent menu.
<Down> - in filename/menu name completion: move into a
subdirectory or submenu.
When using the popup menu for command line completion, the following
keys have special meanings:
<Down> - select next match (like CTRL-N)
<Up> <Down> - select previous/next match (like CTRL-P/CTRL-N)
<PageUp> - select a match several entries back
<PageDown> - select a match several entries further
<Left> - in filename/menu name completion: move up into
parent directory or parent menu.
<Right> - in filename/menu name completion: move into a
subdirectory or submenu.
<Up> - select previous match (like CTRL-P)
CTRL-E - end completion, go back to what was there before
selecting a match.
CTRL-N - go to the next entry
CTRL-P - go to the previous entry
CTRL-Y - accept the currently selected match and stop
completion.
This makes the menus accessible from the console |console-menus|.
@@ -9458,6 +9456,21 @@ A jump table for the options with a short description can be found at |Q_op|.
Note: Do not confuse this with the height of the Vim window, use
'lines' for that.
*'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'*
'winfixheight' 'wfh' boolean (default off)
local to window |local-noglobal|
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|.
The height may be changed anyway when running out of room.
*'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'*
'winfixwidth' 'wfw' boolean (default off)
local to window |local-noglobal|
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.
*'winheight'* *'wh'* *E591*
'winheight' 'wh' number (default 1)
global
@@ -9478,21 +9491,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'winheight' applies to the current window. Use 'winminheight' to set
the minimal height for other windows.
*'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'*
'winfixheight' 'wfh' boolean (default off)
local to window |local-noglobal|
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|.
The height may be changed anyway when running out of room.
*'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'*
'winfixwidth' 'wfw' boolean (default off)
local to window |local-noglobal|
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.
*'winminheight'* *'wmh'*
'winminheight' 'wmh' number (default 1)
global

View File

@@ -44,14 +44,16 @@ You can download precompiled executables from:
To use the precompiled binary version, you need one of these archives:
vim-XX-exe-ia64-gui.zip IA64 GUI/Motif executables
vim-XX-exe-ia64-gtk.zip IA64 GUI/GTK executables
vim-XX-exe-ia64-term.zip IA64 console executables
vim-XX-exe-x86-gui.zip X86_64 GUI/Motif executables
vim-XX-exe-x86-term.zip X86_64 console executables
vim-XX-exe-ia64-gui.zip IA64 GUI/Motif executables
vim-XX-exe-ia64-gtk.zip IA64 GUI/GTK executables
vim-XX-exe-ia64-term.zip IA64 console executables
vim-XX-exe-axp-gui.zip Alpha GUI/Motif executables
vim-XX-exe-axp-gtk.zip Alpha GUI/GTK executables
vim-XX-exe-axp-term.zip Alpha console executables
vim-XX-exe-axp-term.zip Alpha console executables
vim-XX-exe-vax-gui.zip VAX GUI executables
vim-XX-exe-vax-term.zip VAX console executables
vim-XX-exe-vax-term.zip VAX console executables
and of course (optional)
vim-XX-runtime.zip runtime files
@@ -59,7 +61,7 @@ and of course (optional)
The binary archives contain: vim.exe, ctags.exe, xxd.exe files.
For GTK executables you will need GTKLIB that is available for
Alpha and IA64 platform.
Alpha and IA64 platforms.
==============================================================================
@@ -71,9 +73,9 @@ See the file [.SRC]INSTALLVMS.TXT.
4. Problems *vms-problems*
The code has been tested under Open VMS 6.2 - 8.2 on Alpha, VAX and IA64
platforms with the DEC C compiler. It should work without major problems.
If your system does not have some include libraries you can tune up in
The code has been tested under Open VMS 6.2 - 9.2 on Alpha, VAX, IA64 and
X86_64 platforms with the DEC C compiler. It should work without major problems.
If your system does not have some include libraries you can tune in the
OS_VMS_CONF.H file.
If you decided to build Vim with +perl, +python, etc. options, first you need
@@ -88,8 +90,7 @@ VAX C compiler is not fully ANSI C compatible in pre-processor directives
semantics, therefore you have to use a converter program that will do the lion
part of the job. For detailed instructions read file INSTALLvms.txt
MMS_VIM.EXE is built together with VIM.EXE, but for XXD.EXE you should
change to a subdirectory and build it separately.
To build XXD.EXE, you should change to the subdirectory and build it separately.
CTAGS is not part of the Vim source distribution anymore, however the OpenVMS
specific source might contain CTAGS source files as described above.
@@ -206,6 +207,7 @@ Example LOGIN.COM: >
$ define/nolog VIM DKA0:[UTIL.VIM81]
$ vi*m :== mcr VIM:VIM.EXE
$ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
$ set term/inq/ins ! inquire the terminal capabilities
$ set disp/create/node=192.168.10.202/trans=tcpip
Note: This set-up should be enough, if you are working on a standalone server or
@@ -443,7 +445,12 @@ Terminal entry not found in termcap
builtin_dumb
defaulting to 'vt320'
---
The solution is to define the default terminal name: >
Try to force to inquire the terminal capabilities with: >
$ set term/inquire
If the inquire did not help, the solutions is to define the default terminal name: >
$ ! unknown terminal name. Let us use vt320 or ansi instead.
$ ! Note: it's case sensitive
@@ -758,7 +765,18 @@ GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
9. VMS related changes *vms-changes*
Version 8.2
Version 9.0 (2023 Nov 27)
- Vim is ported to the X86_64 architecture
- IMPORTANT: because of the getline function name used in stucts like in ex_cmds.h
on X86_64 the CRTL_VER is kept under 80500000 level. The proper solution would be
to rename the getline function to something else in the struct (and in all places
it is used) - and avoiding to use POSIX functions in structs, but this change would
impact on all other operating systems. (added the the VMS TODO list)
Read more about at https://forum.vmssoftware.com/viewtopic.php?f=38&t=8914&p=20049
- os_vms_conf.h includes have been reviewed for all architectures
- added support for the MODIFIED_BY define
Version 8.2 (2020 Feb 6)
- make all changes needed for clean compile build of v8.2 on VMS on all platforms
- fix the call mkdir bug (vicente_polo@yahoo.es)
- test on VSI OpenVMS Alpha and Itanium platforms
@@ -767,17 +785,18 @@ Version 8.2
- XPM v3.4.11 libraries for IA64, AXP and VAX are added
- start integrating the new test scripts
Version 8.1
Version 8.1 (2019 Jan 9)
- make necessary changes to build v8.1 on VMS
- GTK1.2.10 on VAX
Version 8.0
Version 8.0 (2016 Nov 21)
- solve the 100% cpu usage issue while waiting for a keystroke
- correct the VMS warnings and errors around handling the INFINITY (used in json.c)
- minor VMS port related changes
- correct the make_vms.mms file for 8.0
- fix [.TESTDIR]make_vms.mms for 8.0
Version 7.4
Version 7.4 (2013 Aug 10)
- Undo: VMS can not handle more than one dot in the filenames use "dir/name" -> "dir/_un_name"
add _un_ at the beginning to keep the extension
- correct swap file name wildcard handling
@@ -793,7 +812,7 @@ Version 7.4
- minor compiler warnings fixed
- CTAGS 5.8 +regex included
Version 7.3
Version 7.3 (2010 Aug 15)
- CTAGS 5.8 included
- VMS compile warnings fixed - floating-point overflow warning corrected on VAX
- filepath completion corrected - too many chars were escaped in filename
@@ -956,7 +975,7 @@ Version 4.5 (1996 Dec 16)
10. Authors *vms-authors*
OpenVMS documentation and executables are maintained by:
Zoltan Arpadffy <arpadffy@polarhome.com>
Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
OpenVMS Vim page: http://www.polarhome.com/vim/
This document uses parts and remarks from earlier authors and contributors

View File

@@ -1,4 +1,4 @@
*os_win32.txt* For Vim version 9.0. Last change: 2022 Sep 18
*os_win32.txt* For Vim version 9.0. Last change: 2023 Dec 04
VIM REFERENCE MANUAL by George Reilly
@@ -304,7 +304,7 @@ A. When using :! to run an external command, you can run it with "start". For
treated as the start of the command.
*windows-asynchronously*
Q. How do I avoid getting a window for programs that I run asynchronously?
A. You have two possible solutions depending on what you want:
A. You have three possible solutions depending on what you want:
1) You may use the /min flag in order to run program in a minimized state
with no other changes. It will work equally for console and GUI
applications.
@@ -313,6 +313,9 @@ A. You have two possible solutions depending on what you want:
should use this flag only if the application you run doesn't require any
input. Otherwise it will get an EOF error because its input stream
(stdin) would be redirected to \\.\NUL (stdout and stderr too).
3) Set the '!' flag in the 'guioptions' option |'go-!'|. This will make Vim
run the "start" command inside Vims terminal window and not open a
console window.
Example for a console application, run Exuberant ctags: >
:!start /min ctags -R .

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 9.0. Last change: 2023 Feb 04
*pattern.txt* For Vim version 9.0. Last change: 2023 Oct 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1461,10 +1461,11 @@ Finally, these constructs are unique to Perl:
Just like |:match| above, but set a separate match. Thus
there can be three matches active at the same time. The match
with the lowest number has priority if several match at the
same position.
The ":3match" command is used by the |matchparen| plugin. You
are suggested to use ":match" for manual matching and
":2match" for another plugin.
same position. It uses the match id 3.
The ":3match" command is used by (Vim < 9.0.2054) |matchparen|
plugin. You are suggested to use ":match" for manual matching
and ":2match" for another plugin or even better make use of
the more flexible |matchadd()| (and similar) functions instead.
==============================================================================
11. Fuzzy matching *fuzzy-matching*

View File

@@ -1,4 +1,4 @@
*pi_gzip.txt* For Vim version 9.0. Last change: 2019 May 05
*pi_gzip.txt* For Vim version 9.0. Last change: 2023 Nov 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -12,6 +12,14 @@ The functionality mentioned here is a |standard-plugin|.
This plugin is only available if 'compatible' is not set.
You can avoid loading this plugin by setting the "loaded_gzip" variable: >
:let loaded_gzip = 1
<
*g:gzip_exec*
For security reasons, one may prevent that Vim runs executables automatically
when opening a buffer. This option (default: "1") can be used to prevent
executing the executables command when set to "0": >
:let g:gzip_exec = 0
<
==============================================================================
1. Autocommands *gzip-autocmd*

View File

@@ -1,4 +1,4 @@
*pi_zip.txt* For Vim version 9.0. Last change: 2023 Mar 12
*pi_zip.txt* For Vim version 9.0. Last change: 2023 Nov 05
+====================+
| Zip File Interface |
@@ -69,6 +69,13 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
This option specifies the program (and any options needed) used to
extract a file from a zip archive. By default, >
let g:zip_extractcmd= g:zip_unzipcmd
<
*g:zip_exec*
For security reasons, one may prevent that Vim runs executables
automatically when opening a buffer. This option (default: "1")
can be used to prevent executing the "unzip" command when set to
"0": >
let g:zip_exec=0
<
PREVENTING LOADING~

View File

@@ -1422,6 +1422,7 @@ rest is ignored. Items can only be 1023 bytes long.
Basic items
%f file name (finds a string)
%b buffer number (finds a number)
%o module name (finds a string)
%l line number (finds a number)
%e end line number (finds a number)
@@ -1461,6 +1462,11 @@ On MS-Windows a leading "C:" will be included in "%f", even when using "%f:".
This means that a file name which is a single alphabetical letter will not be
detected.
The "%b" conversion is used to parse a buffer number. This is useful for
referring to lines in a scratch buffer or a buffer with no name. If a buffer
with the matching number doesn't exist, then that line is used as a non-error
line.
The "%p" conversion is normally followed by a "^". It's used for compilers
that output a line like: >
^

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 9.0. Last change: 2022 Dec 16
*quickref.txt* For Vim version 9.0. Last change: 2023 Dec 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -604,12 +604,12 @@ Short explanation of each option: *option-list*
'altkeymap' 'akm' obsolete option for Farsi
'ambiwidth' 'ambw' what to do with Unicode chars of ambiguous width
'antialias' 'anti' Mac OS X: use smooth, antialiased fonts
'autochdir' 'acd' change directory to the file in the current window
'autoshelldir' 'asd' change directory to the shell's current directory
'arabic' 'arab' for Arabic as a default second language
'arabicshape' 'arshape' do shaping for Arabic characters
'autochdir' 'acd' change directory to the file in the current window
'autoindent' 'ai' take indent for new line from previous line
'autoread' 'ar' autom. read file when changed outside of Vim
'autoshelldir' 'asd' change directory to the shell's current directory
'autowrite' 'aw' automatically write file if changed
'autowriteall' 'awa' as 'autowrite', but works with more commands
'background' 'bg' "dark" or "light", used for highlight colors
@@ -642,8 +642,8 @@ Short explanation of each option: *option-list*
'cindent' 'cin' do C program indenting
'cinkeys' 'cink' keys that trigger indent when 'cindent' is set
'cinoptions' 'cino' how to do indenting when 'cindent' is set
'cinwords' 'cinw' words where 'si' and 'cin' add an indent
'cinscopedecls' 'cinsd' words that are recognized by 'cino-g'
'cinwords' 'cinw' words where 'si' and 'cin' add an indent
'clipboard' 'cb' use the clipboard as the unnamed register
'cmdheight' 'ch' number of lines to use for the command-line
'cmdwinheight' 'cwh' height of the command-line window
@@ -1005,9 +1005,9 @@ Short explanation of each option: *option-list*
'winaltkeys' 'wak' when the windows system handles ALT keys
'wincolor' 'wcr' window-local highlighting
'window' 'wi' nr of lines to scroll for CTRL-F and CTRL-B
'winheight' 'wh' minimum number of lines for the current window
'winfixheight' 'wfh' keep window height when opening/closing windows
'winfixwidth' 'wfw' keep window width when opening/closing windows
'winheight' 'wh' minimum number of lines for the current window
'winminheight' 'wmh' minimum number of lines for any window
'winminwidth' 'wmw' minimal number of columns for any window
'winptydll' name of the winpty dynamic library

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 9.0. Last change: 2023 May 30
*starting.txt* For Vim version 9.0. Last change: 2023 Oct 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -249,10 +249,10 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
*-Z* *restricted-mode* *E145* *E981*
-Z Restricted mode. All commands that make use of an external
shell are disabled. This includes suspending with CTRL-Z,
":sh", filtering, the system() function, backtick expansion
":sh", filtering, the |system()| function, backtick expansion
and libcall().
Also disallowed are delete(), rename(), mkdir(), job_start(),
etc.
Also disallowed are |delete()|, |rename()|, |mkdir()|,
|job_start()|, |setenv()| etc.
Interfaces, such as Python, Ruby and Lua, are also disabled,
since they could be used to execute shell commands. Perl uses
the Safe module.
@@ -348,7 +348,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
Start logging and write entries to {filename}.
This works like calling `ch_logfile({filename}, 'ao')` very
early during startup.
{only available with the |+eval| feature}
{only available with the |+eval| and |+channel| feature}
*-D*
-D Debugging. Go to debugging mode when executing the first

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.0. Last change: 2023 Apr 24
*syntax.txt* For Vim version 9.0. Last change: 2023 Dec 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1591,7 +1591,15 @@ FORTRAN *fortran.vim* *ft-fortran-syntax*
Default highlighting and dialect ~
Highlighting appropriate for Fortran 2008 is used by default. This choice
should be appropriate for most users most of the time because Fortran 2008 is
almost a superset of previous versions (Fortran 2003, 95, 90, and 77).
almost a superset of previous versions (Fortran 2003, 95, 90, and 77). A
small number of features new to Fortran 2018 and Fortran 2023 are supported
and the complete transition to Fortran 2023 will be completed in the future.
A few legacy constructs deleted or declared obsolescent in recent Fortran
standards are highlighted as todo items.
The syntax script no longer supports Fortran dialects. The variable
fortran_dialect is now silently ignored. Since computers are much faster now,
the variable fortran_more_precise is no longer needed and is silently ignored.
Fortran source code form ~
Fortran code can be in either fixed or free source form. Note that the
@@ -1618,14 +1626,36 @@ neither of these variables have been set, the syntax script attempts to
determine which source form has been used by examining the file extension
using conventions common to the ifort, gfortran, Cray, NAG, and PathScale
compilers (.f, .for, .f77 for fixed-source, .f90, .f95, .f03, .f08 for
free-source). If none of this works, then the script examines the first five
columns of the first 500 lines of your file. If no signs of free source form
are detected, then the file is assumed to be in fixed source form. The
algorithm should work in the vast majority of cases. In some cases, such as a
file that begins with 500 or more full-line comments, the script may
incorrectly decide that the fortran code is in fixed form. If that happens,
just add a non-comment statement beginning anywhere in the first five columns
of the first twenty-five lines, save (:w) and then reload (:e!) the file.
free-source). No default is used for the .fpp and .ftn file extensions because
different compilers treat them differently. If none of this works, then the
script examines the first five columns of the first 500 lines of your file. If
no signs of free source form are detected, then the file is assumed to be in
fixed source form. The algorithm should work in the vast majority of cases.
In some cases, such as a file that begins with 500 or more full-line comments,
the script may incorrectly decide that the code is in fixed form. If that
happens, just add a non-comment statement beginning anywhere in the first five
columns of the first twenty-five lines, save (:w), and then reload (:e!) the
file.
Vendor extensions ~
Fixed-form Fortran requires a maximum line length of 72 characters but the
script allows a maximum line length of 80 characters as do all compilers
created in the last three decades. An even longer line length of 132
characters is allowed if you set the variable fortran_extended_line_length
with a command such as >
:let fortran_line_length=1
placed prior to the :syntax on command.
If you want additional highlighting of the CUDA Fortran extensions, you should
set the variable fortran_CUDA with a command such as >
:let fortran_CUDA=1
placed prior to the :syntax on command.
To activate recognition of some common, non-standard, vendor-supplied
intrinsics, you should set the variable fortran_vendor_intrinsics with a
command such as >
:let fortran_vendor_intrinsics=1
placed prior to the :syntax on command.
Tabs in fortran files ~
Tabs are not recognized by the Fortran standards. Tabs are not a good idea in
@@ -1647,8 +1677,8 @@ subprograms, block data subprograms, interface blocks, and modules. If you
also set the variable fortran_fold_conditionals with a command such as >
:let fortran_fold_conditionals=1
then fold regions will also be defined for do loops, if blocks, and select
case constructs. If you also set the variable
fortran_fold_multilinecomments with a command such as >
case constructs. If you also set the variable fortran_fold_multilinecomments
with a command such as >
:let fortran_fold_multilinecomments=1
then fold regions will also be defined for three or more consecutive comment
lines. Note that defining fold regions can be slow for large files.
@@ -1659,58 +1689,6 @@ you set foldmethod=syntax. Comments or blank lines placed between two program
units are not folded because they are seen as not belonging to any program
unit.
More precise fortran syntax ~
If you set the variable fortran_more_precise with a command such as >
:let fortran_more_precise=1
then the syntax coloring will be more precise but slower. In particular,
statement labels used in do, goto and arithmetic if statements will be
recognized, as will construct names at the end of a do, if, select or forall
construct.
Non-default fortran dialects ~
The syntax script supports two Fortran dialects: f08 and F. You will probably
find the default highlighting (f08) satisfactory. A few legacy constructs
deleted or declared obsolescent in the 2008 standard are highlighted as todo
items.
If you use F, the advantage of setting the dialect appropriately is that
other legacy features excluded from F will be highlighted as todo items and
that free source form will be assumed.
The dialect can be selected in various ways. If all your fortran files use
the same dialect, set the global variable fortran_dialect in your .vimrc prior
to your syntax on statement. The case-sensitive, permissible values of
fortran_dialect are "f08" or "F". Invalid values of fortran_dialect are
ignored.
If the dialect depends upon the file extension, then it is most convenient to
set a buffer-local variable in a ftplugin file. For more information on
ftplugin files, see |ftplugin|. For example, if all your fortran files with
an .f90 extension are written in the F subset, your ftplugin file should
contain the code >
let s:extfname = expand("%:e")
if s:extfname ==? "f90"
let b:fortran_dialect="F"
else
unlet! b:fortran_dialect
endif
Note that this will work only if the "filetype plugin indent on" command
precedes the "syntax on" command in your .vimrc file.
Finer control is necessary if the file extension does not uniquely identify
the dialect. You can override the default dialect, on a file-by-file basis,
by including a comment with the directive "fortran_dialect=xx" (where xx=F or
f08) in one of the first three lines in your file. For example, your older .f
files may be legacy code but your newer ones may be F codes, and you would
identify the latter by including in the first three lines of those files a
Fortran comment of the form >
! fortran_dialect=F
For previous versions of the syntax, you may have set fortran_dialect to the
now-obsolete values "f77", "f90", "f95", or "elf". Such settings will be
silently handled as "f08". Users of "elf" may wish to experiment with "F"
instead.
The syntax/fortran.vim script contains embedded comments that tell you how to
comment and/or uncomment some lines to (a) activate recognition of some
non-standard, vendor-supplied intrinsics and (b) to prevent features deleted
@@ -2797,7 +2775,7 @@ The first option implies the second one.
For highlighted trailing whitespace and mix of spaces and tabs: >
:let python_space_error_highlight = 1
If you want all possible Python highlighting:
If you want all possible Python highlighting: >
:let python_highlight_all = 1
This has the same effect as setting python_space_error_highlight and
unsetting all the other ones.

View File

@@ -4514,6 +4514,7 @@ E1507 builtin.txt /*E1507*
E1508 editing.txt /*E1508*
E1509 editing.txt /*E1509*
E151 helphelp.txt /*E151*
E1510 change.txt /*E1510*
E152 helphelp.txt /*E152*
E153 helphelp.txt /*E153*
E154 helphelp.txt /*E154*
@@ -5046,7 +5047,6 @@ E645 netbeans.txt /*E645*
E646 netbeans.txt /*E646*
E647 netbeans.txt /*E647*
E648 netbeans.txt /*E648*
E649 netbeans.txt /*E649*
E65 pattern.txt /*E65*
E650 netbeans.txt /*E650*
E651 netbeans.txt /*E651*
@@ -6758,6 +6758,8 @@ dircolors.vim syntax.txt /*dircolors.vim*
dis motion.txt /*dis*
disable-menus gui.txt /*disable-menus*
discard editing.txt /*discard*
dist#vim eval.txt /*dist#vim*
dist#vim9 eval.txt /*dist#vim9*
distribute-script usr_51.txt /*distribute-script*
distributed-plugins usr_05.txt /*distributed-plugins*
distribution intro.txt /*distribution*
@@ -7422,6 +7424,7 @@ g:gnat.Project_File ft_ada.txt /*g:gnat.Project_File*
g:gnat.Set_Project_File() ft_ada.txt /*g:gnat.Set_Project_File()*
g:gnat.Tags() ft_ada.txt /*g:gnat.Tags()*
g:gnat.Tags_Command ft_ada.txt /*g:gnat.Tags_Command*
g:gzip_exec pi_gzip.txt /*g:gzip_exec*
g:html_charset_override syntax.txt /*g:html_charset_override*
g:html_diff_one_file syntax.txt /*g:html_diff_one_file*
g:html_dynamic_folds syntax.txt /*g:html_dynamic_folds*
@@ -7616,6 +7619,7 @@ g:vimsyn_minlines syntax.txt /*g:vimsyn_minlines*
g:vimsyn_noerror syntax.txt /*g:vimsyn_noerror*
g:yaml_schema syntax.txt /*g:yaml_schema*
g:zipPlugin_ext pi_zip.txt /*g:zipPlugin_ext*
g:zip_exec pi_zip.txt /*g:zip_exec*
g:zip_extractcmd pi_zip.txt /*g:zip_extractcmd*
g:zip_nomax pi_zip.txt /*g:zip_nomax*
g:zip_shq pi_zip.txt /*g:zip_shq*
@@ -7666,6 +7670,7 @@ gd pattern.txt /*gd*
gdb debug.txt /*gdb*
gdb-version terminal.txt /*gdb-version*
ge motion.txt /*ge*
gender-neutral helphelp.txt /*gender-neutral*
get() builtin.txt /*get()*
get-ms-debuggers debug.txt /*get-ms-debuggers*
getbufinfo() builtin.txt /*getbufinfo()*
@@ -9058,10 +9063,12 @@ null vim9.txt /*null*
null-variable eval.txt /*null-variable*
null_blob vim9.txt /*null_blob*
null_channel vim9.txt /*null_channel*
null_class vim9.txt /*null_class*
null_dict vim9.txt /*null_dict*
null_function vim9.txt /*null_function*
null_job vim9.txt /*null_job*
null_list vim9.txt /*null_list*
null_object vim9.txt /*null_object*
null_partial vim9.txt /*null_partial*
null_string vim9.txt /*null_string*
number_relativenumber options.txt /*number_relativenumber*
@@ -9330,8 +9337,6 @@ printf-s builtin.txt /*printf-s*
printf-x builtin.txt /*printf-x*
printing print.txt /*printing*
printing-formfeed print.txt /*printing-formfeed*
private-method vim9class.txt /*private-method*
private-variable vim9class.txt /*private-variable*
profile repeat.txt /*profile*
profiling repeat.txt /*profiling*
profiling-variable eval.txt /*profiling-variable*
@@ -9356,6 +9361,8 @@ prop_type_change() textprop.txt /*prop_type_change()*
prop_type_delete() textprop.txt /*prop_type_delete()*
prop_type_get() textprop.txt /*prop_type_get()*
prop_type_list() textprop.txt /*prop_type_list()*
protected-method vim9class.txt /*protected-method*
protected-variable vim9class.txt /*protected-variable*
ps1-about ft_ps1.txt /*ps1-about*
ps1-compiler ft_ps1.txt /*ps1-compiler*
ps1-folding ft_ps1.txt /*ps1-folding*
@@ -9364,6 +9371,7 @@ ps1-syntax ft_ps1.txt /*ps1-syntax*
psql ft_sql.txt /*psql*
ptcap.vim syntax.txt /*ptcap.vim*
pterm-mouse options.txt /*pterm-mouse*
public-variable vim9class.txt /*public-variable*
pum_getpos() builtin.txt /*pum_getpos()*
pumvisible() builtin.txt /*pumvisible()*
put change.txt /*put*
@@ -9503,6 +9511,7 @@ rcp pi_netrw.txt /*rcp*
read-in-close-cb channel.txt /*read-in-close-cb*
read-messages insert.txt /*read-messages*
read-only-share editing.txt /*read-only-share*
read-only-variable vim9class.txt /*read-only-variable*
read-stdin version5.txt /*read-stdin*
readblob() builtin.txt /*readblob()*
readdir() builtin.txt /*readdir()*
@@ -10430,6 +10439,7 @@ termdebug-customizing terminal.txt /*termdebug-customizing*
termdebug-events terminal.txt /*termdebug-events*
termdebug-example terminal.txt /*termdebug-example*
termdebug-frames terminal.txt /*termdebug-frames*
termdebug-mappings terminal.txt /*termdebug-mappings*
termdebug-prompt terminal.txt /*termdebug-prompt*
termdebug-starting terminal.txt /*termdebug-starting*
termdebug-stepping terminal.txt /*termdebug-stepping*
@@ -10987,6 +10997,8 @@ vim-modes intro.txt /*vim-modes*
vim-modes-intro intro.txt /*vim-modes-intro*
vim-raku ft_raku.txt /*vim-raku*
vim-script-intro usr_41.txt /*vim-script-intro*
vim-script-library eval.txt /*vim-script-library*
vim-security intro.txt /*vim-security*
vim-use intro.txt /*vim-use*
vim-variable eval.txt /*vim-variable*
vim.b if_lua.txt /*vim.b*
@@ -10998,6 +11010,7 @@ vim.w if_lua.txt /*vim.w*
vim7 version7.txt /*vim7*
vim8 version8.txt /*vim8*
vim9 vim9.txt /*vim9*
vim9-access-modes vim9class.txt /*vim9-access-modes*
vim9-autoload vim9.txt /*vim9-autoload*
vim9-boolean vim9.txt /*vim9-boolean*
vim9-classes vim9.txt /*vim9-classes*
@@ -11010,6 +11023,7 @@ vim9-differences vim9.txt /*vim9-differences*
vim9-export vim9.txt /*vim9-export*
vim9-false-true vim9.txt /*vim9-false-true*
vim9-final vim9.txt /*vim9-final*
vim9-func-declaration vim9.txt /*vim9-func-declaration*
vim9-function-defined-later vim9.txt /*vim9-function-defined-later*
vim9-gotchas vim9.txt /*vim9-gotchas*
vim9-ignored-argument vim9.txt /*vim9-ignored-argument*

View File

@@ -1,4 +1,4 @@
*term.txt* For Vim version 9.0. Last change: 2023 Jan 15
*term.txt* For Vim version 9.0. Last change: 2023 Nov 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -104,6 +104,11 @@ pasted text. This way Vim can separate text that is pasted from characters
that are typed. The pasted text is handled like when the middle mouse button
is used, it is inserted literally and not interpreted as commands.
Please note: while bracketed paste is trying to prevent nasty side-effects
from pasting (like the CTRL-C or <ESC> key), it's not a guaranteed security
measure because different terminals may implement this mode slightly
differently. You should still be careful with what you paste into Vim.
When the cursor is in the first column, the pasted text will be inserted
before it. Otherwise the pasted text is appended after the cursor position.
This means one cannot paste after the first column. Unfortunately Vim does
@@ -122,6 +127,9 @@ If |t_PS| or |t_PE| is not set, then |t_BE| will not be used. This is to make
sure that bracketed paste is not enabled when the escape codes surrounding
pasted text cannot be recognized.
Note: bracketed paste mode will be disabled, when the 'esckeys' option is not
set (also when the 'compatible' option is set).
If your terminal supports bracketed paste, but the options are not set
automatically, you can try using something like this: >
@@ -324,11 +332,16 @@ using the "xterm" workaround. These are the relevant entries (so far):
XM "\033[?1006;1004;1000%?%p1%{1}%=%th%el%;"
mouse enable / disable |t_XM|
FE "\033[?1004h" enable focus event tracking |t_fe|
FD "\033[?1004l" disable focus event tracking |t_fd|
The "XM" entry includes "1006" to enable SGR style mouse reporting. This
supports columns above 223. It also includes "1004" which enables focus
reporting. The t_fe and t_fd entries can be left empty (they don't have
entries in terminfo/termcap anyway).
reporting.
Note: As of 2023, the "1004" is currently not used by Vim itself, instead
it is recommended to set focus reporting independently of mouse tracking by
the |t_fe| and |t_fd| entries, as ncurses also starts to use with the latest
versions (and will then also end up in terminfo/termcap).
*xterm-kitty* *kitty-terminal*
The Kitty terminal is a special case. Mainly because it works differently
@@ -744,8 +757,9 @@ For Windows Terminal you can use something like this: >
let &t_SI = "\e[5 q" " blink bar
let &t_SR = "\e[3 q" " blink underline
let &t_EI = "\e[1 q" " blink block
let &t_ti ..= "\e[1 q" " blink block
let &t_te ..= "\e[0 q" " default (depends on terminal, normally blink block)
let &t_ti ..= "\e[1 q" " blink block
let &t_te ..= "\e[0 q" " default (depends on terminal, normally blink
" block)
endif
{not available when compiled without the |+cursorshape| feature}

View File

@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 9.0. Last change: 2023 Aug 23
*terminal.txt* For Vim version 9.0. Last change: 2023 Nov 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -42,6 +42,7 @@ If the result is "1" you have it.
Other commands |termdebug-commands|
Events |termdebug-events|
Prompt mode |termdebug-prompt|
Mappings |termdebug-mappings|
Communication |termdebug-communication|
Customizing |termdebug-customizing|
@@ -1461,18 +1462,22 @@ Prompt mode can be used even when the |+terminal| feature is present with: >
If there is no g:termdebug_config you can use: >
let g:termdebug_use_prompt = 1
<
*termdebug_map_K*
The K key is normally mapped to |:Evaluate|. If you do not want this use: >
Mappings ~
*termdebug_map_K* *termdebug-mappings*
The K key is normally mapped to |:Evaluate| unless a buffer local (|:map-local|)
mapping to K already exists. If you do not want this use: >
let g:termdebug_config['map_K'] = 0
If there is no g:termdebug_config you can use: >
let g:termdebug_map_K = 0
<
*termdebug_map_minus*
The - key is normally mapped to |:Down|. If you do not want this use: >
The - key is normally mapped to |:Down| unless a buffer local mapping to the -
key already exists. If you do not want this use: >
let g:termdebug_config['map_minus'] = 0
<
*termdebug_map_plus*
The + key is normally mapped to |:Up|. If you do not want this use: >
The + key is normally mapped to |:Up| unless a buffer local mapping to the +
key already exists. If you do not want this use: >
let g:termdebug_config['map_plus'] = 0
<
*termdebug_disasm_window*
@@ -1483,15 +1488,22 @@ If you want the Asm window shown by default, set the "disasm_window" flag to
If there is no g:termdebug_config you can use: >
let g:termdebug_disasm_window = 15
Any value greater than 1 will set the Asm window height to that value.
If the current window has enough horizontal space, it will be vertically split
and the Asm window will be shown side by side with the source code window (and
the height option won't be used).
*termdebug_variables_window*
If you want the Var window shown by default, set the flag to 1.
the "variables_window_height" entry can be used to set the window height: >
If you want the Var window shown by default, set the "variables_window" flag
to 1. The "variables_window_height" entry can be used to set the window
height: >
let g:termdebug_config['variables_window'] = 1
let g:termdebug_config['variables_window_height'] = 15
If there is no g:termdebug_config you can use: >
let g:termdebug_variables_window = 15
Any value greater than 1 will set the Var window height to that value.
If the current window has enough horizontal space, it will be vertically split
and the Var window will be shown side by side with the source code window (and
the height options won't be used).
Communication ~
*termdebug-communication*
@@ -1576,9 +1588,9 @@ If there is no g:termdebug_config you can use: >
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`.
Termdebug uses the hex number of the breakpoint ID in the signcolumn to
represent breakpoints. if it is greater than "0xFF", then it will be displayed
as "F+", due to we really only have two screen cells for the sign.
If you want to customize the breakpoint signs: >
let g:termdebug_config['sign'] = '>>'

View File

@@ -6,21 +6,41 @@
" Written by Christian Brabandt.
func Test_check_URLs()
"20.10.23, added by Restorer
if has("win32")
echoerr "Doesn't work on MS-Windows"
return
let s:outdev = 'nul'
else
let s:outdev = '/dev/null'
endif
" Restorer: For Windows users. If "curl" or "weget" is installed on the system
" but not in %PATH%, add the full routes for them to this environment variable.
if executable('curl')
" Note: does not follow redirects!
let s:command = 'curl --silent --fail --output /dev/null --head '
let s:command1 = 'curl --silent --fail --output ' ..s:outdev.. ' --head '
let s:command2 = ""
elseif executable('wget')
" Note: only allow a couple of redirects
let s:command = 'wget --quiet -S --spider --max-redirect=2 --timeout=5 --tries=2 -O /dev/null '
let s:command1 = 'wget --quiet -S --spider --max-redirect=2 --timeout=5 --tries=2 -O ' ..s:outdev.. ' '
let s:command2 = ""
elseif has("win32") "20.10.23, added by Restorer
if executable('powershell')
if 2 == system('powershell -nologo -noprofile "$psversiontable.psversion.major"')
echoerr 'To work in OS Windows requires the program "PowerShell" version 3.0 or higher'
return
endif
let s:command1 =
\ "powershell -nologo -noprofile \"{[Net.ServicePointManager]::SecurityProtocol = 'Tls12, Tls11, Tls, Ssl3'};try{(Invoke-WebRequest -MaximumRedirection 2 -TimeoutSec 5 -Uri "
let s:command2 = ').StatusCode}catch{exit [int]$Error[0].Exception.Status}"'
endif
else
echoerr 'Only works when "curl" or "wget" is available'
echoerr 'Only works when "curl" or "wget", or "powershell" is available'
return
endif
" Do the testing.
set report =999
set nomore shm +=s
let pat='\(https\?\|ftp\)://[^\t* ]\+'
exe 'helpgrep' pat
helpclose
@@ -36,22 +56,21 @@ func Test_check_URLs()
put =urls
" remove some more invalid items
" empty lines
v/./d
"20.10.23, Restorer: '_' is a little faster, see `:h global`
v/./d _
" remove # anchors
%s/#.*$//e
" remove trailing stuff (parenthesis, dot, comma, quotes), but only for HTTP
" links
g/^h/s#[.,)'"/>][:.]\?$##
g#^[hf]t\?tp:/\(/\?\.*\)$#d
silent! g/ftp://,$/d
silent! g/=$/d
g/^h/s#[.),'"`/>][:.,]\?$##
g#^[hf]t\?tp:/\(/\?\.*\)$#d _
silent! g/ftp://,$/d _
silent! g/=$/d _
let a = getline(1,'$')
let a = uniq(sort(a))
%d
%d _
call setline(1, a)
" Do the testing.
set nomore
%s/.*/\=TestURL(submatch(0))/
" highlight the failures
@@ -61,8 +80,10 @@ endfunc
func TestURL(url)
" Relies on the return code to determine whether a page is valid
echom printf("Testing URL: %d/%d %s", line('.'), line('$'), a:url)
call system(s:command . shellescape(a:url))
call system(s:command1 .. shellescape(a:url) .. s:command2)
return printf("%s %d", a:url, v:shell_error)
endfunc
call Test_check_URLs()
" vim: sw=2 sts=2 et

View File

@@ -124,12 +124,6 @@ Further Vim9 improvements:
- Classes and Interfaces. See |vim9-classes|
- "final" object members - can only be set in the constructor.
- Cannot use class type of itself in the method (Issue #12369)
- Cannot use an object method in a lambda #12417
Define all methods before compiling them?
- Cannot call class member of funcref type (Issue #12324)
Also #12081 first case.
- Using list of functions does not work #12081 (repro in later message).
- First argument of call() cannot be "obj.Func". (#11865)
- Getting member of variable with "any" type should be handled at runtime.
Remove temporary solution from #12096 / patch 9.0.1375.
- "obj.Method()" does not always work in a compiled function, assumes "obj"
@@ -137,14 +131,11 @@ Further Vim9 improvements:
Issue #11822: any.Func() can be a dict or an object call, need to handle
this at runtime. Also see #12198 for an example.
Possibly issue #11981 can be fixed at the same time (has two examples).
- Support export/import of classes and interfaces.
- Make ":defcompile ClassName" compile all functions and methods in the
class.
- Forward declaration of a class? E.g. for Clone() function.
Email lifepillar 2023 Mar 26
- object empty(), len() - can class define a method to be used for them?
- add to help: when using a default new() method then reordering object
members may cause trouble. Can define new() without arguments to avoid.
- When "Meta" is a class, is "const MetaAlias = Meta" allowed? It should
either work or given an error. Possibly give an error now and implement it
later (using a typedef). #12006
@@ -157,7 +148,6 @@ Further Vim9 improvements:
- More efficient way for interface member index than iterating over list?
- a variant of type() that returns a different type for each class?
list<number> and list<string> should also differ.
- implement :type
- implement :enum
- Promise class, could be used to wait on a popup close callback?
- class local to a function
@@ -166,6 +156,8 @@ Further Vim9 improvements:
- When evaluating constants for script variables, some functions could work:
has(featureName), len(someString)
- Implement as part of an expression: ++expr, --expr, expr++, expr--.
- The use of the literal value "null" and the type specific "null_xxx"
values is confusing (#13458, #11770).
Information missing in terminfo:
- Codes used for focus gained and lost termcodes are hard-coded in
@@ -5945,8 +5937,6 @@ Various improvements:
7 Instead of filtering errors with a shell script it should be possible to
do this with Vim script. A function that filters the raw text that comes
from the 'makeprg'?
- Add %b to 'errorformat': buffer number. (Yegappan Lakshmanan / Suresh
Govindachar)
7 Allow a window not to have a statusline. Makes it possible to use a
window as a buffer-tab selection.
8 Allow non-active windows to have a different statusline. (Yakov Lerner)

View File

@@ -443,7 +443,8 @@ Any return value of the deferred function is discarded. The function cannot
be followed by anything, such as "->func" or ".member". Currently `:defer
GetArg()->TheFunc()` does not work, it may work in a later version.
Errors are reported but do not cause aborting execution of deferred functions.
Errors are reported but do not cause aborting execution of deferred functions
or altering execution outside of deferred functions.
No range is accepted. The function can be a partial with extra arguments, but
not with a dictionary. *E1300*

View File

@@ -877,7 +877,8 @@ Other computation: *bitwise-function*
srand() initialize seed used by rand()
Variables: *var-functions*
instanceof() check if a variable is an instance of a given class
instanceof() check if a variable is an instance of a given
class
type() type of a variable as a number
typename() type of a variable as text
islocked() check if a variable is locked

View File

@@ -103,8 +103,8 @@ NOT LOADING
It is possible that a user doesn't always want to load this plugin. Or the
system administrator has dropped it in the system-wide plugin directory, but a
user has his own plugin he wants to use. Then the user must have a chance to
disable loading this specific plugin. These lines will make it possible: >
user has their own plugin they want to use. Then the user must have a chance
to disable loading this specific plugin. These lines will make it possible: >
7 if exists("g:loaded_typecorrect")
8 finish
@@ -136,7 +136,7 @@ item can be used: >
The "<Plug>TypecorrAdd;" thing will do the work, more about that further on.
The user can set the "g:mapleader" variable to the key sequence that he wants
The user can set the "g:mapleader" variable to the key sequence that they want
plugin mappings to start with. Thus if the user has done: >
g:mapleader = "_"
@@ -147,8 +147,8 @@ will be used, which is a backslash. Then a map for "\a" will be defined.
Note that <unique> is used, this will cause an error message if the mapping
already happened to exist. |:map-<unique>|
But what if the user wants to define his own key sequence? We can allow that
with this mechanism: >
But what if the user wants to define their own key sequence? We can allow
that with this mechanism: >
19 if !hasmapto('<Plug>TypecorrAdd;')
20 map <unique> <Leader>a <Plug>TypecorrAdd;
@@ -156,7 +156,7 @@ with this mechanism: >
This checks if a mapping to "<Plug>TypecorrAdd;" already exists, and only
defines the mapping from "<Leader>a" if it doesn't. The user then has a
chance of putting this in his vimrc file: >
chance of putting this in their vimrc file: >
map ,c <Plug>TypecorrAdd;
@@ -262,7 +262,7 @@ Now let's add a user command to add a correction: >
The user command is defined only if no command with the same name already
exists. Otherwise we would get an error here. Overriding the existing user
command with ":command!" is not a good idea, this would probably make the user
wonder why the command he defined himself doesn't work. |:command|
wonder why the command they defined themselves doesn't work. |:command|
If it did happen you can find out who to blame with: >
verbose command Correct
@@ -494,7 +494,7 @@ An example of how to define functionality in a filetype plugin: >
|hasmapto()| is used to check if the user has already defined a map to
<Plug>JavaImport;. If not, then the filetype plugin defines the default
mapping. This starts with |<LocalLeader>|, which allows the user to select
the key(s) he wants filetype plugin mappings to start with. The default is a
the key(s) they want filetype plugin mappings to start with. The default is a
backslash.
"<unique>" is used to give an error message if the mapping already exists or
overlaps with an existing mapping.

View File

@@ -449,7 +449,8 @@ m *+python/dyn* Python 2 interface |python-dynamic| |/dyn|
m *+python3* Python 3 interface |python|
m *+python3/dyn* Python 3 interface |python-dynamic| |/dyn|
m *+python3/dyn-stable*
Python 3 interface |python-dynamic| |python-stable| |/dyn|
Python 3 interface |python-dynamic| |python-stable|
|/dyn|
N *+quickfix* |:make| and |quickfix| commands
N *+reltime* |reltime()| function, 'hlsearch'/'incsearch' timeout,
'redrawtime' option

View File

@@ -6,11 +6,21 @@
# Sun Feb 24 14:49:17 CET 2002
use strict;
use warnings;
use vars qw/%url $date/;
%url = ();
$date = `date`;
chop $date;
# 30.11.23, Restorer:
# This command does not work in OS Windows.
# The "date" command in Windows is different from its counterpart in UNIX-like systems.
# The closest analog is the "date /t" command, but how it would work in UNIX,
# I don't know. I've corrected it as best I can. I don't know Perl.
#$date = `date`;
#chop $date;
my ($year) = 1900 + (localtime())[5];
my ($month) = 1 + (localtime())[4];
my ($day) = (localtime())[3];
#$date = localtime(); # outputs like this Fri Nov 3 00:56:59 2023
sub maplink
{
@@ -164,7 +174,7 @@ EOF
}
print OUT<<EOF;
</pre>
<p><i>Generated by vim2html on $date</i></p>
<p><i>Generated by vim2html on $day.$month.$year</i></p>
</body>
</html>
EOF

View File

@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 9.0. Last change: 2023 Jun 10
*vim9.txt* For Vim version 9.0. Last change: 2023 Oct 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1025,8 +1025,9 @@ always converted to string: >
Simple types are Number, Float, Special and Bool. For other types |string()|
should be used.
*false* *true* *null* *null_blob* *null_channel*
*null_dict* *null_function* *null_job* *null_list*
*null_partial* *null_string* *E1034*
*null_class* *null_dict* *null_function* *null_job*
*null_list* *null_object* *null_partial* *null_string*
*E1034*
In Vim9 script one can use the following predefined values: >
true
false
@@ -1468,7 +1469,7 @@ return value) results in error *E1031* *E1186* .
There is no array type, use list<{type}> instead. For a list constant an
efficient implementation is used that avoids allocating a lot of small pieces
of memory.
*E1005* *E1007*
*vim9-func-declaration* *E1005* *E1007*
A partial and function can be declared in more or less specific ways:
func any kind of function reference, no type
checking for arguments or return value
@@ -1487,13 +1488,14 @@ func({type}) function with argument type, does not return
func({type}): {type} function with argument type and return type
func(?{type}) function with type of optional argument, does
not return a value
func(...{type}) function with type of variable number of
arguments, does not return a value
func({type}, ?{type}, ...{type}): {type}
func(...list<{type}>) function with type of list for variable number
of arguments, does not return a value
func({type}, ?{type}, ...list<{type}>): {type}
function with:
- type of mandatory argument
- type of optional argument
- type of variable number of arguments
- type of list for variable number of
arguments
- return type
If the return type is "void" the function does not return a value.
@@ -1669,6 +1671,26 @@ Same for |extend()|, use |extendnew()| instead, and for |flatten()|, use
|flattennew()| instead. Since |flatten()| is intended to always change the
type, it can not be used in Vim9 script.
Assigning to a funcref with specified arguments (see |vim9-func-declaration|)
does strict type checking of the arguments. For variable number of arguments
the type must match: >
var FuncRef: func(string, number, bool): number
FuncRef = (v1: string, v2: number, v3: bool) => 777 # OK
FuncRef = (v1: string, v2: number, v3: number) => 777 # Error!
# variable number of arguments must have same type
var FuncVA: func(...list<string>): number
FuncVA = (...v: list<number>): number => v # Error!
FuncVA = (...v: list<any>): number => v # OK, `any` runtime check
FuncVA = (v1: string, v: string2): number => 333 # Error!
FuncVA = (v: list<string>): number => 3 # Error!
If the destinataion funcref has no specified arguments, then there is no
argument type checking: >
var FuncUnknownArgs: func: number
FuncUnknownArgs = (v): number => v # OK
FuncUnknownArgs = (v1: string, v2: string): number => 3 # OK
FuncUnknownArgs = (...v1: list<string>): number => 333 # OK
<
*E1211* *E1217* *E1218* *E1219* *E1220* *E1221*
*E1222* *E1223* *E1224* *E1225* *E1226* *E1227*
*E1228* *E1238* *E1250* *E1251* *E1252* *E1256*

View File

@@ -1,4 +1,4 @@
*vim9class.txt* For Vim version 9.0. Last change: 2023 Sep 18
*vim9class.txt* For Vim version 9.0. Last change: 2023 Nov 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -28,7 +28,8 @@ Vim9 classes, objects, interfaces, types and enums.
The fancy term is "object-oriented programming". You can find lots of study
material on this subject. Here we document what |Vim9| script provides,
assuming you know the basics already. Added are helpful hints about how to
use this functionality effectively.
use this functionality effectively. Vim9 classes and objects cannot be used
in legacy Vim scripts and legacy functions.
The basic item is an object:
- An object stores state. It contains one or more variables that can each
@@ -116,7 +117,7 @@ variable.
Object variable write access ~
*read-only-variable*
Now try to change an object variable directly: >
pos.lnum = 9
@@ -132,7 +133,7 @@ way. Most often there is no problem using a value, while setting a value may
have side effects that need to be taken care of. In this case, the SetLnum()
method could check if the line number is valid and either give an error or use
the closest valid value.
*:public* *E1331*
*:public* *public-variable* *E1331*
If you don't care about side effects and want to allow the object variable to
be changed at any time, you can make it public: >
@@ -149,16 +150,16 @@ If you try to set an object variable that doesn't exist you get an error: >
*E1376*
A object variable cannot be accessed using the class name.
Private variables ~
*private-variable* *E1332* *E1333*
On the other hand, if you do not want the object variables to be read directly,
you can make them private. This is done by prefixing an underscore to the
name: >
Protected variables ~
*protected-variable* *E1332* *E1333*
On the other hand, if you do not want the object variables to be read directly
from outside the class or its sub-classes, you can make them protected. This
is done by prefixing an underscore to the name: >
this._lnum: number
this._col number
Now you need to provide methods to get the value of the private variables.
Now you need to provide methods to get the value of the protected variables.
These are commonly called getters. We recommend using a name that starts with
"Get": >
@@ -181,11 +182,11 @@ number to the total number of lines: >
return this._lnum
enddef
<
Private methods ~
*private-method* *E1366*
Protected methods ~
*protected-method* *E1366*
If you want object methods to be accessible only from other methods of the
same class and not used from outside the class, then you can make them
private. This is done by prefixing the method name with an underscore: >
protected. This is done by prefixing the method name with an underscore: >
class SomeClass
def _Foo(): number
@@ -196,7 +197,7 @@ private. This is done by prefixing the method name with an underscore: >
enddef
endclass
<
Accessing a private method outside the class will result in an error (using
Accessing a protected method outside the class will result in an error (using
the above class): >
var a = SomeClass.new()
@@ -291,9 +292,9 @@ or local variable name is not allowed.
To access a class member outside of the class where it is defined, the class
name prefix must be used. A class member cannot be accessed using an object.
Just like object members the access can be made private by using an underscore
as the first character in the name, and it can be made public by prefixing
"public": >
Just like object members the access can be made protected by using an
underscore as the first character in the name, and it can be made public by
prefixing "public": >
class OtherThing
static total: number # anybody can read, only class can write
@@ -322,8 +323,8 @@ Inside the class the class method can be called by name directly, outside the
class the class name must be prefixed: `OtherThing.ClearTotalSize()`. To use
a super class method in a child class, the class name must be prefixed.
Just like object methods the access can be made private by using an underscore
as the first character in the method name: >
Just like object methods the access can be made protected by using an
underscore as the first character in the method name: >
class OtherThing
static def _Foo()
@@ -401,7 +402,7 @@ class, for which objects can be created. Example: >
An abstract class is defined the same way as a normal class, except that it
does not have any new() method. *E1359*
*abstract-method* *E1371* *E1372*
*abstract-method* *E1371* *E1372*
An abstract method can be defined in an abstract class by using the "abstract"
prefix when defining the method: >
@@ -410,6 +411,8 @@ prefix when defining the method: >
abstract static def SetColor()
endclass
<
A static method in an abstract class cannot be an abstract method.
*E1373*
A class extending the abstract class must implement all the abstract methods.
The signature (arguments, argument types and return type) must be exactly the
@@ -474,8 +477,8 @@ The interface name can be used as a type: >
<
*E1378* *E1379* *E1380* *E1387*
An interface can contain only object methods and read-only object variables.
An interface cannot contain read-write and private object variables, private
object methods, class variables and class methods.
An interface cannot contain read-write or protected object variables,
protected object methods, class variables and class methods.
An interface can extend another interface using "extends". The sub-interface
inherits all the instance variables and methods from the super interface.
@@ -523,11 +526,12 @@ once. They can appear in any order, although this order is recommended: >
< *E1355* *E1369*
Each variable and method name can be used only once. It is not possible to
define a method with the same name and different type of arguments. It is not
possible to use a public and private member variable with the same name. A
possible to use a public and protected member variable with the same name. A
object variable name used in a super class cannot be reused in a child class.
Object Variable Initialization ~
If the type of a variable is not explicitly specified in a class, then it is
set to "any" during class definition. When an object is instantiated from the
class, then the type of the variable is set.
@@ -556,7 +560,7 @@ in the extended method. The method of the base class can be called by
prefixing "super.".
*E1377*
The access level of a method (public or private) in a child class should be
The access level of a method (public or protected) in a child class should be
the same as the super class.
Other object methods of the base class are taken over by the child class.
@@ -594,11 +598,11 @@ Items in a class ~
*E1318* *E1325* *E1388*
Inside a class, in between `:class` and `:endclass`, these items can appear:
- An object variable declaration: >
this._privateVariableName: memberType
this._protectedVariableName: memberType
this.readonlyVariableName: memberType
public this.readwriteVariableName: memberType
- A class variable declaration: >
static _privateClassVariableName: memberType
static _protectedClassVariableName: memberType
static readonlyClassVariableName: memberType
static public readwriteClassVariableName: memberType
- A constructor method: >
@@ -606,10 +610,10 @@ Inside a class, in between `:class` and `:endclass`, these items can appear:
def newName(arguments)
- A class method: >
static def SomeMethod(arguments)
static def _PrivateMethod(arguments)
static def _ProtectedMethod(arguments)
- An object method: >
def SomeMethod(arguments)
def _PrivateMethod(arguments)
def _ProtectedMethod(arguments)
For the object variable the type must be specified. The best way is to do
this explicitly with ": {type}". For simple types you can also use an
@@ -696,13 +700,19 @@ the name, you can define the constructor like this: >
def new(this.name, this.age = v:none, this.gender = v:none)
enddef
< *E1328*
<
When using the default new() method, if the order of the object variables in
the class is changed later, then all the callers of the default new() method
needs to change. To avoid this, the new() method can be explicitly defined
without any arguments.
*E1328*
Note that you cannot use another default value than "v:none" here. If you
want to initialize the object variables, do it where they are declared. This
way you only need to look in one place for the default values.
All object variables will be used in the default constructor, also private
access ones.
All object variables will be used in the default constructor, including
protected access ones.
If the class extends another one, the object variables of that class will come
first.
@@ -742,12 +752,15 @@ constructor methods.
7. Type definition *Vim9-type* *:type*
{not implemented yet}
A type definition is giving a name to a type specification. This also known
type alias. For Example: >
A type definition is giving a name to a type specification. For Example: >
:type ListOfStrings list<string>
:type ListOfStrings = list<string>
The type alias can be used wherever a built-in type can be used. The type
alias name must start with an upper case character. A type alias can be
created only at the script level and not inside a function. A type alias can
be exported and used across scripts.
==============================================================================
@@ -956,6 +969,18 @@ while there is no ClassName() method, it's a method by another name in the
class called ClassName. Quite confusing.
Vim9class access modes ~
*vim9-access-modes*
The variable access modes, and their meaning, supported by Vim9class are
|public-variable| read and write from anywhere
|read-only-variable| read from anywhere, write from inside the
class and sub-classes
|protected-variable| read and write from inside the class and
sub-classes
The method access modes are similar, but without the read-only mode.
Default read access to object variables ~
Some users will remark that the access rules for object variables are
@@ -972,10 +997,10 @@ directly writing you get an error, which makes you wonder if you actually want
to allow that. This helps writing code with fewer mistakes.
Making object variables private with an underscore ~
Making object variables protected with an underscore ~
When an object variable is private, it can only be read and changed inside the
class (and in sub-classes), then it cannot be used outside of the class.
When an object variable is protected, it can only be read and changed inside
the class (and in sub-classes), then it cannot be used outside of the class.
Prepending an underscore is a simple way to make that visible. Various
programming languages have this as a recommendation.
@@ -985,21 +1010,21 @@ Since the name only appears in the class (and sub-classes) they will be easy
to find and change.
The other way around is much harder: you can easily prepend an underscore to
the object variable inside the class to make it private, but any usage
the object variable inside the class to make it protected, but any usage
elsewhere you will have to track down and change. You may have to make it a
"set" method call. This reflects the real world problem that taking away
access requires work to be done for all places where that access exists.
An alternative would have been using the "private" keyword, just like "public"
changes the access in the other direction. Well, that's just to reduce the
number of keywords.
An alternative would have been using the "protected" keyword, just like
"public" changes the access in the other direction. Well, that's just to
reduce the number of keywords.
No protected object variables ~
No private object variables ~
Some languages provide several ways to control access to object variables.
The most known is "protected", and the meaning varies from language to
language. Others are "shared", "private" and even "friend".
language. Others are "shared", "private", "package" and even "friend".
These rules make life more difficult. That can be justified in projects where
many people work on the same, complex code where it is easy to make mistakes.

View File

@@ -342,6 +342,9 @@ au BufNewFile,BufRead *.cc
au BufNewFile,BufRead *.cpp
\ if exists("cynlib_syntax_for_cpp")|setf cynlib|else|setf cpp|endif
" Cypher query language
au BufNewFile,BufRead *.cypher setf cypher
" C++
au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.ipp,*.moc,*.tcc,*.inl setf cpp
if has("fname_case")
@@ -544,6 +547,7 @@ au BufNewFile,BufRead copyright
" Debian Sources.list
au BufNewFile,BufRead */etc/apt/sources.list setf debsources
au BufNewFile,BufRead */etc/apt/sources.list.d/*.list setf debsources
au BufNewFile,BufRead */etc/apt/sources.list.d/*.sources setf deb822sources
" Deny hosts
au BufNewFile,BufRead denyhosts.conf setf denyhosts
@@ -817,6 +821,9 @@ au BufNewFile,BufRead *.gleam setf gleam
" GLSL
au BufNewFile,BufRead *.glsl setf glsl
" GN (generate ninja) files
au BufNewFile,BufRead *.gn,*.gni setf gn
" GP scripts (2.0 and onward)
au BufNewFile,BufRead *.gp,.gprc setf gp
@@ -1030,6 +1037,9 @@ au BufNewFile,BufRead *.jal,*.JAL setf jal
" Jam
au BufNewFile,BufRead *.jpl,*.jpr setf jam
" Janet
au BufNewFile,BufRead *.janet setf janet
" Java
au BufNewFile,BufRead *.java,*.jav setf java
@@ -1387,6 +1397,9 @@ au BufRead,BufNewFile *.mu setf mupad
" Mush
au BufNewFile,BufRead *.mush setf mush
" Mustache
au BufNewFile,BufRead *.mustache setf mustache
" Mutt setup file (also for Muttng)
au BufNewFile,BufRead Mutt{ng,}rc setf muttrc
@@ -1450,11 +1463,14 @@ au BufNewFile,BufRead *.nse setf lua
au BufNewFile,BufRead *.nsi,*.nsh setf nsis
" Nu
au BufNewFile,BufRead {env,config}.nu setf nu
au BufNewFile,BufRead *.nu setf nu
" Oblivion Language and Oblivion Script Extender
au BufNewFile,BufRead *.obl,*.obse,*.oblivion,*.obscript setf obse
" Objdump
au BufNewFile,BufRead *.objdump,*.cppobjdump setf objdump
" OCaml
au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit,*.mlt,*.mlp,*.mlip,*.mli.cppo,*.ml.cppo setf ocaml
@@ -1502,9 +1518,12 @@ au BufNewFile,BufRead *.nmconnection setf confini
" Pacman hooks
au BufNewFile,BufRead *.hook
\ if getline(1) == '[Trigger]' |
\ setf conf |
\ setf confini |
\ endif
" Pacman log
au BufNewFile,BufRead pacman.log setf pacmanlog
" Pam conf
au BufNewFile,BufRead */etc/pam.conf setf pamconf
@@ -1675,8 +1694,8 @@ au BufNewFile,BufRead .procmail,.procmailrc setf procmail
" Progress or CWEB
au BufNewFile,BufRead *.w call dist#ft#FTprogress_cweb()
" Progress or assembly
au BufNewFile,BufRead *.i call dist#ft#FTprogress_asm()
" Progress or assembly or Swig
au BufNewFile,BufRead *.i call dist#ft#FTi()
" Progress or Pascal
au BufNewFile,BufRead *.p call dist#ft#FTprogress_pascal()
@@ -1997,9 +2016,8 @@ au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFile
" (patterns ending in a start further below)
au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
" Zig and Zir (Zig Intermediate Representation)
au BufNewFile,BufRead *.zig setf zig
au BufNewFile,BufRead *.zir setf zir
" Zig and Zig Object Notation (ZON)
au BufNewFile,BufRead *.zig,*.zon setf zig
" Zserio
au BufNewFile,BufRead *.zs setf zserio
@@ -2171,6 +2189,9 @@ au BufNewFile,BufRead *.swift.gyb setf swiftgyb
" Swift Intermediate Language or SILE
au BufNewFile,BufRead *.sil call dist#ft#FTsil()
" Swig
au BufNewFile,BufRead *.swg,*.swig setf swig
" Sysctl
au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl
@@ -2442,8 +2463,7 @@ au BufNewFile,BufRead *.vroom setf vroom
au BufNewFile,BufRead *.vue setf vue
" WebAssembly
au BufNewFile,BufRead *.wat setf wat
au BufNewFile,BufRead *.wast setf wast
au BufNewFile,BufRead *.wat,*.wast setf wat
" WebAssembly Interface Type (WIT)
au BufNewFile,BufRead *.wit setf wit
@@ -2525,6 +2545,9 @@ au BufNewFile,BufRead */etc/xinetd.conf setf xinetd
" XS Perl extension interface language
au BufNewFile,BufRead *.xs setf xs
" X compose file
au BufNewFile,BufRead .XCompose,Compose setf xcompose
" X resources file
au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xdefaults
@@ -2859,6 +2882,9 @@ au BufNewFile,BufRead XF86Config*
\|endif
\|call s:StarSetf('xf86conf')
" XKB
au BufNewFile,BufRead */usr/share/X11/xkb/{compat,geometry,keycodes,symbols,types}/* call s:StarSetf('xkb')
" X11 xmodmap
au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap')

View File

@@ -37,8 +37,8 @@ if exists("g:awk_is_gawk")
let b:undo_ftplugin .= " | setl fp<"
endif
" Disabled by default for security reasons.
if get(g:, 'awk_exec', get(g:, 'plugin_exec', 0))
" Disabled by default for security reasons.
if dist#vim#IsSafeExecutable('awk', 'gawk')
let path = system("gawk 'BEGIN { printf ENVIRON[\"AWKPATH\"] }'")
let path = substitute(path, '^\.\=:\|:\.\=$\|:\.\=:', ',,', 'g') " POSIX cwd
let path = substitute(path, ':', ',', 'g')

View File

@@ -57,8 +57,8 @@ if &filetype == 'changelog'
endif
let s:default_login = 'unknown'
" Disabled by default for security reasons.
if get(g:, 'changelog_exec', get(g:, 'plugin_exec', 0))
" Disabled by default for security reasons.
if dist#vim#IsSafeExecutable('changelog', 'whoami')
let login = s:login()
else
let login = s:default_login

View File

@@ -3,9 +3,11 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Dan Sharp
" Contributor: Johannes Zellner <johannes@zellner.org>
" Last Change: 2021 Oct 15
" Last Change: 2023 Oct 09
if exists("b:did_ftplugin") | finish | endif
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:save_cpo = &cpo
@@ -18,7 +20,7 @@ setlocal formatoptions+=crql
let b:undo_ftplugin = "setlocal com< cms< fo<"
" Csh: thanks to Johannes Zellner
" Csh: thanks to Johannes Zellner
" - Both foreach and end must appear alone on separate lines.
" - The words else and endif must appear at the beginning of input lines;
" the if must appear alone on its input line or after an else.
@@ -38,13 +40,14 @@ if exists("loaded_matchit") && !exists("b:match_words")
\ s:line_start .. 'case\s\+:' .. s:line_start .. 'default\>:\<breaksw\>:' ..
\ s:line_start .. 'endsw\>'
unlet s:line_start
let b:undo_ftplugin ..= " | unlet b:match_words"
let b:undo_ftplugin ..= " | unlet! b:match_words"
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter="csh Scripts (*.csh)\t*.csh\n" ..
\ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin ..= " | unlet b:browsefilter"
let b:browsefilter = "csh Scripts (*.csh)\t*.csh\n" ..
\ "All Files (*.*)\t*.*\n"
let b:csh_set_browsefilter = 1
let b:undo_ftplugin ..= " | unlet! b:browsefilter b:csh_set_browsefilter"
endif
let &cpo = s:save_cpo

View File

@@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers <team+vim@tracker.debian.org>
" Former Maintainers: Michael Piefel <piefel@informatik.hu-berlin.de>
" Stefano Zacchiroli <zack@debian.org>
" Last Change: 2023 Jan 16
" Last Change: 2023 Aug 18
" License: Vim License
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/debchangelog.vim

View File

@@ -0,0 +1,16 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers <team+vim@tracker.debian.org>
" Last Change: 2023 Aug 30
" License: Vim License
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/debsources.vim
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin=1
setlocal comments=:#
setlocal commentstring=#%s
setlocal formatoptions-=t
let b:undo_ftplugin = 'setlocal comments< commentstring< formatoptions<'

View File

@@ -1,7 +1,8 @@
" Vim settings file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66)
" Version: (v53) 2021 April 06 (updated 2022 May 22)
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Version: (v54) 2023 December 5
" Maintainers: Ajit J. Thakkar <ajit@unb.ca>; <https://ajit.ext.unb.ca/>
" Joshua Hollett <j.hollett@uwinnipeg.ca>
" Usage: For instructions, do :help fortran-plugin from Vim
" Credits:
" Version 0.1 was created in September 2000 by Ajit Thakkar.
@@ -39,7 +40,7 @@ if !exists("b:fortran_fixed_source")
" Fixed-form file extension defaults
let b:fortran_fixed_source = 1
else
" Modern fortran still allows both fixed and free source form
" Modern fortran compilers still allow both fixed and free source form
" Assume fixed source form unless signs of free source form
" are detected in the first five columns of the first s:lmax lines.
" Detection becomes more accurate and time-consuming if more lines
@@ -70,14 +71,14 @@ if (b:fortran_fixed_source == 1)
" but some vendor extensions allow longer lines
if exists("fortran_extended_line_length")
setlocal tw=132
elseif exists("fortran_cardimage_line_length")
setlocal tw=80
else
setlocal tw=72
" The use of columns 73-80 for sequence numbers is obsolete
" so almost all compilers allow a textwidth of 80
setlocal tw=80
" If you need to add "&" on continued lines so that the code is
" compatible with both free and fixed format, then you should do so
" in column 73 and uncomment the next line
" setlocal tw=73
" in column 81 and uncomment the next line
" setlocal tw=81
endif
else
setlocal comments=:!

View File

@@ -0,0 +1,28 @@
" Vim filetype plugin file
" Language: JSON5
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2023 Oct 19
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s
setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl fo< com< cms<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "JSON5 Files (*.json5)\t*.json5\n" ..
\ "JSON Files (*.json)\t*.json\n" ..
\ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Lynx Web Browser Configuration
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Sep 09
" Last Change: 2023 Nov 09
if exists("b:did_ftplugin")
finish
@@ -18,7 +18,7 @@ setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl cms< com< fo<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Lynx Configuration Files (lynx.cfg .lynxrc)\tlynx.cfg;.lynxrc\n" ..
let b:browsefilter = "Lynx Configuration Files (lynx.cfg, .lynxrc)\tlynx.cfg;.lynxrc\n" ..
\ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif

View File

@@ -0,0 +1,14 @@
" Vim filetype plugin file
" Language: Objdump
" Maintainer: Colin Kennedy <colinvfx@gmail.com>
" Last Change: 2023 October 25
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = "setlocal cms<"
setlocal commentstring=#\ %s

View File

@@ -56,12 +56,8 @@ endif
" Set this once, globally.
if !exists("perlpath")
let s:tmp_cwd = getcwd()
" safety check: don't execute perl binary by default
if executable("perl") && get(g:, 'perl_exec', get(g:, 'plugin_exec', 0))
\ && (fnamemodify(exepath("perl"), ":p:h") != s:tmp_cwd
\ || (index(split($PATH, has("win32") ? ';' : ':'), s:tmp_cwd) != -1
\ && s:tmp_cwd != '.'))
if dist#vim#IsSafeExecutable('perl', 'perl')
try
if &shellxquote != '"'
let perlpath = system('perl -e "print join(q/,/,@INC)"')
@@ -77,7 +73,6 @@ if !exists("perlpath")
" current directory and the directory of the current file.
let perlpath = ".,,"
endif
unlet! s:tmp_cwd
endif
" Append perlpath to the existing path value, if it is set. Since we don't

13
runtime/ftplugin/swig.vim Normal file
View File

@@ -0,0 +1,13 @@
" Vim filetype plugin file
" Language: SWIG
" Maintainer: Julien Marrec <julien.marrec 'at' gmail com>
" Last Change: 2023 November 23
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = "setlocal iskeyword<"
setlocal iskeyword+=%

View File

@@ -3,10 +3,11 @@
" Keyword Lookup Support: Enno Nagel <enno.nagel+vim@gmail.com>
" Latest Revision: 2023-10-07
if !exists('b:did_ftplugin')
" Looks a lot like dosini files.
runtime! ftplugin/dosini.vim
if exists("b:did_ftplugin")
finish
endif
" Looks a lot like dosini files.
runtime! ftplugin/dosini.vim
if has('unix') && executable('less')
if !has('gui_running')

View File

@@ -2,9 +2,11 @@
" Language: tcsh
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Previous Maintainer: Dan Sharp
" Last Change: 2021 Oct 15
" Last Change: 2023 Oct 09
if exists("b:did_ftplugin") | finish | endif
if exists("b:did_ftplugin")
finish
endif
let s:save_cpo = &cpo
set cpo-=C
@@ -12,24 +14,26 @@ set cpo-=C
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
let s:browsefilter = "csh Files (*.csh)\t*.csh\n" ..
\ "All Files (*.*)\t*.*\n"
\ "All Files (*.*)\t*.*\n"
runtime! ftplugin/csh.vim ftplugin/csh_*.vim ftplugin/csh/*.vim
let b:did_ftplugin = 1
" Override our defaults if these were set by an included ftplugin.
if exists("b:undo_ftplugin")
let s:undo_ftplugin = b:undo_ftplugin
let s:undo_ftplugin = b:undo_ftplugin
endif
if exists("b:browsefilter")
let s:browsefilter = b:browsefilter
let s:browsefilter = b:browsefilter
endif
if (has("gui_win32") || has("gui_gtk"))
let b:browsefilter="tcsh Scripts (*.tcsh)\t*.tcsh\n" .. s:browsefilter
if (has("gui_win32") || has("gui_gtk")) &&
\ (!exists("b:browsefilter") || exists("b:csh_set_browsefilter"))
let b:browsefilter = "tcsh Scripts (*.tcsh)\t*.tcsh\n" .. s:browsefilter
let s:undo_ftplugin = "unlet! b:browsefilter | " .. s:undo_ftplugin
endif
let b:undo_ftplugin = "unlet! b:browsefilter | " .. s:undo_ftplugin
let b:undo_ftplugin = s:undo_ftplugin
let &cpo = s:save_cpo
unlet s:save_cpo

View File

@@ -85,8 +85,8 @@ if !exists("no_plugin_maps") && !exists("no_vim_maps")
vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*end\(f\%[unction]\\|\(export\s\+\)\?def\)\>', "W")<CR>
" Move around comments
nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR>
vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR>
nnoremap <silent><buffer> ]" :call search('\%(^\s*".*\n\)\@<!\%(^\s*"\)', "W")<CR>
vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\@<!\%(^\s*"\)', "W")<CR>
nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR>
vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR>
endif

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: WebAssembly
" Maintainer: rhysd <lin90162@yahoo.co.jp>
" Last Change: Jul 29, 2018
" Last Change: Nov 14, 2023
" For bugs, patches and license go to https://github.com/rhysd/vim-wasm
if exists("b:did_ftplugin")

View File

@@ -1,5 +1,5 @@
" Vim filetype plugin file
" Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
" Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Apr 28
@@ -18,7 +18,7 @@ setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl fo< com< cms<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Wget Configuration File (wgetrc, .wgetrc)\twgetrc;.wgetrc\n" .
let b:browsefilter = "Wget Configuration File (wgetrc, .wgetrc)\twgetrc;.wgetrc\n" ..
\ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif

View File

@@ -1,5 +1,5 @@
" Vim filetype plugin file
" Language: Wget2 configuration file (/etc/wget2rc ~/.wget2rc)
" Language: Wget2 configuration file (/etc/wget2rc ~/.wget2rc)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Apr 28
@@ -18,7 +18,7 @@ setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl fo< com< cms<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Wget2 Configuration File (wget2rc, .wget2rc)\twget2rc;.wget2rc\n" .
let b:browsefilter = "Wget2 Configuration File (wget2rc, .wget2rc)\twget2rc;.wget2rc\n" ..
\ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif

View File

@@ -0,0 +1,13 @@
" Vim filetype plugin file
" Language: XCompose
" Maintainer: ObserverOfTime <chronobserver@disroot.org
" Last Change: 2023 Nov 09
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

@@ -28,7 +28,7 @@ setlocal formatoptions-=t formatoptions+=croql
setlocal suffixesadd=.zig,.zir
if has('comments')
setlocal comments=:///,://!,://,:\\\\
setlocal comments=:///,://!,://
setlocal commentstring=//\ %s
endif
@@ -41,19 +41,16 @@ let &l:define='\v(<fn>|<const>|<var>|^\s*\#\s*define)'
" Safety check: don't execute zig from current directory
if !exists('g:zig_std_dir') && exists('*json_decode') &&
\ executable('zig') && get(g:, 'zig_exec', get(g:, 'plugin_exec', 0))
\ && (fnamemodify(exepath("zig"), ":p:h") != s:tmp_cwd
\ || (index(split($PATH,has("win32")? ';' : ':'), s:tmp_cwd) != -1 && s:tmp_cwd != '.'))
\ executable('zig') && dist#vim#IsSafeExecutable('zig', 'zig')
silent let s:env = system('zig env')
if v:shell_error == 0
let g:zig_std_dir = json_decode(s:env)['std_dir']
endif
unlet! s:env
endif
unlet! s:tmp_cwd
if exists('g:zig_std_dir')
let &l:path = &l:path . ',' . g:zig_std_dir
let &l:path = g:zig_std_dir . ',' . &l:path
endif
let b:undo_ftplugin =

View File

@@ -21,7 +21,7 @@ endif
" find out if an "...=..." expression is an assignment (or a conditional)
" it scans 'line' first, and then the previous lines
fun! CdlAsignment(lnum, line)
fun! CdlAssignment(lnum, line)
let f = -1
let lnum = a:lnum
let line = a:line
@@ -90,7 +90,7 @@ fun! CdlGetIndent(lnum)
end
end
" remove members [a] of [b]:[c]... (inicio remainds valid)
" remove members [a] of [b]:[c]... (inicio remains valid)
let line = substitute(line, '\c\(\[[^]]*]\(\s*of\s*\|:\)*\)\+', ' ', 'g')
while 1
" search for the next interesting element
@@ -111,7 +111,7 @@ fun! CdlGetIndent(lnum)
else " c == '='
" if it is an assignment increase indent
if f == -1 " we don't know yet, find out
let f = CdlAsignment(lnum, strpart(line, 0, inicio))
let f = CdlAssignment(lnum, strpart(line, 0, inicio))
end
if f == 1 " formula increase it
let ind = ind + shiftwidth()
@@ -125,7 +125,7 @@ fun! CdlGetIndent(lnum)
let ind = ind - shiftwidth()
elseif match(thisline, '^\s*=') >= 0
if f == -1 " we don't know yet if is an assignment, find out
let f = CdlAsignment(lnum, "")
let f = CdlAssignment(lnum, "")
end
if f == 1 " formula increase it
let ind = ind + shiftwidth()

View File

@@ -1324,7 +1324,7 @@ function! s:ErlangCalcIndent2(lnum, stack)
" maybe A else
" LTI
"
" Note about Emacs compabitility {{{
" Note about Emacs compatibility {{{
"
" It would be fine to indent the examples above the following way:
"

View File

@@ -1,7 +1,8 @@
" Vim indent file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
" Version: (v49) 2022 May 14
" Maintainer: Ajit J. Thakkar <thakkar.ajit@gmail.com>; <http://www2.unb.ca/~ajit/>
" Language: Fortran 2008 (and Fortran 2003, 95, 90, and 77)
" Version: (v49) 2023 December 1
" Maintainers: Ajit J. Thakkar <ajit@unb.ca>; <https://ajit.ext.unb.ca/>
" Joshua Hollett <j.hollett@uwinnipeg.ca>
" Usage: For instructions, do :help fortran-indent from Vim
" Credits:
" Version 0.1 was created in September 2000 by Ajit Thakkar.

View File

@@ -310,7 +310,7 @@ function IsFunctionArgPar(lnum, c)
endfunction
function JumpToMatch(lnum, last_closed_bracket)
" we use the % command to skip back (tries to ues matchit if possible,
" we use the % command to skip back (tries to use matchit if possible,
" otherwise resorts to vim's default, which is buggy but better than
" nothing)
call cursor(a:lnum, a:last_closed_bracket)

View File

@@ -41,7 +41,7 @@ function GetKrlIndent() abort
let currentLine = getline(v:lnum)
if currentLine =~? '\v^;(\s*(end)?fold>)@!' && !get(g:, 'krlCommentIndent', 0)
" If current line has a ; in column 1 and is no fold, keep zero indent.
" This may be usefull if code is commented out at the first column.
" This may be useful if code is commented out at the first column.
return 0
endif
@@ -117,7 +117,7 @@ function s:KrlPreNoneBlank(lnum) abort
let nPreNoneBlank = prevnonblank(a:lnum)
while nPreNoneBlank > 0 && getline(nPreNoneBlank) =~? '\v^\s*(\&\w\+|;|continue>)'
" Previouse none blank line irrelevant. Look further aback.
" Previous none blank line irrelevant. Look further aback.
let nPreNoneBlank = prevnonblank(nPreNoneBlank - 1)
endwhile

View File

@@ -74,7 +74,7 @@ function s:GetRapidIndentIntern() abort
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.
" This may be useful if code is commented out at the first column.
return 0
endif

View File

@@ -78,10 +78,10 @@ function SystemVerilogIndent()
" Multiple-line comment count
if curr_line =~ '^\s*/\*' && curr_line !~ '/\*.\{-}\*/'
let s:multiple_comment += 1
if vverb | echom vverb_str "Start of multiple-line commnt" | endif
if vverb | echom vverb_str "Start of multiple-line comment" | endif
elseif curr_line =~ '\*/\s*$' && curr_line !~ '/\*.\{-}\*/'
let s:multiple_comment -= 1
if vverb | echom vverb_str "End of multiple-line commnt" | endif
if vverb | echom vverb_str "End of multiple-line comment" | endif
return ind
endif
" Maintain indentation during commenting.

View File

@@ -0,0 +1,2 @@
" Placeholder for backwards compatilibity: .tsx used to stand for TypeScript.
runtime! indent/typescript.vim

View File

@@ -1,7 +1,7 @@
" Vim indent file
" Language: WebAssembly
" Maintainer: rhysd <lin90162@yahoo.co.jp>
" Last Change: Jul 29, 2018
" Last Change: Nov 14, 2023
" For bugs, patches and license go to https://github.com/rhysd/vim-wasm
if exists("b:did_indent")

View File

@@ -1,7 +1,7 @@
" Vim Keymap file for Arabic
" Maintainer : Arabic Support group <support-at-arabeyes.org>
" Created by : Nadim Shaikli <nadim-at-arabeyes.org>
" Last Updated : 2003 Apr 26
" Last Updated : 2023-10-27
" This is for a standard Microsoft Arabic keyboard layout.
" Use this short name in the status line.
@@ -41,16 +41,6 @@ m <char-0x0629> " (1577) - TEH MARBUTA
, <char-0x0648> " (1608) - WAW
. <char-0x0632> " (1586) - ZAIN
/ <char-0x0638> " (1592) - ZAH
0 <char-0x0660> " (1632) - Arabic 0
1 <char-0x0661> " (1633) - Arabic 1
2 <char-0x0662> " (1634) - Arabic 2
3 <char-0x0663> " (1635) - Arabic 3
4 <char-0x0664> " (1636) - Arabic 4
5 <char-0x0665> " (1637) - Arabic 5
6 <char-0x0666> " (1638) - Arabic 6
7 <char-0x0667> " (1639) - Arabic 7
8 <char-0x0668> " (1640) - Arabic 8
9 <char-0x0669> " (1641) - Arabic 9
` <char-0x0630> " (1584) - THAL
~ <char-0x0651> " (1617) - Tanween -- SHADDA
Q <char-0x064e> " (1614) - Tanween -- FATHA

View File

@@ -34,7 +34,7 @@
" without having to combine them with letters (usufull for grammarians
" in particular) (especially for dasia and psiln we use ' for psili
" (that is apostrophe) and ;' for dasia. This is done in order to
" preserve the posibility to write a plain < or >.
" preserve the possibility to write a plain < or >.
" Ypogegrammeni is | following the character (the originally proposed
" i after the character is problematic: can't write easily ai or vi) :

30
runtime/lang/Make_all.mak Normal file
View File

@@ -0,0 +1,30 @@
#
# Makefile with common components
#
CONVERTED = \
menu_chinese_gb.936.vim \
menu_chinese_taiwan.950.vim \
menu_cs_cz.iso_8859-2.vim \
menu_czech_czech_republic.1250.vim \
menu_czech_czech_republic.ascii.vim \
menu_hu_hu.iso_8859-2.vim \
menu_ja_jp.euc-jp.vim \
menu_japanese_japan.932.vim \
menu_ko_kr.euckr.vim \
menu_pl_pl.iso_8859-2.vim \
menu_polish_poland.1250.vim \
menu_ru_ru.cp1251.vim \
menu_ru_ru.koi8-r.vim \
menu_sk_sk.iso_8859-2.vim \
menu_sl_si.cp1250.vim \
menu_sl_si.latin2.vim \
menu_sr_rs.ascii.vim \
menu_sr_rs.iso_8859-2.vim \
menu_sr_rs.iso_8859-5.vim \
menu_tr_tr.cp1254.vim \
menu_tr_tr.iso_8859-9.vim \
menu_uk_ua.cp1251.vim \
menu_uk_ua.koi8-u.vim \
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:

517
runtime/lang/Make_mvc.mak Normal file
View File

@@ -0,0 +1,517 @@
#
# Makefile for converted the Vim menu files on Windows
#
# 08.11.23, Restorer, <restorer@mail2k.ru>
!IF [powershell -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2
!ERROR The program "PowerShell" version 3.0 or higher is required to work
!ENDIF
# Common components
!INCLUDE Make_all.mak
# Correct the following line for the directory where iconv is installed.
# Please do not put the path in quotes.
ICONV_PATH = D:\Programs\GetText\bin
# In case some package like GnuWin32, UnixUtils, gettext
# or something similar is installed on the system.
# If the "iconv" program is installed on the system, but it is not registered
# in the %PATH% environment variable, then specify the full path to this file.
!IF EXIST ("iconv.exe")
ICONV = "iconv.exe"
!ELSEIF EXIST ("$(ICONV_PATH)\iconv.exe")
ICONV = "$(ICONV_PATH)\iconv.exe"
!ENDIF
RM = del /q
all : $(CONVERTED)
# Convert menu_zh_cn.utf-8.vim to create menu_chinese_gb.936.vim.
menu_chinese_gb.936.vim : menu_zh_cn.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP936 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(936))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(936)) -replace \
'scriptencoding utf-8', 'scriptencoding cp936' -replace \
' Original translations', ' Generated from menu_zh_cn.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(936))
# Convert menu_zh_tw.utf-8.vim to create menu_chinese_taiwan.950.vim.
menu_chinese_taiwan.950.vim : menu_zh_tw.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP950 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(950))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(950)) -replace \
'scriptencoding utf-8', 'scriptencoding cp950' -replace \
' Original translations', ' Generated from menu_zh_tw.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(950))
# Convert menu_cs_cz.utf-8.vim to create menu_cs_cz.iso_8859-2.vim.
menu_cs_cz.iso_8859-2.vim : menu_cs_cz.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28592))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28592)) -replace \
' Czech \(UTF-8\)', ' Czech (ISO-8859-2)' -replace \
\"scriptencoding utf-8\", \"scriptencoding iso-8859-2\" -replace \
\" Original translations\", \" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT\"; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28592))
# Convert menu_cs_cz.utf-8.vim to create menu_czech_czech_republic.1250.vim.
menu_czech_czech_republic.1250.vim : menu_cs_cz.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1250 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1250))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1250)) -replace \
' Czech \(UTF-8\)', ' Czech (CP1250)' -replace \
\"scriptencoding utf-8\", \"scriptencoding cp1250\" -replace \
\" Original translations\", \" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT\"; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1250))
# Convert menu_cs_cz.utf-8.vim to create menu_czech_czech_republic.ascii.vim.
menu_czech_czech_republic.ascii.vim : menu_cs_cz.utf-8.vim
$(RM) $@
powershell -nologo -noprofile -Command \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)) -replace \
'scriptencoding utf-8', 'scriptencoding latin1' -replace \
' Original translations', ' Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT' -replace \
'Czech \(UTF-8\)', 'Czech (ASCII - without diacritics)' -creplace \
[char]193, 'A' -creplace [char]225, 'a' -creplace [char]268, 'C' -creplace \
[char]269, 'c' -creplace [char]270, 'D' -creplace [char]271, 'd' -creplace \
[char]201, 'E' -creplace [char]233, 'e' -creplace [char]282, 'E' -creplace \
[char]283, 'e' -creplace [char]205, 'I' -creplace [char]237, 'i' -creplace \
[char]327, 'N' -creplace [char]328, 'n' -creplace [char]211, 'O' -creplace \
[char]243, 'o' -creplace [char]344, 'R' -creplace [char]345, 'r' -creplace \
[char]352, 'S' -creplace [char]353, 's' -creplace [char]356, 'T' -creplace \
[char]357, 't' -creplace [char]218, 'U' -creplace [char]250, 'u' -creplace \
[char]366, 'U' -creplace [char]367, 'u' -creplace [char]221, 'Y' -creplace \
[char]253, 'y' -creplace [char]381, 'Z' -creplace [char]382, 'z' ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
# Convert menu_hu_hu.utf-8.vim to create menu_hu_hu.iso_8859-2.vim.
menu_hu_hu.iso_8859-2.vim : menu_hu_hu.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28592))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28592)) -replace \
'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \
' Original translations', ' Generated from menu_hu_hu.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28592))
# Convert menu_ja_jp.utf-8.vim to create menu_ja_jp.euc-jp.vim.
menu_ja_jp.euc-jp.vim : menu_ja_jp.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t EUC-JP $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(51932))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(51932)) -replace \
'Japanese \(UTF-8\)', 'Japanese (EUC-JP)' -replace \
'scriptencoding utf-8', 'scriptencoding euc-jp' -replace \
' Original translations', ' Generated from menu_ja_jp.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(51932))
# Convert menu_ja_jp.utf-8.vim to create menu_japanese_japan.932.vim.
menu_japanese_japan.932.vim : menu_ja_jp.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP932 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(932))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(932)) -replace \
'Japanese \(UTF-8\)', 'Japanese (CP932)' -replace \
'scriptencoding utf-8', 'scriptencoding cp932' -replace \
' Original translations', ' Generated from menu_ja_jp.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(932))
# Convert menu_ko_kr.utf-8.vim to create menu_ko_kr.euckr.vim.
menu_ko_kr.euckr.vim : menu_ko_kr.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t EUC-KR $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(51949))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(51949)) -replace \
'scriptencoding utf-8', 'scriptencoding euc-kr' -replace \
' Original translations', ' Generated from menu_ko_kr.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(51949))
# Convert menu_pl_pl.utf-8.vim to create menu_pl_pl.iso_8859-2.vim.
menu_pl_pl.iso_8859-2.vim : menu_pl_pl.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28592))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28592)) -replace \
'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \
' Original translations', ' Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28592))
# Convert menu_pl_pl.utf-8.vim to create menu_polish_poland.1250.vim.
menu_polish_poland.1250.vim : menu_pl_pl.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1250 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1250))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1250)) -replace \
'scriptencoding utf-8', 'scriptencoding cp1250' -replace \
' Original translations', ' Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1250))
# Convert menu_ru_ru.utf-8.vim to create menu_ru_ru.cp1251.vim.
menu_ru_ru.cp1251.vim : menu_ru_ru.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1251 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1251))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1251)) -replace \
'scriptencoding utf-8', 'scriptencoding cp1251' -replace \
' Original translations', ' Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1251))
# Convert menu_ru_ru.utf-8.vim to create menu_ru_ru.koi8-r.vim.
menu_ru_ru.koi8-r.vim : menu_ru_ru.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t KOI8-R $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(20866))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(20866)) -replace \
'scriptencoding utf-8', 'scriptencoding koi8-r' -replace \
' Original translations', ' Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(20866))
# Convert menu_slovak_slovak_republic.1250.vim to create menu_sk_sk.iso_8859-2.vim.
menu_sk_sk.iso_8859-2.vim : menu_slovak_slovak_republic.1250.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f CP1250 -t ISO-8859-2 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(1250)), \
[System.Text.Encoding]::GetEncoding(28592))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28592)) -replace \
'scriptencoding cp1250', 'scriptencoding iso-8859-2' -replace \
' Original translations', ' Generated from menu_slovak_slovak_republic.1250.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28592))
# Convert menu_sl_si.utf-8.vim to create menu_sl_si.cp1250.vim.
menu_sl_si.cp1250.vim : menu_sl_si.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1250 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1250))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1250)) -replace \
'scriptencoding utf-8', 'scriptencoding cp1250' -replace \
' Original translations', ' Generated from menu_sl_si.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1250))
# Convert menu_sl_si.utf-8.vim to create menu_sl_si.latin2.vim.
menu_sl_si.latin2.vim : menu_sl_si.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-2 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28592))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28592)) -replace \
'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \
' Original translations', ' Generated from menu_sl_si.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28592))
# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.ascii.vim.
menu_sr_rs.ascii.vim : menu_sr_rs.utf-8.vim
$(RM) $@
powershell -nologo -noprofile -Command \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)) -replace \
'scriptencoding utf-8', 'scriptencoding latin1' -replace \
' Original translations', ' Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT' -creplace \
[char]1072, 'a' -creplace [char]1073, 'b' -creplace [char]1074, 'v' -creplace \
[char]1075, 'g' -creplace [char]1076, 'd' -creplace [char]1106, 'dj' -creplace \
[char]1077, 'e' -creplace [char]1078, 'z' -creplace [char]1079, 'z' -creplace \
[char]1080, 'i' -creplace [char]1112, 'j' -creplace [char]1082, 'k' -creplace \
[char]1083, 'l' -creplace [char]1113, 'lj' -creplace [char]1084, 'm' -creplace \
[char]1085, 'n' -creplace [char]1114, 'nj' -creplace [char]1086, 'o' -creplace \
[char]1087, 'p' -creplace [char]1088, 'r' -creplace [char]1089, 's' -creplace \
[char]1090, 't' -creplace [char]1115, 'c' -creplace [char]1091, 'u' -creplace \
[char]1092, 'f' -creplace [char]1093, 'h' -creplace [char]1094, 'c' -creplace \
[char]1095, 'c' -creplace [char]1119, 'dz' -creplace [char]1096, 's' -creplace \
[char]1040, 'A' -creplace [char]1041, 'B' -creplace [char]1042, 'V' -creplace \
[char]1043, 'G' -creplace [char]1044, 'D' -creplace [char]1026, 'Đ' -creplace \
[char]1045, 'E' -creplace [char]1046, 'Z' -creplace [char]1047, 'Z' -creplace \
[char]1048, 'I' -creplace [char]1032, 'J' -creplace [char]1050, 'K' -creplace \
[char]1051, 'L' -creplace [char]1033, 'Lj' -creplace [char]1052, 'M' -creplace \
[char]1053, 'N' -creplace [char]1034, 'Nj' -creplace [char]1054, 'O' -creplace \
[char]1055, 'P' -creplace [char]1056, 'R' -creplace [char]1057, 'S' -creplace \
[char]1058, 'T' -creplace [char]1035, 'C' -creplace [char]1059, 'U' -creplace \
[char]1060, 'F' -creplace [char]1061, 'H' -creplace [char]1062, 'C' -creplace \
[char]1063, 'C' -creplace [char]1039, 'Dz' -creplace [char]1064, 'S' ^| \
1>nul New-Item -Force -Path . -ItemType file -Name $@
# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.iso_8859-2.vim.
menu_sr_rs.iso_8859-2.vim : menu_sr_rs.utf-8.vim
$(RM) $@
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)) -creplace \
[char]1072, 'a' -creplace [char]1073, 'b' -creplace [char]1074, 'v' -creplace \
[char]1075, 'g' -creplace [char]1076, 'd' -creplace [char]1106, [char]273 -creplace \
[char]1077, 'e' -creplace [char]1078, [char]382 -creplace [char]1079, 'z' -creplace \
[char]1080, 'i' -creplace [char]1112, 'j' -creplace [char]1082, 'k' -creplace \
[char]1083, 'l' -creplace [char]1113, 'lj' -creplace [char]1084, 'm' -creplace \
[char]1085, 'n' -creplace [char]1114, 'nj' -creplace [char]1086, 'o' -creplace \
[char]1087, 'p' -creplace [char]1088, 'r' -creplace [char]1089, 's' -creplace \
[char]1090, 't' -creplace [char]1115, [char]263 -creplace [char]1091, 'u' -creplace \
[char]1092, 'f' -creplace [char]1093, 'h' -creplace [char]1094, 'c' -creplace \
[char]1095, [char]269 -creplace [char]1119, 'dz' -creplace [char]1096, [char]353 -creplace \
[char]1040, 'A' -creplace [char]1041, 'B' -creplace [char]1042, 'V' -creplace \
[char]1043, 'G' -creplace [char]1044, 'D' -creplace [char]1026, 'Đ' -creplace \
[char]1045, 'E' -creplace [char]1046, [char]381 -creplace [char]1047, 'Z' -creplace \
[char]1048, 'I' -creplace [char]1032, 'J' -creplace [char]1050, 'K' -creplace \
[char]1051, 'L' -creplace [char]1033, 'Lj'-creplace [char]1052, 'M' -creplace \
[char]1053, 'N' -creplace [char]1034, 'Nj' -creplace [char]1054, 'O' -creplace \
[char]1055, 'P' -creplace [char]1056, 'R' -creplace [char]1057, 'S' -creplace \
[char]1058, 'T' -creplace [char]1035, [char]262 -creplace [char]1059, 'U' -creplace \
[char]1060, 'F' -creplace [char]1061, 'H' -creplace [char]1062, 'C' -creplace \
[char]1063, [char]268 -creplace [char]1039, 'Dz' -creplace [char]1064, [char]352 -replace \
'scriptencoding utf-8', 'scriptencoding iso-8859-2' -replace \
' Original translations', ' Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, [System.Text.Encoding]::GetEncoding(28592))
# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.iso_8859-5.vim.
menu_sr_rs.iso_8859-5.vim : menu_sr_rs.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-5 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28595))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28595)) -replace \
'scriptencoding utf-8', 'scriptencoding iso-8859-5' -replace \
' Original translations', ' Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28595))
# Convert menu_tr_tr.utf-8.vim to create menu_tr_tr.cp1254.vim.
menu_tr_tr.cp1254.vim : menu_tr_tr.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1254 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1254))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1254)) -replace \
'scriptencoding utf-8', 'scriptencoding cp1254' -replace \
' Original translations', ' Generated from menu_tr_tr.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1254))
# Convert menu_tr_tr.utf-8.vim to create menu_tr_tr.iso_8859-9.vim.
menu_tr_tr.iso_8859-9.vim : menu_tr_tr.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t ISO-8859-9 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(28599))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(28599)) -replace \
'scriptencoding utf-8', 'scriptencoding iso-8859-9' -replace \
' Original translations', ' Generated from menu_tr_tr.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(28599))
# Convert menu_uk_ua.utf-8.vim to create menu_uk_ua.cp1251.vim.
menu_uk_ua.cp1251.vim : menu_uk_ua.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t CP1251 $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(1251))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(1251)) -replace \
'scriptencoding utf-8', 'scriptencoding cp1251' -replace \
' Original translations', ' Generated from menu_uk_ua.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(1251))
# Convert menu_uk_ua.utf-8.vim to create menu_uk_ua.koi8-u.vim.
menu_uk_ua.koi8-u.vim : menu_uk_ua.utf-8.vim
$(RM) $@
!IF DEFINED (ICONV)
$(ICONV) -f UTF-8 -t KOI8-U $? >$@
!ELSE
powershell -nologo -noprofile -Command \
[System.IO.File]::WriteAllText(\"$@\", \
[System.IO.File]::ReadAllText(\"$?\", \
[System.Text.Encoding]::GetEncoding(65001)), \
[System.Text.Encoding]::GetEncoding(21866))
!ENDIF
powershell -nologo -noprofile -Command \
$$out = [System.IO.File]::ReadAllText(\"$@\", \
[System.Text.Encoding]::GetEncoding(21866)) -replace \
'scriptencoding utf-8', 'scriptencoding koi8-u' -replace \
' Original translations', ' Generated from menu_uk_ua.utf-8.vim, DO NOT EDIT'; \
[System.IO.File]::WriteAllText(\"$@\", $$out, \
[System.Text.Encoding]::GetEncoding(21866))
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:

View File

@@ -1,165 +1,164 @@
# Author: Ada (Haowen) Yu <me@yuhaowen.com>
all: \
menu_chinese_gb.936.vim \
menu_uk_ua.cp1251.vim \
menu_uk_ua.koi8-u.vim \
menu_chinese_taiwan.950.vim \
menu_cs_cz.iso_8859-2.vim \
menu_czech_czech_republic.1250.vim \
menu_ja_jp.euc-jp.vim \
menu_japanese_japan.932.vim \
menu_ko_kr.euckr.vim \
menu_pl_pl.iso_8859-2.vim \
menu_polish_poland.1250.vim \
menu_ru_ru.koi8-r.vim \
menu_ru_ru.cp1251.vim \
menu_sl_si.cp1250.vim \
menu_sl_si.latin2.vim \
menu_slovak_slovak_republic.1250.vim \
menu_tr_tr.cp1254.vim \
menu_tr_tr.iso_8859-9.vim \
menu_sr_rs.iso_8859-5.vim \
menu_sr_rs.iso_8859-2.vim \
menu_sr_rs.ascii.vim \
menu_czech_czech_republic.ascii.vim \
menu_hu_hu.iso_8859-2.vim \
menu_sk_sk.iso_8859-2.vim \
# Common components
include Make_all.mak
SED = LANG=C sed
all: $(CONVERTED)
# Convert menu_zh_cn.utf-8.vim to create menu_chinese_gb.936.vim.
menu_chinese_gb.936.vim: menu_zh_cn.utf-8.vim
rm -f menu_chinese_gb.936.vim
iconv -f utf-8 -t cp936 menu_zh_cn.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp936/' -e 's/" Original translations/" Generated from menu_zh_cn.utf-8.vim, DO NOT EDIT/' > menu_chinese_gb.936.vim
rm -f $@
iconv -f UTF-8 -t CP936 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp936/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_zh_tw.utf-8.vim to create menu_chinese_taiwan.950.vim.
menu_chinese_taiwan.950.vim: menu_zh_tw.utf-8.vim
rm -f menu_chinese_taiwan.950.vim
iconv -f utf-8 -t cp950 menu_zh_tw.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp950/' -e 's/" Original translations/" Generated from menu_zh_tw.utf-8.vim, DO NOT EDIT/' > menu_chinese_taiwan.950.vim
rm -f $@
iconv -f UTF-8 -t CP950 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp950/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_cs_cz.utf-8.vim to create menu_cs_cz.iso_8859-2.vim.
menu_cs_cz.iso_8859-2.vim: menu_cs_cz.utf-8.vim
rm -f menu_cs_cz.iso_8859-2.vim
iconv -f utf-8 -t iso8859-2 menu_cs_cz.utf-8.vim | \
rm -f $@
iconv -f UTF-8 -t ISO-8859-2 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' \
-e 's/" Original translations/" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT/' \
-e 's/\(" Menu Translations:.*\)(.*)/\1(ISO8859-2)/' \
> menu_cs_cz.iso_8859-2.vim
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
-e 's/\(" Menu Translations:.*\)(.*)/\1(ISO8859-2)/' \
> $@
# Convert menu_cs_cz.utf-8.vim to create menu_czech_czech_republic.1250.vim.
menu_czech_czech_republic.1250.vim: menu_cs_cz.utf-8.vim
rm -f menu_czech_czech_republic.1250.vim
iconv -f utf-8 -t cp1250 menu_cs_cz.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1250/' \
-e 's/" Original translations/" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT/' \
-e 's/\(" Menu Translations:.*\)(.*)/\1(CP1250)/' \
> menu_czech_czech_republic.1250.vim
rm -f $@
iconv -f UTF-8 -t CP1250 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1250/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
-e 's/\(" Menu Translations:.*\)(.*)/\1(CP1250)/' \
> $@
# Convert menu_cs_cz.utf-8.vim to create menu_czech_czech_republic.ascii.vim.
menu_czech_czech_republic.ascii.vim: menu_cs_cz.utf-8.vim
rm -f menu_czech_czech_republic.ascii.vim
rm -f $@
$(SED) -e 's/Á/A/g' -e 's/á/a/g' -e 's/Č/C/g' -e 's/č/c/g' -e 's/Ď/D/g' \
-e 's/ď/d/g' -e 's/É/E/g' -e 's/é/e/g' -e 's/Ě/E/g' -e 's/ě/e/g' \
-e 's/Í/I/g' -e 's/í/i/g' -e 's/Ň/N/g' -e 's/ň/n/g' -e 's/Ó/O/g' \
-e 's/ó/o/g' -e 's/Ř/R/g' -e 's/ř/r/g' -e 's/Š/S/g' -e 's/š/s/g' \
-e 's/Ť/T/g' -e 's/ť/t/g' -e 's/Ú/U/g' -e 's/ú/u/g' -e 's/Ů/U/g' \
-e 's/ů/u/g' -e 's/Ý/Y/g' -e 's/ý/y/g' -e 's/Ž/Z/g' -e 's/ž/z/g' \
-e 's/scriptencoding utf-8/scriptencoding latin1/' \
-e 's/" Original translations/" Generated from menu_cs_cz.utf-8.vim, DO NOT EDIT/' \
-e 's/\(" Menu Translations:.*\)(.*)/\1(ASCII - without diacritics)/' \
menu_cs_cz.utf-8.vim > menu_czech_czech_republic.ascii.vim
-e 's/scriptencoding utf-8/scriptencoding latin1/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
-e 's/\(" Menu Translations:.*\)(.*)/\1(ASCII - without diacritics)/' \
$< > $@
# Convert menu_ja_jp.utf-8.vim to create menu_ja_jp.euc-jp.vim.
menu_ja_jp.euc-jp.vim: menu_ja_jp.utf-8.vim
rm -f menu_ja_jp.euc-jp.vim
iconv -f utf-8 -t euc-jp menu_ja_jp.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding euc-jp/' \
-e 's/" Original translations/" Generated from menu_ja_jp.utf-8.vim, DO NOT EDIT/' \
-e 's/\(" Menu Translations:.*\)(.*)/\1(EUC-JP)/' \
> menu_ja_jp.euc-jp.vim
rm -f $@
iconv -f UTF-8 -t EUC-JP $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding euc-jp/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
-e 's/\(" Menu Translations:.*\)(.*)/\1(EUC-JP)/' \
> $@
# Convert menu_ja_jp.utf-8.vim to create menu_japanese_japan.932.vim.
menu_japanese_japan.932.vim: menu_ja_jp.utf-8.vim
rm -f menu_japanese_japan.932.vim
iconv -f utf-8 -t cp932 menu_ja_jp.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp932/' \
-e 's/" Original translations/" Generated from menu_ja_jp.utf-8.vim, DO NOT EDIT/' \
-e 's/\(" Menu Translations:.*\)(.*)/\1(CP932)/' \
> menu_japanese_japan.932.vim
rm -f $@
iconv -f UTF-8 -t CP932 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp932/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
-e 's/\(" Menu Translations:.*\)(.*)/\1(CP932)/' \
> $@
# Convert menu_ko_kr.utf-8.vim to create menu_ko_kr.euckr.vim.
menu_ko_kr.euckr.vim: menu_ko_kr.utf-8.vim
rm -f menu_ko_kr.euckr.vim
iconv -f utf-8 -t euc-kr menu_ko_kr.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding euc-kr/' -e 's/" Original translations/" Generated from menu_ko_kr.utf-8.vim, DO NOT EDIT/' > menu_ko_kr.euckr.vim
rm -f $@
iconv -f UTF-8 -t EUC-KR $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding euc-kr/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_pl_pl.utf-8.vim to create menu_pl_pl.iso_8859-2.vim.
menu_pl_pl.iso_8859-2.vim: menu_pl_pl.utf-8.vim
rm -f menu_pl_pl.iso_8859-2.vim
iconv -f utf-8 -t iso8859-2 menu_pl_pl.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' -e 's/" Original translations/" Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT/' > menu_pl_pl.iso_8859-2.vim
rm -f $@
iconv -f UTF-8 -t ISO-8859-2 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_pl_pl.utf-8.vim to create menu_polish_poland.1250.vim.
menu_polish_poland.1250.vim: menu_pl_pl.utf-8.vim
rm -f menu_polish_poland.1250.vim
iconv -f utf-8 -t cp1250 menu_pl_pl.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1250/' -e 's/" Original translations/" Generated from menu_pl_pl.utf-8.vim, DO NOT EDIT/' > menu_polish_poland.1250.vim
rm -f $@
iconv -f UTF-8 -t CP1250 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1250/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_ru_ru.utf-8.vim to create menu_ru_ru.koi8-r.vim.
menu_ru_ru.koi8-r.vim: menu_ru_ru.utf-8.vim
rm -f menu_ru_ru.koi8-r.vim
iconv -f utf-8 -t koi8-r menu_ru_ru.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding koi8-r/' -e 's/" Original translations/" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT/' > menu_ru_ru.koi8-r.vim
rm -f $@
iconv -f UTF-8 -t KOI8-R $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding koi8-r/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_ru_ru.utf-8.vim to create menu_ru_ru.cp1251.vim.
menu_ru_ru.cp1251.vim: menu_ru_ru.utf-8.vim
rm -f menu_ru_ru.cp1251.vim
iconv -f utf-8 -t cp1251 menu_ru_ru.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1251/' -e 's/" Original translations/" Generated from menu_ru_ru.utf-8.vim, DO NOT EDIT/' > menu_ru_ru.cp1251.vim
rm -f $@
iconv -f UTF-8 -t CP1251 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1251/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_sl_si.utf-8.vim to create menu_sl_si.cp1250.vim.
menu_sl_si.cp1250.vim: menu_sl_si.utf-8.vim
rm -f menu_sl_si.cp1250.vim
iconv -f utf-8 -t cp1250 menu_sl_si.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1250/' \
-e 's/" Original translations/" Generated from menu_sl_si.utf-8.vim, DO NOT EDIT/' > menu_sl_si.cp1250.vim
rm -f $@
iconv -f UTF-8 -t CP1250 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1250/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_uk_ua.utf-8.vim to create menu_sl_si.latin2.vim.
# for naming encodings, see `:h encoding-names`
# Convert menu_sl_si.utf-8.vim to create menu_sl_si.latin2.vim.
menu_sl_si.latin2.vim: menu_sl_si.utf-8.vim
rm -f menu_sl_si.latin2.vim
iconv -f utf-8 -t latin2 menu_sl_si.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding latin2/' -e 's/" Original translations/" Generated from menu_sl_si.utf-8.vim, DO NOT EDIT/' > menu_sl_si.latin2.vim
# Convert menu_uk_ua.utf-8.vim to create menu_slovak_slovak_republic.1250.vim.
menu_slovak_slovak_republic.1250.vim: menu_sl_si.utf-8.vim
rm -f menu_slovak_slovak_republic.1250.vim
iconv -f utf-8 -t cp1250 menu_sl_si.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1250/' -e 's/" Original translations/" Generated from menu_sl_si.utf-8.vim, DO NOT EDIT/' > menu_slovak_slovak_republic.1250.vim
rm -f $@
iconv -f UTF-8 -t ISO-8859-2 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_tr_tr.utf-8.vim to create menu_tr_tr.cp1254.vim.
menu_tr_tr.cp1254.vim: menu_tr_tr.utf-8.vim
rm -f menu_tr_tr.cp1254.vim
iconv -f utf-8 -t cp1254 menu_tr_tr.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1254/' -e 's/" Original translations/" Generated from menu_tr_tr.utf-8.vim, DO NOT EDIT/' > menu_tr_tr.cp1254.vim
rm -f $@
iconv -f UTF-8 -t CP1254 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1254/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_tr_tr.utf-8.vim to create menu_tr_tr.iso_8859-9.vim.
menu_tr_tr.iso_8859-9.vim: menu_tr_tr.utf-8.vim
rm -f menu_tr_tr.iso_8859-9.vim
iconv -f utf-8 -t iso8859-9 menu_tr_tr.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding iso8859-9/' -e 's/" Original translations/" Generated from menu_tr_tr.utf-8.vim, DO NOT EDIT/' > menu_tr_tr.iso_8859-9.vim
rm -f $@
iconv -f UTF-8 -t ISO-8859-9 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-9/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.iso_8859-5.vim.
menu_sr_rs.iso_8859-5.vim: menu_sr_rs.utf-8.vim
rm -f menu_sr_rs.iso_8859-5.vim
iconv -f utf-8 -t iso8859-5 menu_sr_rs.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding iso8859-5/' -e 's/" Original translations/" Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT/' > menu_sr_rs.iso_8859-5.vim
rm -f $@
iconv -f UTF-8 -t ISO-8859-5 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-5/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# for naming encodings, see `:h encoding-names`
# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.iso_8859-2.vim.
menu_sr_rs.iso_8859-2.vim: menu_sr_rs.utf-8.vim
rm -f menu_sr_rs.iso_8859-2.vim
rm -f $@
$(SED) -e 's/а/a/g' -e 's/б/b/g' -e 's/в/v/g' -e 's/г/g/g' -e 's/д/d/g' \
-e 's/ђ/đ/g' -e 's/е/e/g' -e 's/ж/ž/g' -e 's/з/z/g' -e 's/и/i/g' \
-e 's/ј/j/g' -e 's/к/k/g' -e 's/л/l/g' -e 's/љ/lj/g' -e 's/м/m/g' \
@@ -172,13 +171,14 @@ menu_sr_rs.iso_8859-2.vim: menu_sr_rs.utf-8.vim
-e 's/Н/N/g' -e 's/Њ/Nj/g' -e 's/О/O/g' -e 's/П/P/g' -e 's/Р/R/g' \
-e 's/С/S/g' -e 's/Т/T/g' -e 's/Ћ/Ć/g' -e 's/У/U/g' -e 's/Ф/F/g' \
-e 's/Х/H/g' -e 's/Ц/C/g' -e 's/Ч/Č/g' -e 's/Џ/Dž/g' -e 's/Ш/Š/g' \
-e 's/scriptencoding utf-8/scriptencoding iso8859-2/' -e 's/" Original translations/" Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT/' \
menu_sr_rs.utf-8.vim | iconv -f utf-8 -t iso8859-2 \
> menu_sr_rs.iso_8859-2.vim
-e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
$< | iconv -f UTF-8 -t ISO-8859-2 \
> $@
# Convert menu_sr_rs.utf-8.vim to create menu_sr_rs.ascii.vim.
menu_sr_rs.ascii.vim: menu_sr_rs.utf-8.vim
rm -f menu_sr_rs.ascii.vim
rm -f $@
$(SED) -e 's/а/a/g' -e 's/б/b/g' -e 's/в/v/g' -e 's/г/g/g' -e 's/д/d/g' \
-e 's/ђ/dj/g' -e 's/е/e/g' -e 's/ж/z/g' -e 's/з/z/g' -e 's/и/i/g' \
-e 's/ј/j/g' -e 's/к/k/g' -e 's/л/l/g' -e 's/љ/lj/g' -e 's/м/m/g' \
@@ -191,29 +191,38 @@ menu_sr_rs.ascii.vim: menu_sr_rs.utf-8.vim
-e 's/Н/N/g' -e 's/Њ/Nj/g' -e 's/О/O/g' -e 's/П/P/g' -e 's/Р/R/g' \
-e 's/С/S/g' -e 's/Т/T/g' -e 's/Ћ/C/g' -e 's/У/U/g' -e 's/Ф/F/g' \
-e 's/Х/H/g' -e 's/Ц/C/g' -e 's/Ч/C/g' -e 's/Џ/Dz/g' -e 's/Ш/S/g' \
-e 's/scriptencoding utf-8/scriptencoding latin1/' -e 's/" Original translations/" Generated from menu_sr_rs.utf-8.vim, DO NOT EDIT/' \
menu_sr_rs.utf-8.vim > menu_sr_rs.ascii.vim
-e 's/scriptencoding utf-8/scriptencoding latin1/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
$< > $@
# Convert menu_uk_ua.utf-8.vim to create menu_uk_ua.cp1251.vim.
menu_uk_ua.cp1251.vim: menu_uk_ua.utf-8.vim
rm -f menu_uk_ua.cp1251.vim
iconv -f utf-8 -t cp1251 menu_uk_ua.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1251/' -e 's/" Original translations/" Generated from menu_uk_ua.utf-8.vim, DO NOT EDIT/' > menu_uk_ua.cp1251.vim
rm -f $@
iconv -f UTF-8 -t CP1251 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding cp1251/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_uk_ua.utf-8.vim to create menu_uk_ua.koi8-u.vim.
menu_uk_ua.koi8-u.vim: menu_uk_ua.utf-8.vim
rm -f menu_uk_ua.koi8-u.vim
iconv -f utf-8 -t koi8-u menu_uk_ua.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding koi8-u/' -e 's/" Original translations/" Generated from menu_uk_ua.utf-8.vim, DO NOT EDIT/' > menu_uk_ua.koi8-u.vim
rm -f $@
iconv -f UTF-8 -t KOI8-U $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding koi8-u/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_hu_hu.utf-8.vim to create menu_hu_hu.iso_8859-2.vim.
menu_hu_hu.iso_8859-2.vim: menu_hu_hu.utf-8.vim
rm -f menu_hu_hu.iso_8859-2.vim
iconv -f utf-8 -t iso8859-2 menu_hu_hu.utf-8.vim | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' -e 's/" Original translations/" Generated from menu_hu_hu.utf-8.vim, DO NOT EDIT/' > menu_hu_hu.iso_8859-2.vim
rm -f $@
iconv -f UTF-8 -t ISO-8859-2 $< | \
$(SED) -e 's/scriptencoding utf-8/scriptencoding iso-8859-2/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@
# Convert menu_slovak_slovak_republic.1250.vim to create menu_sk_sk.iso_8859-2.vim.
menu_sk_sk.iso_8859-2.vim: menu_slovak_slovak_republic.1250.vim
rm -f menu_sk_sk.iso_8859-2.vim
iconv -f cp1250 -t iso8859-2 menu_slovak_slovak_republic.1250.vim | \
$(SED) -e 's/scriptencoding cp1250/scriptencoding iso-8859-2/' -e 's/" Original translations/" Generated from menu_slovak_slovak_republic.1250.vim, DO NOT EDIT/' > menu_sk_sk.iso_8859-2.vim
rm -f $@
iconv -f CP1250 -t ISO-8859-2 $< | \
$(SED) -e 's/scriptencoding cp1250/scriptencoding iso-8859-2/' \
-e 's/" Original translations/" Generated from $<, DO NOT EDIT/' \
> $@

View File

@@ -13,7 +13,7 @@ let did_menu_trans = 1
let s:keepcpo= &cpo
set cpo&vim
scriptencoding iso8859-2
scriptencoding iso-8859-2
" {{{ File menu
menutrans &File &Soubor

View File

@@ -15,7 +15,7 @@ let did_menu_trans = 1
let s:keepcpo= &cpo
set cpo&vim
scriptencoding latin2
scriptencoding iso-8859-2
" {{{ FILE / DATOTEKA
menutrans &File &Datoteka

View File

@@ -12,7 +12,7 @@ let did_menu_trans = 1
let s:keepcpo= &cpo
set cpo&vim
scriptencoding iso8859-2
scriptencoding iso-8859-2
" Help menu
menutrans &Help Pomo&<26>

View File

@@ -12,7 +12,7 @@ let did_menu_trans = 1
let s:keepcpo= &cpo
set cpo&vim
scriptencoding iso8859-5
scriptencoding iso-8859-5
" Help menu
menutrans &Help <20><><EFBFBD><EFBFBD>&<26>

View File

@@ -9,7 +9,7 @@ endif
let did_menu_trans = 1
let s:keepcpo= &cpo
set cpo&vim
scriptencoding iso8859-9
scriptencoding iso-8859-9
" Top
menutrans &File &Dosya

View File

@@ -190,7 +190,7 @@ map I G$?. ^GYKeDP0S2Gl
" bX - and yank the action corresponding to this state table entry
" into the Macro register
" GVJ - on bottom line, create a command to restore the current character
" 0H - and save the command into the second Macro register
" 0H - and save the command into the second Macro register
" `a@r - go back to the current position and execute the macro to restore
" the current character
" @m - execute the action associated with this state

View File

@@ -10,7 +10,7 @@ in vim: :so urm.vim<RETURN>
in vim: * (to load the registers and boot the URM-machine :-)
in vim: g (for 'go') and watch the fun. Per default, 3 and 4
are multiplied. Watch the Program counter, it is
visible as a komma moving around.
visible as a comma moving around.
This is a "standard URM" (Universal register machine) interpreter. The URM
concept is used in theoretical computer science to aid in theorem proving.

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