Making large selections quickly in Sublime
I no longer write new content at tenghamn.com, you can find my new web related content at GoPHP.io and my personal blog posts at Ma.rkus.io.
My favorite domain registrar is NameSilo and if you use the affiliate link here it helps me earn some money from my writing: https://www.namesilo.com/pricing.php?rid=ee81e92mn, thanks! If you are new to NameSilo you can use my coupon, MARKUSTENGHAMN to save $1.00.
This post has been migrated and imported into different systems over the years, I have not had a chance to format this post manually so it may be hard to read but I have left it here as a reference.
So tonight I was editing a large sql file, a few million lines and the import got stuck about half way through. The easiest solution would be to edit the sql dump and I needed a quick way to remove half the text in the file. At first I tried finding the line and manually selecting the lines but realized that it would take forever. So how in the world do I make large selections quickly?
Thats when I headed to Google to find the best way of doing this. After a bit of searching I stubled across a thread called Large Selection/Highlight or Select Range by Line Number. With a nice answer regarding markers in Sublime.
So basically all you have to do is scroll to the line where you want to make your selection from and click Edit->Mark->Set mark.
Then scroll to the line where you want your selection to go to and click Edit->Mark->Select to mark