{"id":15405871,"url":"https://github.com/elia/vscode-textmate","last_synced_at":"2026-02-16T12:02:15.570Z","repository":{"id":157372078,"uuid":"633446410","full_name":"elia/vscode-textmate","owner":"elia","description":"TextMate features and keybindings for Visual Studio Code","archived":false,"fork":false,"pushed_at":"2025-09-30T07:50:38.000Z","size":686,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-30T09:28:01.901Z","etag":null,"topics":["textmate","vscode","vscode-extension","vscode-keybindings"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=elia.vscode-textmate","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/elia.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-04-27T14:11:33.000Z","updated_at":"2025-09-30T07:50:42.000Z","dependencies_parsed_at":"2023-11-17T14:09:47.343Z","dependency_job_id":"3b1a909f-a35a-4b3e-9a1a-587038e58435","html_url":"https://github.com/elia/vscode-textmate","commit_stats":null,"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"purl":"pkg:github/elia/vscode-textmate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fvscode-textmate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fvscode-textmate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fvscode-textmate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fvscode-textmate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elia","download_url":"https://codeload.github.com/elia/vscode-textmate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elia%2Fvscode-textmate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29507436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["textmate","vscode","vscode-extension","vscode-keybindings"],"created_at":"2024-10-01T16:18:49.224Z","updated_at":"2026-02-16T12:02:15.563Z","avatar_url":"https://github.com/elia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TextMate for Visual Studio Code\n\n\u003c!-- \u003cimg src=\"./icon.png\" width=\"36\" align=\"top\" style=\"width:1.4em;vertical-align:middle;line-height:0;\"\u003e --\u003e\n\nThis extension aims at recreating the TextMate experience in Visual Studio Code. \n\n## Features\n\n### TextMate Commands\n\nExecute arbitrary scripts with configurable input/output handling via keyboard shortcuts. Define commands directly in your `keybindings.json` with full control over execution context.\n\n#### Usage\n\nAdd keybindings to your `keybindings.json`:\n\n```json\n{\n  \"key\": \"ctrl+alt+cmd+t\",\n  \"command\": \"vscode-textmate.command\",\n  \"when\": \"editorTextFocus\",\n  \"args\": {\n    \"script\": \"#!/usr/bin/env bash\\n\\nopen \\\"$TM_PROJECT_DIRECTORY\\\" -a Terminal.app\",\n    \"save\": \"currentDocument\",\n    \"input\": \"none\",\n    \"output\": \"discard\"\n  }\n}\n```\n\n#### Arguments\n\n- **`script`** (string): Shell script to execute (supports shebang)\n- **`save`**: Document saving - `\"none\"` | `\"currentDocument\"` | `\"allDocuments\"`\n- **`input`**: Input source - `\"selection\"` | `\"document\"` | `\"line\"` | `\"word\"` | `\"character\"` | `\"scope\"` | `\"none\"`\n- **`output`**: Output handling - `\"replaceInput\"` | `\"replaceSelection\"` | `\"replaceDocument\"` | `\"insertText\"` | `\"insertAsSnippet\"` | `\"newDocument\"` | `\"showAsHTML\"` | `\"showAsTooltip\"` | `\"discard\"`\n- **`outputFormat`**: Output format - `\"text\"` | `\"snippet\"` | `\"HTML\"`\n- **`caretPlacement`**: Caret positioning - `\"afterOutput\"` | `\"selectOutput\"` | `\"characterInterpolation\"` | `\"lineInterpolation\"` | `\"Heuristic\"`\n\n#### Environment Variables\n\nScripts receive TextMate-style environment variables:\n\n- `TM_SELECTED_TEXT` - Currently selected text\n- `TM_CURRENT_LINE` - Current line content\n- `TM_CURRENT_WORD` - Current word at cursor\n- `TM_FILENAME` - Current file name\n- `TM_FILEPATH` - Current file path\n- `TM_DIRECTORY` - Current file directory\n- `TM_PROJECT_DIRECTORY` - Workspace root directory\n- `TM_LINE_INDEX` - Current line (0-based)\n- `TM_LINE_NUMBER` - Current line (1-based)\n- `TM_COLUMN_NUMBER` - Current column (1-based)\n\n#### Examples\n\n**Text transformation:**\n```json\n{\n  \"key\": \"ctrl+u\",\n  \"command\": \"vscode-textmate.command\",\n  \"when\": \"editorTextFocus\",\n  \"args\": {\n    \"script\": \"tr '[:lower:]' '[:upper:]'\",\n    \"input\": \"selection\",\n    \"output\": \"replaceInput\"\n  }\n}\n```\n\n**Insert timestamp:**\n```json\n{\n  \"key\": \"ctrl+alt+d\",\n  \"command\": \"vscode-textmate.command\",\n  \"when\": \"editorTextFocus\",\n  \"args\": {\n    \"script\": \"date +%Y-%m-%d\",\n    \"input\": \"none\",\n    \"output\": \"insertText\"\n  }\n}\n```\n\n**Sort lines:**\n```json\n{\n  \"key\": \"ctrl+alt+s\",\n  \"command\": \"vscode-textmate.command\",\n  \"when\": \"editorTextFocus\",\n  \"args\": {\n    \"script\": \"sort\",\n    \"input\": \"selection\",\n    \"output\": \"replaceInput\"\n  }\n}\n```\n\n### Keybindings\n\nA good amount of keybindings have been ported from TextMate.\n\n### `windowTitle`\n\nYou can now use `scmBranchName` in the `windowTitle` setting.\n\n### `closeOtherEditors`, `closeEditorInAllGroups`\n\nFix the default VSCode behavior of asking to save unsaved files when closing editors.\nThese commands will close specified editors except any \"dirty\" or \"pinned\" editor.\n\n### `openProject`\n\nOpen a project in a new window, selecting from subfolders of the folders listed in the `projectFolders` setting.\n\n### `openQuickly`\n\nQuick file opener that replaces VS Code's default \"Open Quickly…\" command with TextMate's behavior. Press \u003ckbd\u003e⌘T\u003c/kbd\u003e to open a searchable list of all files in the workspace, filtered intelligently to exclude common build artifacts and dependencies. Uses the same selection interface as other TextMate commands for a consistent experience.\n\n### `selectFromList` (internal)\n\nProvides a flexible UI for selecting items from a list. Shows a webview-based selection interface that allows for multi-selection from a provided array of items.\nCan be used by other extensions as a nearly drop-in replacement for `showQuickPick`.\n\n#### Command Usage\n\n```js\npicks = await vscode.commands.executeCommand(\n  \"vscode-textmate.showSelectFromList\",\n  items,\n  options\n)\n```\n\n#### Parameters\n\n- **`items`** (array, required): Array of items to select from. Items can be:\n  - Strings: `\"Item 1\"`\n  - Numbers/Booleans: `42`, `true`\n  - Objects: `{ label: \"Custom Item\", description: \"Optional description\" }`\n\n- **`options`** (object, optional): Configuration options\n  - **`title`** (string): Title displayed in the selection interface (default: `\"Select From List\"`)\n  - **`renderAs`** (string): Where to show the interface:\n    - `\"sidebar\"`: Shows in dedicated sidebar view\n    - `\"panel\"`: Opens in webview panel\n    - Defaults to user's `vscode-textmate.selectFromList.renderAs` setting\n\n#### Examples\n\n```js\n// Simple string selection\nconst picks = await vscode.commands.executeCommand(\n  \"vscode-textmate.showSelectFromList\",\n  [\"Option 1\", \"Option 2\", \"Option 3\"],\n  { title: \"Choose Options\" }\n)\n\n// Mixed item types with custom rendering\nconst picks = await vscode.commands.executeCommand(\n  \"vscode-textmate.showSelectFromList\",\n  [\n    \"Simple string\",\n    { label: \"Complex Item\", description: \"With description\" },\n    42,\n    true\n  ],\n  {\n    title: \"Mixed Selection\",\n    renderAs: \"panel\"\n  }\n)\n```\n\n### File Operations\n\n| Name         | Command       | Keybinding    |\n| ------------ | ------------- | ------------- |\n| Open Quickly | `openQuickly` | \u003ckbd\u003e⌘T\u003c/kbd\u003e |\n\n### Navigation\n\nYou can now navigate between brackets and blocks using `ctrl` with `up` and `down`, adding `shift` to also update the selection.\n\n| Name                          | Command                                     | Keybinding     |\n| ----------------------------- | ------------------------------------------- | -------------- |\n| Jump to Selection             | `jumpToSelection`                           | \u003ckbd\u003e⌘J\u003c/kbd\u003e  |\n| Move to beginning of Block    | `moveToBeginningOfBlock`                    | \u003ckbd\u003e⌃⭡\u003c/kbd\u003e  |\n| Move to end of Block          | `moveToEndOfBlock`                          | \u003ckbd\u003e⌃⭣\u003c/kbd\u003e  |\n| Select to beginning of Block  | `moveToBeginningOfBlockAndModifySelection`  | \u003ckbd\u003e⌃⇧⭡\u003c/kbd\u003e |\n| Select to end of Block        | `moveToEndOfBlockAndModifySelection`        | \u003ckbd\u003e⌃⇧⭣\u003c/kbd\u003e |\n| Move to beginning of Column   | `moveToBeginningOfColumn`                   | \u003ckbd\u003e⌥⭡\u003c/kbd\u003e  |\n| Move to end of Column         | `moveToEndOfColumn`                         | \u003ckbd\u003e⌥⭣\u003c/kbd\u003e  |\n| Select to beginning of Column | `moveToBeginningOfColumnAndModifySelection` | \u003ckbd\u003e⌥⇧⭡\u003c/kbd\u003e |\n| Select to end of Column       | `moveToEndOfColumnAndModifySelection`       | \u003ckbd\u003e⌥⇧⭣\u003c/kbd\u003e |\n| Jump to Selection             | `jumpToSelection`                           | \u003ckbd\u003e⌘J\u003c/kbd\u003e  |\n\n### Editing\n\n| Name        | Command      | Keybinding     |\n| ----------- | ------------ | -------------- |\n| Join Lines  | `joinLines`  | \u003ckbd\u003e⌃⇧J\u003c/kbd\u003e |\n| Toggle Case | `toggleCase` | \u003ckbd\u003e⌃_\u003c/kbd\u003e  |\n| Transpose   | `transpose`  | \u003ckbd\u003e⌃T\u003c/kbd\u003e  |\n\n_All commands are under the `vscode-textmate` namespace, e.g. `vscode-textmate.moveToEndOfColumn`._\n\n## Troubleshooting\n\n**VS Code plays a sound with some keybindings:** https://superuser.com/a/1530872\n\n## License\n\n[MIT](LICENSE)\n\n[Icon by Marc Oliver Orth](https://github.com/marc2o/TextMate-macOS-Icon/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felia%2Fvscode-textmate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felia%2Fvscode-textmate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felia%2Fvscode-textmate/lists"}