{"id":22118537,"url":"https://github.com/znielsen/nvim-blockformatter","last_synced_at":"2025-07-22T22:33:48.841Z","repository":{"id":41126500,"uuid":"439406275","full_name":"ZNielsen/nvim-blockformatter","owner":"ZNielsen","description":"A small block formatting plugin for Neovim","archived":false,"fork":false,"pushed_at":"2024-11-01T14:22:14.000Z","size":40075,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T07:04:40.187Z","etag":null,"topics":["hacktober2022","hacktoberfest","lua","neovim"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/ZNielsen.png","metadata":{"files":{"readme":"README.md","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":"2021-12-17T17:11:31.000Z","updated_at":"2024-11-01T14:22:18.000Z","dependencies_parsed_at":"2024-12-01T14:02:11.061Z","dependency_job_id":null,"html_url":"https://github.com/ZNielsen/nvim-blockformatter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ZNielsen/nvim-blockformatter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZNielsen%2Fnvim-blockformatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZNielsen%2Fnvim-blockformatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZNielsen%2Fnvim-blockformatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZNielsen%2Fnvim-blockformatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZNielsen","download_url":"https://codeload.github.com/ZNielsen/nvim-blockformatter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZNielsen%2Fnvim-blockformatter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266586122,"owners_count":23952170,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["hacktober2022","hacktoberfest","lua","neovim"],"created_at":"2024-12-01T13:51:52.631Z","updated_at":"2025-07-22T22:33:48.820Z","avatar_url":"https://github.com/ZNielsen.png","language":"Lua","readme":"# nvim-blockformatter\nA small block formatting plugin for Neovim\n\n| Command                              | Description                                                                 |\n|--------------------------------------|-----------------------------------------------------------------------------|\n| `BlockFormatterNormalize \u003carg\u003e`      | Formats a block of text to wrap at the specified column.                    |\n| `BlockFormatterNormalizeRange \u003carg\u003e` | Formats a visual range of text to wrap at the specified column.             |\n| `BlockFormatterComment`              | Toggles a leading comment for the line. May take a leading count argument.  |\n| `BlockFormatterCommentRange`         | Toggles a leading comment for a visual range.                               |\n| `BlockFormatterAlign`                | Format trailing content to be in the same column. Takes leading count arg.  |\n| `BlockFormatterAlignRange`           | Format trailing content to be in the same column. Uses visual range.        |\n| `BlockFormatterAlignAuto`            | Format trailing content to be in the same column. See helpfile.             |\n\n\nTo use, just `Plug 'ZNielsen/nvim-blockformatter'` or similar. Mappings are recommended, as the command names are a bit verbose. Suggestions are below.\n\nThe minimap in the examples is [minimap.vim](https://github.com/wfxr/minimap.vim).\n\n## Examples\n### Block Normalization\n![Block Normalization Example](https://raw.githubusercontent.com/znielsen/nvim-blockformatter/main/.github/images/block_normalizer_example.gif)\n\n#### Example Maps\n```\nnnoremap \u003cleader\u003ebn100 :\u003cC-U\u003esilent lua require(\"blockformatter.block_normalize\").normalize_block_normal(vim.v.count1, 100)\u003cCR\u003e\nnnoremap \u003cleader\u003ebn80  :\u003cC-U\u003esilent lua require(\"blockformatter.block_normalize\").normalize_block_normal(vim.v.count1, 80)\u003cCR\u003e\nvnoremap \u003cleader\u003ebn100 :\u003cC-U\u003esilent lua require(\"blockformatter.block_normalize\").normalize_block_visual(100)\u003cCR\u003e\nvnoremap \u003cleader\u003ebn80  :\u003cC-U\u003esilent lua require(\"blockformatter.block_normalize\").normalize_block_visual(80)\u003cCR\u003e\n```\n\n### Block Commenting\n![Block Commenting Example](https://raw.githubusercontent.com/znielsen/nvim-blockformatter/main/.github/images/block_commenter_example.gif)\n\n#### Settings\n- `g:prefer_wrapping_comments` (default 0) - For filetypes that support both line comments and wrapping comments, set to true to prefer wrap-style comments\n    - Example: C has `//` and `/* */`. Set to `0` (default) would yield `// \u003cline\u003e`. Set to `1` would yield `/* \u003cline\u003e */`.\n\n#### Example Maps\n```\nnnoremap \\\\ :\u003cC-U\u003esilent lua require('blockformatter.block_comment').toggle_comment_normal(vim.v.count1)\u003cCR\u003e\nvnoremap \\\\ :\u003cC-U\u003esilent lua require('blockformatter.block_comment').toggle_comment_visual()\u003cCR\u003e\n```\n#### Supported filetypes\n- Javascript\n- Dockerfile\n- sshconfig\n- Markdown\n- groovy\n- Python\n- golang\n- Rust\n- Ruby\n- Bash\n- Yaml\n- Toml\n- HTML\n- Lua\n- Cpp\n- CSS\n- Zig\n- Vim\n- sh\n- C\n\n### Block Alignment\n![Block Alignment Example](https://raw.githubusercontent.com/znielsen/nvim-blockformatter/main/.github/images/block_aligner_example.gif)\n\n#### Example Maps\n```\nnnoremap \u003cleader\u003eba :\u003cC-U\u003esilent lua require(\"blockformatter.block_align\").token_align_auto()\u003cCR\u003e\nvnoremap \u003cleader\u003eba :\u003cC-U\u003esilent lua require(\"blockformatter.block_align\").token_align_visual()\u003cCR\u003e\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznielsen%2Fnvim-blockformatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fznielsen%2Fnvim-blockformatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznielsen%2Fnvim-blockformatter/lists"}