Skip to content

Commit c5219ac

Browse files
committed
up builtin.vim
1 parent ba70641 commit c5219ac

File tree

3 files changed

+39
-5
lines changed

3 files changed

+39
-5
lines changed

autoload/vimlint/builtin.vim

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ let s:builtin_func.byteidx = {'min' : 2, 'max': 2}
3636
let s:builtin_func.byteidxcomp = {'min' : 2, 'max': 2}
3737
let s:builtin_func.call = {'min' : 2, 'max': 3}
3838
let s:builtin_func.ceil = {'min' : 1, 'max': 1}
39+
let s:builtin_func.ch_close = {'min' : 1, 'max': 1}
40+
let s:builtin_func.ch_logfile = {'min' : 1, 'max': 2}
41+
let s:builtin_func.ch_open = {'min' : 1, 'max': 2}
42+
let s:builtin_func.ch_readraw = {'min' : 1, 'max': 1}
43+
let s:builtin_func.ch_sendexpr = {'min' : 2, 'max': 3}
44+
let s:builtin_func.ch_sendraw = {'min' : 2, 'max': 3}
45+
let s:builtin_func.ch_status = {'min' : 1, 'max': 1}
3946
let s:builtin_func.changenr = {'min' : 0, 'max': 0}
4047
let s:builtin_func.char2nr = {'min' : 1, 'max': 2}
4148
let s:builtin_func.cindent = {'min' : 1, 'max': 1}
@@ -56,6 +63,7 @@ let s:builtin_func.delete = {'min' : 1, 'max': 2}
5663
let s:builtin_func.did_filetype = {'min' : 0, 'max': 0}
5764
let s:builtin_func.diff_filler = {'min' : 1, 'max': 1}
5865
let s:builtin_func.diff_hlID = {'min' : 2, 'max': 2}
66+
let s:builtin_func.disable_char_avail_for_testing = {'min' : 1, 'max': 1}
5967
let s:builtin_func.empty = {'min' : 1, 'max': 1}
6068
let s:builtin_func.escape = {'min' : 2, 'max': 2}
6169
let s:builtin_func.eval = {'min' : 1, 'max': 1}
@@ -143,7 +151,15 @@ let s:builtin_func.invert = {'min' : 1, 'max': 1}
143151
let s:builtin_func.isdirectory = {'min' : 1, 'max': 1}
144152
let s:builtin_func.islocked = {'min' : 1, 'max': 1}
145153
let s:builtin_func.items = {'min' : 1, 'max': 1}
154+
let s:builtin_func.job_getchannel = {'min' : 1, 'max': 1}
155+
let s:builtin_func.job_start = {'min' : 1, 'max': 2}
156+
let s:builtin_func.job_status = {'min' : 1, 'max': 1}
157+
let s:builtin_func.job_stop = {'min' : 1, 'max': 2}
146158
let s:builtin_func.join = {'min' : 1, 'max': 2}
159+
let s:builtin_func.js_decode = {'min' : 1, 'max': 1}
160+
let s:builtin_func.js_encode = {'min' : 1, 'max': 1}
161+
let s:builtin_func.json_decode = {'min' : 1, 'max': 1}
162+
let s:builtin_func.json_encode = {'min' : 1, 'max': 1}
147163
let s:builtin_func.keys = {'min' : 1, 'max': 1}
148164
let s:builtin_func.len = {'min' : 1, 'max': 1}
149165
let s:builtin_func.libcall = {'min' : 3, 'max': 3}
@@ -159,8 +175,8 @@ let s:builtin_func.map = {'min' : 2, 'max': 2}
159175
let s:builtin_func.maparg = {'min' : 1, 'max': 4}
160176
let s:builtin_func.mapcheck = {'min' : 1, 'max': 3}
161177
let s:builtin_func.match = {'min' : 2, 'max': 4}
162-
let s:builtin_func.matchadd = {'min' : 2, 'max': 4}
163-
let s:builtin_func.matchaddpos = {'min' : 2, 'max': 4}
178+
let s:builtin_func.matchadd = {'min' : 2, 'max': 5}
179+
let s:builtin_func.matchaddpos = {'min' : 2, 'max': 5}
164180
let s:builtin_func.matcharg = {'min' : 1, 'max': 1}
165181
let s:builtin_func.matchdelete = {'min' : 1, 'max': 1}
166182
let s:builtin_func.matchend = {'min' : 2, 'max': 4}

