{"id":13727503,"url":"https://github.com/RRethy/vim-hexokinase","last_synced_at":"2025-05-07T22:31:17.623Z","repository":{"id":37335788,"uuid":"171179055","full_name":"RRethy/vim-hexokinase","owner":"RRethy","description":"hexokinase.vim - (Neo)Vim plugin for asynchronously displaying the colours in the file (#rrggbb, #rgb, rgb(a)? functions, hsl(a)? functions, web colours, custom patterns)","archived":true,"fork":false,"pushed_at":"2022-01-31T18:53:22.000Z","size":105,"stargazers_count":960,"open_issues_count":10,"forks_count":24,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-14T17:48:17.004Z","etag":null,"topics":["vim","vim-hexokinase","vim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Vim script","has_issues":true,"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/RRethy.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":"2019-02-17T22:19:15.000Z","updated_at":"2024-11-12T12:17:55.000Z","dependencies_parsed_at":"2022-07-20T12:02:22.926Z","dependency_job_id":null,"html_url":"https://github.com/RRethy/vim-hexokinase","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RRethy%2Fvim-hexokinase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RRethy%2Fvim-hexokinase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RRethy%2Fvim-hexokinase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RRethy%2Fvim-hexokinase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RRethy","download_url":"https://codeload.github.com/RRethy/vim-hexokinase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252965455,"owners_count":21832893,"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":["vim","vim-hexokinase","vim-plugin"],"created_at":"2024-08-03T01:04:02.607Z","updated_at":"2025-05-07T22:31:17.329Z","avatar_url":"https://github.com/RRethy.png","language":"Vim script","funding_links":[],"categories":["Vim Script","Vim script"],"sub_categories":[],"readme":"# vim-hexokinase\n\nThe fastest (Neo)Vim plugin for asynchronously displaying the colours in the file (#rrggbb, #rgb, rgb(a)? functions, hsl(a)? functions, web colours, custom patterns)\n\n\u003e let g:Hexokinase_highlighters = ['virtual']\n\n![gif](https://media.giphy.com/media/PikQiakj2NYxFDmcdl/giphy.gif)\n\n\u003e let g:Hexokinase_highlighters = ['sign_column']\n\n![gif](https://media.giphy.com/media/5kFmgYX1mF7l25BnYe/giphy.gif)\n\n\u003e set signcolumn=yes:9 \" Neovim only\n\n\u003cimg src=\"https://user-images.githubusercontent.com/21000943/69205914-4e104b00-0b19-11ea-8c36-4037d798810d.png\" width=\"520\" height=\"342\"\u003e\n\n\u003e let g:Hexokinase_highlighters = ['foreground']\n\n\u003cimg src=\"https://user-images.githubusercontent.com/21000943/64053823-2c26ae00-cb52-11e9-869a-f8ddfe797196.png\" width=\"520\" height=\"342\"\u003e\n\n\u003e let g:Hexokinase_highlighters = ['foregroundfull']\n\n\u003cimg src=\"https://user-images.githubusercontent.com/21000943/64053892-6e4fef80-cb52-11e9-8c81-31a785c7503e.png\" width=\"520\" height=\"342\"\u003e\n\n\u003e let g:Hexokinase_highlighters = ['background']\n\n\u003cimg src=\"https://user-images.githubusercontent.com/21000943/64057174-bb8a8c00-cb67-11e9-99b9-66f8eba00c65.png\" width=\"520\" height=\"342\"\u003e\n\n\u003e let g:Hexokinase_highlighters = ['backgroundfull']\n\n\u003cimg src=\"https://user-images.githubusercontent.com/21000943/64057161-91d16500-cb67-11e9-83ab-535ad2489c5a.png\" width=\"520\" height=\"342\"\u003e\n\n## Rationale\n\n**Problem:** [Colorizer](https://github.com/chrisbra/Colorizer) and [Colorizer](https://github.com/lilydjwg/colorizer) are plugins which also display the colour of text. However, they do so by changing the background of the text which is not pleasing to look at. On top of that, they all scrape the file synchronously.\n\n**Solution:** Have 6 different options for displaying colour, including as virtual text or in the sign column. As well, do all scraping asynchronously.\n\n## About\n\nThis plugin can display the colour of 6 digit hex codes, 3 digit hex codes, rgb functions, rgba functions, hsl functions, hsla functions, and custom patterns.\n\nColour can be displayed in each of the 6 six ways shown above, or can be customized to display colour any way the user chooses.\n\n**Note:** By default all filetypes are scraped and highlighted on `['TextChanged', 'InsertLeave', 'BufRead']`, see `:h g:Hexokinase_refreshEvents` for more info.\n\n## Requirements\n\n- `:h 'termguicolors'` must be turned on and your terminal must support it\n- **Golang must be installed, for more information visit https://golang.org/doc/install.**\n- For *virtual text*: Neovim 0.3.2\n- For *sign_column*: Vim compiled with `+signs` or any Neovim version\n- Currently, untested on Windows, help is welcomed.\n\n## Installation\n\n1. Install Golang https://golang.org/doc/install\n2. Install the plugin with the plugin manager of choice and ensure `make hexokinase` is executed in the project root:\n\n```vim\n\" vim-plug\nPlug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' }\n\n\" minpac\ncall minpac#add('rrethy/vim-hexokinase', { 'do': 'make hexokinase' })\n\n\" dein\ncall dein#add('rrethy/vim-hexokinase', { 'build': 'make hexokinase' })\n\n\" etc.\n```\n\n3. `:set termguicolors`\n\n## Quick Start\n\nChoose your method of highlighting:\n\n```vim\n\" Neovim default\nlet g:Hexokinase_highlighters = [ 'virtual' ]\n\n\" Vim default\nlet g:Hexokinase_highlighters = [ 'sign_column' ]\n\n\" All possible highlighters\nlet g:Hexokinase_highlighters = [\n\\   'virtual',\n\\   'sign_column',\n\\   'background',\n\\   'backgroundfull',\n\\   'foreground',\n\\   'foregroundfull'\n\\ ]\n```\n\nChoose which patterns are matched:\n\n```vim\n\" Patterns to match for all filetypes\n\" Can be a comma separated string or a list of strings\n\" Default value:\nlet g:Hexokinase_optInPatterns = 'full_hex,rgb,rgba,hsl,hsla,colour_names'\n\n\" All possible values\nlet g:Hexokinase_optInPatterns = [\n\\     'full_hex',\n\\     'triple_hex',\n\\     'rgb',\n\\     'rgba',\n\\     'hsl',\n\\     'hsla',\n\\     'colour_names'\n\\ ]\n\n\" Filetype specific patterns to match\n\" entry value must be comma seperated list\nlet g:Hexokinase_ftOptInPatterns = {\n\\     'css': 'full_hex,rgb,rgba,hsl,hsla,colour_names',\n\\     'html': 'full_hex,rgb,rgba,hsl,hsla,colour_names'\n\\ }\n```\n\nChoose which filetypes to scrape automatically (by default ALL filetypes are scraped):\n\n```vim\n\" Sample value, to keep default behaviour don't define this variable\nlet g:Hexokinase_ftEnabled = ['css', 'html', 'javascript']\n```\n\n## Commands\n\n| Command  | Description  |\n|---|---|\n| **HexokinaseToggle**  | Toggle the colouring  |\n| **HexokinaseTurnOn**  | Turn on colouring (refresh if already turned on) |\n| **HexokinaseTurnOff**  | Turn off colouring  |\n\n## Full Configuration\n\nSee `:help hexokinase.txt`\n\n## Custom Patterns\n\nSee `:help g:Hexokinase_palettes`.\n\nThis can be used to colour specific variables.\n\n## FAQ\n\n\u003e I'm seeing grey colours when I toggle vim-hexokinase\n\nYou need `termguicolors` to be turned on. Verify `:set termguicolors?` outputs `termguicolors`. For more info, see https://github.com/RRethy/vim-hexokinase/issues/10.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRRethy%2Fvim-hexokinase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRRethy%2Fvim-hexokinase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRRethy%2Fvim-hexokinase/lists"}