LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   vi delete empty line? (https://www.linuxquestions.org/questions/linux-newbie-8/vi-delete-empty-line-669146/)

Junior_DBA 09-11-2008 04:53 AM

vi delete empty line?
 
Hi! Nebie question. How can i delete an empty line vi?

I used ctrl+d but with out success:(

tredegar 09-11-2008 05:00 AM

Quote:

I used ctrl+d but with out success
Why ctrl+d ?
dd is what you want.
And read a vi tutorial.

RMLinux 09-11-2008 05:18 AM

Quote:

Originally Posted by Junior_DBA (Post 3276883)
Hi! Nebie question. How can i delete an empty line vi?

I used ctrl+d but with out success:(

1. put your cursor on the empty line
2. press ESC to make sure you are in the command mode.
3. then press "dd" to delete the current line.

farslayer 09-11-2008 07:50 AM

You may find these cheat sheets helpful in learning vi.

http://www.viemu.com/a_vi_vim_graphi..._tutorial.html

trickykid 09-11-2008 10:05 AM

Quote:

Originally Posted by tredegar (Post 3276891)
And read a vi tutorial.

Just telling someone who's fairly new to just go read a tutorial isn't very helpful. At least link to one if you're gonna tell them such things..

lleb 09-11-2008 03:21 PM

http://www.cbu.edu/ietc/faq/vifaq.html

that is a good basic set of VI commands.


All times are GMT -5. The time now is 11:32 AM.