onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.83k stars 282 forks source link

Feature Request: Rich Text Format #642

Open mizagog opened 5 years ago

mizagog commented 5 years ago

i come across Rich Text while editing MS files, working in mails, and manipulating Hyperlinks. i think Hyperlinks alone can be worth the trouble (useful inside PDFs)

Spirarel commented 5 years ago

If I were to set out and make the ideal editor, rich-text support (like rendered Markdown in the editing pane) would definitely be a feature.

instantepiphany commented 5 years ago

I might be mistaken, but currently vim has one font size for everything in a single buffer - so you couldn't show headings in a different font size to paragraph text.

As an alternative, how about having a split showing the rendered rich-text/markdown? That is how most editors accomplish this and allows you to edit the plain text with the efficiency of vim, and still see live rendered output.

Spirarel commented 5 years ago

@instantepiphany, best I know you're right about this. That's probably, a limitation imposed by the view-layer being the terminal though. VSC right now has limited(?) support for in-edit-pane rich text like this (which may actually just be syntax highlighting),

Screen Shot 2019-09-13 at 22 06 08

The split with rendered text is definitely a working solution, but it's awkward; I think the ideal editor wouldn't have to compromise heavily on WYSIWYG and could achieve something like https://stackedit.io in the editing pane.

I'm not suggesting this idea deserves high priority btw, just mirroring @mizagog in recognizing that there's UX value on the table here.

instantepiphany commented 5 years ago

Syntax highlighting and font-weight changing is possible in terminal, like what VSC does, but as long as you have a terminal backend like you said, you won't easily get different sized text. I also wouldn't want different sized text (that is editable) because what happens when I try to go down one chracter? You've lost the nice grid (at least with monospaced fonts) and I think that would feel very strange. But I do agree syntax highlighting and font-weight/variant changes would be useful.

CrossR commented 5 years ago

Syntax highlighting and font-weight changing is possible in terminal, like what VSC does, but as long as you have a terminal backend like you said, you won't easily get different sized text.

Oni at least doesn't have the limitations of the terminal (ie we have partial scrolling, where you can show half a line, which isn't possible in a terminal etc), so we do have the freedom to mess with that sort of stuff.

The issue is more the UX of implementing it correctly, so that a more WYSIWYG style view still works with the vim editing style.

Mayeu commented 4 years ago

This would be a killer feature.

One of the reason Emacs is such a versatile editor is because it allows to do this kind of stuff while still being a powerful text editor: demo

Source

(Side note, that's Emacs running Org Mode)

davidwilde commented 4 years ago

I would be interested in something a bit like this.

What I would be very interested in, is if Onivim2 could become a literate programming editor. If it were possible that files named *.js.lit could be markdown but with the ability to switch to code using code-fences. If it could be developed to be as seamless as Typora then I think this could potentially be a game-changing tool. It could certainly bring back the idea of literate programming which has been largely ignored since coffeescript tinkered with it

If there was anyone in the reason/revery space that would be interested in teaming up with me around developing this a feature for Onivim (I'm not in the core team or anything but just think it would be interesting)