How to blink text

43 views
Skip to first unread message

Ni Va

unread,
Dec 6, 2019, 10:24:51 AM12/6/19
to vim_use
Hi,

By highlighting or new feature text properties, is it possible and how to make text blinking please ?

Thank you
NiVa

Tony Mechelynck

unread,
Dec 6, 2019, 11:31:53 AM12/6/19
to vim_use
Maybe, maybe not. I tried ":helpgrep blink" with very few results
concerning the text (most were about how to make the _cursor_ blink).
- On some terminals, ctermbg=128 (in a :hi command) will make text
blink; on others it makes the background intense, see os_dos.txt line
174
- If t_mb is defined to a nonempty byte sequence, I _think_ that that
byte sequence will start the text blinking (see ":help t_mb"). But
don't take my word for it. If I understood correctly, then t_me undoes
blink, bold and color. But how does one set it?
- If the :hi command accepts term=blink, cterm=blink and/or gui=blink,
then AFAIK it is not documented. Maybe at some future time.

Best regards,
Tony.

Christian Brabandt

unread,
Dec 6, 2019, 11:57:09 AM12/6/19
to vim...@googlegroups.com
Hopefully not

Am 06.12.2019 um 16:25 schrieb Ni Va <niva...@gmail.com>:


--
--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/e94fb974-888c-4a0b-9bfc-f776de10fd4c%40googlegroups.com.

aro...@vex.net

unread,
Dec 6, 2019, 2:11:21 PM12/6/19
to vim...@googlegroups.com
> Hopefully not
>

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

Ni Va

unread,
Dec 6, 2019, 3:33:01 PM12/6/19
to vim_use
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 ?

Ni Va

unread,
Dec 6, 2019, 5:52:43 PM12/6/19
to vim_use
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.
vim.gif

Ni Va

unread,
Dec 6, 2019, 6:05:26 PM12/6/19
to vim_use
Even if I insert/remove lines example, it is blinking ! :)
vimTextBlinking2.gif
Reply all
Reply to author
Forward
0 new messages