View original Gist on GitHub
" 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