0
0
mirror of https://github.com/vim/vim.git synced 2025-07-24 10:45:12 -04:00

813 Commits

Author SHA1 Message Date
Milly
d9af78b945
runtime(docs): update :set? command behavior table
closes: #15746

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-26 15:54:43 +02:00
Yee Cheng Chin
26e4b00002
runtime(doc): Revert outdated comment in completeopt's fuzzy documentation
Originally, `:set completeopt+=fuzzy` did not affect how the candidate
list is collected in default keyword completion. A comment was added to
documentation as part of #14912 to clarify it. #15193 later changed the
fuzzy behavior to now change the candidate collection behavior as well
so the clarification in docs is now wrong. Remove them here.

closes: #15656

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 20:50:08 +02:00
zeertzjq
61a6ac4d00
patch 9.1.0720: Wrong breakindentopt=list:-1 with multibyte or TABs
Problem:  Wrong breakindentopt=list:-1 with multibyte chars or TABs in
          text matched by 'formatlistpat' (John M Devin)
Solution: Use the width of the match text (zeertzjq)

fixes: #15634
closes: #15635

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-07 11:23:54 +02:00
h-east
90e1fe4b76
runtime(doc): fix a few style issues
closes: #15478

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-12 18:27:41 +02:00
h-east
52e7cc26d8
runtime(doc): tweak documentation style a bit
closes: #15371

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 17:03:29 +02:00
Doug Kearns
ddbb6fe2d0
runtime(vim): Update base-syntax, improve :set highlighting
- Match bang, "all" and "termcap" options, and trailing command
  separator "|".
- Highlight set assignment operators.
- Match multiline :set and multiline option values.
- Mention the newer "0o" octal prefix at :help :set=.

closes: #15329

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-24 20:21:22 +02:00
Illia Bobyr
03d20aaac4
runtime(doc): 'cpoptions': Include "z" in the documented default
A fixup for commit 22105fd1fe0dcfe993b5c04 (tag: v9.1.0589)

While at it, document the correct Vi defaults and $VIM_POSIX (even more
compatible) flags.

closes: #15274

Signed-off-by: Illia Bobyr <illia.bobyr@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 20:19:13 +02:00
Christian Brabandt
22105fd1fe
patch 9.1.0589: vi: d{motion} and cw work differently than expected
Problem:  vi: d{motion} and cw command work differently than expected
Solution: add new cpo-z flag to make the behaviour configurable

There are two special vi compatible behaviours (or should I say bugs?):

1): cw behaves differently than dw. That is, because cw is special cased
    by Vim and is effectively aliased to ce.
    POSIX behaviour is documented here:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/vi.html#tag_20_152_13_81

2): d{motion} may make the whole delete operation linewise, if the start
    and end of the motion are on different lines and there are only
    blanks before the start and after the end of the motion.
    Did not find a related POSIX link that requires this behaviour.

Both behaviours can be considered inconsistent, but we cannot easily
change it, because it would be a backward incompatible change and also
incompatible to how classic vi behaved.

So let's add the new cpo flag "z", which when not included fixes both
behaviours and make them more consistent to what users would expect.

This has been requested several times:
https://groups.google.com/d/msg/vim_use/aaBqT6ECkA4/ALf4odKzEDgJ
https://groups.google.com/d/msg/vim_dev/Dpn3xtUF16I/T6JcOPKN6usJ
http://www.reddit.com/r/vim/comments/26nut8/why_does_cw_work_like_ce/
https://groups.google.com/d/msg/vim_use/vunNWLFWfQg/MmJh_ZGaAgAJ
https://github.com/vim/vim/issues/4390

So in summary, if you want to have the w motion work more consistent,
remove the 'z' from the cpo settings.

related: #4390
closes: #15263

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-15 20:51:11 +02:00
Dominique Pellé
df62c62177
runtime(doc): grammar fixes in options.txt
closes: #15265

Signed-off-by: Dominique Pellé <dominique.pelle@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-15 20:29:59 +02:00
LemonBoy
5247b0b92e
patch 9.1.0572: cannot specify tab page closing behaviour
Problem:  cannot specify tab page closing behaviour
          (Gianluca Pacchiella)
Solution: Add the 'tabclose' option (LemonBoy).

fixes: #5967
closes: #15204

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-12 19:36:53 +02:00
RestorerZ
965091001f
patch 9.1.0559: translation of vim scripts can be improved
Problem:  translation of vim scripts can be improved
          (after v9.1.0509)
Solution: improve documentation, add tests, include missing
          libraries for the Windows CI
          (RestorerZ)

closes: #15100

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-11 21:14:15 +02:00
glepnir
600a12d08e
patch 9.1.0549: fuzzycollect regex based completion not working as expected
Problem:  fuzzycollect regex based completion not working as expected
Solution: Revert Patch v9.1.0503 (glepnir)

