// troubleshooting guide · vim
Vim Syntax Highlighting Not Working
- Status
- Workaround available
- platforms:
- Linux, macOS, WSL
- updated:
- November 23, 2026
- reports:
- 5
- Method
- how we research
RUNBOOK · vim/syntax-highlighting-not-working3 FIXES
// quick answer
Usually your system ships vim-tiny (or vi), which has no syntax support at all. Install the full vim package, then make sure your vimrc has syntax on and filetype plugin indent on.
Most likely fix: Install the full Vim
How to fix it
// try these in order, the most common fix is first
FIX 1Install the full Vim
- 01Run vim --version and look for +syntax or -syntax
- 02On Debian/Ubuntu: sudo apt install vim (replaces vim-tiny)
- 03On Fedora/RHEL: sudo dnf install vim-enhanced, then run vim instead of vi
Did this fix it?FIX 2Enable syntax in your vimrc
- 01Add syntax on and filetype plugin indent on to ~/.vimrc
- 02Restart Vim and check :syntax and :set filetype?
Did this fix it?FIX 3Find what turns it off
- 01Start with vim -u NONE -N file, then :syntax on; if it works, your config is the cause
- 02Use :scriptnames or vim -D to see which scripts load
- 03Remove stray set compatible or syntax off lines
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
Code shows in one color; :syntax on gives an error such as E319 or does nothing; vim --version lists -syntax.
Why it happens
- C-01Minimal build (vim-tiny, vim-minimal, or vi linked to it) compiled without +syntax
- C-02No syntax on in your vimrc and defaults.vim skipped because a vimrc exists
- C-03A plugin or vimrc line runs syntax off, filetype off or set compatible
- C-04Filetype not detected for the file
// this guide also covers
- vim syntax highlighting not working
- vim no colors
- vim syntax on not working
- vim-tiny syntax
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