Difference between .vimrc and .exrc? | Unix Linux Forums | Shell Programming and Scripting

  Go Back    

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

Difference between .vimrc and .exrc?

Shell Programming and Scripting

Closed Thread    
Thread Tools Search this Thread Display Modes
Old 03-15-2013
adisky123 adisky123 is offline
Registered User
Join Date: Oct 2012
Last Activity: 23 December 2013, 5:57 AM EST
Posts: 58
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?

Sponsored Links
Old 03-15-2013
DGPickett DGPickett is offline Forum Advisor  
Registered User
Join Date: Oct 2010
Last Activity: 17 February 2015, 1:56 PM EST
Location: Southern NJ, USA (Nord)
Posts: 4,671
Thanks: 8
Thanked 583 Times in 557 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
Old 03-16-2013
hanson44 hanson44 is offline
Registered User
Join Date: Mar 2013
Last Activity: 12 May 2013, 11:33 PM EDT
Posts: 858
Thanks: 18
Thanked 180 Times in 177 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
Closed Thread

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 04:22 AM
editing crontab with vim and using .vimrc duc904 Solaris 2 12-21-2009 05:03 AM
URGENT : vi doesn't read my .exrc inditopgun Shell Programming and Scripting 1 08-07-2009 12:26 AM
.exrc is not working SasDutta UNIX for Dummies Questions & Answers 12 02-05-2009 08:10 PM
VIMRC question ???? gk_linux Shell Programming and Scripting 6 01-19-2007 08:00 AM

All times are GMT -4. The time now is 08:27 PM.