Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6019fed0c5 | ||
|
|
92f076e53e | ||
|
|
6ec7808c4a | ||
|
|
c41b3c9f95 | ||
|
|
1d7caa58e3 | ||
|
|
335c584940 | ||
|
|
c2bd205254 | ||
|
|
64dea84bb0 | ||
|
|
bd76c89e31 | ||
|
|
0401933a5b | ||
|
|
077ade4f67 | ||
|
|
b69b9d5e17 | ||
|
|
958e15bb1c | ||
|
|
2eb413f89b | ||
|
|
44ff25d524 | ||
|
|
7159ac7fec | ||
|
|
8967f6c4b9 | ||
|
|
a13eb2b147 | ||
|
|
8f566fdb1e | ||
|
|
84bc00e9b5 | ||
|
|
9fcde94176 | ||
|
|
ad34abee25 | ||
|
|
4c0089d696 | ||
|
|
16abd997c9 | ||
|
|
7c2beb48ef | ||
|
|
416bd916b4 | ||
|
|
80adaa8ae8 | ||
|
|
d392a74c5a | ||
|
|
e7d9ca2b3b | ||
|
|
bf5f189e44 | ||
|
|
19e6c4fd2d | ||
|
|
0256d76a33 | ||
|
|
e429893741 | ||
|
|
a2a90d5e20 | ||
|
|
590aae3557 | ||
|
|
8154e642aa |
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@@ -276,7 +276,6 @@ jobs:
|
||||
run: |
|
||||
brew install lua
|
||||
echo "LUA_PREFIX=/usr/local" >> $GITHUB_ENV
|
||||
brew uninstall perl
|
||||
|
||||
- name: Set up environment
|
||||
run: |
|
||||
|
||||
8
SECURITY.md
Normal file
8
SECURITY.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Security Policy
|
||||
|
||||
## Reporting a vulnerability
|
||||
|
||||
If you want to report a security issue, please use [huntr.dev](https://huntr.dev/bounties/disclose?target=https%3A%2F%2Fgithub.com%2Fvim%2Fvim) to privately disclose the issue to us.
|
||||
They also have rewards in the form of money, swag and CVEs.
|
||||
|
||||
**Please don't publicly disclose the issue until it has been addressed by us.**
|
||||
@@ -1,3 +1,3 @@
|
||||
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Werror/
|
||||
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function/
|
||||
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wno-shadow/
|
||||
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter/
|
||||
|
||||
@@ -97,7 +97,7 @@ if 1
|
||||
filetype plugin indent on
|
||||
|
||||
" Put these in an autocmd group, so that you can revert them with:
|
||||
" ":augroup vimStartup | exe 'au!' | augroup END"
|
||||
" ":autocmd! vimStartup"
|
||||
augroup vimStartup
|
||||
au!
|
||||
|
||||
@@ -115,7 +115,7 @@ if 1
|
||||
" Quite a few people accidentally type "q:" instead of ":q" and get confused
|
||||
" by the command line window. Give a hint about how to get out.
|
||||
" If you don't like this you can put this in your vimrc:
|
||||
" ":augroup vimHints | exe 'au!' | augroup END"
|
||||
" ":autocmd! vimHints"
|
||||
augroup vimHints
|
||||
au!
|
||||
autocmd CmdwinEnter *
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2023 Jun 08
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2023 Aug 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -156,6 +156,7 @@ digraph_setlist({digraphlist}) Boolean register multiple |digraph|s
|
||||
echoraw({expr}) none output {expr} as-is
|
||||
empty({expr}) Number |TRUE| if {expr} is empty
|
||||
environ() Dict return environment variables
|
||||
err_teapot() Number produce error 418
|
||||
escape({string}, {chars}) String escape {chars} in {string} with '\'
|
||||
eval({string}) any evaluate {string} into its value
|
||||
eventhandler() Number |TRUE| if inside an event handler
|
||||
@@ -1248,7 +1249,7 @@ bufload({buf}) *bufload()*
|
||||
refers to an existing file then the file is read. Otherwise
|
||||
the buffer will be empty. If the buffer was already loaded
|
||||
then there is no change. If the buffer is not related to a
|
||||
file the no file is read (e.g., when 'buftype' is "nofile").
|
||||
file then no file is read (e.g., when 'buftype' is "nofile").
|
||||
If there is an existing swap file for the file of the buffer,
|
||||
there will be no dialog, the buffer will be loaded anyway.
|
||||
The {buf} argument is used like with |bufexists()|.
|
||||
@@ -2201,6 +2202,15 @@ environ() *environ()*
|
||||
use this: >
|
||||
:echo index(keys(environ()), 'HOME', 0, 1) != -1
|
||||
|
||||
|
||||
err_teapot([{expr}]) *err_teapot()*
|
||||
Produce an error with number 418, needed for implementation of
|
||||
RFC 2325.
|
||||
If {expr} is present and it is TRUE error 503 is given,
|
||||
indicating that coffee is temporarily not available.
|
||||
If {expr} is present it must be a String.
|
||||
|
||||
|
||||
escape({string}, {chars}) *escape()*
|
||||
Escape the characters in {chars} that occur in {string} with a
|
||||
backslash. Example: >
|
||||
|
||||
@@ -394,7 +394,7 @@ ways to change this:
|
||||
You must create a new filetype plugin in a directory early in
|
||||
'runtimepath'. For Unix, for example you could use this file: >
|
||||
vim ~/.vim/ftplugin/fortran.vim
|
||||
< You can set those settings and mappings that you would like to add. Note
|
||||
< You can set those settings and mappings that you would like to add. Note
|
||||
that the global plugin will be loaded after this, it may overrule the
|
||||
settings that you do here. If this is the case, you need to use one of the
|
||||
following two methods.
|
||||
@@ -403,7 +403,7 @@ ways to change this:
|
||||
You must put the copy in a directory early in 'runtimepath'. For Unix, for
|
||||
example, you could do this: >
|
||||
cp $VIMRUNTIME/ftplugin/fortran.vim ~/.vim/ftplugin/fortran.vim
|
||||
< Then you can edit the copied file to your liking. Since the b:did_ftplugin
|
||||
< Then you can edit the copied file to your liking. Since the b:did_ftplugin
|
||||
variable will be set, the global plugin will not be loaded.
|
||||
A disadvantage of this method is that when the distributed plugin gets
|
||||
improved, you will have to copy and modify it again.
|
||||
@@ -412,7 +412,7 @@ ways to change this:
|
||||
You must create a new filetype plugin in a directory from the end of
|
||||
'runtimepath'. For Unix, for example, you could use this file: >
|
||||
vim ~/.vim/after/ftplugin/fortran.vim
|
||||
< In this file you can change just those settings that you want to change.
|
||||
< In this file you can change just those settings that you want to change.
|
||||
|
||||
==============================================================================
|
||||
3. Docs for the default filetype plugins. *ftplugin-docs*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 9.0. Last change: 2023 Jun 09
|
||||
*terminal.txt* For Vim version 9.0. Last change: 2023 Jun 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1541,6 +1541,20 @@ If there is no g:termdebug_config you can use: >
|
||||
let g:termdebug_popup = 0
|
||||
|
||||
|
||||
Change default signs ~
|
||||
*termdebug_signs*
|
||||
Termdebug uses the last two characters of the breakpoint ID in the
|
||||
signcolumn to represent breakpoints. For example, breakpoint ID 133
|
||||
will be displayed as `33`.
|
||||
|
||||
If you want to customize the breakpoint signs: >
|
||||
let g:termdebug_config['sign'] = '>>'
|
||||
If there is no g:terminal_config yet you can use: >
|
||||
let g:termdebug_config = {'sign': '>>'}
|
||||
|
||||
After this, breakpoints will be displayed as `>>` in the signcolumn.
|
||||
|
||||
|
||||
Window toolbar ~
|
||||
*termdebug_winbar*
|
||||
By default the Termdebug plugin creates a window toolbar if the mouse is
|
||||
|
||||
@@ -1232,6 +1232,7 @@ Inter-process communication: *channel-functions*
|
||||
json_decode() decode a JSON string to Vim types
|
||||
js_encode() encode an expression to a JSON string
|
||||
js_decode() decode a JSON string to Vim types
|
||||
err_teapot() give error 418 or 503
|
||||
|
||||
Jobs: *job-functions*
|
||||
job_start() start a job
|
||||
|
||||
@@ -254,6 +254,9 @@ au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named
|
||||
au BufNewFile,BufRead named.root setf bindzone
|
||||
au BufNewFile,BufRead *.db call dist#ft#BindzoneCheck('')
|
||||
|
||||
" Blade
|
||||
au BufNewFile,BufRead *.blade.php setf blade
|
||||
|
||||
" Blank
|
||||
au BufNewFile,BufRead *.bl setf blank
|
||||
|
||||
@@ -1057,6 +1060,9 @@ au BufNewFile,BufRead *.json5 setf json5
|
||||
" JSON Patch (RFC 6902)
|
||||
au BufNewFile,BufRead *.json-patch setf json
|
||||
|
||||
" Geojson is also json
|
||||
au BufNewFile,BufRead *.geojson setf json
|
||||
|
||||
" Jupyter Notebook is also json
|
||||
au BufNewFile,BufRead *.ipynb setf json
|
||||
|
||||
@@ -1511,6 +1517,9 @@ au BufNewFile,BufRead *.pdf setf pdf
|
||||
" PCMK - HAE - crm configure edit
|
||||
au BufNewFile,BufRead *.pcmk setf pcmk
|
||||
|
||||
" PEM (Privacy-Enhanced Mail)
|
||||
au BufNewFile,BufRead *.pem,*.cer,*.crt,*.csr setf pem
|
||||
|
||||
" Perl
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.pl,*.PL call dist#ft#FTpl()
|
||||
@@ -1673,6 +1682,9 @@ au BufNewFile,BufRead *.pk setf poke
|
||||
" Protocols
|
||||
au BufNewFile,BufRead */etc/protocols setf protocols
|
||||
|
||||
" PyPA manifest files
|
||||
au BufNewFile,BufRead MANIFEST.in setf pymanifest
|
||||
|
||||
" Pyret
|
||||
au BufNewFile,BufRead *.arr setf pyret
|
||||
|
||||
@@ -2311,6 +2323,9 @@ au BufNewFile,BufRead */.config/upstart/*.override setf upstart
|
||||
" URL shortcut
|
||||
au BufNewFile,BufRead *.url setf urlshortcut
|
||||
|
||||
" V
|
||||
au BufNewFile,BufRead *.vsh,*.vv setf v
|
||||
|
||||
" Vala
|
||||
au BufNewFile,BufRead *.vala setf vala
|
||||
|
||||
@@ -2393,6 +2408,9 @@ au BufNewFile,BufRead .wgetrc,wgetrc setf wget
|
||||
" Wget2 config
|
||||
au BufNewFile,BufRead .wget2rc,wget2rc setf wget2
|
||||
|
||||
" WebGPU Shading Language (WGSL)
|
||||
au BufNewFile,BufRead *.wgsl setf wgsl
|
||||
|
||||
" Website MetaLanguage
|
||||
au BufNewFile,BufRead *.wml setf wml
|
||||
|
||||
@@ -2481,6 +2499,9 @@ au BufNewFile,BufRead *.fsproj,*.fsproj.user setf xml
|
||||
" VBPROJ files are Visual Studio.NET's XML-based Visual Basic project config files
|
||||
au BufNewFile,BufRead *.vbproj,*.vbproj.user setf xml
|
||||
|
||||
" Unison Language
|
||||
au BufNewFile,BufRead *.u,*.uu setf unison
|
||||
|
||||
" Qt Linguist translation source and Qt User Interface Files are XML
|
||||
" However, for .ts TypeScript is more common.
|
||||
au BufNewFile,BufRead *.ui setf xml
|
||||
@@ -2526,7 +2547,7 @@ au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc
|
||||
au BufNewFile,BufRead *.y call dist#ft#FTy()
|
||||
|
||||
" Yaml
|
||||
au BufNewFile,BufRead *.yaml,*.yml setf yaml
|
||||
au BufNewFile,BufRead *.yaml,*.yml,*.eyaml setf yaml
|
||||
|
||||
" Raml
|
||||
au BufNewFile,BufRead *.raml setf raml
|
||||
|
||||
@@ -14,3 +14,14 @@ setlocal comments=:<%!--
|
||||
setlocal commentstring=<%!--\ %s\ --%>
|
||||
|
||||
let b:undo_ftplugin = 'set sw< sts< et< com< cms<'
|
||||
|
||||
" HTML: thanks to Johannes Zellner and Benji Fisher.
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_ignorecase = 1
|
||||
let b:match_words = '<!--:-->,' ..
|
||||
\ '<:>,' ..
|
||||
\ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' ..
|
||||
\ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' ..
|
||||
\ '<\@<=\([^/!][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
|
||||
let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
|
||||
endif
|
||||
|
||||
14
runtime/ftplugin/unison.vim
Normal file
14
runtime/ftplugin/unison.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: unison
|
||||
" Maintainer: Anton Parkhomenko <anton@chuwy.me>
|
||||
" Latest Revision: 2023-08-07
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl cms< isk<"
|
||||
|
||||
setlocal commentstring=--\ %s
|
||||
setlocal iskeyword+=!,'
|
||||
@@ -1,6 +1,6 @@
|
||||
" matchit.vim: (global plugin) Extended "%" matching
|
||||
" autload script of matchit plugin, see ../plugin/matchit.vim
|
||||
" Last Change: Jun 10, 2021
|
||||
" Last Change: Jan 24, 2022
|
||||
|
||||
" Neovim does not support scriptversion
|
||||
if has("vimscript-4")
|
||||
@@ -42,6 +42,10 @@ function s:RestoreOptions()
|
||||
let restore_options = " ve=" .. &ve .. restore_options
|
||||
set ve=
|
||||
endif
|
||||
if &smartcase
|
||||
let restore_options = " smartcase " .. restore_options
|
||||
set nosmartcase
|
||||
endif
|
||||
return restore_options
|
||||
endfunction
|
||||
|
||||
@@ -134,9 +138,6 @@ function matchit#Match_wrapper(word, forward, mode) range
|
||||
let curcol = match(matchline, regexp)
|
||||
" If there is no match, give up.
|
||||
if curcol == -1
|
||||
" Make sure macros abort properly
|
||||
"exe "norm! \<esc>"
|
||||
call feedkeys("\e", 'tni')
|
||||
return s:CleanUp(restore_options, a:mode, startpos)
|
||||
endif
|
||||
let endcol = matchend(matchline, regexp)
|
||||
@@ -756,15 +757,15 @@ endfun
|
||||
fun! s:ParseSkip(str)
|
||||
let skip = a:str
|
||||
if skip[1] == ":"
|
||||
if skip[0] == "s"
|
||||
if skip[0] ==# "s"
|
||||
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" ..
|
||||
\ strpart(skip,2) .. "'"
|
||||
elseif skip[0] == "S"
|
||||
elseif skip[0] ==# "S"
|
||||
let skip = "synIDattr(synID(line('.'),col('.'),1),'name') !~? '" ..
|
||||
\ strpart(skip,2) .. "'"
|
||||
elseif skip[0] == "r"
|
||||
elseif skip[0] ==# "r"
|
||||
let skip = "strpart(getline('.'),0,col('.'))=~'" .. strpart(skip,2) .. "'"
|
||||
elseif skip[0] == "R"
|
||||
elseif skip[0] ==# "R"
|
||||
let skip = "strpart(getline('.'),0,col('.'))!~'" .. strpart(skip,2) .. "'"
|
||||
endif
|
||||
endif
|
||||
|
||||
27
runtime/pack/dist/opt/matchit/doc/matchit.txt
vendored
27
runtime/pack/dist/opt/matchit/doc/matchit.txt
vendored
@@ -1,10 +1,10 @@
|
||||
*matchit.txt* Extended "%" matching
|
||||
*matchit.txt* Extended "%" matching
|
||||
|
||||
For instructions on installing this file, type
|
||||
`:help matchit-install`
|
||||
inside Vim.
|
||||
|
||||
For Vim version 8.2. Last change: 2021 Dec 24
|
||||
For Vim version 9.0. Last change: 2023 June 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Benji Fisher et al
|
||||
@@ -148,10 +148,6 @@ To use the matchit plugin add this line to your |vimrc|: >
|
||||
|
||||
The script should start working the next time you start Vim.
|
||||
|
||||
To use the matching plugin after startup, you can use this command (note the
|
||||
omitted '!'): >
|
||||
packadd matchit
|
||||
|
||||
To use the matchit plugin after Vim has started, execute this command: >
|
||||
packadd matchit
|
||||
|
||||
@@ -176,6 +172,22 @@ fail to skip matching groups in comments and strings. If the |filetype|
|
||||
mechanism is turned off, the |b:match_words| variable will probably not be
|
||||
defined automatically.
|
||||
|
||||
2.1 Temporarily disable the matchit plugin *matchit-disable* *:MatchDisable*
|
||||
|
||||
To temporarily reset the plugins, that are setup you can run the following
|
||||
command: >
|
||||
:MatchDisable
|
||||
|
||||
This will delete all the defined key mappings to the Vim default.
|
||||
Now the "%" command will work like before loading the plugin |%|
|
||||
|
||||
2.2 Re-enable the matchit plugin *:MatchEnable*
|
||||
|
||||
To re-enable the plugin, after it was disabled, use the following command: >
|
||||
:MatchEnable
|
||||
|
||||
This will resetup the key mappings.
|
||||
|
||||
==============================================================================
|
||||
3. Configuration *matchit-configure*
|
||||
|
||||
@@ -244,6 +256,9 @@ Examples:
|
||||
comment character) you can >
|
||||
:let b:match_skip = 'r:\(^\|[^\\]\)\(\\\\\)*%'
|
||||
<
|
||||
See the $VIMRUNTIME/ftplugin/vim.vim for an example that uses both
|
||||
syntax and a regular expression.
|
||||
|
||||
==============================================================================
|
||||
4. Supporting a New Language *matchit-newlang*
|
||||
*b:match_words*
|
||||
|
||||
103
runtime/pack/dist/opt/matchit/plugin/matchit.vim
vendored
103
runtime/pack/dist/opt/matchit/plugin/matchit.vim
vendored
@@ -1,7 +1,7 @@
|
||||
" matchit.vim: (global plugin) Extended "%" matching
|
||||
" Maintainer: Christian Brabandt
|
||||
" Version: 1.18
|
||||
" Last Change: 2020 Dec 23
|
||||
" Version: 1.19
|
||||
" Last Change: 2023, June 28th
|
||||
" Repository: https://github.com/chrisbra/matchit
|
||||
" Previous URL:http://www.vim.org/script.php?script_id=39
|
||||
" Previous Maintainer: Benji Fisher PhD <benji@member.AMS.org>
|
||||
@@ -46,44 +46,65 @@ let g:loaded_matchit = 1
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
nnoremap <silent> <Plug>(MatchitNormalForward) :<C-U>call matchit#Match_wrapper('',1,'n')<CR>
|
||||
nnoremap <silent> <Plug>(MatchitNormalBackward) :<C-U>call matchit#Match_wrapper('',0,'n')<CR>
|
||||
xnoremap <silent> <Plug>(MatchitVisualForward) :<C-U>call matchit#Match_wrapper('',1,'v')<CR>
|
||||
\:if col("''") != col("$") \| exe ":normal! m'" \| endif<cr>gv``
|
||||
xnoremap <silent> <Plug>(MatchitVisualBackward) :<C-U>call matchit#Match_wrapper('',0,'v')<CR>m'gv``
|
||||
onoremap <silent> <Plug>(MatchitOperationForward) :<C-U>call matchit#Match_wrapper('',1,'o')<CR>
|
||||
onoremap <silent> <Plug>(MatchitOperationBackward) :<C-U>call matchit#Match_wrapper('',0,'o')<CR>
|
||||
|
||||
" Analogues of [{ and ]} using matching patterns:
|
||||
nnoremap <silent> <Plug>(MatchitNormalMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>
|
||||
nnoremap <silent> <Plug>(MatchitNormalMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>
|
||||
xnoremap <silent> <Plug>(MatchitVisualMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>m'gv``
|
||||
xnoremap <silent> <Plug>(MatchitVisualMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>m'gv``
|
||||
onoremap <silent> <Plug>(MatchitOperationMultiBackward) :<C-U>call matchit#MultiMatch("bW", "o")<CR>
|
||||
onoremap <silent> <Plug>(MatchitOperationMultiForward) :<C-U>call matchit#MultiMatch("W", "o")<CR>
|
||||
|
||||
" text object:
|
||||
xmap <silent> <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward)
|
||||
|
||||
if !exists("g:no_plugin_maps")
|
||||
nmap <silent> % <Plug>(MatchitNormalForward)
|
||||
nmap <silent> g% <Plug>(MatchitNormalBackward)
|
||||
xmap <silent> % <Plug>(MatchitVisualForward)
|
||||
xmap <silent> g% <Plug>(MatchitVisualBackward)
|
||||
omap <silent> % <Plug>(MatchitOperationForward)
|
||||
omap <silent> g% <Plug>(MatchitOperationBackward)
|
||||
fun MatchEnable()
|
||||
nnoremap <silent> <Plug>(MatchitNormalForward) :<C-U>call matchit#Match_wrapper('',1,'n')<CR>
|
||||
nnoremap <silent> <Plug>(MatchitNormalBackward) :<C-U>call matchit#Match_wrapper('',0,'n')<CR>
|
||||
xnoremap <silent> <Plug>(MatchitVisualForward) :<C-U>call matchit#Match_wrapper('',1,'v')<CR>
|
||||
\:if col("''") != col("$") \| exe ":normal! m'" \| endif<cr>gv``
|
||||
xnoremap <silent> <Plug>(MatchitVisualBackward) :<C-U>call matchit#Match_wrapper('',0,'v')<CR>m'gv``
|
||||
onoremap <silent> <Plug>(MatchitOperationForward) :<C-U>call matchit#Match_wrapper('',1,'o')<CR>
|
||||
onoremap <silent> <Plug>(MatchitOperationBackward) :<C-U>call matchit#Match_wrapper('',0,'o')<CR>
|
||||
|
||||
" Analogues of [{ and ]} using matching patterns:
|
||||
nmap <silent> [% <Plug>(MatchitNormalMultiBackward)
|
||||
nmap <silent> ]% <Plug>(MatchitNormalMultiForward)
|
||||
xmap <silent> [% <Plug>(MatchitVisualMultiBackward)
|
||||
xmap <silent> ]% <Plug>(MatchitVisualMultiForward)
|
||||
omap <silent> [% <Plug>(MatchitOperationMultiBackward)
|
||||
omap <silent> ]% <Plug>(MatchitOperationMultiForward)
|
||||
nnoremap <silent> <Plug>(MatchitNormalMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>
|
||||
nnoremap <silent> <Plug>(MatchitNormalMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>
|
||||
xnoremap <silent> <Plug>(MatchitVisualMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>m'gv``
|
||||
xnoremap <silent> <Plug>(MatchitVisualMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>m'gv``
|
||||
onoremap <silent> <Plug>(MatchitOperationMultiBackward) :<C-U>call matchit#MultiMatch("bW", "o")<CR>
|
||||
onoremap <silent> <Plug>(MatchitOperationMultiForward) :<C-U>call matchit#MultiMatch("W", "o")<CR>
|
||||
|
||||
" Text object
|
||||
xmap a% <Plug>(MatchitVisualTextObject)
|
||||
endif
|
||||
" text object:
|
||||
xmap <silent> <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward)
|
||||
|
||||
if !exists("g:no_plugin_maps")
|
||||
nmap <silent> % <Plug>(MatchitNormalForward)
|
||||
nmap <silent> g% <Plug>(MatchitNormalBackward)
|
||||
xmap <silent> % <Plug>(MatchitVisualForward)
|
||||
xmap <silent> g% <Plug>(MatchitVisualBackward)
|
||||
omap <silent> % <Plug>(MatchitOperationForward)
|
||||
omap <silent> g% <Plug>(MatchitOperationBackward)
|
||||
|
||||
" Analogues of [{ and ]} using matching patterns:
|
||||
nmap <silent> [% <Plug>(MatchitNormalMultiBackward)
|
||||
nmap <silent> ]% <Plug>(MatchitNormalMultiForward)
|
||||
xmap <silent> [% <Plug>(MatchitVisualMultiBackward)
|
||||
xmap <silent> ]% <Plug>(MatchitVisualMultiForward)
|
||||
omap <silent> [% <Plug>(MatchitOperationMultiBackward)
|
||||
omap <silent> ]% <Plug>(MatchitOperationMultiForward)
|
||||
|
||||
" Text object
|
||||
xmap a% <Plug>(MatchitVisualTextObject)
|
||||
endif
|
||||
endfun
|
||||
|
||||
fun MatchDisable()
|
||||
" remove all the setup keymappings
|
||||
nunmap %
|
||||
nunmap g%
|
||||
xunmap %
|
||||
xunmap g%
|
||||
ounmap %
|
||||
ounmap g%
|
||||
|
||||
nunmap [%
|
||||
nunmap ]%
|
||||
xunmap [%
|
||||
xunmap ]%
|
||||
ounmap [%
|
||||
ounmap ]%
|
||||
|
||||
xunmap a%
|
||||
endfun
|
||||
|
||||
" Call this function to turn on debugging information. Every time the main
|
||||
" script is run, buffer variables will be saved. These can be used directly
|
||||
@@ -91,6 +112,14 @@ endif
|
||||
if !exists(":MatchDebug")
|
||||
command! -nargs=0 MatchDebug call matchit#Match_debug()
|
||||
endif
|
||||
if !exists(":MatchDisable")
|
||||
command! -nargs=0 MatchDisable :call MatchDisable()
|
||||
endif
|
||||
if !exists(":MatchEnable")
|
||||
command! -nargs=0 MatchEnable :call MatchEnable()
|
||||
endif
|
||||
|
||||
call MatchEnable()
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
@@ -1401,9 +1401,19 @@ func s:CreateBreakpoint(id, subid, enabled)
|
||||
else
|
||||
let hiName = "debugBreakpoint"
|
||||
endif
|
||||
let label = ''
|
||||
if exists('g:termdebug_config')
|
||||
let label = get(g:termdebug_config, 'sign', '')
|
||||
endif
|
||||
if label == ''
|
||||
let label = substitute(nr, '\..*', '', '')
|
||||
if strlen(label) > 2
|
||||
let label = strpart(label, strlen(label) - 2)
|
||||
endif
|
||||
endif
|
||||
call sign_define('debugBreakpoint' .. nr,
|
||||
\ #{text: substitute(nr, '\..*', '', ''),
|
||||
\ texthl: hiName})
|
||||
\ #{text: strpart(label, 0, 2),
|
||||
\ texthl: hiName})
|
||||
endif
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ function s:ManPager()
|
||||
setlocal modifiable
|
||||
|
||||
" Emulate 'col -b'
|
||||
silent! keepj keepp %s/\v(.)\b\ze\1?//ge
|
||||
exe 'silent! keepj keepp %s/\v(.)\b\ze\1?//e' .. (&gdefault ? '' : 'g')
|
||||
|
||||
" Remove ansi sequences
|
||||
silent! keepj keepp %s/\v\e\[%(%(\d;)?\d{1,2})?[mK]//ge
|
||||
exe 'silent! keepj keepp %s/\v\e\[%(%(\d;)?\d{1,2})?[mK]//e' .. (&gdefault ? '' : 'g')
|
||||
|
||||
" Remove empty lines above the header
|
||||
call cursor(1, 1)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: EditorConfig
|
||||
" Maintainer: Gregory Anders <greg@gpanders.com>
|
||||
" Last Change: 2023-01-03
|
||||
" Last Change: 2023-07-20
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
@@ -10,7 +10,7 @@ endif
|
||||
runtime! syntax/dosini.vim
|
||||
unlet! b:current_syntax
|
||||
|
||||
syntax match editorconfigUnknownProperty "^\s*\zs\w\+\ze\s*="
|
||||
syntax match editorconfigUnknownProperty "^\s*\zs[a-zA-Z0-9_-]\+\ze\s*="
|
||||
|
||||
syntax keyword editorconfigProperty root charset end_of_line indent_style
|
||||
syntax keyword editorconfigProperty indent_size tab_width max_line_length
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Kuka Robot Language
|
||||
" Maintainer: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
|
||||
" Version: 3.0.0
|
||||
" Last Change: 18. Apr 2022
|
||||
" Last Change: 22. Jun 2023
|
||||
" Credits: Thanks for contributions to this to Michael Jagusch
|
||||
" Thanks for beta testing to Thomas Baginski
|
||||
"
|
||||
@@ -109,11 +109,11 @@ highlight default link krlGeomOperator Operator
|
||||
|
||||
" Type, StorageClass and Typedef {{{
|
||||
" Simple data types
|
||||
syn keyword krlType bool char real int containedin=krlAnyType
|
||||
syn keyword krlType bool char real int
|
||||
" External program and function
|
||||
syn keyword krlType ext extfct extfctp extp containedin=krlAnyType
|
||||
syn keyword krlType ext extfct extfctp extp
|
||||
" Communication
|
||||
syn keyword krlType signal channel containedin=krlAnyType
|
||||
syn keyword krlType signal channel
|
||||
highlight default link krlType Type
|
||||
" StorageClass
|
||||
syn keyword krlStorageClass decl global const struc enum
|
||||
@@ -200,19 +200,20 @@ syn keyword krlEnum adap_acc model_type control_parameter eko_mode
|
||||
"
|
||||
" Predefined structures and enums found in /steu/mada/$custom.dat
|
||||
syn keyword krlStructure pro_io_t ser ext_mod_t coop_krc ws_config bin_type coop_update_t ldc_reaction
|
||||
syn keyword krlEnum axis_of_coordinates spline_para_variant target_status cp_vel_type cp_statmon
|
||||
syn keyword krlEnum axis_of_coordinates motion_mode spline_para_variant spreadstartpolicy target_status cp_vel_type cp_statmon
|
||||
"
|
||||
" Predefined structures and enums found in /steu/mada/$machine.dat
|
||||
syn keyword krlStructure emstop_path boxstatesafein boxstatesafeout
|
||||
syn keyword krlEnum digincode
|
||||
"
|
||||
" Predefined structures and enums found in /steu/mada/$option.dat
|
||||
syn keyword krlStructure msg_t
|
||||
syn keyword krlStructure installed_motion_modes msg_t
|
||||
syn keyword krlEnum step_enum
|
||||
" syn keyword krlEnum
|
||||
"
|
||||
" Predefined structures and enums found in /r1/system/$config.dat
|
||||
" BasisTech
|
||||
syn keyword krlStructure dig_out_type ctrl_in_t ctrl_out_t fct_out_t fct_in_t odat basis_sugg_t out_sugg_t md_state machine_def_t machine_tool_t machine_frame_t trigger_para constvel_para condstop_para adat tm_sugg_t tqm_tqdat_t sps_prog_type
|
||||
syn keyword krlStructure dig_out_type ctrl_in_t ctrl_out_t fct_out_t fct_in_t odat hdat basis_sugg_t out_sugg_t md_state machine_def_t machine_tool_t machine_frame_t trigger_para constvel_para condstop_para adat tm_sugg_t tqm_tqdat_t sps_prog_type
|
||||
syn keyword krlEnum bas_command out_modetype ipo_m_t apo_mode_t funct_type p00_command timer_actiontype
|
||||
"
|
||||
" GripperTech
|
||||
@@ -271,7 +272,9 @@ highlight default link krlStatement Statement
|
||||
syn keyword krlConditional if then else endif switch case default endswitch skip endskip
|
||||
highlight default link krlConditional Conditional
|
||||
" Repeat
|
||||
syn keyword krlRepeat for to step endfor while endwhile repeat until loop endloop exit
|
||||
syn keyword krlRepeat for to endfor while endwhile repeat until loop endloop exit
|
||||
" STEP is used as variable in VKRC, this pattern should match STEP -, 5(constant number) or VAR
|
||||
syn match krlRepeat /\v\cstep\s+%(-|\w)/me=e-1
|
||||
highlight default link krlRepeat Repeat
|
||||
" Label
|
||||
syn keyword krlLabel goto
|
||||
@@ -390,7 +393,7 @@ if get(g:, 'krlShowError', 1)
|
||||
" some more or less common typos
|
||||
"
|
||||
" vars or funcs >24 chars are not possible in krl. a234567890123456789012345
|
||||
syn match krlError0 /\w\{25,}/ containedin=krlFunction,krlNames,krlLabel,krlAnyType,krlEnumVal,krlSysvars
|
||||
syn match krlError0 /\w\{25,}/ containedin=krlFunction,krlNames,krlLabel,krlEnumVal,krlSysvars
|
||||
"
|
||||
" should be interrupt (on|off) \w+
|
||||
syn match krlError1 /\vinterrupt[ \t(]+[_$a-zA-Z0-9]+[_$a-zA-Z0-9.\[\]()+\-*/]*[ \t)]+o%(n|ff)>/
|
||||
|
||||
687
runtime/syntax/rapid.vim
Normal file
687
runtime/syntax/rapid.vim
Normal file
@@ -0,0 +1,687 @@
|
||||
" ABB Rapid Command syntax file for Vim
|
||||
" Language: ABB Rapid Command
|
||||
" Maintainer: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de>
|
||||
" Version: 2.3.0
|
||||
" Last Change: 21. Jul 2023
|
||||
" Credits: Thanks for beta testing to Thomas Baginski
|
||||
"
|
||||
" Suggestions of improvement are very welcome. Please email me!
|
||||
"
|
||||
"
|
||||
"
|
||||
" Note to self:
|
||||
" for testing perfomance
|
||||
" open a 1000 lines file.
|
||||
" :syntime on
|
||||
" G
|
||||
" hold down CTRL-U until reaching top
|
||||
" :syntime report
|
||||
"
|
||||
"
|
||||
" TODO: - highlight rapid constants and maybe constants from common
|
||||
" technology packages
|
||||
" - optimize rapidErrorStringTooLong
|
||||
" - error highlight for missing 2nd point in MoveCirc et al
|
||||
|
||||
" Init {{{
|
||||
" Remove any old syntax stuff that was loaded (5.x) or quit when a syntax file
|
||||
" was already loaded (6.x).
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" if colorscheme is tortus rapidNoHighLink defaults to 1
|
||||
if (get(g:,'colors_name'," ")=="tortus" || get(g:,'colors_name'," ")=="tortusless")
|
||||
\&& !exists("g:rapidGroupName")
|
||||
let g:rapidGroupName=1
|
||||
endif
|
||||
" rapidGroupName defaults to 0 if it's not initialized yet or 0
|
||||
if !get(g:,"rapidGroupName",0)
|
||||
let g:rapidGroupName=0
|
||||
endif
|
||||
|
||||
" Rapid does ignore case
|
||||
syn case ignore
|
||||
" spell checking
|
||||
syn spell notoplevel
|
||||
" }}} init
|
||||
|
||||
" common highlighting {{{
|
||||
|
||||
" Error {{{
|
||||
if get(g:,'rapidShowError',1)
|
||||
"
|
||||
" This error must be defined befor rapidCharCode and rapidEscapedBackSlash
|
||||
" a string containing a single \ which is not a char code
|
||||
syn match rapidErrorSingleBackslash /\\/ contained
|
||||
highlight default link rapidErrorSingleBackslash Error
|
||||
"
|
||||
endif
|
||||
" }}} Error
|
||||
|
||||
" Constant values {{{
|
||||
" Boolean
|
||||
syn keyword rapidBoolean TRUE FALSE Edge High Low
|
||||
highlight default link rapidBoolean Boolean
|
||||
" Float (num)
|
||||
" syn match rapidFloat /\v%(\W|_)@1<=[+-]?\d+\.?\d*%(\s*[eE][+-]?\d+)?/
|
||||
syn match rapidFloat /\v\c%(<\d+\.|\.?<\d)\d*%(E[+-]?\d+)?>/ contains=rapidOperator
|
||||
highlight default link rapidFloat Float
|
||||
" integer in decimal, hexadecimal, octal and binary
|
||||
syn match rapidDec /\<[0-9]\+\>/
|
||||
highlight default link rapidDec Number
|
||||
syn match rapidHex /\<0x[0-9a-fA-F]\+\>/
|
||||
highlight default link rapidHex Number
|
||||
syn match rapidOct /\<0o[0-7]\+\>/
|
||||
highlight default link rapidOct Number
|
||||
syn match rapidBin /\<0b[01]\+\>/
|
||||
highlight default link rapidBin Number
|
||||
" String. Note: Don't rename group rapidString. Indent depend on this
|
||||
syn region rapidString matchgroup=rapidString start=/"/ skip=/""/ end=/"/ oneline contains=rapidStringDoubleQuote,rapidEscapedBackSlash,rapidCharCode,rapidErrorSingleBackslash,rapidErrorStringTooLong,@Spell
|
||||
highlight default link rapidString String
|
||||
" two adjacent "" in string for one double quote
|
||||
syn match rapidStringDoubleQuote /""/ contained
|
||||
highlight default link rapidStringDoubleQuote SpecialChar
|
||||
" character code in string
|
||||
syn match rapidCharCode /\\\x\x/ contained
|
||||
highlight default link rapidCharCode SpecialChar
|
||||
" escaped \ in string
|
||||
syn match rapidEscapedBackSlash /\\\\/ contained
|
||||
highlight default link rapidEscapedBackSlash SpecialChar
|
||||
" }}} Constant values
|
||||
|
||||
" }}} common highlighting
|
||||
|
||||
if bufname("%") =~ '\c\.cfg$'
|
||||
" {{{ highlighting for *.cfg
|
||||
|
||||
" special chars {{{
|
||||
" syn match rapidOperator /:\|[+-]\|\*\|\/\|\\/
|
||||
syn match rapidOperator /[-+*/:\\]/
|
||||
syn match rapidOperator /^#/
|
||||
highlight default link rapidOperator Operator
|
||||
" }}} special chars
|
||||
|
||||
" sections {{{
|
||||
syn match rapidException /^\w\+/
|
||||
syn match rapidException /CFG_\d\+/
|
||||
highlight default link rapidException Exception
|
||||
" }}} sections
|
||||
|
||||
" Error {{{
|
||||
if get(g:,'rapidShowError',1)
|
||||
"
|
||||
" This error must be defined after rapidString
|
||||
" Any Name longer than 32 chars
|
||||
syn match rapidErrorNameTooLong /-Name "[^"]\{33,}"/
|
||||
highlight default link rapidErrorNameTooLong Error
|
||||
"
|
||||
endif
|
||||
" }}} Error
|
||||
|
||||
" }}} highlighting for *.cfg
|
||||
else
|
||||
" highlighting for *.mod, *.sys and *.prg {{{
|
||||
|
||||
" sync for regions from a line comment or the start of a function
|
||||
syn sync match rapidSync grouphere NONE /\v\c^\s*%(!|%(task\s+|local\s+)?%(module|proc|func|trap|record)>)/
|
||||
|
||||
" Comment {{{
|
||||
" TODO Comment
|
||||
syn match rapidTodoComment contained /\<TODO\>\|\<FIXME\>\|\<XXX\>/
|
||||
highlight default link rapidTodoComment Todo
|
||||
" Debug comment
|
||||
syn match rapidDebugComment contained /\<DEBUG\>/
|
||||
highlight default link rapidDebugComment Debug
|
||||
" Line comment
|
||||
syn match rapidComment /!.*$/ contains=rapidTodoComment,rapidDebugComment,@Spell
|
||||
highlight default link rapidComment Comment
|
||||
" }}} Comment
|
||||
|
||||
" Header {{{
|
||||
syn match rapidHeader /^%%%/
|
||||
highlight default link rapidHeader PreProc
|
||||
" }}} Header
|
||||
|
||||
" Operator {{{
|
||||
" Boolean operator
|
||||
syn keyword rapidOperator and or xor not div mod
|
||||
" Arithmetic and compare operator
|
||||
syn match rapidOperator /[-+*/<>:=]/
|
||||
" conditional argument
|
||||
syn match rapidOperator /?/
|
||||
highlight default link rapidOperator Operator
|
||||
" }}} Operator
|
||||
|
||||
" Type, StorageClass and Typedef {{{
|
||||
" anytype (preceded by 'alias|pers|var|const|func'
|
||||
" TODO: still missing are userdefined types which are part of a parameter:
|
||||
" PROC message( mystring msMessagePart1{},
|
||||
" \ myvar msMsg4{})
|
||||
" TODO testing. Problem: does not highlight any type if it's part of an argument list
|
||||
" syn match rapidAnyType /\v^\s*(global\s+|task\s+|local\s+)?(alias|pers|var|const|func)\s+\w+>/ contains=rapidStorageClass,rapidType,rapidTypeDef
|
||||
" highlight default link rapidAnyType Type
|
||||
syn keyword rapidType accdata aiotrigg bool btnres busstate buttondata byte
|
||||
syn keyword rapidType cfgdomain clock cnvcmd confdata confsupdata corrdescr datapos deflectiondata dionum dir dnum
|
||||
syn keyword rapidType egmframetype egmident egm_minmax egmstate egmstopmode errdomain errnum ErrorInfo errstr errtype event_type exec_level extjoint handler_type
|
||||
syn keyword rapidType icondata identno inposdata intnum inttypes iodev iounit_state jointtarget
|
||||
syn keyword rapidType listitem loaddata loadidnum loadsession mecunit motionprocessmode motsetdata
|
||||
" syn keyword rapidType num
|
||||
syn keyword rapidType opcalc opnum orient paridnum paridvalidnum pathrecid pnpdata pos pose proc_times progdisp o_jointtarget o_robtarget
|
||||
syn keyword rapidType rawbytes restartdata rmqheader rmqmessage rmqslot robjoint robtarget
|
||||
syn keyword rapidType searchdata sensor sensorstate sensorvardata shapedata signalai signalao signaldi signaldo signalgi signalgo signalorigin singdata socketdev socketstatus speeddata stopmovestartmove_mem stoppoint stoppointdata string stringdig sup_timeouts supervtype switch symnum syncident
|
||||
syn keyword rapidType taskid tasks tasksatstart testsignal tooldata tpnum trapdata triggdata triggflag triggios triggiosdnum triggmode triggstrgo tsp_status tunegtype tunetype
|
||||
syn keyword rapidType uishownum veldata visiondata wobjdata wzstationary wztemporary zonedata
|
||||
" SoftMove data types
|
||||
syn keyword rapidType css_offset_dir css_soft_dir cssframe
|
||||
" arc data types
|
||||
syn keyword rapidType advSeamData arcdata flystartdata seamdata arctrackdata opttrackdata weavedata welddata
|
||||
" conveyor tracking data types
|
||||
syn keyword rapidType indcnvdata
|
||||
" Integrated Vision data types
|
||||
syn keyword rapidType cameradev cameratarget
|
||||
" arc Weldguide and MultiPass data types
|
||||
syn keyword rapidType adaptdata trackdata multidata
|
||||
" dispense data types
|
||||
syn keyword rapidType beaddata equipdata
|
||||
" Spot data types
|
||||
syn keyword rapidType gundata gunnum spotdata forcedata simdata smeqdata smeqtype
|
||||
" Tool change data types
|
||||
syn keyword rapidType standno ToolInfo toolno
|
||||
" Continuous Application Platform data types
|
||||
syn keyword rapidType capaptrreferencedata capdata capevent caplatrackdata capmvsttim capspeeddata capspeeddata capstopmode captestno captrackdata capweavedata flypointdata processtimes restartblkdata supervtimeouts weavestartdata
|
||||
" Bulls Eye data types
|
||||
syn keyword rapidType be_device be_scan be_tooldesign
|
||||
" Force Control data types
|
||||
syn keyword rapidType fcboxvol fccondstatus fccylindervol fcdamping fcforcevector fcframe fclindir fcprocessdata fcplane fcrotdir fcspeedvector fcspherevol fcspdchgtunetype fcxyznum
|
||||
" Discrete application platform data types
|
||||
syn keyword rapidType dadescapp dadescprc daintdata
|
||||
" VW Konzernstandard VWKS_1.07.02
|
||||
syn keyword rapidType merker
|
||||
syn keyword rapidType frgnum frgwert robnum
|
||||
syn keyword rapidType fmnum applid calibdatavorr stepdata
|
||||
syn keyword rapidType tsmethode tsdaten teilspeicherdaten
|
||||
syn keyword rapidType greiferdaten greiferposition bauteildaten bauteilkontrolle g_datenident g_sensor g_signal g_teilident g_ventil
|
||||
syn keyword rapidType strgnum typnum
|
||||
syn keyword rapidType hubnum kopfnum
|
||||
syn keyword rapidType applservicetype
|
||||
syn keyword rapidType applfraesdaten kwdionum
|
||||
syn keyword rapidType butechnum
|
||||
syn keyword rapidType toolnum dbnum
|
||||
" das folgende sind datentypen aber das kann man doch nicht machen...
|
||||
" syn keyword rapidType position wert
|
||||
syn keyword rapidType camdata camlimitdata cammode camprotocoldata camstatus camsequence campositionstatus
|
||||
syn keyword rapidType saposnum sabereichnum autofocusnum focusposnum lascaledata laleistungnum larobnum laprognum uebwnum dgbanum dgjobnum gasspuelnum davalve gasuebwnum
|
||||
syn keyword rapidType lsfigurnum lsstarttype
|
||||
syn keyword rapidType lwprognum lwdiodnum lsstarttype
|
||||
syn keyword rapidType lztype diskrethubnum lztipnum
|
||||
syn keyword rapidType gblmethod
|
||||
syn keyword rapidType buatypenum buatechnum buadirnum
|
||||
highlight default link rapidType Type
|
||||
" Storage class
|
||||
syn keyword rapidStorageClass LOCAL TASK VAR PERS CONST ALIAS NOVIEW NOSTEPIN VIEWONLY READONLY SYSMODULE INOUT
|
||||
highlight default link rapidStorageClass StorageClass
|
||||
" Not a typedef but I like to have those highlighted different then types,
|
||||
" structures or strorage classes
|
||||
syn keyword rapidTypeDef MODULE ENDMODULE PROC ERROR UNDO BACKWARD ENDPROC RECORD ENDRECORD TRAP ENDTRAP FUNC ENDFUNC
|
||||
highlight default link rapidTypeDef TypeDef
|
||||
" }}} Type, StorageClass and Typedef
|
||||
|
||||
" Statements, keywords et al {{{
|
||||
" syn keyword rapidStatement
|
||||
" highlight default link rapidStatement Statement
|
||||
" Conditional
|
||||
syn keyword rapidConditional if then elseif else endif test case default endtest
|
||||
highlight default link rapidConditional Conditional
|
||||
" Repeat
|
||||
syn keyword rapidRepeat do
|
||||
syn match rapidRepeat /\c\v^\s*%(<while>|<for>)%([^!]+<do>)@=/
|
||||
syn keyword rapidRepeat from to step endfor endwhile
|
||||
highlight default link rapidRepeat Repeat
|
||||
" Label
|
||||
syn keyword rapidLabel goto
|
||||
syn match rapidLabel /\c\v^\s*[[:upper:][:lower:]]\k*\:\ze%([^=]|$)/ contains=rapidConditional,rapidOperator
|
||||
highlight default link rapidLabel Label
|
||||
" Keyword
|
||||
syn keyword rapidKeyword AccSet ActEventBuffer ActUnit Add AliasCamera AliasIO AliasIOReset BitClear BitSet BookErrNo BrakeCheck
|
||||
syn keyword rapidKeyword CallByVar CancelLoad CheckProgRef CirPathMode Clear ClearIOBuff ClearPath ClearRawBytes ClkReset ClkStart ClkStop Close CloseDir ConfJ ConfL CONNECT CopyFile CopyRawBytes CornerPathWarning CorrClear CorrCon CorrDiscon CorrWrite
|
||||
syn keyword rapidKeyword CSSAct CSSDeact CSSForceOffsetAct CSSForceOffsetDeact CSSOffsetTune CyclicBrakeCheck
|
||||
syn keyword rapidKeyword DeactEventBuffer DeactUnit Decr DitherAct DitherDeact DropSensor
|
||||
syn keyword rapidKeyword EGMActJoint EGMActMove EGMActPose EGMGetId EGMReset EGMSetupAI EGMSetupAO EGMSetupGI EGMSetupLTAPP EGMSetupUC EOffsOff EOffsOn EOffsSet EraseModule ErrLog ErrWrite
|
||||
syn keyword rapidKeyword FitCircle FricIdInit FricIdEvaluate FricIdSetFricLevels
|
||||
syn keyword rapidKeyword GetDataVal GetGroupSignalInfo GetJointData GetSysData GetTorqueMargin GetTrapData GripLoad HollowWristReset
|
||||
syn keyword rapidKeyword IDelete IDisable IEnable IError Incr IndReset InvertDO IOBusStart IOBusState IoCtrlAxis_RefSync IoCtrlAxis_RefSyncOff IoCtrlAxis_RefSyncOn IODisable IOEnable IPers IRMQMessage ISignalAI ISignalAO ISignalDI ISignalDO ISignalGI ISignalGO ISleep ITimer IVarValue IWatch
|
||||
syn keyword rapidKeyword Load LoadId MakeDir ManLoadIdProc MatrixSolve MatrixSolveQR MatrixSVD MechUnitLoad MotionProcessModeSet MotionSup MToolRotCalib MToolTCPCalib Open OpenDir
|
||||
syn keyword rapidKeyword PackDNHeader PackRawBytes PathAccLim PathLengthReset PathLengthStart PathLengthStop PathRecStart PathRecStop PathResol PDispOff PDispOn PDispSet ProcerrRecovery PrxActivAndStoreRecord PrxActivRecord PrxDbgStoreRecord PrxDeactRecord PrxResetPos PrxResetRecords PrxSetPosOffset PrxSetRecordSampleTime PrxSetSyncalarm PrxStartRecord PrxStopRecord PrxStoreRecord PrxUseFileRecord PulseDO
|
||||
syn keyword rapidKeyword ReadAnyBin ReadBlock ReadCfgData ReadErrData ReadRawBytes ReadVarArr RemoveAllCyclicBool RemoveCyclicBool RemoveDir RemoveFile RenameFile Reset ResetAxisDistance ResetAxisMoveTime ResetPPMoved ResetRetryCount ResetTorqueMargin RestoPath Rewind RMQEmptyQueue RMQFindSlot RMQGetMessage RMQGetMsgData RMQGetMsgHeader RMQReadWait RMQSendMessage RMQSendWait
|
||||
syn keyword rapidKeyword SafetyControllerSyncRequest Save SaveCfgData SCWrite SenDevice Set SetAllDataVal SetAO SetDataSearch SetDataVal SetDO SetGO SetLeadThrough SetSysData SetupCyclicBool SiConnect SiClose SiGetCyclic SingArea SiSetCyclic SkipWarn SocketAccept SocketBind SocketClose SocketConnect SocketCreate SocketListen SocketReceive SocketReceiveFrom SocketSend SocketSendTo SoftAct SoftDeact SoftElbow SpeedLimAxis SpeedLimCheckPoint SpeedRefresh SpyStart SpyStop StartLoad STCalib STClose STIndGun STIndGunReset SToolRotCalib SToolTCPCalib STOpen StorePath STTune STTuneReset SupSyncSensorOff SupSyncSensorOn SyncMoveOff SyncMoveOn SyncMoveResume SyncMoveSuspend SyncMoveUndo SyncToSensor SystemStopAction
|
||||
syn keyword rapidKeyword TestSignDefine TestSignReset TextTabInstall TPErase TPReadDnum TPReadFK TPReadNum TPShow TPWrite TriggCheckIO TriggDataCopy TriggDataReset TriggEquip TriggInt TriggIO TriggRampAO TriggSpeed TriggStopProc TryInt TuneReset TuneServo
|
||||
syn keyword rapidKeyword UIMsgBox UIMsgWrite UIMsgWriteAbort UIShow UnLoad UnpackRawBytes VelSet WaitAI WaitAO WaitDI WaitDO WaitGI WaitGO WaitLoad WaitRob WaitSensor WaitSyncTask WaitTestAndSet WaitTime WaitUntil WarmStart WITH WorldAccLim Write WriteAnyBin WriteBin WriteBlock WriteCfgData WriteRawBytes WriteStrBin WriteVar WriteVarArr WZBoxDef WZCylDef WZDisable WZDOSet WZEnable WZFree WZHomeJointDef WZLimJointDef WZLimSup WZSphDef
|
||||
" arc instructions
|
||||
syn keyword rapidKeyword ArcRefresh RecoveryMenu RecoveryMenuWR RecoveryPosSet RecoveryPosReset SetWRProcName
|
||||
" conveyor tracking instructions
|
||||
syn keyword rapidKeyword UseACCProfile WaitWObj DropWObj RecordProfile WaitAndRecProf StoreProfile LoadProfile ActivateProfile DeactProfile CnvGenInstr CnvSync CnvGenInstr IndCnvInit IndCnvEnable IndCnvDisable IndCnvReset IndCnvAddObject
|
||||
syn keyword rapidKeyword UseReachableTargets GetMaxUsageTime ResetMaxUsageTime CnvPredictReach
|
||||
" Integrated Vision instructions
|
||||
syn keyword rapidKeyword CamFlush CamGetParameter CamGetResult CamLoadJob CamReqImage CamSetExposure CamSetParameter CamSetProgramMode CamSetRunMode CamStartLoadJob CamWaitLoadJob
|
||||
" arc Weldguide and MultiPass instructions
|
||||
syn keyword rapidKeyword MPSavePath MPLoadPath MPReadInPath MPOffsEaxOnPath
|
||||
" Paint instructions
|
||||
syn keyword rapidKeyword ConsoleWrite IpsSetParam PntProdUserLog SetBrush SetBrushFac
|
||||
" Spot instructions
|
||||
syn keyword rapidKeyword SetForce Calibrate ReCalcTCP IndGunMove IndGunMoveReset OpenHighLift CloseHighLift SwSetIntSpotData SwSetIntForceData SwSetIntGunData SwSetIntSimData SwGetCalibData SwGetFixTipData
|
||||
" Tool change instructions
|
||||
syn keyword rapidKeyword TcCloseCover TcDropOffTool TcLockTool TcOpenCover TcPickupTool TcUnlockTool
|
||||
" dispense instructions
|
||||
syn keyword rapidKeyword SetTmSignal SyncWWObj
|
||||
" Continuous Application Platform instructions
|
||||
syn keyword rapidKeyword CapAPTrSetup CapAPTrSetupAI CapAPTrSetupAO CapAPTrSetupPERS CapCondSetDO CapEquiDist CapNoProcess CapRefresh CAPSetStopMode CapWeaveSync ICap InitSuperv IPathPos RemoveSuperv SetupSuperv
|
||||
" Bulls Eye instructions
|
||||
syn keyword rapidKeyword BECheckTcp BEDebugState BERefPointer BESetupToolJ BETcpExtend BEUpdateTcp
|
||||
" Force Control instructions
|
||||
syn keyword rapidKeyword FCAct FCCalib FCCondForce FCCondOrient FCCondPos FCCondReoriSpeed FCCondTCPSpeed FCCondTorque FCCondWaitWhile FCDeact FCPress1LStart FCPressC FCPressEnd FCPressL FCRefCircle FCRefForce FCRefLine FCRefMoveFrame FCRefRot FCRefSpiral FCRefSprForceCart FCRefStart FCRefStop FCRefTorque FCResetDampingTune FCResetLPFilterTune FCSpdChgAct FCSpdChgDeact FCSpdChgTunSet FCSpdChgTunReset FCSetDampingTune FCSetLPFilterTune FCSupvForce FCSupvOrient FCSupvPos FCSupvReoriSpeed FCSupvTCPSpeed FCSupvTorque
|
||||
" Discrete application platform instructions
|
||||
syn keyword rapidKeyword DaActProc DaDeactAllProc DaDeactProc DaDefExtSig DaDefProcData DaDefProcSig DaDefUserData DaGetCurrData DaSetCurrData DaSetupAppBehav DaStartManAction DaGetAppDescr DaGetAppIndex DaGetNumOfProcs DaGetNumOfRob DaGetPrcDescr
|
||||
" Production Manager instructions
|
||||
syn keyword rapidKeyword ExecEngine PMgrGetNextPart PMgrSetNextPart PMgrRunMenu
|
||||
" Homepos-Running instructions
|
||||
syn keyword rapidKeyword HR_Exit HR_ExitCycle HR_SavePos HR_SetMoveToStartPos HR_SetTypeDIndex HR_SetTypeIndex
|
||||
highlight default link rapidKeyword Keyword
|
||||
" Exception
|
||||
syn keyword rapidException Exit ErrRaise ExitCycle Raise RaiseToUser Retry Return TryNext
|
||||
syn match rapidException /\s\+Stop\s*[\\;]/me=e-1
|
||||
highlight default link rapidException Exception
|
||||
" }}} Statements, keywords et al
|
||||
|
||||
" Special keyword for move command {{{
|
||||
" uncategorized yet
|
||||
syn keyword rapidMovement MovePnP
|
||||
syn keyword rapidMovement EGMMoveC EGMMoveL EGMRunJoint EGMRunPose EGMStop
|
||||
syn keyword rapidMovement IndAMove IndCMove IndDMove IndRMove
|
||||
" common instructions
|
||||
syn keyword rapidMovement MoveAbsJ MoveC MoveExtJ MoveJ MoveL
|
||||
syn keyword rapidMovement MoveCAO MoveCDO MoveCGO MoveCSync MoveJAO MoveJDO MoveJGO MoveJSync MoveLAO MoveLDO MoveLGO MoveLSync
|
||||
syn keyword rapidMovement SearchC SearchExtJ SearchL
|
||||
syn keyword rapidMovement TriggC TriggJ TriggL TriggJIOs TriggLIOs
|
||||
" Arc instructions
|
||||
syn keyword rapidMovement ArcC ArcC1 ArcC2 ArcCEnd ArcC1End ArcC2End ArcCStart ArcC1Start ArcC2Start
|
||||
syn keyword rapidMovement ArcL ArcL1 ArcL2 ArcLEnd ArcL1End ArcL2End ArcLStart ArcL1Start ArcL2Start ArcMoveExtJ
|
||||
" Arc Weldguide and MultiPass instructions
|
||||
syn keyword rapidMovement ArcRepL ArcAdaptLStart ArcAdaptL ArcAdaptC ArcAdaptLEnd ArcAdaptCEnd ArcCalcLStart ArcCalcL ArcCalcC ArcCalcLEnd ArcCalcCEnd ArcAdaptRepL
|
||||
syn keyword rapidMovement Break
|
||||
" Continuous Application Platform instructions
|
||||
syn keyword rapidMovement CapC CapL CapLATrSetup CSSDeactMoveL ContactL
|
||||
" Dispense instructions
|
||||
syn keyword rapidMovement DispL DispC
|
||||
" Nut instructions"
|
||||
syn keyword rapidMovement NutL NutJ
|
||||
syn keyword rapidMovement PathRecMoveBwd PathRecMoveFwd
|
||||
" Paint instructions"
|
||||
syn keyword rapidMovement PaintL PaintLSig PaintLDO PaintC
|
||||
syn keyword rapidMovement StartMove StartMoveRetry StepBwdPath StopMove StopMoveReset
|
||||
" Spot instructions
|
||||
syn keyword rapidMovement SpotL SpotJ SpotML SpotMJ CalibL CalibJ MeasureWearL
|
||||
" Homepos-Running instructions
|
||||
syn keyword rapidMovement SMoveJ SMoveJDO SMoveJGO SMoveJSync SMoveL SMoveLDO SMoveLGO SMoveLSync SSearchL STriggJ STriggL
|
||||
syn keyword rapidMovement HR_ContMove HR_MoveBack HR_MoveRoutine HR_MoveTo HR_MoveToHome SCSSDeactMoveL
|
||||
" Discrete application platform instructions
|
||||
syn keyword rapidMovement DaProcML DaProcMJ
|
||||
" VW Konzernstandard VWKS_1.07.02
|
||||
syn keyword rapidMovement MoveABS MoveABS_FB MoveABS_FRG MoveABS_ROB
|
||||
syn keyword rapidMovement MoveCIRC MoveCIRC_FB MoveCIRC_FRG MoveCIRC_ROB
|
||||
syn keyword rapidMovement MoveLIN MoveLIN_FB MoveLIN_FRG MoveLIN_ROB
|
||||
syn keyword rapidMovement MovePTP MovePTP_FB MovePTP_FRG MovePTP_ROB
|
||||
syn keyword rapidMovement SearchCIRC SearchCIRC_M
|
||||
syn keyword rapidMovement SearchLIN SearchLIN_M
|
||||
syn keyword rapidMovement MoveABS_AO MoveABS_DO MoveABS_GO
|
||||
syn keyword rapidMovement MoveCIRC_AO MoveCIRC_DO MoveCIRC_GO
|
||||
syn keyword rapidMovement MoveLIN_AO MoveLIN_DO MoveLIN_GO
|
||||
syn keyword rapidMovement KW_LoesenLIN
|
||||
syn keyword rapidMovement SPZ_FraesenLIN SPZ_FraesenPTP SPZ_MessenLIN SPZ_MessenPTP SPZ_LIN SPZ_PTP
|
||||
syn keyword rapidMovement BZ_LIN BZ_PTP
|
||||
syn keyword rapidMovement KL_LIN KL_CIRC
|
||||
syn keyword rapidMovement BP_LIN BP_PTP
|
||||
syn keyword rapidMovement BU_CIRC BU_LIN
|
||||
syn keyword rapidMovement CZ_LIN CZ_LIN_V CZ_PTP CZ_PTP_V
|
||||
syn keyword rapidMovement FD_LIN FD_PTP
|
||||
syn keyword rapidMovement KG_LIN KG_PTP
|
||||
syn keyword rapidMovement DA_LIN
|
||||
syn keyword rapidMovement LK_CIRC LK_LIN
|
||||
syn keyword rapidMovement LL_CIRC LL_LIN
|
||||
syn keyword rapidMovement LS_CIRC LS_LIN LS_LIN_F LS_PTP_F
|
||||
syn keyword rapidMovement LW_CIRC LW_LIN
|
||||
syn keyword rapidMovement LZ_LIN LZ_PTP LZ_ReinigenLIN LZ_ReinigenPTP
|
||||
syn keyword rapidMovement MS_CIRC MS_LIN MS_ReinigenLIN MS_SearchLIN MS_PTP_CS MS_LIN_CS GBL_LIN GBL_PTP GBL_RefPointLIN
|
||||
syn keyword rapidMovement NK_LIN
|
||||
syn keyword rapidMovement NZ_LIN NZ_LIN_V NZ_PTP NZ_PTP_V
|
||||
syn keyword rapidMovement PR_LIN PR_PTP
|
||||
syn keyword rapidMovement RF_CIRC RF_LIN
|
||||
syn keyword rapidMovement STP_FraesenLIN STP_FraesenPTP STP_LIN STP_PTP
|
||||
syn keyword rapidMovement SM_LIN SM_PTP
|
||||
syn keyword rapidMovement BUA_CIRC BUA_LIN BUA_MessenLIN BUA_MessenPTP
|
||||
syn keyword rapidMovement KE_LIN
|
||||
if g:rapidGroupName
|
||||
highlight default link rapidMovement Movement
|
||||
else
|
||||
highlight default link rapidMovement Special
|
||||
endif
|
||||
" }}} special keyword for move command
|
||||
|
||||
" Any name {{{
|
||||
syn match rapidNames /\v[[:upper:][:lower:]](\k|\.)*/
|
||||
" }}} Any name
|
||||
|
||||
" Attempt to avoid false highlight of num in case of parameter name:
|
||||
" TPWrite "goPosNo="\num:=GOutput(goPosNo);
|
||||
" Must follow after rapidNames in this file
|
||||
syn match rapidType /\c\v<num>\s*\ze[^ :]/
|
||||
|
||||
" Structure value {{{
|
||||
" rapid structrure values. added to be able to conceal them
|
||||
syn region rapidConcealableString matchgroup=rapidConcealableString start=/"/ skip=/""/ end=/"/ oneline keepend extend contained contains=rapidStringDoubleQuote,rapidEscapedBackSlash,rapidCharCode,rapidErrorSingleBackslash,rapidErrorStringTooLong,@Spell conceal
|
||||
highlight default link rapidConcealableString String
|
||||
syn region rapidStructVal matchgroup=rapidStructDelimiter start=/\[/ end=/\]/ contains=rapidStructVal,rapidBoolean,rapidDec,rapidHex,rapidOct,rapidBin,rapidFloat,rapidConcealableString,rapidDelimiter,rapidConstant,rapidErrNo,rapidIntNo,rapidOperator keepend extend conceal cchar=*
|
||||
highlight default link rapidStructDelimiter Delimiter
|
||||
" check edge cases like this one:
|
||||
" LOCAL CONST listitem lstAuswService{18}:=[["","Service Position"],["","Bremsentest"],["","Referenzfahrt"],["","Manuelles Abfahren"],["","Justagestellung"],["","Transportposition"],
|
||||
" ["","Spitze-Spitze Greifer 1, [RT]"],["","Spitze-Spitze Greifer 2, [FT]"],["","Spitze-Spitze Pruefspitze"],["","Werkobjekt Ablage"],["","Werkobjekt Modul 1"],
|
||||
" ["","Werkobjekt Modul 2"],["","TCP von Greifer 1 vermessen, [RT]"],["","TCP von Greifer 2 vermessen, [FT]"],["","TCP von Basisdorn vermessen"],
|
||||
" ["","Greifer abdocken"],["","Greifer andocken"],["","Kollision Check (Ohne Greifer)"]];
|
||||
" }}} Structure value
|
||||
|
||||
" Delimiter {{{
|
||||
syn match rapidDelimiter /[\\(){},;|]/
|
||||
highlight default link rapidDelimiter Delimiter
|
||||
" }}} Delimiter
|
||||
|
||||
" BuildInFunction {{{
|
||||
" dispense functions
|
||||
syn keyword rapidBuildInFunction contained GetSignal GetSignalDnum
|
||||
" Integrated Vision Platform functions
|
||||
syn keyword rapidBuildInFunction contained CamGetExposure CamGetLoadedJob CamGetName CamNumberOfResults
|
||||
" Continuous Application Platform functions
|
||||
syn keyword rapidBuildInFunction contained CapGetFailSigs
|
||||
syn keyword rapidBuildInFunction contained Abs AbsDnum ACos ACosDnum AInput AOutput ArgName ASin ASinDnum ATan ATanDnum ATan2 ATan2Dnum
|
||||
syn keyword rapidBuildInFunction contained BitAnd BitAndDnum BitCheck BitCheckDnum BitLSh BitLShDnum BitNeg BitNegDnum BitOr BitOrDnum BitRSh BitRShDnum BitXOr BitXOrDnum ByteToStr
|
||||
syn keyword rapidBuildInFunction contained CalcJointT CalcRobT CalcRotAxFrameZ CalcRotAxisFrame CDate CJointT ClkRead CorrRead Cos CosDnum CPos CRobT CrossProd CSpeedOverride CTime CTool CWObj
|
||||
syn keyword rapidBuildInFunction contained DecToHex DefAccFrame DefDFrame DefFrame Dim DInput Distance DnumToNum DnumToStr DotProd DOutput
|
||||
syn keyword rapidBuildInFunction contained EGMGetState EulerZYX EventType ExecHandler ExecLevel Exp
|
||||
syn keyword rapidBuildInFunction contained FileSize FileTime FileTimeDnum FSSize
|
||||
syn keyword rapidBuildInFunction contained GetAxisDistance GetAxisMoveTime GetMaxNumberOfCyclicBool GetMecUnitName GetModalPayLoadMode GetMotorTorque GetNextCyclicBool GetNextMechUnit GetNextSym GetNumberOfCyclicBool GetServiceInfo GetSignalOrigin GetSysInfo GetTaskName GetTime GetTSPStatus GetUASUserName GInput GInputDnum GOutput GOutputDnum
|
||||
syn keyword rapidBuildInFunction contained HexToDec
|
||||
syn keyword rapidBuildInFunction contained IndInpos IndSpeed IOUnitState IsBrakeCheckActive IsCyclicBool IsFile IsLeadThrough IsMechUnitActive IsPers IsStopMoveAct IsStopStateEvent IsSyncMoveOn IsSysId IsVar
|
||||
syn keyword rapidBuildInFunction contained Max MaxExtLinearSpeed MaxExtReorientSpeed MaxRobReorientSpeed MaxRobSpeed Min MirPos ModExist ModTime ModTimeDnum MotionPlannerNo
|
||||
syn keyword rapidBuildInFunction contained NonMotionMode NOrient NumToDnum NumToStr
|
||||
syn keyword rapidBuildInFunction contained Offs OpMode OrientZYX ORobT
|
||||
syn keyword rapidBuildInFunction contained ParIdPosValid ParIdRobValid PathLengthGet PathLevel PathRecValidBwd PathRecValidFwd PFRestart PoseInv PoseMult PoseVect Pow PowDnum PPMovedInManMode Present ProgMemFree PrxGetMaxRecordpos
|
||||
syn keyword rapidBuildInFunction contained RawBytesLen ReadBin ReadDir ReadMotor ReadNum ReadStr ReadStrBin ReadVar RelTool RemainingRetries RMQGetSlotName RobName RobOS Round RoundDnum RunMode
|
||||
syn keyword rapidBuildInFunction contained SafetyControllerGetChecksum SafetyControllerGetOpModePinCode SafetyControllerGetSWVersion SafetyControllerGetUserChecksum Sin SinDnum SocketGetStatus SocketPeek Sqrt SqrtDnum STCalcForce STCalcTorque STIsCalib STIsClosed STIsIndGun STIsOpen StrDigCalc StrDigCmp StrFind StrLen StrMap StrMatch StrMemb StrOrder StrPart StrToByte StrToVal
|
||||
syn keyword rapidBuildInFunction contained Tan TanDnum TaskRunMec TaskRunRob TasksInSync TaskIsActive TaskIsExecuting TestAndSet TestDI TestSignRead TextGet TextTabFreeToUse TextTabGet TriggDataValid Trunc TruncDnum Type
|
||||
syn keyword rapidBuildInFunction contained UIAlphaEntry UIClientExist UIDnumEntry UIDnumTune UIListView UIMessageBox UINumEntry UINumTune
|
||||
syn keyword rapidBuildInFunction contained ValidIO ValToStr Vectmagn
|
||||
" Bulls Eye functions
|
||||
syn keyword rapidBuildInFunction contained OffsToolXYZ OffsToolPolar
|
||||
" Force Control functions
|
||||
syn keyword rapidBuildInFunction contained FCGetForce FCGetProcessData FCIsForceMode FCLoadID
|
||||
" Discrete application platform functions
|
||||
syn keyword rapidBuildInFunction contained DaGetFstTimeEvt DaCheckMMSOpt DaGetMP DaGetRobotName DaGetTaskName
|
||||
" Production Manager functions
|
||||
syn keyword rapidBuildInFunction contained PMgrAtSafe PMgrAtService PMgrAtState PMgrAtStation PMgrNextStation PMgrTaskNumber PMgrTaskName
|
||||
" Spot functions
|
||||
syn keyword rapidBuildInFunction contained SwGetCurrTargetName SwGetCurrSpotName
|
||||
" Homepos-Running functions
|
||||
syn keyword rapidBuildInFunction contained HR_RobotInHome HR_GetTypeDIndex HR_GetTypeIndex
|
||||
" Paint functions
|
||||
syn keyword rapidBuildInFunction contained IndexLookup IpsCommand IpsGetParam PaintCommand PntQueueExtraGet PntQueueExtraSet PntQueuePeek
|
||||
if g:rapidGroupName
|
||||
highlight default link rapidBuildInFunction BuildInFunction
|
||||
else
|
||||
highlight default link rapidBuildInFunction Function
|
||||
endif
|
||||
" }}}
|
||||
|
||||
" Function {{{
|
||||
syn match rapidFunction contains=rapidBuildInFunction /\v\c%(<%(PROC|MODULE)\s+)@10<!<[[:upper:][:lower:]]\k+ *\(/me=e-1
|
||||
highlight default link rapidFunction Function
|
||||
syn match rapidCallByVar /%\ze[^%]/
|
||||
highlight default link rapidCallByVar Function
|
||||
" }}} Function
|
||||
|
||||
" Constants {{{
|
||||
" standard rapid constants
|
||||
syn keyword rapidConstant pi stEmpty
|
||||
syn keyword rapidConstant STR_DIGIT STR_LOWER STR_UPPER STR_WHITE
|
||||
syn keyword rapidConstant flp1 diskhome diskram disktemp usbdisk1 usbdisk2 usbdisk3 usbdisk4 usbdisk5 usbdisk6 usbdisk7 usbdisk8 usbdisk9 usbdisk10
|
||||
" stoppoint
|
||||
syn keyword rapidConstant inpos stoptime fllwtime
|
||||
" stoppointdata
|
||||
syn keyword rapidConstant inpos20 inpos50 inpos100
|
||||
syn keyword rapidConstant stoptime0_5 stoptime1_0 stoptime1_5
|
||||
syn keyword rapidConstant fllwtime0_5 fllwtime1_0 fllwtime1_5
|
||||
" default tool/wobj/load
|
||||
syn keyword rapidConstant tool0 wobj0 load0
|
||||
" zonedata
|
||||
syn keyword rapidConstant fine z0 z1 z5 z10 z15 z20 z30 z40 z50 z60 z80 z100 z150 z200
|
||||
" speeddata
|
||||
syn keyword rapidConstant v5 v10 v20 v30 v40 v50 v60 v80 v100 v150 v200 v300 v400 v500 v600 v800 v1000 v1500 v2000 v2500 v3000 v4000 v5000 v6000 v7000 vmax
|
||||
syn keyword rapidConstant vrot1 vrot2 vrot5 vrot10 vrot20 vrot50 vrot100 vlin10 vlin20 vlin50 vlin100 vlin200 vlin500 vlin1000
|
||||
" error code starting with ERR_
|
||||
syn keyword rapidConstant ERR_ACC_TOO_LOW ERR_ACTIV_PROF ERR_ADDR_INUSE ERR_ALIASIO_DEF ERR_ALIASIO_TYPE ERR_ALRDYCNT ERR_ALRDY_MOVING ERR_AO_LIM ERR_ARGDUPCND ERR_ARGNAME ERR_ARGNOTPER ERR_ARGNOTVAR ERR_ARGVALERR ERR_ARRAY_SIZE ERR_AXIS_ACT ERR_AXIS_IND ERR_AXIS_MOVING ERR_AXIS_PAR
|
||||
syn keyword rapidConstant ERR_BUSSTATE ERR_BWDLIMIT
|
||||
syn keyword rapidConstant ERR_CALC_DIVZERO ERR_CALC_NEG ERR_CALC_OVERFLOW ERR_CALLIO_INTER ERR_CALLPROC ERR_CAM_BUSY ERR_CAM_COM_TIMEOUT ERR_CAM_GET_MISMATCH ERR_CAM_MAXTIME ERR_CAM_NO_MORE_DATA ERR_CAM_NO_PROGMODE ERR_CAM_NO_RUNMODE ERR_CAM_SET_MISMATCH
|
||||
syn keyword rapidConstant ERR_CFG_ILLTYPE ERR_CFG_ILL_DOMAIN ERR_CFG_INTERNAL ERR_CFG_LIMIT ERR_CFG_NOTFND ERR_CFG_OUTOFBOUNDS ERR_CFG_WRITEFILE
|
||||
syn keyword rapidConstant ERR_CNTNOTVAR
|
||||
syn keyword rapidConstant ERR_CNV_CONNECT ERR_CNV_DROPPED ERR_CNV_NOT_ACT
|
||||
syn keyword rapidConstant ERR_COLL_STOP
|
||||
syn keyword rapidConstant ERR_COMM_EXT ERR_COMM_INIT ERR_COMM_INIT_FAILED
|
||||
syn keyword rapidConstant ERR_CONC_MAX ERR_CONTACTL ERR_CSV_INDEX
|
||||
syn keyword rapidConstant ERR_DA_UNKPROC ERR_DATA_RECV ERR_DEV_MAXTIME ERR_DIPLAG_LIM ERR_DIVZERO ERR_DROP_LOAD ERR_EXCRTYMAX ERR_EXECPHR
|
||||
syn keyword rapidConstant ERR_FILEACC ERR_FILEEXIST ERR_FILEOPEN ERR_FILESIZE ERR_FILNOTFND
|
||||
syn keyword rapidConstant ERR_FNCNORET ERR_FRAME ERR_FRICTUNE_FATAL ERR_GLUEFLOW ERR_GO_LIM
|
||||
syn keyword rapidConstant ERR_HAND_FAILEDGRIPPOS ERR_HAND_FAILEDMOVEPOS ERR_HAND_FAILEDVACUUM ERR_HAND_NOTCALIBRATED
|
||||
syn keyword rapidConstant ERR_ILLDIM ERR_ILLQUAT ERR_ILLRAISE
|
||||
syn keyword rapidConstant ERR_INDCNV_ORDER ERR_INOISSAFE ERR_INOMAX ERR_INPAR_RDONLY ERR_INT_MAXVAL ERR_INT_NOTVAL ERR_INVDIM
|
||||
syn keyword rapidConstant ERR_IODISABLE ERR_IODN_TIMEOUT ERR_IOENABLE ERR_IOERROR ERR_IPSDEVICE_UNKNOWN ERR_IPSILLEGAL_CH_OR_FAC ERR_IPS_PARAM
|
||||
syn keyword rapidConstant ERR_ITMSRC_UNDEF ERR_LINKREF ERR_LOADED ERR_LOADID_FATAL ERR_LOADID_RETRY ERR_LOADNO_INUSE ERR_LOADNO_NOUSE
|
||||
syn keyword rapidConstant ERR_MSG_PENDING ERR_MAXINTVAL ERR_MOC_CNV_REC_FILE_UNKNOWN ERR_MODULE ERR_MOD_NOT_LOADED ERR_MOD_NOTLOADED
|
||||
syn keyword rapidConstant ERR_MT_ABORT ERR_MT_HOME ERR_MT_HOMERUN
|
||||
syn keyword rapidConstant ERR_NEGARG ERR_NAME_INVALID ERR_NORUNUNIT ERR_NOTARR ERR_NOTEQDIM ERR_NOTINTVAL ERR_NOTPRES ERR_NOTSAVED ERR_NOT_MOVETASK ERR_NO_ALIASIO_DEF ERR_NO_SGUN ERR_NUM_LIMIT
|
||||
syn keyword rapidConstant ERR_OUTOFBND ERR_OUTSIDE_REACH ERR_OVERFLOW ERR_PATH ERR_PATHDIST ERR_PATH_STOP ERR_PERSSUPSEARCH ERR_PID_MOVESTOP ERR_PID_RAISE_PP ERR_PPA_TIMEOUT ERR_PRGMEMFULL ERR_PROCSIGNAL_OFF ERR_PROGSTOP
|
||||
syn keyword rapidConstant ERR_RANYBIN_CHK ERR_RANYBIN_EOF ERR_RCVDATA ERR_REFUNKDAT ERR_REFUNKFUN ERR_REFUNKPRC ERR_REFUNKTRP
|
||||
syn keyword rapidConstant ERR_RMQ_DIM ERR_RMQ_FULL ERR_RMQ_INVALID ERR_RMQ_INVMSG ERR_RMQ_MSGSIZE ERR_RMQ_NAME ERR_RMQ_NOMSG ERR_RMQ_TIMEOUT ERR_RMQ_VALUE
|
||||
syn keyword rapidConstant ERR_ROBLIMIT ERR_SC_WRITE
|
||||
syn keyword rapidConstant ERR_SGUN_ESTOP ERR_SGUN_MOTOFF ERR_SGUN_NEGVAL ERR_SGUN_NOTACT ERR_SGUN_NOTINIT ERR_SGUN_NOTOPEN ERR_SGUN_NOTSYNC
|
||||
syn keyword rapidConstant ERR_SIG_NAME ERR_SIGSUPSEARCH ERR_SIG_NOT_VALID
|
||||
syn keyword rapidConstant ERR_SOCK_ADDR_INVALID ERR_SOCK_ADDR_INUSE ERR_SOCK_CLOSED ERR_SOCK_IS_BOUND ERR_SOCK_IS_CONN ERR_SOCK_NET_UNREACH ERR_SOCK_NOT_BOUND ERR_SOCK_NOT_CONN ERR_SOCK_TIMEOUT ERR_SOCK_UNSPEC
|
||||
syn keyword rapidConstant ERR_SPEEDLIM_VALUE ERR_SPEED_REFRESH_LIM
|
||||
syn keyword rapidConstant ERR_STARTMOVE ERR_STORE_PROF ERR_STRTOOLNG ERR_SYMBOL_TYPE ERR_SYM_ACCESS ERR_SYNCMOVEOFF ERR_SYNCMOVEON ERR_SYNTAX
|
||||
syn keyword rapidConstant ERR_TASKNAME
|
||||
syn keyword rapidConstant ERR_TP_DIBREAK ERR_TP_DOBREAK ERR_TP_MAXTIME ERR_TP_NO_CLIENT ERR_TP_PERSBOOLBREAK
|
||||
syn keyword rapidConstant ERR_TRUSTLEVEL ERR_TXTNOEXIST ERR_UDPUC_COMM
|
||||
syn keyword rapidConstant ERR_UISHOW_FATAL ERR_UISHOW_FULL ERR_UI_INITVALUE ERR_UI_MAXMIN ERR_UI_NOTINT
|
||||
syn keyword rapidConstant ERR_UNIT_PAR ERR_UNKINO ERR_UNKPROC ERR_UNLOAD ERR_USE_PROF
|
||||
syn keyword rapidConstant ERR_WAITSYNCTASK ERR_WAIT_MAX ERR_WAIT_MAXTIME ERR_WHL_SEARCH ERR_WHLSEARCH ERR_WOBJ_MOVING
|
||||
" error codes starting with CORR_
|
||||
syn keyword rapidConstant CORR_NOFREE CORR_NOOBJECT CORR_NOTCONN
|
||||
" error codes starting with SEN_
|
||||
syn keyword rapidConstant SEN_BUSY SEN_CAALARM SEN_CAMCHECK SEN_EXALARM SEN_GENERRO SEN_NO_MEAS SEN_NOREADY SEN_TEMP SEN_TIMEOUT SEN_UNKNOWN SEN_VALUE
|
||||
" error codes starting with SYS_
|
||||
syn keyword rapidConstant SYS_ERR_ARL_INPAR_RDONLY SYS_ERR_HW_SMB_WARNING_BATTERY_LOW SYS_ERR_MOC_CNV_REC_FILE_UNKNOWN SYS_ERR_MOC_CNV_REC_NOT_READY
|
||||
" error codes starting with TC_
|
||||
syn keyword rapidConstant TC_ERR_AIR TC_ERR_CLOSE_COV TC_ERR_DOUNLOCK TC_ERR_IO TC_ERR_IOCFG TC_ERR_LOCK TC_ERR_NOTOOL TC_ERR_OPEN_COV TC_ERR_POWER TC_ERR_PULOCK TC_ERR_ROBPOS TC_ERR_ROBPOS_DROP TC_ERR_ROBPOS_PICK TC_ERR_SERVO_TOOL TC_ERR_STANDNUM TC_ERR_TOOL TC_ERR_TOOLCFG TC_ERR_TOOLNUM TC_ERR_UNLOCK
|
||||
" long jump error
|
||||
syn keyword rapidConstant LONG_JMP_ALL_ERR
|
||||
" Arc and Arc sensor
|
||||
syn keyword rapidConstant AW_IGNI_ERR AW_EQIP_ERR AW_START_ERR AW_STOP_ERR AW_TRACK_ERR AW_TRACKCORR_ERR AW_TRACKSTA_ERR AW_USERSIG_ERR AW_WELD_ERR AW_WIRE_ERR
|
||||
" EGM egmframetype
|
||||
syn keyword rapidConstant EGM_FRAME_BASE EGM_FRAME_TOOL EGM_FRAME_WOBJ EGM_FRAME_WORLD EGM_FRAME_JOINT
|
||||
" Events
|
||||
syn keyword rapidConstant EE_START EE_CYCLE_START EE_PROC_START EE_PRE_PROD EE_CLOSE_JIG EE_INDEX EE_PRE_PART EE_POST_PART EE_OPEN_JIG EE_SERVICE EE_POST_PROD EE_ABORT EE_WAIT_ORDER EE_POST_PROC
|
||||
syn keyword rapidConstant EE_POWERON EE_POWERON_OR_START EE_RESTART EE_START_OR_RESTART EE_STOP EE_QSTOP EE_STOP_OR_QSTOP EE_RESET EE_STEP EE_STEP_FWD EE_STEP_BCK EE_BEFORE_INIT EE_AFTER_INIT EE_BEFORE_PROD EE_AFTER_PROD EE_BEFORE_MENU EE_AFTER_MENU
|
||||
syn keyword rapidConstant EE_ERROR EE_HOMERUN EE_PROG_END EE_AFTER_PROG_NUMBER EE_PROGNO_UNKNOWN EE_PROD_UNKNOWN EE_MSG_WRITTEN EE_MSG_ACKNOWLEDGED EE_AFTER_PART EE_BEFORE_HOMERUN EE_AFTER_HOMERUN EE_BLOCKED
|
||||
" motion process mode
|
||||
syn keyword rapidConstant OPTIMAL_CYCLE_TIME_MODE LOW_SPEED_ACCURACY_MODE LOW_SPEED_STIFF_MODE ACCURACY_MODE MPM_USER_MODE_1 MPM_USER_MODE_2 MPM_USER_MODE_3 MPM_USER_MODE_4
|
||||
" inttypes
|
||||
syn keyword rapidConstant USINT UINT UDINT ULINT SINT INT DINT LINT
|
||||
" opcalc
|
||||
syn keyword rapidConstant OpAdd OpSub OpMult OpDiv OpMod
|
||||
" triggmode
|
||||
syn keyword rapidConstant TRIGG_MODE1 TRIGG_MODE2 TRIGG_MODE3
|
||||
" tunetype
|
||||
syn keyword rapidConstant TUNE_DF TUNE_KP TUNE_KV TUNE_TI TUNE_FRIC_LEV TUNE_FRIC_RAMP TUNE_DG TUNE_DH TUNE_DI TUNE_DK TUNE_DL
|
||||
" cellopmode
|
||||
syn keyword rapidConstant OP_NO_ROBOT OP_SERVICE OP_PRODUCTION
|
||||
" execution mode
|
||||
syn keyword rapidConstant CT_CONTINUOUS CT_COUNT_CYCLES CT_COUNT_CYC_ACTION CT_PERIODICAL
|
||||
" Force Control
|
||||
syn keyword rapidConstant FC_REFFRAME_TOOL FC_REFFRAME_WOBJ FC_LIN_X FC_LIN_Y FC_LIN_Z FC_ROT_X FC_ROT_Y FC_ROT_Z FC_SPEED_RATIO_MIN FC_NO_OF_SPEED_LEVELS
|
||||
" tpnum
|
||||
syn keyword rapidConstant TP_LATEST TP_PROGRAM TP_SCREENVIEWER
|
||||
" paridvalidnum
|
||||
syn keyword rapidConstant ROB_LOAD_VAL ROB_NOT_LOAD_VAL ROB_LM1_LOAD_VAL
|
||||
" paridnum
|
||||
syn keyword rapidConstant TOOL_LOAD_ID PAY_LOAD_ID IRBP_K IRBP_L IRBP_C IRBP_C_INDEX IRBP_T IRBP_R IRBP_A IRBP_B IRBP_D
|
||||
" loadidnum
|
||||
syn keyword rapidConstant MASS_KNOWN MASS_WITH_AX3
|
||||
" sensorstate
|
||||
syn keyword rapidConstant STATE_ERROR STATE_UNDEFINED STATE_CONNECTED STATE_OPERATING STATE_CLOSED
|
||||
" signalorigin
|
||||
syn keyword rapidConstant SIGORIG_NONE SIGORIG_CFG SIGORIG_ALIAS
|
||||
" aiotrigg
|
||||
syn keyword rapidConstant AIO_ABOVE_HIGH AIO_BELOW_HIGH AIO_ABOVE_LOW AIO_BELOW_LOW AIO_BETWEEN AIO_OUTSIDE AIO_ALWAYS
|
||||
" socketstatus
|
||||
syn keyword rapidConstant SOCKET_CREATED SOCKET_CONNECTED SOCKET_BOUND SOCKET_LISTENING SOCKET_CLOSED
|
||||
" symnum of OpMode()
|
||||
syn keyword rapidConstant OP_UNDEF OP_AUTO OP_MAN_PROG OP_MAN_TEST
|
||||
" symnum of RunMode()
|
||||
syn keyword rapidConstant RUN_UNDEF RUN_CONT_CYCLE RUN_INSTR_FWD RUN_INSTR_BWD RUN_SIM RUN_STEP_MOVE
|
||||
" event_type of EventType()
|
||||
syn keyword rapidConstant EVENT_NONE EVENT_POWERON EVENT_START EVENT_STOP EVENT_QSTOP EVENT_RESTART EVENT_RESET EVENT_STEP
|
||||
" handler_type of ExecHandler()
|
||||
syn keyword rapidConstant HANDLER_NONE HANDLER_BWD HANDLER_ERR HANDLER_UNDO
|
||||
" event_level of ExecLevel()
|
||||
syn keyword rapidConstant LEVEL_NORMAL LEVEL_TRAP LEVEL_SERVICE
|
||||
" signalorigin of GetSignalOrigin()
|
||||
syn keyword rapidConstant SIGORIG_NONE SIGORIG_CFG SIGORIG_ALIAS
|
||||
" opnum
|
||||
syn keyword rapidConstant LT LTEQ EQ NOTEQ GT GTEQ
|
||||
" icondata
|
||||
syn keyword rapidConstant iconNone iconInfo iconWarning iconError
|
||||
" buttondata
|
||||
syn keyword rapidConstant btnNone btnOK btnAbrtRtryIgn btnOKCancel btnRetryCancel btnYesNo btnYesNoCancel
|
||||
" btnres
|
||||
syn keyword rapidConstant resUnkwn resOK resAbort resRetry resIgnore resCancel resYes resNo
|
||||
" cfgdomain
|
||||
syn keyword rapidConstant ALL_DOMAINS EIO_DOMAIN MMC_DOMAIN MOC_DOMAIN PROC_DOMAIN SIO_DOMAIN SYS_DOMAIN
|
||||
" errdomain
|
||||
syn keyword rapidConstant COMMON_ERR OP_STATE SYSTEM_ERR HARDWARE_ERR PROGRAM_ERR MOTION_ERR OPERATOR_ERR IO_COM_ERR USER_DEF_ERR SAFETY_ERR PROCESS_ERR CFG_ERR OPTION_PROD_ERR ARCWELD_ERR SPOTWELD_ERR PAINT_ERR PICKWARE_ERR
|
||||
" errtype
|
||||
syn keyword rapidConstant TYPE_ALL TYPE_ERR TYPE_STATE TYPE_WARN
|
||||
" Sensor Interface
|
||||
syn keyword rapidConstant LTAPP__AGE LTAPP__ANGLE LTAPP__AREA LTAPP__CAMCHECK LTAPP__GAP LTAPP__JOINT_NO LTAPP__LASER_OFF LTAPP__MISMATCH LTAPP__PING LTAPP__POWER_UP LTAPP__RESET LTAPP__STEPDIR LTAPP__THICKNESS LTAPP__UNIT
|
||||
syn keyword rapidConstant LTAPP__X LTAPP__Y LTAPP__Z LTAPP__APM_P1 LTAPP__APM_P2 LTAPP__APM_P3 LTAPP__APM_P4 LTAPP__APM_P5 LTAPP__APM_P6 LTAPP__ROT_Y LTAPP__ROT_Z LTAPP__X0 LTAPP__Y0 LTAPP__Z0 LTAPP__X1 LTAPP__Y1 LTAPP__Z1 LTAPP__X2 LTAPP__Y2 LTAPP__Z2
|
||||
" iounit_state
|
||||
syn keyword rapidConstant IOUNIT_LOG_STATE_DISABLED IOUNIT_LOG_STATE_ENABLED IOUNIT_PHYS_STATE_DEACTIVATED IOUNIT_PHYS_STATE_RUNNING IOUNIT_PHYS_STATE_ERROR IOUNIT_PHYS_STATE_UNCONNECTED IOUNIT_PHYS_STATE_UNCONFIGURED IOUNIT_PHYS_STATE_STARTUP IOUNIT_PHYS_STATE_INIT IOUNIT_RUNNING IOUNIT_RUNERROR IOUNIT_DISABLE IOUNIT_OTHERERR
|
||||
" busstate
|
||||
syn keyword rapidConstant IOBUS_LOG_STATE_STARTED IOBUS_LOG_STATE_STOPPED IOBUS_PHYS_STATE_ERROR IOBUS_PHYS_STATE_HALTED IOBUS_PHYS_STATE_INIT IOBUS_PHYS_STATE_RUNNING IOBUS_PHYS_STATE_STARTUP
|
||||
syn keyword rapidConstant BUSSTATE_ERROR BUSSTATE_HALTED BUSSTATE_INIT BUSSTATE_RUN BUSSTATE_STARTUP
|
||||
" SoftMove
|
||||
syn keyword rapidConstant CSS_POSX CSS_NEGX CSS_POSY CSS_NEGY CSS_POSZ CSS_NEGZ CSS_X CSS_Y CSS_Z CSS_XY CSS_XZ CSS_YZ CSS_XYZ CSS_XYRZ CSS_ARM_ANGLE CSS_REFFRAME_TOOL CSS_REFFRAME_WOBJ
|
||||
" tsp_status
|
||||
syn keyword rapidConstant TSP_STATUS_NOT_NORMAL_TASK TSP_STATUS_DEACT TSP_STATUS_DEACT_SERV_ROUT TSP_STATUS_ACT TSP_UNCHECKED_RUN_SERV_ROUT TSP_NORMAL_UNCHECKED TSP_STATIC_UNCHECKED TSP_SEMISTATIC_UNCHECKED TSP_NORMAL_CHECKED TSP_STATIC_CHECKED TSP_SEMISTATIC_CHECKED
|
||||
" IRC5P (paint controller)
|
||||
syn keyword rapidConstant PW_EQUIP_ERR
|
||||
" Bulls Eye
|
||||
syn keyword rapidConstant BESuccess BENoOverwrite BENoNameMatch BENoBEDataMod BEArrayFull BEToolNotFound BEInvalidSignal BEAliasSet BERangeLimFail BERangeSingFail BERangeTiltFail BEScanPlaneErr BEBFrameNotRead BEScanRadZero BEHeightSrchErr BEBeamNotFound BEBeamSpinErr BESrchErrInBeam BESrchErrNoDet BENumOfScansErr BEDiaZeroOrLess BESliceCountErr BEGetNewTcpMax BEBeamOriFail BEGetTcpDelErr BERefPosSetErr BERefToolSetErr BERefBeamSetErr BEBFrameDefErr BESetupAlready BERefResetErr BESetupFailed BEToolNotSet BEStartChanged BEBeamMoveErr BECheckTcp BECheckErr BESkipUpdate BEStrtningErr BEAllNotSet BEQuikRefNotDef BEConvergErr BEInstFwdErr BEGetGantryErr BEUnknownErr
|
||||
" Continuous Application Platform constants
|
||||
syn keyword rapidConstant CAP_START START_PRE PRE_STARTED START_MAIN MAIN_STARTED STOP_WEAVESTART WEAVESTART_REGAIN MOTION_DELAY STARTSPEED_TIME MAIN_MOTION MOVE_STARTED RESTART NEW_INSTR AT_POINT AT_RESTARTPOINT LAST_SEGMENT PROCESS_END_POINT END_MAIN MAIN_ENDED PATH_END_POINT PROCESS_ENDED END_POST1 POST1_ENDED END_POST2 POST2_ENDED CAP_STOP CAP_PF_RESTART EQUIDIST AT_ERRORPOINT FLY_START FLY_END LAST_INSTR_ENDED END_PRE PRE_ENDED START_POST1 POST1_STARTED START_POST2 POST2_STARTED
|
||||
syn keyword rapidConstant CAP_PRE_ERR CAP_PRESTART_ERR CAP_END_PRE_ERR CAP_START_ERR CAP_MAIN_ERR CAP_ENDMAIN_ERR CAP_START_POST1_ERR CAP_POST1_ERR CAP_POST1END_ERR CAP_START_POST2_ERR CAP_POST2_ERR CAP_POST2END_ERR CAP_TRACK_ERR CAP_TRACKSTA_ERR CAP_TRACKCOR_ERR CAP_TRACKCOM_ERR CAP_TRACKPFR_ERR CAP_SEN_NO_MEAS CAP_SEN_NOREADY CAP_SEN_GENERRO CAP_SEN_BUSY CAP_SEN_UNKNOWN CAP_SEN_ILLEGAL CAP_SEN_EXALARM CAP_SEN_CAALARM CAP_SEN_TEMP CAP_SEN_VALUE CAP_SEN_CAMCHECK CAP_SEN_TIMEOUT
|
||||
" Machine Tending grppos
|
||||
syn keyword rapidConstant gsOpen gsVacuumOff gsBackward gsClose gsVacuumOn gsForward gsReset
|
||||
" Machine Tending grpaction
|
||||
syn keyword rapidConstant gaSetAndCheck gaSet gaCheck gaCheckClose gaCheckClose
|
||||
" Palletizing PowerPac
|
||||
syn keyword rapidConstant PM_ERR_AXLIM PM_ERR_CALCCONF PM_ERR_FLOW_NOT_FOUND PM_ERR_INVALID_FLOW_STOP_OPTION PM_ERR_JOB_EMPTY PM_ERR_LIM_VALUE PM_ERR_NO_RUNNING_PROJECT PM_ERR_NO_TASK PM_ERR_NOT_VALID_RECOVER_ACTION PM_ERR_OPERATION_LOST PM_ERR_PALLET_EMPTY PM_ERR_PALLET_REDUCED PM_ERR_PART_VAL PM_ERR_PROJ_NOT_FOUND PM_ERR_REDO_LAST_PICK_REJECTED PM_ERR_TIMEOUT PM_ERR_WA_NOT_FOUND PM_ERR_WOBJ PM_ERR_WORKAREA_EXPECTED PM_ERR_WRONG_FLOW_STATE
|
||||
syn keyword rapidConstant PM_ACK PM_NACK PM_LOST PM_RECOVER_CONTINUE_OPERATION PM_RECOVER_REDO_LAYER PM_RECOVER_NEXT_PALLET PM_RECOVER_REDO_LAST_PICK PM_FLOW_ERROR PM_FLOW_FINISH_CYCLE PM_FLOW_FINISH_LAYER PM_FLOW_FINISH_PALLET PM_FLOW_RUNNING PM_FLOW_STOP_IMMEDIATELY PM_FLOW_STOPPED PM_FLOW_STOPPING_AFTER_CYCLE PM_FLOW_STOPPING_AFTER_LAYER PM_FLOW_STOPPING_AFTER_PALLET PM_APPROACH_POS PM_DEPART_POS PM_TARGET_POS PM_EVENT_PROC PM_EVENT_DO PM_EVENT_GO PM_MOVE_JOINT PM_MOVE_LIN PM_SEARCH_X PM_SEARCH_Y PM_SEARCH_Z PM_SING_AREA_OFF PM_SING_AREA_WRI PM_STOP_NOT_USED PM_STOP PM_PSTOP PM_SSTOP PM_PROJECT_STOPPED PM_PROJECT_STOPPING PM_PROJECT_STARTING PM_PROJECT_RUNNING PM_PROJECT_ERROR
|
||||
syn keyword rapidConstant MaxToolAngle MinToolAngle
|
||||
" other constants
|
||||
syn keyword rapidConstant GAP_SERVICE_TYPE GAP_SETUP_TYPE GAP_STATE_IDLE GAP_STATE_PART GAP_STATE_SERV GAP_STATE_SETUP GAP_STATE_UNKN GAP_TASK_NAME GAP_TASK_NO GAP_SHOW_ALWAYS GAP_SHOW_NEVER GAP_SHOW_SAFE GAP_SHOW_SERVICE
|
||||
syn keyword rapidConstant EOF EOF_BIN EOF_NUM
|
||||
syn keyword rapidConstant END_OF_LIST WAIT_MAX
|
||||
syn keyword rapidErrNo ERRNO
|
||||
syn keyword rapidIntNo INTNO
|
||||
" VW Konzernstandard VWKS_1.07.02
|
||||
syn keyword rapidIntNo KG_UNDEFINIERT KG_LETZTEPOS KG_GREIFPOS KG_ZWISCHENPOS KG_TOOLINFO KG_GREIFPOSKORR
|
||||
syn keyword rapidIntNo BA1 BA2
|
||||
syn keyword rapidIntNo SetupXY SetupZ KorrekturXY KorrekturZ
|
||||
if g:rapidGroupName
|
||||
highlight default link rapidConstant Sysvars
|
||||
highlight default link rapidErrNo Sysvars
|
||||
highlight default link rapidIntNo Sysvars
|
||||
endif
|
||||
" }}} ERRNO Constants
|
||||
|
||||
" Error {{{
|
||||
if get(g:,'rapidShowError',1)
|
||||
"
|
||||
" vars or funcs >32 chars are not possible in rapid. a234567890123456789012345
|
||||
syn match rapidErrorIdentifierNameTooLong /\k\{33,}/ containedin=rapidFunction,rapidNames,rapidLabel
|
||||
highlight default link rapidErrorIdentifierNameTooLong Error
|
||||
"
|
||||
" a == b + 1
|
||||
syn match rapidErrorShouldBeColonEqual /\c\v%(^\s*%(%(TASK\s+|LOCAL\s+)?%(VAR|PERS|CONST)\s+\k+\s+)?\k+%(\k|[.{},*/+-])*\s*)@<=\=/
|
||||
highlight default link rapidErrorShouldBeColonEqual Error
|
||||
"
|
||||
" WaitUntil a==b
|
||||
syn match rapidErrorShouldBeEqual /\c\v%(^\s*%(Return|WaitUntil|while)>[^!\\]+[^!<>])@<=%(\=|:)\=/
|
||||
syn match rapidErrorShouldBeEqual /\c\v%(^\s*%(if|elseif)>[^!\\]+[^!<>])@<=%(\=|:)\=\ze[^!\\]+<then>/
|
||||
highlight default link rapidErrorShouldBeEqual Error
|
||||
"
|
||||
" WaitUntil a=>b
|
||||
syn match rapidErrorShoudBeLessOrGreaterEqual /\c\v%(^\s*%(Return|WaitUntil|if|elseif|while)>[^!]+[^!<>])@<=\=[><]/
|
||||
highlight default link rapidErrorShoudBeLessOrGreaterEqual Error
|
||||
"
|
||||
" WaitUntil a><b
|
||||
syn match rapidErrorShouldBeLessGreater /\c\v%(^\s*%(Return|WaitUntil|if|elseif|while)[^!]+)@<=\>\s*\</
|
||||
highlight default link rapidErrorShouldBeLessGreater Error
|
||||
"
|
||||
" if (a==5) (b==6)
|
||||
syn match rapidErrorMissingOperator /\c\v%(^\s*%(Return|WaitUntil|if|elseif|while)[^!]+[^!])@<=\)\s*\(/
|
||||
highlight default link rapidErrorMissingOperator Error
|
||||
"
|
||||
" "for" missing "from"
|
||||
syn match rapidErrorMissingFrom /\c\v^\s*for\s+%([[:upper:][:lower:]]%(\k|[.{},*/+-])*\s+from)@!\S+\s+\S+/
|
||||
highlight default link rapidErrorMissingFrom Error
|
||||
"
|
||||
"
|
||||
endif
|
||||
" }}} Error
|
||||
|
||||
" }}}
|
||||
endif
|
||||
|
||||
" common Error {{{
|
||||
if get(g:,'rapidShowError',1)
|
||||
"
|
||||
" This error must be defined after rapidString
|
||||
" string too long
|
||||
" syn match rapidErrorStringTooLong /\v%("%(""|\\\\|\\\x\x|[^"\\]){80})@240<=%([^"]|"{2})+/ contained contains=rapidStringDoubleQuote,rapidEscapedBackSlash,rapidCharCode,rapidErrorSingleBackslash
|
||||
highlight default link rapidErrorStringTooLong Error
|
||||
"
|
||||
endif
|
||||
|
||||
" }}} Error
|
||||
|
||||
" Finish {{{
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
let b:current_syntax = "rapid"
|
||||
" }}} Finish
|
||||
|
||||
" vim:sw=2 sts=2 et fdm=marker
|
||||
@@ -7,7 +7,7 @@
|
||||
>#+0#0000e05&| +0#0000000&@73
|
||||
|#+0#0000e05&| |H|e|r|e| |i|s| |t|h|e| |h|e|a|r|t| |o|f| |t|h|i|s| |s|c|r|i|p|t|:| +0#0000000&@39
|
||||
|#+0#0000e05&| +0#0000000&@73
|
||||
|e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|P+0#e000002&|r|o|c|e|s@1|i|n|g| |t|h|e| |f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |l|i|n|e| |a|r|g|u|e|m|e|n|t|s|:| |$+0#e000e06&|{|*|:+0#af5f00255&|-|n+0#0000000&|o|n|e|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@7
|
||||
|e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|P+0#e000002&|r|o|c|e|s@1|i|n|g| |t|h|e| |f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |l|i|n|e| |a|r|g|u|m|e|n|t|s|:| |$+0#e000e06&|{|*|:+0#af5f00255&|-|n+0#0000000&|o|n|e|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@8
|
||||
|e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|S+0#e000002&|c|r|i|p|t|:| @3|f|o|r| |l|o@1|p| |o|u|t|s|i|d|e| |a| |f|u|n|c|t|i|o|n|:|\+0#e000e06&|t|\|c|"+0#af5f00255&| +0#0000000&@24
|
||||
|f+0#af5f00255&|o|r| +0#0000000&|V|a|r| @67
|
||||
|d+0#af5f00255&|o| +0#0000000&@72
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|#+0#0000e05#ffffff0| +0#0000000&@73
|
||||
|e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|P+0#e000002&|r|o|c|e|s@1|i|n|g| |t|h|e| |f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |l|i|n|e| |a|r|g|u|e|m|e|n|t|s|:| |$+0#e000e06&|{|*|:+0#af5f00255&|-|n+0#0000000&|o|n|e|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@7
|
||||
|e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|P+0#e000002&|r|o|c|e|s@1|i|n|g| |t|h|e| |f|o|l@1|o|w|i|n|g| |c|o|m@1|a|n|d| |l|i|n|e| |a|r|g|u|m|e|n|t|s|:| |$+0#e000e06&|{|*|:+0#af5f00255&|-|n+0#0000000&|o|n|e|}+0#e000e06&|"+0#af5f00255&| +0#0000000&@8
|
||||
|e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|S+0#e000002&|c|r|i|p|t|:| @3|f|o|r| |l|o@1|p| |o|u|t|s|i|d|e| |a| |f|u|n|c|t|i|o|n|:|\+0#e000e06&|t|\|c|"+0#af5f00255&| +0#0000000&@24
|
||||
|f+0#af5f00255&|o|r| +0#0000000&|V|a|r| @67
|
||||
|d+0#af5f00255&|o| +0#0000000&@72
|
||||
|
||||
@@ -73,7 +73,7 @@ done ; echo
|
||||
#
|
||||
# Here is the heart of this script:
|
||||
#
|
||||
echo "Processing the following command line arguements: ${*:-none}"
|
||||
echo "Processing the following command line arguments: ${*:-none}"
|
||||
echo "Script: for loop outside a function:\t\c"
|
||||
for Var
|
||||
do
|
||||
|
||||
103
runtime/syntax/unison.vim
Normal file
103
runtime/syntax/unison.vim
Normal file
@@ -0,0 +1,103 @@
|
||||
" Vim syntax file
|
||||
"
|
||||
" Language: unison
|
||||
" Maintainer: Anton Parkhomenko <anton@chuwy.me>
|
||||
" Last Change: Aug 7, 2023
|
||||
" Original Author: John Williams, Paul Chiusano and Rúnar Bjarnason
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax include @markdown $VIMRUNTIME/syntax/markdown.vim
|
||||
|
||||
syn cluster markdownLikeDocs contains=markdownBold,markdownItalic,markdownLinkText,markdownListMarker,markdownOrderedListMarker,markdownH1,markdownH2,markdownH3,markdownH4,markdownH5,markdownH6
|
||||
|
||||
syn match unisonOperator "[-!#$%&\*\+/<=>\?@\\^|~]"
|
||||
syn match unisonDelimiter "[\[\](){},.]"
|
||||
|
||||
" Strings and constants
|
||||
syn match unisonSpecialChar contained "\\\([0-9]\+\|o[0-7]\+\|x[0-9a-fA-F]\+\|[\"\\'&\\abfnrtv]\|^[A-Z^_\[\\\]]\)"
|
||||
syn match unisonSpecialChar contained "\\\(NUL\|SOH\|STX\|ETX\|EOT\|ENQ\|ACK\|BEL\|BS\|HT\|LF\|VT\|FF\|CR\|SO\|SI\|DLE\|DC1\|DC2\|DC3\|DC4\|NAK\|SYN\|ETB\|CAN\|EM\|SUB\|ESC\|FS\|GS\|RS\|US\|SP\|DEL\)"
|
||||
syn match unisonSpecialCharError contained "\\&\|'''\+"
|
||||
syn region unisonString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=unisonSpecialChar
|
||||
syn match unisonCharacter "[^a-zA-Z0-9_']'\([^\\]\|\\[^']\+\|\\'\)'"lc=1 contains=unisonSpecialChar,unisonSpecialCharError
|
||||
syn match unisonCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=unisonSpecialChar,unisonSpecialCharError
|
||||
syn match unisonNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>"
|
||||
syn match unisonFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>"
|
||||
|
||||
" Keyword definitions. These must be patterns instead of keywords
|
||||
" because otherwise they would match as keywords at the start of a
|
||||
" "literate" comment (see lu.vim).
|
||||
syn match unisonModule "\<namespace\>"
|
||||
syn match unisonImport "\<use\>"
|
||||
syn match unisonTypedef "\<\(unique\|structural\|∀\|forall\)\>"
|
||||
syn match unisonStatement "\<\(ability\|do\|type\|where\|match\|cases\|;\|let\|with\|handle\)\>"
|
||||
syn match unisonConditional "\<\(if\|else\|then\)\>"
|
||||
|
||||
syn match unisonBoolean "\<\(true\|false\)\>"
|
||||
|
||||
syn match unisonType "\<\C[A-Z][0-9A-Za-z_'!]*\>"
|
||||
syn match unisonName "\<\C[a-z_][0-9A-Za-z_'!]*\>"
|
||||
|
||||
" Comments
|
||||
syn match unisonLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$"
|
||||
syn region unisonBlockComment start="{-" end="-}" contains=unisonBlockComment
|
||||
syn region unisonBelowFold start="^---" skip="." end="." contains=unisonBelowFold
|
||||
|
||||
" Docs
|
||||
syn region unisonDocBlock matchgroup=unisonDoc start="{{" end="}}" contains=unisonDocTypecheck,unisonDocQuasiquote,unisonDocDirective,unisonDocCode,unisonDocCodeInline,unisonDocCodeRaw,unisonDocMono,@markdownLikeDocs
|
||||
syn region unisonDocQuasiquote contained matchgroup=unisonDocQuote start="{{" end= "}}" contains=TOP
|
||||
syn region unisonDocCode contained matchgroup=unisonDocCode start="^\s*```\s*$" end="^\s*```\s*$" contains=TOP
|
||||
syn region unisonDocTypecheck contained matchgroup=unisonDocCode start="^\s*@typecheck\s*```\s*$" end="^\s*```\s*$" contains=TOP
|
||||
syn region unisonDocCodeRaw contained matchgroup=unisonDocCode start="^\s*```\s*raw\s*$" end="^\s*```\s*$" contains=NoSyntax
|
||||
syn region unisonDocCodeInline contained matchgroup=unisonDocCode start="`\@<!``" end="`\@<!``" contains=TOP
|
||||
syn match unisonDocMono "''[^']*''"
|
||||
syn region unisonDocDirective contained matchgroup=unisonDocDirective start="\(@\([a-zA-Z0-9_']*\)\)\?{{\@!" end="}" contains=TOP
|
||||
|
||||
syn match unisonDebug "\<\(todo\|bug\|Debug.trace\|Debug.evalToText\)\>"
|
||||
|
||||
" things like
|
||||
" > my_func 1 3
|
||||
" test> Function.tap.tests.t1 = check let
|
||||
" use Nat == +
|
||||
" ( 99, 100 ) === (withInitialValue 0 do
|
||||
" : : :
|
||||
syn match unisonWatch "^[A-Za-z]*>"
|
||||
|
||||
hi def link unisonWatch Debug
|
||||
hi def link unisonDocMono Delimiter
|
||||
hi def link unisonDocDirective Import
|
||||
hi def link unisonDocQuote Delimiter
|
||||
hi def link unisonDocCode Delimiter
|
||||
hi def link unisonDoc String
|
||||
hi def link unisonBelowFold Comment
|
||||
hi def link unisonBlockComment Comment
|
||||
hi def link unisonBoolean Boolean
|
||||
hi def link unisonCharacter Character
|
||||
hi def link unisonComment Comment
|
||||
hi def link unisonConditional Conditional
|
||||
hi def link unisonConditional Conditional
|
||||
hi def link unisonDebug Debug
|
||||
hi def link unisonDelimiter Delimiter
|
||||
hi def link unisonDocBlock String
|
||||
hi def link unisonDocDirective Import
|
||||
hi def link unisonDocIncluded Import
|
||||
hi def link unisonFloat Float
|
||||
hi def link unisonImport Include
|
||||
hi def link unisonLineComment Comment
|
||||
hi def link unisonLink Type
|
||||
hi def link unisonName Identifier
|
||||
hi def link unisonNumber Number
|
||||
hi def link unisonOperator Operator
|
||||
hi def link unisonSpecialChar SpecialChar
|
||||
hi def link unisonSpecialCharError Error
|
||||
hi def link unisonStatement Statement
|
||||
hi def link unisonString String
|
||||
hi def link unisonType Type
|
||||
hi def link unisonTypedef Typedef
|
||||
|
||||
|
||||
let b:current_syntax = "unison"
|
||||
|
||||
" Options for vi: ts=8 sw=2 sts=2 nowrap noexpandtab ft=vim
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: WebAssembly
|
||||
" Maintainer: rhysd <lin90162@yahoo.co.jp>
|
||||
" Last Change: Jul 29, 2018
|
||||
" Last Change: Aug 7, 2023
|
||||
" For bugs, patches and license go to https://github.com/rhysd/vim-wasm
|
||||
|
||||
if exists("b:current_syntax")
|
||||
@@ -11,33 +11,42 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn cluster wastCluster contains=wastModule,wastInstWithType,wastInstGeneral,wastParamInst,wastControlInst,wastString,wastNamedVar,wastUnnamedVar,wastFloat,wastNumber,wastComment,wastList,wastType
|
||||
syn cluster wastNotTop contains=wastModule,wastInstWithType,wastInstGetSet,wastInstGeneral,wastParamInst,wastControlInst,wastSimdInst,wastString,wastNamedVar,wastUnnamedVar,wastFloat,wastNumber,wastComment,wastList,wastType
|
||||
|
||||
" Instructions
|
||||
" https://webassembly.github.io/spec/core/text/instructions.html
|
||||
" Note: memarg (align=,offset=) can be added to memory instructions
|
||||
syn match wastInstWithType "\%((\s*\)\@<=\<\%(i32\|i64\|f32\|f64\|memory\)\.[[:alnum:]_]\+\%(/\%(i32\|i64\|f32\|f64\)\)\=\>\%(\s\+\%(align\|offset\)=\)\=" contained display
|
||||
syn match wastInstGeneral "\%((\s*\)\@<=\<[[:alnum:]_]\+\>" contained display
|
||||
syn match wastInstGetSet "\%((\s*\)\@<=\<\%(local\|global\)\.\%(get\|set\)\>" contained display
|
||||
" https://webassembly.github.io/spec/core/text/instructions.html#control-instructions
|
||||
syn match wastControlInst "\%((\s*\)\@<=\<\%(block\|end\|loop\|if\|else\|unreachable\|nop\|br\|br_if\|br_table\|return\|call\|call_indirect\)\>" contained display
|
||||
syn match wastControlInst "\%((\s*\)\@<=\<\%(block\|end\|loop\|if\|then\|else\|unreachable\|nop\|br\|br_if\|br_table\|return\|call\|call_indirect\)\>" contained display
|
||||
" https://webassembly.github.io/spec/core/text/instructions.html#parametric-instructions
|
||||
syn match wastParamInst "\%((\s*\)\@<=\<\%(drop\|select\)\>" contained display
|
||||
" SIMD instructions
|
||||
" https://webassembly.github.io/simd/core/text/instructions.html#simd-instructions
|
||||
syn match wastSimdInst "\<\%(v128\|i8x16\|i16x8\|i32x4\|i64x2\|f32x4\|f64x2)\)\.[[:alnum:]_]\+\%(\s\+\%(i8x16\|i16x8\|i32x4\|i64x2\|f32x4\|f64x2\)\)\=\>" contained display
|
||||
|
||||
" Identifiers
|
||||
" https://webassembly.github.io/spec/core/text/values.html#text-id
|
||||
syn match wastNamedVar "$\+[[:alnum:]!#$%&'∗./:=><?@\\^_`~+-]*" contained display
|
||||
syn match wastNamedVar "$\+[[:alnum:]!#$%&'∗./:=><?@\\^_`~+-]*" contained contains=wastEscapeUtf8
|
||||
syn match wastUnnamedVar "$\+\d\+[[:alnum:]!#$%&'∗./:=><?@\\^_`~+-]\@!" contained display
|
||||
" Presuming the source text is itself encoded correctly, strings that do not
|
||||
" contain any uses of hexadecimal byte escapes are always valid names.
|
||||
" https://webassembly.github.io/spec/core/text/values.html#names
|
||||
syn match wastEscapedUtf8 "\\\x\{1,6}" contained containedin=wastNamedVar display
|
||||
|
||||
" String literals
|
||||
" https://webassembly.github.io/spec/core/text/values.html#strings
|
||||
syn region wastString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=wastStringSpecial
|
||||
syn match wastStringSpecial "\\\x\x\|\\[tnr'\\\"]\|\\u\x\+" contained containedin=wastString
|
||||
syn match wastStringSpecial "\\\x\x\|\\[tnr'\\\"]\|\\u\x\+" contained containedin=wastString display
|
||||
|
||||
" Float literals
|
||||
" https://webassembly.github.io/spec/core/text/values.html#floating-point
|
||||
syn match wastFloat "\<-\=\d\%(_\=\d\)*\%(\.\d\%(_\=\d\)*\)\=\%([eE][-+]\=\d\%(_\=\d\)*\)\=" display contained
|
||||
syn match wastFloat "\<-\=0x\x\%(_\=\d\)*\%(\.\x\%(_\=\x\)*\)\=\%([pP][-+]\=\d\%(_\=\d\)*\)\=" display contained
|
||||
syn match wastFloat "\<-\=0x\x\%(_\=\x\)*\%(\.\x\%(_\=\x\)*\)\=\%([pP][-+]\=\d\%(_\=\d\)*\)\=" display contained
|
||||
syn keyword wastFloat inf nan contained
|
||||
syn match wastFloat "nan:0x\x\%(_\=\x\)*" display contained
|
||||
|
||||
" Integer literals
|
||||
" https://webassembly.github.io/spec/core/text/values.html#integers
|
||||
@@ -46,14 +55,15 @@ syn match wastNumber "\<-\=0x\x\%(_\=\x\)*\>" display contained
|
||||
|
||||
" Comments
|
||||
" https://webassembly.github.io/spec/core/text/lexical.html#comments
|
||||
syn region wastComment start=";;" end="$" display
|
||||
syn region wastComment start=";;" end="$"
|
||||
syn region wastComment start="(;;\@!" end=";)"
|
||||
|
||||
syn region wastList matchgroup=wastListDelimiter start="(;\@!" matchgroup=wastListDelimiter end=";\@<!)" contains=@wastCluster
|
||||
syn region wastList matchgroup=wastListDelimiter start="(;\@!" matchgroup=wastListDelimiter end=";\@<!)" contains=@wastNotTop
|
||||
|
||||
" Types
|
||||
" https://webassembly.github.io/spec/core/text/types.html
|
||||
syn keyword wastType i64 i32 f64 f32 param result anyfunc mut contained
|
||||
" Note: `mut` was changed to `const`/`var` at Wasm 2.0
|
||||
syn keyword wastType i64 i32 f64 f32 param result funcref func externref extern mut v128 const var contained
|
||||
syn match wastType "\%((\_s*\)\@<=func\%(\_s*[()]\)\@=" display contained
|
||||
|
||||
" Modules
|
||||
@@ -61,13 +71,15 @@ syn match wastType "\%((\_s*\)\@<=func\%(\_s*[()]\)\@=" display conta
|
||||
syn keyword wastModule module type export import table memory global data elem contained
|
||||
syn match wastModule "\%((\_s*\)\@<=func\%(\_s\+\$\)\@=" display contained
|
||||
|
||||
syn sync lines=100
|
||||
syn sync maxlines=100
|
||||
|
||||
hi def link wastModule PreProc
|
||||
hi def link wastListDelimiter Delimiter
|
||||
hi def link wastInstWithType Operator
|
||||
hi def link wastInstGetSet Operator
|
||||
hi def link wastInstGeneral Operator
|
||||
hi def link wastControlInst Statement
|
||||
hi def link wastSimdInst Operator
|
||||
hi def link wastParamInst Conditional
|
||||
hi def link wastString String
|
||||
hi def link wastStringSpecial Special
|
||||
@@ -77,6 +89,7 @@ hi def link wastFloat Float
|
||||
hi def link wastNumber Number
|
||||
hi def link wastComment Comment
|
||||
hi def link wastType Type
|
||||
hi def link wastEscapedUtf8 Special
|
||||
|
||||
let b:current_syntax = "wast"
|
||||
|
||||
|
||||
@@ -2018,7 +2018,6 @@ apply_autocmds_group(
|
||||
int did_save_redobuff = FALSE;
|
||||
save_redo_T save_redo;
|
||||
int save_KeyTyped = KeyTyped;
|
||||
int save_did_emsg;
|
||||
ESTACK_CHECK_DECLARATION;
|
||||
|
||||
/*
|
||||
@@ -2310,12 +2309,14 @@ apply_autocmds_group(
|
||||
else
|
||||
check_lnums_nested(TRUE);
|
||||
|
||||
save_did_emsg = did_emsg;
|
||||
int save_did_emsg = did_emsg;
|
||||
int save_ex_pressedreturn = get_pressedreturn();
|
||||
|
||||
do_cmdline(NULL, getnextac, (void *)&patcmd,
|
||||
DOCMD_NOWAIT|DOCMD_VERBOSE|DOCMD_REPEAT);
|
||||
|
||||
did_emsg += save_did_emsg;
|
||||
set_pressedreturn(save_ex_pressedreturn);
|
||||
|
||||
if (nesting == 1)
|
||||
// restore cursor and topline, unless they were changed
|
||||
|
||||
18
src/buffer.c
18
src/buffer.c
@@ -502,7 +502,7 @@ can_unload_buffer(buf_T *buf)
|
||||
* It can be:
|
||||
* 0 buffer becomes hidden
|
||||
* DOBUF_UNLOAD buffer is unloaded
|
||||
* DOBUF_DELETE buffer is unloaded and removed from buffer list
|
||||
* DOBUF_DEL buffer is unloaded and removed from buffer list
|
||||
* DOBUF_WIPE buffer is unloaded and really deleted
|
||||
* DOBUF_WIPE_REUSE idem, and add to buf_reuse list
|
||||
* When doing all but the first one on the current buffer, the caller should
|
||||
@@ -5108,14 +5108,6 @@ build_stl_str_hl(
|
||||
STRMOVE(s + 1, p);
|
||||
*s = '<';
|
||||
|
||||
// Fill up for half a double-wide character.
|
||||
while (++width < maxwidth)
|
||||
{
|
||||
s = s + STRLEN(s);
|
||||
MB_CHAR2BYTES(fillchar, s);
|
||||
*s = NUL;
|
||||
}
|
||||
|
||||
--n; // count the '<'
|
||||
for (; l < itemcnt; l++)
|
||||
{
|
||||
@@ -5124,6 +5116,14 @@ build_stl_str_hl(
|
||||
else
|
||||
stl_items[l].stl_start = s;
|
||||
}
|
||||
|
||||
// Fill up for half a double-wide character.
|
||||
while (++width < maxwidth)
|
||||
{
|
||||
s = s + STRLEN(s);
|
||||
MB_CHAR2BYTES(fillchar, s);
|
||||
*s = NUL;
|
||||
}
|
||||
}
|
||||
width = maxwidth;
|
||||
}
|
||||
|
||||
110
src/crypt.c
110
src/crypt.c
@@ -77,6 +77,12 @@ typedef struct {
|
||||
static int crypt_sodium_init_(cryptstate_T *state, char_u *key, crypt_arg_T *arg);
|
||||
static long crypt_sodium_buffer_decode(cryptstate_T *state, char_u *from, size_t len, char_u **buf_out, int last);
|
||||
static long crypt_sodium_buffer_encode(cryptstate_T *state, char_u *from, size_t len, char_u **buf_out, int last);
|
||||
# if defined(FEAT_SODIUM) || defined(PROTO)
|
||||
static void crypt_long_long_to_char(long long n, char_u *s);
|
||||
static void crypt_int_to_char(int n, char_u *s);
|
||||
static long long crypt_char_to_long_long(char_u *s);
|
||||
static int crypt_char_to_int(char_u *s);
|
||||
#endif
|
||||
#if defined(FEAT_EVAL) && defined(FEAT_SODIUM)
|
||||
static void crypt_sodium_report_hash_params(unsigned long long opslimit, unsigned long long ops_def, size_t memlimit, size_t mem_def, int alg, int alg_def);
|
||||
#endif
|
||||
@@ -966,35 +972,45 @@ crypt_sodium_init_(
|
||||
// "cat_add" should not be NULL, check anyway for safety
|
||||
if (state->method_nr == CRYPT_M_SOD2 && arg->cat_add != NULL)
|
||||
{
|
||||
memcpy(arg->cat_add, &opslimit, sizeof(opslimit));
|
||||
arg->cat_add += sizeof(opslimit);
|
||||
char_u buffer[20];
|
||||
char_u *p = buffer;
|
||||
vim_memset(buffer, 0, 20);
|
||||
|
||||
memcpy(arg->cat_add, &memlimit, sizeof(memlimit));
|
||||
arg->cat_add += sizeof(memlimit);
|
||||
crypt_long_long_to_char(opslimit, p);
|
||||
p += sizeof(opslimit);
|
||||
|
||||
memcpy(arg->cat_add, &alg, sizeof(alg));
|
||||
arg->cat_add += sizeof(alg);
|
||||
crypt_long_long_to_char(memlimit, p);
|
||||
p += sizeof(memlimit);
|
||||
|
||||
crypt_int_to_char(alg, p);
|
||||
memcpy(arg->cat_add, buffer, sizeof(opslimit) + sizeof(memlimit) + sizeof(alg));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
char_u buffer[20];
|
||||
char_u *p = buffer;
|
||||
vim_memset(buffer, 0, 20);
|
||||
int size = sizeof(opslimit) +
|
||||
sizeof(memlimit) + sizeof(alg);
|
||||
|
||||
// Reading parameters from file
|
||||
if (arg->cat_add_len
|
||||
< (int)(sizeof(opslimit) + sizeof(memlimit) + sizeof(alg)))
|
||||
if (arg->cat_add_len < size)
|
||||
{
|
||||
sodium_free(sd_state);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
// derive the key from the file header
|
||||
memcpy(&opslimit, arg->cat_add, sizeof(opslimit));
|
||||
arg->cat_add += sizeof(opslimit);
|
||||
memcpy(p, arg->cat_add, size);
|
||||
arg->cat_add += size;
|
||||
|
||||
memcpy(&memlimit, arg->cat_add, sizeof(memlimit));
|
||||
arg->cat_add += sizeof(memlimit);
|
||||
|
||||
memcpy(&alg, arg->cat_add, sizeof(alg));
|
||||
arg->cat_add += sizeof(alg);
|
||||
opslimit = crypt_char_to_long_long(p);
|
||||
p += sizeof(opslimit);
|
||||
memlimit = crypt_char_to_long_long(p);
|
||||
p += sizeof(memlimit);
|
||||
alg = crypt_char_to_int(p);
|
||||
p += sizeof(alg);
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
crypt_sodium_report_hash_params(opslimit,
|
||||
@@ -1267,6 +1283,13 @@ crypt_sodium_buffer_decode(
|
||||
}
|
||||
|
||||
# if defined(FEAT_SODIUM) || defined(PROTO)
|
||||
void
|
||||
crypt_sodium_lock_key(char_u *key)
|
||||
{
|
||||
if (sodium_init() >= 0)
|
||||
sodium_mlock(key, STRLEN(key));
|
||||
}
|
||||
|
||||
int
|
||||
crypt_sodium_munlock(void *const addr, const size_t len)
|
||||
{
|
||||
@@ -1320,6 +1343,63 @@ crypt_sodium_report_hash_params(
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
crypt_long_long_to_char(long long n, char_u *s)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
s[i] = (char_u)(n & 0xff);
|
||||
n = (unsigned)n >> 8;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
crypt_int_to_char(int n, char_u *s)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
s[i] = (char_u)(n & 0xff);
|
||||
n = (unsigned)n >> 8;
|
||||
}
|
||||
}
|
||||
|
||||
static long long
|
||||
crypt_char_to_long_long(char_u *s)
|
||||
{
|
||||
unsigned long long retval = 0;
|
||||
int i;
|
||||
for (i = 7; i >= 0; i--)
|
||||
{
|
||||
if (i == 7)
|
||||
retval = s[i];
|
||||
else
|
||||
retval |= s[i];
|
||||
if (i > 0)
|
||||
retval <<= 8;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int
|
||||
crypt_char_to_int(char_u *s)
|
||||
{
|
||||
int retval = 0;
|
||||
int i;
|
||||
|
||||
for (i = 3; i >= 0; i--)
|
||||
{
|
||||
if (i == 3)
|
||||
retval = s[i];
|
||||
else
|
||||
retval |= s[i];
|
||||
if (i > 0)
|
||||
retval <<= 8;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif // FEAT_CRYPT
|
||||
|
||||
@@ -1037,6 +1037,8 @@ EXTERN char e_missing_argument_str[]
|
||||
INIT(= N_("E417: Missing argument: %s"));
|
||||
EXTERN char e_illegal_value_str[]
|
||||
INIT(= N_("E418: Illegal value: %s"));
|
||||
EXTERN char e_im_a_teapot[]
|
||||
INIT(= N_("E418: I'm a teapot"));
|
||||
EXTERN char e_fg_color_unknown[]
|
||||
INIT(= N_("E419: FG color unknown"));
|
||||
EXTERN char e_bg_color_unknown[]
|
||||
@@ -1270,6 +1272,8 @@ EXTERN char e_is_not_file_or_writable_device[]
|
||||
INIT(= N_("is not a file or writable device"));
|
||||
EXTERN char e_str_is_not_file_or_writable_device[]
|
||||
INIT(= N_("E503: \"%s\" is not a file or writable device"));
|
||||
EXTERN char e_coffee_currently_not_available[]
|
||||
INIT(= N_("E503: Coffee is currently not available"));
|
||||
// E504
|
||||
EXTERN char e_is_read_only_cannot_override_W_in_cpoptions[]
|
||||
INIT(= N_("is read-only (cannot override: \"W\" in 'cpoptions')"));
|
||||
|
||||
@@ -45,6 +45,7 @@ static void f_did_filetype(typval_T *argvars, typval_T *rettv);
|
||||
static void f_echoraw(typval_T *argvars, typval_T *rettv);
|
||||
static void f_empty(typval_T *argvars, typval_T *rettv);
|
||||
static void f_environ(typval_T *argvars, typval_T *rettv);
|
||||
static void f_err_teapot(typval_T *argvars, typval_T *rettv);
|
||||
static void f_escape(typval_T *argvars, typval_T *rettv);
|
||||
static void f_eval(typval_T *argvars, typval_T *rettv);
|
||||
static void f_eventhandler(typval_T *argvars, typval_T *rettv);
|
||||
@@ -1881,6 +1882,8 @@ static funcentry_T global_functions[] =
|
||||
ret_number_bool, f_empty},
|
||||
{"environ", 0, 0, 0, NULL,
|
||||
ret_dict_string, f_environ},
|
||||
{"err_teapot", 0, 1, 0, NULL,
|
||||
ret_number_bool, f_err_teapot},
|
||||
{"escape", 2, 2, FEARG_1, arg2_string,
|
||||
ret_string, f_escape},
|
||||
{"eval", 1, 1, FEARG_1, arg1_string,
|
||||
@@ -3922,6 +3925,33 @@ f_environ(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* "err_teapot()" function
|
||||
*/
|
||||
static void
|
||||
f_err_teapot(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
{
|
||||
if (argvars[0].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
if (argvars[0].v_type == VAR_STRING)
|
||||
{
|
||||
char_u *s = tv_get_string_strict(&argvars[0]);
|
||||
if (s == NULL || *skipwhite(s) == NUL)
|
||||
return;
|
||||
}
|
||||
|
||||
int err = FALSE;
|
||||
int do_503 = eval_expr_to_bool(&argvars[0], &err);
|
||||
if (!err && do_503)
|
||||
{
|
||||
emsg(_(e_coffee_currently_not_available));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
emsg(_(e_im_a_teapot));
|
||||
}
|
||||
|
||||
/*
|
||||
* "escape({string}, {chars})" function
|
||||
*/
|
||||
@@ -6456,6 +6486,14 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
1
|
||||
#else
|
||||
0
|
||||
#endif
|
||||
},
|
||||
{":tearoff",
|
||||
// same #ifdef as used for ex_tearoff().
|
||||
#if defined(FEAT_GUI_MSWIN) && defined(FEAT_MENU) && defined(FEAT_TEAROFF)
|
||||
1
|
||||
#else
|
||||
0
|
||||
#endif
|
||||
},
|
||||
{NULL, 0}
|
||||
|
||||
@@ -9840,7 +9840,6 @@ is_loclist_cmd(int cmdidx)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_TIMERS) || defined(PROTO)
|
||||
int
|
||||
get_pressedreturn(void)
|
||||
{
|
||||
@@ -9852,4 +9851,3 @@ set_pressedreturn(int val)
|
||||
{
|
||||
ex_pressedreturn = val;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/* Work around for perl-5.18.
|
||||
* Don't include "perl\lib\CORE\inline.h" for now,
|
||||
* include it after Perl_sv_free2 is defined. */
|
||||
#ifdef DYNAMIC_PERL
|
||||
#if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
|
||||
# define PERL_NO_INLINE_FUNCTIONS
|
||||
#endif
|
||||
|
||||
@@ -402,14 +402,14 @@ static bool (*Perl_sv_2bool)(pTHX_ SV*);
|
||||
static IV (*Perl_sv_2iv)(pTHX_ SV*);
|
||||
static SV* (*Perl_sv_2mortal)(pTHX_ SV*);
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
static char* (*Perl_sv_2pv_flags)(pTHX_ SV*, STRLEN*, I32);
|
||||
static char* (*Perl_sv_2pv_flags)(pTHX_ SV*, STRLEN* const, const U32);
|
||||
static char* (*Perl_sv_2pv_nolen)(pTHX_ SV*);
|
||||
# else
|
||||
static char* (*Perl_sv_2pv)(pTHX_ SV*, STRLEN*);
|
||||
# endif
|
||||
static char* (*Perl_sv_2pvbyte)(pTHX_ SV*, STRLEN*);
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 32)
|
||||
static char* (*Perl_sv_2pvbyte_flags)(pTHX_ SV*, STRLEN*, I32);
|
||||
static char* (*Perl_sv_2pvbyte_flags)(pTHX_ SV*, STRLEN* const, const U32);
|
||||
# endif
|
||||
static SV* (*Perl_sv_bless)(pTHX_ SV*, HV*);
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 8)
|
||||
@@ -710,7 +710,7 @@ S_POPMARK(pTHX)
|
||||
# endif
|
||||
|
||||
/* perl-5.34 needs Perl_SvTRUE_common; used in SvTRUE_nomg_NN */
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 34)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION == 34)
|
||||
PERL_STATIC_INLINE bool
|
||||
Perl_SvTRUE_common(pTHX_ SV * sv, const bool sv_2bool_is_fallback)
|
||||
{
|
||||
@@ -737,7 +737,7 @@ Perl_SvTRUE_common(pTHX_ SV * sv, const bool sv_2bool_is_fallback)
|
||||
# endif
|
||||
|
||||
/* perl-5.32 needs Perl_SvTRUE */
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION >= 32)
|
||||
# if (PERL_REVISION == 5) && (PERL_VERSION == 32)
|
||||
PERL_STATIC_INLINE bool
|
||||
Perl_SvTRUE(pTHX_ SV *sv) {
|
||||
if (!LIKELY(sv))
|
||||
@@ -1649,7 +1649,7 @@ Buffers(...)
|
||||
PPCODE:
|
||||
if (items == 0)
|
||||
{
|
||||
if (GIMME == G_SCALAR)
|
||||
if (GIMME_V == G_SCALAR)
|
||||
{
|
||||
i = 0;
|
||||
FOR_ALL_BUFFERS(vimbuf)
|
||||
@@ -1700,7 +1700,7 @@ Windows(...)
|
||||
PPCODE:
|
||||
if (items == 0)
|
||||
{
|
||||
if (GIMME == G_SCALAR)
|
||||
if (GIMME_V == G_SCALAR)
|
||||
XPUSHs(sv_2mortal(newSViv(win_count())));
|
||||
else
|
||||
{
|
||||
|
||||
@@ -424,6 +424,24 @@ error:
|
||||
}
|
||||
|
||||
#if defined(FEAT_CRYPT) || defined(PROTO)
|
||||
/*
|
||||
* Swapfile encryption is not supported by XChaCha20. If this crypt method is
|
||||
* used then disable the swapfile, to avoid plain text being written to disk,
|
||||
* and return TRUE.
|
||||
* Otherwise return FALSE.
|
||||
*/
|
||||
static int
|
||||
crypt_may_close_swapfile(buf_T *buf, char_u *key, int method)
|
||||
{
|
||||
if (crypt_method_is_sodium(method) && *key != NUL)
|
||||
{
|
||||
mf_close_file(buf, TRUE);
|
||||
buf->b_p_swf = FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Prepare encryption for "buf" for the current key and method.
|
||||
*/
|
||||
@@ -440,11 +458,10 @@ ml_set_mfp_crypt(buf_T *buf)
|
||||
// Generate a seed and store it in the memfile.
|
||||
sha2_seed(buf->b_ml.ml_mfp->mf_seed, MF_SEED_LEN, NULL, 0);
|
||||
}
|
||||
#ifdef FEAT_SODIUM
|
||||
# ifdef FEAT_SODIUM
|
||||
else if (crypt_method_is_sodium(method_nr))
|
||||
crypt_sodium_randombytes_buf(buf->b_ml.ml_mfp->mf_seed,
|
||||
MF_SEED_LEN);
|
||||
#endif
|
||||
crypt_sodium_randombytes_buf(buf->b_ml.ml_mfp->mf_seed, MF_SEED_LEN);
|
||||
# endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -501,16 +518,10 @@ ml_set_crypt_key(
|
||||
return; // no memfile yet, nothing to do
|
||||
old_method = crypt_method_nr_from_name(old_cm);
|
||||
|
||||
// Swapfile encryption is not supported by XChaCha20, therefore disable the
|
||||
// swapfile to avoid plain text being written to disk.
|
||||
if (crypt_method_is_sodium(crypt_get_method_nr(buf))
|
||||
&& *buf->b_p_key != NUL)
|
||||
{
|
||||
// close the swapfile
|
||||
mf_close_file(buf, TRUE);
|
||||
buf->b_p_swf = FALSE;
|
||||
#ifdef FEAT_CRYPT
|
||||
if (crypt_may_close_swapfile(buf, buf->b_p_key, crypt_get_method_nr(buf)))
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// First make sure the swapfile is in a consistent state, using the old
|
||||
// key and method.
|
||||
@@ -2494,6 +2505,12 @@ ml_sync_all(int check_file, int check_char)
|
||||
|| buf->b_ml.ml_mfp->mf_fd < 0)
|
||||
continue; // no file
|
||||
|
||||
#ifdef FEAT_CRYPT
|
||||
if (crypt_may_close_swapfile(buf, buf->b_p_key,
|
||||
crypt_get_method_nr(buf)))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
ml_flush_line(buf); // flush buffered line
|
||||
// flush locked block
|
||||
(void)ml_find_line(buf, (linenr_T)0, ML_FLUSH);
|
||||
@@ -2551,6 +2568,10 @@ ml_preserve(buf_T *buf, int message)
|
||||
emsg(_(e_cannot_preserve_there_is_no_swap_file));
|
||||
return;
|
||||
}
|
||||
#ifdef FEAT_CRYPT
|
||||
if (crypt_may_close_swapfile(buf, buf->b_p_key, crypt_get_method_nr(buf)))
|
||||
return;
|
||||
#endif
|
||||
|
||||
// We only want to stop when interrupted here, not when interrupted
|
||||
// before.
|
||||
@@ -3626,7 +3647,7 @@ adjust_text_props_for_delete(
|
||||
int idx;
|
||||
int line_start;
|
||||
long line_size;
|
||||
int this_props_len;
|
||||
int this_props_len = 0;
|
||||
char_u *text;
|
||||
size_t textlen;
|
||||
int found;
|
||||
@@ -5571,6 +5592,9 @@ ml_crypt_prepare(memfile_T *mfp, off_T offset, int reading)
|
||||
if (*key == NUL)
|
||||
return NULL;
|
||||
|
||||
if (crypt_may_close_swapfile(buf, key, method_nr))
|
||||
return NULL;
|
||||
|
||||
if (method_nr == CRYPT_M_ZIP)
|
||||
{
|
||||
// For PKzip: Append the offset to the key, so that we use a different
|
||||
|
||||
23
src/move.c
23
src/move.c
@@ -2591,17 +2591,20 @@ scroll_cursor_bot(int min_scroll, int set_topbot)
|
||||
(curwin, curwin->w_topline, FALSE);
|
||||
int skip_lines = 0;
|
||||
int width1 = curwin->w_width - curwin_col_off();
|
||||
int width2 = width1 + curwin_col_off2();
|
||||
// similar formula is used in curs_columns()
|
||||
if (curwin->w_skipcol > width1)
|
||||
skip_lines += (curwin->w_skipcol - width1) / width2 + 1;
|
||||
else if (curwin->w_skipcol > 0)
|
||||
skip_lines = 1;
|
||||
|
||||
top_plines -= skip_lines;
|
||||
if (top_plines > curwin->w_height)
|
||||
if (width1 > 0)
|
||||
{
|
||||
scrolled += (top_plines - curwin->w_height);
|
||||
int width2 = width1 + curwin_col_off2();
|
||||
// similar formula is used in curs_columns()
|
||||
if (curwin->w_skipcol > width1)
|
||||
skip_lines += (curwin->w_skipcol - width1) / width2 + 1;
|
||||
else if (curwin->w_skipcol > 0)
|
||||
skip_lines = 1;
|
||||
|
||||
top_plines -= skip_lines;
|
||||
if (top_plines > curwin->w_height)
|
||||
{
|
||||
scrolled += (top_plines - curwin->w_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2135,10 +2135,14 @@ do_set_option_numeric(
|
||||
((flags & P_VI_DEF) || cp_val) ? VI_DEFAULT : VIM_DEFAULT];
|
||||
else if (nextchar == '<')
|
||||
{
|
||||
// For 'undolevels' NO_LOCAL_UNDOLEVEL means to
|
||||
// use the global value.
|
||||
if ((long *)varp == &curbuf->b_p_ul && opt_flags == OPT_LOCAL)
|
||||
// for 'undolevels' NO_LOCAL_UNDOLEVEL means using the global value
|
||||
value = NO_LOCAL_UNDOLEVEL;
|
||||
else if (opt_flags == OPT_LOCAL
|
||||
&& ((long *)varp == &curwin->w_p_siso
|
||||
|| (long *)varp == &curwin->w_p_so))
|
||||
// for 'scrolloff'/'sidescrolloff' -1 means using the global value
|
||||
value = -1;
|
||||
else
|
||||
value = *(long *)get_varp_scope(&(options[opt_idx]), OPT_GLOBAL);
|
||||
}
|
||||
|
||||
@@ -1174,6 +1174,10 @@ did_set_cryptkey(optset_T *args)
|
||||
*curbuf->b_p_cm == NUL ? p_cm : curbuf->b_p_cm);
|
||||
changed_internal();
|
||||
}
|
||||
# ifdef FEAT_SODIUM
|
||||
if (crypt_method_is_sodium(crypt_get_method_nr(curbuf)))
|
||||
crypt_sodium_lock_key(args->os_newval.string);
|
||||
# endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ void crypt_check_swapfile_curbuf(void);
|
||||
void crypt_check_current_method(void);
|
||||
char_u *crypt_get_key(int store, int twice);
|
||||
void crypt_append_msg(buf_T *buf);
|
||||
void crypt_sodium_lock_key(char_u *key);
|
||||
int crypt_sodium_munlock(void *const addr, const size_t len);
|
||||
void crypt_sodium_randombytes_buf(void *const buf, const size_t size);
|
||||
int crypt_sodium_init(void);
|
||||
|
||||
19
src/testdir/dumps/Test_smoothscroll_zero_bot.dump
Normal file
19
src/testdir/dumps/Test_smoothscroll_zero_bot.dump
Normal file
@@ -0,0 +1,19 @@
|
||||
| +0#af5f00255#ffffff0||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
>@+0#4040ff13&||+1#0000000&| +0&&@72
|
||||
|<+3&&| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @59
|
||||
| +0&&@74
|
||||
@@ -92,6 +92,9 @@ set shellslash
|
||||
" Common with all tests on all systems.
|
||||
source setup.vim
|
||||
|
||||
" Needed for RunningWithValgrind().
|
||||
source shared.vim
|
||||
|
||||
" For consistency run all tests with 'nocompatible' set.
|
||||
" This also enables use of line continuation.
|
||||
set nocp viminfo+=nviminfo
|
||||
@@ -219,12 +222,18 @@ unlet name
|
||||
func TestTimeout(id)
|
||||
split test.log
|
||||
call append(line('$'), '')
|
||||
call append(line('$'), 'Test timed out: ' .. g:testfunc)
|
||||
|
||||
let text = 'Test timed out: ' .. g:testfunc
|
||||
if g:timeout_start > 0
|
||||
let text ..= strftime(' after %s seconds', localtime() - g:timeout_start)
|
||||
endif
|
||||
call append(line('$'), text)
|
||||
write
|
||||
call add(v:errors, 'Test timed out: ' . g:testfunc)
|
||||
call add(v:errors, text)
|
||||
|
||||
cquit! 42
|
||||
endfunc
|
||||
let g:timeout_start = 0
|
||||
|
||||
func RunTheTest(test)
|
||||
let prefix = ''
|
||||
@@ -237,7 +246,9 @@ func RunTheTest(test)
|
||||
if has('timers')
|
||||
" No test should take longer than 30 seconds. If it takes longer we
|
||||
" assume we are stuck and need to break out.
|
||||
let test_timeout_timer = timer_start(30000, 'TestTimeout')
|
||||
let test_timeout_timer =
|
||||
\ timer_start(RunningWithValgrind() ? 50000 : 30000, 'TestTimeout')
|
||||
let g:timeout_start = localtime()
|
||||
endif
|
||||
|
||||
" Avoid stopping at the "hit enter" prompt
|
||||
@@ -307,6 +318,7 @@ func RunTheTest(test)
|
||||
|
||||
if has('timers')
|
||||
call timer_stop(test_timeout_timer)
|
||||
let g:timeout_start = 0
|
||||
endif
|
||||
|
||||
" Clear any autocommands and put back the catch-all for SwapExists.
|
||||
@@ -371,7 +383,7 @@ func RunTheTest(test)
|
||||
|
||||
" close any split windows
|
||||
while winnr('$') > 1
|
||||
bwipe!
|
||||
noswapfile bwipe!
|
||||
endwhile
|
||||
|
||||
" May be editing some buffer, wipe it out. Then we may end up in another
|
||||
@@ -399,6 +411,24 @@ func RunTheTest(test)
|
||||
endif
|
||||
endfunc
|
||||
|
||||
function Delete_Xtest_Files()
|
||||
for file in glob('X*', v:false, v:true)
|
||||
if file ==? 'XfakeHOME'
|
||||
" Clean up files created by setup.vim
|
||||
call delete('XfakeHOME', 'rf')
|
||||
continue
|
||||
endif
|
||||
" call add(v:errors, file .. " exists when it shouldn't, trying to delete it!")
|
||||
call delete(file)
|
||||
if !empty(glob(file, v:false, v:true))
|
||||
" call add(v:errors, file .. " still exists after trying to delete it!")
|
||||
if has('unix')
|
||||
call system('rm -rf ' .. file)
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
func AfterTheTest(func_name)
|
||||
if len(v:errors) > 0
|
||||
if match(s:may_fail_list, '^' .. a:func_name) >= 0
|
||||
@@ -427,13 +457,11 @@ endfunc
|
||||
" This function can be called by a test if it wants to abort testing.
|
||||
func FinishTesting()
|
||||
call AfterTheTest('')
|
||||
call Delete_Xtest_Files()
|
||||
|
||||
" Don't write viminfo on exit.
|
||||
set viminfo=
|
||||
|
||||
" Clean up files created by setup.vim
|
||||
call delete('XfakeHOME', 'rf')
|
||||
|
||||
if s:fail == 0 && s:fail_expected == 0
|
||||
" Success, create the .res file so that make knows it's done.
|
||||
exe 'split ' . fnamemodify(g:testname, ':r') . '.res'
|
||||
|
||||
@@ -22,11 +22,11 @@ endif
|
||||
|
||||
func Common_head_only(text)
|
||||
" This was crashing Vim
|
||||
split Xtest.txt
|
||||
split Xtest_head.txt
|
||||
call setline(1, a:text)
|
||||
wq
|
||||
call feedkeys(":split Xtest.txt\<CR>foobar\<CR>", "tx")
|
||||
call delete('Xtest.txt')
|
||||
call feedkeys(":split Xtest_head.txt\<CR>foobar\<CR>", "tx")
|
||||
call delete('Xtest_head.txt')
|
||||
call assert_match('VimCrypt', getline(1))
|
||||
bwipe!
|
||||
endfunc
|
||||
@@ -49,7 +49,7 @@ func Crypt_uncrypt(method)
|
||||
" If the blowfish test fails 'cryptmethod' will be 'zip' now.
|
||||
call assert_equal(a:method, &cryptmethod)
|
||||
|
||||
split Xtest.txt
|
||||
split Xtest_uncrypt.txt
|
||||
let text =<< trim END
|
||||
01234567890123456789012345678901234567,
|
||||
line 2 foo bar blah,
|
||||
@@ -60,11 +60,11 @@ func Crypt_uncrypt(method)
|
||||
call assert_equal('*****', &key)
|
||||
w!
|
||||
bwipe!
|
||||
call feedkeys(":split Xtest.txt\<CR>foobar\<CR>", 'xt')
|
||||
call feedkeys(":split Xtest_uncrypt.txt\<CR>foobar\<CR>", 'xt')
|
||||
call assert_equal(text, getline(1, 3))
|
||||
set key= cryptmethod&
|
||||
bwipe!
|
||||
call delete('Xtest.txt')
|
||||
call delete('Xtest_uncrypt.txt')
|
||||
endfunc
|
||||
|
||||
func Test_crypt_zip()
|
||||
@@ -105,7 +105,7 @@ func Test_crypt_sodium_v2_startup()
|
||||
exe buf .. 'bwipe!'
|
||||
call assert_true(filereadable('Xfoo'))
|
||||
|
||||
let buf = RunVimInTerminal('--cmd "set ch=3 cm=xchacha20v2 key=foo" Xfoo', #{rows: 10})
|
||||
let buf = RunVimInTerminal('--cmd "set ch=3 cm=xchacha20v2 key=foo" Xfoo', #{wait_for_ruler: 0, rows: 10})
|
||||
call g:TermWait(buf, g:RunningWithValgrind() ? 1000 : 50)
|
||||
call StopVimInTerminal(buf)
|
||||
|
||||
@@ -113,17 +113,17 @@ func Test_crypt_sodium_v2_startup()
|
||||
endfunc
|
||||
|
||||
func Uncrypt_stable(method, crypted_text, key, uncrypted_text)
|
||||
split Xtest.txt
|
||||
split Xtest_stable.txt
|
||||
set bin noeol key= fenc=latin1
|
||||
exe "set cryptmethod=" . a:method
|
||||
call setline(1, a:crypted_text)
|
||||
w!
|
||||
bwipe!
|
||||
set nobin
|
||||
call feedkeys(":split Xtest.txt\<CR>" . a:key . "\<CR>", 'xt')
|
||||
call feedkeys(":split Xtest_stable.txt\<CR>" . a:key . "\<CR>", 'xt')
|
||||
call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text)))
|
||||
bwipe!
|
||||
call delete('Xtest.txt')
|
||||
call delete('Xtest_stable.txt')
|
||||
set key=
|
||||
endfunc
|
||||
|
||||
@@ -132,13 +132,13 @@ func Uncrypt_stable_xxd(method, hex, key, uncrypted_text, verbose)
|
||||
throw 'Skipped: xxd program missing'
|
||||
endif
|
||||
" use xxd to write the binary content
|
||||
call system(s:xxd_cmd .. ' -r >Xtest.txt', a:hex)
|
||||
call system(s:xxd_cmd .. ' -r >Xtest_stable_xxd.txt', a:hex)
|
||||
let cmd = (a:verbose ? ':verbose' : '') ..
|
||||
\ ":split Xtest.txt\<CR>" . a:key . "\<CR>"
|
||||
\ ":split Xtest_stable_xxd.txt\<CR>" . a:key . "\<CR>"
|
||||
call feedkeys(cmd, 'xt')
|
||||
call assert_equal(a:uncrypted_text, getline(1, len(a:uncrypted_text)))
|
||||
bwipe!
|
||||
call delete('Xtest.txt')
|
||||
call delete('Xtest_stable_xxd.txt')
|
||||
set key=
|
||||
endfunc
|
||||
|
||||
@@ -189,7 +189,11 @@ func Test_uncrypt_xchacha20v2_custom()
|
||||
00000060: a4cf 33d2 7507 ec38 ba62 a327 9068 d8ad ..3.u..8.b.'.h..
|
||||
00000070: 2607 3fa6 f95d 7ea8 9799 f997 4820 0c &.?..]~.....H .
|
||||
END
|
||||
call Uncrypt_stable_xxd('xchacha20v2', hex, "foobar", ["", "foo", "bar", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"], 1)
|
||||
try
|
||||
call Uncrypt_stable_xxd('xchacha20v2', hex, "foobar", ["", "foo", "bar", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"], 1)
|
||||
catch /^Vim\%((\a\+)\)\=:E1230:/ " sodium_mlock() not possible, may happen at Github CI
|
||||
throw 'Skipped: sodium_mlock() not possible'
|
||||
endtry
|
||||
call assert_match('xchacha20v2: using custom \w\+ "\d\+" for Key derivation.', execute(':messages'))
|
||||
endfunc
|
||||
|
||||
@@ -209,7 +213,11 @@ func Test_uncrypt_xchacha20v2()
|
||||
00000090: 2416 205a 8c4c 5fde 4dac 2611 8a48 24f0 $. Z.L_.M.&..H$.
|
||||
000000a0: ba00 92c1 60 ....`
|
||||
END
|
||||
call Uncrypt_stable_xxd('xchacha20v2', hex, "foo1234", ["abcdefghijklmnopqrstuvwxyzäöü", 'ZZZ_äüöÄÜÖ_!@#$%^&*()_+=-`~"'], 0)
|
||||
try
|
||||
call Uncrypt_stable_xxd('xchacha20v2', hex, "foo1234", ["abcdefghijklmnopqrstuvwxyzäöü", 'ZZZ_äüöÄÜÖ_!@#$%^&*()_+=-`~"'], 0)
|
||||
catch /^Vim\%((\a\+)\)\=:E1230:/ " sodium_mlock() not possible, may happen at Github CI
|
||||
throw 'Skipped: sodium_mlock() not possible'
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
func Test_uncrypt_xchacha20_invalid()
|
||||
@@ -220,6 +228,8 @@ func Test_uncrypt_xchacha20_invalid()
|
||||
try
|
||||
call feedkeys(":split samples/crypt_sodium_invalid.txt\<CR>sodium\<CR>", 'xt')
|
||||
call assert_false(1, 'should not happen')
|
||||
catch /^Vim\%((\a\+)\)\=:E1230:/ " sodium_mlock() not possible, may happen at Github CI
|
||||
throw 'Skipped: sodium_mlock() not possible'
|
||||
catch
|
||||
call assert_exception('pre-mature')
|
||||
endtry
|
||||
@@ -272,7 +282,11 @@ func Test_uncrypt_xchacha20v2_2()
|
||||
" swapfile disabled
|
||||
call assert_equal(0, &swapfile)
|
||||
call assert_match("Note: Encryption of swapfile not supported, disabling swap file", execute(':messages'))
|
||||
w!
|
||||
try
|
||||
w!
|
||||
catch /^Vim\%((\a\+)\)\=:E1230:/ " sodium_mlock() not possible, may happen at Github CI
|
||||
throw 'Skipped: sodium_mlock() not possible'
|
||||
endtry
|
||||
" encrypted using xchacha20
|
||||
call assert_match("\[xchachav2\]", execute(':messages'))
|
||||
bw!
|
||||
@@ -354,7 +368,7 @@ endfunc
|
||||
func Test_crypt_key_mismatch()
|
||||
set cryptmethod=blowfish
|
||||
|
||||
split Xtest.txt
|
||||
split Xtest_mismatch.txt
|
||||
call setline(1, 'nothing')
|
||||
call feedkeys(":X\<CR>foobar\<CR>nothing\<CR>", 'xt')
|
||||
call assert_match("Keys don't match!", execute(':2messages'))
|
||||
@@ -392,4 +406,24 @@ func Test_crypt_set_key_changes_buffer()
|
||||
call delete('Xtest1.txt')
|
||||
endfunc
|
||||
|
||||
func Test_crypt_set_key_segfault()
|
||||
CheckFeature sodium
|
||||
|
||||
defer delete('Xtest2.txt')
|
||||
new Xtest2.txt
|
||||
call setline(1, 'nothing')
|
||||
set cryptmethod=xchacha20
|
||||
set key=foobar
|
||||
w
|
||||
new Xtest3
|
||||
put ='other content'
|
||||
setl modified
|
||||
sil! preserve
|
||||
bwipe!
|
||||
|
||||
set cryptmethod&
|
||||
set key=
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -239,6 +239,12 @@ func Test_ex_mode_errors()
|
||||
|
||||
au! CmdLineEnter
|
||||
delfunc ExEnterFunc
|
||||
|
||||
au CmdlineEnter * :
|
||||
call feedkeys("gQecho 1\r", 'xt')
|
||||
|
||||
au! CmdlineEnter
|
||||
|
||||
quit
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -122,6 +122,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
||||
bicep: ['file.bicep'],
|
||||
bindzone: ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file'],
|
||||
bitbake: ['file.bb', 'file.bbappend', 'file.bbclass', 'build/conf/local.conf', 'meta/conf/layer.conf', 'build/conf/bbappend.conf', 'meta-layer/conf/distro/foo.conf'],
|
||||
blade: ['file.blade.php'],
|
||||
blank: ['file.bl'],
|
||||
blueprint: ['file.blp'],
|
||||
bsdl: ['file.bsd', 'file.bsdl'],
|
||||
@@ -339,7 +340,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
||||
jq: ['file.jq'],
|
||||
jovial: ['file.jov', 'file.j73', 'file.jovial'],
|
||||
jproperties: ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'],
|
||||
json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', '.prettierrc', '.firebaserc', '.stylelintrc', 'file.slnf'],
|
||||
json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', '.prettierrc', '.firebaserc', '.stylelintrc', 'file.slnf'],
|
||||
json5: ['file.json5'],
|
||||
jsonc: ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json'],
|
||||
jsonl: ['file.jsonl'],
|
||||
@@ -506,6 +507,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
||||
pccts: ['file.g'],
|
||||
pcmk: ['file.pcmk'],
|
||||
pdf: ['file.pdf'],
|
||||
pem: ['file.pem', 'file.cer', 'file.crt', 'file.csr'],
|
||||
perl: ['file.plx', 'file.al', 'file.psgi', 'gitolite.rc', '.gitolite.rc', 'example.gitolite.rc', '.latexmkrc', 'latexmkrc'],
|
||||
pf: ['pf.conf'],
|
||||
pfmain: ['main.cf', 'main.cf.proto'],
|
||||
@@ -542,6 +544,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
||||
psl: ['file.psl'],
|
||||
pug: ['file.pug'],
|
||||
puppet: ['file.pp'],
|
||||
pymanifest: ['MANIFEST.in'],
|
||||
pyret: ['file.arr'],
|
||||
pyrex: ['file.pyx', 'file.pxd'],
|
||||
python: ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', 'file.ptl', 'file.pyi', 'SConstruct'],
|
||||
@@ -740,6 +743,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
||||
udevperm: ['/etc/udev/permissions.d/file.permissions', 'any/etc/udev/permissions.d/file.permissions'],
|
||||
udevrules: ['/etc/udev/rules.d/file.rules', '/usr/lib/udev/rules.d/file.rules', '/lib/udev/rules.d/file.rules'],
|
||||
uil: ['file.uit', 'file.uil'],
|
||||
unison: ['file.u', 'file.uu'],
|
||||
updatedb: ['/etc/updatedb.conf', 'any/etc/updatedb.conf'],
|
||||
upstart: ['/usr/share/upstart/file.conf', '/usr/share/upstart/file.override', '/etc/init/file.conf', '/etc/init/file.override', '/.init/file.conf', '/.init/file.override', '/.config/upstart/file.conf', '/.config/upstart/file.override', 'any/.config/upstart/file.conf', 'any/.config/upstart/file.override', 'any/.init/file.conf', 'any/.init/file.override', 'any/etc/init/file.conf', 'any/etc/init/file.override', 'any/usr/share/upstart/file.conf', 'any/usr/share/upstart/file.override'],
|
||||
upstreamdat: ['upstream.dat', 'UPSTREAM.DAT', 'upstream.file.dat', 'UPSTREAM.FILE.DAT', 'file.upstream.dat', 'FILE.UPSTREAM.DAT'],
|
||||
@@ -749,6 +753,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
||||
usd: ['file.usda', 'file.usd'],
|
||||
usserverlog: ['usserver.log', 'USSERVER.LOG', 'usserver.file.log', 'USSERVER.FILE.LOG', 'file.usserver.log', 'FILE.USSERVER.LOG'],
|
||||
usw2kagtlog: ['usw2kagt.log', 'USW2KAGT.LOG', 'usw2kagt.file.log', 'USW2KAGT.FILE.LOG', 'file.usw2kagt.log', 'FILE.USW2KAGT.LOG'],
|
||||
v: ['file.vsh', 'file.vv'],
|
||||
vala: ['file.vala'],
|
||||
vb: ['file.sba', 'file.vb', 'file.vbs', 'file.dsm', 'file.ctl'],
|
||||
vdf: ['file.vdf'],
|
||||
@@ -773,6 +778,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
||||
webmacro: ['file.wm'],
|
||||
wget: ['.wgetrc', 'wgetrc'],
|
||||
wget2: ['.wget2rc', 'wget2rc'],
|
||||
wgsl: ['file.wgsl'],
|
||||
winbatch: ['file.wbt'],
|
||||
wit: ['file.wit'],
|
||||
wml: ['file.wml'],
|
||||
@@ -793,7 +799,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
||||
xsd: ['file.xsd'],
|
||||
xslt: ['file.xsl', 'file.xslt'],
|
||||
yacc: ['file.yy', 'file.yxx', 'file.y++'],
|
||||
yaml: ['file.yaml', 'file.yml', '.clangd', '.clang-format', '.clang-tidy'],
|
||||
yaml: ['file.yaml', 'file.yml', 'file.eyaml', '.clangd', '.clang-format', '.clang-tidy'],
|
||||
yang: ['file.yang'],
|
||||
yuck: ['file.yuck'],
|
||||
z8a: ['file.z8a'],
|
||||
|
||||
@@ -30,10 +30,13 @@ func Test_has()
|
||||
call assert_equal(1, or(has('ttyin'), 1))
|
||||
call assert_equal(0, and(has('ttyout'), 0))
|
||||
call assert_equal(1, has('multi_byte_encoding'))
|
||||
call assert_equal(0, has(':tearoff'))
|
||||
endif
|
||||
call assert_equal(1, has('vcon', 1))
|
||||
call assert_equal(1, has('mouse_gpm_enabled', 1))
|
||||
|
||||
call assert_equal(has('gui_win32') && has('menu'), has(':tearoff'))
|
||||
|
||||
call assert_equal(0, has('nonexistent'))
|
||||
call assert_equal(0, has('nonexistent', 1))
|
||||
|
||||
@@ -86,6 +89,17 @@ func Test_empty()
|
||||
call assert_fails("call empty(test_unknown())", ['E340:', 'E685:'])
|
||||
endfunc
|
||||
|
||||
func Test_err_teapot()
|
||||
call assert_fails('call err_teapot()', "E418: I'm a teapot")
|
||||
call assert_fails('call err_teapot(0)', "E418: I'm a teapot")
|
||||
call assert_fails('call err_teapot(v:false)', "E418: I'm a teapot")
|
||||
|
||||
call assert_fails('call err_teapot("1")', "E503: Coffee is currently not available")
|
||||
call assert_fails('call err_teapot(v:true)', "E503: Coffee is currently not available")
|
||||
let expr = 1
|
||||
call assert_fails('call err_teapot(expr)', "E503: Coffee is currently not available")
|
||||
endfunc
|
||||
|
||||
func Test_test_void()
|
||||
call assert_fails('echo 1 == test_void()', 'E1031:')
|
||||
call assert_fails('echo 1.0 == test_void()', 'E1031:')
|
||||
|
||||
@@ -973,6 +973,7 @@ func Test_mksession_foldopt()
|
||||
close
|
||||
%bwipe
|
||||
set sessionoptions&
|
||||
call delete('Xtest_mks.out')
|
||||
endfunc
|
||||
|
||||
" Test for mksession with "help" but not "options" in 'sessionoptions'
|
||||
@@ -1105,6 +1106,7 @@ func Test_mksession_shortmess_with_A()
|
||||
set shortmess&
|
||||
set sessionoptions&
|
||||
call delete('Xtestsession')
|
||||
call delete('Xtestfile')
|
||||
endfunc
|
||||
|
||||
" Test for mksession with 'compatible' option
|
||||
|
||||
@@ -954,12 +954,16 @@ func Test_local_scrolloff()
|
||||
wincmd w
|
||||
call assert_equal(5, &so)
|
||||
wincmd w
|
||||
call assert_equal(3, &so)
|
||||
setlocal so<
|
||||
call assert_equal(5, &so)
|
||||
setglob so=8
|
||||
call assert_equal(8, &so)
|
||||
call assert_equal(-1, &l:so)
|
||||
setlocal so=0
|
||||
call assert_equal(0, &so)
|
||||
setlocal so=-1
|
||||
call assert_equal(5, &so)
|
||||
call assert_equal(8, &so)
|
||||
|
||||
call assert_equal(7, &siso)
|
||||
setlocal siso=3
|
||||
@@ -967,12 +971,16 @@ func Test_local_scrolloff()
|
||||
wincmd w
|
||||
call assert_equal(7, &siso)
|
||||
wincmd w
|
||||
call assert_equal(3, &siso)
|
||||
setlocal siso<
|
||||
call assert_equal(7, &siso)
|
||||
setglob siso=4
|
||||
call assert_equal(4, &siso)
|
||||
call assert_equal(-1, &l:siso)
|
||||
setlocal siso=0
|
||||
call assert_equal(0, &siso)
|
||||
setlocal siso=-1
|
||||
call assert_equal(7, &siso)
|
||||
call assert_equal(4, &siso)
|
||||
|
||||
close
|
||||
set so&
|
||||
|
||||
@@ -833,4 +833,26 @@ func Test_smoothscroll_multi_skipcol()
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
" this was dividing by zero bug in scroll_cursor_bot
|
||||
func Test_smoothscroll_zero_width_scroll_cursor_bot()
|
||||
CheckScreendump
|
||||
|
||||
let lines =<< trim END
|
||||
silent normal yy
|
||||
silent normal 19p
|
||||
set cpoptions+=n
|
||||
vsplit
|
||||
vertical resize 0
|
||||
set foldcolumn=1
|
||||
set number
|
||||
set smoothscroll
|
||||
silent normal 20G
|
||||
END
|
||||
call writefile(lines, 'XSmoothScrollZeroBot', 'D')
|
||||
let buf = RunVimInTerminal('-u NONE -S XSmoothScrollZeroBot', #{rows: 19})
|
||||
call VerifyScreenDump(buf, 'Test_smoothscroll_zero_bot', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -133,7 +133,7 @@ func Test_tabline_empty_group()
|
||||
tabnew
|
||||
redraw!
|
||||
|
||||
tabclose
|
||||
bw!
|
||||
set tabline=
|
||||
endfunc
|
||||
|
||||
@@ -202,4 +202,28 @@ func Test_tabline_showcmd()
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
func TruncTabLine()
|
||||
return '%1T口口%2Ta' .. repeat('b', &columns - 4) .. '%999X%#TabLine#c'
|
||||
endfunc
|
||||
|
||||
" Test 'tabline' with truncated double-width label at the start.
|
||||
func Test_tabline_truncated_double_width()
|
||||
tabnew
|
||||
redraw
|
||||
call assert_match('X$', Screenline(1))
|
||||
let attr_TabLineFill = screenattr(1, &columns - 1)
|
||||
let attr_TabLine = screenattr(1, &columns)
|
||||
call assert_notequal(attr_TabLine, attr_TabLineFill)
|
||||
|
||||
set tabline=%!TruncTabLine()
|
||||
redraw
|
||||
call assert_equal('<a' .. repeat('b', &columns - 4) .. 'c', Screenline(1))
|
||||
call assert_equal(attr_TabLineFill, screenattr(1, &columns - 2))
|
||||
call assert_equal(attr_TabLine, screenattr(1, &columns - 1))
|
||||
call assert_equal(attr_TabLine, screenattr(1, &columns))
|
||||
|
||||
bw!
|
||||
set tabline=
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -309,6 +309,7 @@ func Test_terminal_rename_buffer()
|
||||
call assert_equal('bar', bufname())
|
||||
call assert_match('bar.*finished', execute('ls'))
|
||||
exe 'bwipe! ' .. buf
|
||||
call delete('Xtext')
|
||||
endfunc
|
||||
|
||||
func s:Nasty_exit_cb(job, st)
|
||||
@@ -1045,6 +1046,8 @@ func Test_terminal_redir_file()
|
||||
call WaitForAssert({-> assert_equal('dead', job_status(g:job))})
|
||||
bwipe
|
||||
endif
|
||||
|
||||
call delete('Xtext')
|
||||
endfunc
|
||||
|
||||
func TerminalTmap(remap)
|
||||
|
||||
@@ -695,6 +695,44 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1682,
|
||||
/**/
|
||||
1681,
|
||||
/**/
|
||||
1680,
|
||||
/**/
|
||||
1679,
|
||||
/**/
|
||||
1678,
|
||||
/**/
|
||||
1677,
|
||||
/**/
|
||||
1676,
|
||||
/**/
|
||||
1675,
|
||||
/**/
|
||||
1674,
|
||||
/**/
|
||||
1673,
|
||||
/**/
|
||||
1672,
|
||||
/**/
|
||||
1671,
|
||||
/**/
|
||||
1670,
|
||||
/**/
|
||||
1669,
|
||||
/**/
|
||||
1668,
|
||||
/**/
|
||||
1667,
|
||||
/**/
|
||||
1666,
|
||||
/**/
|
||||
1665,
|
||||
/**/
|
||||
1664,
|
||||
/**/
|
||||
1663,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user