{"id":13479606,"url":"https://github.com/rakr/vim-one","last_synced_at":"2025-03-27T09:33:12.155Z","repository":{"id":40523171,"uuid":"61813413","full_name":"rakr/vim-one","owner":"rakr","description":"Adaptation of one-light and one-dark colorschemes for Vim","archived":false,"fork":false,"pushed_at":"2024-01-02T20:40:47.000Z","size":3923,"stargazers_count":1982,"open_issues_count":42,"forks_count":196,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-08-01T16:56:16.582Z","etag":null,"topics":["colorscheme","one-dark","one-light","vim","vim-colorscheme"],"latest_commit_sha":null,"homepage":null,"language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rakr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-23T14:52:10.000Z","updated_at":"2024-08-01T03:53:39.000Z","dependencies_parsed_at":"2022-08-09T22:31:00.231Z","dependency_job_id":null,"html_url":"https://github.com/rakr/vim-one","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rakr%2Fvim-one","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rakr%2Fvim-one/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rakr%2Fvim-one/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rakr%2Fvim-one/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rakr","download_url":"https://codeload.github.com/rakr/vim-one/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222230588,"owners_count":16952668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["colorscheme","one-dark","one-light","vim","vim-colorscheme"],"created_at":"2024-07-31T16:02:19.978Z","updated_at":"2024-10-30T13:30:53.401Z","avatar_url":"https://github.com/rakr.png","language":"Vim script","funding_links":[],"categories":["Vim Script","Vim script"],"sub_categories":[],"readme":"![Logo][logo]\n\nLight and dark vim colorscheme, shamelessly stolen from atom (another\nexcellent text editor). **One** supports *true colors* and falls back\ngracefully and automatically if your environment does not support this\nfeature.\n\n## Vim Airline theme\n\nAdd the following line to your `~/.vimrc` or `~/.config/nvim/init.vim`\n\n```vim\nlet g:airline_theme='one'\n```\n\nAs for the colorscheme, this theme comes with light and dark flavors.\n\n## List of enhanced language support\n\nPull requests are more than welcome here.\nI have created few issues to provide a bare bone roadmap for this color\nscheme.\n\n### Stable\n\n* Asciidoc\n* CSS and Sass\n* Cucumber features\n* Elixir\n* Go\n* Haskell\n* HTML\n* JavaScript, JSON\n* Markdown\n* PureScript (thanks: [Arthur Xavier](https://github.com/arthur-xavier))\n* Ruby\n* Rust (thanks: [Erasin](https://github.com/erasin))\n* Vim\n* XML\n\n### In progress\n\n* Jade\n* PHP\n* Python\n* Switch to estilo in progress, not stable at all and does not reflect all the\n  capabilities of the current mainstream version\n\n\n## Installation\n\nYou can use your preferred Vim Package Manager to install **One**.\n\n## Usage\n\n**One** comes in two flavors: light and dark.\n\n```vim\ncolorscheme one\nset background=dark \" for the dark version\n\" set background=light \" for the light version\n```\n\n`set background` has to be called after setting the colorscheme, this explains\nthe issue [#21][issue_21] where Vim tries to determine the best background when `ctermbg`\nfor the `Normal` highlight is defined.\n\n### Italic support\n\nSome terminals do not support italic, cf. [#3][issue_3].\n\nIf your terminal does support _italic_, you can set the `g:one_allow_italics` variable to 1 in your `.vimrc` or `.config/nvim/init.vim`:\n\n```vim\nset background=light        \" for the light version\nlet g:one_allow_italics = 1 \" I love italic for comments\ncolorscheme one\n```\n\niTerm2 can support italic, follow the instructions given in this [blog post by Alex Pearce](https://alexpearce.me/2014/05/italics-in-iterm2-vim-tmux/).\nMake sure to read the update if you are using tmux version 2.1 or above.\n\n### True color support\nTo benefit from the **true color** support make sure to add the following lines in your `.vimrc` or `.config/nvim/init.vim`\n\n```vim\n\"Credit joshdick\n\"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.\n\"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\n\"(see \u003c http://sunaku.github.io/tmux-24bit-color.html#usage \u003e for more information.)\nif (empty($TMUX))\n  if (has(\"nvim\"))\n    \"For Neovim 0.1.3 and 0.1.4 \u003c https://github.com/neovim/neovim/pull/2198 \u003e\n    let $NVIM_TUI_ENABLE_TRUE_COLOR=1\n  endif\n  \"For Neovim \u003e 0.1.5 and Vim \u003e patch 7.4.1799 \u003c https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 \u003e\n  \"Based on Vim patch 7.4.1770 (`guicolors` option) \u003c https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd \u003e\n  \" \u003c https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 \u003e\n  if (has(\"termguicolors\"))\n    set termguicolors\n  endif\nendif\n\n\nset background=dark \" for the dark version\n\" set background=light \" for the light version\ncolorscheme one\n```\n### Tmux support\nTo 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.\n\n```\n# Add truecolor support\nset-option -ga terminal-overrides \",xterm-256color:Tc\"\n# Default terminal is 256 colors\nset -g default-terminal \"screen-256color\"\n```\n\nNote 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](http://homeonrails.com/2016/05/truecolor-in-gnome-terminal-tmux-and-neovim/) for more details on setting up tmux.\n\nFor Vim inside tmux, you can add the following snippet in your `~/.vimrc`\n\n```viml\nset t_8b=^[[48;2;%lu;%lu;%lum\nset t_8f=^[[38;2;%lu;%lu;%lum\n```\n\nNote: the `^[` in this snippet is a real escape character. To insert it, press `Ctrl-V` and then `Esc`.\n\nI've tested the following setup on a Mac:\n\n* iTerm2 nightly build\n* Neovim 0.1.4 and 0.1.5-dev\n* Vim 7.4.1952\n\n## Customising One without fork\n\nFollowing a request to be able to customise **one** without the need to fork,\n**one** is now exposing a public function to meet this requirement.\n\nAfter the colorscheme has been initialised, you can call the following function:\n\n```\none#highlight(group, fg, bg, attribute)\n```\n\n* `group`: Highlight you want to customise for example `vimLineComment`\n* `fg`: foreground color for the highlight, without the '#', for example:\n  `ff0000`\n* `bg`: background color for the highlight, without the '#', for example:\n  `ff0000`\n* `attribute`: `bold`, `italic`, `underline` or any comma separated combination\n\nFor example:\n\n```\ncall one#highlight('vimLineComment', 'cccccc', '', 'none')\n```\n\n## Contributors\n\nA special thank you to the following people\n\n* [laggardkernel](https://github.com/laggardkernel): Startup time improvement\n* [Erasin](https://github.com/erasin): Rust support\n* [Malcolm Ramsay - malramsay64](https://github.com/malramsay64): Gracefully fail if colorscheme is not properly loaded\n* [Arthur Xavier](https://github.com/arthur-xavier): PureScript support\n* [keremc](https://github.com/keremc): Tip Vim true color support inside tmux\n* [jetm](https://github.com/jetm): C/C++ highlighting\n\n[logo]: screenshots/new-logo.png\n\n[issue_3]: https://github.com/rakr/vim-one/issues/3\n[issue_21]: https://github.com/rakr/vim-one/issues/21\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frakr%2Fvim-one","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frakr%2Fvim-one","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frakr%2Fvim-one/lists"}