sponsor Vim development Vim logo Vim Book Ad

edifact.vim : Syntax script for generic EDIFACT messages (extensible)

 script karma  Rating 22/10, Downloaded by 682    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
 

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
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: 107.20.91.81

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