I'm a beginner in C# and trying to use Sublime Text for my editor. But the default console doesn't seem to support "Console.ReadLine();" I can't find anywhere that I can type my input with.
I searched some plug-ins, and found this REPL and CSharpreter. However, REPL doesn't seem to support C#
and even when I try to load other languages, error message like this pops up.
What can be a good solution? Please help!
Use Ctrl + ' to open the console. When Ctrl + ` is pressed, Sublime Text does not receive anything.
Press ctrl + ~ (for opening terminal)
Open command prompt and type sysdm. In Advanced tab, select Environment variables. Under system variables, select variable named " Path " and click Edit . Add " C:\Program Files\Sublime Text; " to the end of the existing string. Save the changes and restart command prompt.
You're looking for a combination of scriptcs, scriptcs-sublime and SublimeREPL. They will let you write and execute C# code inside Sublime Text easily.
Steps to install:
Install chocolatey (like apt-get for Windows) by running the following PowerShell command:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
Install scriptcs by running the following command in your CLI
cinst scriptcs
Install Sublime Package Control (if you don't have it already). You can find the installation guide here.
Go to Menu > Tools > Command Palette
and type Install Package
, then find and install
scriptcs
SublimeREPL
Restart Sublime
Menu > Tools > Command Palette
and select SublimeREPL: ScriptCS
.You should now be running the scriptcs REPL inside Sublime Text :)
If you want to develop C# code, MS Visual Studio is best way to do it.
It has also express edition which is free.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With