Skip to content

Instantly share code, notes, and snippets.

@ivand58
ivand58 / ihex.vim
Created May 30, 2017 12:59 — forked from charleskeepax/ihex.vim
Vim Script Intel HEX Checksum
function IHexChecksum()
let l:data = getline(".")
let l:dlen = strlen(data)
if (empty(matchstr(l:data, "^:\\(\\x\\x\\)\\{5,}$")))
echoerr("Input is not a valid Intel HEX line!")
return
endif
let l:byte = 0