qemacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Line Numbers


From: Charlie Gordon
Subject: Re: Line Numbers
Date: Sat, 3 Sep 2022 01:56:37 +0200

My mistake: toggle_line_numbers() applies to the current window.

When executed from ~/.qe/config, it applies to a dummy window and has no lasting effect. It it debatable whether this dummy window should get the default settings for all new windows…

In the mean time, you can try and add the same line to a `.qerc` file in you home directory: it should automatically make line numbers visible when you load a new file, but they might disappear when you select another file in the same window… For work is needed for these window properties to get set to meaningful defaults when a different buffer is attached to a window, I shall think about a good solution.

Thank you for your feedback

Chqrlie.


On 3 Sep 2022, at 01:08, Marc Wilson <posguy99@gmail.com> wrote:

That does not produce an error, but does not work to turn them on, either.

-- 
Marc Wilson


On Fri, Sep 2, 2022, at 4:02 PM, Charlie Gordon wrote:
There is not, but you can add a line in your ~/.qe/config file:

toggle_line_numbers();

Chqrlie

On 3 Sep 2022, at 00:46, Marc Wilson <posguy99@gmail.com> wrote:

Is there a variable that will force the line numbers on at startup, either global or .qerc ?  Reading variables.c doesn’t seem like there is one.

-- 
Marc Wilson


On Fri, Sep 2, 2022, at 3:39 PM, Charlie Gordon wrote:
Indeed QE_STYLE_GUTTER is the style used for the line numbers:

    /* line numbers */
    if (ds->line_numbers) {
        ds->style = QE_STYLE_GUTTER;
        display_printf(ds, -1, -1, "%6d  ", line_num + 1);
        ds->style = 0;
    }

with a default definition of

    STYLE_DEF(QE_STYLE_GUTTER, "gutter", /* #f84400 on grey25 */
              QERGB(0xf8, 0x44, 0x00), QERGB(0x3f, 0x3f, 0x3f), 0, 0)

Chqrlie.

On 3 Sep 2022, at 00:34, Marc Wilson <posguy99@gmail.com> wrote:

What style element name is the numbers themselves?  I figured out that “gutter” is the tray the numbers are in.

-- 
Marc Wilson


On Fri, Sep 2, 2022, at 2:43 PM, Charlie Gordon wrote:
Hello Marc,

You can toggle line numbers display with the toggle-line-numbers command bound to "C-x RET l” and "C-c l”

This command can be found with the apropos command: C-h a line RET

Enjoy!

Chqrlie

On 2 Sep 2022, at 20:15, Marc Wilson <posguy99@gmail.com> wrote:

Can Qemacs number lines onscreen?  I realize there’s a line counter in the mode line.

-- 
Marc Wilson


reply via email to

[Prev in Thread] Current Thread [Next in Thread]