runtime(doc): Replace non-breaking space with normal space (#13868)
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
GitHub
parent
93197fde0f
commit
eb3475df0d
@ -6114,8 +6114,8 @@ matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}])
|
|||||||
|
|
||||||
For each match, a |Dict| with the following items is returned:
|
For each match, a |Dict| with the following items is returned:
|
||||||
byteidx starting byte index of the match
|
byteidx starting byte index of the match
|
||||||
lnum line number where there is a match
|
lnum line number where there is a match
|
||||||
text matched string
|
text matched string
|
||||||
Note that there can be multiple matches in a single line.
|
Note that there can be multiple matches in a single line.
|
||||||
|
|
||||||
This function works only for loaded buffers. First call
|
This function works only for loaded buffers. First call
|
||||||
@ -6126,19 +6126,19 @@ matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}])
|
|||||||
empty |List| is returned.
|
empty |List| is returned.
|
||||||
|
|
||||||
Examples: >
|
Examples: >
|
||||||
" Assuming line 3 in buffer 5 contains "a"
|
" Assuming line 3 in buffer 5 contains "a"
|
||||||
:echo matchbufline(5, '\<\k\+\>', 3, 3)
|
:echo matchbufline(5, '\<\k\+\>', 3, 3)
|
||||||
[{'lnum': 3, 'byteidx': 0, 'text': 'a'}]
|
[{'lnum': 3, 'byteidx': 0, 'text': 'a'}]
|
||||||
" Assuming line 4 in buffer 10 contains "tik tok"
|
" Assuming line 4 in buffer 10 contains "tik tok"
|
||||||
:echo matchbufline(10, '\<\k\+\>', 1, 4)
|
:echo matchbufline(10, '\<\k\+\>', 1, 4)
|
||||||
[{'lnum': 4, 'byteidx': 0, 'text': 'tik'}, {'lnum': 4, 'byteidx': 4, 'text': 'tok'}]
|
[{'lnum': 4, 'byteidx': 0, 'text': 'tik'}, {'lnum': 4, 'byteidx': 4, 'text': 'tok'}]
|
||||||
<
|
<
|
||||||
If {submatch} is present and is v:true, then submatches like
|
If {submatch} is present and is v:true, then submatches like
|
||||||
"\1", "\2", etc. are also returned. Example: >
|
"\1", "\2", etc. are also returned. Example: >
|
||||||
" Assuming line 2 in buffer 2 contains "acd"
|
" Assuming line 2 in buffer 2 contains "acd"
|
||||||
:echo matchbufline(2, '\(a\)\?\(b\)\?\(c\)\?\(.*\)', 2, 2
|
:echo matchbufline(2, '\(a\)\?\(b\)\?\(c\)\?\(.*\)', 2, 2
|
||||||
\ {'submatches': v:true})
|
\ {'submatches': v:true})
|
||||||
[{'lnum': 2, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]
|
[{'lnum': 2, 'byteidx': 0, 'text': 'acd', 'submatches': ['a', '', 'c', 'd', '', '', '', '', '']}]
|
||||||
< The "submatches" List always contains 9 items. If a submatch
|
< The "submatches" List always contains 9 items. If a submatch
|
||||||
is not found, then an empty string is returned for that
|
is not found, then an empty string is returned for that
|
||||||
submatch.
|
submatch.
|
||||||
@ -6296,10 +6296,10 @@ matchstrlist({list}, {pat} [, {dict}])
|
|||||||
"submatches" is set to v:true in {dict}.
|
"submatches" is set to v:true in {dict}.
|
||||||
|
|
||||||
Example: >
|
Example: >
|
||||||
:echo matchstrlist(['tik tok'], '\<\k\+\>')
|
:echo matchstrlist(['tik tok'], '\<\k\+\>')
|
||||||
[{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}]
|
[{'idx': 0, 'byteidx': 0, 'text': 'tik'}, {'idx': 0, 'byteidx': 4, 'text': 'tok'}]
|
||||||
:echo matchstrlist(['a', 'b'], '\<\k\+\>')
|
:echo matchstrlist(['a', 'b'], '\<\k\+\>')
|
||||||
[{'idx': 0, 'byteidx': 0, 'text': 'a'}, {'idx': 1, 'byteidx': 0, 'text': 'b'}]
|
[{'idx': 0, 'byteidx': 0, 'text': 'a'}, {'idx': 1, 'byteidx': 0, 'text': 'b'}]
|
||||||
<
|
<
|
||||||
If "submatches" is present and is v:true, then submatches like
|
If "submatches" is present and is v:true, then submatches like
|
||||||
"\1", "\2", etc. are also returned. Example: >
|
"\1", "\2", etc. are also returned. Example: >
|
||||||
|
|||||||
Reference in New Issue
Block a user