comparison runtime/doc/builtin.txt @ 34463:4944acf6b46f

runtime(doc): some improvements to getregion() docs (#14122) Commit: https://github.com/vim/vim/commit/87410ab3f556121dfb3b30515f40c5f079edd004 Author: zeertzjq <zeertzjq@outlook.com> Date: Sat Mar 2 06:00:23 2024 +0800 runtime(doc): some improvements to getregion() docs (https://github.com/vim/vim/issues/14122) - Mention the default selection behavior - Remove useless sentence - Correct description about space padding Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Fri, 01 Mar 2024 23:15:06 +0100
parents d06ffca91441
children 5c1a025192ed
comparison
equal deleted inserted replaced
34462:dec52278add8 34463:4944acf6b46f
1 *builtin.txt* For Vim version 9.1. Last change: 2024 Feb 28 1 *builtin.txt* For Vim version 9.1. Last change: 2024 Mar 01
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
4279 See |getpos()| for the format of the list. 4279 See |getpos()| for the format of the list.
4280 4280
4281 The optional argument {opts} is a Dict and supports the 4281 The optional argument {opts} is a Dict and supports the
4282 following items: 4282 following items:
4283 4283
4284 type Specify the selection type 4284 type Specify the region's selection type
4285 (default: "v"): 4285 (default: "v"):
4286 "v" for |characterwise| mode 4286 "v" for |characterwise| mode
4287 "V" for |linewise| mode 4287 "V" for |linewise| mode
4288 "<CTRL-V>" for |blockwise-visual| mode 4288 "<CTRL-V>" for |blockwise-visual| mode
4289 4289
4290 exclusive If |true|, use exclusive selection 4290 exclusive If |TRUE|, use exclusive selection
4291 for the end position 'selection'. 4291 for the end position
4292 (default: follow 'selection')
4292 4293
4293 You can get the last selection type by |visualmode()|. 4294 You can get the last selection type by |visualmode()|.
4294 If Visual mode is active, use |mode()| to get the Visual mode 4295 If Visual mode is active, use |mode()| to get the Visual mode
4295 (e.g., in a |:vmap|). 4296 (e.g., in a |:vmap|).
4296 This function uses the line and column number from the 4297 This function is useful to get text starting and ending in
4297 specified position. 4298 different columns, such as a |characterwise-visual| selection.
4298 It is useful to get text starting and ending in different
4299 columns, such as |characterwise-visual| selection.
4300 4299
4301 Note that: 4300 Note that:
4302 - Order of {pos1} and {pos2} doesn't matter, it will always 4301 - Order of {pos1} and {pos2} doesn't matter, it will always
4303 return content from the upper left position to the lower 4302 return content from the upper left position to the lower
4304 right position. 4303 right position.
4305 - If 'virtualedit' is enabled and selection is past the end of 4304 - If 'virtualedit' is enabled and the region is past the end
4306 line, resulting lines are filled with blanks. 4305 of the lines, resulting lines are padded with spaces.
4307 - If the selection starts or ends in the middle of a multibyte 4306 - If the region is blockwise and it starts or ends in the
4308 character, it is not included but its selected part is 4307 middle of a multi-cell character, it is not included but
4309 substituted with spaces. 4308 its selected part is substituted with spaces.
4310 - If {pos1} or {pos2} is not current in the buffer, an empty 4309 - If {pos1} or {pos2} is not current in the buffer, an empty
4311 list is returned. 4310 list is returned.
4312 4311
4313 Examples: > 4312 Examples: >
4314 :xnoremap <CR> 4313 :xnoremap <CR>