Live data from Hacker News

Design of a Vim-like text editor

lists.suckless.org

31–40 of 92 posts

Re: Design of a Vim-like text editor

#31
post #25

[deleted]

The vim codebase is very large - it may very well be more efficient to write an 80% version of VIM (which might be 100% of what the author needs) than to figure out what's going on in the VIM codebase.

Re: Design of a Vim-like text editor

#33
post #18
post #11

How about an embedded Lisp interpreter?

Well, there is a vim mode for emacs.

I grew up with the one which didn't have the letter 'm' in it. The lisp/scheme concept could be seen as an alternative to vim/script for embedding/extending where the opt-in was meant for posix ex/regex programmers as an alternative to non vi modality with recursive expression via either McCarthy or Kleene closures and styles of programming with or without /term(cap|info)/ databases.

Re: Design of a Vim-like text editor

#34
I'm always interested in the suckless projects. I like emacs and vim, too, but it's interesting to see projects made which can just grab the fork, a sharp knife, and a good pan and make do instead of necessarily including the kitchen sink, if I may get the analogies out.

Also, no tests? Phew!

Re: Design of a Vim-like text editor

#37

So weird to see this at #1 since I was researching this exact topic last night. My idea is a fully scriptable (Racket or CL) editor with modern package management system. A tiny C core would handle rendering (curses, etc.). Very cool write up though!

As an alternative to ncurses, I encourage you to look at termbox[1]. It's small, minimal, and very robust in my experience. (As a side note, the author also wrote a text editor in Go that uses it.)

[1] https://github.com/nsf/termbox

Re: Design of a Vim-like text editor

#38
That was a very interesting read. I might want to implement some of those things in my text editing component.

I have one question. How would they implement "go to line number" functionality? How fast would it be?

Re: Design of a Vim-like text editor

#39
I'm currently building a similar project in Rust called iota: https://github.com/gchp/iota

I don't intend it to be a vim clone, however I'm currently adding some features which I've borrowed from vim. The main one being modal editing. Its much earlier on than this project, though.

As a side note, building a text editor is great fun, one of the most interesting projects I've worked on!

Re: Design of a Vim-like text editor

#40

How do I submit a patch? Needs a couple of tiny mods to compile on OSX.

I would imagine you can submit a PR at https://github.com/martanne/vis/pulls. He says "As always, comments and patches welcome!" in the README.

Edit: Maybe not, the mailing list mail says "git clone git://repo.or.cz/vis.git" instead. I'm not sure where the canonical source lives.

Post reply on HN