Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Of course, if you're implementing POSIX vi, there are quite a few features that have aged poorly, like roff/troff macros and line-editing

What do you mean by "roff/troff macros"?

EDIT: Ah, you're probably talking about the "section-wise" movements, defined in POSIX with language like "A line whose first character is a <period> and whose second and third characters match a two-character pair in the 'sections' edit option (see ex)" - that's the first time I've stumbled upon the 'sections' and 'paragraphs' options in the Vim manual ... Very quaint!



Yep, those are the ones! There's also the oddity of the [[ and ]] motions. In the POSIX standard, those are the only two-character motions. I was using a state-machine to implement motion commands, and that single command threw a wrench in the works. Of course, vim took two character commands and ran with it, so in vim [ can be followed by a whole host of characters that all do different things. Since g was not mapped in vi they also did the same thing there.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: