Skip to content

Conversation

@dlejay
Copy link
Contributor

@dlejay dlejay commented Jun 29, 2025

Answers #16204

by adding the beginning of the rules that I understand are used in documentation files.

Most of the noise is me doing retab!

dlejay added 2 commits June 29, 2025 12:15
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Damien Lejay <damien@lejay.be>
@dlejay dlejay marked this pull request as draft June 29, 2025 16:20
@chrisbra
Copy link
Member

possibly also interesting for @h-east and @dkearns

Signed-off-by: Damien Lejay <damien@lejay.be>
@dlejay
Copy link
Contributor Author

dlejay commented Jun 29, 2025

Suggestions applied. Also added a tip about helphelp.txt in CONTRIBUTING.md.
Some minor diff noise from auto-formatting.

PR set to draft while we await further opinions.

@h-east
Copy link
Member

h-east commented Jun 30, 2025

I think it's best to write how to write Vim help files in :h help-writing. (runtime/doc/helphelp.txt)
Currently, the explanation of "the format of the standard Vim help files" is insufficient, so I think it's fine to add it and write :h help-writing in CONTRIBUTING.md.


Normally, 'modeline' is on by default, so if we edit as is, we won't get strange indents.
At the very least, I can edit the help files without any problems, at least with 'smartindent' set.
So I've never run :retab!, and I don't want it recommended either.

Also, as written in :h help-writing, "2 spaces after a sentence" is also a rule at present. (It seems that this rule was changed in CONTRIBUTING.md in this PR.)

@h-east
Copy link
Member

h-east commented Jun 30, 2025

Commands I use very often while editing Vim help files:

  • :h v_gq
  • :h gqq
  • :h >>

@dlejay
Copy link
Contributor Author

dlejay commented Jun 30, 2025

Normally, 'modeline' is on by default, so if we edit as is, we won't get strange indents.

By default it is disabled on macOS /usr/bin/vim for security reasons.

Also, as written in :h help-writing, "2 spaces after a sentence" is also a rule at present. (It seems that this rule was changed in CONTRIBUTING.md in this PR.)

Yes let me add that rule for the help files. For Markdown files, two spaces or one space will be displayed identically.

Signed-off-by: Damien Lejay <damien@lejay.be>
@h-east
Copy link
Member

h-east commented Jun 30, 2025

By default it is disabled on macOS /usr/bin/vim for security reasons.

It's probably not a good idea to let them edit it in its default setting.
If the ‘modeline’ setting is off, we should prompt the user to turn it on.

Co-authored-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
@chrisbra
Copy link
Member

chrisbra commented Jul 1, 2025

By default it is disabled on macOS /usr/bin/vim for security reasons.

But you can enable modelines in your own configuration files, no?

@dlejay
Copy link
Contributor Author

dlejay commented Jul 2, 2025

But you can enable modelines in your own configuration files, no?

Of course

@dlejay dlejay marked this pull request as ready for review July 6, 2025 13:24
@chrisbra
Copy link
Member

chrisbra commented Jul 7, 2025

thanks

@chrisbra chrisbra closed this in 57d6d00 Jul 7, 2025
girishji added a commit to girishji/vim that referenced this pull request Jul 8, 2025
parent 1eaa26a
author Girish Palya <girishji@gmail.com> 1751956573 +0200
committer Girish Palya <girishji@gmail.com> 1751956573 +0200

M  runtime/doc/options.txt

# This is the commit message vim#13:

Rename option value to convey function better

M  runtime/doc/options.txt
M  src/cmdexpand.c
M  src/option.h
M  src/optionstr.c
M  src/testdir/test_cmdline.vim

# This is the commit message vim#15:

Merge

M  runtime/doc/options.txt

# This is the commit message vim#16:

M  runtime/doc/options.txt

# This is the commit message vim#17:

Simplify option value name

M  runtime/doc/options.txt
M  src/option.h
M  src/optionstr.c
M  src/testdir/test_cmdline.vim

# This is the commit message vim#18:

Keep alphabetical order in doc

M  runtime/doc/options.txt

# This is the commit message vim#19:

Improve doc

M  runtime/doc/options.txt

# This is the commit message vim#20:

runtime(doc): fix a few typos introduced in 0ae9e19

Signed-off-by: Christian Brabandt <cb@256bit.org>

# This is the commit message vim#21:

translation(tr): Update Turkish translations

closes: vim#17688

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>

# This is the commit message vim#22:

runtime(optwin): add missing values for tabpanel option

closes: vim#17685

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>

# This is the commit message vim#23:

patch 9.1.1518: getcompletiontype() may crash

Problem:  getcompletiontype() crashes when no completion is available
          (after v9.1.1509).
Solution: Don't call set_expand_context() (zeertzjq)

fixes: vim#17681
closes: vim#17684

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>

# This is the commit message vim#24:

runtime(doc): Add documentation style

closes: vim#17627

Co-authored-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>

# This is the commit message vim#25:

patch 9.1.1519: tests: Test_termdebug_decimal_breakpoints() may fail

Problem:  Test_termdebug_decimal_breakpoints() fails with List index out
          of range, because when adding the second breakpoint, the
          cursor is still on the very first line (a header include line)
          and therefore gdb refuses to set the breakpoint with:
          `msg="No compiled code for line 1 in file XTD_decimal.c"`
Solution: Run the program, so that it will break at the very first
          defined breakpoint and then once we are in the program,
          set further breakpoints

closes: vim#17689

Signed-off-by: Christian Brabandt <cb@256bit.org>
girishji added a commit to girishji/vim that referenced this pull request Jul 8, 2025
author Girish Palya <girishji@gmail.com> 1751956573 +0200
committer Girish Palya <girishji@gmail.com> 1751956573 +0200

