Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions doc/builtin.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Dec 21
*builtin.txt* For Vim バージョン 9.1. Last change: 2026 Jan 03


VIM リファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -4827,6 +4827,10 @@ getpos({expr}) *getpos()*
桁番号は行内のバイト位置のリストとして返される。行内の文字での
位置を取得するなら、|getcharpos()| を使う。

ビジュアルマーク |'<| と |'>| は、バッファを基準とした視覚的な
選択範囲の開始と終了を表す。Note これはカーソル位置を基準とす
る |setpos()| とは異なることに注意。

Note: ビジュアルモードの '< と '> について: ビジュアルモードが
"V" (行選択モード) のとき、'< の桁番号はゼロ、'> の桁番号は大
きな値として |v:maxcol| と同値になる。
Expand Down Expand Up @@ -9933,8 +9937,13 @@ setpos({expr}, {list}) *setpos()*
は優先値は設定されない。マークの位置を設定するときに
"curswant" を指定した場合はその値は使用されない。

Note: '< と '> の行番号を変更した場合は '< が '> の手前にくる
ように位置が交換される。
Note |'<| と |'>| の場合、行番号を変更するとマークが実質的に入
れ替わり、|'<| が常に |'>| の前になることに注意。

ビジュアルマーク |'<| と |'>| は、カーソル位置を基準とした視覚
的な選択範囲の開始と終了を参照する。
Note これは、バッファを基準とする |getpos()| とは異なることに
注意。

位置をセットできたときは 0 を、そうでなければ -1 を返す。
{expr} が無効なときはエラーメッセージが出る。
Expand Down
18 changes: 14 additions & 4 deletions en/builtin.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.1. Last change: 2025 Dec 21
*builtin.txt* For Vim version 9.1. Last change: 2026 Jan 03


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -4879,6 +4879,11 @@ getpos({expr}) *getpos()*
within the line. To get the character position in the line,
use |getcharpos()|.

The visual marks |'<| and |'>| refer to the beginning and end
of the visual selection relative to the buffer. Note that
this differs from |setpos()|, where they are relative to the
cursor position.

Note that for '< and '> Visual mode matters: when it is "V"
(visual line mode) the column of '< is zero and the column of
'> is a large number equal to |v:maxcol|.
Expand Down Expand Up @@ -10152,9 +10157,14 @@ setpos({expr}, {list}) *setpos()*
preferred column is not set. When it is present and setting a
mark position it is not used.

Note that for '< and '> changing the line number may result in
the marks to be effectively be swapped, so that '< is always
before '>.
Note that for |'<| and |'>| changing the line number may
result in the marks to be effectively swapped, so that |'<| is
always before |'>|.

The visual marks |'<| and |'>| refer to the beginning and end
of the visual selection relative to the cursor position.
Note that this differs from |getpos()|, where they are
relative to the buffer.

Returns 0 when the position could be set, -1 otherwise.
An error message is given if {expr} is invalid.
Expand Down