aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/if_ruby.txt
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2026-10-17 11:34:02 -0400
committerGitHub <noreply@github.com>2026-10-17 11:34:02 -0400
commit0851e7dabed9fc9c019e22088029f36e9f3ec3e3 (patch)
tree35a1abb6a3d08b49e6a45ad3de089b622e1605ae /runtime/doc/if_ruby.txt
parentf8b704e019ed8194a5e873773670b263abd3dedf (diff)
downloadrneovim-master.tar.gz
rneovim-master.tar.bz2
rneovim-master.zip
docs(help): specify h4 "function signature" format #42434master
Work towards enabling ["flow" layout](https://github.com/neovim/neovim/blob/9244da12e400ec0291450a5e9400d995e7a29b83/src/gen/gen_help_html.lua#L86-L88) in all `:help` files. Problem: The final boss of vimdoc pseudo-structure: Vim's quasi-headings on function signatures and excmd docs is visually distinctive but too inconsistent for a nice parse rule. Solution: - Define the quasi-heading format as an "h4" variant, specified at `:help help-tag-heading`. - For simplicity and predictability, it is defined as any line that ends with a help tag(s) preceded by 2 or more spaces (or 1 tab). - Update existing docs. - This one-time update has a lot of changes, but is very unlikely to conflict with ported Vim-patches because (1) Vim rarely adds new *excmds* that we want, and (2) *function* docs are auto-generated. ref https://github.com/neovim/tree-sitter-vimdoc/issues/110
Diffstat (limited to 'runtime/doc/if_ruby.txt')
-rw-r--r--runtime/doc/if_ruby.txt20
1 files changed, 8 insertions, 12 deletions
diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt
index d15ec2cb5e..789e9752f0 100644
--- a/runtime/doc/if_ruby.txt
+++ b/runtime/doc/if_ruby.txt
@@ -55,16 +55,16 @@ To see what version of Ruby you have: >
:ruby print RUBY_VERSION
<
- *:rubydo* *:rubyd* *E265*
-:[range]rubyd[o] {cmd} Evaluate Ruby command {cmd} for each line in the
+:[range]rubyd[o] {cmd} *:rubydo* *:rubyd* *E265*
+ Evaluate Ruby command {cmd} for each line in the
[range], with $_ being set to the text of each line in
turn, without a trailing <EOL>. Setting $_ will
change the text, but note that it is not possible to
add or delete lines using this command.
The default for [range] is the whole file: "1,$".
- *:rubyfile* *:rubyf*
-:rubyf[ile] {file} Execute the Ruby script in {file}. This is the same
+:rubyf[ile] {file} *:rubyfile* *:rubyf*
+ Execute the Ruby script in {file}. This is the same
as `:ruby load 'file'`, but allows file name completion.
Executing Ruby commands is not possible in the |sandbox|.
@@ -99,22 +99,18 @@ Overview >
Module Functions:
- *ruby-message*
-VIM::message({msg})
+VIM::message({msg}) *ruby-message*
Displays the message {msg}.
- *ruby-set_option*
-VIM::set_option({arg})
+VIM::set_option({arg}) *ruby-set_option*
Sets a vim option. {arg} can be any argument that the ":set" command
accepts. Note that this means that no spaces are allowed in the
argument! See |:set|.
- *ruby-command*
-VIM::command({cmd})
+VIM::command({cmd}) *ruby-command*
Executes Ex command {cmd}.
- *ruby-evaluate*
-VIM::evaluate({expr})
+VIM::evaluate({expr}) *ruby-evaluate*
Evaluates {expr} using the vim internal expression evaluator (see
|expression|). Returns the expression result as a string.
A |List| is turned into a string by joining the items and inserting