Console for Sublime Text 2

I am new to C # and trying to use Sublime Text for my editor. But the default console does not seem to support "Console.ReadLine ()"; I can not find anywhere to enter my input.

I searched for some plugins and found this REPL and CSharpreter. However REPL doesn't seem to support C #

enter image description here

and even when I try to load other languages, an error message like this appears.

enter image description here

What could be a good solution? Please, help!

+6
source share
2 answers

You are looking for a combination of scripts, scriptcs-sublime and SublimeREPL. They allow you to easily write and execute C # code inside Sublime Text.

Installation steps:

  • Install chocolatey (e.g. 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 the scripts by running the following command in your CLI

    cinst scriptcs

  • Install Sublime Package Control (if you don't already have one). 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

  • Go to Menu > Tools > Command Palette and select SublimeREPL: ScriptCS .

Now you should run REPL scripts inside Sublime Text :)

scriptcs REPL in Sublime

+6
source

If you want to develop C # code, MS Visual Studio is the best way to do this.

He also published a free edition.

+3
source

All Articles