sponsor Vim development Vim logo Vim Book Ad

KRL-Syntax : Syntax, indent and more for Kuka industrial robots

 script karma  Rating 16/4, Downloaded by 823    Comments, bugs, improvements  Vim wiki

created by
Patrick Meiser-Knosowski
script type
Syntax highlighting with closing folds, indention and more for Kuka Robot Language. The programing language for KUKA industrial robots.

If you have any suggestions of improvement or find bugs please email me.

You do get: >

You may use all these independently from one another. Just don't mix versions
of different packages. Some features may work better when all files are loaded.

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

Detects KRL files. This is accomplished by the file ending .src, .dat and
.sub. To not interfere with other file types, .dat files are checked for the
presence of a DEFDAT line or a &HEADER.
Requires >
    :filetype on

Sets various vim options and provide key mappings and folding. It supports
commentary (vimscript #3695) and matchit (vimscript #39). All key mappings are
Requires >
    :filetype plugin on

Sets indent related vim options. Sets indention to 2 spaces by default,
Requires >
    :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.
Requires >
    :syntax on

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
    krl settings for my |.vimrc|?
A: Yes: >
    let g:krlMoveAroundKeyMap=1 " [[, ]], [] and ][ jumps around DEF/DEFFCT..
    let g:krlGoDefinitionKeyMap=1 " gd shows the declaration of curr. word
    let g:krlListDefKeyMap=1 " <leader>f shows all DEF/DEFFCT.. in curr. file
    let g:krlListUsageKeyMap=1 " <leader>u shows all appearance of curr. word
    let g:krlAutoFormKeyMap=1 " <leader>n inserts a body for a new DEF etc
    let g:krlShowError=1 " shows some syntax errors
    let g:krlRhsQuickfix=1 " open quickfix window on the right hand side
    let g:qf_window_bottom=0 " if qf.vim exists and you use g:krlRhsQuickfix
    " if you want all folds to close (case sensitiv)...
    let g:krlCloseFolds=1 " switch folding to all
    " or else if you don't like any closed folds use:
    " let g:krlCloseFolds=2 " switch folding off
    " if you use colorscheme tortus use:
    " let g:krlNoHighLink=1 " even more colors
    " don't forget
    " filetype plugin indent on

Note: Keep your files to be edited below the KRC/ folder if you plan to edit lots of files. This folder will be the root for 'path'.
Note to linux users: Keep your files to be edited on a FAT file system. Some features need the case insensitive file system to work properly.
install details
Extract the provided archive into your ~/.vim/ or ~/vimfiles/ directory
(depending on your System) keeping the folder structure. Overwrite
krl.vim/krl.txt files from older installation. I don't know how other
methods might work.

To fully use these scripts put
    filetype plugin indent on
    syntax on
in your .vimrc.

You may have to run
    :helptags ~/.vim/doc/
    :helptags ~/vimfiles/doc/
to use the help within Vim.

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
krl_for_vim_v151_20170813.zip 1.5.1 2017-08-13 7.4 Patrick Meiser-Knosowski * better path generation
* 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)
* fixed some minor bugs
krl_for_vim_v150_20170624.zip 1.5.0 2017-06-24 7.0 Patrick Meiser-Knosowski * improved vkrc support:
  * Go Definition now works on UP\d+, SPSMAKRO\d+ and M\d+ in fold lines
  * improved List Usage for vkrc
* fixed Go Definition for comma separated none value declarations in *.dat files
* fixed e6pos return var name in Auto Form
* fixed array function in Auto Form (e.g. deffct char[24] chName() )
krl_for_vim_v145_20170215.zip 1.4.5 2017-02-15 7.0 Patrick Meiser-Knosowski * fixed bug in matchit (vimscript #39) support
krl_for_vim_v144_20161128.zip 1.4.4 2016-11-28 7.0 Patrick Meiser-Knosowski * divided up mappings for <leader>f and gd into 2 options: g:krlListDefKeyMap and g:krlGoDefinitionKeyMap
* added option to influence where <leader>f and gd open the quickfix window: g:krlRhsQuickfix and g:krlLhsQuickfix
* added <plug> mappings as an alternative to the configuration variables for mappings
* minor changes in syntax file
* added auto form feature. Insert a body for a new deffct 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:krlListUsageKeyMap is set
krl_for_vim_v138_20161008.zip 1.3.8 2016-10-09 7.0 Patrick Meiser-Knosowski * changes in help file
krl_for_vim_v138_20161005.zip 1.3.8 2016-10-06 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:krlGoDefinitionKeyMap is set
* added 'path', 'suffixes' and 'suffixesadd' settings for :find or gf
* added 'iskeyword' to match $-variables and #-enums
* changed option name from g:krlNoHighlight to g:krlNoHighLink (the old one does still work for compatibility)
From 1.3.6 to 1.3.8
* reorganized 'path' for better search results of gd, :find ...
* optimized KrlGoDefinition()
* made embedded $ chars in variable names possible for gd. Embedded $ chars in DEF or DEFFCT names do still not work
* less noise if g:krlNoVerbose is set
* additions to syntax
* added mapping of <leader>f to list all DEF and DEFFCT of the current file if g:krlGoDefinitionKeyMap is set
krl_for_vim_v124_20160727.zip 1.2.4 2016-07-27 7.0 Patrick Meiser-Knosowski * fixed a bug where this script caused an error message about a missing function in some installations of vim
* added new highlight group Continue to be able to highlight continue instructions separately if g:krlNoHighlight is set
* this script now setlocal commentstring=;%s for easy use of commentary (vimscript #3695)
* restructured code
krl_for_vim_v120_20160604.zip 1.2.0 2016-06-03 7.0 Patrick Meiser-Knosowski * added option (g:krlShowError) to highlight some misuses of =, ==, <= and >=
* added ENABLE/DISABLE (interrupt enable ..) to keywords
krl_for_vim_v113_20160524.zip 1.1.3 2016-05-24 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
krl.vim 1.1.1 2016-04-15 7.0 Patrick Meiser-Knosowski I think I'm getting closer to how a syntax file is supposed to be done. I changed to much to list here. Depending on your colorscheme it might not look very different.
Main changes:
* fixed false highlighting for structure component names
* added more predefined enums and structures, also from some basic tech packages (BasisTech, GripperTech, SpotTech...)
* enum values are now considered Constant (no need for "highlight Enum ..." any more)
* devided stuff into sub groups
* added some missing build in functions
krl.vim 0.9 2016-03-07 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.
SourceForge.net Logo