#
https://www.youtube.com/watch?v=aHm36-na4-4#t6m36sexport def HLNext(blinktime: number): number
echomsg 'HLNext called.'
highlight BlackOnBlack guibg=black guifg=#3c4c55 ctermbg=black ctermfg=black
var [bufnum: number, lnum: number, col: number, off: number] = getpos('.')
var target_pat: string = '\k*\%#\k*'
target_pat = '\%#' .. @/
target_pat = '\k*\%#\k*'
var blinks: number = 3
var sleep_duration: number = ( blinktime / (2 * blinks) )->float2nr()
var sleep_cmd: string = 'sleep ' .. sleep_duration .. 'm'
for n in range(1, blinks)
# echomsg n
var hide: number = matchadd('BlackOnBlack', target_pat, 101)
redraw
exec sleep_cmd
matchdelete(hide)
redraw
exec sleep_cmd
endfor
return 0
enddef