-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathddc-buffer.txt
114 lines (84 loc) · 3.17 KB
/
ddc-buffer.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
*ddc-buffer.txt* buffer source for ddc.vim
Author: matsui54 <haru.matu9168 at gmail.com>
License: MIT license
CONTENTS *ddc-buffer-contents*
Introduction |ddc-buffer-introduction|
Install |ddc-buffer-install|
Examples |ddc-buffer-examples|
Params |ddc-buffer-params|
==============================================================================
INTRODUCTION *ddc-buffer-introduction*
This source collects keywords from current buffer, buffers whose window is in
the same tabpage and buffers which has the same filetype.
==============================================================================
INSTALL *ddc-buffer-install*
Please install both "ddc.vim" and "denops.vim".
https://github.com/Shougo/ddc.vim
https://github.com/vim-denops/denops.vim
==============================================================================
EXAMPLES *ddc-buffer-examples*
>
call ddc#custom#patch_global('sources', ['buffer'])
call ddc#custom#patch_global('sourceOptions', {
\ '_': {'matchers': ['matcher_head']},
\ 'buffer': {'mark': 'B'},
\ })
call ddc#custom#patch_global('sourceParams', {
\ 'buffer': {'requireSameFiletype': v:false},
\ })
<
==============================================================================
PARAMS *ddc-buffer-params*
*ddc-buffer-param-requireSameFiletype*
requireSameFiletype (boolean)
If it is false, keywords from all listed buffers are
collected. If true, buffers which has the same filetype as the
current buffer are used.
Default: v:true
*ddc-buffer-param-limitBytes*
limitBytes (number)
If the byte size of buffer exceeds this number, keywords from
it are not collected.
Default: 1000000
*ddc-buffer-param-fromAltBuf*
fromAltBuf (boolean)
If it is true, keywords from alternate buffer are collected.
Default: v:false
*ddc-buffer-param-forceCollect*
forceCollect (boolean)
If it is true, keywords from all buffers in the current
tabpage are collected regardless of buffer size when this
source is loaded. If you want to ensure that keywords are
always collected on initialization of ddc, enable this
feature.
Default: v:false
*ddc-buffer-param-showBufName*
showBufName (boolean)
**DEPRECATED**
Please use |ddc-buffer-param-bufNameStyle| instead.
If it is true, buffer name from which the word is collected is
shown in menu.
If the buffer name is too long, you can truncate it using
"ddc-converter_truncate"
https://github.com/matsui54/ddc-converter_truncate
Example:
>
call ddc#custom#patch_global('sourceOptions', {
\ 'buffer': {'converters': ['converter_truncate']},
\ })
call ddc#custom#patch_global('filterParams', {
\ 'converter_truncate': {'maxMenuWidth': 25},
\ })
<
Default: v:false
*ddc-buffer-param-bufNameStyle*
bufNameStyle (string)
Style of the buffer name style shown in menu.
The following items are available.
"none": empty string
"full": full buffer name
"basename": only basename of the file.
ex: /home/user/test.ts => /test.ts
Default: none
==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet:fen:noet: