1

Is there a way to delete all the lines between two particular line number via command pallete in Sublime Text 3?

I frequently run into the situation of having a large file and needing to delete a few thousand lines between two particular line numbers. It'd be nice to not have to wait for the render due to user scrolling and just let the CPU do the delete in the background.

1 Answer 1

5

There is a way to delete all lines between two particular line number.

  • Press CTRL + G. Text input will appear.
  • Go to last line you want to select by typing :line_number. For example :400000
  • Press ENTER to set cursor on this line
  • Edit > Mark > Set Mark. Circle near line number will appear.
  • Press CTRL + G. Text input will appear.
  • Go to last line you want to select by typing :line_number. For example :200000
  • Press ENTER to set cursor on this line
  • Edit > Mark > Select to Mark. Large selection will appear.
  • Press DELETE
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.