Re: timer_start to refresh rulerformat

h_east <[email protected]> Wed, 29 Jul 2026 01:28:27 -0700 (PDT)
Newsgroups gmane.editors.vim
Message-ID <[email protected]>
------=_Part_873736_708588681.1785313707410
Content-Type: multipart/alternative; 
	boundary="----=_Part_873737_289243388.1785313707410"

------=_Part_873737_289243388.1785313707410
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi,

See https://github.com/vim/vim/pull/20865

--
Best regards,
Hirohito Higashi (h_east)

2026=E5=B9=B45=E6=9C=8826=E6=97=A5=E7=81=AB=E6=9B=9C=E6=97=A5 10:22:06 UTC+=
9 watael rocketmail:

> HI,
>
> I saw here : =20
> https://vim.fandom.com/wiki/Display_date-and-time_on_status_line
> and there :=20
> https://vi.stackexchange.com/questions/17875/how-to-update-the-statusline=
-continuously-even-if-the-window-becomes-inactive
> that `timer_start` could refresh statusline.
>
> something might have happened, because I can't get it to work.
>
> here's the simple code I use:
>
> ```
> set ruler
> set rulerformat=3D%55(%{strftime('%H:%M:%S')}\ %5l,%-6(%c%V%)\ %P%)
> call timer_start(1000, {-> execute(':let &stl=3D&stl')}, {'repeat': -1})
> ```
>
> and here's version:
>
> $ LC_ALL=3DC vim --version
> VIM - Vi IMproved 9.2 (2026 Feb 14, compiled May 22 2026 18:43:08)
> Included patches: 1-511
> Compiled by Arch Linux
> Huge version without GUI.  Features included (+) or not (-):
> +acl                +file_in_path       +mouse_xterm        -tag_any_whit=
e
> +arabic             +find_in_path       +multi_byte         +tcl/dyn
> +autocmd            +float              +multi_lang         +termguicolor=
s
> +autochdir          +folding            -mzscheme           +terminal
> -autoservername     -footer             +netbeans_intg      +terminfo
> -balloon_eval       +fork()             +num64              +termresponse
> +balloon_eval_term  +gettext            +packages           +textobjects
> -browse             -hangul_input       +path_extra         +textprop
> ++builtin_terms     +iconv              +perl/dyn           +timers
> +byte_offset        +insert_expand      +persistent_undo    +title
> +channel            +ipv6               +popupwin           -toolbar
> +cindent            +job                +postscript         +user_command=
s
> +clientserver       +jumplist           +printer            +vartabs
> -clipboard          +keymap             +profile            +vertsplit
> +clipboard_provider +lambda             -python             +vim9script
> +cmdline_compl      +langmap            +python3/dyn        +viminfo
> +cmdline_hist       +libcall            +quickfix           +virtualedit
> +cmdline_info       +linebreak          +reltime            +visual
> +comments           +lispindent         +rightleft          +visualextra
> +conceal            +listcmds           +ruby/dyn           +vreplace
> +cryptv             +localmap           +scrollbind         -wayland
> +cscope             +lua/dyn            +signs             =20
> -wayland_clipboard
> +cursorbind         +menu               +smartindent        +wildignore
> +cursorshape        +mksession          +socketserver       +wildmenu
> +dialog_con         +modify_fname       -sodium             +windows
> +diff               +mouse              -sound              +writebackup
> +digraphs           -mouseshape         +spell              -X11
> -dnd                +mouse_dec          +startuptime        +xattr
> -ebcdic             +mouse_gpm          +statusline         -xfontset
> +emacs_tags         -mouse_jsbterm      -sun_workshop       -xim
> +eval               +mouse_netterm      +syntax             -xpm
> +ex_extra           +mouse_sgr          +tabpanel           -xsmp
> +extra_search       -mouse_sysmouse     +tag_binary       =20
>  -xterm_clipboard
> -farsi              +mouse_urxvt        -tag_old_static     -xterm_save
>    system vimrc file: "/etc/vimrc"
>      user vimrc file: "$HOME/.vimrc"
>  2nd user vimrc file: "~/.vim/vimrc"
>  3rd user vimrc file: "~/.config/vim/vimrc"
>       user exrc file: "$HOME/.exrc"
>        defaults file: "$VIMRUNTIME/defaults.vim"
>   fall-back for $VIM: "/usr/share/vim"
> Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -march=3Dx86-64=20
> -mtune=3Dgeneric -O2 -pipe -fno-plt -fexceptions -Wformat=20
> -Werror=3Dformat-security -fstack-clash-protection -fcf-protection=20
> -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g=20
> -ffile-prefix-map=3D/build/vim/src=3D/usr/src/debug/vim -flto=3Dauto -D_R=
EENTRANT=20
> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3D1=20
> Linking: gcc -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE -Wl,-O1=
=20
> -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now=20
> -Wl,-z,pack-relative-relocs -flto=3Dauto -L/usr/local/lib -o vim -lm -lti=
nfo=20
> -lnsl -lacl -lattr -lgpm -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm=
=20
> $
>

