zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.81k stars 1.16k forks source link

How can I make micro look like Nano (with colors)? #3028

Open BarbzYHOOL opened 9 months ago

BarbzYHOOL commented 9 months ago

Description of the problem or steps to reproduce

When using Nano (maybe i configured it a bit), it looks exactly like my terminal theme; But not micro, which is annoying. And more importantly, I opened /etc/environment file, and in Nano it turned a commented out line to a blue colored font, while in Micro it did nothing. Which makes it harder to read. I expected Micro to do that by default.

Specifications

Commit hash: 68d88b57 OS: popos Terminal: tilix

Screenshot from 2023-11-17 22-38-40 Screenshot from 2023-11-17 22-38-47

dustdfg commented 9 months ago

See docs for colorsschemes and docs for syntax files

JoeKar commented 9 months ago

The default highlighting is something the PR #2933 tries to solve more or less the same as nano does.

dmaluka commented 9 months ago

When using Nano (maybe i configured it a bit), it looks exactly like my terminal theme; But not micro, which is annoying.

Among micro's built-in colorschemes there is a colorscheme called simple, which uses terminal's colors, not its own custom colors. Seems like that is exactly what you want?

dmaluka commented 9 months ago

Actually there are several such colorschemes: https://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#16-color

BarbzYHOOL commented 9 months ago

Actually there are several such colorschemes: https://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#16-color

Simple seems to work fine (but maybe i need 32 colors?) What would have been my way to determine which theme to use? How can I know that "simple" means that it adapts to my terminal? And how can I know i have to click such a long link to find doc too?

(just asking because I switch to micro to have less work configuring nano and I didn't study how it all works, unlike I did with Nano but it had taken me several hours in the past...)

dmaluka commented 9 months ago

It's the same doc that you can find by running help colors in micro.

BarbzYHOOL commented 9 months ago

ok so how to know which other theme is like "simple"?

dmaluka commented 9 months ago

Those that are mentioned as 16-color themes.

* 16-color: A colorscheme that uses the 16 default colors will always work but
  will only look good if the 16 default colors have been configured to the
  user's liking. Using a colorscheme that only uses the 16 colors from the
  terminal palette will also preserve the terminal's theme from other
  applications since the terminal will often use those same colors for other
  applications. Default colorschemes of this type include `simple` and
  `solarized`.

...

### 16 color

These may vary widely based on the 16 colors selected for your terminal.

* `simple`
* `solarized` (must have the solarized color palette in your terminal to use
   this colorscheme properly)
* `cmc-16`
* `cmc-paper`
* `geany`