Simple Syntax Highlighting and additional Features to view and edit WinCC-OA Control Scripts and Panels.
Using vim-plug
, simply can be installed by inserting Plug 'burneyy/vim-winccoa'
into the vimrc.
Python script vimcc.py
as wrapper around vim
that allows to copy provided files from the subprojects if available there to the project when the file itself is not present in the project itself. The subprojects are taken from the main projects <proj_dir>/config/config
file and the hierarchy is respected. Note: the editor can easily be changed within vimcc.py
to any editor of your choice!
- Syntax highlighting for
.ctl
,.pnl
and.pnl.bak
files (C-like syntax) - For CTRL scripts , the command
SyntaxCheck [<projName>]
is provided to perform a syntax check using the underlying shell commandWCCOActrl -syntax -proj <projName> -log +stderr <thisFile>.ctl
(see here). If no project name is provided, it takes the-currentproj
as default. - For
.pnl
and.pnl.bak
files, the commandSwapQuotes
is provided which allows to swap escaped quotes (\"
) with normal quotes ("
) and vice versa. The motivation for this is that these files are filled with lots of meta-information that are containing normal quotes - in contrast to the actual code that is containing escaped quotes. The command swaps the different types of quotes so that the normal quotes are used within the actual code. - A mechanism is provided that automatically uses the
SwapQuotes
command when opening.pnl
and.pnl.bak
files - and swaps the quotes back again when writing the buffer back to the file. To disable this feature, put the line
let g:winccoa_pnl_auto_swapquotes = 0
into your vimrc.