{"id":15575990,"url":"https://github.com/virresh/comment_input","last_synced_at":"2026-05-05T08:38:20.797Z","repository":{"id":42900503,"uuid":"252405298","full_name":"virresh/comment_input","owner":"virresh","description":"VSCode extension that enables providing input from a comment into the integrated terminal for code-runner","archived":false,"fork":false,"pushed_at":"2023-03-04T09:52:50.000Z","size":646,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T15:15:47.383Z","etag":null,"topics":["comments","competitive-programming","extension","hacktoberfest","input","terminal","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=virresh.cinp","language":"TypeScript","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/virresh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.buymeacoffee.com/support4all","https://virresh.github.io/support"]}},"created_at":"2020-04-02T09:01:18.000Z","updated_at":"2021-10-29T16:10:47.000Z","dependencies_parsed_at":"2024-12-06T08:26:09.599Z","dependency_job_id":"08e2f300-0843-46b3-91d0-f4997bc740a7","html_url":"https://github.com/virresh/comment_input","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/virresh/comment_input","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virresh%2Fcomment_input","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virresh%2Fcomment_input/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virresh%2Fcomment_input/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virresh%2Fcomment_input/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/virresh","download_url":"https://codeload.github.com/virresh/comment_input/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virresh%2Fcomment_input/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266135014,"owners_count":23881774,"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":["comments","competitive-programming","extension","hacktoberfest","input","terminal","vscode","vscode-extension"],"created_at":"2024-10-02T18:41:30.696Z","updated_at":"2026-05-05T08:38:15.770Z","avatar_url":"https://github.com/virresh.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/support4all","https://virresh.github.io/support"],"categories":[],"sub_categories":[],"readme":"![Visual Studio Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/virresh.cinp) ![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/virresh.cinp?label=active%20users)\n\n# Comment Input  \n\nSend input to your single-file applications with ease!  \nJust add a comment in your source with desired input and voila!  \n\nAimed at competitive programmers and Data Scientists who spend time debugging small (single file) scripts.\n\n## Features\n\n- Select a custom keyphrase  \n- Supported for all languages that have a block comment and are supported by code-runner*  \n- Uses VSCode's internal comment settings, no need for extra configuration  \n- Uses integrated terminal, so you don't have to switch tabs often  \n- Set custom delay between code compilation and input\n- No configuration required on Windows, MacOS and Linux with default VSCode installation**. \n\n\\* code-runner has some limitations and all those apply to this extension as well.  \n\\*\\* For non-default install locations, extension needs to be configured.\n\n## Requirements\n[code-runner](https://github.com/formulahendry/vscode-code-runner) is required for this extension to work since VSCode doesn't support hijacking terminal input.\n\nFurther, if the extension is not installed in default location, please configure `cinp.language_extension_resources_folder`. This is required due to a known issue.\n\nOn windows, integrated terminal with cmd is required. Powershell will not work.\n\n## Extension Settings\n\n* `cinp.trigger`: Set the keyword for comment identification. Default is \"input\".\n* `cinp.input_delay`: Set the delay between code compilation and input in milliseconds. Default is \"500\".\n* `cinp.language_extension_resources_folder`: Set the Language Configuration folder. Automatically set on linux, mac and windows to default locations. Configure only if not a default installation.\n\n-----------------------------------------------------------------------------------------------------------\n\n## Usage\n\nA sample script looking as follows:  \n```python\n\"\"\"input 4 \"abc\" \"\"\"\ni, j = input().split(\" \")\nprint(int(i) + 100, j)\n```\n\nSimilarly for c++:\n```c++\n#include \u003ciostream\u003e\nusing namespace std;\n/*input\n4 \"abc\"\n*/\nint main(){\n    string s;\n    cin\u003e\u003es;\n    cout\u003c\u003cs\u003c\u003c\"\\n\";\n}\n```\n\nwill be executed with `4 \"abc\"` sent to stdin of the terminal. \n\n![Demo](images/demo.gif)\n\n## Known Issues\n- VSCode doesn't provide an api to read the language settings yet. Thus, I've used a workaround which is not guaranteed to work if your settings are saved in a different location. Issue Link: https://github.com/microsoft/vscode/issues/2871  \n- There is a delay between sending input and code compilation / execution. Thus, it's possible that delay isn't long enough to account for compilation failures.  \n- The extension works only if cmd is used as the default terminal profile on Windows.  \n- Depending on your python version / platform, adding a newline after input might or might not work as expected. Best is to start input from the same line as trigger keyword.  \n- The input is sent all at once, so if compilation / interpreter failed, then the input is still sent. This is a limitation because there's no way to know the result of compilation / interpreter from previous step.  \n\n## Contributing\nPeople are invited to help out with code / tests / documentation. Please send PRs / file issues on Github repository itself.\n\n## FAQ\n* Block comments not working in Python!  \n  Please ensure that you are using the correct block comment character. Python supports multiline strings with both `\"\"\"` and `'''`. The one that is set to block comment character in VSCode's language settings is the one that is used. It defaults to `\"\"\"`.\n\n### Acknowledgement\nA [similar extension](https://packagecontrol.io/packages/Sublime%20Input) exists in sublime-text as well.  \nIcon credits: Terminal Icon from [freepik.com](https://www.flaticon.com/authors/freepik) / [flaticon.com](www.flaticon.com). Edited myself via Inkscape.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirresh%2Fcomment_input","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvirresh%2Fcomment_input","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirresh%2Fcomment_input/lists"}