// troubleshooting guide · vim

Vim vimrc Not Loading (Settings Ignored)

Status
Workaround available
platforms:
Linux, macOS, WSL
updated:
November 23, 2026
reports:
4
Method
how we research
Share

RUNBOOK · vim/vimrc-not-loading3 FIXES

// quick answer

Vim loads only the first vimrc it finds: ~/.vimrc, then ~/.vim/vimrc, then ~/.config/vim/vimrc (XDG, since 9.1.0327). Run :echo $MYVIMRC to see which one is used and keep only one.

Most likely fix: Check which vimrc is loaded

How to fix it

// try these in order, the most common fix is first

  1. FIX 1Check which vimrc is loaded

    1. 01Run :echo $MYVIMRC inside Vim
    2. 02Run :scriptnames to list every sourced script
    3. 03Run :version and read the user vimrc file lines for the search order
    Did this fix it?
  2. FIX 2Keep one vimrc

    1. 01Move or delete the copies you do not use (for example mv ~/.vimrc ~/.vimrc.bak to use the XDG one)
    2. 02Note that the runtimepath switches to ~/.config/vim only when the XDG vimrc is the one found
    3. 03Restart Vim, or run :source $MYVIMRC after edits
    Did this fix it?
  3. FIX 3Use your config with sudo

    1. 01Edit system files with sudoedit file (or sudo -e), which runs your editor with your own settings
    2. 02Alternatively copy your vimrc to /root/.vimrc
    Did this fix it?

SANDBOX · vim RUNS IN YOUR BROWSER

Try it: write a commit message in Vim (and get back out)

A hands-on Vim-style sandbox, including the spots where users get stuck. See where problems like this one start. 1-2 minutes, nothing is saved.

Symptoms

Changes in your vimrc have no effect; settings in ~/.config/vim/vimrc are ignored; sudo vim or vi uses different settings.

Why it happens

  • C-01An older ~/.vimrc or ~/.vim/vimrc shadows the XDG file in ~/.config/vim/vimrc
  • C-02Vim older than 9.1.0327 does not read ~/.config/vim at all
  • C-03sudo vim reads root's vimrc, not yours
  • C-04vi is a tiny build that ignores most settings
  • C-05Vim was started with -u NONE or another -u file

// this guide also covers

  • vimrc not loading
  • vim not reading vimrc
  • vim ~/.config/vim/vimrc
  • vimrc changes not working

Still not working?

If Vim keeps failing, you're not alone. See every Vim problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us

Watch Vim Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other Vim errors

All 17 Vim errors and fixes →