|
1 | | -*builtin.txt* For Vim version 9.1. Last change: 2025 Dec 21 |
| 1 | +*builtin.txt* For Vim version 9.1. Last change: 2026 Jan 03 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -4879,6 +4879,11 @@ getpos({expr}) *getpos()* |
4879 | 4879 | within the line. To get the character position in the line, |
4880 | 4880 | use |getcharpos()|. |
4881 | 4881 |
|
| 4882 | + The visual marks |'<| and |'>| refer to the beginning and end |
| 4883 | + of the visual selection relative to the buffer. Note that |
| 4884 | + this differs from |setpos()|, where they are relative to the |
| 4885 | + cursor position. |
| 4886 | + |
4882 | 4887 | Note that for '< and '> Visual mode matters: when it is "V" |
4883 | 4888 | (visual line mode) the column of '< is zero and the column of |
4884 | 4889 | '> is a large number equal to |v:maxcol|. |
@@ -10152,9 +10157,14 @@ setpos({expr}, {list}) *setpos()* |
10152 | 10157 | preferred column is not set. When it is present and setting a |
10153 | 10158 | mark position it is not used. |
10154 | 10159 |
|
10155 | | - Note that for '< and '> changing the line number may result in |
10156 | | - the marks to be effectively be swapped, so that '< is always |
10157 | | - before '>. |
| 10160 | + Note that for |'<| and |'>| changing the line number may |
| 10161 | + result in the marks to be effectively swapped, so that |'<| is |
| 10162 | + always before |'>|. |
| 10163 | + |
| 10164 | + The visual marks |'<| and |'>| refer to the beginning and end |
| 10165 | + of the visual selection relative to the cursor position. |
| 10166 | + Note that this differs from |getpos()|, where they are |
| 10167 | + relative to the buffer. |
10158 | 10168 |
|
10159 | 10169 | Returns 0 when the position could be set, -1 otherwise. |
10160 | 10170 | An error message is given if {expr} is invalid. |
|
0 commit comments