Deleting with Vim

Introduction

I realised that deleting code and/or blocks of unused text within a file is one of the key roles of a Software Engineer. Honestly, it's less about creating more content, and more about deleting whatever is not required. Essentially paying off the Technial Debt that keeps on accumulating over time. Almost none of what I wrote above is relevant to the tips below, but hey, I got your attention, no?

Delete Blank Lines from file

Delete leading spaces

Delete based on search pattern

Delete Trailing Spaces

Thank the author. Fork this blog.


Tagged in gvim