Hacker News new | ask | show | jobs
by lukes386 4681 days ago
I've always wondered how difficult it would be to extract the vim "engine" into a library that could easily be reused by other programs. I can only assume the answer is "very difficult".

Another idea would be some kind of VimSpec that emulators could be run against to see how well they cover the whole range of vim actions. Again, probably not very feasible.

1 comments

You would be correct, I have seriously looked into doing this type of thing and/or modifying the Vim codebase. My conclusion after a few hours is that the Vim codebase is a horrific unsalvageable mess of nested ifdef's. IMHO reimplementing a "vim engine" from scratch will be orders of magnitude easier.