{"id":20830008,"url":"https://github.com/bimlas/vim-eightheader","last_synced_at":"2025-10-27T18:09:15.288Z","repository":{"id":17065566,"uuid":"19830320","full_name":"bimlas/vim-eightheader","owner":"bimlas","description":"Vim plugin: Easily create custom headlines, foldtext, toc, etc","archived":false,"fork":false,"pushed_at":"2024-02-04T18:32:38.000Z","size":21,"stargazers_count":18,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T14:40:22.853Z","etag":null,"topics":["folding","foldtext","headline","neovim","table-of-contents","title","vim","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/bimlas.png","metadata":{"files":{"readme":"README.adoc","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-05-15T18:20:56.000Z","updated_at":"2024-05-20T16:59:20.000Z","dependencies_parsed_at":"2024-11-17T23:39:33.134Z","dependency_job_id":null,"html_url":"https://github.com/bimlas/vim-eightheader","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-eightheader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimlas%2Fvim-eightheader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimlas%2Fvim-eightheader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bimlas%2Fvim-eightheader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bimlas","download_url":"https://codeload.github.com/bimlas/vim-eightheader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252961841,"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":["folding","foldtext","headline","neovim","table-of-contents","title","vim","vim-plugin"],"created_at":"2024-11-17T23:22:54.419Z","updated_at":"2025-10-27T18:09:15.181Z","avatar_url":"https://github.com/bimlas.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"= EightHeader\n\nEasily create custom headlines, foldtext, toc, etc.\n\n* https://github.com/bimlas/vim-eightheader (please star if you like it)\n* http://www.vim.org/scripts/script.php?script_id=4930 (please rate if you using it)\n\nTo use EightHeader just move the cursor to the line which you want to modify (hereinafter `line`), then call it:\n\n[source]\n----\nEightHeader( {length}, {align}, {oneline}, {decor}, {marker}, {str} )\n\n{length}   Length of the header.\n{align}    Alignment of text.\n{oneline}  If false, then underline the {line} with {decor}.\n{decor}    Decorator text to fill with.\n{marker}   Extra content after decotRightEnd.\n{str}      Replace the content of {line} with this.\n----\n\nAn example with {oneline} set to true (1) (`s:str` means the original line,\nsee `EightHeaderVars` for details):\n\n[source]\n----\ncall EightHeader( 78, 'center', 1, ['l ', 'decor', ' r'], ' m', '\\=\" \".s:str.\" \"' )\n\nl decordecordecordecordeco TEXT IN THE LINE cordecordecordecordecord r m\n----\n\n\\... and false (0):\n\n[source]\n----\ncall EightHeader( 78, 'center', 0, ['l ', 'decor', ' r'], ' m', '' )\n\n                            TEXT IN THE LINE                            m\nl decordecordecordecordecordecordecordecordecordecordecordecordecordec r\n----\n\nIf you don't like the default `'foldtext'` you can customize it by setting to\n`EightHeaderFolds()`.\n\nFor example the closed folds looks like this by default:\n\n[source]\n----\n+-- 45 lines: Fold level one\n+--- 67 lines: Fold level two\n----\n\nIf you would like to change it to this kind:\n\n[source]\n----\nFold level one................45 lines\n  Fold level two..............67 lines\n----\n\n\\... then you can use this function:\n\n[source]\n----\nlet \u0026foldtext = \"EightHeaderFolds( '\\\\=s:fullwidth-2', 'left', [ repeat( '  ', v:foldlevel - 1 ), '.', '' ], '\\\\= s:foldlines . \\\" lines\\\"', '' )\"\n----\n\nAn alternative usage for example formating a vimhelp table of contents:\n\n[source]\n----\nOptions;options\nDefault mappings;maps\n  Launch nuclear strike;apocalypse\n----\n\n\\... to this:\n\n[source]\n----\nOptions........................................................|options|\nDefault mappings..................................................|maps|\n  Launch nuclear strike.....................................|apocalypse|\n----\n\nVisually select the lines, than:\n\n[source]\n----\ncall EightHeader( 78, \"left\", 1, \".\", \"\\\\='|'.matchstr(s:str, ';\\\\@\u003c=.*').'|'\", \"\\\\=matchstr(s:str, '.*;\\\\@=')\" )\n----\n\n== Install\n\n*Manually:*\n\nhttps://github.com/bimlas/vim-eightheader/archive/master.zip[Download]\nand unzip the subdirectories into '~/.vim'.\n\nDon't forget to regenerate helptags:\n\n[source]\n----\n:helptags ~/.vim/doc\n----\n\n*https://github.com/tpope/vim-pathogen[Pathogen]:*\n\n\\... into '~/.vim/bundle' (or to your specific pathogen directory).\n\nDon't forget to regenerate helptags:\n\n[source]\n----\n:Helptags\n----\n\n*https://github.com/gmarik/Vundle.vim[Vundle]:*\n\nAdd these lines to your '.vimrc' after `call vundle#rc()`:\n\n[source]\n----\nPlugin 'bimlas/vim-eightheader'\n----\n\nOpen vim again, then call `:PluginInstall`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbimlas%2Fvim-eightheader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbimlas%2Fvim-eightheader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbimlas%2Fvim-eightheader/lists"}