1
0
forked from aniani/vim

patch 8.1.1986: more functions can be used as methods

Problem:    More functions can be used as methods.
Solution:   Make textprop functions usable as a method.
This commit is contained in:
Bram Moolenaar
2019-09-04 21:57:18 +02:00
parent 26262f8777
commit a5a7882ea4
4 changed files with 43 additions and 20 deletions

View File

@@ -1,4 +1,4 @@
*textprop.txt* For Vim version 8.1. Last change: 2019 Aug 25
*textprop.txt* For Vim version 8.1. Last change: 2019 Sep 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -157,6 +157,9 @@ prop_add({lnum}, {col}, {props})
See |text-properties| for information about text properties.
Can also be used as a |method|: >
GetLnum()->prop_add(col, props)
prop_clear({lnum} [, {lnum-end} [, {props}]]) *prop_clear()*
Remove all text properties from line {lnum}.
@@ -168,6 +171,9 @@ prop_clear({lnum} [, {lnum-end} [, {props}]]) *prop_clear()*
See |text-properties| for information about text properties.
Can also be used as a |method|: >
GetLnum()->prop_clear()
<
*prop_find()*
prop_find({props} [, {direction}])
{not implemented yet}
@@ -220,7 +226,9 @@ prop_list({lnum} [, {props}]) *prop_list()*
See |text-properties| for information about text properties.
Can also be used as a |method|: >
GetLnum()->prop_list()
<
*prop_remove()* *E968*
prop_remove({props} [, {lnum} [, {lnum-end}]])
Remove a matching text property from line {lnum}. When
@@ -243,6 +251,9 @@ prop_remove({props} [, {lnum} [, {lnum-end}]])
See |text-properties| for information about text properties.
Can also be used as a |method|: >
GetProps()->prop_remove()
prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970*
Add a text property type {name}. If a property type with this
@@ -267,6 +278,8 @@ prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970*
See |text-properties| for information about text properties.
Can also be used as a |method|: >
GetPropName()->prop_type_add(props)
prop_type_change({name}, {props}) *prop_type_change()*
Change properties of an existing text property type. If a
@@ -275,6 +288,8 @@ prop_type_change({name}, {props}) *prop_type_change()*
See |text-properties| for information about text properties.
Can also be used as a |method|: >
GetPropName()->prop_type_change(props)
prop_type_delete({name} [, {props}]) *prop_type_delete()*
Remove the text property type {name}. When text properties
@@ -289,6 +304,8 @@ prop_type_delete({name} [, {props}]) *prop_type_delete()*
See |text-properties| for information about text properties.
Can also be used as a |method|: >
GetPropName()->prop_type_delete()
prop_type_get([{name} [, {props}]) *prop_type_get()*
Returns the properties of property type {name}. This is a
@@ -302,6 +319,8 @@ prop_type_get([{name} [, {props}]) *prop_type_get()*
See |text-properties| for information about text properties.
Can also be used as a |method|: >
GetPropName()->prop_type_get()
prop_type_list([{props}]) *prop_type_list()*
Returns a list with all property type names.