vim woes

vim woes

Post by Donald H. Gudehu » Tue, 30 Jan 2001 12:21:53



Hello,

After applying the Redhat patch for the vi editor, I found that
if I logged in as superuser and used vi, the backspace key would
no longer delete characters (it just produced ^?).  Although my
initial terminal window did not have this problem, after exiting
from superuser, it adopted this problem as well.  Entering "man vi"
I discovered that I now had a different editor, vim.  This stands for
"vi improved" or "vi imitation" for the more cynical.  More
information can be gleaned by entering "vi" followed by ":help".
I learned that this beast could be tamed by using a .vimrc file.
After a long read through the help documentation I discovered
buried in the depths of this tome, that a .vimrc file can be created
by entering ":mkv".  (This was located in the "options.txt", one of over

150 files and sections.)  Unfortunately, this command just puts in
writing the undesired attributes that I had just discovered.
Furthermore, the .vimrc file contained the line "set textwidth=78",
which now caused the line to break after 78 characters, something else
I had not asked for.  Inserting a "#" before this line had no
beneficial effect because the writer of vim decided that a new standard
for a comment was necessary;  one must use a double quote.
It seemed that the backspace key problem was a key mapping problem.
Using Google search, I came across the site
http://aterm.sourceforge.net/keyboard.html which mentioned using
:help fixdel.  This section mentioned the command
:set t_kb=^V<DEL>
(note that ^V is control V and <BS> is the delete key)
Saving this in .vimrc gives the line
imap [CTRL-BS] [CTRL-DEL]
However, using vi as su with a modified .vimrc file in /root still gave
the same problem.  Why does vim have this problem?  The documentation
mentions the following:

              Note about Linux: By default the backspace key
              produces CTRL-?, which is wrong.  You can fix it by
              ...

So the author designed vim to be at odds with the default Linux.

Does anyone have any ideas on how to get vim with su to behave as the
default Linux?

All answers appreciated.

Donald Gudehus

 
 
 

vim woes

Post by Donald H. Gudehu » Thu, 01 Feb 2001 12:18:46


Here is what is use for my .vimrc file in my home directory:

version 5.3
set nocompatible  " Prevents vim from producing unwanted characters in
insert mode when the
                              " arrow keys are pressed
"set formatoptions=tcq2  " We don't want them so is commented out
imap [CTRL-BS] [CTRL-DEL] " Fixes Backspace key problem
"set iskeyword=!-~,^*,^|,^\" " This gives an error so is commented out
set readonly   " Irrelevant
set textwidth=0   " Prevents vim from imposing absolute width constraints
set wrapmargin=0  " Prevents vim from imposing width constraints as a
function of the window width

To solve the su problem I use "su -m" instead of just plain "su".

Donald


> Hello,

> After applying the Redhat patch for the vi editor, I found that
> if I logged in as superuser and used vi, the backspace key would
> no longer delete characters (it just produced ^?).  Although my
> initial terminal window did not have this problem, after exiting
> from superuser, it adopted this problem as well.  Entering "man vi"


 
 
 

1. CD-RW mounting woes in Mandrake 7.0 woe oh woe oh woe!

I hate to ask the often answered, but I have a TDK VeloCD CD-RW in my PII
233 machine installed as a master on the secondary IDE. I'm running
Mandrake-linux 7.0, and of course I get the bad link problem. I have run the
fix suggested on Mandrake's Web-page, but I can't figure a way to make the
fix either permenant or automatic. The fix (in case you haven't seen it is
to run "cdrecord -scanbus" to check for the presence of a working CD-RW,
then to type "cd /dev && rm cdrom && ln -s scd0 cdrom" in a terminal) This
fix works but there's got to be a better way...any thoughts.

2. Symbios SYM53C896 based cards...

3. VIM: Is this a bug of "vim" ?

4. persistent caching DNS

5. VIM ques: Using mouse for copy & paste in vim

6. Sound problems in DOOM !?

7. XF86 Config set-up woes & woes & woes

8. /etc/printcap entries

9. net-2 woes (was upgrade woes)

10. /bin/bash -c 'vim !(CVS)' doesn't work while vim !(CVS) does work

11. a quiestion about vim

12. VIM on AIX

13. Changing colour scheme in VIM