#4202

line number padding

Opentristenatoropened 2mo ago

Description

it would be very much appreciated to be able specify a padding before (left of) the standard line number gutter.

this is for the purposes of centring the code more towards the middle of the screen. i have a wide monitor and having most of my code displayed at the very left of the terminal can be uncomfortable. it would be nice to be able to horizontally push or pull my code to where i like it most.

the default of zero [characters] would be for no additional padding, ie: current behaviour.

also: it would be unbelievably cool if a binding were available to increase/decrease this padding on the fly by 1 character at a time. some code is narrow, some code ain't - whatever's in the current buffer a few taps plus or minus to make it just right.

i've only just started using your editor and thus far i'm really excited to switch from the graphical editor i've always been nearly, but not quite, happy with.

thank you!

Activity

3
Andriamanitra2mo ago

In my opinion this is something you should do in the terminal itself (or terminal multiplexer such as tmux or zellij) rather than have it reimplemented in every TUI application. Although we do support splits and terminal panes so I guess micro is halfway to being a terminal multiplexer already...

Andriamanitra2mo ago

In my opinion this is something you should do in the terminal itself (or terminal multiplexer such as tmux or zellij) rather than have it reimplemented in every TUI application. Although we do support splits and terminal panes so I guess micro is halfway to being a terminal multiplexer already...

tristenator2mo ago

ty, yeah i tinkered with setting the terminal padding. also i tried setting up some lua to add a blank split, shift buffers, resize it, hide line numbers, all that stuff, but it was too specific and not really satisfactory.

all of the above worked ok-ish, but i was sort of hoping for the bottom sections of the editor (command et al) to still be 100% wide and of course adjust the horizontal offset for the positioning (in characters) of the code panes, especially on the fly.

anyway, it's all food for thought, thank you for considering the request!