moonfly is a dark color scheme for Vim and Neovim that has taken inspiration from:
Note, the moonfly color scheme does incrementally change from time to time, primarily in regards to language and plugin theming. However, the core color palette will not change; except the time I changed crimson (July 1 2017), sorry.
Normal | Color | Bright | Color |
---|---|---|---|
Background | Foreground | ||
Grey | Coral | ||
Red | Crimson | ||
Green | Emerald | ||
Khaki | Wheat | ||
Blue | Light Blue | ||
Magenta | Purple | ||
Turquoise | Light Green | ||
Orange | Violet |
The font in use is Iosevka.
- C/C++
- Shell
- Python
- Ruby
- Crystal
- Elixir
- JavaScript
- CoffeeScript
- PureScript
- TypeScript
- Markdown
- Go
- Rust
- Java
- Scala
- PHP
- Haskell
- Clojure
- Elm
- Lua
- NERDTree
- Neomake
- ALE
- CtrlP
- clever-f
- BufExplorer
- Tagbar
- fzf.vim
- indentLine (please set
let g:indentLine_setColors = 0
in your vimrc)
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. To enable the moonfly airline theme, after the vim-airline plugin has been installed, please add the following to your vimrc:
let g:airline_theme = 'moonfly'
Alternatively, a companion status line, vim-moonfly-statusline, is available for those that just want a simple moonfly themed statusline.
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:
- Add
Plug 'bluz71/vim-moonfly-colors'
to your vimrc - Run
:PlugInstall
- Add
colorscheme moonfly
to your vimrc, make sure this line appears after the Plug declaration.
The g:moonflyCursorLineNr
option specifies whether to highlight the cursor
line, as blue, in the number column if the relativenumber
or cursorline
settings are in effect. By default the cursor line will be highlighted as such.
To disable highlighting of the current cursor line in the number column please add the following to your vimrc:
let g:moonflyCursorLineNr = 0
The g:moonflyCursorColor
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
The g:moonflyTerminalColors
option specifies whether to use the moonfly color
palette in :terminal
windows when termguicolors
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
The g:moonflyUnderlineMatchParen
options 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
Many terminal programs, such as iTerm2 and
GNOME Terminal, support
24-bit true colors. Modern versions
of Vim and Neovim, on such terminals, support true colors when
set termguicolors
is enabled.
Caveat, Terminal.app on macOS and xterm on Unix do not support true colors.
On terminals that do support true colors, and when termguicolors
is set,
the moonfly color scheme will not require any terminal configuration to emit
the correct moonfly colors.
For the true colors 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:
set t_8b=^[[48;2;%lu;%lu;%lum
set t_8f=^[[38;2;%lu;%lu;%lum
Note: ^[
in the above snippet is a real escape character; to insert it,
enter Ctrl-v
followed by Esc
. Repeating, the above t_8*
settings are
not required for Neovim.
If consistency between Vim colors and $SHELL
colors is important then I
recommend proceeding with the 256-color configurations listed in the next
section.
The moonfly color scheme, when used with Vim absent termguicolors
,
requires the host terminal be configured with a specific color palette.
Firstly, 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 can now be configured with the following moonfly colors:
iterm2 users on macOS can import this color scheme.
Gnome Terminal users can run this script to
create a Moonfly profile. Firstly before executing the script, please install
the dconf-cli
command line utility for modern versions of Gnome (3.28 and
later), for example sudo apt install dconf-cli
. Lastly after executing the
script, please set the cursor and highlight colors by hand, with the color
values listed above, in Preferences
/ Moonfly
/ Colors
.
xterm users on Linux can add the following snippet to their ~/.Xresources
file and launch xterm with xterm -name xterm-moonfly
.
xterm-moonfly*background: #080808
xterm-moonfly*foreground: #b2b2b2
xterm-moonfly*cursorColor: #9e9e9e
xterm-moonfly*colorBD: #eeeeee
xterm-moonfly*color0: #373c40
xterm-moonfly*color1: #ff5454
xterm-moonfly*color2: #8cc85f
xterm-moonfly*color3: #e3c78a
xterm-moonfly*color4: #80a0ff
xterm-moonfly*color5: #ce76e8
xterm-moonfly*color6: #7ee0ce
xterm-moonfly*color7: #de935f
xterm-moonfly*color8: #f09479
xterm-moonfly*color9: #f74782
xterm-moonfly*color10: #42cf89
xterm-moonfly*color11: #cfcfb0
xterm-moonfly*color12: #78c2ff
xterm-moonfly*color13: #ae81ff
xterm-moonfly*color14: #85dc85
xterm-moonfly*color15: #e2637f
A complete Xresources file is available here.