diff --git a/doc/sign.jax b/doc/sign.jax index 6d50cff0f..8b5264383 100644 --- a/doc/sign.jax +++ b/doc/sign.jax @@ -1,4 +1,4 @@ -*sign.txt* For Vim バージョン 8.1. Last change: 2016 Aug 17 +*sign.txt* For Vim バージョン 8.1. Last change: 2018 Dec 26 VIMリファレンスマニュアル by Gordon Prieur @@ -47,6 +47,19 @@ Netbeansは|netbeans|を参照。 う|hl-SignColumn|が設定される。色を設定するには次のようにする: > :highlight SignColumn guibg=darkgrey +< + *sign-group* +各目印は、グローバルグループまたは名前付きグループのどちらにも割り当てることが +できる。目印を設置するときに、グループ名が指定されていない場合、または空の文字 +列が使用されている場合は、目印はグローバルグループに設置される。それ以外の場合 +は名前付きグループに設置される。目印の識別子はグループ内で一意である。グループ +を使うと、Vimプラグインは他のプラグインを妨害することなく独自の目印を使うこと +ができる。 + + *sign-priority* +設置された各目印には、優先順位値が割り当てられる。同じ行に複数の目印が設置され +ている場合、最も優先順位の高い目印の属性が目印のグループとは独立して使用され +る。デフォルトの優先順位は10である。優先順位は、目印の設置時に割り当てられる。 ============================================================================== 2. コマンド *sign-commands* *:sig* *:sign* @@ -65,6 +78,8 @@ Netbeansは|netbeans|を参照。 目印を定義する *:sign-define* *E255* *E160* *E612* +同等のVim script関数については |sign_define()| を参照。 + :sign define {name} {argument}... 新しい目印を定義するか既にある目印に属性を設定する。{name}は番 号(全て数字)か非数字で始まる名前である。先導数字は無視されるの @@ -103,13 +118,18 @@ Netbeansは|netbeans|を参照。 (定義した)目印を削除する *:sign-undefine* *E155* +同等のVim script関数については |sign_undefine()| を参照。 + :sign undefine {name} 既に定義された目印を削除する。{name}という名前の目印がまだ設置 されたままの場合はトラブルを引き起こす。 + (定義した)目印を一覧表示する *:sign-list* *E156* +同等のVim script関数については |sign_getdefined()| を参照。 + :sign list 全部の定義済み目印とその属性を一覧表示する。 :sign list {name} @@ -118,6 +138,8 @@ Netbeansは|netbeans|を参照。 目印を設置する *:sign-place* *E158* +同等のVim script関数については |sign_place()| を参照。 + :sign place {id} line={lnum} name={name} file={fname} {name}として定義された目印をファイル{fname}の{lnum}行目に設置 する。 @@ -134,9 +156,27 @@ Netbeansは|netbeans|を参照。 も同じ回数だけ行う必要がある。同じ{id}を使うことで目印の位置を 変更しようという試みはうまく行かない)。 + 次の任意の目印属性は、"file=" の前に指定できる: + group={group} 目印を目印グループ{group}に設置する + priority={prio} 目印に優先順位{prio}を割り当てる + + デフォルトでは、目印はグローバル目印グループに設置される。 + + デフォルトでは、目印にデフォルトの優先順位10が割り当てられてい + る。別の優先順位値を割り当てるには、"priority={prio}" を使用し + て値を指定する。優先順位は、複数の目印が同じ行に設置されている + ときに使用されるハイライトグループを決定するために使用される。 + + 例: > + :sign place 5 line=3 name=sign1 file=a.py + :sign place 6 group=g2 line=2 name=sign2 file=x.py + :sign place 9 group=g2 priority=50 line=5 + \ name=sign1 file=a.py +< :sign place {id} line={lnum} name={name} buffer={nr} 上に同じ。バッファ番号を使用していることが異なる。 + *E885* :sign place {id} name={name} file={fname} ファイル{fname}に{id}で設置された目印を、{name}で定義されてい る目印に変更する。{fname}については上述の|:sign-fname|を参照す @@ -144,46 +184,131 @@ Netbeansは|netbeans|を参照。 これは既に設置された目印を動かすことなく変更するのに使われる。 (例: デバッガがブレークポイントで停止した時) - *E885* + 任意の "group={group}" 属性を "file="の前に使用して、特定のグ + ループの目印を選択することができる。 + :sign place {id} name={name} buffer={nr} 上に同じ。バッファ番号を使用していることが異なる。 (設置した)目印を解除する *:sign-unplace* *E159* +同等のVim script関数については |sign_unplace()| を参照。 + :sign unplace {id} file={fname} ファイル{fname}に{id}で設置された目印を解除する。 {fname}については上述の|:sign-fname|を参照すること。 +:sign unplace {id} group={group} file={fname} + 上に同じだが、目印グループ{group}の目印{id}を解除する。 + +:sign unplace {id} group=* file={fname} + 上に同じだが、全ての目印グループから目印{id}を解除する。 + :sign unplace * file={fname} - ファイル{fname}に設置された目印をすべて解除する。 + ファイル{fname}に設置された目印を全て解除する。 + +:sign unplace * group={group} file={fname} + ファイル{fname}からグループ{group}に設置されている全ての目印を + 解除する。 + +:sign unplace * group=* file={fname} + ファイル{fname}から全てのグループに設置されている全ての目印を + 解除する。 :sign unplace {id} buffer={nr} バッファ{nr}に{id}で設置された目印を解除する。 +:sign unplace {id} group={group} buffer={nr} + バッファ{nr}からグループ{group}の以前に設置された目印{id}を解 + 除する。 + +:sign unplace {id} group=* buffer={nr} + バッファ{nr}から、全てのグループで以前に設置された目印{id}を解 + 除する。 + :sign unplace * buffer={nr} - バッファ{nr}に設置された目印をすべて解除する。 + バッファ{nr}に設置された目印を全て解除する。 + +:sign unplace * group={group} buffer={nr} + グループ{group}に設置されている全ての目印をバッファ{nr}から解 + 除する。 + +:sign unplace * group=* buffer={nr} + 全てのグループに設置されている全ての目印をバッファ{nr}から解除 + する。 :sign unplace {id} {id}で設置された目印を、全てのファイルから削除する。 +:sign unplace {id} group={group} + 表示されている全てのファイルから、グループ{group}の以前に設置 + された目印{id}を解除する。 + +:sign unplace {id} group=* + 表示されている全てのファイルから、全てのグループの以前に設置さ + れた目印{id}を解除する。 + :sign unplace * - 設置された全ての目印を解除する。 + 全てのファイルからグローバルグループの設置された全ての目印を解 + 除する。 + +:sign unplace * group={group} + 全てのファイルからグループ{group}の設置された全ての目印を解除 + する。 + +:sign unplace * group=* + 全てのファイルから全てのグループの設置された全ての目印を解除す + る。 :sign unplace - カーソル位置に設置されている目印を解除する。 + カーソル位置の設置された目印を解除する。複数の目印が行内に設置 + されている場合は、1つだけが削除される。 + +:sign unplace group={group} + カーソル位置のグループ{group}の設置された目印を解除する。 + +:sign unplace group=* + カーソル位置の全てのグループの設置された目印を解除する。 (設置した)目印を一覧表示する *:sign-place-list* +同等のVim script関数については |sign_getplaced()| を参照。 + :sign place file={fname} ファイル{fname}に設置されている目印を一覧表示する。 {fname}については上述の|:sign-fname|を参照すること。 +:sign place group={group} file={fname} + ファイル{fname}に設置されているグループ{group}の目印を一覧表示 + する。 + +:sign place group=* file={fname} + ファイル{fname}に設置されている全てのグループの目印を一覧表示 + する。 + :sign place buffer={nr} バッファ{nr}に設置されている目印を一覧表示する。 -:sign place 全てのファイルに設置されている全ての目印を一覧表示する。 +:sign place group={group} buffer={nr} + バッファ{nr}に設置されているグループ{group}の目印を一覧表示す + る。 + +:sign place group=* buffer={nr} + バッファ{nr}に設置されている全てのグループの目印を一覧表示す + る。 + +:sign place 全てのファイルに設置されているグローバルグループの目印を一覧表 + 示する。 + +:sign place group={group} + 全てのファイルの目印グループ{group}に設置されている目印を一覧 + 表示する。 + +:sign place group=* + 全てのファイルの全ての目印グループに設置されている目印を一覧表 + 示する。 (設置した)目印へ移動する *:sign-jump* *E157* @@ -195,7 +320,14 @@ Netbeansは|netbeans|を参照。 ファイルがウィンドウに表示されておらず、現在のファイルを放棄で きない時には、これは失敗する。 +:sign jump {id} group={group} file={fname} + 上に同じだが、グループ{group}の目印に移動する。 + :sign jump {id} buffer={nr} *E934* - 上に同じ。バッファ {nr} が名前を持っていない場合には失敗する。 + 上に同じだが、バッファ{nr}を使う。バッファ{nr}が名前を持ってい + ない場合には失敗する。 + +:sign jump {id} group={group} buffer={nr} + 上に同じだが、グループ{group}の目印に移動する。 vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/en/sign.txt b/en/sign.txt index bd63ea9ad..166c3a48b 100644 --- a/en/sign.txt +++ b/en/sign.txt @@ -1,4 +1,4 @@ -*sign.txt* For Vim version 8.1. Last change: 2016 Aug 17 +*sign.txt* For Vim version 8.1. Last change: 2018 Dec 26 VIM REFERENCE MANUAL by Gordon Prieur @@ -51,6 +51,20 @@ The color of the column is set with the SignColumn group |hl-SignColumn|. Example to set the color: > :highlight SignColumn guibg=darkgrey +< + *sign-group* +Each sign can be assigned to either the global group or a named group. When +placing a sign, if a group name is not supplied, or an empty string is used, +then the sign is placed in the global group. Otherwise the sign is placed in +the named group. The sign identifier is unique within a group. The sign group +allows Vim plugins to use unique signs without interfering with other plugins +using signs. + + *sign-priority* +Each placed sign is assigned a priority value. When multiple signs are placed +on the same line, the attributes of the sign with the highest priority is used +independent of the sign group. The default priority for a sign is 10. The +priority is assigned at the time of placing a sign. ============================================================================== 2. Commands *sign-commands* *:sig* *:sign* @@ -69,6 +83,8 @@ comment. If you do need that, use the |:execute| command. DEFINING A SIGN. *:sign-define* *E255* *E160* *E612* +See |sign_define()| for the equivalent Vim script function. + :sign define {name} {argument}... Define a new sign or set attributes for an existing sign. The {name} can either be a number (all digits) or a name @@ -106,13 +122,18 @@ DEFINING A SIGN. *:sign-define* *E255* *E160* *E612* DELETING A SIGN *:sign-undefine* *E155* +See |sign_undefine()| for the equivalent Vim script function. + :sign undefine {name} Deletes a previously defined sign. If signs with this {name} are still placed this will cause trouble. + LISTING SIGNS *:sign-list* *E156* +See |sign_getdefined()| for the equivalent Vim script function. + :sign list Lists all defined signs and their attributes. :sign list {name} @@ -121,6 +142,8 @@ LISTING SIGNS *:sign-list* *E156* PLACING SIGNS *:sign-place* *E158* +See |sign_place()| for the equivalent Vim script function. + :sign place {id} line={lnum} name={name} file={fname} Place sign defined as {name} at line {lnum} in file {fname}. *:sign-fname* @@ -136,6 +159,25 @@ PLACING SIGNS *:sign-place* *E158* to be done several times and making changes may not work as expected). + The following optional sign attributes can be specified before + "file=": + group={group} Place sign in sign group {group} + priority={prio} Assign priority {prio} to sign + + By default, the sign is placed in the global sign group. + + By default, the sign is assigned a default priority of 10. To + assign a different priority value, use "priority={prio}" to + specify a value. The priority is used to determine the + highlight group used when multiple signs are placed on the + same line. + + Examples: > + :sign place 5 line=3 name=sign1 file=a.py + :sign place 6 group=g2 line=2 name=sign2 file=x.py + :sign place 9 group=g2 priority=50 line=5 + \ name=sign1 file=a.py +< :sign place {id} line={lnum} name={name} buffer={nr} Same, but use buffer {nr}. @@ -146,46 +188,119 @@ PLACING SIGNS *:sign-place* *E158* This can be used to change the displayed sign without moving it (e.g., when the debugger has stopped at a breakpoint). + The optional "group={group}" attribute can be used before + "file=" to select a sign in a particular group. + :sign place {id} name={name} buffer={nr} Same, but use buffer {nr}. REMOVING SIGNS *:sign-unplace* *E159* +See |sign_unplace()| for the equivalent Vim script function. + :sign unplace {id} file={fname} Remove the previously placed sign {id} from file {fname}. See remark above about {fname} |:sign-fname|. +:sign unplace {id} group={group} file={fname} + Same but remove the sign {id} in sign group {group}. + +:sign unplace {id} group=* file={fname} + Same but remove the sign {id} from all the sign groups. + :sign unplace * file={fname} Remove all placed signs in file {fname}. +:sign unplace * group={group} file={fname} + Remove all placed signs in group {group} from file {fname}. + +:sign unplace * group=* file={fname} + Remove all placed signs in all the groups from file {fname}. + :sign unplace {id} buffer={nr} Remove the previously placed sign {id} from buffer {nr}. +:sign unplace {id} group={group} buffer={nr} + Remove the previously placed sign {id} in group {group} from + buffer {nr}. + +:sign unplace {id} group=* buffer={nr} + Remove the previously placed sign {id} in all the groups from + buffer {nr}. + :sign unplace * buffer={nr} Remove all placed signs in buffer {nr}. +:sign unplace * group={group} buffer={nr} + Remove all placed signs in group {group} from buffer {nr}. + +:sign unplace * group=* buffer={nr} + Remove all placed signs in all the groups from buffer {nr}. + :sign unplace {id} Remove the previously placed sign {id} from all files it appears in. +:sign unplace {id} group={group} + Remove the previously placed sign {id} in group {group} from + all files it appears in. + +:sign unplace {id} group=* + Remove the previously placed sign {id} in all the groups from + all the files it appears in. + :sign unplace * - Remove all placed signs. + Remove placed signs in the global group from all the files. + +:sign unplace * group={group} + Remove placed signs in group {group} from all the files. + +:sign unplace * group=* + Remove placed signs in all the groups from all the files. :sign unplace - Remove the placed sign at the cursor position. + Remove a placed sign at the cursor position. If multiple signs + are placed in the line, then only one is removed. + +:sign unplace group={group} + Remove a placed sign in group {group} at the cursor + position. + +:sign unplace group=* + Remove a placed sign in any group at the cursor position. LISTING PLACED SIGNS *:sign-place-list* +See |sign_getplaced()| for the equivalent Vim script function. + :sign place file={fname} List signs placed in file {fname}. See remark above about {fname} |:sign-fname|. +:sign place group={group} file={fname} + List signs in group {group} placed in file {fname}. + +:sign place group=* file={fname} + List signs in all the groups placed in file {fname}. + :sign place buffer={nr} List signs placed in buffer {nr}. -:sign place List placed signs in all files. +:sign place group={group} buffer={nr} + List signs in group {group} placed in buffer {nr}. + +:sign place group=* buffer={nr} + List signs in all the groups placed in buffer {nr}. + +:sign place List placed signs in the global group in all files. + +:sign place group={group} + List placed signs with sign group {group} in all files. + +:sign place group=* + List placed signs in all sign groups in all files. JUMPING TO A SIGN *:sign-jump* *E157* @@ -197,9 +312,15 @@ JUMPING TO A SIGN *:sign-jump* *E157* If the file isn't displayed in window and the current file can not be |abandon|ed this fails. +:sign jump {id} group={group} file={fname} + Same but jump to the sign in group {group} + :sign jump {id} buffer={nr} *E934* Same, but use buffer {nr}. This fails if buffer {nr} does not have a name. +:sign jump {id} group={group} buffer={nr} + Same but jump to the sign in group {group} + vim:tw=78:ts=8:noet:ft=help:norl: