LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-08-2003, 02:29 AM   #1
e1000
Member
 
Registered: Oct 2003
Location: California
Distribution: Ubuntu
Posts: 582

Rep: Reputation: 30
Vi Problem


ok, when i type say "vi /home/*user*/newdoc.txt"
or when i edit an already made file
it will come up with a blank or already full VI window, right?

so then I pres "i" for insert mode I am able to insert text as normal but anyways, if I press "backspace" the cursor will moove backwards but wont delete anything, if i press "delete" immeadetly after pressing "backspace", it will change the case of the leter the cursor is over, then if i "delete" it again it might moove foward and change the case of the next letter, or it might just do nothing and the comp will beep. if i press "delete" without having recently presed "backspace" nothing will hapen and the computer will beep. (this problem is hard to describe cause it changes alot, but is always on the basic line of what i have said here)

i have the same problem is gvim, and in xedit the delete key works the same as the backspace key, it just removes the character to the left of the cursor.

when im typing in mozilla, or GAIM, i dont have these problems and delete and backspace work as normal, does anyone know what is hapening or how to fix it?
 
Old 11-08-2003, 04:44 AM   #2
quietguy47
Member
 
Registered: Mar 2003
Location: Everett
Distribution: Slackware
Posts: 805

Rep: Reputation: 35
http://www.fprintf.net/vimCheatSheet.html
 
Old 11-09-2003, 01:33 AM   #3
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
By default in Slackware 9.1, vi actually links to elvis, so when you run vi you are actually running elvis not vi. I don't recall if gvim is the same way or not, but it sounds like it from what you're describing. Anyway, have a look in the /usr/bin directory. You'll see the link like so:

Code:
root@slack:~# ls -l /usr/bin/vi
lrwxrwxrwx    1 root     root            3 Oct 26 03:13 /usr/bin/vi -> elvis*
Redo the link so that it points to vim instead of elvis. You'll also need setup .vimrc files for your users if you want color and etc. Maybe stick a default one in /etc/skel/ as well, so they get created when you create new users.
 
Old 11-09-2003, 02:22 AM   #4
e1000
Member
 
Registered: Oct 2003
Location: California
Distribution: Ubuntu
Posts: 582

Original Poster
Rep: Reputation: 30
you were right about the link to elvis, so i changed that, now my delete key works as it should, but the backsapce key still just mooves the cursor backwards without deleting stuf.

plus if i press "i" and then try to navigate around the document using the aarows on the keyboard it will do the fallowing; if i press "up" it will make a new line above the line I'm currently in and type out capital "A" if i press doun it will make a new line and type out a capital "B", right: same thing and "C", left is "D"
 
Old 11-09-2003, 03:03 PM   #5
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Is the --INSERT-- coming up at the bottom of the screen when type "i"? Are you sure you made the new link correctly? It should look like this:
Code:
root@slack:~$ ls -l /usr/bin/vi
lrwxrwxrwx    1 root     root            3 Oct 26 03:13 /usr/bin/vi -> vim*
Or like this, if you are in the /usr/bin directory:
Code:
root@slack:/usr/bin$ ls -l vi
lrwxrwxrwx    1 root     root            3 Oct 26 03:13 vi -> vim*
If not, then you can make it by removing the old link first, then remaking it. Like so:

Code:
root@slack:~# cd /usr/bin
root@slack:/usr/bin# mv vi vi.old
root@slack:/usr/bin# ln -s vim vi

Then make sure it's there:
root@slack:/usr/bin# ls -l vi
lrwxrwxrwx    1 root     root            3 Nov  9 14:57 vi -> vim*
I did a mv "move" instead of a rm "remove" above, simply out of habit. Once you've confirmed everything is as it should be, then you can go back and "rm vi.old". Test it by simply typing "vi", no quotes. You should see the vim screen come up that looks like so:
Code:
~                              VIM - Vi IMproved
~
~                                version 6.2.98
~                           by Bram Moolenaar et al.
~                 Vim is open source and freely distributable
~
~                        Help poor children in Uganda!
~                type  :help iccf<Enter>       for information
~
~                type  :q<Enter>               to exit
~                type  :help<Enter>  or  <F1>  for on-line help
~                type  :help version6<Enter>   for version info

Last edited by DaHammer; 11-09-2003 at 03:05 PM.
 
Old 11-09-2003, 09:00 PM   #6
linuxJaver
Member
 
Registered: Jul 2003
Location: Jakartax, ID
Distribution: slack9.1+,9.1,rh9
Posts: 203

Rep: Reputation: 30
Make clear that there are modes in vi/vim
switch between mode is toggled by "ESC"
after vim is started u r on command mode, to insert press i then u r on insert mode
the key binding on insert mode r diffent than in command mode.

the best to begin with vim is learnign by doing like u do now, but
it helps to read some doc, see /usr/share/vim/vim62/{doc,tutor}

It used to be some tutorial for "vi", try a googling ..

It is kinda harder to begin with vi, but it allows fast navigation
through the text once one get confortable with vi/vim. Vi is the
editor with high availability on unix platforms. So once u got to
edit something with the "slack rescue disk", vi is the only editor.
Vim is alot advanced than other vi-clones.

If u still get used to notepad scene, try gvim, it is abit easier bcoz
u can do something with mouse (copy,pasta..).
 
Old 11-10-2003, 08:49 PM   #7
e1000
Member
 
Registered: Oct 2003
Location: California
Distribution: Ubuntu
Posts: 582

Original Poster
Rep: Reputation: 30
look, i know about presing "i" and esc for the modes.
but i still have a problem, when i press "i" to get into insert mode, there are 2 problems,

1. backspace only mooves the cursor backwards, NOT removing characters, just moving over them as if i was presing the left aarow.

2. if i use the aarows while in insert mode, it inserts the text as described a few posts up. does anyone have a similar problem?

PS. if i type vi as a command it does give me that screen that talks about vim, so I know that i am in vim.
 
Old 11-11-2003, 02:58 AM   #8
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
Are you running VI in an Xterm (aterm,eterm,rxvt,...) or do you have this problem on the command line? It could be that your terminal settings aren't correct.

Enjoy!
--- Cerbere
 
Old 11-11-2003, 03:17 AM   #9
Glock Shooter
Member
 
Registered: Jan 2002
Location: Riverside, CA
Distribution: Slackware Convert!!
Posts: 210

Rep: Reputation: 30
I had the same problem. I have always used RedHat, and the VIM in slack is different, or more likely the VIM in RedHat is not VIM. Use this as your .vimrc

http://www.stripey.com/vim/vimrc.html
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:51 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