martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.25k stars 258 forks source link

terminal native colorschemes? #1044

Closed apprehensions closed 1 year ago

apprehensions commented 1 year ago

currently is it possible to use the terminal's colors (eg. ANSI (\e[1;31m)) instead of internal vis colorschemes?

ninewise commented 1 year ago

Check this thread: https://github.com/martanne/vis/issues/1027

apprehensions commented 1 year ago

still don't get it

mcepl commented 1 year ago

@ninewise, isn’t this just a duplicate of #1027? Shouldn’t it be closed as such?

apprehensions commented 1 year ago

it still has,,,not been revealed to me how to make a terminal native colorschrme

erf commented 1 year ago

you can use the clear.lua plugin in my vis-minimal-theme which uses a clear background color (so the terminal background is used) and the terminal foreground color. we can't use the full native terminal color scheme as it's not accessible in the editor AFAIK

apprehensions commented 1 year ago

as it's not accessible in the editor

Well, that just means this issue stays open. Isn't ESC[X;XXm possible with colors?

ninewise commented 1 year ago

Well it is still a duplicate, and the other issue has more info.

apprehensions commented 1 year ago

https://github.com/martanne/vis/blob/1a958f221404b09cb8b0612fb34301e6b9783cf9/ui-terminal-vt100.c#L56-L64

https://github.com/martanne/vis/blob/1a958f221404b09cb8b0612fb34301e6b9783cf9/ui-terminal-vt100.c#L145

this simply needs to be extended to the other 8 colors; like 32 and 92, both being normal and high green color.