LinuxQuestions.org
Register a domain and help support LQ
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, 03: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, 03: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, 03:28 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

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

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
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, 04: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, 05:05 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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, 05:13 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
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, 05: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


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


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