joshdick/onedark.vim: the One Dark colorscheme for Vim and Neovim
A dark Vim/Neovim color scheme inspired by Atom's One Dark syntax theme.
At a glance
- What is it?
- A dark Vim/Neovim color scheme for the GUI and 16/256/true-color terminals, based on FlatColor with colors inspired by Atom's One Dark syntax theme. The README documents installation, three options and companion themes for lightline.vim and vim-airline.
- Who is it for?
- Adopt onedark.vim if you want the One Dark palette in Vim or Neovim and you are willing to set termguicolors, g:onedark_termcolors and g:onedark_terminal_italics before the colorscheme line in your vimrc. Do not adopt it if you need a theme that ships its own statusline without a companion plugin, or if you are not prepared for the 16-color behavior changed by pull request #271.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Activity is slowing. The repository last received commits 6 months ago.
- What is it written in?
- Mainly Vim Script, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 25, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What onedark.vim solves, and for whom
Vim ships with colorschemes that were designed for the editor, not for a specific editor look. If you work in Atom or another editor using the One Dark syntax theme and you want the same palette in Vim or Neovim, you either hand-write a colorscheme or you pick one that already encodes those colors. onedark.vim is the latter. The README describes it as "a dark Vim/Neovim color scheme for the GUI and 16/256/true-color terminals, based on FlatColor, with colors inspired by the excellent One Dark syntax theme" for Atom.
The audience is narrower than "every Vim user". It is people who want the One Dark palette specifically, and who run Vim or Neovim in a terminal or GUI. The README also names a set of plugins the theme has explicit support for: vim-gitgutter, ale, vim-easymotion, lightline.vim, gitsigns.nvim, vim-signify, coc.nvim, neomake, Neovim LSP, vim-markdown, vim-lsp, vim-fugitive and vim-airline. If your setup is built around those, the theme covers the highlights they add. If your setup uses a plugin outside that list, you should expect default highlighting there rather than anything tuned.
How the color scheme is built and loaded
The repository is not only a directory of Vim script. The top level contains build/, colors/, autoload/ and term/, plus a package.json whose name is onedark.vim-builder and whose description is "Builds the onedark.vim Vim colorscheme and associated files". The build script is build/build.js, run through npm run build, and it depends on the npm package termcolors at version 0.7.3. In other words, the colorscheme files under colors/ and autoload/ are generated artifacts, produced from a source description rather than edited directly. That is why the repository carries ESLint and Prettier configuration and a lint-staged block for *.js, *.json and *.md files: the JavaScript build is the maintained part.
At load time the split is the usual Vim one. colors/onedark.vim is what colorscheme onedark finds on the runtimepath, and autoload/onedark.vim holds the color definitions. The README states that the companion lightline.vim and vim-airline themes both depend on autoload/onedark.vim for their colors and must therefore be used in conjunction with it. That dependency is the reason the companion files are not standalone themes you can drop in alone.
Installing onedark.vim and turning it on
The README gives three routes. You can install through a plugin manager of your choice, or manually by placing colors/onedark.vim in ~/.vim/colors/ and autoload/onedark.vim in ~/.vim/autoload/. The third route is the Vim 8 package system: clone the repository into ~/.vim/pack/*/opt/ so that the README ends up at ~/.vim/pack/*/opt/onedark.vim/README.md, then add packadd! onedark.vim to your ~/.vimrc. The README notes that the * in the path can be any value and points to :help packages.
If you run Vim in a terminal, the README asks you to test whether the terminal emulator supports 24-bit color first. The check is a shell snippet that prints the word TRUECOLOR:
printf "\x1b[38;2;255;100;0mTRUECOLOR\x1b[0m\n"If the word appears in red, the terminal supports 24-bit color and you should add the README's termguicolors block to your vimrc. If it does not appear in red, the README says to proceed to step 3 and consider the g:onedark_termcolors option instead. GUI Vim always displays 24-bit color regardless of this step.
With the color question settled, the activation lines go below anything you added earlier:
syntax on
colorscheme onedarkAll three options must be set before the colorscheme onedark line. g:onedark_termcolors takes 256 (the default) or 16. g:onedark_terminal_italics takes 1 or 0, defaulting to 0. g:onedark_hide_endofbuffer takes 1 or 0, defaulting to 0, and setting it to 1 hides the end-of-buffer filler lines. If you want the lightline.vim companion, the README says to place onedark.vim/autoload/lightline/colorscheme/onedark.vim in ~/.vim/autoload/lightline/colorscheme/ and then set:
let g:lightline = {
\ 'colorscheme': 'onedark',
\ }The README also recommends sheerun/vim-polyglot for better syntax highlighting across languages, while stating it is not required.
The 16-color path is where onedark.vim gets awkward
The README devotes a section to breaking changes introduced by pull request #271, merged on July 11, 2021, and says they were especially significant for 16-color users. Anyone who was already using the theme and started seeing problems after that merge is pointed at the PR description rather than at a migration guide in the README. That is a real gap: the README does not document a rollback path, and it does not enumerate what changed. If you pin the theme and later update, you are reading a pull request to understand the difference.
There is a second constraint in the option itself. g:onedark_termcolors set to 16 means the theme stops emitting its own color values and uses your terminal emulator's native 16 colors instead. The palette you see is then a function of your terminal configuration, not of the colorscheme. Two people running onedark.vim with g:onedark_termcolors=16 on differently themed terminals will not see the same result, and neither may match the color reference image in the README. The 256 default avoids that, but only if the terminal handles 256 colors as expected.
A third case is simply the wrong tool: if your terminal fails the TRUECOLOR check and you do not want to change terminals, you are choosing between 256 colors and 16 colors. The README frames this honestly as a fork in the road rather than pretending true color is available everywhere.
onedark.vim compared with a self-contained colorscheme
The clearest alternative in the README's own text is not another colorscheme but the plugin arrangement around it. onedark.vim separates the core theme from the statusline: lightline.vim and vim-airline get their own companion files that read colors from autoload/onedark.vim. A self-contained colorscheme that bundles its own statusline definitions inverts that. You install one thing, and the statusline matches without a second file and without a colorscheme key in a plugin's configuration.
The trade-off is visible in the lightline setup. You copy a file into ~/.vim/autoload/lightline/colorscheme/ and add a g:lightline dictionary with a colorscheme key. If you skip either half, the core theme still loads but the statusline does not follow it. The dependency is documented, so nothing is hidden, but it is one more thing to get right during installation. The other difference is the build pipeline. A hand-written colorscheme is edited in place; onedark.vim generates its Vim script from a JavaScript build with termcolors, which is why the repository carries a package.json and lint configuration. That structure helps whoever maintains the palette. It does not help you if you want to tweak one highlight group by hand, because your edit sits in a generated file.
Maintenance, licence and the cost of upgrading
The last push to the default branch was on 2026-04-02. The repository is not archived. There are no retrieved releases, so the practical upgrade path is pulling the latest commit or updating through your plugin manager rather than tracking version tags. That matters because the README's own history shows a breaking change landing as a merged pull request on July 11, 2021, with no release boundary around it.
The theme is MIT licensed, and package.json repeats the MIT identifier for the build tooling. MIT is permissive, but if you redistribute the theme or embed it in a larger distribution, read the LICENSE file in the repository rather than treating this description as legal advice.
The maintenance cost for a user is low and mostly one-time: three option lines set before the colorscheme line, plus the termguicolors block if your terminal passes the true-color check. The recurring cost is the upgrade itself. Because there are no releases, an update can change 16-color output the way pull request #271 did, and the README does not document rollback. If your setup depends on the 16-color rendering, pin the commit you have and read the diff before moving.
Editorial conclusion
Adopt onedark.vim if you want the One Dark palette in Vim or Neovim and you are willing to set termguicolors, g:onedark_termcolors and g:onedark_terminal_italics before the colorscheme line in your vimrc. Do not adopt it if you need a theme that ships its own statusline without a companion plugin, or if you are not prepared for the 16-color behavior changed by pull request #271. Before installing, verify that your terminal emulator passes the true-color check, and check whether your statusline plugin is in the supported list.
Frequently asked questions
How do I install onedark.vim as a Vim 8 package?
Clone the repository into ~/.vim/pack/*/opt/ so the README ends up at ~/.vim/pack/*/opt/onedark.vim/README.md, then add packadd! onedark.vim to your ~/.vimrc. The README notes the * can be any value and points to :help packages for details.
Why does onedark.vim look wrong in my terminal?
The README says the theme supports the GUI and 16/256/true-color terminals, so the terminal's color capability decides what you get. Run the README's printf TRUECOLOR check; if the word does not appear in red, the terminal does not support 24-bit color and you should look at the g:onedark_termcolors option, which defaults to 256 and can be set to 16.
Can I use the onedark.vim lightline colorscheme on its own?
No. The README states that the lightline.vim colorscheme depends on autoload/onedark.vim for its colors and must therefore be used in conjunction with it. You place onedark.vim/autoload/lightline/colorscheme/onedark.vim in ~/.vim/autoload/lightline/colorscheme/ and set the colorscheme key in g:lightline.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/joshdick-onedark-vim)