Written by me@grafxflow
21 Feb, 2021
0
7,952
This is a quick snippet for anybody wanting to delete all the lines of code of a text file when editing it in the terminal using vim.
Usually in vim when you open a file and you have to delete lines of code, it can be done individually using the following - but what if you have a big file and want to delete all the lines of code this could take forever.
d
But with the below vim command you can actually delete all the lines of code in one go.
:1,$d
Here is a breakdown of what you are actually inputting with the command:
I hope this short snippet has been helpful.
22 Apr, 2020
30 Dec, 2018
Darth Maul and Micro-Organisms: Inside George Lucas's Cancelled Star Wars Sequel Trilogy
How to Automatically Convert DVD Subtitles to SRT on Mac
The $4 Billion Divorce: Inside the Awkward, Painful Sale of Lucasfilm to Disney
The Rift That Broke the Whip: Inside Lucas, Spielberg, and Harrison Ford's 'Furious Rows' Over Indiana Jones
Breaking the Endless Loop: Why Star Wars Needs an Origin Story
Founder, Grafxflow
I am a Full-stack Developer who also started delving into the world of UX/UI Design a few years back. I blog and tweet to hopefully share a little bit of knowledge that can help others around the web. I build lighting-fast dynamic content engines with Laravel, Winter CMS and Tailwind CSS. Thanks for stopping by!