sponsor Vim development Vim logo Vim Book Ad

srec.vim : ftplugin for Motolora s-record, correct checksum

 script karma  Rating 4/1, Downloaded by 525  Comments, bugs, improvements  Vim wiki

created by
zhao fei
 
script type
ftplugin
 
description
the ftplugin can detect whether the current record's format is
correct,
if the data count is wrong, it will produce a message:
========================
    The data count of this record(3) is wrong!
========================
in which the 3 is the line number of the record.
if the checksum is absense, the message will be:
========================
This record looks have no checksum, press <C-K> to generate checksum for it
========================
If the checksum is present, but wrong, it will complain about:
========================
The Check sum is wrong!, should be: 0x27, Press <C-K> to correct it
========================
the 0x27 is the right CheckSum for it.

Anytime You can press <C-K> to correct the checksum of current record. regardless of whether the checksum is already contained in the recorder. but if the data count is incorrect, nothing will be done.

With this plugin, one can easily modify existing s-record file, and then re-generate the checksum.
:%norm ^K
 
install details
Drop into $VIMRUNTIME/ftplugin.
Note: You needn't modify file type detection line to filetype.vim. It's already there.
 

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
srec.vim 6.3b 2004-06-13 6.0 zhao fei Initial upload
ip used for rating: 3.128.199.210

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.
   
Vim at Github