Vim

Write file opened as 'readonly'

:w !sudo tee "%"

Visual editing can be used to delete any number of lines

Shift+V from point of cursor and press D key to delete

Search and replace

:%s/search/replace/g 

Disable search highlight

:noh