Re: [code] How can I tweak the text in the status bar?

From: Mitchell <>
Date: Thu, 16 May 2013 09:10:01 -0400 (Eastern Daylight Time)


On Thu, 16 May 2013, Russell Dickenson wrote:

> OK - thanks to Brian I have found the following code, which looks to be the
> section I ought to tweak. What I don't understand is: how can I have the
> text start from the left-hand side, and not right-aligned?
> local text = not CURSES and '%s %d/%d %s %d %s %s %s %s' or
> '%s %d/%d %s %d %s %s %s %s'
> gui.docstatusbar_text = string.format(text, _L['Line:'], line, max,
> _L['Col:'], col, lexer, eol, tabs,
> enc)

I would recommend connecting to an `events.UPDATE_UI` event in your
init.lua and updating `gui.statusbar_text` there rather than modifying
anything in *core/gui.lua*. `gui.statusbar_text` starts from the left,
unlike the docstatusbar which is to the right. From the same handler, you
can set `gui.docstatusbar_text` to the empty string if you don't like
seeing it. Something like:

     events.connect(events.UPDATE_UI, function()
       gui.statusbar_text = 'whatever you want'
       gui.docstatusbar_text = '' -- clear it

Keep in mind that the left part of the statusbar normally shows
informative messages which could be over-written by this event handler.

I hope that helps.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Thu 16 May 2013 - 09:10:01 EDT

This archive was generated by hypermail 2.2.0 : Fri 17 May 2013 - 06:52:49 EDT