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 01-16-2004, 09:12 AM   #1
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Rep: Reputation: 30
vi - Config Help?


I think this is going to drive me nutty, I grew up on vi on a Redhat machine (7.0, 7.1, 7.2, 7.3, 8.0, 9.0) And they all work the same, if I want to edit text I hit "a" and I can add text, delete text, it is in insert mode not overwrite.

Now on slackware when I hit "a" I can add text but the backspace key does not delete the text, I also cannot get rid of new lines if I hit enter 1 time to many.

All I want is for the backspace key to actually delete text when I am in insert mode, can somebody help me with that before I trash slackware for the simple reason that I cannot use vi?

I spend half of my day in vi and this is driving me nuts.
 
Old 01-16-2004, 09:24 AM   #2
nesware
Member
 
Registered: Jan 2004
Location: belgium
Distribution: Slackware
Posts: 117

Rep: Reputation: 15
'vi' in slackware is actually a softlink to 'elvis'
try whether it's 'vim' that has your way of working...

another thing that i came along it the env TERM=xterm
in rxvt or aterm my vi didn't show the file cos TERM wasn't set to xterm but to rxvt

else try to install the redhat vi... rpm2tgz will convert your rpm file then installpkg viinstallfile.tgz and see if it works... you might want to remove the elvis package b4 u try that though... only do this if all else fails!!!

cheerz
 
Old 01-16-2004, 09:34 AM   #3
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Original Poster
Rep: Reputation: 30
How nasty of them to think I want to use elvis! I looked and my term is xterm which is what I am used to. Also I have tried to use vim but when I use my arrow keys it types A or B or C or D and then makes a newline.

I don't know I am getting ready to start dragging this computer to a close window and doing a little "Drag and Drop" with it.

Can I change vim to let me use my arrow keys in the way they were intended to be used, you know to move around in the file?
 
Old 01-16-2004, 11:22 AM   #4
Lohan
LQ Newbie
 
Registered: Jan 2004
Location: Brooklyn
Distribution: Slackware 9.1, Kernel 2.6.0
Posts: 11

Rep: Reputation: 0
Okay, I'm not going to be a great amount of help, other than to say that if you do ':help' and poke around a little bit, the help file _does_ mention a way to change the behavior of your backspace key.

I use vim and the arrow keys work exactly the way they're supposed to, and I haven't changed anyting... But you could try remapping them to h, j, k, l (left, up, down, right)... details on remapping keys -- also in an unspecified location in the help file.

Sorry I can't be more help than that... I am sort of a newbie.
 
Old 01-16-2004, 11:29 AM   #5
nesware
Member
 
Registered: Jan 2004
Location: belgium
Distribution: Slackware
Posts: 117

Rep: Reputation: 15
well... try installing a redhat package the way i told u and see if it's any different... maybe it's a conf file or some...

about the backspace not deleting text, that's just visibility... if you type something and then press backspace, hit esc.. all the text will disappear then..
i spend a lotta time in vi to... just get used to hitting esc dd :-)

if you need overwrite mode use R
 
Old 01-16-2004, 11:40 AM   #6
jhorvath
Member
 
Registered: Sep 2002
Location: OH, USA
Distribution: 2.6.16-1.2096_FC5 #1
Posts: 245

Rep: Reputation: 30
by default it's using builtin hardcoded config i believe...so backspace dont werk as you'd hoped. do a , `cd /usr/share/vim/vim61` and `cp vimrc_example.vim ../vimrc` or you can copy it to your home directory as ~/.vimrc ..that'll take care of backspace and add colors WOOHOO.. now you also have a config file you can mess with and change stuff... (i cant remember if the backspace is set up so you can backspace everything..but look for a line labeled "set backspace=", for example mine reads "set backspace=indent,eol,start" , and works fine i think)

as for the arrow keys not moving..<?> not sure what happened there.

