I want to search and replace occurrences of
$this->close_db();
with
$this->stmt->close();
$this->database->close();
which occurs on lines 73-74 (with indentations).
What is a quick and simple way of doing this without plugins? I'm also too lazy to write out $this->close_db()
and would like to simply reference it via one of the the lines it is on (line 89), without indentations.
Is there something like :%s/Trim@#89/#[73;;74]/g;AutoFormat
(pseudocode)?
Update: Feel free to share methods that use non-obscure plugins or scripts too.