How to Give Input in Sublime Text?
Prerequisite: How to Install Sublime Text3 in Windows?
Sublime text is one of the most popular text editors out there. It’s popular among programmers for its easy-to-use interface and attractive UI. Through the Sublime Input plugin, it is now easier to set up your C++ environment.
Setting up Sublime Text with Sublime Input plugin
Step 1: After installing Sublime Text, open the command palette by selecting Tools -> Command Palette or using Ctrl+Shift+P (for windows users)

Step 2: Type Install package control to install the package controller for sublime text. The package controller helps in downloading different packages for sublime text.


Step 3: Type Package Control: Install Package in the command palette and search for Sublime Input Plugin.

Step 4: After installing the Sublime Input Plugin restart Sublime Text.
Usage of Sublime Input
Step 1: For using Sublime Input add a multiline comment above your code as shown below.
C
/*input 12 */ #include <stdio.h> int main() { int n; scanf ( "%d" , &n); printf ( "You Entered: %d" , n); return 0; } |
C++
/*input 12 */ #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << "You Entered: " << n << endl; } |
Python3
'''input 12 ''' val = input () print ( "You Entered " , val) |
Step 2: Use the Key-binding Ctrl+Alt+B or navigate to Tools -> SublimeInput – Build option.


The result is shown in the below panel after running the code
Please Login to comment...