zyedidia / micro

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

[Question] Color theme/syntax highlighting #2312

Open ghost opened 2 years ago

ghost commented 2 years ago

How do I remove the background so that I could make the window fully transparent?

toxision commented 2 years ago

Hi p0pcat The background is not defined in the colorschemes. It is coming from your terminal emulator config. If that's transparent, background of micro will be transparent as well.

Cheers, Chris

ghost commented 2 years ago

Hey @toxision I have just discovered it I also would like to know why can't I change the color of the item I want if I make it like color-link current-line-number "246,[bg color]" or whatever also how can I change the color of tab line?

toxision commented 2 years ago

Hi again I only know of the syntax like: color-link current-line-number "#hexvalue" Not sure if other color-specifications are supported. Also don't know what you mean by "tab line"

Maybe best is to point the config file to a specific colorscheme you've downloaded and modify that one. If needed, I could also upload mine. (Of course if you are not already doing that)

Cheers, Chris

ghost commented 2 years ago

Hey Chris! You can open the tab line by pressing Ctrl+t, it will show up on the top of the screen.

dmaluka commented 2 years ago

You can change the color of the tab line with color-link tabbar.

ghost commented 2 years ago

Hey @dmaluka thanks, I have few other questions: Is it possible to change the text color and make the background transparent? like color-link statusline "240,[bg color]", it doesn't work Is it possible to change the variable color? for example echo "$VAR hello" and $VAR is other color than hello

dmaluka commented 2 years ago

Hey @dmaluka thanks, I have few other questions: Is it possible to change the text color and make the background transparent? like color-link statusline "240,[bg color]", it doesn't work

I'm not sure I understand your question. It should already work just fine. What exactly isn't working for you?

Is it possible to change the variable color? for example echo "$VAR hello" and $VAR is other color than hello

At the moment, not really... It's a problem with micro's unfinished syntax highlighting for shell scripts. As you may notice, $VAR outside a string is highlighted fine, but it's not highlighted inside a string. I've just tried to quickly hack runtime/syntax/sh.yaml to make it highlight variables inside strings as well, but I haven't succeeded.

ghost commented 2 years ago

I'm not sure I understand your question. It should already work just fine. What exactly isn't working for you?

I fixed it by just removing background at all like number,, I think I found a bug, when you make anything Number,[bg color] it makes this transparent and the color default. Thanks for help!

SeryiBaran commented 1 year ago

Write [bg] instead of [bg color]! Everything will work!