prompt-toolkit / pyvim

Pure Python Vim clone.
BSD 3-Clause "New" or "Revised" License
2.52k stars 160 forks source link

Are people using Pyvim as their main editor? #127

Open jtrakk opened 4 years ago

jtrakk commented 4 years ago

I really like the idea of this project. I'm curious if people are using Pyvim for their main editor. How does it compare to regular Vim in daily usage?

wviana commented 4 years ago

Hi there. I've just discoverd this project. I would love to try help it to get as close to vim as possible.

This project should have a sub-reddit.

SqrtRyan commented 4 years ago

No, although it's wonderful, it chokes on files that have 10,000 lines of code upward. Native vim doesn't choke on these. I think it has to do with the way prompt_toolkit handles syntax higlighting via pygments; and that it's not cacheing it as well as it could (because it slows down to unbearable speeds when you give it enough code at a time; vs vim which seems to maintain a constant speed regardless of how many lines of code are in the file you're editing)

jonathanslenders commented 4 years ago

It is not so much the syntax highlighting that makes it slow.

It's the way the document content is stored. In prompt_toolkit, it's literally one Python string for the whole document. Every insertion of a character creates a new string. In order to make it more efficient, we should have a better data structure. But this would be an enormous refactoring, I don't think anyone is willing to attempt right now. Feel free to look into that.