Open vzaliva opened 3 years ago
Thank you for your request
bold is not highlighted
italic is not rendered in italic
Section handling could use color or some other style rendering […]
That is something that could be fixed in the upstream syntax repository (https://github.com/jezcope/Org.tmbundle)
- italic and verbatim are highlighted but enclosing syntax markers are visible
[…] in which case the markup (leading asterisks) could be hidden.
Yes. bat
is a tool to display file contents. It's not a org mode renderer. We can talk about syntax highlighting improvements, but bat
will never hide text that's actually there.
I understand your position about not transforming file content when displaying. How about a compromise, rendering '/' in /italic/ in background color, making them invisible but still there for copy-paste? Could be a special syntax highlight mode, like org-invisible...
Need a clarification on what belongs to upstream and what belongs to bat
:
Are these bat or Org.tmbundle issues?
Most likely they are color scheme (aka theme) issues. You can try with a different one, or customize it / make a PR to the upstream color scheme repo with a fix
Also, note that italics are not enabled in bat
by default. Check out this README section to see how you can enable it.
I confirm that I have --italic-text=always
enabled in my config. Still no italic is shown.
I've compared my example to markdown mode:
Markdown-mode test:
# Section
## Sub-section
### Sub-sub-section
* normal
* *italic*
* **bold**
* `verbatim`
The difference is that bold
is highlighted. However italic is still not rendered as italic.
I can also confirm that my terminal indeed supports italic:
With the TwoDark color scheme, neither bold or italic markdown text is rendered as bold or italic, but with the default color scheme it is. So it seems like TwoDark needs some fixes/improvements.
Default theme also has problems in org mode:
I guess I need to find right theme which renders or mode correctly.
I narrowed down bold handling to syntax parsing problem in org syntax. I've tried all themes on example above and none of them highlights bold. However changing it a little by adding some symbols before "bold" makes it work. This is example which does show bold in org mode:
Org-mode test:
* Section
** Sub-section
*** Sub-sub-section
normal
/italic/
This is *bold*
~verbatim~
Here is an example:
In emacs it is rendered as follows:
Bat shows it as follows:
The obvious problems are: