vi

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...

vi | TECH.SAIGONIST.COM

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /home/tomo/web/tech.saigonist.com/drupal7/php/includes/common.inc:2776) in drupal_send_headers() (line 1486 of /home/tomo/web/tech.saigonist.com/drupal7/php/includes/bootstrap.inc).
  • Error: Class 'CToolsCssCache' not found in _cache_get_object() (line 32 of /home/tomo/web/tech.saigonist.com/drupal7/php/includes/cache.inc).
The website encountered an unexpected error. Please try again later.