on a side note...if you use vim more than vi...just delete the /usr/bin/vi symlink and relink vim to vi..then if you need to use vi just type `elvis` (i prefer to type vi than vim ..saves me a letter

--jeremy

Last edited by jhorvath; 01-16-2004 at 11:58 AM.
 
Old 01-16-2004, 12:00 PM   #7
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Original Poster
Rep: Reputation: 30
Thank you ever so much! I copied over the vimrc_example.vim and it works just the way I was familier with, I figured it would be something like that but the documentation seems to be lacking there. I tried the redhat rpm of vi and that didn't work very good at all, I came up with some problems I have never seen in vi.

I use vi hours a day but I only use the very simple stuff like searching for text going to certain line numbers in a config file and stuff like that so when something breaks I don't have a clue.

Thank you for makeing my life better, I have been thinking of moving from RedHat to Slackware for my servers as they seem to run a good bit more efficient, also redhat has been doing some odd things with there new releases, I know they are better for the gui's but I don't care a bit about a gui as my life is at the command line.
 
Old 01-16-2004, 12:06 PM   #8
jhorvath
Member
 
Registered: Sep 2002
Location: OH, USA
Distribution: 2.6.16-1.2096_FC5 #1
Posts: 245

Rep: Reputation: 30
as far as gui (and i much prefer simplicity and stability over beautification as well), slackware has dropline gnome...it's a seperately managed project. basically a constantly updated gnome for slackware...pretty nice looking as well.. just in case you are interested.

(personally, i stick with an empty fluxbox desktop)

--jeremy
 
Old 01-16-2004, 12:41 PM   #9
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Original Poster
Rep: Reputation: 30
I run one machine that has a gui on it, for that machine I just don't care what it is, I like having virtual desktops as I tend to have 6 to 8 desktops, one for each of my servers then I always have a xterm into each server and I keep one desktop to be my FireBird browser, Zend Studio, and other odd apps. I rebuild my gui machine every couple of months trying new things, like I am thinking of giving gentoo a try in a couple of weeks.
 
Old 01-16-2004, 01:54 PM   #10
nesware
Member
 
Registered: Jan 2004
Location: belgium
Distribution: Slackware
Posts: 117

Rep: Reputation: 15
I've tried a RedHat server couple a weeks ago... some times it just kinda hangs... there's a great amount of hdd activity, but it's not updatedb or something.. `top` shows no active processes.. kinda felt like going back to a windows computer... so i reinstalled slackware... Slackware is a bit harsh sometimes... but if you get used to how things work you'll love it.. just cos it's so simple.... i've considered RedHat for a couple a workstations and advise friends SuSE and Mandrake if they want to change to Linux from Windows... but for a server, Slackware is the thing you want to have...
subscribe to the Slackware Linux slackware-security mailing list for... well you know, for what it is
 
Old 01-16-2004, 02:13 PM   #11
cli_man
Member
 
Registered: Apr 2002
Location: New York, USA
Distribution: Redhat 7.2, 9.0 Slackware 9.1
Posts: 428

Original Poster
Rep: Reputation: 30
I try to use the same distro's for my servers but all I do is a base install and then install everything else from source. The switch to slackware has been almost painless as I have been doing everything from source and it has been a nice change to have the files in the correct place to start with (Redhat has some odd file locations)

I like the fact that the slackware install lets me do a much more basic install so I don't have so much junk to keep track of for updates and bugs.

I have just been using the free version of Redhat, I am doing the build mostly by hand so having support won't do much for me.
 
Old 01-16-2004, 04:42 PM   #12
dirstyGuy
Member
 
Registered: Jan 2004
Posts: 67

Rep: Reputation: 15
Try to compose ur own ~/.vimrc (maybe also ~/.gvimrc) from that u copied from /usr/share/vim/vim62 and compare to the ~/.vimrc u used on redhat. I always do this frequently:

cd /; tar -cvf - /root | bzip2 -c > /pathToSomeWhere/root.tbz2

So whenever u make a new install u can have those configs u had b4 by:
cd /; bzip2 -dc /pathToSomeWhere/root.tbz2 | tar -xvf -

Cleaner would be to have the same root partition between the various partition of slackwares. To use the same /root for redhat and slackware is abit nasty, bcoz bash is compiled with different priority of reading of resource files (/etc/bashrc,/etc/profile, ~/.bash_profile,~/.bashrc) in redhat than it is compiled in slackware ..

At least it is harmless if u make a symbolic link for ~/.vimrc from /root from one partition to another. Don't try to symbolic link /etc/{inittab,fstab,mtab} to another partition, that apply to files in /sbin (all files that are used to bring up the system shouldn't be in their own partitions differs to /)..

