mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #4505 from watiko/vim-runtimes
vim-patch:86ae720,f913281,dd1616e
This commit is contained in:
commit
1bf1ffc734
@ -3,7 +3,7 @@
|
|||||||
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
|
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
|
||||||
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||||
" URL: https://github.com/shawncplus/phpcomplete.vim
|
" URL: https://github.com/shawncplus/phpcomplete.vim
|
||||||
" Last Change: 2015 Apr 02
|
" Last Change: 2015 Jul 13
|
||||||
"
|
"
|
||||||
" OPTIONS:
|
" OPTIONS:
|
||||||
"
|
"
|
||||||
@ -318,7 +318,7 @@ function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
|
|||||||
\ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
|
\ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
|
||||||
if f_name =~? '^'.substitute(a:base, '\\', '\\\\', 'g')
|
if f_name =~? '^'.substitute(a:base, '\\', '\\\\', 'g')
|
||||||
let f_args = matchstr(i,
|
let f_args = matchstr(i,
|
||||||
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\({\|$\)')
|
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\(;\|{\|$\)')
|
||||||
let int_functions[f_name.'('] = f_args.')'
|
let int_functions[f_name.'('] = f_args.')'
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
@ -646,7 +646,7 @@ function! phpcomplete#CompleteUnknownClass(base, context) " {{{
|
|||||||
let f_name = matchstr(i,
|
let f_name = matchstr(i,
|
||||||
\ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
|
\ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
|
||||||
let f_args = matchstr(i,
|
let f_args = matchstr(i,
|
||||||
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\({\|$\)')
|
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\(;\|{\|$\)')
|
||||||
|
|
||||||
let int_functions[f_name.'('] = f_args.')'
|
let int_functions[f_name.'('] = f_args.')'
|
||||||
endfor
|
endfor
|
||||||
@ -981,7 +981,7 @@ function! phpcomplete#CompleteUserClass(context, base, sccontent, visibility) "
|
|||||||
let f_name = matchstr(i,
|
let f_name = matchstr(i,
|
||||||
\ 'function\s*&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
|
\ 'function\s*&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
|
||||||
let f_args = matchstr(i,
|
let f_args = matchstr(i,
|
||||||
\ 'function\s*&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\({\|\_$\)')
|
\ 'function\s*&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\(;\|{\|\_$\)')
|
||||||
if f_name != '' && stridx(f_name, '__') != 0
|
if f_name != '' && stridx(f_name, '__') != 0
|
||||||
let c_functions[f_name.'('] = f_args
|
let c_functions[f_name.'('] = f_args
|
||||||
if g:phpcomplete_parse_docblock_comments
|
if g:phpcomplete_parse_docblock_comments
|
||||||
@ -1379,8 +1379,8 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
|
|||||||
" Get Structured information of all classes and subclasses including namespace and includes
|
" Get Structured information of all classes and subclasses including namespace and includes
|
||||||
" try to find the method's return type in docblock comment
|
" try to find the method's return type in docblock comment
|
||||||
for classstructure in classcontents
|
for classstructure in classcontents
|
||||||
let doclock_target_pattern = 'function\s\+&\?'.method.'\|\(public\|private\|protected\|var\).\+\$'.method
|
let docblock_target_pattern = 'function\s\+&\?'.method.'\|\(public\|private\|protected\|var\).\+\$'.method
|
||||||
let doc_str = phpcomplete#GetDocBlock(split(classstructure.content, '\n'), doclock_target_pattern)
|
let doc_str = phpcomplete#GetDocBlock(split(classstructure.content, '\n'), docblock_target_pattern)
|
||||||
if doc_str != ''
|
if doc_str != ''
|
||||||
break
|
break
|
||||||
endif
|
endif
|
||||||
@ -1659,7 +1659,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
|||||||
|
|
||||||
" function declaration line
|
" function declaration line
|
||||||
if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*('
|
if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*('
|
||||||
let function_lines = join(reverse(lines), " ")
|
let function_lines = join(reverse(copy(lines)), " ")
|
||||||
" search for type hinted arguments
|
" search for type hinted arguments
|
||||||
if function_lines =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.class_name_pattern.'\s\+'.object && !object_is_array
|
if function_lines =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.class_name_pattern.'\s\+'.object && !object_is_array
|
||||||
let f_args = matchstr(function_lines, '\cfunction\(\s\+'.function_name_pattern.'\)\?\s*(\zs.\{-}\ze)')
|
let f_args = matchstr(function_lines, '\cfunction\(\s\+'.function_name_pattern.'\)\?\s*(\zs.\{-}\ze)')
|
||||||
@ -1700,10 +1700,12 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
|||||||
|
|
||||||
" try to find the next non-comment or string ";" char
|
" try to find the next non-comment or string ";" char
|
||||||
let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s\+\(clone\)\?\s*'.variable_name_pattern)
|
let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s\+\(clone\)\?\s*'.variable_name_pattern)
|
||||||
let filelines = reverse(lines)
|
let filelines = reverse(copy(lines))
|
||||||
let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
|
let [pos, char] = s:getNextCharWithPos(filelines, [len(filelines) - i, start_col])
|
||||||
let chars_read = 1
|
let chars_read = 1
|
||||||
let last_pos = pos
|
let last_pos = pos
|
||||||
|
" function_boundary == 0 if we are not in a function
|
||||||
|
let real_lines_offset = len(function_boundary) == 1 ? 1 : function_boundary[0][0]
|
||||||
" read while end of the file
|
" read while end of the file
|
||||||
while char != 'EOF' && chars_read < 1000
|
while char != 'EOF' && chars_read < 1000
|
||||||
let last_pos = pos
|
let last_pos = pos
|
||||||
@ -1711,7 +1713,11 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
|||||||
let chars_read += 1
|
let chars_read += 1
|
||||||
" we got a candidate
|
" we got a candidate
|
||||||
if char == ';'
|
if char == ';'
|
||||||
let synIDName = synIDattr(synID(pos[0] + 1, pos[1] + 1, 0), 'name')
|
" pos values is relative to the function's lines,
|
||||||
|
" line 0 need to be offsetted with the line number
|
||||||
|
" where te function was started to get the line number
|
||||||
|
" in real buffer terms
|
||||||
|
let synIDName = synIDattr(synID(real_lines_offset + pos[0], pos[1] + 1, 0), 'name')
|
||||||
" it's not a comment or string, end search
|
" it's not a comment or string, end search
|
||||||
if synIDName !~? 'comment\|string'
|
if synIDName !~? 'comment\|string'
|
||||||
break
|
break
|
||||||
@ -1719,7 +1725,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
|||||||
endif
|
endif
|
||||||
endwhile
|
endwhile
|
||||||
|
|
||||||
let prev_context = phpcomplete#GetCurrentInstruction(last_pos[0] + 1, last_pos[1], b:phpbegin)
|
let prev_context = phpcomplete#GetCurrentInstruction(real_lines_offset + last_pos[0], last_pos[1], b:phpbegin)
|
||||||
if prev_context == ''
|
if prev_context == ''
|
||||||
" cannot get previous context give up
|
" cannot get previous context give up
|
||||||
return
|
return
|
||||||
@ -1739,13 +1745,14 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
|||||||
|
|
||||||
" assignment for the variable in question with a function on the right hand side
|
" assignment for the variable in question with a function on the right hand side
|
||||||
if line =~# '^\s*'.object.'\s*=&\?\s*'.function_invocation_pattern
|
if line =~# '^\s*'.object.'\s*=&\?\s*'.function_invocation_pattern
|
||||||
|
|
||||||
" try to find the next non-comment or string ";" char
|
" try to find the next non-comment or string ";" char
|
||||||
let start_col = match(line, '\C^\s*'.object.'\s*=\zs&\?\s*'.function_invocation_pattern)
|
let start_col = match(line, '\C^\s*'.object.'\s*=\zs&\?\s*'.function_invocation_pattern)
|
||||||
let filelines = reverse(lines)
|
let filelines = reverse(copy(lines))
|
||||||
let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
|
let [pos, char] = s:getNextCharWithPos(filelines, [len(filelines) - i, start_col])
|
||||||
let chars_read = 1
|
let chars_read = 1
|
||||||
let last_pos = pos
|
let last_pos = pos
|
||||||
|
" function_boundary == 0 if we are not in a function
|
||||||
|
let real_lines_offset = len(function_boundary) == 1 ? 1 : function_boundary[0][0]
|
||||||
" read while end of the file
|
" read while end of the file
|
||||||
while char != 'EOF' && chars_read < 1000
|
while char != 'EOF' && chars_read < 1000
|
||||||
let last_pos = pos
|
let last_pos = pos
|
||||||
@ -1753,7 +1760,11 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
|||||||
let chars_read += 1
|
let chars_read += 1
|
||||||
" we got a candidate
|
" we got a candidate
|
||||||
if char == ';'
|
if char == ';'
|
||||||
let synIDName = synIDattr(synID(pos[0] + 1, pos[1] + 1, 0), 'name')
|
" pos values is relative to the function's lines,
|
||||||
|
" line 0 need to be offsetted with the line number
|
||||||
|
" where te function was started to get the line number
|
||||||
|
" in real buffer terms
|
||||||
|
let synIDName = synIDattr(synID(real_lines_offset + pos[0], pos[1] + 1, 0), 'name')
|
||||||
" it's not a comment or string, end search
|
" it's not a comment or string, end search
|
||||||
if synIDName !~? 'comment\|string'
|
if synIDName !~? 'comment\|string'
|
||||||
break
|
break
|
||||||
@ -1761,7 +1772,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
|
|||||||
endif
|
endif
|
||||||
endwhile
|
endwhile
|
||||||
|
|
||||||
let prev_context = phpcomplete#GetCurrentInstruction(last_pos[0] + 1, last_pos[1], b:phpbegin)
|
let prev_context = phpcomplete#GetCurrentInstruction(real_lines_offset + last_pos[0], last_pos[1], b:phpbegin)
|
||||||
if prev_context == ''
|
if prev_context == ''
|
||||||
" cannot get previous context give up
|
" cannot get previous context give up
|
||||||
return
|
return
|
||||||
@ -1864,6 +1875,9 @@ function! phpcomplete#GetClassLocation(classname, namespace) " {{{
|
|||||||
if has_key(g:php_builtin_classes, tolower(a:classname)) && (a:namespace == '' || a:namespace == '\')
|
if has_key(g:php_builtin_classes, tolower(a:classname)) && (a:namespace == '' || a:namespace == '\')
|
||||||
return 'VIMPHP_BUILTINOBJECT'
|
return 'VIMPHP_BUILTINOBJECT'
|
||||||
endif
|
endif
|
||||||
|
if has_key(g:php_builtin_interfaces, tolower(a:classname)) && (a:namespace == '' || a:namespace == '\')
|
||||||
|
return 'VIMPHP_BUILTINOBJECT'
|
||||||
|
endif
|
||||||
|
|
||||||
if a:namespace == '' || a:namespace == '\'
|
if a:namespace == '' || a:namespace == '\'
|
||||||
let search_namespace = '\'
|
let search_namespace = '\'
|
||||||
@ -1876,7 +1890,7 @@ function! phpcomplete#GetClassLocation(classname, namespace) " {{{
|
|||||||
let i = 1
|
let i = 1
|
||||||
while i < line('.')
|
while i < line('.')
|
||||||
let line = getline(line('.')-i)
|
let line = getline(line('.')-i)
|
||||||
if line =~? '^\s*\(abstract\s\+\|final\s\+\)*\s*\(class\|interface\|trait\)\s*'.a:classname.'\(\s\+\|$\)' && tolower(current_namespace) == search_namespace
|
if line =~? '^\s*\(abstract\s\+\|final\s\+\)*\s*\(class\|interface\|trait\)\s*'.a:classname.'\(\s\+\|$\|{\)' && tolower(current_namespace) == search_namespace
|
||||||
return expand('%:p')
|
return expand('%:p')
|
||||||
else
|
else
|
||||||
let i += 1
|
let i += 1
|
||||||
@ -2048,9 +2062,18 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
|||||||
let content = join(getline(cfline, endline), "\n")
|
let content = join(getline(cfline, endline), "\n")
|
||||||
" Catch extends
|
" Catch extends
|
||||||
if content =~? 'extends'
|
if content =~? 'extends'
|
||||||
let extends_class = matchstr(content, 'class\_s\+'.a:class_name.'\_s\+extends\_s\+\zs'.class_name_pattern.'\ze')
|
let extends_string = matchstr(content, '\(class\|interface\)\_s\+'.a:class_name.'\_.\+extends\_s\+\zs\('.class_name_pattern.'\(,\|\_s\)*\)\+\ze\(extends\|{\)')
|
||||||
|
let extended_classes = map(split(extends_string, '\(,\|\_s\)\+'), 'substitute(v:val, "\\_s\\+", "", "g")')
|
||||||
else
|
else
|
||||||
let extends_class = ''
|
let extended_classes = ''
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Catch implements
|
||||||
|
if content =~? 'implements'
|
||||||
|
let implements_string = matchstr(content, 'class\_s\+'.a:class_name.'\_.\+implements\_s\+\zs\('.class_name_pattern.'\(,\|\_s\)*\)\+\ze')
|
||||||
|
let implemented_interfaces = map(split(implements_string, '\(,\|\_s\)\+'), 'substitute(v:val, "\\_s\\+", "", "g")')
|
||||||
|
else
|
||||||
|
let implemented_interfaces = []
|
||||||
endif
|
endif
|
||||||
call searchpair('{', '', '}', 'W')
|
call searchpair('{', '', '}', 'W')
|
||||||
let class_closing_bracket_line = line('.')
|
let class_closing_bracket_line = line('.')
|
||||||
@ -2108,8 +2131,11 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
|||||||
\ })
|
\ })
|
||||||
|
|
||||||
let all_extends = used_traits
|
let all_extends = used_traits
|
||||||
if extends_class != ''
|
if len(extended_classes) > 0
|
||||||
call add(all_extends, extends_class)
|
call extend(all_extends, extended_classes)
|
||||||
|
endif
|
||||||
|
if len(implemented_interfaces) > 0
|
||||||
|
call extend(all_extends, implemented_interfaces)
|
||||||
endif
|
endif
|
||||||
if len(all_extends) > 0
|
if len(all_extends) > 0
|
||||||
for class in all_extends
|
for class in all_extends
|
||||||
@ -2119,11 +2145,16 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
|||||||
endif
|
endif
|
||||||
let classlocation = phpcomplete#GetClassLocation(class, namespace)
|
let classlocation = phpcomplete#GetClassLocation(class, namespace)
|
||||||
if classlocation == "VIMPHP_BUILTINOBJECT"
|
if classlocation == "VIMPHP_BUILTINOBJECT"
|
||||||
let result += [phpcomplete#GenerateBuiltinClassStub(g:php_builtin_classes[tolower(class)])]
|
if has_key(g:php_builtin_classes, tolower(class))
|
||||||
|
let result += [phpcomplete#GenerateBuiltinClassStub('class', g:php_builtin_classes[tolower(class)])]
|
||||||
|
endif
|
||||||
|
if has_key(g:php_builtin_interfaces, tolower(class))
|
||||||
|
let result += [phpcomplete#GenerateBuiltinClassStub('interface', g:php_builtin_interfaces[tolower(class)])]
|
||||||
|
endif
|
||||||
elseif classlocation != '' && filereadable(classlocation)
|
elseif classlocation != '' && filereadable(classlocation)
|
||||||
let full_file_path = fnamemodify(classlocation, ':p')
|
let full_file_path = fnamemodify(classlocation, ':p')
|
||||||
let result += phpcomplete#GetClassContentsStructure(full_file_path, readfile(full_file_path), class)
|
let result += phpcomplete#GetClassContentsStructure(full_file_path, readfile(full_file_path), class)
|
||||||
elseif tolower(current_namespace) == tolower(namespace)
|
elseif tolower(current_namespace) == tolower(namespace) && match(join(a:file_lines, "\n"), '\c\(class\|interface\|trait\)\_s\+'.class.'\(\>\|$\)') != -1
|
||||||
" try to find the declaration in the same file.
|
" try to find the declaration in the same file.
|
||||||
let result += phpcomplete#GetClassContentsStructure(full_file_path, a:file_lines, class)
|
let result += phpcomplete#GetClassContentsStructure(full_file_path, a:file_lines, class)
|
||||||
endif
|
endif
|
||||||
@ -2144,43 +2175,53 @@ function! phpcomplete#GetClassContents(classlocation, class_name) " {{{
|
|||||||
endfunction
|
endfunction
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
function! phpcomplete#GenerateBuiltinClassStub(class_info) " {{{
|
function! phpcomplete#GenerateBuiltinClassStub(type, class_info) " {{{
|
||||||
let re = 'class '.a:class_info['name']." {"
|
let re = a:type.' '.a:class_info['name']." {"
|
||||||
for [name, initializer] in items(a:class_info.constants)
|
if has_key(a:class_info, 'constants')
|
||||||
let re .= "\n\tconst ".name." = ".initializer.";"
|
for [name, initializer] in items(a:class_info.constants)
|
||||||
endfor
|
let re .= "\n\tconst ".name." = ".initializer.";"
|
||||||
for [name, info] in items(a:class_info.properties)
|
endfor
|
||||||
let re .= "\n\t// @var $".name." ".info.type
|
endif
|
||||||
let re .= "\n\tpublic $".name.";"
|
if has_key(a:class_info, 'properties')
|
||||||
endfor
|
for [name, info] in items(a:class_info.properties)
|
||||||
for [name, info] in items(a:class_info.static_properties)
|
let re .= "\n\t// @var $".name." ".info.type
|
||||||
let re .= "\n\t// @var ".name." ".info.type
|
let re .= "\n\tpublic $".name.";"
|
||||||
let re .= "\n\tpublic static ".name." = ".info.initializer.";"
|
endfor
|
||||||
endfor
|
endif
|
||||||
for [name, info] in items(a:class_info.methods)
|
if has_key(a:class_info, 'static_properties')
|
||||||
if name =~ '^__'
|
for [name, info] in items(a:class_info.static_properties)
|
||||||
continue
|
let re .= "\n\t// @var ".name." ".info.type
|
||||||
endif
|
let re .= "\n\tpublic static ".name." = ".info.initializer.";"
|
||||||
let re .= "\n\t/**"
|
endfor
|
||||||
let re .= "\n\t * ".name
|
endif
|
||||||
let re .= "\n\t *"
|
if has_key(a:class_info, 'methods')
|
||||||
let re .= "\n\t * @return ".info.return_type
|
for [name, info] in items(a:class_info.methods)
|
||||||
let re .= "\n\t */"
|
if name =~ '^__'
|
||||||
let re .= "\n\tpublic function ".name."(".info.signature."){"
|
continue
|
||||||
let re .= "\n\t}"
|
endif
|
||||||
endfor
|
let re .= "\n\t/**"
|
||||||
for [name, info] in items(a:class_info.static_methods)
|
let re .= "\n\t * ".name
|
||||||
let re .= "\n\t/**"
|
let re .= "\n\t *"
|
||||||
let re .= "\n\t * ".name
|
let re .= "\n\t * @return ".info.return_type
|
||||||
let re .= "\n\t *"
|
let re .= "\n\t */"
|
||||||
let re .= "\n\t * @return ".info.return_type
|
let re .= "\n\tpublic function ".name."(".info.signature."){"
|
||||||
let re .= "\n\t */"
|
let re .= "\n\t}"
|
||||||
let re .= "\n\tpublic static function ".name."(".info.signature."){"
|
endfor
|
||||||
let re .= "\n\t}"
|
endif
|
||||||
endfor
|
if has_key(a:class_info, 'static_methods')
|
||||||
|
for [name, info] in items(a:class_info.static_methods)
|
||||||
|
let re .= "\n\t/**"
|
||||||
|
let re .= "\n\t * ".name
|
||||||
|
let re .= "\n\t *"
|
||||||
|
let re .= "\n\t * @return ".info.return_type
|
||||||
|
let re .= "\n\t */"
|
||||||
|
let re .= "\n\tpublic static function ".name."(".info.signature."){"
|
||||||
|
let re .= "\n\t}"
|
||||||
|
endfor
|
||||||
|
endif
|
||||||
let re .= "\n}"
|
let re .= "\n}"
|
||||||
|
|
||||||
return { 'class': a:class_info['name'],
|
return { a:type : a:class_info['name'],
|
||||||
\ 'content': re,
|
\ 'content': re,
|
||||||
\ 'namespace': '',
|
\ 'namespace': '',
|
||||||
\ 'imports': {},
|
\ 'imports': {},
|
||||||
@ -2204,8 +2245,11 @@ function! phpcomplete#GetDocBlock(sccontent, search) " {{{
|
|||||||
" start backward serch for the comment block
|
" start backward serch for the comment block
|
||||||
while l != 0
|
while l != 0
|
||||||
let line = a:sccontent[l]
|
let line = a:sccontent[l]
|
||||||
" if comment end found save line position and end search
|
" if it's a one line docblock like comment and we can just return it right away
|
||||||
if line =~? '^\s*\*/'
|
if line =~? '^\s*\/\*\*.\+\*\/\s*$'
|
||||||
|
return substitute(line, '\v^\s*(\/\*\*\s*)|(\s*\*\/)\s*$', '', 'g')
|
||||||
|
"... or if comment end found save line position and end search
|
||||||
|
elseif line =~? '^\s*\*/'
|
||||||
let comment_end = l
|
let comment_end = l
|
||||||
break
|
break
|
||||||
" ... or the line doesn't blank (only whitespace or nothing) end search
|
" ... or the line doesn't blank (only whitespace or nothing) end search
|
||||||
@ -2227,6 +2271,7 @@ function! phpcomplete#GetDocBlock(sccontent, search) " {{{
|
|||||||
endif
|
endif
|
||||||
let l -= 1
|
let l -= 1
|
||||||
endwhile
|
endwhile
|
||||||
|
|
||||||
" no docblock comment start found
|
" no docblock comment start found
|
||||||
if comment_start == -1
|
if comment_start == -1
|
||||||
return ''
|
return ''
|
||||||
@ -2388,7 +2433,15 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
|||||||
break
|
break
|
||||||
endif
|
endif
|
||||||
let block_end_pos = searchpairpos('{', '', '}\|\%$', 'W', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
|
let block_end_pos = searchpairpos('{', '', '}\|\%$', 'W', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
|
||||||
silent! exec block_start_pos[0].','.block_end_pos[0].'d'
|
|
||||||
|
if block_end_pos != [0, 0]
|
||||||
|
" end of the block found, just delete it
|
||||||
|
silent! exec block_start_pos[0].','.block_end_pos[0].'d _'
|
||||||
|
else
|
||||||
|
" block pair not found, use block start as beginning and the end
|
||||||
|
" of the buffer instead
|
||||||
|
silent! exec block_start_pos[0].',$d _'
|
||||||
|
endif
|
||||||
endwhile
|
endwhile
|
||||||
normal! G
|
normal! G
|
||||||
|
|
||||||
@ -2407,8 +2460,8 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
|||||||
while i < file_length
|
while i < file_length
|
||||||
let line = file_lines[i]
|
let line = file_lines[i]
|
||||||
|
|
||||||
if line =~? '^\s*namespace\s*'.namespace_name_pattern
|
if line =~? '^\(<?php\)\?\s*namespace\s*'.namespace_name_pattern
|
||||||
let current_namespace = matchstr(line, '\c^\s*namespace\s*\zs'.namespace_name_pattern.'\ze')
|
let current_namespace = matchstr(line, '\c^\(<?php\)\?\s*namespace\s*\zs'.namespace_name_pattern.'\ze')
|
||||||
break
|
break
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -2571,7 +2624,7 @@ endfunction
|
|||||||
|
|
||||||
function! phpcomplete#ExpandClassName(classname, current_namespace, imports) " {{{
|
function! phpcomplete#ExpandClassName(classname, current_namespace, imports) " {{{
|
||||||
" if there's an imported class, just use that class's information
|
" if there's an imported class, just use that class's information
|
||||||
if has_key(a:imports, a:classname) && (a:imports[a:classname].kind == 'c' || a:imports[a:classname].kind == 'i')
|
if has_key(a:imports, a:classname) && (a:imports[a:classname].kind == 'c' || a:imports[a:classname].kind == 'i' || a:imports[a:classname].kind == 't')
|
||||||
let namespace = has_key(a:imports[a:classname], 'namespace') ? a:imports[a:classname].namespace : ''
|
let namespace = has_key(a:imports[a:classname], 'namespace') ? a:imports[a:classname].namespace : ''
|
||||||
return [a:imports[a:classname].name, namespace]
|
return [a:imports[a:classname].name, namespace]
|
||||||
endif
|
endif
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*autocmd.txt* For Vim version 7.4. Last change: 2015 Mar 21
|
*autocmd.txt* For Vim version 7.4. Last change: 2015 Jul 20
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*cmdline.txt* For Vim version 7.4. Last change: 2014 Sep 06
|
*cmdline.txt* For Vim version 7.4. Last change: 2015 Jul 21
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -565,6 +565,7 @@ starts editing the three files "foo bar", "goes to" and "school ".
|
|||||||
When you want to use the special characters '"' or '|' in a command, or want
|
When you want to use the special characters '"' or '|' in a command, or want
|
||||||
to use '%' or '#' in a file name, precede them with a backslash. The
|
to use '%' or '#' in a file name, precede them with a backslash. The
|
||||||
backslash is not required in a range and in the ":substitute" command.
|
backslash is not required in a range and in the ":substitute" command.
|
||||||
|
See also |`=|.
|
||||||
|
|
||||||
*:_!*
|
*:_!*
|
||||||
The '!' (bang) character after an Ex command makes the command behave in a
|
The '!' (bang) character after an Ex command makes the command behave in a
|
||||||
@ -715,7 +716,7 @@ example, "%" stands for the current file name, while CTRL-R % inserts the
|
|||||||
current file name right away. See |c_CTRL-R|.
|
current file name right away. See |c_CTRL-R|.
|
||||||
|
|
||||||
Note: If you want to avoid the special characters in a Vim script you may want
|
Note: If you want to avoid the special characters in a Vim script you may want
|
||||||
to use |fnameescape()|.
|
to use |fnameescape()|. Also see |`=|.
|
||||||
|
|
||||||
|
|
||||||
In Ex commands, at places where a file name can be used, the following
|
In Ex commands, at places where a file name can be used, the following
|
||||||
@ -755,7 +756,7 @@ it, no matter how many backslashes.
|
|||||||
# alternate.file
|
# alternate.file
|
||||||
\# #
|
\# #
|
||||||
\\# \#
|
\\# \#
|
||||||
|
Also see |`=|.
|
||||||
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
|
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
|
||||||
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
|
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
|
||||||
*:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
|
*:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
|
||||||
@ -910,6 +911,7 @@ Examples: (alternate file name is "?readme?")
|
|||||||
:e #.* :e {files matching "?readme?.*"}
|
:e #.* :e {files matching "?readme?.*"}
|
||||||
:cd <cfile> :cd {file name under cursor}
|
:cd <cfile> :cd {file name under cursor}
|
||||||
:cd <cfile>* :cd {file name under cursor plus "*" and then expanded}
|
:cd <cfile>* :cd {file name under cursor plus "*" and then expanded}
|
||||||
|
Also see |`=|.
|
||||||
|
|
||||||
When the expanded argument contains a "!" and it is used for a shell command
|
When the expanded argument contains a "!" and it is used for a shell command
|
||||||
(":!cmd", ":r !cmd" or ":w !cmd"), the "!" is escaped with a backslash to
|
(":!cmd", ":r !cmd" or ":w !cmd"), the "!" is escaped with a backslash to
|
||||||
@ -935,6 +937,7 @@ for the file "$home" in the root directory. A few examples:
|
|||||||
\$home file "$home" in current directory
|
\$home file "$home" in current directory
|
||||||
/\$home file "$home" in root directory
|
/\$home file "$home" in root directory
|
||||||
\\$home file "\\", followed by expanded $home
|
\\$home file "\\", followed by expanded $home
|
||||||
|
Also see |`=|.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
7. Command-line window *cmdline-window* *cmdwin*
|
7. Command-line window *cmdline-window* *cmdwin*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*diff.txt* For Vim version 7.4. Last change: 2015 Feb 03
|
*diff.txt* For Vim version 7.4. Last change: 2015 Jul 03
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -124,8 +124,9 @@ file for a moment and come back to the same file and be in diff mode again.
|
|||||||
if the current window does not have 'diff' set then no options
|
if the current window does not have 'diff' set then no options
|
||||||
in it are changed.
|
in it are changed.
|
||||||
|
|
||||||
The ":diffoff" command resets the relevant options to the values they had when
|
The `:diffoff` command resets the relevant options to the values they had when
|
||||||
using |:diffsplit|, |:diffpatch| , |:diffthis|. or starting Vim in diff mode.
|
using `:diffsplit`, `:diffpatch` , `:diffthis`. or starting Vim in diff mode.
|
||||||
|
When using `:diffoff` twice the last saved values are restored.
|
||||||
Otherwise they are set to their default value:
|
Otherwise they are set to their default value:
|
||||||
|
|
||||||
'diff' off
|
'diff' off
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*editing.txt* For Vim version 7.4. Last change: 2015 Apr 18
|
*editing.txt* For Vim version 7.4. Last change: 2015 Jul 21
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -397,6 +397,8 @@ does apply like to other wildcards.
|
|||||||
If the expression returns a string then names are to be separated with line
|
If the expression returns a string then names are to be separated with line
|
||||||
breaks. When the result is a |List| then each item is used as a name. Line
|
breaks. When the result is a |List| then each item is used as a name. Line
|
||||||
breaks also separate names.
|
breaks also separate names.
|
||||||
|
Note that such expressions are only supported in places where a filename is
|
||||||
|
expected as an argument to an Ex-command.
|
||||||
|
|
||||||
*++opt* *[++opt]*
|
*++opt* *[++opt]*
|
||||||
The [++opt] argument can be used to force the value of 'fileformat',
|
The [++opt] argument can be used to force the value of 'fileformat',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*eval.txt* For Vim version 7.4. Last change: 2015 Jun 26
|
*eval.txt* For Vim version 7.4. Last change: 2015 Jul 21
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -1496,7 +1496,9 @@ v:hlsearch Variable that indicates whether search highlighting is on.
|
|||||||
this variable to zero acts like the |:nohlsearch| command,
|
this variable to zero acts like the |:nohlsearch| command,
|
||||||
setting it to one acts like >
|
setting it to one acts like >
|
||||||
let &hlsearch = &hlsearch
|
let &hlsearch = &hlsearch
|
||||||
<
|
< Note that the value is restored when returning from a
|
||||||
|
function. |function-search-undo|.
|
||||||
|
|
||||||
*v:insertmode* *insertmode-variable*
|
*v:insertmode* *insertmode-variable*
|
||||||
v:insertmode Used for the |InsertEnter| and |InsertChange| autocommand
|
v:insertmode Used for the |InsertEnter| and |InsertChange| autocommand
|
||||||
events. Values:
|
events. Values:
|
||||||
@ -4599,7 +4601,7 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()*
|
|||||||
done like 'magic' is set and 'cpoptions' is empty.
|
done like 'magic' is set and 'cpoptions' is empty.
|
||||||
|
|
||||||
*matchadd()* *E798* *E799* *E801*
|
*matchadd()* *E798* *E799* *E801*
|
||||||
matchadd({group}, {pattern}[, {priority}[, {id}]])
|
matchadd({group}, {pattern}[, {priority}[, {id} [, {dict}]]])
|
||||||
Defines a pattern to be highlighted in the current window (a
|
Defines a pattern to be highlighted in the current window (a
|
||||||
"match"). It will be highlighted with {group}. Returns an
|
"match"). It will be highlighted with {group}. Returns an
|
||||||
identification number (ID), which can be used to delete the
|
identification number (ID), which can be used to delete the
|
||||||
@ -4607,6 +4609,8 @@ matchadd({group}, {pattern}[, {priority}[, {id}]])
|
|||||||
Matching is case sensitive and magic, unless case sensitivity
|
Matching is case sensitive and magic, unless case sensitivity
|
||||||
or magicness are explicitly overridden in {pattern}. The
|
or magicness are explicitly overridden in {pattern}. The
|
||||||
'magic', 'smartcase' and 'ignorecase' options are not used.
|
'magic', 'smartcase' and 'ignorecase' options are not used.
|
||||||
|
The "Conceal" value is special, it causes the match to be
|
||||||
|
concealed.
|
||||||
|
|
||||||
The optional {priority} argument assigns a priority to the
|
The optional {priority} argument assigns a priority to the
|
||||||
match. A match with a high priority will have its
|
match. A match with a high priority will have its
|
||||||
@ -5181,7 +5185,7 @@ readfile({fname} [, {binary} [, {max}]])
|
|||||||
separated with CR will result in a single long line (unless a
|
separated with CR will result in a single long line (unless a
|
||||||
NL appears somewhere).
|
NL appears somewhere).
|
||||||
All NUL characters are replaced with a NL character.
|
All NUL characters are replaced with a NL character.
|
||||||
When {binary/append} contains "b" binary mode is used:
|
When {binary} contains "b" binary mode is used:
|
||||||
- When the last line ends in a NL an extra empty list item is
|
- When the last line ends in a NL an extra empty list item is
|
||||||
added.
|
added.
|
||||||
- No CR characters are removed.
|
- No CR characters are removed.
|
||||||
@ -6205,6 +6209,24 @@ strchars({expr} [, {skipcc}]) *strchars()*
|
|||||||
When {skipcc} set to 1, Composing characters are ignored.
|
When {skipcc} set to 1, Composing characters are ignored.
|
||||||
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
|
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
|
||||||
|
|
||||||
|
|
||||||
|
{skipcc} is only available after 7.4.755. For backward
|
||||||
|
compatibility, you can define a wrapper function: >
|
||||||
|
if has("patch-7.4.755")
|
||||||
|
function s:strchars(str, skipcc)
|
||||||
|
return strchars(a:str, a:skipcc)
|
||||||
|
endfunction
|
||||||
|
else
|
||||||
|
function s:strchars(str, skipcc)
|
||||||
|
if a:skipcc
|
||||||
|
return strlen(substitute(a:str, ".", "x", "g"))
|
||||||
|
else
|
||||||
|
return strchars(a:str)
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
endif
|
||||||
|
<
|
||||||
|
|
||||||
strdisplaywidth({expr}[, {col}]) *strdisplaywidth()*
|
strdisplaywidth({expr}[, {col}]) *strdisplaywidth()*
|
||||||
The result is a Number, which is the number of display cells
|
The result is a Number, which is the number of display cells
|
||||||
String {expr} occupies on the screen when it starts at {col}.
|
String {expr} occupies on the screen when it starts at {col}.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*quickref.txt* For Vim version 7.4. Last change: 2014 Nov 19
|
*quickref.txt* For Vim version 7.4. Last change: 2015 Jul 21
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -617,6 +617,7 @@ Short explanation of each option: *option-list*
|
|||||||
'balloondelay' 'bdlay' delay in mS before a balloon may pop up
|
'balloondelay' 'bdlay' delay in mS before a balloon may pop up
|
||||||
'ballooneval' 'beval' switch on balloon evaluation
|
'ballooneval' 'beval' switch on balloon evaluation
|
||||||
'balloonexpr' 'bexpr' expression to show in balloon
|
'balloonexpr' 'bexpr' expression to show in balloon
|
||||||
|
'belloff' 'bo' do not ring the bell for these reasons
|
||||||
'binary' 'bin' read/write/edit file in binary mode
|
'binary' 'bin' read/write/edit file in binary mode
|
||||||
'bomb' prepend a Byte Order Mark to the file
|
'bomb' prepend a Byte Order Mark to the file
|
||||||
'breakat' 'brk' characters that may cause a line break
|
'breakat' 'brk' characters that may cause a line break
|
||||||
@ -688,6 +689,7 @@ Short explanation of each option: *option-list*
|
|||||||
'fileignorecase' 'fic' ignore case when using file names
|
'fileignorecase' 'fic' ignore case when using file names
|
||||||
'filetype' 'ft' type of file, used for autocommands
|
'filetype' 'ft' type of file, used for autocommands
|
||||||
'fillchars' 'fcs' characters to use for displaying special items
|
'fillchars' 'fcs' characters to use for displaying special items
|
||||||
|
'fixendofline' 'fixeol' make sure last line in file has <EOL>
|
||||||
'fkmap' 'fk' Farsi keyboard mapping
|
'fkmap' 'fk' Farsi keyboard mapping
|
||||||
'foldclose' 'fcl' close a fold when the cursor leaves it
|
'foldclose' 'fcl' close a fold when the cursor leaves it
|
||||||
'foldcolumn' 'fdc' width of the column used to indicate folds
|
'foldcolumn' 'fdc' width of the column used to indicate folds
|
||||||
@ -702,10 +704,10 @@ Short explanation of each option: *option-list*
|
|||||||
'foldnestmax' 'fdn' maximum fold depth
|
'foldnestmax' 'fdn' maximum fold depth
|
||||||
'foldopen' 'fdo' for which commands a fold will be opened
|
'foldopen' 'fdo' for which commands a fold will be opened
|
||||||
'foldtext' 'fdt' expression used to display for a closed fold
|
'foldtext' 'fdt' expression used to display for a closed fold
|
||||||
|
'formatexpr' 'fex' expression used with "gq" command
|
||||||
'formatlistpat' 'flp' pattern used to recognize a list header
|
'formatlistpat' 'flp' pattern used to recognize a list header
|
||||||
'formatoptions' 'fo' how automatic formatting is to be done
|
'formatoptions' 'fo' how automatic formatting is to be done
|
||||||
'formatprg' 'fp' name of external program used with "gq" command
|
'formatprg' 'fp' name of external program used with "gq" command
|
||||||
'formatexpr' 'fex' expression used with "gq" command
|
|
||||||
'fsync' 'fs' whether to invoke fsync() after file write
|
'fsync' 'fs' whether to invoke fsync() after file write
|
||||||
'gdefault' 'gd' the ":substitute" flag 'g' is default on
|
'gdefault' 'gd' the ":substitute" flag 'g' is default on
|
||||||
'grepformat' 'gfm' format of 'grepprg' output
|
'grepformat' 'gfm' format of 'grepprg' output
|
||||||
@ -873,9 +875,9 @@ Short explanation of each option: *option-list*
|
|||||||
'switchbuf' 'swb' sets behavior when switching to another buffer
|
'switchbuf' 'swb' sets behavior when switching to another buffer
|
||||||
'synmaxcol' 'smc' maximum column to find syntax items
|
'synmaxcol' 'smc' maximum column to find syntax items
|
||||||
'syntax' 'syn' syntax to be loaded for current buffer
|
'syntax' 'syn' syntax to be loaded for current buffer
|
||||||
'tabstop' 'ts' number of spaces that <Tab> in file uses
|
|
||||||
'tabline' 'tal' custom format for the console tab pages line
|
'tabline' 'tal' custom format for the console tab pages line
|
||||||
'tabpagemax' 'tpm' maximum number of tab pages for |-p| and "tab all"
|
'tabpagemax' 'tpm' maximum number of tab pages for |-p| and "tab all"
|
||||||
|
'tabstop' 'ts' number of spaces that <Tab> in file uses
|
||||||
'tagbsearch' 'tbs' use binary searching in tags files
|
'tagbsearch' 'tbs' use binary searching in tags files
|
||||||
'taglength' 'tl' number of significant characters for a tag
|
'taglength' 'tl' number of significant characters for a tag
|
||||||
'tagrelative' 'tr' file names in tag file are relative
|
'tagrelative' 'tr' file names in tag file are relative
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*syntax.txt* For Vim version 7.4. Last change: 2015 Mar 29
|
*syntax.txt* For Vim version 7.4. Last change: 2015 Jul 21
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -3684,6 +3684,7 @@ Whether or not it is actually concealed depends on the value of the
|
|||||||
'conceallevel' option. The 'concealcursor' option is used to decide whether
|
'conceallevel' option. The 'concealcursor' option is used to decide whether
|
||||||
concealable items in the current line are displayed unconcealed to be able to
|
concealable items in the current line are displayed unconcealed to be able to
|
||||||
edit the line.
|
edit the line.
|
||||||
|
Another way to conceal text with with |matchadd()|.
|
||||||
|
|
||||||
concealends *:syn-concealends*
|
concealends *:syn-concealends*
|
||||||
|
|
||||||
|
@ -2174,6 +2174,9 @@ au BufNewFile,BufRead *.tli setf tli
|
|||||||
" Telix Salt
|
" Telix Salt
|
||||||
au BufNewFile,BufRead *.slt setf tsalt
|
au BufNewFile,BufRead *.slt setf tsalt
|
||||||
|
|
||||||
|
" Tera Term Language
|
||||||
|
au BufRead,BufNewFile *.ttl setf teraterm
|
||||||
|
|
||||||
" Terminfo
|
" Terminfo
|
||||||
au BufNewFile,BufRead *.ti setf terminfo
|
au BufNewFile,BufRead *.ti setf terminfo
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
" Vim indent file
|
" Vim indent file
|
||||||
" Language: Shell Script
|
" Language: Shell Script
|
||||||
" Maintainer: Peter Aronoff <telemachus@arpinum.org>
|
" Maintainer: Currently unmaintained. If you want to take it, please
|
||||||
|
" email Bram
|
||||||
|
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
|
||||||
" Original Author: Nikolai Weibull <now@bitwi.se>
|
" Original Author: Nikolai Weibull <now@bitwi.se>
|
||||||
" Latest Revision: 2014-08-22
|
" Latest Revision: 2014-08-22
|
||||||
|
|
||||||
|
67
runtime/indent/teraterm.vim
Normal file
67
runtime/indent/teraterm.vim
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
" Vim indent file
|
||||||
|
" Language: Tera Term Language (TTL)
|
||||||
|
" Based on Tera Term Version 4.86
|
||||||
|
" Maintainer: Ken Takata
|
||||||
|
" URL: https://github.com/k-takata/vim-teraterm
|
||||||
|
" Last Change: 2015 Jun 4
|
||||||
|
" Filenames: *.ttl
|
||||||
|
" License: VIM License
|
||||||
|
|
||||||
|
if exists("b:did_indent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_indent = 1
|
||||||
|
|
||||||
|
setlocal nosmartindent
|
||||||
|
setlocal noautoindent
|
||||||
|
setlocal indentexpr=GetTeraTermIndent(v:lnum)
|
||||||
|
setlocal indentkeys=!^F,o,O,e
|
||||||
|
setlocal indentkeys+==elseif,=endif,=loop,=next,=enduntil,=endwhile
|
||||||
|
|
||||||
|
if exists("*GetTeraTermIndent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" The shiftwidth() function is relatively new.
|
||||||
|
" Don't require it to exist.
|
||||||
|
if exists('*shiftwidth')
|
||||||
|
function s:sw() abort
|
||||||
|
return shiftwidth()
|
||||||
|
endfunction
|
||||||
|
else
|
||||||
|
function s:sw() abort
|
||||||
|
return &shiftwidth
|
||||||
|
endfunction
|
||||||
|
endif
|
||||||
|
|
||||||
|
function! GetTeraTermIndent(lnum)
|
||||||
|
let l:prevlnum = prevnonblank(a:lnum-1)
|
||||||
|
if l:prevlnum == 0
|
||||||
|
" top of file
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
" grab the previous and current line, stripping comments.
|
||||||
|
let l:prevl = substitute(getline(l:prevlnum), ';.*$', '', '')
|
||||||
|
let l:thisl = substitute(getline(a:lnum), ';.*$', '', '')
|
||||||
|
let l:previ = indent(l:prevlnum)
|
||||||
|
|
||||||
|
let l:ind = l:previ
|
||||||
|
|
||||||
|
if l:prevl =~ '^\s*if\>.*\<then\s*$'
|
||||||
|
" previous line opened a block
|
||||||
|
let l:ind += s:sw()
|
||||||
|
endif
|
||||||
|
if l:prevl =~ '^\s*\%(elseif\|else\|do\|until\|while\|for\)\>'
|
||||||
|
" previous line opened a block
|
||||||
|
let l:ind += s:sw()
|
||||||
|
endif
|
||||||
|
if l:thisl =~ '^\s*\%(elseif\|else\|endif\|enduntil\|endwhile\|loop\|next\)\>'
|
||||||
|
" this line closed a block
|
||||||
|
let l:ind -= s:sw()
|
||||||
|
endif
|
||||||
|
|
||||||
|
return l:ind
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" vim: ts=8 sw=2 sts=2
|
@ -1,7 +1,7 @@
|
|||||||
" These commands create the option window.
|
" These commands create the option window.
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2014 Nov 19
|
" Last Change: 2015 Jul 22
|
||||||
|
|
||||||
" If there already is an option window, jump to that one.
|
" If there already is an option window, jump to that one.
|
||||||
if bufwinnr("option-window") > 0
|
if bufwinnr("option-window") > 0
|
||||||
@ -673,6 +673,8 @@ call append("$", "errorbells\tring the bell for error messages")
|
|||||||
call <SID>BinOptionG("eb", &eb)
|
call <SID>BinOptionG("eb", &eb)
|
||||||
call append("$", "visualbell\tuse a visual bell instead of beeping")
|
call append("$", "visualbell\tuse a visual bell instead of beeping")
|
||||||
call <SID>BinOptionG("vb", &vb)
|
call <SID>BinOptionG("vb", &vb)
|
||||||
|
call append("$", "belloff\tdo not ring the bell for these reasons")
|
||||||
|
call <SID>OptionG("belloff", &belloff)
|
||||||
if has("multi_lang")
|
if has("multi_lang")
|
||||||
call append("$", "helplang\tlist of preferred languages for finding help")
|
call append("$", "helplang\tlist of preferred languages for finding help")
|
||||||
call <SID>OptionG("hlg", &hlg)
|
call <SID>OptionG("hlg", &hlg)
|
||||||
@ -922,7 +924,7 @@ call <SID>BinOptionL("bin")
|
|||||||
call append("$", "endofline\tlast line in the file has an end-of-line")
|
call append("$", "endofline\tlast line in the file has an end-of-line")
|
||||||
call append("$", "\t(local to buffer)")
|
call append("$", "\t(local to buffer)")
|
||||||
call <SID>BinOptionL("eol")
|
call <SID>BinOptionL("eol")
|
||||||
call append("$", "fixeol\tfixes missing end-of-line at end of text file")
|
call append("$", "fixendofline\tfixes missing end-of-line at end of text file")
|
||||||
call append("$", "\t(local to buffer)")
|
call append("$", "\t(local to buffer)")
|
||||||
call <SID>BinOptionL("fixeol")
|
call <SID>BinOptionL("fixeol")
|
||||||
if has("multi_byte")
|
if has("multi_byte")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Python
|
" Language: Python
|
||||||
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||||
" Last Change: 2015 Jun 19
|
" Last Change: 2015 Jul 14
|
||||||
" Credits: Neil Schemenauer <nas@python.ca>
|
" Credits: Neil Schemenauer <nas@python.ca>
|
||||||
" Dmitry Vasiliev
|
" Dmitry Vasiliev
|
||||||
"
|
"
|
||||||
@ -51,24 +51,25 @@ set cpo&vim
|
|||||||
|
|
||||||
" Keep Python keywords in alphabetical order inside groups for easy
|
" Keep Python keywords in alphabetical order inside groups for easy
|
||||||
" comparison with the table in the 'Python Language Reference'
|
" comparison with the table in the 'Python Language Reference'
|
||||||
" http://docs.python.org/reference/lexical_analysis.html#keywords.
|
" https://docs.python.org/2/reference/lexical_analysis.html#keywords,
|
||||||
|
" https://docs.python.org/3/reference/lexical_analysis.html#keywords.
|
||||||
" Groups are in the order presented in NAMING CONVENTIONS in syntax.txt.
|
" Groups are in the order presented in NAMING CONVENTIONS in syntax.txt.
|
||||||
" Exceptions come last at the end of each group (class and def below).
|
" Exceptions come last at the end of each group (class and def below).
|
||||||
"
|
"
|
||||||
" Keywords 'with' and 'as' are new in Python 2.6
|
" Keywords 'with' and 'as' are new in Python 2.6
|
||||||
" (use 'from __future__ import with_statement' in Python 2.5).
|
" (use 'from __future__ import with_statement' in Python 2.5).
|
||||||
"
|
"
|
||||||
" Some compromises had to be made to support both Python 3.0 and 2.6.
|
" Some compromises had to be made to support both Python 3 and 2.
|
||||||
" We include Python 3.0 features, but when a definition is duplicated,
|
" We include Python 3 features, but when a definition is duplicated,
|
||||||
" the last definition takes precedence.
|
" the last definition takes precedence.
|
||||||
"
|
"
|
||||||
" - 'False', 'None', and 'True' are keywords in Python 3.0 but they are
|
" - 'False', 'None', and 'True' are keywords in Python 3 but they are
|
||||||
" built-ins in 2.6 and will be highlighted as built-ins below.
|
" built-ins in 2 and will be highlighted as built-ins below.
|
||||||
" - 'exec' is a built-in in Python 3.0 and will be highlighted as
|
" - 'exec' is a built-in in Python 3 and will be highlighted as
|
||||||
" built-in below.
|
" built-in below.
|
||||||
" - 'nonlocal' is a keyword in Python 3.0 and will be highlighted.
|
" - 'nonlocal' is a keyword in Python 3 and will be highlighted.
|
||||||
" - 'print' is a built-in in Python 3.0 and will be highlighted as
|
" - 'print' is a built-in in Python 3 and will be highlighted as
|
||||||
" built-in below (use 'from __future__ import print_function' in 2.6)
|
" built-in below (use 'from __future__ import print_function' in 2)
|
||||||
"
|
"
|
||||||
syn keyword pythonStatement False, None, True
|
syn keyword pythonStatement False, None, True
|
||||||
syn keyword pythonStatement as assert break continue del exec global
|
syn keyword pythonStatement as assert break continue del exec global
|
||||||
@ -147,7 +148,8 @@ endif
|
|||||||
" - 08e0 or 08j are highlighted,
|
" - 08e0 or 08j are highlighted,
|
||||||
"
|
"
|
||||||
" and so on, as specified in the 'Python Language Reference'.
|
" and so on, as specified in the 'Python Language Reference'.
|
||||||
" http://docs.python.org/reference/lexical_analysis.html#numeric-literals
|
" https://docs.python.org/2/reference/lexical_analysis.html#numeric-literals
|
||||||
|
" https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals
|
||||||
if !exists("python_no_number_highlight")
|
if !exists("python_no_number_highlight")
|
||||||
" numbers (including longs and complex)
|
" numbers (including longs and complex)
|
||||||
syn match pythonNumber "\<0[oO]\=\o\+[Ll]\=\>"
|
syn match pythonNumber "\<0[oO]\=\o\+[Ll]\=\>"
|
||||||
@ -159,54 +161,58 @@ if !exists("python_no_number_highlight")
|
|||||||
syn match pythonNumber
|
syn match pythonNumber
|
||||||
\ "\<\d\+\.\%([eE][+-]\=\d\+\)\=[jJ]\=\%(\W\|$\)\@="
|
\ "\<\d\+\.\%([eE][+-]\=\d\+\)\=[jJ]\=\%(\W\|$\)\@="
|
||||||
syn match pythonNumber
|
syn match pythonNumber
|
||||||
\ "\%(^\|\W\)\@<=\d*\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>"
|
\ "\%(^\|\W\)\zs\d*\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Group the built-ins in the order in the 'Python Library Reference' for
|
" Group the built-ins in the order in the 'Python Library Reference' for
|
||||||
" easier comparison.
|
" easier comparison.
|
||||||
" http://docs.python.org/library/constants.html
|
" https://docs.python.org/2/library/constants.html
|
||||||
" http://docs.python.org/library/functions.html
|
" https://docs.python.org/3/library/constants.html
|
||||||
" http://docs.python.org/library/functions.html#non-essential-built-in-functions
|
" http://docs.python.org/2/library/functions.html
|
||||||
|
" http://docs.python.org/3/library/functions.html
|
||||||
|
" http://docs.python.org/2/library/functions.html#non-essential-built-in-functions
|
||||||
|
" http://docs.python.org/3/library/functions.html#non-essential-built-in-functions
|
||||||
" Python built-in functions are in alphabetical order.
|
" Python built-in functions are in alphabetical order.
|
||||||
if !exists("python_no_builtin_highlight")
|
if !exists("python_no_builtin_highlight")
|
||||||
" built-in constants
|
" built-in constants
|
||||||
" 'False', 'True', and 'None' are also reserved words in Python 3.0
|
" 'False', 'True', and 'None' are also reserved words in Python 3
|
||||||
syn keyword pythonBuiltin False True None
|
syn keyword pythonBuiltin False True None
|
||||||
syn keyword pythonBuiltin NotImplemented Ellipsis __debug__
|
syn keyword pythonBuiltin NotImplemented Ellipsis __debug__
|
||||||
" built-in functions
|
" built-in functions
|
||||||
syn keyword pythonBuiltin abs all any bin bool chr classmethod
|
syn keyword pythonBuiltin abs all any bin bool bytearray callable chr
|
||||||
syn keyword pythonBuiltin compile complex delattr dict dir divmod
|
syn keyword pythonBuiltin classmethod compile complex delattr dict dir
|
||||||
syn keyword pythonBuiltin enumerate eval filter float format
|
syn keyword pythonBuiltin divmod enumerate eval filter float format
|
||||||
syn keyword pythonBuiltin frozenset getattr globals hasattr hash
|
syn keyword pythonBuiltin frozenset getattr globals hasattr hash
|
||||||
syn keyword pythonBuiltin help hex id input int isinstance
|
syn keyword pythonBuiltin help hex id input int isinstance
|
||||||
syn keyword pythonBuiltin issubclass iter len list locals map max
|
syn keyword pythonBuiltin issubclass iter len list locals map max
|
||||||
syn keyword pythonBuiltin min next object oct open ord pow print
|
syn keyword pythonBuiltin memoryview min next object oct open ord pow
|
||||||
syn keyword pythonBuiltin property range repr reversed round set
|
syn keyword pythonBuiltin print property range repr reversed round set
|
||||||
syn keyword pythonBuiltin setattr slice sorted staticmethod str
|
syn keyword pythonBuiltin setattr slice sorted staticmethod str
|
||||||
syn keyword pythonBuiltin sum super tuple type vars zip __import__
|
syn keyword pythonBuiltin sum super tuple type vars zip __import__
|
||||||
" Python 2.6 only
|
" Python 2 only
|
||||||
syn keyword pythonBuiltin basestring callable cmp execfile file
|
syn keyword pythonBuiltin basestring cmp execfile file
|
||||||
syn keyword pythonBuiltin long raw_input reduce reload unichr
|
syn keyword pythonBuiltin long raw_input reduce reload unichr
|
||||||
syn keyword pythonBuiltin unicode xrange
|
syn keyword pythonBuiltin unicode xrange
|
||||||
" Python 3.0 only
|
" Python 3 only
|
||||||
syn keyword pythonBuiltin ascii bytearray bytes exec memoryview
|
syn keyword pythonBuiltin ascii bytes exec
|
||||||
" non-essential built-in functions; Python 2.6 only
|
" non-essential built-in functions; Python 2 only
|
||||||
syn keyword pythonBuiltin apply buffer coerce intern
|
syn keyword pythonBuiltin apply buffer coerce intern
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" From the 'Python Library Reference' class hierarchy at the bottom.
|
" From the 'Python Library Reference' class hierarchy at the bottom.
|
||||||
" http://docs.python.org/library/exceptions.html
|
" http://docs.python.org/2/library/exceptions.html
|
||||||
|
" http://docs.python.org/3/library/exceptions.html
|
||||||
if !exists("python_no_exception_highlight")
|
if !exists("python_no_exception_highlight")
|
||||||
" builtin base exceptions (only used as base classes for other exceptions)
|
" builtin base exceptions (used mostly as base classes for other exceptions)
|
||||||
syn keyword pythonExceptions BaseException Exception
|
syn keyword pythonExceptions BaseException Exception
|
||||||
syn keyword pythonExceptions ArithmeticError EnvironmentError
|
syn keyword pythonExceptions ArithmeticError BufferError
|
||||||
syn keyword pythonExceptions LookupError
|
syn keyword pythonExceptions LookupError
|
||||||
" builtin base exception removed in Python 3.0
|
" builtin base exceptions removed in Python 3
|
||||||
syn keyword pythonExceptions StandardError
|
syn keyword pythonExceptions EnvironmentError StandardError
|
||||||
" builtin exceptions (actually raised)
|
" builtin exceptions (actually raised)
|
||||||
syn keyword pythonExceptions AssertionError AttributeError BufferError
|
syn keyword pythonExceptions AssertionError AttributeError
|
||||||
syn keyword pythonExceptions EOFError FloatingPointError GeneratorExit
|
syn keyword pythonExceptions EOFError FloatingPointError GeneratorExit
|
||||||
syn keyword pythonExceptions IOError ImportError IndentationError
|
syn keyword pythonExceptions ImportError IndentationError
|
||||||
syn keyword pythonExceptions IndexError KeyError KeyboardInterrupt
|
syn keyword pythonExceptions IndexError KeyError KeyboardInterrupt
|
||||||
syn keyword pythonExceptions MemoryError NameError NotImplementedError
|
syn keyword pythonExceptions MemoryError NameError NotImplementedError
|
||||||
syn keyword pythonExceptions OSError OverflowError ReferenceError
|
syn keyword pythonExceptions OSError OverflowError ReferenceError
|
||||||
@ -214,13 +220,26 @@ if !exists("python_no_exception_highlight")
|
|||||||
syn keyword pythonExceptions SystemError SystemExit TabError TypeError
|
syn keyword pythonExceptions SystemError SystemExit TabError TypeError
|
||||||
syn keyword pythonExceptions UnboundLocalError UnicodeError
|
syn keyword pythonExceptions UnboundLocalError UnicodeError
|
||||||
syn keyword pythonExceptions UnicodeDecodeError UnicodeEncodeError
|
syn keyword pythonExceptions UnicodeDecodeError UnicodeEncodeError
|
||||||
syn keyword pythonExceptions UnicodeTranslateError ValueError VMSError
|
syn keyword pythonExceptions UnicodeTranslateError ValueError
|
||||||
syn keyword pythonExceptions WindowsError ZeroDivisionError
|
syn keyword pythonExceptions ZeroDivisionError
|
||||||
|
" builtin OS exceptions in Python 3
|
||||||
|
syn keyword pythonExceptions BlockingIOError BrokenPipeError
|
||||||
|
syn keyword pythonExceptions ChildProcessError ConnectionAbortedError
|
||||||
|
syn keyword pythonExceptions ConnectionError ConnectionRefusedError
|
||||||
|
syn keyword pythonExceptions ConnectionResetError FileExistsError
|
||||||
|
syn keyword pythonExceptions FileNotFoundError InterruptedError
|
||||||
|
syn keyword pythonExceptions IsADirectoryError NotADirectoryError
|
||||||
|
syn keyword pythonExceptions PermissionError ProcessLookupError
|
||||||
|
syn keyword pythonExceptions TimeoutError
|
||||||
|
" builtin exceptions deprecated/removed in Python 3
|
||||||
|
syn keyword pythonExceptions IOError VMSError WindowsError
|
||||||
" builtin warnings
|
" builtin warnings
|
||||||
syn keyword pythonExceptions BytesWarning DeprecationWarning FutureWarning
|
syn keyword pythonExceptions BytesWarning DeprecationWarning FutureWarning
|
||||||
syn keyword pythonExceptions ImportWarning PendingDeprecationWarning
|
syn keyword pythonExceptions ImportWarning PendingDeprecationWarning
|
||||||
syn keyword pythonExceptions RuntimeWarning SyntaxWarning UnicodeWarning
|
syn keyword pythonExceptions RuntimeWarning SyntaxWarning UnicodeWarning
|
||||||
syn keyword pythonExceptions UserWarning Warning
|
syn keyword pythonExceptions UserWarning Warning
|
||||||
|
" builtin warnings in Python 3
|
||||||
|
syn keyword pythonExceptions ResourceWarning
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if exists("python_space_error_highlight")
|
if exists("python_space_error_highlight")
|
||||||
|
139
runtime/syntax/teraterm.vim
Normal file
139
runtime/syntax/teraterm.vim
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
" Vim syntax file
|
||||||
|
" Language: Tera Term Language (TTL)
|
||||||
|
" Based on Tera Term Version 4.86
|
||||||
|
" Maintainer: Ken Takata
|
||||||
|
" URL: https://github.com/k-takata/vim-teraterm
|
||||||
|
" Last Change: 2015 Jun 24
|
||||||
|
" Filenames: *.ttl
|
||||||
|
" License: VIM License
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:save_cpo = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
syn case ignore
|
||||||
|
|
||||||
|
syn region ttlComment start=";" end="$" contains=@Spell
|
||||||
|
syn region ttlComment start="/\*" end="\*/" contains=@Spell
|
||||||
|
syn region ttlFirstComment start="/\*" end="\*/" contained contains=@Spell
|
||||||
|
\ nextgroup=ttlStatement,ttlFirstComment
|
||||||
|
|
||||||
|
syn match ttlCharacter "#\%(\d\+\|\$\x\+\)\>"
|
||||||
|
syn match ttlNumber "\%(\<\d\+\|\$\x\+\)\>"
|
||||||
|
syn match ttlString "'[^']*'" contains=@Spell
|
||||||
|
syn match ttlString '"[^"]*"' contains=@Spell
|
||||||
|
syn cluster ttlConstant contains=ttlCharacter,ttlNumber,ttlString
|
||||||
|
|
||||||
|
syn match ttlLabel ":\s*\w\{1,32}\>"
|
||||||
|
|
||||||
|
syn keyword ttlOperator and or xor not
|
||||||
|
|
||||||
|
syn match ttlVar "\<groupmatchstr\d\>"
|
||||||
|
syn match ttlVar "\<param\d\>"
|
||||||
|
syn keyword ttlVar inputstr matchstr paramcnt result timeout mtimeout
|
||||||
|
|
||||||
|
|
||||||
|
syn match ttlLine nextgroup=ttlStatement "^"
|
||||||
|
syn match ttlStatement contained "\s*"
|
||||||
|
\ nextgroup=ttlIf,ttlElseIf,ttlConditional,ttlRepeat,
|
||||||
|
\ ttlFirstComment,ttlComment,ttlLabel,@ttlCommand
|
||||||
|
|
||||||
|
syn cluster ttlCommand contains=ttlControlCommand,ttlCommunicationCommand,
|
||||||
|
\ ttlStringCommand,ttlFileCommand,ttlPasswordCommand,
|
||||||
|
\ ttlMiscCommand
|
||||||
|
|
||||||
|
|
||||||
|
syn keyword ttlIf contained nextgroup=ttlIfExpression if
|
||||||
|
syn keyword ttlElseIf contained nextgroup=ttlElseIfExpression elseif
|
||||||
|
|
||||||
|
syn match ttlIfExpression contained "\s.*"
|
||||||
|
\ contains=@ttlConstant,ttlVar,ttlOperator,ttlComment,ttlThen,
|
||||||
|
\ @ttlCommand
|
||||||
|
syn match ttlElseIfExpression contained "\s.*"
|
||||||
|
\ contains=@ttlConstant,ttlVar,ttlOperator,ttlComment,ttlThen
|
||||||
|
|
||||||
|
syn keyword ttlThen contained then
|
||||||
|
syn keyword ttlConditional contained else endif
|
||||||
|
|
||||||
|
syn keyword ttlRepeat contained for next until enduntil while endwhile
|
||||||
|
syn match ttlRepeat contained
|
||||||
|
\ "\<\%(do\|loop\)\%(\s\+\%(while\|until\)\)\?\>"
|
||||||
|
syn keyword ttlControlCommand contained
|
||||||
|
\ break call continue end execcmnd exit goto include
|
||||||
|
\ mpause pause return
|
||||||
|
|
||||||
|
|
||||||
|
syn keyword ttlCommunicationCommand contained
|
||||||
|
\ bplusrecv bplussend callmenu changedir clearscreen
|
||||||
|
\ closett connect cygconnect disconnect dispstr
|
||||||
|
\ enablekeyb flushrecv gethostname getmodemstatus
|
||||||
|
\ gettitle kmtfinish kmtget kmtrecv kmtsend loadkeymap
|
||||||
|
\ logautoclosemode logclose loginfo logopen logpause
|
||||||
|
\ logrotate logstart logwrite quickvanrecv
|
||||||
|
\ quickvansend recvln restoresetup scprecv scpsend
|
||||||
|
\ send sendbreak sendbroadcast sendfile sendkcode
|
||||||
|
\ sendln sendlnbroadcast sendmulticast setbaud
|
||||||
|
\ setdebug setdtr setecho setmulticastname setrts
|
||||||
|
\ setsync settitle showtt testlink unlink wait
|
||||||
|
\ wait4all waitevent waitln waitn waitrecv waitregex
|
||||||
|
\ xmodemrecv xmodemsend ymodemrecv ymodemsend
|
||||||
|
\ zmodemrecv zmodemsend
|
||||||
|
syn keyword ttlStringCommand contained
|
||||||
|
\ code2str expandenv int2str regexoption sprintf
|
||||||
|
\ sprintf2 str2code str2int strcompare strconcat
|
||||||
|
\ strcopy strinsert strjoin strlen strmatch strremove
|
||||||
|
\ strreplace strscan strspecial strsplit strtrim
|
||||||
|
\ tolower toupper
|
||||||
|
syn keyword ttlFileCommand contained
|
||||||
|
\ basename dirname fileclose fileconcat filecopy
|
||||||
|
\ filecreate filedelete filelock filemarkptr fileopen
|
||||||
|
\ filereadln fileread filerename filesearch fileseek
|
||||||
|
\ fileseekback filestat filestrseek filestrseek2
|
||||||
|
\ filetruncate fileunlock filewrite filewriteln
|
||||||
|
\ findfirst findnext findclose foldercreate
|
||||||
|
\ folderdelete foldersearch getdir getfileattr makepath
|
||||||
|
\ setdir setfileattr
|
||||||
|
syn keyword ttlPasswordCommand contained
|
||||||
|
\ delpassword getpassword ispassword passwordbox
|
||||||
|
\ setpassword
|
||||||
|
syn keyword ttlMiscCommand contained
|
||||||
|
\ beep bringupbox checksum8 checksum8file checksum16
|
||||||
|
\ checksum16file checksum32 checksum32file closesbox
|
||||||
|
\ clipb2var crc16 crc16file crc32 crc32file exec
|
||||||
|
\ dirnamebox filenamebox getdate getenv getipv4addr
|
||||||
|
\ getipv6addr getspecialfolder gettime getttdir getver
|
||||||
|
\ ifdefined inputbox intdim listbox messagebox random
|
||||||
|
\ rotateleft rotateright setdate setdlgpos setenv
|
||||||
|
\ setexitcode settime show statusbox strdim uptime
|
||||||
|
\ var2clipb yesnobox
|
||||||
|
|
||||||
|
|
||||||
|
hi def link ttlCharacter Character
|
||||||
|
hi def link ttlNumber Number
|
||||||
|
hi def link ttlComment Comment
|
||||||
|
hi def link ttlFirstComment Comment
|
||||||
|
hi def link ttlString String
|
||||||
|
hi def link ttlLabel Label
|
||||||
|
hi def link ttlIf Conditional
|
||||||
|
hi def link ttlElseIf Conditional
|
||||||
|
hi def link ttlThen Conditional
|
||||||
|
hi def link ttlConditional Conditional
|
||||||
|
hi def link ttlRepeat Repeat
|
||||||
|
hi def link ttlControlCommand Keyword
|
||||||
|
hi def link ttlVar Identifier
|
||||||
|
hi def link ttlOperator Operator
|
||||||
|
hi def link ttlCommunicationCommand Keyword
|
||||||
|
hi def link ttlStringCommand Keyword
|
||||||
|
hi def link ttlFileCommand Keyword
|
||||||
|
hi def link ttlPasswordCommand Keyword
|
||||||
|
hi def link ttlMiscCommand Keyword
|
||||||
|
|
||||||
|
let b:current_syntax = "teraterm"
|
||||||
|
|
||||||
|
let &cpo = s:save_cpo
|
||||||
|
unlet s:save_cpo
|
||||||
|
|
||||||
|
" vim: ts=8 sw=2 sts=2
|
@ -223,7 +223,7 @@ syn keyword vbStatement Explicit FileCopy For ForEach Function Get GoSub
|
|||||||
syn keyword vbStatement GoTo Gosub Implements Kill LSet Let Lib LineInput
|
syn keyword vbStatement GoTo Gosub Implements Kill LSet Let Lib LineInput
|
||||||
syn keyword vbStatement Load Lock Loop Mid MkDir Name Next On OnError Open
|
syn keyword vbStatement Load Lock Loop Mid MkDir Name Next On OnError Open
|
||||||
syn keyword vbStatement Option Preserve Private Property Public Put RSet
|
syn keyword vbStatement Option Preserve Private Property Public Put RSet
|
||||||
syn keyword vbStatement RaiseEvent Randomize ReDim Redim Rem Reset Resume
|
syn keyword vbStatement RaiseEvent Randomize ReDim Redim Reset Resume
|
||||||
syn keyword vbStatement Return RmDir SavePicture SaveSetting Seek SendKeys
|
syn keyword vbStatement Return RmDir SavePicture SaveSetting Seek SendKeys
|
||||||
syn keyword vbStatement Sendkeys Set SetAttr Static Step Stop Sub Time
|
syn keyword vbStatement Sendkeys Set SetAttr Static Step Stop Sub Time
|
||||||
syn keyword vbStatement Type Unload Unlock Until Wend While Width With
|
syn keyword vbStatement Type Unload Unlock Until Wend While Width With
|
||||||
|
Loading…
Reference in New Issue
Block a user