https://github.com/virresh/comment_input
VSCode extension that enables providing input from a comment into the integrated terminal for code-runner
https://github.com/virresh/comment_input
comments competitive-programming extension hacktoberfest input terminal vscode vscode-extension
Last synced: about 1 month ago
JSON representation
VSCode extension that enables providing input from a comment into the integrated terminal for code-runner
- Host: GitHub
- URL: https://github.com/virresh/comment_input
- Owner: virresh
- License: mit
- Created: 2020-04-02T09:01:18.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T09:52:50.000Z (over 3 years ago)
- Last Synced: 2025-03-12T15:15:47.383Z (over 1 year ago)
- Topics: comments, competitive-programming, extension, hacktoberfest, input, terminal, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=virresh.cinp
- Size: 631 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
 
# Comment Input
Send input to your single-file applications with ease!
Just add a comment in your source with desired input and voila!
Aimed at competitive programmers and Data Scientists who spend time debugging small (single file) scripts.
## Features
- Select a custom keyphrase
- Supported for all languages that have a block comment and are supported by code-runner*
- Uses VSCode's internal comment settings, no need for extra configuration
- Uses integrated terminal, so you don't have to switch tabs often
- Set custom delay between code compilation and input
- No configuration required on Windows, MacOS and Linux with default VSCode installation**.
\* code-runner has some limitations and all those apply to this extension as well.
\*\* For non-default install locations, extension needs to be configured.
## Requirements
[code-runner](https://github.com/formulahendry/vscode-code-runner) is required for this extension to work since VSCode doesn't support hijacking terminal input.
Further, if the extension is not installed in default location, please configure `cinp.language_extension_resources_folder`. This is required due to a known issue.
On windows, integrated terminal with cmd is required. Powershell will not work.
## Extension Settings
* `cinp.trigger`: Set the keyword for comment identification. Default is "input".
* `cinp.input_delay`: Set the delay between code compilation and input in milliseconds. Default is "500".
* `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.
-----------------------------------------------------------------------------------------------------------
## Usage
A sample script looking as follows:
```python
"""input 4 "abc" """
i, j = input().split(" ")
print(int(i) + 100, j)
```
Similarly for c++:
```c++
#include
using namespace std;
/*input
4 "abc"
*/
int main(){
string s;
cin>>s;
cout<