{"id":16215685,"url":"https://github.com/guicassolato/tothom","last_synced_at":"2025-03-19T10:30:23.653Z","repository":{"id":113878895,"uuid":"582948490","full_name":"guicassolato/tothom","owner":"guicassolato","description":"Yet another markdown preview VSCode extension with executable code blocks in the terminal.","archived":false,"fork":false,"pushed_at":"2023-11-27T13:30:18.000Z","size":7131,"stargazers_count":7,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-17T06:02:53.066Z","etag":null,"topics":["markdown","run-in-terminal","visual-studio-code"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=guicassolato.tothom","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guicassolato.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-12-28T10:14:50.000Z","updated_at":"2024-03-06T04:34:45.000Z","dependencies_parsed_at":"2023-11-27T13:49:23.277Z","dependency_job_id":null,"html_url":"https://github.com/guicassolato/tothom","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guicassolato%2Ftothom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guicassolato%2Ftothom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guicassolato%2Ftothom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guicassolato%2Ftothom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guicassolato","download_url":"https://codeload.github.com/guicassolato/tothom/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244407602,"owners_count":20447819,"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":["markdown","run-in-terminal","visual-studio-code"],"created_at":"2024-10-10T11:15:49.616Z","updated_at":"2025-03-19T10:30:22.844Z","avatar_url":"https://github.com/guicassolato.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tothom\n\nTothom is YAMP (_Yet Another Markdown Preview_) [Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=guicassolato.tothom),\nthat gives you nice \u003ckbd\u003e▶️\u003c/kbd\u003e _Run in terminal_ buttons for your code blocks\n\n## Features\n\n- Markdown preview (\u003ckbd\u003e⇧ ⌘ P\u003c/kbd\u003e\u003c/kbd\u003e _Tothom: Markdown Preview_)\n- \u003ckbd\u003e▶️\u003c/kbd\u003e _Run in terminal_ actions for code blocks (auto-generated)\n- Alternative to run code blocks in a separate shell in the background (output appended to the preview)\n- GitHub styling\n- Syntax highlight for code blocks\n- Dark/light mode\n- ANSI escape sequences to HTML (for code block output appended to the preview)\n- Follow links between local markdown files\n- Anchor links\n- Tasks/TODO lists (with [markdown-it-task-lists](https://www.npmjs.com/package/markdown-it-task-lists))\n- HTML tag attributes (with [markdown-it-attrs](https://www.npmjs.com/package/markdown-it-attrs))\n- Automatic reload of the preview on edit of the source markdown file\n- Independent preview tabs for each markdown file\n- Force preview reload (\u003ckbd\u003e⇧ ⌘ P\u003c/kbd\u003e\u003c/kbd\u003e _Tothom: Reload Preview_)\n- Bind an existing terminal to a preview (a dedicated one is automatically created otherwise)\n- Native VSCode _Find_ widget enabled in the preview\n\n## Usage\n\n![Usage](./resources/usage.gif)\n\n1. Open a markdown file that contains code blocks annotated in any of the supported languages (bash/sh/zsh), e.g.:\n   \u003cpre\u003e\n   # Hello World!\n   ```sh\n   echo 'Hello World!'\n   ```\n   \u003c/pre\u003e\n2. Run the **_Tothom: Markdown Preview_** command (\u003ckbd\u003e⇧ ⌘ P\u003c/kbd\u003e)\n3. Click on the \u003ckbd\u003e▶️\u003c/kbd\u003e button automatically rendered with each of your code blocks, to run the code in the Visual Studio Code terminal.\n\nFor more examples with more markdown syntax, check the [samples](samples/tothom.md).\n\n### Re-use a terminal\n\nTothom binds each preview window to an integrated Visual Studio terminal.\nWhen a terminal does not exist, Tothom creates a dedicated one at the time when the first \u003ckbd\u003e▶️\u003c/kbd\u003e _Run in terminal_ action is executed.\n\nTo bind a new preview window to an existing terminal, use the command \u003ckbd\u003e⇧ ⌘ P\u003c/kbd\u003e _Tothom: Markdown Preview (existing terminal)_.\n\nTo re-bind a preview window to an existing terminal, activate the preview and execute the command \u003ckbd\u003e⇧ ⌘ P\u003c/kbd\u003e _Tothom: Select terminal_.\n\nThese options allow to share a terminal across multiple preview windows.\n\nTo clear the current binding of a preview to a terminal, activate the preview window and execute the command \u003ckbd\u003e⇧ ⌘ P\u003c/kbd\u003e _Tothom: Clear terminal selection_.\n\n### Run in a separate shell in the background (output appended to the preview)\n\nAlternatively to running a code block in an integrated Visual Studio terminal, enable the option in the settings to default to running in a separate shell in the background (`tothom.runInBackgroundByDefault`).\nNew preview windows and preview windows not yet bound to a terminal will execute code blocks in the background and the output of the executions appended to the preview window.\n\n![Run in background](./resources/run-in-background.gif)\n\nKeep in mind that, with this option enabled, each execution of a code block will run in an independent shell (separate child process).\nTo set and re-use environment variable values across multiple code blocks, enable the `tothom.propagateEnv` configuration option.\n\nThis option is ignored if the preview is currently bound to a terminal (e.g. by using the 'Select terminal' command).\nIf needed, clear the current binding of a preview to a terminal after enabling this option by activating the preview window and executing the command \u003ckbd\u003e⇧ ⌘ P\u003c/kbd\u003e _Tothom: Clear terminal selection_.\n\n## Extension Settings\n\n| Setting                           | Description                                                                                                      | Options/Default                   |\n|-----------------------------------|------------------------------------------------------------------------------------------------------------------|-----------------------------------|\n| `tothom.bracketedPasteMode`       | Apply bracketed paste sequences on commands sent to terminal                                                     | `true` (default), `false`         |\n| `tothom.colorScheme`              | Color scheme of the preview panel                                                                                | `auto` (default), `light`, `dark` |\n| `tothom.runInTerminalLabel`       | Label of the _Run in terminal_ button                                                                            | Default: `▶️`                      |\n| `tothom.runInBackgroundByDefault` | Default to running code blocks in a separate child process in the background instead of the integrated terminal  | `true`, `false` (default)         |\n| `tothom.propagateEnv`             | Propagates environment variables across executions when running code blocks in separate shells in the background | `true` (default), `false`         |\n\n## Limitations\n\n**Markdown syntax for code blocks only**\u003cbr/\u003e\nCode block execution only works with markdown code block syntax (delimited by ```).\nTothom will not render the \u003ckbd\u003e▶️\u003c/kbd\u003e _Run in terminal_ button for code blocks written using HTML syntax (`\u003cpre\u003e`).\n\n## Release Notes\n\nCheck the the full release notes in the [Change Log](./CHANGELOG.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguicassolato%2Ftothom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguicassolato%2Ftothom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguicassolato%2Ftothom/lists"}