closes: #15192

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-09 18:51:29 +02:00
distobs
25ac6d67d9
patch 9.1.0537: signed number detection for CTRL-X/A can be improved
Problem:  signed number detection for CTRL-X/A can be improved
          (Chris Patuzzo)
Solution: Add the new "blank" value for the 'nrformat' setting. This
          will make Vim assume a signed number only if there is a blank
          in front of the sign.
          (distobs)

fixes: #15033
closes: #15110

Signed-off-by: distobs <cuppotatocake@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 17:55:26 +02:00
glepnir
43eef882ff
patch 9.1.0503: cannot use fuzzy keyword completion
Problem:  cannot use fuzzy keyword completion
          (Maxim Kim)
Solution: add the "fuzzycollect" value for the 'completeopt'
          setting, to gather matches using fuzzy logic (glepnir)

fixes: #14912
closes: #14976

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 20:25:01 +02:00
h-east
84ac2126f4
runtime(doc): Fix typos in several documents
closes: #15034

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17 18:12:51 +02:00
glepnir
40c1c3317d
patch 9.1.0476: Cannot see matched text in popup menu
Problem:  Cannot see matched text in popup menu
Solution: Introduce 2 new highlighting groups: PmenuMatch and
          PmenuMatchSel (glepnir)

ping @habamax, @neutaaaaan @romainl because vim/colorschemes may need
some updates, @lifepillar for updating vim-colortemplate

closes: #14694

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:40:50 +02:00
zeertzjq
529b9ad62a
patch 9.1.0469: Cannot have buffer-local value for 'completeopt'
Problem:  Cannot have buffer-local value for 'completeopt'
          (Nick Jensen).
Solution: Make 'completeopt' global-local (zeertzjq).

Also for some reason test Test_ColonEight_MultiByte seems to be failing
sporadically now. Let's mark it as flaky.

fixes: #5487
closes: #14922

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 20:27:06 +02:00
Christian Brabandt
2a2c4fffd7
runtime(doc): clarify how fuzzy 'completeopt' should work
related: #14912

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-04 20:27:18 +02:00
Riley Bruins
0a0830624a
patch 9.1.0464: no whitespace padding in commentstring option in ftplugins
Problem:  no whitespace padding in commentstring option in ftplugins
Solution: Change default to include whitespace padding, update
          existing filetype plugins with the new default value
          (Riley Bruins)

closes: #14843

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-03 20:40:45 +02:00
glepnir
a218cc6cda
patch 9.1.0463: no fuzzy-matching support for insert-completion
Problem:  no fuzzy-matching support for insert-completion
Solution: enable insert-mode completion with fuzzy-matching
          using :set completopt+=fuzzy (glepnir).

closes: #14878

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-03 19:46:13 +02:00
Christian Brabandt
e299591498
runtime(doc): clarify 'shortmess' flag "S"
fixes: #14893

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-01 20:43:47 +02:00
Christian Brabandt
d801edfb1b
runtime(doc): mention comment plugin at :h 'commentstring'
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-19 09:29:02 +02:00
Christian Brabandt
fb745756db
runtime(doc): add MsgArea to 'highlight' option description
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-07 21:21:30 +02:00
Christian Brabandt
c3e6e393cb
patch 9.1.0393: 'viewdir' not respecting $XDG_CONFIG_HOME
Problem:  'viewdir' not respecting $XDG_CONFIG_HOME
          (Danilo Rezende, after v9.1.327)
Solution: adjust 'viewdir' option when enabling XDG config mode

fixes: #14680
closes: #14708

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-04 09:48:15 +02:00
zeertzjq
ad493ef3ea
patch 9.1.0228: Two unrelated things are tested by a single test
Problem:  Two unrelated things are tested by a single test.
Solution: Split it into two, restoring the old Test_brace_single_line().
          Add missing cleanup to some tests.
          (zeertzjq)

closes: #14323

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-29 10:25:52 +01:00
Luuk van Baal
5a2e3ec9ac
patch 9.1.0215: Half-page scrolling does not support smooth-scrolling
Problem:  Page-wise scrolling with Ctrl-D/Ctrl-U implements
          it's own logic to change the topline and cursor.
          More logic than necessary for scrolling with Ctrl-F/Ctrl-B
          was removed in patch 9.1.0211.
Solution: Re-use the logic from Ctrl-E/Ctrl-Y/Ctrl-F/Ctrl-B while
          staying backward compatible as much as possible.
          Restore some of the logic that determined how many lines will
          be scrolled (Luuk van Baal)

closes: #14316

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:10:40 +01:00
Luuk van Baal
b9f5b95b7b
patch 9.1.0211: page-wise scrolling does not support smooth-scrolling
Problem:  Page-wise scrolling with Ctrl-F/Ctrl-B implements
          it's own logic to change the topline and cursor.
          In doing so, skipcol is not handled properly for
          'smoothscroll', and virtual lines.
