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

> But have you ever heard of :g//? I hadn’t.

> :[range]g[lobal]/{pattern}/[cmd] (default 'p')

This is the origin of grep, i.e. g/re/p!



My first reaction to that was "surely grep is older than vi" - but the grep wikipedia page points out that the g/re/p pattern dates all the way back to ed - which vi extended

http://en.wikipedia.org/wiki/Grep


Interesting timing: I was reading through Practical Vim last week and came across a sidebar describing the origins of grep. Why do programmers love their acronyms so much?


Or my favorite, :g/re/d




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

Search: