Friday, December 6, 2019

Re: How to blink text

I think I see text blinking....


func! BlinkText()

  fun! MyHandler(timer) "{{{

if !exists('g:flipflop')
  let g:flipflop = 0
endif

if !g:flipflop
  let g:flipflop = 1
  hi Blink guifg=#222222  guibg=#e4e4e4
else
  let g:flipflop = 0
  hi Blink guifg=#e4e4e4  guibg=#e4e4e4
endif
syn match   pattern         /123/
hi def link pattern         Blink

call prop_clear(11)
call prop_type_delete('foo')
call prop_type_add('foo', {'highlight': 'Blink'})
call prop_add(11, 12, {'length': 3, 'type': 'foo'})
  endfunction "}}}

  let timer = timer_start(500, 'MyHandler',
  \ {'repeat': -1})
endfunc
nnoremap <F7> :call BlinkText()<cr>



Ok it's not perfect, not terminated yet but it blinks!

   No working longer when I add/remove lines in buffer because of using properties!
   And working only on one pattern matched : here it is 123

But with help I think it is possible.



Le vendredi 6 décembre 2019 21:33:01 UTC+1, Ni Va a écrit :
I helpgreped and search on some forums before asking but I hoped. 

and always hope maybe by inverting syntax highlight of the wanted blinking pattern schedule by timer and redrawing

no ? bad way ?

Le vendredi 6 décembre 2019 20:11:21 UTC+1, aro...@vex.net a écrit :
> Hopefully not
>

I think I'm with Christian on this one. :-)*

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/96e5334f-60d6-4767-b91f-695ab8397412%40googlegroups.com.

No comments: