New answers tagged

4

Sometimes ago, on SO, I've posted a solution to have a :global command which asks for confirmation before executing anything (:delete in your case): https://stackoverflow.com/a/46830106/15934 It's a little bit convoluted :D. It's shipped with my library plugin, and it can be used with :ConfirmGlobal/pattern/d Note: unlike the :g/pattern/s/.*\n//c solution, ...


4

One way to achieve what you want to do is to use the :s command inside your :g command: We know that we can delete a line, with a confirmation using the following substitution: :s/.*\n//c This will replace all the characters (.*) and the next end of line character (\n) with nothing, effectively deleting the line. The c flag at the end of the substitution ...


0

I normally use search and cgn combination for inlining and repeating with .


Top 50 recent answers are included