resource/builtin-func

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ byteidxcomp( {expr}, {nr}) Number byte index of {nr}'th char in {expr}
3535
call( {func}, {arglist} [, {dict}])
3636
any call {func} with arguments {arglist}
3737
ceil( {expr}) Float round {expr} up
38+
ch_close( {handle}) none close a channel
39+
ch_logfile( {fname} [, {mode}]) none start logging channel activity
40+
ch_open( {address} [, {argdict})] Number open a channel to {address}
41+
ch_readraw( {handle}) String read from channel {handle}
42+
ch_sendexpr( {handle}, {expr} [, {options}])
43+
any send {expr} over JSON channel {handle}
44+
ch_sendraw( {handle}, {string} [, {options}])
45+
any send {string} over raw channel {handle}
46+
ch_status( {handle}) String status of channel {handle}
3847
changenr() Number current change number
3948
char2nr( {expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
4049
cindent( {lnum}) Number C indent for line {lnum}
@@ -60,6 +69,7 @@ delete( {fname} [, {flags}]) Number delete the file or directory {fname}
6069
did_filetype() Number TRUE if FileType autocommand event used
6170
diff_filler( {lnum}) Number diff filler lines about {lnum}
6271
diff_hlID( {lnum}, {col}) Number diff highlighting at {lnum}/{col}
72+
disable_char_avail_for_testing({expr}) none test without typeahead
6373
empty( {expr}) Number TRUE if {expr} is empty
6474
escape( {string}, {chars}) String escape {chars} in {string} with '\'
6575
eval( {string}) any evaluate {string} into its value
@@ -166,7 +176,15 @@ invert( {expr}) Number bitwise invert
166176
isdirectory( {directory}) Number TRUE if {directory} is a directory
167177
islocked( {expr}) Number TRUE if {expr} is locked
168178
items( {dict}) List key-value pairs in {dict}
179+
job_getchannel( {job}) Number get the channel handle for {job}
180+
job_start( {command} [, {options}]) Job start a job
181+
job_status( {job}) String get the status of a job
182+
job_stop( {job} [, {how}]) Number stop a job
169183
join( {list} [, {sep}]) String join {list} items into one String
184+
js_decode( {string}) any decode JS style JSON
185+
js_encode( {expr}) String encode JS style JSON
186+
json_decode( {string}) any decode JSON
187+
json_encode( {expr}) String encode JSON
170188
keys( {dict}) List keys in {dict}
171189
len( {expr}) Number the length of {expr}
172190
libcall( {lib}, {func}, {arg}) String call {func} in library {lib} with {arg}
@@ -186,9 +204,9 @@ mapcheck( {name}[, {mode} [, {abbr}]])
186204
String check for mappings matching {name}
187205
match( {expr}, {pat}[, {start}[, {count}]])
188206
Number position where {pat} matches in {expr}
189-
matchadd( {group}, {pattern}[, {priority}[, {id}]])
207+
matchadd( {group}, {pattern}[, {priority}[, {id} [, {dict}]]])
190208
Number highlight {pattern} with {group}
191-
matchaddpos( {group}, {list}[, {priority}[, {id}]])
209+
matchaddpos( {group}, {pos}[, {priority}[, {id}[, {dict}]]])
192210
Number highlight positions with {group}
193211
matcharg( {nr}) List arguments of |:match|
194212
matchdelete( {id}) Number delete match identified by {id}

resource/conv_bf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# :h functions
44
# の関数リストから辞書を構築する
55
#
6-
#
6+
# 0) https://raw.githubusercontent.com/vim/vim/master/runtime/doc/eval.txt
77
# 1) copy the `:h functions` to resource/builtin-func
88
# 2) do conv_by.py and output to autoload/vimlint/builtin.vim
99
###########################

0 commit comments

Comments
 (0)