Skip to content

CodeEditorLib 1.1

Latest

Choose a tag to compare

@arisohandriputra arisohandriputra released this 13 May 05:19
· 8 commits to main since this release
734c15c

CodeEditorLib v1.1.0

Second public release — adds a minimap, Go To Line dialog, new themes, new editor properties, and file I/O helpers.


What's new in 1.1

Minimap panel A real-time code overview panel rendered on the right side of the editor, similar to what you'd see in VS Code. Shows a syntax-colored miniature of the full document with a viewport highlight indicator. Click or drag to navigate. Cached rendering keeps it smooth. Toggle it with ShowMinimap.

Go To Line dialog A borderless, theme-aware dialog for jumping to a specific line. Includes a live line preview and an interactive slider. Trigger it with ShowGotoDialog() or programmatically with GotoLine(lineNumber). Also bound to Ctrl+G inside the editor.

6 built-in themes (up from 2) Light and Dark are still there. Added: Monokai, Solarized Dark, Solarized Light, Nord, and Dracula. Switch by name with ThemeName = "nord" or use ThemeRegistry to enumerate all available themes. Custom themes still work the same way — subclass EditorTheme.

Word wrap New WordWrap property. Off by default.

Read-only mode New ReadOnly property. The context menu and editing keys respect it automatically.

Tab size New TabSize property. Defaults to 4.

Current-line highlight New HighlightCurrentLine property. On by default.

File I/O helpers OpenFile(path) and SaveFile(path) — load or save the editor content directly from/to a file path.

Clipboard helpers Cut(), Copy(), Paste(), SelectAll() — wrappers if you're building a menu or toolbar.


Full feature list

13 built-in languages C#, C++, Java, JavaScript, Python, PHP, Go, Rust, Visual Basic, HTML, CSS, SQL, XML. Language auto-detection by file extension is still included — open a .py file and it sets itself.

Themes Light, Dark, Monokai, Solarized Dark, Solarized Light, Nord, Dracula. Switching is one line. Custom themes: subclass EditorTheme and register with ThemeRegistry.

Undo/Redo Stack-based, up to 500 actions. CanUndo and CanRedo for syncing toolbar buttons.

Auto-indent and auto-brackets Auto-indent matches the previous line's indentation on Enter. Auto-brackets closes (, {, and [ automatically. Both can be disabled.

Find & Replace Built-in dialog (ShowFindDialog() / ShowReplaceDialog()), or call FindNext() and ReplaceAll() programmatically. Supports case-sensitive and whole-word matching.

Line numbers Separate panel, scrolls in sync, width adjusts automatically.

Minimap Real-time document overview with viewport indicator and click/drag navigation. Toggle with ShowMinimap.

Go To Line Dialog or programmatic via GotoLine(lineNumber). Ctrl+G shortcut built in.

Code formatting IndentSelection(), OutdentSelection(), ToggleComment() — work on the current selection or current line.

Events CaretPositionChanged, CodeTextChanged, LanguageChanged, FindReplaceCompleted


Getting started

Download CodeEditorLib.dll below and add it as a reference. No NuGet, no extra dependencies — just System.Windows.Forms and System.Drawing.

var editor = new CodeEditorControl { Dock = DockStyle.Fill };
editor.LanguageName = "CSharp";
editor.Theme = new DarkTheme();
Controls.Add(editor);

Switching themes by name

editor.ThemeName = "dracula";   // or "monokai", "nord", "solarizeddark", etc.

Using the minimap and Go To Line

editor.ShowMinimap = true;      // visible by default

editor.ShowGotoDialog(); // shows the dialog
editor.GotoLine(42); // jump directly

File I/O

editor.OpenFile(@"C:\project\main.cs");
editor.SaveFile(@"C:\project\main.cs");

Other new properties

editor.WordWrap             = false;
editor.ReadOnly             = false;
editor.TabSize              = 4;
editor.HighlightCurrentLine = true;

Full usage and examples are in the README.


Requirements

  • Windows
  • .NET Framework 2.0 or higher

Downloads

File Description
CodeEditorLib_1.1.zip The compiled library, ready to reference
CE++_Setup_v1.1.exe The compiled GUI, ready to use
Source Code.zip Full source code

Known issues

  • Syntax highlighting on very large files (10k+ lines) has a slight delay — the highlight timer is set to 300ms, which helps but isn't instant
  • No built-in TypeScript support yet
  • The Find dialog doesn't support regex patterns, only plain text and whole-word matching

If something's broken or behaving unexpectedly, open an issue with a small repro case and I'll take a look.

# CodeEditorLib v1.1.0

Second public release — adds a minimap, Go To Line dialog, new themes, new editor properties, and file I/O helpers.


