« Back to Index

Complex log filtering in Vim

View original Gist on GitHub

complex log filtering.viml

" clear the 'a' register first
:let @a = '' 

" append to 'a' register any lines matching 5xx (inc. previous line showing the error)
:g/\v5\d\d GET/-1,. y A

" paste from 'a' register
"ap