Last edited by dirstyGuy; 01-16-2004 at 04:45 PM.
 
Old 01-16-2004, 04:44 PM   #13
nesware
Member
 
Registered: Jan 2004
Location: belgium
Distribution: Slackware
Posts: 117

Rep: Reputation: 15
do you know about the tag files yet?
if you have a lotta servers and do many installs... you can create a tag file, a file with all the packages you need. you don't need to select your packages every time you install a new server just load the package file. heaps a docs to find around on the net

another nice thing is, after the install and config you come back to the console.. need some fine tuning? you can do it before you reboot

have fun dude and learn the slackware trade :-)
 
Old 01-16-2004, 05:09 PM   #14
dirstyGuy
Member
 
Registered: Jan 2004
Posts: 67

Rep: Reputation: 15
I've the script for copying the tagfiles into a dir, I edit those tagfiles first b4 finnaly copied them into floppy. 2 days ago I installed by selecting tagpath from the slackware current source tree, I got many dependencies problem with modules from /usr/lib/2.4.23. But that is nothing related to tagpath way of install, it is the current-tree is not clean enough. N honestly I find installing through "expert mode" more confortabler than editing tagfiles, it got GUI to select packages, but for installing many servers it is other story ..

Code:
#!/bin/sh
#
# file: ~/sbin/copyTagFiles.sh

FLOPPY=/mnt/floppy
SRC_DIR=/home/ftp/slw/current/slackware
TRG_DIR=/root/sbin/tagFiles/tagfiles
#TRG_DIR=$FLOPPY/tagfiles

PKG_DIR="a ap d e f gnome k kde kdei l n t tcl x xap y"

[ -x $TRG_DIR ] || {
  echo -e "\n\t$TRG_DIR not exist, possibly floppy not mounted!"
  exit
  # mkdir $TRG_DIR
  # mount -t vfat /dev/fd0 /mnt/floppy
}

for i in $PKG_DIR; do
  [ -x $SRC_DIR/$i ] && {
    mkdir $TRG_DIR/$i;
    cp $SRC_DIR/$i/tagfile $TRG_DIR/$i/tagfile;
  }
done

cat <<EOF

During Slackware setup go through it until you reach the Package Series Selection s
tage, where you get to pick whatever package you want to install. Pick them all.

Continue on and you'll reach the Select Prompting Mode. When you get here, choose t
he option "tagpath". This will allow you to specify the directory where you current
ly have your custom tagfiles in.

When you are asked to provide the path to your tagfiles, press Alt-F2. This will ta
ke you to virtual screen two. Login as root, and mount your floppy disk:

mount -t vfat /dev/fd0 /mnt/floppy

Now press Alt-F1 to return to the menu screen. In the place where you need to enter
 the path to your tagfiles, type:

/mnt/floppy/tagfiles

Push "OK" and the installation should begin without prompting you for what packages
 you want. Go grab a cup of coffee or something.

--
That text was copied from somewhere, forget the source, my solution:
After up with the booting into linux with bare.i,install.1,install.2 then, change i
mmediately the intall.2 with tagfile diskett, do the "mount -t vfat /dev/fd0 /mnt/f
loopy" b4 u enter "setup", select tagpath like above ..
EOF
 
Old 01-25-2004, 10:54 PM   #15
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
aaaaye I was searching for this answer since a long time I should have asked there before.
I'm using Linux/Slackware since a long time and haven't used vi (elvis?) much, I prefer emacs. But I just got a job where I should use vi and only vi

That backspace thing were annoying thank you very much
 
  


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
Sendmail - Config for IP Block's & Config Issues Thom_Redhat Linux - Software 1 04-07-2006 01:29 PM
I have an XF86 config file for video, how do I turn it into XORG config lowpingnoob Linux - Newbie 18 06-12-2005 12:07 PM
Webmin cannot handle Samba config files that use the config or include directives allelopath Linux - Networking 3 01-18-2005 09:36 AM
krfb --config; Format of config file? Need to allow ports below 1024. SavvyPlayer Linux - Software 0 10-16-2004 08:28 PM
possible samba config problem or network config issue? rruffin Linux - Networking 3 06-03-2003 04:04 PM

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

All times are GMT -5. The time now is 01:25 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
Open Source Consulting | Domain Registration