Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
2 years, 5 months ago
I'm re-learning Vim, and now I'm building my own
~/.vim/.vimrc file. Yes, it is store under the
.vim/ folder, which is created by MacOSX after I updated to Big Sur. What I want is simply this
when I put this line in
~/.vimrc it works, while in
~/.vim/.vimrc it's not. So my questions are:
What's the first file Vim read so it knows
Oh, so Mr. .vimrc your home is at ?
Which file should I change so that Vim will say
Ok, I should read Mr. .vimrc from ?
Jan 3, 2021 at 14:27
1,200 8 8 silver badges 25 25 bronze badges
1. For the first question
According to the help menu (see
:help $MYVIMRC), vim will look for a user vimrc in specific places. It look first for
~/.vimrc and then for
~/.vim/vimrc. Vim stops searching after the first one found (that's why we need to remove
Vim will set automatically the
$MYVIMRC environment variable to the location of the vimrc used.
2. For the second question:
Put your vimrc content in
~/.vim/vimrc (you must remove the
vimrc instead of
D. Ben Knoble ♦
24k 3 3 gold badges 27 27 silver badges 61 61 bronze badges
Jan 3, 2021 at 15:12
To solve the error "no .vimrc found. please set "vim.vimrc.path", you will need to create a configuration file for the Vim text editor called ".vimrc" and specify its location.
Here's how to do it:
Open a terminal window and navigate to your home directory:
Create a new file called ".vimrc" using the touch command:
Open the ".vimrc" file in a text editor.
Add the following line to the ".vimrc" file, replacing "path/to/.vimrc" with the actual path to the ".vimrc" file:
Save the ".vimrc" file and exit the text editor.
Dec 19, 2022 at 19:27
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only
:h vimrcand read what is written there?