Slurp lines into list instead of modifying buffer

Use the range to determine which lines to slurp, copy them into a
list, and operate on the list.

Using a list allows me to uniquify and remove empty values.

Escape backslash and use very nomagic to get exact text matches.

This change implements my todo.