LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-15-2004, 02:22 PM   #1
PlatinumRik
Member
 
Registered: Feb 2003
Location: Buffalo, NY
Distribution: Novell Linux Desktop
Posts: 159

Rep: Reputation: 30
start vim when vi is typed


what file do i need to edit to allow vim to be started when i type in vi at the command line instead of vim???

Thanks

Rick
 
Old 03-15-2004, 02:28 PM   #2
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
edit either your .bashrc file (in your home dir) or /etc/profile (mind, that won't effect x-terms) and add the line:
Code:
alias vi='vim'
 
Old 03-15-2004, 02:28 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Or you can create a symlink as well..
 
Old 03-15-2004, 02:33 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Did you install vim?? Suse (6,7,8) had vi linked to vim, that's why I ask.

If vi is installed:
move /usr/bin/vi to /usr/bin/vi.org
mv /usr/bin/vi /usr/bin/vi.org

Link vi to vim
ln -s /usr/bin/vim /usr/bin/vi

You can always go back to vi. Just remove the link and rename vi.org to vi.

Hope this helps.
 
Old 03-15-2004, 03:42 PM   #5
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by druuna
Did you install vim?? Suse (6,7,8) had vi linked to vim, that's why I ask.
but then Slackware doesn't. They link vi to elvis! God that's awful...
 
Old 03-15-2004, 04:05 PM   #6
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
Quote:
but then Slackware doesn't. They link vi to elvis! God that's awful...
Yep ... they REALLY should link both to pico :D


Cheers,
Tink
 
Old 03-15-2004, 04:13 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by Tinkster
Yep ... they REALLY should link both to pico


Cheers,
Tink
Pico! acid_kewpie uses pico! Never... I will never use pico.. its just.. way to easy
 
Old 03-15-2004, 04:24 PM   #8
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Quote:
Originally posted by trickykid
Pico! acid_kewpie uses pico! Never... I will never use pico.. its just.. way to easy
I had to use pico to edit my initial .vimrc file just to make vim usable...can't STAND vi compatibility.
 
  


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
Linuxconf didn't show up when i typed in the terminal and problems with samba ineth Red Hat 1 10-22-2005 04:44 PM
slack 10, I can see the chinese I've typed in shell, but when issue: ls sirpelidor Slackware 4 01-26-2005 10:55 AM
why bootsplash can't work with cpio-typed initrd kyven zhang Linux - Software 0 01-13-2005 07:47 AM
how to see typed commands with date? vaoc Linux - Security 1 08-06-2004 01:43 PM
show all terminal typed commands joulupukki Linux - Newbie 6 05-10-2004 04:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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