I have been using Vim, and I would really like to save my settings. The problem I am having is that I cannot find my .vimrc file, and it is not in the standard /home/user/.vimrc
location. How might I find this file?
The global or system-wide vim configuration file is generally located under the /etc/vim/vimrc . This configuration file is applied to all users and when Vim is started this configuration file is read and Vim is configured according to this file contents.
Vim Configuration Files: Vim can be configured system wide (globally) via the /etc/vim/vimrc. local file on Ubuntu/Debian based operating systems. On CentOS 7 and RHEL 7, the system wide configuration file for Vim is in /etc/vimrc.
On Windows, when you start Vim normally, it *either* runs the file "C:\Documents and Settings\(user name)\_vimrc" (where "(user name)" is replaced by the actual user name); *or*, if that file doesn't exist (it usually doesn't, for most users), it runs the file "C:\Program Files\vim\_vimrc".
You need to create it. In most installations I've used it hasn't been created by default.
You usually create it as ~/.vimrc
.
These methods work, if you already have a .vimrc file:
:scriptnames
list all the .vim files that Vim loaded for you, including your .vimrc
file.
:e $MYVIMRC
open & edit the current .vimrc that you are using, then use Ctrl + G to view the path in status bar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With