Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-15-2013
Registered User
 
Join Date: Oct 2012
Posts: 47
Thanks: 5
Thanked 0 Times in 0 Posts
Difference between .vimrc and .exrc?

What is the difference between .vimrc and .exrc? I google it but didn't find the brief explanation?

Regards
ADI
Sponsored Links
    #2  
Old 03-15-2013
Registered User
 
Join Date: Oct 2010
Location: Southern NJ, USA (Nord)
Posts: 3,786
Thanks: 8
Thanked 469 Times in 449 Posts
Well, .exrc was established by the original ex before there was a vi. The name vi means visual ex. The name ex means extended ed: http://www.unix.com/man-page/All/0/ed/ When the open source people wrote vi replacements, notably vim, they had the option to make additional configuration files for options in vim that are not ex/vi compatible. It is a bit like sh, ksh, bash, relative to .profile , $ENV, /etc/profile, /etc/suid-profile, .kshrc, .bashrc, .bash_profile, .bash_login.

The man page lists a bushel of config files down at the end: Man Page for vim (all Section 0) - The UNIX and Linux Forums
Sponsored Links
    #3  
Old 03-16-2013
Registered User
 
Join Date: Mar 2013
Posts: 858
Thanks: 18
Thanked 179 Times in 176 Posts
They have the same purpose.

Only vim looks for $HOME/.vimrc file. vim can also use $HOME/.exrc file, as can any vi editor.

Only one of $HOME/.vimrc and $HOME/.exrc is read by vim, whichever it finds first. To prevent confusion, I would suggest just use one file, and delete the other one.

I just use $HOME/.exrc file and do not have the $HOME/.vimrc file.
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
vimrc help with line endings cokedude UNIX for Advanced & Expert Users 2 08-11-2011 03:22 AM
editing crontab with vim and using .vimrc duc904 Solaris 2 12-21-2009 04:03 AM
URGENT : vi doesn't read my .exrc inditopgun Shell Programming and Scripting 1 08-06-2009 11:26 PM
.exrc is not working SasDutta UNIX for Dummies Questions & Answers 12 02-05-2009 07:10 PM
VIMRC question ???? gk_linux Shell Programming and Scripting 6 01-19-2007 07:00 AM



All times are GMT -4. The time now is 12:46 PM.