Skip to content

Update textprop.{txt,jax} #1573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2024
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
35 changes: 30 additions & 5 deletions doc/textprop.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*textprop.txt* For Vim バージョン 9.1. Last change: 2023 Apr 23
*textprop.txt* For Vim バージョン 9.1. Last change: 2024 Jun 08


VIMリファレンスマニュアル by Bram Moolenaar
Expand Down Expand Up @@ -117,6 +117,8 @@ prop_list({lnum} [, {props}]) 行番号{lnum}のテキストプロパティを
prop_remove({props} [, {lnum} [, {lnum-end}]])
テキストプロパティを削除

*text-prop-functions-details*

*prop_add()* *E965*
prop_add({lnum}, {col}, {props})
{lnum}行{col}桁の位置にテキストプロパティを付加する。{col}はバ
Expand Down Expand Up @@ -227,8 +229,10 @@ prop_add({lnum}, {col}, {props})
|method| としても使用できる: >
GetLnum()->prop_add(col, props)
<
*prop_add_list()*
prop_add_list({props}, [{item}, ...])
戻り値の型: |Number|


prop_add_list({props}, [{item}, ...]) *prop_add_list()*
prop_add() に似ているが、バッファ内の複数位置にテキストプロパ
ティが付加される。

Expand Down Expand Up @@ -281,8 +285,10 @@ prop_clear({lnum} [, {lnum-end} [, {props}]]) *prop_clear()*
|method| としても使用できる: >
GetLnum()->prop_clear()
<
*prop_find()*
prop_find({props} [, {direction}])
戻り値の型: |Number|


prop_find({props} [, {direction}]) *prop_find()*
{props}で指定されたテキストプロパティを検索する:
id プロパティID
type プロパティタイプ名
Expand All @@ -304,6 +310,8 @@ prop_find({props} [, {direction}])
"lnum" エントリを併せた辞書が返される。
一致するものが見つからなければ、空の辞書が返される。

戻り値の型: dict<any>


prop_list({lnum} [, {props}]) *prop_list()*
{lnum}行のすべてのテキストプロパティを持つリストを返す。
Expand Down Expand Up @@ -375,6 +383,7 @@ prop_list({lnum} [, {props}]) *prop_list()*
|method| としても使用できる: >
GetLnum()->prop_list()
<
戻り値の型: list<dict<any>> または list<any>

*prop_remove()* *E968* *E860*
prop_remove({props} [, {lnum} [, {lnum-end}]])
Expand Down Expand Up @@ -408,6 +417,8 @@ prop_remove({props} [, {lnum} [, {lnum-end}]])

|method| としても使用できる: >
GetProps()->prop_remove()
<
戻り値の型: |Number|


prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970*
Expand All @@ -433,6 +444,9 @@ prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970*

|method| としても使用できる: >
GetPropName()->prop_type_add(props)
<
戻り値の型: |Number|


prop_type_change({name}, {props}) *prop_type_change()*
既存のテキストプロパティタイプのプロパティを変更する。この名前
Expand All @@ -441,6 +455,9 @@ prop_type_change({name}, {props}) *prop_type_change()*

|method| としても使用できる: >
GetPropName()->prop_type_change(props)
<
戻り値の型: |Number|


prop_type_delete({name} [, {props}]) *prop_type_delete()*
テキストプロパティタイプ{name}を削除する。{name}型を使用するテ
Expand All @@ -456,6 +473,9 @@ prop_type_delete({name} [, {props}]) *prop_type_delete()*

|method| としても使用できる: >
GetPropName()->prop_type_delete()
<
戻り値の型: |Number|


prop_type_get({name} [, {props}]) *prop_type_get()*
プロパティタイプ{name}のプロパティを返す。これは、
Expand All @@ -468,13 +488,18 @@ prop_type_get({name} [, {props}]) *prop_type_get()*

|method| としても使用できる: >
GetPropName()->prop_type_get()
<
戻り値の型: dict<any>


prop_type_list([{props}]) *prop_type_list()*
すべてのプロパティタイプ名のリストを返す。