--=20
--=20
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

---=20
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 e=
mail to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_use/944=
44cc7-a0da-4432-911b-00a567efe0a1n%40googlegroups.com.

------=_Part_873737_289243388.1785313707410
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div>Hi,</div><div><br /></div><div>See=C2=A0https://github.com/vim/vim/pul=
l/20865</div><div><br /></div><div>--</div><div>Best regards,</div><div>Hir=
ohito Higashi (h_east)</div><div><br /></div><div class=3D"gmail_quote"><di=
v dir=3D"auto" class=3D"gmail_attr">2026=E5=B9=B45=E6=9C=8826=E6=97=A5=E7=
=81=AB=E6=9B=9C=E6=97=A5 10:22:06 UTC+9 watael rocketmail:<br/></div><block=
quote class=3D"gmail_quote" style=3D"margin: 0 0 0 0.8ex; border-left: 1px =
solid rgb(204, 204, 204); padding-left: 1ex;"><u></u>

 =20
   =20
 =20
  <div>
    <p>HI,</p>
    <p>I saw here :=C2=A0 <a href=3D"https://vim.fandom.com/wiki/Display_da=
te-and-time_on_status_line" target=3D"_blank" rel=3D"nofollow" data-safered=
irecturl=3D"https://www.google.com/url?hl=3Dja&amp;q=3Dhttps://vim.fandom.c=
om/wiki/Display_date-and-time_on_status_line&amp;source=3Dgmail&amp;ust=3D1=
785394904225000&amp;usg=3DAOvVaw1m-br7OfRNf3Qi8uXK0Nk9">https://vim.fandom.=
com/wiki/Display_date-and-time_on_status_line</a><br>
      and there :
      <a href=3D"https://vi.stackexchange.com/questions/17875/how-to-update=
-the-statusline-continuously-even-if-the-window-becomes-inactive" target=3D=
"_blank" rel=3D"nofollow" data-saferedirecturl=3D"https://www.google.com/ur=
l?hl=3Dja&amp;q=3Dhttps://vi.stackexchange.com/questions/17875/how-to-updat=
e-the-statusline-continuously-even-if-the-window-becomes-inactive&amp;sourc=
e=3Dgmail&amp;ust=3D1785394904226000&amp;usg=3DAOvVaw2HqurQr1bCtu9FJW5vsG5N=
">https://vi.stackexchange.com/questions/17875/how-to-update-the-statusline=
-continuously-even-if-the-window-becomes-inactive</a><br>
      that `timer_start` could refresh statusline.</p>
    <p>something might have happened, because I can&#39;t get it to work.</=
p>
    <p>here&#39;s the simple code I use:</p>
    <p>```<br>
      set ruler<br>
      set rulerformat=3D%55(%{strftime(&#39;%H:%M:%S&#39;)}\ %5l,%-6(%c%V%)=
\ %P%)<br>
      call timer_start(1000, {-&gt; execute(&#39;:let &amp;stl=3D&amp;stl&#=
39;)},
      {&#39;repeat&#39;: -1})<br>
      ```</p>
    <p>and here&#39;s version:</p>
    <p>$ LC_ALL=3DC vim --version<br>
      VIM - Vi IMproved 9.2 (2026 Feb 14, compiled May 22 2026 18:43:08)<br=
