edifact.vim : Syntax script for generic EDIFACT messages (extensible)
script karma |
Rating 23/13,
Downloaded by 1334 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Olivier Mengué |
|
script type |
syntax |
|
description |
This syntax script will colorize UN/EDIFACT messages.
All formatting errors are reported with the "Error" highlighting.
Hooks are provided for extensibility (including EDIFACT messages in another syntax) and to define a more specific syntax (coloring known tags, checking segment definitions with mandatory/conditionnal data...).
For more information about EDIFACT:
- http://www.unece.org/trade/untdid/
- http://www.gefeg.com/jswg/index.htm |
|
install details |
Drop into your personnal syntax directory: $HOME/{.vim|vimfiles}/syntax ({Unix|Windows}).
To manually colorize a file:
:syntax on
:set syntax=edifact
To assign edifact syntax to files, add this to your ~/{.vim|vimfiles}/filetype.vim:
augroup filetypedetect
au! BufNewFile,BufRead *.edifact,*.edi,*.EDIFACT,*.EDI set filetype=edifact
augroup END
See also the built-in help in Vim:
:help 'filetype'
:help mysyntaxfile
:help filetype-plugin
|
|
script versions (upload new version)
Click on the package to download.
edifact.vim |
2.0 |
2004-03-25 |
6.0 |
Olivier Mengué |
Improved error reporting to ease editing:
- unclosed segments
- invalid text between segments
- error stops at the next quote, which may be just before the beginning of a
valid segment
Renamed edifactStar to edifactAsterisk, edifactQuote to edifactApostrophe to
use the same terms as in the standards.
Improved grammar with @edifactSegmentHook to plug more specific segment definition.
Added 'keepend' to edifactSegment.
Added sample parsing for TXT segment that checks data element lengths.
Did tests of derived syntax reusing this syntax. |
edifact.vim |
1.0 |
2004-03-22 |
6.0 |
Olivier Mengué |
Initial upload |
ip used for rating: 3.20.224.152
|