{"id":19295407,"url":"https://github.com/jsit/plum","last_synced_at":"2026-03-01T00:32:42.091Z","repository":{"id":10756576,"uuid":"13017926","full_name":"jsit/plum","owner":"jsit","description":"Light \u0026 Dark vim colorscheme with ambient light detection (only Mac)","archived":false,"fork":false,"pushed_at":"2013-09-22T17:50:35.000Z","size":793,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-15T08:29:34.099Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"VimL","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-22T17:49:40.000Z","updated_at":"2024-11-24T01:55:10.000Z","dependencies_parsed_at":"2022-08-28T17:01:29.814Z","dependency_job_id":null,"html_url":"https://github.com/jsit/plum","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jsit/plum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsit%2Fplum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsit%2Fplum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsit%2Fplum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsit%2Fplum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsit","download_url":"https://codeload.github.com/jsit/plum/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsit%2Fplum/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29956196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T22:53:01.873Z","status":"ssl_error","status_checked_at":"2026-02-28T22:52:50.699Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-09T22:43:24.013Z","updated_at":"2026-03-01T00:32:42.062Z","avatar_url":"https://github.com/jsit.png","language":"VimL","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Plum colorscheme\n\nPlum is a vim colorscheme that support both light and dark background.\nIf you are a Mac OS X, Plum provides some functionalities that\nallow you to automatically switch between *dark* and *light* background\nas the ambient light changes.\n\n\n### Installation\n\n1. Copy the plugin folder to `~/.vim` or use a plugin manager such as\n[Vundle](https://github.com/gmarik/vundle), [Pathogen](https://github.com/tpope/vim-pathogen)\nor [Neobundle](https://github.com/Shougo/neobundle.vim).\n\n2. If you're running Mac OS X and want to use ambient light detection you need to move to the\nplugin root directory and run\n```\n$ ./install.sh\n```\n\n### Usage\n\nSet in your `.vimrc` the default background before setting the colorscheme:\n```vim\nset bg=dark\ncolorscheme plum\n```\n\nTo easily switch between dark and light background you might find useful the following mapping:\n```vim\nnnoremap \u003csilent\u003e \u003cF7\u003e :exe 'set bg=' . (\u0026bg == 'dark' ? 'light' : 'dark')\u003cCR\u003e\n```\n\nIf you are running Mac OS X  and a camera is available, Plum can detect the\ncurrent ambient light and change the colorscheme background accordingly.\nBy default Plum set the right background as Vim starts (unless you turn off the `g:plum_set_bg_at_start` \nvariable) but with the function `PlumSetBackground()` you can change the background whenever you\nwant, normally with autocommand events, e.g.:\n```vim\nau FocusLost,CursorHold * call PlumSetBackgroud()\n```\n\n\n### Settings\n\nSet in your `.vimrc` the options you find useful:\n\n```vim\nlet g:plum_cursorline_highlight_only_linenr = 0\n\" Set this option to 1 (default is 0) to highlight only the current the line number\n\" when 'cursorline' is on.\n\nlet g:plum_set_bg_at_start = 1\n\" If you are using Mac OS X the background is automatically set according to the \n\" current ambient light. This works just like setting an autocommand for the \n\" VimEnter event but usually autocommands are executed at the end of all the startup \n\" initialization and you'll end up seeing some delay in background setting. \n\" Setting this option to 1 (default) will considerably speed up background setting \n\" at startup.\n\nlet g:plum_threshold = 120000\n\" When the ambient light sensor read a value below this value, the background is\n\" set to 'dark', otherwise is set to 'light'.\n\" Note that the default value is somewhat arbitrary: the values read by the\n\" sensor span the range [0 - 67,092,408] but I've found that indoor the range\n\" is roughly [0 - 2,000,000]. To me, only below 120,000 (default) it seems\n\" reasonable to set a dark background but I also know this is just my preference.\n\" If the default value does not fit for you, to find the right one you can experiment \n\" directly with the 'light' executable in the 'bin' directory.\n\nlet g:plum_force_bg = \"\"\n\" Set this option to `light` or `dark` to force a specific background\n\" regardless of the current ambient light.\n```\n\n\n### Screenshots\n\nAll screenshots have been taken from MacVim (font: GohuFont 14, language: go).\n\n#### dark background\n![Screenshot](extra/dark.jpg \"The plum colorscheme with dark background (language: go)\")\n[see full size](https://raw.github.com/gcmt/plum.vim/master/extra/dark.jpg)\n\n#### light background\n![Screenshot](extra/light.jpg \"The plum colorscheme with light background (language: go)\")\n[see full size](https://raw.github.com/gcmt/plum.vim/master/extra/light.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsit%2Fplum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsit%2Fplum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsit%2Fplum/lists"}