>
      Included patches: 1-511<br>
      Compiled by Arch Linux<br>
      Huge version without GUI.=C2=A0 Features included (+) or not (-):<br>
      +acl=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +file_in_=
path=C2=A0 =C2=A0 =C2=A0 =C2=A0+mouse_xterm=C2=A0 =C2=A0 =C2=A0 =C2=A0
      -tag_any_white<br>
      +arabic=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+find_in_path=
=C2=A0 =C2=A0 =C2=A0 =C2=A0+multi_byte=C2=A0 =C2=A0 =C2=A0 =C2=A0
      =C2=A0+tcl/dyn<br>
      +autocmd=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +float=C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +multi_lang=C2=A0 =C2=A0 =C2=A0 =C2=A0
      =C2=A0+termguicolors<br>
      +autochdir=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +folding=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 -mzscheme=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
      =C2=A0+terminal<br>
      -autoservername=C2=A0 =C2=A0 =C2=A0-footer=C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0+netbeans_intg=C2=A0 =C2=A0 =C2=A0
      +terminfo<br>
      -balloon_eval=C2=A0 =C2=A0 =C2=A0 =C2=A0+fork()=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0+num64=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0
      +termresponse<br>
      +balloon_eval_term=C2=A0 +gettext=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 +packages=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
      =C2=A0+textobjects<br>
      -browse=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-hangul_input=
=C2=A0 =C2=A0 =C2=A0 =C2=A0+path_extra=C2=A0 =C2=A0 =C2=A0 =C2=A0
      =C2=A0+textprop<br>
      ++builtin_terms=C2=A0 =C2=A0 =C2=A0+iconv=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 +perl/dyn=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
      =C2=A0+timers<br>
      +byte_offset=C2=A0 =C2=A0 =C2=A0 =C2=A0 +insert_expand=C2=A0 =C2=A0 =
=C2=A0 +persistent_undo=C2=A0 =C2=A0 +title<br>
      +channel=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +ipv6=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+popupwin=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0
      =C2=A0-toolbar<br>
      +cindent=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +job=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +postscript=C2=A0 =C2=A0 =C2=A0 =
=C2=A0
      =C2=A0+user_commands<br>
      +clientserver=C2=A0 =C2=A0 =C2=A0 =C2=A0+jumplist=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0+printer=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
      +vartabs<br>
      -clipboard=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +keymap=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+profile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0
      +vertsplit<br>
      +clipboard_provider +lambda=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0-python=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
      =C2=A0+vim9script<br>
      +cmdline_compl=C2=A0 =C2=A0 =C2=A0 +langmap=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 +python3/dyn=C2=A0 =C2=A0 =C2=A0 =C2=A0
      +viminfo<br>
      +cmdline_hist=C2=A0 =C2=A0 =C2=A0 =C2=A0+libcall=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 +quickfix=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
      =C2=A0+virtualedit<br>
      +cmdline_info=C2=A0 =C2=A0 =C2=A0 =C2=A0+linebreak=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 +reltime=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
      +visual<br>
      +comments=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+lispindent=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0+rightleft=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
      +visualextra<br>
      +conceal=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +listcmds=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+ruby/dyn=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
      =C2=A0+vreplace<br>
      +cryptv=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+localmap=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+scrollbind=C2=A0 =C2=A0 =C2=A0 =C2=
=A0
      =C2=A0-wayland<br>
      +cscope=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+lua/dyn=C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +signs=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0
      -wayland_clipboard<br>
      +cursorbind=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+menu=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+smartindent=C2=A0 =C2=A0 =C2=A0 =C2=
