sponsor Vim development Vim logo Vim Book Ad

KRL-Syntax : Syntax and indent file for Kuka industial robots

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

created by
Patrick Knosowski
 
script type
syntax
 
description
Syntax highlighting with closing folds and indention for Kuka Robot Language. The programing language for KUKA industial robots.

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


You do get: >
    ~/.vim/doc/krl.txt
    ~/.vim/ftdetect/krl.vim
    ~/.vim/ftplugin/krl.vim
    ~/.vim/indent/krl.vim
    ~/.vim/syntax/krl.vim

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.

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

~/.vim/ftdetect/krl.vim
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

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

~/.vim/indent/krl.vim
Sets indent related vim options. Sets indention to 2 spaces by default, optional.
Provides indention.
Requires >
    :filetype indent on

~/.vim/syntax/krl.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


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 functions
    let g:krlGoDefinitionKeyMap=1 " gd shows the declaration of curr. word
    let g:krlListDefKeyMap=1 " <leader>f shows all functions in curr. file
    let g:krlListUsageKeyMap=1 " <leader>u shows all appearance of curr. word
    let g:krlShowError=1 " shows some syntax errors
    let g:krlRhsQuickfix=1 " open quickfix window on the right hand side
    " 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
 
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/
or
    :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_v145_20170215.zip 1.4.5 2017-02-15 7.0 Patrick Knosowski * fixed bug in matchit (vimscript #39) support
krl_for_vim_v144_20161128.zip 1.4.4 2016-11-28 7.0 Patrick 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 Knosowski * changes in help file
krl_for_vim_v138_20161005.zip 1.3.8 2016-10-06 7.0 Patrick 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 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 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 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 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 Knosowski Initial upload
ip used for rating: 54.211.233.235

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