Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete n lines in the up direction in vim

Tags:

vim

Is there a command in vim which will delete n lines in the up direction.

I know I can use 4dd which will delete 4 lines downwards.

like image 657
user674669 Avatar asked Aug 05 '11 10:08

user674669


People also ask

How do I delete all lines above Vi?

Delete All Lines Press the Esc key to go to normal mode. Type %d and hit Enter to delete all the lines.


1 Answers

In VIM, 3dk would delete 4 lines in the upward direction. Further documentation can be found at http://www.vim.org/docs.php

like image 189
chriskievit Avatar answered Sep 25 '22 03:09

chriskievit