micro-editor / micro-editor/micro

[feature request] status line colors

Open
#2,563 0 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
29.6k
Forks
1.4k
Avg merge
2d 18h
Merged PRs (30d)
10

Description

It would be cool if we could include color formatting in the status line. In particular, I want to make the $(modified) status line piece a brighter color than the rest, so it stands out better. I tried doing this hackily by just inserting ansi terminal escape codes in statusformatl, but the escape character \u001b just appeared as a rectangle. (as a side note, @zyedidia's json5 library, which micro uses to read the settings, is missing \x** style escape codes in strings)

This should maybe be a different feature request, but it would also be cool if there were an option to move the status line to the top of the buffer pane. I'd find it a bit easier to see there.

I think this first feature might be within the scope of a plugin, but I'm not sure. Is there a way to put custom formatting in the status line from a plugin? If not, would anyone else be interested in seeing this feature added to micro? Or at least modifying micro so it's possible to do with a plugin? This second feature, moving the status line to the top, I think can't be a plugin. Is anyone else interested in seeing that feature added?

As another side note, it's a bit weird how $(modified) includes a space at the end. For example, I tried including $(modified)$(modified)$(modified) in my statusformatl so that I'd get a +++ instead of a + when my file was modified, but instead I got a + + +. It's also a bit inconsistent how $(modified) has brackets when the file is read only, i.e. [ro]. Maybe we should make it [+] or [++] when the file is modified for consistency, and also to make it easier to see. In any case, I think these changes are within the scope of a plugin (although I think they might make better defaults).

Anyways, that's a lot of related small issues. Thanks for the awesome work put into micro, I love it :). Let me know what you guys think of these ideas.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the statusformatl setting and the status-line rendering or plugin entry points, then separate the color-formatting, placement, and $(modified) behavior requests. Check whether the existing plugin API can expose these controls; done requires a decided scope and corresponding behavior for the selected request, with tests or documented verification.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.