regex

Displaying 1 - 1 of 1

Vim is grep, and more vim search tips

Something I learned the other day blew my mind even after years of using VI/vim. Because I'd also been using grep for years.

The name 'grep' comes from the vi command g/re/p

g in ex-mode of vi means 'global', so any :g command will apply to all the text in the current buffer.

p after 're' means print.

're' in g/re/p actually just means a regular expression should go there (a vim regular expression, which is different fromregex in PHP or even a re string in grep - this is where vim magic modes...