Top Related Projects
A dark Vim/Neovim color scheme inspired by Atom's One Dark syntax theme.
One dark and light colorscheme for neovim >= 0.5.0 written in lua based on Atom's One Dark and Light theme. Additionally, it comes with 5 color variant styles
Atom's iconic One Dark theme for Visual Studio Code
Modern theme for modern VIMs
Quick Overview
Vim-one is a color scheme for Vim and Neovim, inspired by the Atom One Dark theme. It provides a clean, modern look for your code editor with carefully chosen colors to enhance readability and reduce eye strain during long coding sessions.
Pros
- Supports both dark and light variants
- Optimized for a wide range of programming languages
- Includes airline and lightline themes for a cohesive look
- Actively maintained with regular updates
Cons
- May require additional configuration for some terminal emulators
- Limited customization options compared to some other color schemes
- Some users report inconsistencies in certain edge cases
- Might not suit everyone's personal preferences
Getting Started
To install vim-one using vim-plug, add the following to your .vimrc
:
call plug#begin()
Plug 'rakr/vim-one'
call plug#end()
Then, set the colorscheme in your .vimrc
:
set background=dark " For dark version
" set background=light " For light version
colorscheme one
For true color support in terminal Vim, add:
if (has("termguicolors"))
set termguicolors
endif
Finally, run :PlugInstall
in Vim to install the plugin.
Competitor Comparisons
A dark Vim/Neovim color scheme inspired by Atom's One Dark syntax theme.
Pros of onedark.vim
- More active development with frequent updates and bug fixes
- Broader language support for syntax highlighting
- Includes support for popular plugins like airline and lightline
Cons of onedark.vim
- Slightly more complex configuration options
- May have higher resource usage due to extensive feature set
Code Comparison
onedark.vim:
let g:onedark_color_overrides = {
\ "black": {"gui": "#2F343F", "cterm": "235", "cterm16": "0" },
\ "purple": { "gui": "#C678DD", "cterm": "170", "cterm16": "5" }
\}
vim-one:
let g:one_allow_italics = 1
colorscheme one
set background=dark
Key Differences
- vim-one is a more lightweight option with simpler configuration
- onedark.vim offers more customization options and plugin integrations
- vim-one provides both light and dark themes, while onedark.vim focuses on a dark theme
- onedark.vim has a larger user base and more frequent updates
Conclusion
Both themes offer attractive color schemes for Vim. onedark.vim is more feature-rich and actively maintained, while vim-one provides a simpler, lightweight alternative. Choose based on your specific needs for customization, plugin support, and preferred aesthetics.
One dark and light colorscheme for neovim >= 0.5.0 written in lua based on Atom's One Dark and Light theme. Additionally, it comes with 5 color variant styles
Pros of onedark.nvim
- Written in Lua, offering better performance and integration with Neovim
- Provides more customization options and color variants
- Actively maintained with frequent updates
Cons of onedark.nvim
- Requires Neovim 0.5 or later, limiting compatibility with older Vim versions
- May have a steeper learning curve for users unfamiliar with Lua configuration
Code Comparison
vim-one:
colorscheme one
set background=dark
onedark.nvim:
require('onedark').setup {
style = 'dark',
transparent = true,
term_colors = true,
-- More customization options available
}
require('onedark').load()
Summary
onedark.nvim is a modern, Lua-based implementation of the OneDark theme specifically designed for Neovim. It offers enhanced performance and extensive customization options compared to vim-one. However, it requires Neovim 0.5+ and may be less accessible for users more comfortable with traditional Vim script configurations.
vim-one is a more traditional Vim color scheme that works across both Vim and Neovim. It's simpler to set up and use, especially for those familiar with Vim scripting, but lacks some of the advanced features and customization options offered by onedark.nvim.
Choose onedark.nvim for a feature-rich, performant theme in Neovim, or vim-one for broader compatibility and simplicity across Vim and Neovim environments.
Atom's iconic One Dark theme for Visual Studio Code
Pros of OneDark-Pro
- More comprehensive theme with support for multiple editors and IDEs
- Regularly updated with new features and improvements
- Larger community and user base, leading to more feedback and refinements
Cons of OneDark-Pro
- May be overwhelming for users who prefer a simpler, more focused theme
- Potentially higher resource usage due to its extensive feature set
- Learning curve for customizing and utilizing all available options
Code Comparison
vim-one:
colorscheme one
set background=dark
let g:airline_theme='one'
OneDark-Pro:
{
"workbench.colorTheme": "One Dark Pro",
"oneDarkPro.bold": true,
"oneDarkPro.vivid": true
}
Summary
vim-one is a lightweight Vim-specific color scheme, while OneDark-Pro is a more comprehensive theme with support for multiple editors. vim-one offers simplicity and ease of use, making it ideal for Vim purists. OneDark-Pro provides a richer feature set and broader compatibility, but may be more complex to set up and customize. The choice between the two depends on the user's specific needs, preferred editor, and desired level of customization.
Modern theme for modern VIMs
Pros of ayu-vim
- Offers three distinct color schemes (light, mirage, dark) for different preferences and environments
- Provides better support for various plugins and language-specific syntax highlighting
- More actively maintained with recent updates and contributions
Cons of ayu-vim
- May have a steeper learning curve due to more configuration options
- Could be considered less minimalistic compared to vim-one's simpler approach
- Might require additional setup for full functionality across different Vim distributions
Code Comparison
ayu-vim:
let ayucolor="mirage"
colorscheme ayu
" Custom highlight groups
hi Normal guibg=NONE ctermbg=NONE
hi LineNr guibg=NONE ctermbg=NONE
vim-one:
set background=dark
colorscheme one
" Enable italics
let g:one_allow_italics = 1
Both themes offer easy customization, but ayu-vim provides more granular control over color schemes and highlight groups. vim-one focuses on a simpler setup with fewer options, which may be preferable for users seeking a more straightforward configuration.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Light and dark vim colorscheme, shamelessly stolen from atom (another excellent text editor). One supports true colors and falls back gracefully and automatically if your environment does not support this feature.
Vim Airline theme
Add the following line to your ~/.vimrc
or ~/.config/nvim/init.vim
let g:airline_theme='one'
As for the colorscheme, this theme comes with light and dark flavors.
List of enhanced language support
Pull requests are more than welcome here. I have created few issues to provide a bare bone roadmap for this color scheme.
Stable
- Asciidoc
- CSS and Sass
- Cucumber features
- Elixir
- Go
- Haskell
- HTML
- JavaScript, JSON
- Markdown
- PureScript (thanks: Arthur Xavier)
- Ruby
- Rust (thanks: Erasin)
- Vim
- XML
In progress
- Jade
- PHP
- Python
- Switch to estilo in progress, not stable at all and does not reflect all the capabilities of the current mainstream version
Installation
You can use your preferred Vim Package Manager to install One.
Usage
One comes in two flavors: light and dark.
colorscheme one
set background=dark " for the dark version
" set background=light " for the light version
set background
has to be called after setting the colorscheme, this explains
the issue #21 where Vim tries to determine the best background when ctermbg
for the Normal
highlight is defined.
Italic support
Some terminals do not support italic, cf. #3.
If your terminal does support italic, you can set the g:one_allow_italics
variable to 1 in your .vimrc
or .config/nvim/init.vim
:
set background=light " for the light version
let g:one_allow_italics = 1 " I love italic for comments
colorscheme one
iTerm2 can support italic, follow the instructions given in this blog post by Alex Pearce. Make sure to read the update if you are using tmux version 2.1 or above.
True color support
To benefit from the true color support make sure to add the following lines in your .vimrc
or .config/nvim/init.vim
"Credit joshdick
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support
"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
if (empty($TMUX))
if (has("nvim"))
"For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
endif
"For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
"Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
if (has("termguicolors"))
set termguicolors
endif
endif
set background=dark " for the dark version
" set background=light " for the light version
colorscheme one
Tmux support
To get true color working in tmux, ensure that the $TERM
environment variable is set to xterm-256color
. Inside the .tmux.conf
file we need to override this terminal and also set the default terminal as 256 color.
# Add truecolor support
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Default terminal is 256 colors
set -g default-terminal "screen-256color"
Note that this only works for Neovim (tested on 0.1.5). For some reason Vim (7.5.2334) doesn't play nice. See blog post by Anton Kalyaev for more details on setting up tmux.
For Vim inside tmux, you can add the following snippet in your ~/.vimrc
set t_8b=^[[48;2;%lu;%lu;%lum
set t_8f=^[[38;2;%lu;%lu;%lum
Note: the ^[
in this snippet is a real escape character. To insert it, press Ctrl-V
and then Esc
.
I've tested the following setup on a Mac:
- iTerm2 nightly build
- Neovim 0.1.4 and 0.1.5-dev
- Vim 7.4.1952
Customising One without fork
Following a request to be able to customise one without the need to fork, one is now exposing a public function to meet this requirement.
After the colorscheme has been initialised, you can call the following function:
one#highlight(group, fg, bg, attribute)
group
: Highlight you want to customise for examplevimLineComment
fg
: foreground color for the highlight, without the '#', for example:ff0000
bg
: background color for the highlight, without the '#', for example:ff0000
attribute
:bold
,italic
,underline
or any comma separated combination
For example:
call one#highlight('vimLineComment', 'cccccc', '', 'none')
Contributors
A special thank you to the following people
- laggardkernel: Startup time improvement
- Erasin: Rust support
- Malcolm Ramsay - malramsay64: Gracefully fail if colorscheme is not properly loaded
- Arthur Xavier: PureScript support
- keremc: Tip Vim true color support inside tmux
- jetm: C/C++ highlighting
Top Related Projects
A dark Vim/Neovim color scheme inspired by Atom's One Dark syntax theme.
One dark and light colorscheme for neovim >= 0.5.0 written in lua based on Atom's One Dark and Light theme. Additionally, it comes with 5 color variant styles
Atom's iconic One Dark theme for Visual Studio Code
Modern theme for modern VIMs
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot