by bluz71

A dark color scheme for Vim

170 Stars 14 Forks Last release: Not found 294 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:


moonfly is a dark color scheme for Vim and Neovim that has taken inspiration from:

Be aware, the moonfly color scheme does incrementally change from time to time, primarily with regard to language and plugin theming.

:point_right: I maintain another dark Vim theme named nightfly which may be of interest.

Color Palette







The font in use is Iosevka.

Languages explicitly styled

  • All Neovim Treesitter highlighted-languages
  • C/C++
  • Clojure
  • CoffeeScript
  • Crystal
  • Elixir
  • Elm
  • Dart
  • Go
  • Haskell
  • Java
  • JavaScript
  • Lua
  • Markdown
  • PHP
  • PureScript
  • Python
  • Ruby
  • Rust
  • Scala
  • Shell
  • TypeScript

Plugins explicity styled


Use your favoured plugin manager to install bluz71/vim-moonfly-colors then set the colorscheme in your vimrc file.

If using vim-plug do the following:

  1. Add
    Plug 'bluz71/vim-moonfly-colors'
    to your vimrc
  2. Run
  3. Add
    colorscheme moonfly
    to your vimrc, make sure this line appears after the Plug declaration.

Status line

The moonfly color scheme supports lightline.vim. To enable the moonfly lightline colorscheme, after the lightline.vim plugin has been installed, please add the following to your vimrc:

let g:lightline = { 'colorscheme': 'moonfly' }

The moonfly color scheme also supports vim-airline. With modern versions of vim-airline the moonfly theme will be automatically loaded.

Alternatively, vim-moonfly-statusline, is available for those that just want a simple yet informative moonfly themed status line.



option specifies whether to color the cursor or not. By default the cursor will NOT be colored. If you prefer a colored cursor then add the following to your vimrc:
let g:moonflyCursorColor = 1


option specifies whether to use the moonfly color palette in
windows when
is set. By default this option is enabled. If you prefer not to use the moonfly color palette for the first 16 terminal colors then add the following to your vimrc:
let g:moonflyTerminalColors = 0


option specifies whether to underline matching parentheses. By default this option is disabled. If you want to underline matching parentheses then add the following to your vimrc:
let g:moonflyUnderlineMatchParen = 1


option specifies whether to use undercurls for spelling and linting errors in GUI versions of Vim, including terminal Vim with
set. By default this option is enabled. If you do not like the appearance of undercurls then add the following to your vimrc:
let g:moonflyUndercurls = 0


option specifies whether to use italics for comments and certain HTML elements in GUI versions of Vim. By default this option is enabled. If you do not like the appearance of italics then add the following to your vimrc:
let g:moonflyItalics = 0

True Color Terminals

Many modern terminals support 24-bit true colors. Current versions of Vim and Neovim, on such terminals, support true colors when

set termguicolors
is enabled.

A list of common terminals that support true colors:

:bomb: on macOS and xterm on Unix do not support true colors.

On terminals that support true colors, and when

is set, the moonfly color scheme will not require any terminal configuration to emit the correct theme colors.

For the true color moonfly color scheme to display correctly inside tmux the following setting will be required in ~/.tmux.conf:

set -ga terminal-overrides ',xterm-256color:Tc'

Vim, as against Neovim, inside tmux, will also require the following setting be added to vimrc:

let &t_8f = "\[38;2;%lu;%lu;%lum"
let &t_8b = "\[48;2;%lu;%lu;%lum"

Terminal Themes

A collection of moonfly-flavoured terminal themes are provided for those using moonfly with

users should refer to the next section and not use these terminal themes):
  • iTerm2 users on macOS can import this color scheme.

  • Gnome Terminal users can run this script to create a Moonfly profile. Before executing the script, please install the

    command line utility for modern versions of Gnome (3.28 and later), for example
    apt install dconf-cli
    . After executing the script, please set the cursor and selection colors by hand, with the appropriate color values listed above, in
  • Alacritty users can copy this theme into their

  • kitty users can use this theme.

256 Color Terminals

The moonfly color scheme, when used absent

, requires the host terminal be configured with a specific color palette. In that case the legacy moonfly
256 color terminal theme will be used.

:bell: Nowadays it is strongly recommened to use a true color terminal with a modern version of Vim or Neovim with


If that is not possible, then the terminal emulator must be configured for 256 colors, which usually means setting the terminal's type to xterm-256color, or screen-256color when used inside tmux.

The terminal should then be configured with the following moonfly colors:

| Type | Category | Value | Color | |----------------|-----------------|-----------|-------------------------------------------------------------| | Background | Background |

| background | | Foreground | Foreground |
| background | | Bold | Bold |
| background | | Cursor | Cursor |
| background | | Cursor Text | Cursor Text |
| background | | Selection | Selection |
| background | | Selection Text | Selection Text |
| background | | Color 1 | Black (normal) |
| background | | Color 2 | Red (normal) |
| background | | Color 3 | Green (normal) |
| background | | Color 4 | Yellow (normal) |
| background | | Color 5 | Blue (normal) |
| background | | Color 6 | Purple (normal) |
| background | | Color 7 | Cyan (normal) |
| background | | Color 8 | White (normal) |
| background | | Color 9 | Black (bright) |
| background | | Color 10 | Red (bright) |
| background | | Color 11 | Green (bright) |
| background | | Color 12 | Yellow (bright) |
| background | | Color 13 | Blue (bright) |
| background | | Color 14 | Purple (bright) |
| background | | Color 15 | Cyan (bright) |
| background | | Color 16 | White (bright) |
| background |



We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.