Sublime Forum

Add auto-refresh capability for buffers

#1

It would be really nice to enable auto-refresh on a particular buffer, if I am monitoring a log file. Obviously, this should be off by default, but it would be nice to be able to enable this on a given buffer. Also, adding an application command so that I could create a key binding and access it from plugins would be very handy as well.

0 Likes

#2

It’s there as the ‘autoReloadChanged’ option. You can set it for the current buffer by doing:

view.options().set('autoReloadChanged', True)

in the console. You can also bind this to a key by using something along the lines of:

<binding key="f10" command="toggle autoReloadChanged"/>
0 Likes

#3

Thanks! Will do…

0 Likes

#4

This kinda works, but only refreshed when focus changes to the buffer being monitored. I would like to have a log file open and have it continuously update at some interval. Once per second would be cool.

0 Likes

#5

willi297, it might be worthwhile to investigate dedicated log viewers. Log viewing is possibly sufficiently different to text editing for it warrant a specialized tool.

The best log viewer that I found after evaluating about five of them was BareTailPro from Bare Metal Software for $35:

baremetalsoft.com/baretailpro/index.php

I’m not connected with them in any way. I just like their product.

0 Likes