Making the 'set-option' command help more descriptive. (#2365)
* Making the 'set-option' command help more descriptive. * Adding the generated docs * Making the message multi-line * Replace newline with break in generated docs
This commit is contained in:
parent
f59b3b91c8
commit
09a17e4fa3
3 changed files with 5 additions and 3 deletions
|
@ -55,7 +55,7 @@
|
||||||
| `:tutor` | Open the tutorial. |
|
| `:tutor` | Open the tutorial. |
|
||||||
| `:goto`, `:g` | Go to line number. |
|
| `:goto`, `:g` | Go to line number. |
|
||||||
| `:set-language`, `:lang` | Set the language of current buffer. |
|
| `:set-language`, `:lang` | Set the language of current buffer. |
|
||||||
| `:set-option`, `:set` | Set a config option at runtime. |
|
| `:set-option`, `:set` | Set a config option at runtime.<br>For example to disable smart case search, use `:set search.smart-case false`. |
|
||||||
| `:get-option`, `:get` | Get the current value of a config option. |
|
| `:get-option`, `:get` | Get the current value of a config option. |
|
||||||
| `:sort` | Sort ranges in selection. |
|
| `:sort` | Sort ranges in selection. |
|
||||||
| `:rsort` | Sort ranges in selection in reverse order. |
|
| `:rsort` | Sort ranges in selection in reverse order. |
|
||||||
|
|
|
@ -1594,7 +1594,7 @@ pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
|
||||||
TypableCommand {
|
TypableCommand {
|
||||||
name: "set-option",
|
name: "set-option",
|
||||||
aliases: &["set"],
|
aliases: &["set"],
|
||||||
doc: "Set a config option at runtime.",
|
doc: "Set a config option at runtime.\nFor example to disable smart case search, use `:set search.smart-case false`.",
|
||||||
fun: set_option,
|
fun: set_option,
|
||||||
completer: Some(completers::setting),
|
completer: Some(completers::setting),
|
||||||
},
|
},
|
||||||
|
|
|
@ -106,7 +106,9 @@ pub mod md_gen {
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.join(", ");
|
.join(", ");
|
||||||
|
|
||||||
md.push_str(&md_table_row(&[names.to_owned(), cmd.doc.to_owned()]));
|
let doc = cmd.doc.replace("\n", "<br>");
|
||||||
|
|
||||||
|
md.push_str(&md_table_row(&[names.to_owned(), doc.to_owned()]));
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(md)
|
Ok(md)
|
||||||
|
|
Loading…
Add table
Reference in a new issue