comparison runtime/doc/textprop.txt @ 15334:9d3d7b0f4861

Update runtime files commit https://github.com/vim/vim/commit/4c05fa08c9739e307ddc88ac91ba6d208f1fd68e Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 1 15:32:17 2019 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Tue, 01 Jan 2019 15:45:06 +0100
parents 97b40b4c6911
children f0f06837a699
comparison
equal deleted inserted replaced
15333:37502e631202 15334:9d3d7b0f4861
1 *textprop.txt* For Vim version 8.1. Last change: 2018 Dec 27 1 *textprop.txt* For Vim version 8.1. Last change: 2018 Dec 30
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
68 68
69 Suppose line 11 in a buffer has this text (excluding the indent): 69 Suppose line 11 in a buffer has this text (excluding the indent):
70 70
71 The number 123 is smaller than 4567. 71 The number 123 is smaller than 4567.
72 72
73 To highlight the numbers: > 73 To highlight the numbers in this text: >
74 call prop_type_add('number', {'highlight': 'Constant'}) 74 call prop_type_add('number', {'highlight': 'Constant'})
75 call prop_add(11, 12, {'length': 3, 'type': 'number'}) 75 call prop_add(11, 12, {'length': 3, 'type': 'number'})
76 call prop_add(11, 32, {'length': 4, 'type': 'number'}) 76 call prop_add(11, 32, {'length': 4, 'type': 'number'})
77
78 Try inserting or deleting lines above the text, you will see that the text
79 properties stick to the text, thus the line number is adjusted as needed.
77 80
78 Setting "start_incl" and "end_incl" is useful when white space surrounds the 81 Setting "start_incl" and "end_incl" is useful when white space surrounds the
79 text, e.g. for a function name. Using false is useful when the text starts 82 text, e.g. for a function name. Using false is useful when the text starts
80 and/or ends with a specific character, such as the quote surrounding a string. 83 and/or ends with a specific character, such as the quote surrounding a string.
81 84