Numbers.vim - A vim plugin for better line numbers
github.com
github.com
10dG
Which would delete from the cursor to the tenth line.delete five from where you are- inclusive
But to me, I try to avoid counting arbitrary lines and instead try and do something like y/<unique marker> or ya{ or whatever.
Vim has several ways to move and edit a file. For example, to go to a specific line, you would use <n>gg and you would jump to that line. This is useful for navigation as well as selection.
There are likewise commands that are relative from the cursor's position. dd and yy come immediately to mind, as well as the h-j-k-l commands. Knowing how many lines you need is augmented from the relative line numbering.
The key here is Vim doesn't have an easy way to switch from one to the other, except through manually typing commands like `set relativenumber` and `set number`. The plugin switches the number count based on what mode you are in.
I had line numbers set till it turned out that when I selected a bunch of text for copying selected the line numbers too. Ugh.