prompt-toolkit / pyvim

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

Basic fuctions such as Insert not working #64

Closed znorris closed 8 years ago

znorris commented 8 years ago

I'm having a hard time getting pyvim to do basic things such as allow me to type in the document. Hitting insert sill sometimes go to -- INSERT -- and hitting it again will not take me to --REPLACE --. Also I'm not able to leave the PyVim help, :q replies "No write since last change (add ! to override) but :q! replies "2 more files to edit".

Is the application just not ready for normal use yet? The screenshots look so good :/

jonathanslenders commented 8 years ago

Hi @znorris,

Are you using the insert key of the keyboard? If so, that's interesting, because I think, I never tested it. My keyboard does not have insert keys, and I use 'i' or 'a' to go to insert mode, and 'escape' to go back. I guess we have to fix that.

The ':q' issue for the help should also be fixed. That's easy.

Anyway, I'd say it's still experimental to some extend. All features that are developed are supposed to be stable and bug free. Bugs in existing features have to be fixed. Many features are however still missing, but I'm using it quite often as my own editor without any issues.

There is however one big issue, that is the handling of big files. (>2000 lines of code). Editing such big files becomes slow. I know why. I know how to solve it. But not how to do it in pure Python code, and not without loosing compatibility with Pygments. And not without risking to introduce many small bugs.

Data structures are really important for editors when files are bigger. The underlying library prompt-toolkit was meant as a readline replacement, and not designed for such big files. The data structures of prompt-toolkit are extremely simple. This was good enough for most use cases, and allows for very quick development. So, I'm honest, currently prompt-toolkit is not powerful enough to compete with a real Vim or Emacs. Maybe some day it will, but it's not a priority. But for now, it should certainly work fine for smaller stuff and simple editing.

jonathanslenders commented 8 years ago

The insert key is working. I'm going to close this.