What's new in 1.1

Minimap panel
A real-time code overview panel rendered on the right side of the editor, similar to what you'd see in VS Code. Shows a syntax-colored miniature of the full document with a viewport highlight indicator. Click or drag to navigate. Cached rendering keeps it smooth. Toggle it with ShowMinimap.

Go To Line dialog
A borderless, theme-aware dialog for jumping to a specific line. Includes a live line preview and an interactive slider. Trigger it with ShowGotoDialog() or programmatically with GotoLine(lineNumber). Also bound to Ctrl+G inside the editor.

6 built-in themes (up from 2)
Light and Dark are still there. Added: Monokai, Solarized Dark, Solarized Light, Nord, and Dracula. Switch by name with ThemeName = "nord" or use ThemeRegistry to enumerate all available themes. Custom themes still work the same way — subclass EditorTheme.

Word wrap
New WordWrap property. Off by default.

Read-only mode
New ReadOnly property. The context menu and editing keys respect it automatically.

Tab size
New TabSize property. Defaults to 4.

Current-line highlight
New HighlightCurrentLine property. On by default.

File I/O helpers
OpenFile(path) and SaveFile(path) — load or save the editor content directly from/to a file path.

Clipboard helpers
Cut(), Copy(), Paste(), SelectAll() — wrappers if you're building a menu or toolbar.


Full feature list

13 built-in languages
C#, C++, Java, JavaScript, Python, PHP, Go, Rust, Visual Basic, HTML, CSS, SQL, XML. Language auto-detection by file extension is still included — open a .py file and it sets itself.

Themes
Light, Dark, Monokai, Solarized Dark, Solarized Light, Nord, Dracula. Switching is one line. Custom themes: subclass EditorTheme and register with ThemeRegistry.

Undo/Redo
Stack-based, up to 500 actions. CanUndo and CanRedo for syncing toolbar buttons.

Auto-indent and auto-brackets
Auto-indent matches the previous line's indentation on Enter. Auto-brackets closes (, {, and [ automatically. Both can be disabled.

Find & Replace
Built-in dialog (ShowFindDialog() / ShowReplaceDialog()), or call FindNext() and ReplaceAll() programmatically. Supports case-sensitive and whole-word matching.

Line numbers
Separate panel, scrolls in sync, width adjusts automatically.

Minimap
Real-time document overview with viewport indicator and click/drag navigation. Toggle with ShowMinimap.

Go To Line
Dialog or programmatic via GotoLine(lineNumber). Ctrl+G shortcut built in.

Code formatting
IndentSelection(), OutdentSelection(), ToggleComment() — work on the current selection or current line.

Events
CaretPositionChanged, CodeTextChanged, LanguageChanged, FindReplaceCompleted


Getting started

Download CodeEditorLib.dll below and add it as a reference. No NuGet, no extra dependencies — just System.Windows.Forms and System.Drawing.

var editor = new CodeEditorControl { Dock = DockStyle.Fill };
editor.LanguageName = "CSharp";
editor.Theme = new DarkTheme();
Controls.Add(editor);

Switching themes by name

editor.ThemeName = "dracula";   // or "monokai", "nord", "solarizeddark", etc.

Using the minimap and Go To Line

editor.ShowMinimap = true;      // visible by default

editor.ShowGotoDialog();        // shows the dialog
editor.GotoLine(42);            // jump directly

File I/O

editor.OpenFile(@"C:\project\main.cs");
editor.SaveFile(@"C:\project\main.cs");

Other new properties

editor.WordWrap             = false;
editor.ReadOnly             = false;
editor.TabSize              = 4;
editor.HighlightCurrentLine = true;

Full usage and examples are in the [README](https://github.com/arisohandriputra/CodeEditorLib/blob/main/README.md).


Requirements

  • Windows
  • .NET Framework 2.0 or higher

Downloads

File Description
[CodeEditorLib_1.1.dll](https://github.com/arisohandriputra/CodeEditorLib/releases/download/1.1/CodeEditorLib.dll) The compiled library, ready to reference
[CE++_Setup_v1.1.exe](https://github.com/arisohandriputra/CodeEditorLib/releases/download/1.1/CE++_Setup_v1.1.exe) The compiled GUI, ready to use
[Source Code.zip](https://github.com/arisohandriputra/CodeEditorLib/archive/refs/tags/1.1.zip) Full source code

Known issues

  • Syntax highlighting on very large files (10k+ lines) has a slight delay — the highlight timer is set to 300ms, which helps but isn't instant
  • No built-in TypeScript support yet
  • The Find dialog doesn't support regex patterns, only plain text and whole-word matching

If something's broken or behaving unexpectedly, open an issue with a small repro case and I'll take a look.