Unix/Linux Go Back    

Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Difference between .vimrc and .exrc?

Shell Programming and Scripting

Thread Tools Search this Thread Display Modes
Old Unix and Linux 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 Unix and Linux 03-15-2013
DGPickett DGPickett is offline Forum Advisor  
Registered User
Join Date: Oct 2010
Last Activity: 1 February 2016, 3:35 PM EST
Location: Southern NJ, USA (Nord)
Posts: 4,673
Thanks: 8
Thanked 587 Times in 560 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: https://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 Unix and Linux 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 183 Times in 178 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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 10:10 AM.