3 ms·
Speaking of vim, just a reminder that @antirez made a terminal based text editor in pure C with no dependencies, not even ncurses, in under 1000 lines of code,
by _vya7 10y ago
Speaking of vim, just a reminder that @antirez made a terminal based text editor in pure C with no dependencies, not even ncurses, in under 1000 lines of code, complete with search feature, and customizable syntax highlighting for variable number of languages.
https://github.com/antirez/kilo https://github.com/antirez/kilo
Lots of people have forked it and are actively making it their very own editor. Sure, none of them may ever take off and become a new emacs or vim competitor. Or maybe they will. Let's not discount innovation.
Plus it's amazing to me that to make a full fledged terminal editor, almost all you really need is the ability to read from stdin and write to stdout. Only a tiny little bit of glue C code is needed (for handling signals like SIGWINCH, or for setting or unsetting raw mode in the terminal), but almost the entire rest of it can be written in, say, Lua.
- kartD 10y ago+1, to complete the editor love, people should also give the https://github.com/google/xi-editor https://github.com/google/xi-editor a look. "The xi editor project is an attempt to build a high quality text editor, using modern software engineering techniques. It is initially built for Mac OS X, using Cocoa for the user interface, but other targets are planned."
- throwanem 10y ago> almost the entire rest of it can be written in, say, Lua Or Lisp. :)
- cschmidt 10y agoI I were going to hack on an C based editor, I think I'd use vis as a starting point: https://github.com/martanne/vis https://github.com/martanne/vis It already has Lua extensions. Or I might play with a pure python editor https://github.com/jonathanslenders/pyvim https://github.com/jonathanslenders/pyvim which is based largely on prompt_toolkit that iPython just adopted Both editors are "vim like".