LinuxQuestions.org
Help answer threads with 0 replies.
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 08-08-2004, 07:48 PM   #1
cambie
Member
 
Registered: Jul 2004
Posts: 90

Rep: Reputation: 15
vi problem


I posted this in the newbie section because I have a feeling it's a silly question, but I can't seem to figure it out. I do however have some knowledge about Linux.

Anyway, in Fecora Core 2, I am having problems using VI. For instance, if I vi /etc/passwd, it will open up fine and display the file. If I enter into insert mode by pressing a, I can type any actual letter keys and numbers. However, my backspace key and nore delete key work. Backspace just moves the curso back, returning me to command mode, delete seems to change lowecase letters to upper case and return me to cmmand mode.

What is causing this? DId my keyboard map get messed up? I don't remember having this problem in RHEL3, which is what I have more experience in at the moment.
 
Old 08-08-2004, 07:57 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Is FC using vi or vim when you fire up vi?
Chances are that your .vimrc from RH differs
from what you have right now :)

That aside: I also tend to think of vi as a problem ;)



Cheers,
Tink
 
Old 08-08-2004, 08:12 PM   #3
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
Not 'normal' vi behaviour to me. Something's not right. You should obviously be able to backspace and delete... I'm in MDK BTW...
 
Old 08-08-2004, 09:50 PM   #4
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
If you are doing something simple it is hard to beat good old nano -w /what/isthe/filename.
 
Old 08-08-2004, 10:22 PM   #5
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Re: vi problem

Quote:
Originally posted by cambie
. I do however have some knowledge about Linux.

.
OH yea, then why are you editing /etc/passwd by hand.......you should know this is NOT very smart at all............

you may need an .Xmodmap file.............

Quote:

# In versions of XFree86 prior to 4.3.0, a .Xmodmap file was required in
# this directory in order to make the backspace key function correctly.
# This does not seem to be needed any longer, but if you notice problems
# with the backspace key, you might want to try it.

# Old .Xmodmap follows:

keycode 22 = BackSpace
 
Old 08-08-2004, 10:57 PM   #6
jax8
Member
 
Registered: Feb 2004
Location: Australia
Distribution: Ubuntu, Fedora 10
Posts: 632

Rep: Reputation: 31
go into command mode and press

x


this will delete.
 
Old 08-08-2004, 11:09 PM   #7
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
Yep, we know you can do that, but it makes it nice if you can use the del and backspace while in insert mode...
 
Old 08-08-2004, 11:16 PM   #8
cambie
Member
 
Registered: Jul 2004
Posts: 90

Original Poster
Rep: Reputation: 15
Re: Re: vi problem

Quote:
Originally posted by 320mb
OH yea, then why are you editing /etc/passwd by hand.......you should know this is NOT very smart at all............

you may need an .Xmodmap file.............
Thanks for the tip. I am not editing /etc/passwd by hand, it was just an example. It does it for any file I open up in vi (actually, vim), I just happened to throw that particular file out there when typing my question. Forgive me.

Also, it is vim that is installed, not actually vi. I've been able to work around this for the most part by switching back and forth in command mode, but it's getting to be a pain.
 
Old 08-08-2004, 11:38 PM   #9
rkdugar
LQ Newbie
 
Registered: Jul 2004
Posts: 13

Rep: Reputation: 0
quote:
--------------------------------------------------------------------------------
Originally posted by cambie
...
Backspace just moves the curso back, returning me to command mode, delete seems to change lowecase letters to upper case and return me to cmmand mode.
...
--------------------------------------------------------------------------------

Open the vimrc file in the /etc directory:

vi /etc/vimrc

Add the following entry in the vimrc file:

set nocompatible

Now you save the vimrc file and try to edit some other file. Now ur problem of backspace and delete should not exist...

Cheers,
rkdugar
 
  


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
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM


All times are GMT -5. The time now is 07:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration