Skip to content

REPL, IDE and OS integration

Oleg Shilo edited this page Oct 22, 2021 · 8 revisions

OS integration, IDE and REPL

Interactive environments are essential part of any software development platform. Majority of scripting scripting solutions come with a simple REPL included. While more complex richer IDEs are usually developed by third-parties.

A simple third-party REPL is included into CS-Script ExtensionPack (cs-script/lib/tools/CSI). However it is rather not as comprehensive as similar products available from other vendors (e.g. Mono).

Instead of developing its own REPL CS-Script makes a strong emphasis on a dedicated rich IDE. The choice of IDE instead or REPL is a recognition of the fact that the complexity of the production level scripting is by far higher then the 'educational' by nature use-case of REPL. Thus an industry standard IDE is a more appropriate choice.

When developing a stand alone scripts you have two IDEs to choose from:

Visual Studio

CS-Script integration with Visual studio comes in two forms.

Shell extensions

If you want to be able to open any script file in visual Studio with CS-Script specific shell context menu you can use "Shell-X" for that. Just install it from Choco:

choco install shell-x

And then configure it to handle *.cs files by copying the content of the <CS-Scrip>\lib\ShellExtensions\Template folder to the C:\Users\<user>\AppData\Roaming\shell-x\cs\01.CS-Scriptfolder. This will create CS-Script menu item in your explorer when you right-click any *.cs file.

image

  • Shell-X was a part of CS-Script installation for quite some time but now it is an individual product for generic Windows Explorer extensions. If you need to delete old version of shell extensions (installed with the old version of CS-Script) then you can do it by executing <CS-Scrip>\lib\ShellExtensions\Template\CS-Script\uninstall.bat file

The script file will not be just loaded in VS but the appropriate project infrastructure will be created on the fly. Thus you will be able to take advantage of the full power of VS and edit, execute and debug your script as any other C# code.

Visual Studio 'CS-Script Tools' extension

This extension delivers the same experience as provided by shell extensions but without leaving Visual Sudio. See Visual Studio Gallery page for more details.

Notepad++

While arguably nothing can compete with the power of Visual Studio in many cases the 'peoples editor' Notepad++ is a more attractive and practical alternative.

CS-Script products family include a powerful 'CS-Script (Intellisense)' Notepad++ plugin. While editing (with true Intellisence), executing and even debugging the scripts you can also benefit from lightning fast nature and rich functionality of Notepad++.

The plugin also offers an interesting deployment opportunities. It includes a copy of the CS-Script engine thus the only thing you need to work with CS-Script C# scripts on any Windows with .NET (v4.0{"+"}) installed is a copy of Notepad++ with this plugin enabled. The plugin also allows you to package yours scripts so they can be brought and executed on other systems without the need for CS-Script to be installed.

The plugin home page contains plenty details about the product but to put it simple "the plugin brings true VS experiences in Notepad".

Project support:

image

Intellisense:

image

Sublime Text 3

Another great and light weight option is the CS-Script extension for Sublime Text editor. The user experience is very similar to Notepad++: