LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 03-15-2011, 09:33 PM   #1
j360
Member
 
Registered: Jan 2010
Location: Maryland
Distribution: Ubuntu
Posts: 58

Rep: Reputation: 0
Cool Can't delete in VI


Hi, I'm taking a C programming class in college and we use VI text editor. I installed ubuntu on my computer so I can study. Every time I try to use Vi on my computer I'm able to type and delete using the delete button, but I can't delete using the backspace button. Every time I press it it only moves back on character. How can I solve my problem?
 
Old 03-15-2011, 09:34 PM   #2
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
Press "I" to enter insert mode then try it. (In Vi)
 
Old 03-15-2011, 09:47 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
In command mode, backspace does not delete in vi.

There's a nice cheat sheet here:

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

I made myself my own cheat sheet based on this book. It's got the best intro to vi that I've ever seen.

You are welcome to download my cheat sheet here:

Last edited by frankbell; 03-15-2011 at 09:52 PM. Reason: dumbness
 
Old 03-17-2011, 06:24 PM   #4
j360
Member
 
Registered: Jan 2010
Location: Maryland
Distribution: Ubuntu
Posts: 58

Original Poster
Rep: Reputation: 0
Thanks but none of the worked. I use Linux in school( through SSH) and I'm able to delete using backspace. I tried the cheat sheet d it didn't work. How can I uninstall VI so I can reinstall it again? maybe that fixes it.
 
Old 03-17-2011, 09:37 PM   #5
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
Is your computer a laptop? If so, try fn + backspace and see what happens.
Do you know how to use Vi? (not meaning to be rude, but Vi can be confusing)
 
Old 03-17-2011, 09:43 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
In using vi, it's important to be clear whether you are in command mode or text entry mode.

As I have tried to learn vi, that has been the single most difficult thing for me to get the hang of.

In my vi in text entry mode, backspace moves the cursor to the left, but does not delete the text as it passes over it. When I start typing from the new position, it replaces the text starting at the new cursor position.

In command mode, backspace also moves the cursor but does not delete the text. It does not appear to be able to move the cursor farther than the beginning of that line, again, in command mode. I cannot enter text until I return to text entry mode (ESC text-command).
 
Old 03-17-2011, 10:31 PM   #7
j360
Member
 
Registered: Jan 2010
Location: Maryland
Distribution: Ubuntu
Posts: 58

Original Poster
Rep: Reputation: 0
Cool

Quote:
In my vi in text entry mode, backspace moves the cursor to the left, but does not delete the text as it passes over it. When I start typing from the new position, it replaces the text starting at the new cursor position.

In command mode, backspace also moves the cursor but does not delete the text. It does not appear to be able to move the cursor farther than the beginning of that line, again, in command mode. I cannot enter text until I return to text entry mode (ESC text-command).
that's what happens to me, but I don't want that. I want to delete the character when backspace because that's how i do it on the Linux server at school. Anyway that can be fixed, or I'll have to get used to it XD
 
Old 03-18-2011, 12:04 AM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
That's not a vi problem, but a terminal one. Which terminal emulator are
you using?
 
Old 03-18-2011, 06:58 PM   #9
j360
Member
 
Registered: Jan 2010
Location: Maryland
Distribution: Ubuntu
Posts: 58

Original Poster
Rep: Reputation: 0
Cool

Quote:
That's not a vi problem, but a terminal one. Which terminal emulator are
you using?
you mean in school?
we use putty
 
Old 03-19-2011, 09:55 PM   #10
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,321
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
Quote:
Originally Posted by j360 View Post
that's what happens to me, but I don't want that. I want to delete the character when backspace because that's how i do it on the Linux server at school. Anyway that can be fixed, or I'll have to get used to it XD

After I wrote this, I should have specified that I'm actually using vim ("vi-improved") rather than original vi. I don't know whether it makes a difference, but I was kicking myself for not mentioning it earlier.

This Wikipedia article discusses vi and its variants.
 
  


Reply



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
Can I delete files in /mnt/tmp? and Files in the trash can will not delete? M$ISBS Slackware 15 10-02-2009 11:56 PM
Cannot delete expired principal from kerberos system, how delete principals in kerber sarajevo Linux - Security 0 10-19-2007 11:23 AM
How to delete files that won't delete? di11rod Linux - Security 7 10-19-2005 09:14 PM
can I delete these??? adambeazley Linux - Newbie 8 05-07-2004 04:36 PM
Tried to delete file as root but it says I don't have permission to delete it! beejayzed Mandriva 23 03-12-2004 02:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:22 PM.

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
Open Source Consulting | Domain Registration