|Now available on github: https://github.com/KnoP-01/rapid-for-vim
Rapid for Vim (7.4 or later) is a collection of Vim scripts to help programing ABB industrial robots.
* syntax highlighting,
* auto indention,
* concealing of structure values (e.g. MoveJ * v2500...),
* mappings and settings to navigate through code in a backup folder structure and
* mappings to insert a body of a new PROC, FUNC, TRAP et al based on user defined templates or hopefully sane defaults.
Note: Keep your files to be edited in one folder or in a regular robot backup folder structure. Rapid for Vim modifies 'path' by default accordingly.
## Content description
You may use all these independently from one another. Just don't mix versions
of different releases. Some features may work better when all files are loaded.
Help file. This should help you to use these plugins to your best advantage.
Detects Rapid files based on their file name and content. Rapid files are
checked for the presence of a MODULE line or any %%% HEADER. In case of an
empty file you need to `:set filetype=rapid` manually.
.../ftdetect/rapid.vim also corrects mixed line endings (unix/dos-mix to unix)
in \*.cfg files if |g:rapidAutoCorrCfgLineEnd| is set to 1.
Sets various vim options and provides key mappings and concealing. It supports
commentary [vimscript #3695] and matchit [vimscript #39]. All key
mappings are optional.
:filetype plugin on
Sets indent related vim options. Sets indention to 2 spaces by default,
:filetype indent on
Does make life more colorful. Unfortunately some features of the other files
may work better with syntax on. This should not stop you from trying syntax
off if you like.
Q: Why so many options?
A: I try not to interfere with user settings to much. So I made most of the
settings that get changed optional.
Q: I'm here to feed my kids, not to read. Do you have a quick suggestion on
rapid settings for my |.vimrc|?
A: Yes: >
let g:rapidMoveAroundKeyMap=1 " [[, ]],  and ][ jumps around PROC/FUNC..
" let g:rapidMoveAroundKeyMap=2 " also add textobjects af, aF and if
let g:rapidGoDefinitionKeyMap=1 " gd shows the declaration of curr. word
let g:rapidListDefKeyMap=1 " <leader>f shows all PROC/FUNC.. in curr. file
let g:rapidListUsageKeyMap=1 " <leader>u shows all appearance of curr. word
let g:rapidAutoFormKeyMap=1 " <leader>n inserts a body for a new PROC etc
let g:rapidConcealStructsKeyMap=1 " <F2>/<F3> to conceal/show struct values
let g:rapidShowError=1 " shows some syntax errors
let g:rapidRhsQuickfix=1 " open quickfix window on the right hand side
let g:qf_window_bottom=0 " if qf.vim exists and you use g:rapidRhsQuickfix
let g:rapidAutoCorrCfgLineEnd=1 " auto correct \*.cfg line terminator
" if you use colorscheme tortus use:
" let g:rapidNoHighLink=1 " even more colors
" don't forget
" filetype plugin indent on
## Self promotion
If you like this plugin please rate it. If you don't but you
think it could be useful if this or that would be different, don't hesitate to
email me or even better open an issue on github. With a little luck and good
timing you may find me on irc://irc.freenode.net/#vim as KnoP in case you have any
|Extract the most recent release and copy the folders
`/doc`, `/ftdetect`, `/ftplugin`, `/indent` and `/syntax`
into your `~/.vim/` or `%USERPROFILE%\vimfiles\` directory.
Overwrite rapid.* files from older installation.
To fully use these plugins put >
filetype plugin indent on
in your .vimrc
You may have to run >
to use the help within Vim after installation
Click on the package to download.
||* added text objects for functions (depends on g:rapidMoveAroundKeyMap: set this option to 2 to get the textobjects)
af (around function): from proc, func, trap or record to endproc et al.
aF: as af but includes all comments directly above proc et al. and one empty line after endproc et al.
if (inner function): from one line after proc et al. to one line before endproc et al.
* made label highlighting more consistent
||* changes in help file
* highlight procs and vars >32 char as error
||* changed "highlight link" to "highlight default link" in syntax file
* changed 'path': excluded ../PROGMOD/** and ../SYSMOD/**. This is catched by ../../../RAPID/TASK*/** now
* made structure values concealable (eg MoveL *, v2500, z200, ...)
* added optional mappings to quickly change between concealed/shown (F2/F3) structure values
See :help g:rapidConcealStructsKeyMap and g:rapidConcealStructs
* fixed bug related to g:rapidShowError
||* fixed bug in move around comment mapping [! and ]!
||* better 'path' generation, also added HOME/ and BACKINFO/ to 'path'
* better temp file handling. Sorry to all linux/unix users for inconvenience with this one.
* made this script compatible to romainls vim-qf (vimscript#5211)
* file comprehensive features should now work on case sensitive file systems
||* updated syntax file to RobotWare 6
||* *.cfg file will get a bit highlight and filetype rapid now
* automatically correct mixed dos/unix line endings in *.cfg files if g:rapidAutoCorrCfgLineEnd is set to 1
* fixed indent bug
* divided up mappings for <leader>f and gd into 2 options: g:rapidListDefKeyMap and g:rapidGoDefinitionKeyMap
* added <plug> mappings as an alternative to the configuration variables for mappings
* added auto form feature. Insert a body for a new PROC/FUNC/TRAP or RECORD with a few key strokes. See help for more details on this
* added mapping <leader>u to list all appearances of the word under the cursor if g:rapidListUsageKeyMap is set
* added option to influence where <leader>f, <leader>u and gd open the quickfix window: g:rapidRhsQuickfix and g:rapidLhsQuickfix
* improved *.prg file support
||* set proper b:undo_indent and b:undo_ftplugin
* added matchit support (vimscript #39)
* added mappings for [[, ]], ... and gd if g:rapidGoDefinitionKeyMap is set
* added mapping of <leader>f to list all PROC ect of the current file if g:rapidGoDefinitionKeyMap is set
* added 'path', 'suffixes' and 'suffixesadd' settings for :find or gf
* changed option name from g:rapidNoHighlight to g:rapidNoHighLink (the old one does still work for compatibility)
* additions to syntax
||* a dos formated file type detect file caused error messages on unix like operating systems in the previous version. Sorry for inconvenience!
||* this script now setlocal commentstring=!%s for easy use of commentary (vimscript #3695)
* fixed false highlight of num
* updated help
* restructured code
||* added highlight of rapid char codes within strings
* fixed false highlight of num if it's the name of an
argument instead of the data type num
* improvements of indent in some special cases
* improved help file
||* fixed indent of wrapped long lines, like long array values or long argument lists
* fixed single parentasis in comments do not cause false indention any more
* fixed UNDO indent
||* added help
* added file type detect
* added file type plugin
* added indent file
* made the script configurable by options
* minor changes in syntax file
||* used setlocal instead of set