Live data from Hacker News

Pure Python Vim clone

github.com

1–10 of 85 posts

Re: Pure Python Vim clone

#8
post #6

Like vim, just slower. ™

From the readme:

Why did I create Pyvim?

There are several reasons.

The main reason is maybe because it was a small step after I created the Python prompt-toolkit library. That is a library which is actually only a simply pure Python readline replacement, but with some nice additions like syntax highlighting and multiline editing. It was never intended to be a toolkit for full-screen terminal applications, but at some point I realised that everything we need for an editor was in there and I liked to challenge its design. So, I started an editor and the first proof of concept was literally just a few hundred lines of code, but it was already a working editor.

The creation of pyvim will make sure that we have a solid architecture for prompt-toolkit, but it also aims to demonstrate the flexibility of the library. When it makes sense, features of pyvim will move back to prompt-toolkit, which in turn also results in a better Python REPL. (see ptpython, an alternative REPL.)

Above all, it is really fun to create an editor.

Re: Pure Python Vim clone

#9
My thought process upon seeing this:

"Python, huh? Seems like typos in uncommon branches of the code would cause it to randomly fail at runtime, losing your work!"

"Now evmar, don't be such a internet nay-sayer, plenty of people write reliable Python code. You just need tests and... yep, there's a tests directory right there in the repository."

"Let's take a look. ...there's only one test!?"

It looks pretty neat other than that, though.

Post reply on HN