FIameCaster / prism-code-editor

Lightweight, extensible code editor component for the web using Prism
https://prism-code-editor.netlify.app
MIT License
43 stars 6 forks source link

Smooth following cursor #19

Closed ThinLiquid closed 3 months ago

ThinLiquid commented 3 months ago

This isn't a very urgent request but more of a QOL addition, but a smooth cursor that glides similar to VSCode or MS Word (the newer versions). I personally think that these look very nice and would be an amazing addition to the code editor!

FIameCaster commented 3 months ago

By "Smooth cursor" do you mean something similar to the cursor with Cursor Blinking set to smooth in VSCode settings?

ThinLiquid commented 3 months ago

No, I mean like when you type the caret glides, its this setting! image

FIameCaster commented 3 months ago

This was easy to implement actually. I might consider making it an extension. StackBlitz example.

There is a small issue when word wrap is enabled though. I will improve it in version 3.3.2, but it's near impossible to fix properly.

ThinLiquid commented 3 months ago

Nice! Glad to see it working :3

FIameCaster commented 3 months ago

After further consideration, I won't be making an extension out of this. Implementing it yourself requires little code and an extension would be harder to customize.