docs(builtin): fix alignment of comments in code blocks (#24529)

This commit is contained in:
zeertzjq
2023-08-02 22:14:32 +08:00
committed by GitHub
parent d086bc1e85
commit 1ee905a63a
3 changed files with 57 additions and 57 deletions

View File

@@ -431,9 +431,9 @@ bufname([{buf}]) *bufname()*
If the {buf} is a String, but you want to use it as a buffer If the {buf} is a String, but you want to use it as a buffer
< If the buffer doesn't exist, or doesn't have a name, an empty < If the buffer doesn't exist, or doesn't have a name, an empty
string is returned. >vim string is returned. >vim
echo bufname("#") " alternate buffer name echo bufname("#") " alternate buffer name
echo bufname(3) " name of buffer 3 echo bufname(3) " name of buffer 3
echo bufname("%") " name of current buffer echo bufname("%") " name of current buffer
echo bufname("file2") " name of buffer where "file2" matches. echo bufname("file2") " name of buffer where "file2" matches.
< <
@@ -593,10 +593,10 @@ chansend({id}, {data}) *chansend()*
char2nr({string} [, {utf8}]) *char2nr()* char2nr({string} [, {utf8}]) *char2nr()*
Return Number value of the first char in {string}. Return Number value of the first char in {string}.
Examples: >vim Examples: >vim
echo char2nr(" ") " returns 32 echo char2nr(" ") " returns 32
echo char2nr("ABC") " returns 65 echo char2nr("ABC") " returns 65
echo char2nr("á") " returns 225 echo char2nr("á") " returns 225
echo char2nr("á"[0]) " returns 195 echo char2nr("á"[0]) " returns 195
echo char2nr("\<M-x>") " returns 128 echo char2nr("\<M-x>") " returns 128
< Non-ASCII characters are always treated as UTF-8 characters. < Non-ASCII characters are always treated as UTF-8 characters.
{utf8} is ignored, it exists only for backwards-compatibility. {utf8} is ignored, it exists only for backwards-compatibility.
@@ -622,7 +622,7 @@ charcol({expr} [, {winid}]) *charcol()*
Example: Example:
With the cursor on '세' in line 5 with text "여보세요": >vim With the cursor on '세' in line 5 with text "여보세요": >vim
echo charcol('.') " returns 3 echo charcol('.') " returns 3
echo col('.') " returns 7 echo col('.') " returns 7
charidx({string}, {idx} [, {countcc} [, {utf16}]]) *charidx()* charidx({string}, {idx} [, {countcc} [, {utf16}]]) *charidx()*
@@ -719,9 +719,9 @@ col({expr} [, {winid}]) *col()*
character position use |charcol()|. character position use |charcol()|.
Note that only marks in the current file can be used. Note that only marks in the current file can be used.
Examples: >vim Examples: >vim
echo col(".") " column of cursor echo col(".") " column of cursor
echo col("$") " length of cursor line plus one echo col("$") " length of cursor line plus one
echo col("'t") " column of mark t echo col("'t") " column of mark t
echo col("'" .. markname) " column of mark markname echo col("'" .. markname) " column of mark markname
< The first column is 1. Returns 0 if {expr} is invalid or when < The first column is 1. Returns 0 if {expr} is invalid or when
the window with ID {winid} is not found. the window with ID {winid} is not found.
@@ -3972,9 +3972,9 @@ line({expr} [, {winid}]) *line()*
that window instead of the current window. that window instead of the current window.
Returns 0 for invalid values of {expr} and {winid}. Returns 0 for invalid values of {expr} and {winid}.
Examples: >vim Examples: >vim
echo line(".") " line number of the cursor echo line(".") " line number of the cursor
echo line(".", winid) " idem, in window "winid" echo line(".", winid) " idem, in window "winid"
echo line("'t") " line number of mark t echo line("'t") " line number of mark t
echo line("'" .. marker) " line number of mark marker echo line("'" .. marker) " line number of mark marker
< <
To jump to the last known position when opening a file see To jump to the last known position when opening a file see
@@ -5288,11 +5288,11 @@ range({expr} [, {max} [, {stride}]]) *range()* *E726* *E
start this is an error. start this is an error.
Examples: >vim Examples: >vim
echo range(4) " [0, 1, 2, 3] echo range(4) " [0, 1, 2, 3]
echo range(2, 4) " [2, 3, 4] echo range(2, 4) " [2, 3, 4]
echo range(2, 9, 3) " [2, 5, 8] echo range(2, 9, 3) " [2, 5, 8]
echo range(2, -2, -1) " [2, 1, 0, -1, -2] echo range(2, -2, -1) " [2, 1, 0, -1, -2]
echo range(0) " [] echo range(0) " []
echo range(2, 0) " error! echo range(2, 0) " error!
< <
readblob({fname} [, {offset} [, {size}]]) *readblob()* readblob({fname} [, {offset} [, {size}]]) *readblob()*
@@ -7394,7 +7394,7 @@ strftime({format} [, {time}]) *strftime()*
echo strftime("%c") " Sun Apr 27 11:49:23 1997 echo strftime("%c") " Sun Apr 27 11:49:23 1997
echo strftime("%Y %b %d %X") " 1997 Apr 27 11:53:25 echo strftime("%Y %b %d %X") " 1997 Apr 27 11:53:25
echo strftime("%y%m%d %T") " 970427 11:53:55 echo strftime("%y%m%d %T") " 970427 11:53:55
echo strftime("%H:%M") " 11:55 echo strftime("%H:%M") " 11:55
echo strftime("%c", getftime("file.c")) echo strftime("%c", getftime("file.c"))
" Show mod time of file.c. " Show mod time of file.c.
@@ -7419,8 +7419,8 @@ stridx({haystack}, {needle} [, {start}]) *stridx()*
-1 is returned if the {needle} does not occur in {haystack}. -1 is returned if the {needle} does not occur in {haystack}.
See also |strridx()|. See also |strridx()|.
Examples: >vim Examples: >vim
echo stridx("An Example", "Example") " 3 echo stridx("An Example", "Example") " 3
echo stridx("Starting point", "Start") " 0 echo stridx("Starting point", "Start") " 0
echo stridx("Starting point", "start") " -1 echo stridx("Starting point", "start") " -1
< *strstr()* *strchr()* < *strstr()* *strchr()*
stridx() works similar to the C function strstr(). When used stridx() works similar to the C function strstr(). When used

View File

@@ -572,9 +572,9 @@ function vim.fn.bufloaded(buf) end
--- If the {buf} is a String, but you want to use it as a buffer --- If the {buf} is a String, but you want to use it as a buffer
--- <If the buffer doesn't exist, or doesn't have a name, an empty --- <If the buffer doesn't exist, or doesn't have a name, an empty
--- string is returned. >vim --- string is returned. >vim
--- echo bufname("#") " alternate buffer name --- echo bufname("#") " alternate buffer name
--- echo bufname(3) " name of buffer 3 --- echo bufname(3) " name of buffer 3
--- echo bufname("%") " name of current buffer --- echo bufname("%") " name of current buffer
--- echo bufname("file2") " name of buffer where "file2" matches. --- echo bufname("file2") " name of buffer where "file2" matches.
--- < --- <
--- ---
@@ -778,10 +778,10 @@ function vim.fn.chansend(id, data) end
--- Return Number value of the first char in {string}. --- Return Number value of the first char in {string}.
--- Examples: >vim --- Examples: >vim
--- echo char2nr(" ") " returns 32 --- echo char2nr(" ") " returns 32
--- echo char2nr("ABC") " returns 65 --- echo char2nr("ABC") " returns 65
--- echo char2nr("á") " returns 225 --- echo char2nr("á") " returns 225
--- echo char2nr("á"[0]) " returns 195 --- echo char2nr("á"[0]) " returns 195
--- echo char2nr("\<M-x>") " returns 128 --- echo char2nr("\<M-x>") " returns 128
--- <Non-ASCII characters are always treated as UTF-8 characters. --- <Non-ASCII characters are always treated as UTF-8 characters.
--- {utf8} is ignored, it exists only for backwards-compatibility. --- {utf8} is ignored, it exists only for backwards-compatibility.
@@ -814,7 +814,7 @@ function vim.fn.charclass(string) end
--- ---
--- Example: --- Example:
--- With the cursor on '세' in line 5 with text "여보세요": >vim --- With the cursor on '세' in line 5 with text "여보세요": >vim
--- echo charcol('.') " returns 3 --- echo charcol('.') " returns 3
--- echo col('.') " returns 7 --- echo col('.') " returns 7
--- ---
--- @param expr any --- @param expr any
@@ -929,9 +929,9 @@ function vim.fn.clearmatches(win) end
--- character position use |charcol()|. --- character position use |charcol()|.
--- Note that only marks in the current file can be used. --- Note that only marks in the current file can be used.
--- Examples: >vim --- Examples: >vim
--- echo col(".") " column of cursor --- echo col(".") " column of cursor
--- echo col("$") " length of cursor line plus one --- echo col("$") " length of cursor line plus one
--- echo col("'t") " column of mark t --- echo col("'t") " column of mark t
--- echo col("'" .. markname) " column of mark markname --- echo col("'" .. markname) " column of mark markname
--- <The first column is 1. Returns 0 if {expr} is invalid or when --- <The first column is 1. Returns 0 if {expr} is invalid or when
--- the window with ID {winid} is not found. --- the window with ID {winid} is not found.
@@ -4809,9 +4809,9 @@ function vim.fn.libcallnr(libname, funcname, argument) end
--- that window instead of the current window. --- that window instead of the current window.
--- Returns 0 for invalid values of {expr} and {winid}. --- Returns 0 for invalid values of {expr} and {winid}.
--- Examples: >vim --- Examples: >vim
--- echo line(".") " line number of the cursor --- echo line(".") " line number of the cursor
--- echo line(".", winid) " idem, in window "winid" --- echo line(".", winid) " idem, in window "winid"
--- echo line("'t") " line number of mark t --- echo line("'t") " line number of mark t
--- echo line("'" .. marker) " line number of mark marker --- echo line("'" .. marker) " line number of mark marker
--- < --- <
--- To jump to the last known position when opening a file see --- To jump to the last known position when opening a file see
@@ -6303,11 +6303,11 @@ function vim.fn.rand(expr) end
--- start this is an error. --- start this is an error.
--- Examples: >vim --- Examples: >vim
--- echo range(4) " [0, 1, 2, 3] --- echo range(4) " [0, 1, 2, 3]
--- echo range(2, 4) " [2, 3, 4] --- echo range(2, 4) " [2, 3, 4]
--- echo range(2, 9, 3) " [2, 5, 8] --- echo range(2, 9, 3) " [2, 5, 8]
--- echo range(2, -2, -1) " [2, 1, 0, -1, -2] --- echo range(2, -2, -1) " [2, 1, 0, -1, -2]
--- echo range(0) " [] --- echo range(0) " []
--- echo range(2, 0) " error! --- echo range(2, 0) " error!
--- < --- <
--- ---
--- @param expr any --- @param expr any
@@ -8801,7 +8801,7 @@ function vim.fn.strdisplaywidth(string, col) end
--- echo strftime("%c") " Sun Apr 27 11:49:23 1997 --- echo strftime("%c") " Sun Apr 27 11:49:23 1997
--- echo strftime("%Y %b %d %X") " 1997 Apr 27 11:53:25 --- echo strftime("%Y %b %d %X") " 1997 Apr 27 11:53:25
--- echo strftime("%y%m%d %T") " 970427 11:53:55 --- echo strftime("%y%m%d %T") " 970427 11:53:55
--- echo strftime("%H:%M") " 11:55 --- echo strftime("%H:%M") " 11:55
--- echo strftime("%c", getftime("file.c")) --- echo strftime("%c", getftime("file.c"))
--- " Show mod time of file.c. --- " Show mod time of file.c.
--- ---
@@ -8834,8 +8834,8 @@ function vim.fn.strgetchar(str, index) end
--- -1 is returned if the {needle} does not occur in {haystack}. --- -1 is returned if the {needle} does not occur in {haystack}.
--- See also |strridx()|. --- See also |strridx()|.
--- Examples: >vim --- Examples: >vim
--- echo stridx("An Example", "Example") " 3 --- echo stridx("An Example", "Example") " 3
--- echo stridx("Starting point", "Start") " 0 --- echo stridx("Starting point", "Start") " 0
--- echo stridx("Starting point", "start") " -1 --- echo stridx("Starting point", "start") " -1
--- < *strstr()* *strchr()* --- < *strstr()* *strchr()*
--- stridx() works similar to the C function strstr(). When used --- stridx() works similar to the C function strstr(). When used

View File

@@ -798,9 +798,9 @@ M.funcs = {
If the {buf} is a String, but you want to use it as a buffer If the {buf} is a String, but you want to use it as a buffer
<If the buffer doesn't exist, or doesn't have a name, an empty <If the buffer doesn't exist, or doesn't have a name, an empty
string is returned. >vim string is returned. >vim
echo bufname("#") " alternate buffer name echo bufname("#") " alternate buffer name
echo bufname(3) " name of buffer 3 echo bufname(3) " name of buffer 3
echo bufname("%") " name of current buffer echo bufname("%") " name of current buffer
echo bufname("file2") " name of buffer where "file2" matches. echo bufname("file2") " name of buffer where "file2" matches.
< <
]=], ]=],
@@ -1063,10 +1063,10 @@ M.funcs = {
desc = [=[ desc = [=[
Return Number value of the first char in {string}. Return Number value of the first char in {string}.
Examples: >vim Examples: >vim
echo char2nr(" ") " returns 32 echo char2nr(" ") " returns 32
echo char2nr("ABC") " returns 65 echo char2nr("ABC") " returns 65
echo char2nr("á") " returns 225 echo char2nr("á") " returns 225
echo char2nr("á"[0]) " returns 195 echo char2nr("á"[0]) " returns 195
echo char2nr("\<M-x>") " returns 128 echo char2nr("\<M-x>") " returns 128
<Non-ASCII characters are always treated as UTF-8 characters. <Non-ASCII characters are always treated as UTF-8 characters.
{utf8} is ignored, it exists only for backwards-compatibility. {utf8} is ignored, it exists only for backwards-compatibility.
@@ -1110,7 +1110,7 @@ M.funcs = {
Example: Example:
With the cursor on '세' in line 5 with text "여보세요": >vim With the cursor on '세' in line 5 with text "여보세요": >vim
echo charcol('.') " returns 3 echo charcol('.') " returns 3
echo col('.') " returns 7 echo col('.') " returns 7
]=], ]=],
@@ -1256,9 +1256,9 @@ M.funcs = {
character position use |charcol()|. character position use |charcol()|.
Note that only marks in the current file can be used. Note that only marks in the current file can be used.
Examples: >vim Examples: >vim
echo col(".") " column of cursor echo col(".") " column of cursor
echo col("$") " length of cursor line plus one echo col("$") " length of cursor line plus one
echo col("'t") " column of mark t echo col("'t") " column of mark t
echo col("'" .. markname) " column of mark markname echo col("'" .. markname) " column of mark markname
<The first column is 1. Returns 0 if {expr} is invalid or when <The first column is 1. Returns 0 if {expr} is invalid or when
the window with ID {winid} is not found. the window with ID {winid} is not found.
@@ -5884,9 +5884,9 @@ M.funcs = {
that window instead of the current window. that window instead of the current window.
Returns 0 for invalid values of {expr} and {winid}. Returns 0 for invalid values of {expr} and {winid}.
Examples: >vim Examples: >vim
echo line(".") " line number of the cursor echo line(".") " line number of the cursor
echo line(".", winid) " idem, in window "winid" echo line(".", winid) " idem, in window "winid"
echo line("'t") " line number of mark t echo line("'t") " line number of mark t
echo line("'" .. marker) " line number of mark marker echo line("'" .. marker) " line number of mark marker
< <
To jump to the last known position when opening a file see To jump to the last known position when opening a file see
@@ -7609,11 +7609,11 @@ M.funcs = {
start this is an error. start this is an error.
Examples: >vim Examples: >vim
echo range(4) " [0, 1, 2, 3] echo range(4) " [0, 1, 2, 3]
echo range(2, 4) " [2, 3, 4] echo range(2, 4) " [2, 3, 4]
echo range(2, 9, 3) " [2, 5, 8] echo range(2, 9, 3) " [2, 5, 8]
echo range(2, -2, -1) " [2, 1, 0, -1, -2] echo range(2, -2, -1) " [2, 1, 0, -1, -2]
echo range(0) " [] echo range(0) " []
echo range(2, 0) " error! echo range(2, 0) " error!
< <
]=], ]=],
name = 'range', name = 'range',
@@ -10484,7 +10484,7 @@ M.funcs = {
echo strftime("%c") " Sun Apr 27 11:49:23 1997 echo strftime("%c") " Sun Apr 27 11:49:23 1997
echo strftime("%Y %b %d %X") " 1997 Apr 27 11:53:25 echo strftime("%Y %b %d %X") " 1997 Apr 27 11:53:25
echo strftime("%y%m%d %T") " 970427 11:53:55 echo strftime("%y%m%d %T") " 970427 11:53:55
echo strftime("%H:%M") " 11:55 echo strftime("%H:%M") " 11:55
echo strftime("%c", getftime("file.c")) echo strftime("%c", getftime("file.c"))
" Show mod time of file.c. " Show mod time of file.c.
@@ -10525,8 +10525,8 @@ M.funcs = {
-1 is returned if the {needle} does not occur in {haystack}. -1 is returned if the {needle} does not occur in {haystack}.
See also |strridx()|. See also |strridx()|.
Examples: >vim Examples: >vim
echo stridx("An Example", "Example") " 3 echo stridx("An Example", "Example") " 3
echo stridx("Starting point", "Start") " 0 echo stridx("Starting point", "Start") " 0
echo stridx("Starting point", "start") " -1 echo stridx("Starting point", "start") " -1
< *strstr()* *strchr()* < *strstr()* *strchr()*
stridx() works similar to the C function strstr(). When used stridx() works similar to the C function strstr(). When used