sponsor Vim development Vim logo Vim Book Ad

RAPID-Syntax : Syntax, indent and more for Abb industrial robots

 script karma  Rating 12/3, Downloaded by 4734  Comments, bugs, improvements  Vim wiki

created by
Patrick Meiser-Knosowski
script type
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.

It provides

* 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.

#### ~/.vim/doc/rapid.txt
Help file. This should help you to use these plugins to your best advantage.
Requires >

    :helptags ~/.vim/doc
#### ~/.vim/ftdetect/rapid.vim
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.  
Requires >

    :filetype on
#### ~/.vim/ftplugin/rapid.vim
Sets various vim options and provides key mappings and concealing. It supports
commentary [vimscript #3695][7] and matchit [vimscript #39][8]. All key
mappings are optional.  
Requires >

    :filetype plugin on
#### ~/.vim/indent/rapid.vim
Sets indent related vim options. Sets indention to 2 spaces by default,
Requires >

    :filetype indent on
#### ~/.vim/syntax/rapid.vim
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.  
Requires >

    :syntax on

## tl:dr

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
install details
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
    syntax on

in your .vimrc

You may have to run >

    :helptags ~/.vim/doc/

or >

    :helptags ~/vimfiles/doc/

to use the help within Vim after installation

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
rapid-for-vim-1.5.5.zip 1.5.5 2018-03-23 7.4 Patrick Meiser-Knosowski * 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
rapid-for-vim-1.5.3.zip 1.5.3 2017-12-23 7.4 Patrick Meiser-Knosowski * changes in help file
* highlight procs and vars >32 char as error
rapid_for_vim_v152_20170920.zip 1.5.2 2017-09-19 7.4 Patrick Meiser-Knosowski * 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
rapid_for_vim_v151_20170817.zip 1.5.1 2017-08-17 7.4 Patrick Meiser-Knosowski * fixed bug in move around comment mapping [! and ]!
rapid_for_vim_v150_20170815.zip 1.5.0 2017-08-15 7.4 Patrick Meiser-Knosowski * 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
rapid_for_vim_v141_20170710.zip v1.4.1 2017-07-11 7.0 Patrick Meiser-Knosowski * updated syntax file to RobotWare 6
rapid_for_vim_v140_20170625.zip 1.4.0 2017-06-24 7.0 Patrick Meiser-Knosowski * *.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
rapid_for_vim_v131_20161008.zip 1.3.1 2016-10-09 7.0 Patrick Meiser-Knosowski * 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
rapid_for_vim_v112_20160821.zip 1.1.2 2016-08-21 7.0 Patrick Meiser-Knosowski * a dos formated file type detect file caused error messages on unix like operating systems in the previous version. Sorry for inconvenience!
rapid_for_vim_v112_20160727.zip 1.1.2 2016-07-27 7.0 Patrick Meiser-Knosowski * this script now setlocal commentstring=!%s for easy use of commentary (vimscript #3695)
* fixed false highlight of num
* updated help
* restructured code
rapid_for_vim_v107_20160531.zip 1.0.7 2016-06-01 7.0 Patrick Meiser-Knosowski * 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
rapid_for_vim_v104_20160528.zip 1.0.4 2016-05-28 7.0 Patrick Meiser-Knosowski * 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
rapid_for_vim_v101_20160526.zip 1.0.1 2016-05-26 7.0 Patrick Meiser-Knosowski * added help
* added file type detect
* added file type plugin
* added indent file
* made the script configurable by options
* minor changes in syntax file
rapid.vim 0.9.3 2016-05-24 7.0 Patrick Meiser-Knosowski * used setlocal instead of set
rapid.vim 0.9 2016-03-18 7.0 Patrick Meiser-Knosowski Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
OSDN.net Logo