{"id":19295341,"url":"https://github.com/vict0rsch/coblock","last_synced_at":"2025-04-22T08:30:44.863Z","repository":{"id":51708849,"uuid":"210472556","full_name":"vict0rsch/coblock","owner":"vict0rsch","description":"Improve code readability by inserting styled headers as block comments to describe an important step in your Python, Java, Javascript code, YAML config and many more","archived":false,"fork":false,"pushed_at":"2022-02-12T14:26:34.000Z","size":95,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T21:11:20.990Z","etag":null,"topics":["bash","code-formatter","comment-system","java","javascript","open-source","python","rust","vscode","vscode-extension","yaml"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=vict0rsch.coblock","language":"JavaScript","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/vict0rsch.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-23T23:50:27.000Z","updated_at":"2022-05-10T10:46:35.000Z","dependencies_parsed_at":"2022-08-03T08:46:40.472Z","dependency_job_id":null,"html_url":"https://github.com/vict0rsch/coblock","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/vict0rsch%2Fcoblock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vict0rsch%2Fcoblock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vict0rsch%2Fcoblock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vict0rsch%2Fcoblock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vict0rsch","download_url":"https://codeload.github.com/vict0rsch/coblock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250206006,"owners_count":21392165,"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":["bash","code-formatter","comment-system","java","javascript","open-source","python","rust","vscode","vscode-extension","yaml"],"created_at":"2024-11-09T22:42:10.516Z","updated_at":"2025-04-22T08:30:44.560Z","avatar_url":"https://github.com/vict0rsch.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://i.postimg.cc/RFzdtfsv/Capture-d-e-cran-2019-09-26-a-08-36-20.png\" height=\"300\" width=\"400\" center /\u003e\n\u003c/p\u003e\n\n# CoBlock: Creating a comment block 📦\n\n📌 The goal of this simple extension is to create comments that structure your code by describing what's in it:\n\n![usageGif](https://s3.gifyu.com/images/ezgif.com-resize-15da7ed4f4f79417c.gif)\n\n## Usage 💡\n\nIn short:\n\n1. write some content\n2. press `cmd/ctrl + shift + K`\n   * (If your content is on multiple lines, select those lines before pressing the keys)\n\nExample:\n\n```python\nfor i in range(n):\n    # ----------------------\n    # ----- Start loop -----\n    # ----------------------\n    dosomething()\n\n    # -----------------------------------------\n    # ----- This is an interesting part   -----\n    # ----- of your superb code.          -----\n    # ----- Share it with your community! -----\n    # -----------------------------------------\n\n    dosomethingelse()\n\n    # -----------------------\n    # ----- End of loop -----\n    # -----------------------\n\n# -----------------------------\n# ----- Do Something Else -----\n# -----------------------------\n```\n\nYou have 2️⃣ options:\n\n* write \"Start Loop\" then `cmd/ctrl + shift + K` 🔆\n  * this will transform the current line into a block comment, as above\n  * `ctrl/cmd + shift + P` (command palette) then look for \"Line to block comment\"\n* `ctrl/cmd + shift + P` (command palette) then look for \"Block comment from input\", then type in \"Start Loop\" 💬\n  * this will add the above same kind of comment block where your cursor currently is\n\n✂️ If you're using the Python 🐍 extension and have set pep8's `max-line-length` argument (88 for Black ◾️ formatter for instance), the extension will abide by it and break the comment into multiple lines before writing the block.\nOtherwise it will use the standard max line length of 79.\n\n### Update existing CoBlock\n\nJust change the content, and `cmd/ctrl + shift + K` again! To add a line, easiest is to just copy paste an existing line and change it. Contribute if you feel that's lame :)\n\n*Warning:* when pressing the keys, make sure the cursor is actually *inside* the CoBlock. \n\nYour CoBlock will be indented as the **first line** of your selection.\n\n### Configuration ⚙️\n\nYou can customize 🖌\n\n* the character that draws the box (default: `-`) \n* the number of spaces around your text in the box (default: `1`)\n* the number of blank lines between your text and the box's border (default: `0`)\n* the height and width of the box's border (default: `1` and `5`)\n* prefer block over inline syntax for comments (default: `false`) when applicable (`c`, `c++`, `java`, `javascript`, `php`, `ruby`, `rust`, `scala` ... )\n* if your coblock is multiline, you can control its content's alignment (layout `left`, `center`, `right`)\n\nFor intance with **this configuration**:\n\n![config image](https://i.postimg.cc/kG4zPhG4/Capture-d-e-cran-2019-09-26-a-00-44-01.png)\n\nYou'll get **this kind of output**:\n\n![long comment](https://i.postimg.cc/V6sHXHjR/Capture-d-e-cran-2019-09-26-a-00-42-54.png)\n\n|                          preferBlockComments: `true`                          |                         preferBlockComments: `false`                          |\n| :---------------------------------------------------------------------------: | :---------------------------------------------------------------------------: |\n| ![](https://i.postimg.cc/hjCckZGs/Capture-d-e-cran-2019-09-29-a-23-40-10.png) | ![](https://i.postimg.cc/KzshqK9s/Capture-d-e-cran-2019-09-29-a-23-39-57.png) |\n\n\n### Supported Languages 📟\n\n**CoBlock** is available when working with these languages:\n\n* bat\n* c\n* c++\n* clojure\n* coffeescript\n* csharp\n* css\n* dockerfile\n* go\n* html\n* ignore\n* java\n* javascript\n* javascriptreact\n* jsonc\n* latex\n* less\n* lua\n* makefile\n* matlab\n* objective-c\n* objective-cpp\n* perl\n* php\n* powershell\n* properties\n* python\n* r\n* ruby\n* rust\n* scala\n* shellscrip\n* sql\n* ssh_config\n* swift\n* xml\n* yaml\n\n### Disclaimer\n\nThis is my first VSCode extension. Things may not be optimimal. \n\nI'm open to help for improvements! Use **PRs** and **issues** 📣 to help or suggest the addition of a language, different comment styles etc.\n\n### To Do\n\n* Revert Cobloc (leave only content)\n* Easier add line to coblock (instead of copying previous one and updating content)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvict0rsch%2Fcoblock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvict0rsch%2Fcoblock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvict0rsch%2Fcoblock/lists"}