{"id":20830003,"url":"https://github.com/bimlas/vim-high","last_synced_at":"2025-05-07T22:11:29.285Z","repository":{"id":81034705,"uuid":"77777454","full_name":"bimlas/vim-high","owner":"bimlas","description":"Vim plugin: All-in-one highlighter, highlight custom pattern like indentation, inactive window, word under the cursor","archived":false,"fork":false,"pushed_at":"2024-02-04T20:56:09.000Z","size":135,"stargazers_count":22,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T14:40:47.701Z","etag":null,"topics":["highlight","inactive-window","long-line","mixed-eol","mixed-indentation","neovim","trailing-spaces","vim","vim-plugin","word-under-the-cursor"],"latest_commit_sha":null,"homepage":"","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/bimlas.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-01T12:11:58.000Z","updated_at":"2025-01-14T12:22:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d31c7f8-5cd2-4e65-bf6c-cba9af648148","html_url":"https://github.com/bimlas/vim-high","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/bimlas%2Fvim-high","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimlas%2Fvim-high/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimlas%2Fvim-high/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimlas%2Fvim-high/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bimlas","download_url":"https://codeload.github.com/bimlas/vim-high/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252961843,"owners_count":21832197,"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":["highlight","inactive-window","long-line","mixed-eol","mixed-indentation","neovim","trailing-spaces","vim","vim-plugin","word-under-the-cursor"],"created_at":"2024-11-17T23:22:53.902Z","updated_at":"2025-05-07T22:11:29.270Z","avatar_url":"https://github.com/bimlas.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Vim-High: all-in-one Vim highlighter plugin\n\nA Vim plugin to highlight custom patterns on any buffer (filetype\nwhitelist/blacklist supported), for example highlight indentation, inactive\nwindow, word under the cursor or even user made Vim highlighting.\n\n* https://github.com/bimlas/vim-high (please star if you like it)\n\nimage:https://img.shields.io/travis/bimlas/vim-high/master.svg?label=Travis%20CI[\"Travis CI\", link=\"https://travis-ci.org/bimlas/vim-high\"]\nimage:https://img.shields.io/github/license/bimlas/vim-high.svg[\"License\", link=\"LICENSE\"]\n\n[NOTE]\n====\nIt's in beta version (API and defaults may change) while I don't get enough\nresponse that everything works as expected.\n====\n\nimage::https://imgs.xkcd.com/comics/standards.png[\"Philosophy of the plugin\", link=\"https://xkcd.com/927/\"]\n\nimage::http://i.imgur.com/oFgLo29.png[\"Vim-High in action, showing the example config\", width=\"100%\"]\n\nTo try out, install in your preferred way, then enable a lighter by\n`:HighEnable \u003cC-D\u003e`.\n\nTo enable lighters by default, add the preferred ones to `g:high_lighter` as a\ndictionary in your _.vimrc_, like this:\n\n[source,viml]\n----\nlet g:high_lighters = {\n\\ '_': {                                                                  \u003c1\u003e\n\\   'blacklist': ['help', 'qf', 'lf', 'vim-plug'],                        \u003c2\u003e\n\\ },\n\\ 'inactive_window': {},                                                  \u003c3\u003e\n\\ 'indent': {'_hlgroupA': 'HighIndentA', '_hlgroupB': 'HighIndentB'},     \u003c4\u003e\n\\ 'long_line': {'hlgroup': 'DiffAdd'},\n\\ 'unite_directory': {},\n\\ 'your_custom_lighter': {'pattern': 'TODO\\|NOTE', 'hlgroup': 'ErrorMsg'} \u003c5\u003e\n\\ }\n----\n\u003c1\u003e The `_` key means these settings will affect every lighter,\n\u003c2\u003e for example all of them will be disabled in these filetypes.\n\u003c3\u003e You can add predefined lighters, whose can be found in\n    link:autoload/high/light/[] directory.\n\u003c4\u003e To override the global settings, pass the lighter-specific ones in the\n    dictionary.\n\u003c5\u003e You can create your own lighters as you want.\n\n== Override default settings\n\nBy default, every lighter in `g:high_lighters` are enabled at Vim startup, but\npassing `'enabled': 0` will disable it. To use the lighter, call `:HighEnable\nlighter` or `:HighToggle lighter`.\n\nThe available configuration parameters can be found in link:plugin/high.vim[]\nas `g:high.defaults`. Options starting with double underscore\n(`__init_function` for example) are private and you shouldn't override those.\nSee `:help matchadd` for `pattern` and `priority`; `:highlight` for\npossible values of `hlgroup`.\n\nSome lighters have specific settings, starting with an underscore (`_length`\nof link:autoload/high/light/long_line.vim[long_line] for example) are\nlighter-specific, the underscore is used only to prevent conflicts with global\nsettings, but you can safely override those.\n\nDo not fear to view the source files to get the possibilities, because there\nis no help file for the plugin, link:autoload/high/light[source codes] and\nlink:test[test files] contains everything.\n\n== Custom colors\n\nTo define your own `hlgroup`, take a look at `:help highlight`. Here are the\nhighlight groups of the example config, place it to your _.vimrc_:\n\n[source,viml]\n----\nautocmd ColorScheme,VimEnter *\n\\ highlight! HighIndentA guibg=#002029 guifg=#063642 |\n\\ highlight! HighIndentB guibg=#003542 guifg=#063642\n----\n\n== Dynamic update of highlighters\n\nSome lighters are based on Vim settings, for example\nlink:autoload/high/light/indent.vim[indent] uses `shiftwidth` to highlight the\nindentation. The highlighting will follow the change of it only on certain\nevents (jumping to another window, switching buffer, etc.). To apply the new\nsettings automatically, you have to write an autocommand in your _.vimrc_:\n\n[source,viml]\n----\nautocmd CursorHold *\n\\ let pos = winnr()\n\\ | windo call high#UpdateGroups()\n\\ | exe pos.'wincmd w'\n----\n\nIt will update every lighter where the `__update_function` is set.\n\n== Examples of user-defined highlight in Vim\n\nFor example, a very basic implentation of\nhttps://github.com/Valloric/vim-operator-highlight[Valloric/vim-operator-highlight]\nshould looks like this:\n\n[source,viml]\n----\nlet g:high_lighters = {\n\\ 'operator': {                                                            \u003c1\u003e\n\\   'pattern': '[-?+|*;:,\u003c\u003e\u0026|!~%=)({}.\\[\\]]',                              \u003c2\u003e\n\\   'blacklist': ['help', 'markdown', 'qf', 'conque_term', 'diff', 'html', \u003c3\u003e\n\\                 'css', 'less', 'xml', 'sh', 'bash', 'notes', 'jinja'],\n\\   'hlgroup': 'Error',                                                    \u003c4\u003e\n\\ }}\n----\n\u003c1\u003e Add a name to the lighter (which is not in use),\n\u003c2\u003e define the pattern to match,\n\u003c3\u003e add whitelist/blacklist,\n\u003c4\u003e choose a hlgroup from the existing ones.\n\n=== Vim Netrw filetype coloring\n\nThe plugin can be used in another plugins, for example if you want to colorize\nfiles by extension in Netrw (`:Explore`, `:edit ./`), then you can do\nsomething like this:\n\n[source,viml]\n----\nlet g:high_lighters = {\n\\ 'netrw_yaml': {\n\\   'whitelist': ['netrw'],\n\\   'pattern': '\\v^([|│] )*\\zs\\f+\\.yml',\n\\   'hlgroup': 'HighNetrwYaml',\n\\ },\n\\ 'netrw_asciidoc': {\n\\   'whitelist': ['netrw'],\n\\   'pattern': '\\v^([|│] )*\\zs\\f+\\.adoc',\n\\   'hlgroup': 'HighNetrwAsciidoc',\n\\ }}\n\nautocmd ColorScheme,VimEnter *\n\\ highlight! HighNetrwYaml guifg=#ae9400 |\n\\ highlight! HighNetrwAsciidoc guifg=#dd3a00\n----\n\nNote that `^([|│] )*` part is needed by tree view (most right picture on the\nscreenshot).\n\nimage::http://i.imgur.com/JkVorP9.png[\"Vim Netrw filetype coloring\"]\n\n== Plugins that inspired\n\n|===\nh| Name of lighter h| Original plugin\n\n| link:autoload/high/light/deep_indent.vim[deep_indent]\n| https://github.com/dodie/vim-disapprove-deep-indentation[dodie/vim-disapprove-deep-indentation]\n\n| link:autoload/high/light/inactive_window.vim[inactive_window]\n| https://github.com/blueyed/vim-diminactive[blueyed/vim-diminactive]\n\n| link:autoload/high/light/indent.vim[indent]\n| https://github.com/nathanaelkane/vim-indent-guides[nathanaelkane/vim-indent-guides]\n\n| link:autoload/high/light/long_line.vim[long_line]\n| https://github.com/whatyouhide/vim-lengthmatters[whatyouhide/vim-lengthmatters]\n\n| link:autoload/high/light/trailing_whitespace.vim[trailing_whitespace]\n| https://github.com/ntpeters/vim-better-whitespace[ntpeters/vim-better-whitespace]\n\n| link:autoload/high/light/words.vim[words]\n| https://github.com/lfv89/vim-interestingwords[lfv89/vim-interestingwords]\n|===\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbimlas%2Fvim-high","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbimlas%2Fvim-high","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbimlas%2Fvim-high/lists"}