{props}には "bufnr" 項目を含めることができる。指定すると、グ
ローバルプロパティタイプの代わりにこのバッファを使用する。

戻り値の型: list<string> または list<any>


==============================================================================
3. テキストが変更された場合 *text-prop-changes*
Expand Down
36 changes: 31 additions & 5 deletions en/textprop.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*textprop.txt* For Vim version 9.1. Last change: 2023 Apr 23
*textprop.txt* For Vim version 9.1. Last change: 2024 Jun 08


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -118,6 +118,8 @@ prop_list({lnum} [, {props}]) text properties in {lnum}
prop_remove({props} [, {lnum} [, {lnum-end}]])
remove a text property

*text-prop-functions-details*

*prop_add()* *E965*
prop_add({lnum}, {col}, {props})
Attach a text property at position {lnum}, {col}. {col} is
Expand Down Expand Up @@ -234,8 +236,10 @@ prop_add({lnum}, {col}, {props})
Can also be used as a |method|: >
GetLnum()->prop_add(col, props)
<
*prop_add_list()*
prop_add_list({props}, [{item}, ...])
Return type: |Number|


prop_add_list({props}, [{item}, ...]) *prop_add_list()*
Similar to prop_add(), but attaches a text property at
multiple positions in a buffer.

Expand Down Expand Up @@ -284,8 +288,10 @@ prop_clear({lnum} [, {lnum-end} [, {props}]]) *prop_clear()*
Can also be used as a |method|: >
GetLnum()->prop_clear()
<
*prop_find()*
prop_find({props} [, {direction}])
Return type: |Number|


prop_find({props} [, {direction}]) *prop_find()*
Search for a text property as specified with {props}:
id property with this ID
type property with this type name
Expand All @@ -310,6 +316,8 @@ prop_find({props} [, {direction}])
as with prop_list(), and additionally an "lnum" entry.
If no match is found then an empty Dict is returned.

Return type: dict<any>


prop_list({lnum} [, {props}]) *prop_list()*
Returns a List with all the text properties in line {lnum}.
Expand Down Expand Up @@ -380,6 +388,8 @@ prop_list({lnum} [, {props}]) *prop_list()*
Can also be used as a |method|: >
GetLnum()->prop_list()
<
Return type: list<dict<any>> or list<any>

*prop_remove()* *E968* *E860*
prop_remove({props} [, {lnum} [, {lnum-end}]])
Remove a matching text property from line {lnum}. When
Expand Down Expand Up @@ -409,6 +419,8 @@ prop_remove({props} [, {lnum} [, {lnum-end}]])

Can also be used as a |method|: >
GetProps()->prop_remove()
<
Return type: |Number|


prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970*
Expand Down Expand Up @@ -436,6 +448,9 @@ prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970*

Can also be used as a |method|: >
GetPropName()->prop_type_add(props)
<
Return type: |Number|


prop_type_change({name}, {props}) *prop_type_change()*
Change properties of an existing text property type. If a
Expand All @@ -444,6 +459,9 @@ prop_type_change({name}, {props}) *prop_type_change()*

Can also be used as a |method|: >
GetPropName()->prop_type_change(props)
<
Return type: |Number|


prop_type_delete({name} [, {props}]) *prop_type_delete()*
Remove the text property type {name}. When text properties
Expand All @@ -458,6 +476,9 @@ prop_type_delete({name} [, {props}]) *prop_type_delete()*

Can also be used as a |method|: >
GetPropName()->prop_type_delete()
<
Return type: |Number|


prop_type_get({name} [, {props}]) *prop_type_get()*
Returns the properties of property type {name}. This is a
Expand All @@ -471,13 +492,18 @@ prop_type_get({name} [, {props}]) *prop_type_get()*

Can also be used as a |method|: >
GetPropName()->prop_type_get()
<
Return type: dict<any>


prop_type_list([{props}]) *prop_type_list()*
Returns a list with all property type names.

{props} can contain a "bufnr" item. When it is given, use
this buffer instead of the global property types.

Return type: list<string> or list<any>


==============================================================================
3. When text changes *text-prop-changes*
Expand Down