Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrousavy/fiddle
📜 A lightweight code editor for editing, compiling and running code snippets/scripts supporting multiple languages and rich GUI
https://github.com/mrousavy/fiddle
csharp dotnet editor fiddle ide java lua python script scripts vb
Last synced: 3 months ago
JSON representation
📜 A lightweight code editor for editing, compiling and running code snippets/scripts supporting multiple languages and rich GUI
- Host: GitHub
- URL: https://github.com/mrousavy/fiddle
- Owner: mrousavy
- License: mit
- Created: 2017-07-13T09:02:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T19:50:48.000Z (about 2 years ago)
- Last Synced: 2024-05-02T00:59:17.926Z (9 months ago)
- Topics: csharp, dotnet, editor, fiddle, ide, java, lua, python, script, scripts, vb
- Language: C
- Homepage:
- Size: 1.06 MB
- Stars: 25
- Watchers: 3
- Forks: 11
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Fiddle
Fiddle is a lightweight tool to edit, compile and run simple scripts/snippets in any of the supported languages.
⚠️ Fiddle requires .NET Framework v4.8 or above (download) ⚠️
## Languages
- [ ] [**C++**](https://github.com/mrousavy/Fiddle/blob/master/Doc/Cpp.md) _(TODO: everything)_
- [x] [**C#**](https://github.com/mrousavy/Fiddle/blob/master/Doc/CSharp.md)
- [x] [**Java**](https://github.com/mrousavy/Fiddle/blob/master/Doc/Java.md) _(TODO: Return values)_
- [x] [**LUA**](https://github.com/mrousavy/Fiddle/blob/master/Doc/Lua.md)
- [x] [**Python**](https://github.com/mrousavy/Fiddle/blob/master/Doc/Python.md)
- [x] [**VB**](https://github.com/mrousavy/Fiddle/blob/master/Doc/Vb.md) _(TODO: Better Entry point)_[ToDo's](https://github.com/mrousavy/Fiddle/projects)
## Screenshots
## Why?
The purpose of **Fiddle** is to simplify the Task of **quickly creating small code snippets**, like file-rename-scripts.**Instead of:**
Open Visual Studio **->** _(wait)_ **->** File **->** New **->** New Project **->** .NET **->** Console App **->** _(enter name)_ **->** Create **->** _(wait)_ **->** Open `Program.cs` **->** Write code **->** Build **->** (wait) **->** Start**Do:**
Open Fiddle **->** Write code **->** Start## Features
These features apply to [all imported languages](#languages)* **Rich UI** thanks to the [Material Design in XAML](http://materialdesigninxaml.net/) library
* **Editing code with custom syntax highlighting**
* **Compiling code with result view** including diagnostic messages, error messages and even line markers
* **Executing/Evaluating code/scripts** and viewing results (+ **expanding arrays/collections**)
* **Customizing settings** and **resuming last session** (window position, location, code, etc)
* **Saving code** to file
* **Loading code** from file (via drag and drop)
* **Seamlessly switching** between languages## Cache
A directory will be created at `%appdata%\Fiddle` containing `Preferences.json` (crash reports will be stored as "`error.txt`").`Preferences.json` can be edited with the Settings window in Fiddle or by manually changing it via any text editor.
However, the settings window cannot modify the `imports[]`, `DefaultCode` and window dimensions/cursor position properties, this is not fully implemented. For now you can use `Preferences.json` to manually edit these.## Build from Source
+ **Visual Studio**
1. Open `Fiddle.sln`
2. Set build target (**Debug**: development, **Release**: portable releases, **Publish**: InnoSetup installer)
3. Build Solution/Fiddle.UI (Ctrl + Shift + B)+ **Command Line**
1. Run `nuget restore` command in `Fiddle` directory (Requires [NuGet installed](https://www.nuget.org/downloads) and [configured in Environment variables](https://stackoverflow.com/a/21067553))
2. Run `msbuild Fiddle.sln /t:Build /p:Configuration=Release` or `msbuild Fiddle.sln /t:Build /p:Configuration=Publish` for InnoSetup installer (Requires [MsBuild installed](https://www.microsoft.com/en-us/download/details.aspx?id=48159) and [configured in Environment variables](https://stackoverflow.com/a/12608705))## Contributing
1. Fork **Fiddle** and **clone the fork**.
2. Make changes
* Make **bugfixes** or **other changes****.. or ..**
* Add a **new Compiler**
1. Create new **classes** in `Fiddle.Compilers\Implementation\[LanguageName]\`:
* `..\[LanguageName]Compiler.cs` : `ICompiler`
* `..\[LanguageName]CompileResult.cs` : `ICompileResult`
* `..\[LanguageName]Diagnostic.cs` : `IDiagnostic`
* `..\[LanguageName]ExecuteResult.cs` : `IExecuteResult`
2. **Implement Interface** functions and Constructor(s) _(Example: `CSharp\CSharpCompiler.cs`)_
3. Add **Language Name** (filename-friendly) to `Fiddle.Compilers\Host.Language` enum with user-friendly `[Description("..")]` Attribute
4. (Optionally) Add Language to **file-extension** converter functions in `Fiddle.UI\Helper.cs` (`Fiddle.UI\Helper.GetFilterForLanguage(..)`, ..)
5. (Optionally) Add **Syntax highlighting definition** to `Fiddle.UI\Syntax\[LanguageName].xshd`
6. (Optionally) Add **Documentation** (using [this template](https://github.com/mrousavy/Fiddle/blob/master/Doc/Template.md), or [this example](https://github.com/mrousavy/Fiddle/blob/master/Doc/CSharp.md)) to `Doc\[LanguageName].md` and linking it in `Doc\README.md`
3. **Commit & Push**
4. Create a new **pull request** _(on your fork)_