LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-11-2008, 05:53 AM   #1
Junior_DBA
LQ Newbie
 
Registered: Aug 2008
Posts: 25

Rep: Reputation: 15
vi delete empty line?


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

I used ctrl+d but with out success
 
Old 09-11-2008, 06:00 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
I used ctrl+d but with out success
Why ctrl+d ?
dd is what you want.
And read a vi tutorial.
 
Old 09-11-2008, 06:18 AM   #3
RMLinux
Member
 
Registered: Jul 2006
Posts: 260

Rep: Reputation: 37
Quote:
Originally Posted by Junior_DBA View Post
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.
 
Old 09-11-2008, 08:50 AM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
You may find these cheat sheets helpful in learning vi.

http://www.viemu.com/a_vi_vim_graphi..._tutorial.html
 
Old 09-11-2008, 11:05 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by tredegar View Post
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..
 
Old 09-11-2008, 04:21 PM   #6
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
http://www.cbu.edu/ietc/faq/vifaq.html

that is a good basic set of VI commands.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vim how to delete until the first empty line edenCC Linux - Software 2 05-03-2007 11:26 PM
can not delete NON-EMPTY directories through samba share Sandor Linux - Software 2 02-16-2006 04:06 AM
How to delete non-empty directories? Also have a terminal question Nylex Linux - General 10 07-16-2005 12:51 AM
how to search for and delete empty directories? BrianK Programming 4 06-03-2005 08:24 AM
Delete Empty files whospeaks2me Linux - Newbie 2 07-18-2003 11:39 PM


All times are GMT -5. The time now is 07:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration