runtime(doc): Fix typos in help documents
closes: vim/vim#1472053753f6a49
Co-authored-by: h-east <h.east.727@gmail.com>
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
runtime(doc): Clarify list-concatenation a bit more
Make doc list-concatenation more clear as for += and extend().
1. describe `+=` for list-concatenation more accurately
2. add `extend()` example for list-concatenation
3. Fix CI errors for missing helptags reference |+=|
closes: vim/vim#13983c9c2e2d2ff
Co-authored-by: qeatzy <qeatzy@users.noreply.github.com>
Problem: unexpected error for modifying final list using += operator
(Ernie Rael)
Solution: Allow List value modification of a final variable using +=
operator
(Yegappan Lakshmanan)
fixes: vim/vim#13745fixes: vim/vim#13959closes: vim/vim#139621af35631f8
Only port eval.txt changes.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
When the terminal emulator sends an OSC sequence to Nvim (as a response
to another OSC sequence that was first sent by Nvim), populate the OSC
sequence in the v:termresponse variable and fire the TermResponse event.
The escape sequence is also included in the "data" field of the
autocommand callback when the autocommand is defined in Lua.
This makes use of the already documented but unimplemented TermResponse
event. This event exists in Vim but is only fired when Vim receives a
primary device attributes response.
Fixes: https://github.com/neovim/neovim/issues/25856
Problem:
The swapfile "E325: ATTENTION" dialog is displayed when editing a file
already open in another (running) Nvim. Usually this behavior is
annoying and irrelevant:
- "Recover" and the other options ("Open readonly", "Quit", "Abort") are
almost never wanted.
- swapfiles are less relevant for "multi-Nvim" since 'autoread' is
enabled by default.
- Even less relevant if user enables 'autowrite'.
Solution:
Define a default SwapExists handler which does the following:
1. If the swapfile is owned by a running Nvim process, automatically
chooses "(E)dit anyway" (caveat: this creates a new, extra swapfile,
which is mostly harmless and ignored except by `:recover` or `nvim -r`.
2. Shows a 1-line "ignoring swapfile..." message.
3. Users can disable the default SwapExists handler via `autocmd! nvim_swapfile`.
Update runtime files
10e8ff9b26
Also:
- fix a missing `<` in builtin.txt.
- edit `:function` `{name}` wording to match the change made for the docs above
by Justin in #10619.
- link to `*vimrc*` rather than `*init.vim*` in repeat.txt change (as `init.lua`
may also be used).
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Using inclusive index for slice is not always desired.
Solution: Add the slice() method, which has an exclusive index. (closes
vim/vim#7408)
6601b62943
Cherry-pick a line in docs added later.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Vim9: string indexes are counted in bytes.
Solution: Use character indexes. (closesvim/vim#6574)
e3c37d8ebf
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: no functions for converting from/to UTF-16 index.
Solution: Add UTF-16 flag to existing funtions and add strutf16len() and
utf16idx(). (Yegappan Lakshmanan, closesvim/vim#12216)
67672ef097
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Confusing error for using a variable as a function.
Solution: If a function is not found but there is a variable, give a more
useful error. (issue vim/vim#9310)
2ef9156b42
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Crash when using a null function reference. (Naohiro Ono)
Solution: Check for an invalid function name. (closesvim/vim#8367)
22db0d549f
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: String interpolation only works in heredoc.
Solution: Support interpolated strings. Use syntax for heredoc consistent
with strings, similar to C#. (closesvim/vim#10327)
2eaef106e4
Cherry-pick Test_Debugger_breakadd_expr() from Vim.
Co-authored-by: LemonBoy <thatlemon@gmail.com>
Problem: Vim9: "exit_cb" causes Vim to exit.
Solution: Require white space after a command in Vim9 script. (closesvim/vim#7467)
Also fix that Vim9 style heredoc was not always recognized.
b5b9480ee9
Omit EX_NONWHITE_OK, E1143, E1144: Vim9 script only.
Cherry-pick test_vimscript.vim changes from patch 8.2.2141.
Cherry-pick E1145 tag from Vim runtime.
N/A patches for version.c:
vim-patch:8.2.2140: build failure with tiny features
Problem: Build failure with tiny features.
Solution: Add #ifdef.
2a3cd3af45
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: No falsy Coalescing operator.
Solution: Add the "??" operator. Fix mistake with function argument count.
92f26c256e
Cherry-pick tv2bool() into eval/typval.c.
Cherry-pick *??* tag from Vim runtime.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Value of MAXCOL not available in Vim script.
Solution: Add v:maxcol. (Naohiro Ono, closesvim/vim#9451)
56200eed62
The variable is always 2147483647, but introducing it makes functions
easier to document.
Co-authored-by: naohiro ono <obcat@icloud.com>
Problem: Cannot lock a variable in legacy Vim script like in Vim9.
Solution: Make ":lockvar 0" work.
a187c43cfe
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: The `'statuscolumn'` was not re-evaluated for wrapped lines,
when preceded by virtual/filler lines. There was also no way
to distinguish virtual and wrapped lines in the status column.
Solution: Make sure to rebuild the statuscolumn, and replace variable
`v:wrap` with `v:virtnum`. `v:virtnum` is negative when drawing
virtual lines, zero when drawing the actual buffer line, and
positive when drawing the wrapped part of a buffer line.
Problem: Unable to customize the column next to a window ('gutter').
Solution: Add 'statuscolumn' option that follows the 'statusline' syntax,
allowing to customize the status column. Also supporting the %@
click execute function label. Adds new items @C and @s which
will print the fold and sign columns. Line numbers and signs
can be clicked, highlighted, aligned, transformed, margined etc.
Problem: Help tag generation picks up words in code examples.
Solution: Skip over examples. (Carlo Teubner, closesvim/vim#10813)
ddab3ce345
Also fix mistakes in help files.
Co-authored-by: Carlo Teubner <carlo@cteubner.net>
Problem: setline() gives an error for some types.
Solution: Allow any type, convert each item to a string.
3445320839
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Update runtime files
76db9e0763
- `col()`'s example was changed to use `:echowin` so that the message can be
seen with `showmode`. Use "\n" to force a hit-enter instead as `:echowin`
isn't ported.
- Replace interpolated string usage in syntax/modula3.vim (not ported).
- Add a space after the `wincmd =` examples in `*CTRL-W_=*` so that the inlined
code is highlighted properly when followed by a full stop.
Co-authored-by: Bram Moolenaar <Bram@vim.org>