=A0
      +wildignore<br>
      +cursorshape=C2=A0 =C2=A0 =C2=A0 =C2=A0 +mksession=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 +socketserver=C2=A0 =C2=A0 =C2=A0
      =C2=A0+wildmenu<br>
      +dialog_con=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+modify_fname=C2=A0 =C2=
=A0 =C2=A0 =C2=A0-sodium=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
      =C2=A0+windows<br>
      +diff=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+mouse=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -sound=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0
      +writebackup<br>
      +digraphs=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-mouseshape=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0+spell=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 -X11<br>
      -dnd=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +mouse_de=
c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +startuptime=C2=A0 =C2=A0 =C2=A0 =C2=A0=
 +xattr<br>
      -ebcdic=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+mouse_gpm=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +statusline=C2=A0 =C2=A0 =C2=A0 =C2=A0
      =C2=A0-xfontset<br>
      +emacs_tags=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-mouse_jsbterm=C2=A0 =C2=
=A0 =C2=A0 -sun_workshop=C2=A0 =C2=A0 =C2=A0 =C2=A0-xim<br>
      +eval=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+mouse_ne=
tterm=C2=A0 =C2=A0 =C2=A0 +syntax=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0-xpm<br>
      +ex_extra=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+mouse_sgr=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 +tabpanel=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0-xsmp<br>
      +extra_search=C2=A0 =C2=A0 =C2=A0 =C2=A0-mouse_sysmouse=C2=A0 =C2=A0 =
=C2=A0+tag_binary=C2=A0 =C2=A0 =C2=A0 =C2=A0
      =C2=A0-xterm_clipboard<br>
      -farsi=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 +mouse_urxvt=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 -tag_old_static=C2=A0 =C2=A0
      =C2=A0-xterm_save<br>
      =C2=A0 =C2=A0system vimrc file: &quot;/etc/vimrc&quot;<br>
      =C2=A0 =C2=A0 =C2=A0user vimrc file: &quot;$HOME/.vimrc&quot;<br>
      =C2=A02nd user vimrc file: &quot;~/.vim/vimrc&quot;<br>
      =C2=A03rd user vimrc file: &quot;~/.config/vim/vimrc&quot;<br>
      =C2=A0 =C2=A0 =C2=A0 user exrc file: &quot;$HOME/.exrc&quot;<br>
      =C2=A0 =C2=A0 =C2=A0 =C2=A0defaults file: &quot;$VIMRUNTIME/defaults.=
vim&quot;<br>
      =C2=A0 fall-back for $VIM: &quot;/usr/share/vim&quot;<br>
      Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -march=3Dx86-64
      -mtune=3Dgeneric -O2 -pipe -fno-plt -fexceptions -Wformat
      -Werror=3Dformat-security -fstack-clash-protection -fcf-protection
      -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g
      -ffile-prefix-map=3D/build/vim/src=3D/usr/src/debug/vim -flto=3Dauto
      -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3D1=C2=A0<br>
      Linking: gcc -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.42/core_perl/CORE
      -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now
      -Wl,-z,pack-relative-relocs -flto=3Dauto -L/usr/local/lib -o vim -lm
      -ltinfo -lnsl -lacl -lattr -lgpm -L/usr/lib -ltclstub8.6 -ldl -lz
      -lpthread -lm=C2=A0<br>
      $</p>
    <div style=3D"width:0px;min-height:0px"></div>
    <div style=3D"width:0px;min-height:0px"></div>
  </div>

</blockquote></div>

<p></p>

-- <br />
-- <br />
You received this message from the &quot;vim_use&quot; maillist.<br />
Do not top-post! Type your reply below the text you are replying to.<br />
For more information, visit <a href=3D"http://www.vim.org/maillist.php">htt=
p://www.vim.org/maillist.php</a><br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;vim_use&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">vim_use+uns=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
vim_use/94444cc7-a0da-4432-911b-00a567efe0a1n%40googlegroups.com?utm_medium=
=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/vim_use/944=
44cc7-a0da-4432-911b-00a567efe0a1n%40googlegroups.com</a>.<br />

------=_Part_873737_289243388.1785313707410--

------=_Part_873736_708588681.1785313707410--