vim delete lines n to n

To get vim to delete lines between n to n, use the range expression with the delete command. e.g To delete lines 30 - 40 of the file you have open:


If you want, use the . to as a shortcut reference the current line. This is useful if you quickly want to say delete x lines from above my current position. e.g: :-10,.d

To delete n lines above, use ndk e.g. go up to the first line needing to be deleted then: 101dk would delete 101 lines above.