by eb0la · 8y ago · 0 comments
For instance:
Delele first 20 lines:
<ESC>:0,20d
Delete lines from current location to end of file:
<ESC>:,$d
Search and replace from regrex:
<ESC>:0,$s/regex/replacement/g
Copy lines 0 through 20 to the current line:
<ESC>:0,20t.
I end up using variants of this and the above multiple times every work day.
(from cursor next 20 lines) <ESC> d20d
When deleted is on your copy buffer, just prest p tu paste it from cursor.
Delete from the current line to a line with a particular line number you already see on the left if you have line numbering enabled.
dG
is a lot faster.