Solution: Re-use the logic from Ctrl-E/Ctrl-Y while staying
          backward compatible as much as possible.

closes: #14268

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26 18:53:24 +01:00
Song-Tianxiang
ab01adf7c6
runtime(doc): Update options.txt
closes: #14295

Signed-off-by: Song-Tianxiang <149415622+Song-Tianxiang@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-25 16:31:41 +01:00
zeertzjq
0049a495c8
runtime(doc): improve 'winfixbuf' docs (#14180)
- Make it not sound like a buffer option.
- "!" is called a modifier, not an option.

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-11 15:13:16 +00:00
Shougo Matsushita
9db39b0ec9
patch 9.1.0154: shm=F not respected when reloading buffer with 'autoread'
Problem:  shm=F not respected when reloading buffer with 'autoread'
Solution: Check SHM_FILEINFO in buf_check_timestamp()
          (Shougo Matsushita)

closes: #14144

Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-06 20:58:41 +01:00
Colin Kennedy
2157035637
patch 9.1.0147: Cannot keep a buffer focused in a window
Problem:  Cannot keep a buffer focused in a window
          (Amit Levy)
Solution: Add the 'winfixbuf' window-local option
          (Colin Kennedy)

fixes:  #6445
closes: #13903

Signed-off-by: Colin Kennedy <colinvfx@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-03 16:16:47 +01:00
zeertzjq
d086b8f646
runtime(doc): fix inconsistent indent (#14089)
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-25 08:42:52 +01:00
Matt Ellis
374e26aba2
runtime(doc): clarify ':set[l] {option}<' behaviour
closes: #14062

Signed-off-by: Matt Ellis <m.t.ellis@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-24 17:04:07 +01:00
Erik S. V. Jansson
8b1e749ca6
patch 9.1.0133: MS-Windows: ligatures not rendering correctly
Problem:  font ligatures don't render correctly in the Win32 GUI-version
          of gvim even when set rop=type:directx is used. Setting
          guiligatures also doesn't make any difference. This leads to
          broken font ligatures when the cursor passes through them. It
          does not recover from this, and they remain broken until you
          re-render the whole buffer (e.g. by using Ctrl+L).

Solution: the problem is that we only re-draw the current and previous
          character in gui_undraw_cursor() and only have the special case
          for GTK when it comes to rendering ligatures. So let's enable
          gui_adjust_undraw_cursor_for_ligatures() to also happen for
          Win32 GUI if guiligatures is setup correctly (all this does is
          expand the range of gui_undraw_cursor() with ligature characters).

related: #9181
related: #12901
closes: #14084

Signed-off-by: Erik S. V. Jansson <caffeineviking@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-24 14:26:52 +01:00
Christian Brabandt
1b7fbe726a
runtime(doc): Update help for Wayland support
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-30 20:41:53 +01:00
zeertzjq
6a8d2e1634
patch 9.1.0039: too vague errors for 'listchars'/'fillchars'
Problem:  too vague errors for 'listchars'/'fillchars'
Solution: Include the field name in error message.
          (zeertzjq)

related: neovim/neovim#27050
closes: #13877

Co-authored-by: Cole Frankenhoff <cole.nhf@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17 21:07:08 +01:00
Gregory Anders
83ad2726ff
patch 9.1.0004: reloading colorscheme when not changing 'background'
Problem:  reloading colorscheme when not changing 'background'
Solution: Check, if the background option value actually changed,
          if not, return early.

Only reload colorscheme when bg is changed

Currently the highlight groups are re-initialized and the colorscheme
(if any) is reloaded anytime 'background' is set, even if it is not
changed. This is unnecessary, because if the value was not changed then
there is no need to change highlight groups or do anything with the
colorscheme. Instead, only reload the colorscheme if the value of
'background' was actually changed.

closes: #13700

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 19:53:59 +01:00
Christian Brabandt
b4ddc6c11e
patch 9.1.0000: Vim 9.1 release
Problem:  Need a new release
Solution: Release Vim 9.1

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-02 16:51:11 +01:00
zeertzjq
fe583b1e59
patch 9.0.2183: Maximum callback depth is not configurable
Problem:  Maximum callback depth is not configurable.
Solution: Revert patch 9.0.2103.  Set 'maxfuncdepth' in test.
          (zeertzjq)

fixes: #13732
closes: #13736

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 17:03:31 +01:00
dundargoc
82f19734bf
runtime(doc): remove deprecation warning for gdefault
Deprecated can be misunderstood as being slated for removal; slightly
change wording to be clearer.

Signed-off-by: dundargoc <gocdundar@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:56:06 +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
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
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 47510f3d6598a1218958c03ed11337a43b73f48d 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
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
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
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
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
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
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