M  runtime/doc/options.txt

Rename option value to convey function better

M  runtime/doc/options.txt
M  src/cmdexpand.c
M  src/option.h
M  src/optionstr.c
M  src/testdir/test_cmdline.vim

Merge

M  runtime/doc/options.txt

M  runtime/doc/options.txt

Simplify option value name

M  runtime/doc/options.txt
M  src/option.h
M  src/optionstr.c
M  src/testdir/test_cmdline.vim

Keep alphabetical order in doc

M  runtime/doc/options.txt

Improve doc

M  runtime/doc/options.txt

runtime(doc): fix a few typos introduced in 0ae9e19

Signed-off-by: Christian Brabandt <cb@256bit.org>

translation(tr): Update Turkish translations

closes: vim#17688

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>

runtime(optwin): add missing values for tabpanel option

closes: vim#17685

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>

patch 9.1.1518: getcompletiontype() may crash

Problem:  getcompletiontype() crashes when no completion is available
          (after v9.1.1509).
Solution: Don't call set_expand_context() (zeertzjq)

fixes: vim#17681
closes: vim#17684

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>

runtime(doc): Add documentation style

closes: vim#17627

Co-authored-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>

patch 9.1.1519: tests: Test_termdebug_decimal_breakpoints() may fail

Problem:  Test_termdebug_decimal_breakpoints() fails with List index out
          of range, because when adding the second breakpoint, the
          cursor is still on the very first line (a header include line)
          and therefore gdb refuses to set the breakpoint with:
          `msg="No compiled code for line 1 in file XTD_decimal.c"`
Solution: Run the program, so that it will break at the very first
          defined breakpoint and then once we are in the program,
          set further breakpoints

closes: vim#17689

Signed-off-by: Christian Brabandt <cb@256bit.org>

patch 9.1.1520: completion: search completion doesn't handle 'smartcase' well

Problem:  When using `/` or `?` in command-line mode with 'ignorecase' and
          'smartcase' enabled, the completion menu could show items that
          don't actually match any text in the buffer due to case mismatches

Solution: Instead of validating menu items only against the user-typed
          pattern, the new logic also checks whether the completed item
          matches actual buffer content. If needed, it retries the match
          using a lowercased version of the candidate, respecting
          smartcase semantics.

closes: vim#17665

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>

patch 9.1.1521: completion: pum does not reset scroll pos on reopen with 'noselect'

Problem:  When 'wildmode' is set to include "noselect", the popup menu (pum)
          incorrectly retained its scroll position when reopened. This
          meant that after scrolling down through the menu with `<C-n>`,
          reopening the menu (e.g., by retyping the command and
          triggering completion again) would show the menu starting from
          the previously scrolled position, rather than from the top.
          This could confuse users, as the first visible item would not
          be the first actual match in the list.

Solution: Ensure that the popup menu resets its scroll position to the
          top when reopened (Girish Palya).

closes: vim#17673

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>

patch 9.1.1522: tests: still some ANSI escape sequences in test output

Problem:  tests: still some ANSI escape sequences in test messages output
Solution: update the cleanup regexp to also handle those ANSI escape
          sequences: `<esc>|2h` and `<esc>|31H` like in this log output:

```
2025-07-05T20:02:47.6350409Z <esc>|2hExecuted 171 tests in   4.739708 seconds<esc>|31H
```

related: vim#17677

Signed-off-by: Christian Brabandt <cb@256bit.org>

patch 9.1.1523: tests: test_clipmethod fails in non X11 environment

Problem:  tests: test_clipmethod fails in non X11 environment
Solution: test that $DISPLAY is available

related: vim#17677

Signed-off-by: Christian Brabandt <cb@256bit.org>

patch 9.1.1524: tests: too many imports in the test suite

Problem:  tests: too many imports in the test suite
Solution: Clean up the imported scripts

Most tests make use of check.vim, so let's just source it once in
runtest.vim instead of having each test manually source it.

runtest.vim already sources shared.vim, which again sources
view_util.vim, so we don't need to source those two common
dependencies in all the other tests

And then check.vim sources term_util.vim already, so we can in addition
drop sourcing it explicitly in each single test script.

Note: test_expand_func.vim had to be updated to account for the changed
number of sourced files.

And finally check.vim uses line-continuation so let's also explicitly
enable line continuation via the 'cpo' option value.

related: vim#17677

Signed-off-by: Christian Brabandt <cb@256bit.org>

patch 9.1.1525: tests: testdir/ is a bit messy

Problem:  tests: testdir is a bit messy
Solution: move test scripts into testdir/util/ directory

src/testdir/ has become a dumping ground mixing test cases with utility
functions. Let's fix this by moving all utility functions into the
testdir/util/ directory

Also a few related changes had to be done:
- Update Filelist
- update README.txt and mention the new directory layout
- fix shadowbuild by linking the util directory into the shadow dir

closes: vim#17677

Signed-off-by: Christian Brabandt <cb@256bit.org>

runtime(netrw): restore blank line cleanup after file listing

Problem:  v182 refactoring removed blank line cleanup (g/^$/d) from
          s:LocalListing(), causing empty lines between directories
          and files.
Solution: Add the missing cleanup after append() in s:PerformListing()
          (uma-chan).

closes: vim#17672

Co-authored-by: Luca Saccarola <96259932+saccarosium@users.noreply.github.com>
Signed-off-by: uma-chan <127664533+i9wa4@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
@dlejay dlejay deleted the doc-style branch September 1, 2025 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants