# Yet another source code viewer plugin based on Scintilla control

**URL:** <https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251>\
**Category:** Viewer/VFS Plugins\
**Tags:** viewer, source-available\
**Created:** [April 25, 2026, 5:27pm UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251 "2026-04-25T17:27:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexeydott](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@alexeydott](https://resource.dopus.com/u/alexeydott)\
**Post date:** [April 25, 2026, 5:27pm UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/1 "2026-04-25T17:27:43Z")

</div>

Scintilla-based plugin for viewing source files in DO.

 ![scrn](https://resource.dopus.com/uploads/default/original/3X/d/7/d788c4548a6387e36943f4838d7df75d1699dda6.png)  
Originally created as a demo for a modern Scintilla API wrapper for Delphi.  
Source code now is available on [github](https://github.com/alexeydott/dscintilla/tree/master/Demos/dosrcvwr).  
works correctly with Dopus 12/13 on Windows 10/11. There are no plans to support Windows 7 (at least for now).

### Features

- Display of source code files with syntax highlighting, similar Notepad++ / dosv
- Autodetect encoding
- Text search (built-in search + search dialog — accessible via Ctrl+F / Shift+Ctrl+F, then F3 / Shift+F3)
- Jump to a specific line/character (Ctrl+G)
- Highlight identical words (double-click)
- Collapse/expand blocks (all, current block only, nested blocks within current block)
- Configurable (like dosv) display styles for lexers
- Support for Notepad++ theme files for easy styling (simply move the theme folder from npp++ to plugin settings folder, or import the desired theme-xml-file in “Settings/Styles/Import”)
- Manage the list of supported file types for display (add your own / remove existing ones) - this requires restarting plugin / DO since the plugin explicitly registers lists of supported file extensions.
- Copying content to the clipboard while preserving the current formatting style.

### Installation:

[Installer](https://github.com/alexeydott/dscintilla/blob/master/bin64/DSciSrcVwr-PreviewHandler-x64.exe)

Settings are stored in %appdata%\GPSoftware\Directory Opus\User Data, logs (if you enable them will be saved to %appdata%\GPSoftware\Directory Opus\Logs).

---

<div class="post-metadata">

**Author:** ![qiuqiu](https://resource.dopus.com/user_avatar/resource.dopus.com/qiuqiu/32/55961_2.png) [@qiuqiu](https://resource.dopus.com/u/qiuqiu)\
**Post date:** [April 26, 2026, 2:03am UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/2 "2026-04-26T02:03:59Z")

</div>

自定义设置后无法退出首选项状态

Cannot exit preference state after custom settings

---

<div class="post-metadata">

**Author:** ![alexeydott](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@alexeydott](https://resource.dopus.com/u/alexeydott)\
**Post date:** [April 27, 2026, 1:45pm UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/3 "2026-04-27T13:45:52Z")

</div>

Yes, I’ve encountered this error myself. The core issue is that the VCL framefork doesn’t always work correctly within a DLL. However, this problem doesn’t occur in the WindowsPreviewHandler version - perhaps because it uses a different control. In any case, the error has been fixed; please download the updated version of the plugin from the first post.

For the future - if you encounter any errors—try enabling logging so that I can more easily track and reproduce them.

---

<div class="post-metadata">

**Author:** ![qiuqiu](https://resource.dopus.com/user_avatar/resource.dopus.com/qiuqiu/32/55961_2.png) [@qiuqiu](https://resource.dopus.com/u/qiuqiu)\
**Post date:** [April 28, 2026, 11:06am UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/4 "2026-04-28T11:06:26Z")

</div>

这个问题 `自定义设置后无法退出首选项状态` 还是老样子，从查看器面板中的右键菜单进行设置没有问题。

This problem `Cannot exit preference state after custom settings` is still the same. There is no problem in setting it from the right-click menu in the viewer panel.

无法导入Notepad++主题

Unable to import Notepad++ theme

 ![image](https://resource.dopus.com/uploads/default/original/3X/2/4/245291ce6dd1b974727fb1665054d63c8900e98b.png)

> **[Notepad++](https://draculatheme.com/notepad-plus-plus)**
>
> The most famous theme for Notepad++, plus an ever-growing list of apps.

---

<div class="post-metadata">

**Author:** ![alexeydott](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@alexeydott](https://resource.dopus.com/u/alexeydott)\
**Post date:** [April 28, 2026, 11:58am UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/5 "2026-04-28T11:58:55Z")

</div>

1. Could you describe in more detail context how this happens and, if possible, attach a log snippet? The plugin settings dialog was opened via the settings button in the lister panel, from the lister context menu, or from the DO plugins settings page.
2. Oh, so that's how it is. I've only used (practiced with) the themes that come with Notepad++.. The error seems to be related to an XML validation issue, not the theme itself. The validation might be too strict. In XML, "&" and other "special" characters need to be escaped, but that hasn't been done here. I'll see what can be done.

---

<div class="post-metadata">

**Author:** ![alexeydott](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@alexeydott](https://resource.dopus.com/u/alexeydott)\
**Post date:** [April 28, 2026, 12:10pm UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/6 "2026-04-28T12:10:47Z")

</div>

I think I get it. The plugin settings dialog is accessed from within DO's settings, via the button next to the plugin's name. And after closing the settings, it becomes impossible to close DO's settings themselves. It feels like they're disabled.

---

<div class="post-metadata">

**Author:** ![alexeydott](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@alexeydott](https://resource.dopus.com/u/alexeydott)\
**Post date:** [April 28, 2026, 1:31pm UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/7 "2026-04-28T13:31:36Z")

</div>

yepp I think I figured it out. The plugin settings dialog is opened from the DO settings, via the button alongs the plugin name. And after closing the settings, it's impossible to close the DO settings themselves. Is that what you meant?  
After viewing logs, i see that the viewer's UI thread is successfully displaying the settings, although it's running on a different thread (not the one where the VCL was initialized). Perhaps this is why EnablethreadWindows isn't called symmetrically (in end of vcl.tform`s.showModal) . I need to figure out what to do about it. The DO multithreading model for plugins turned out to be more complicated than I expected....

PS Actually, there's a similar viewer that works via PreviewHandlers Host, and it doesn't have these issues (at least I hope so 😂).

---

<div class="post-metadata">

**Author:** ![alexeydott](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@alexeydott](https://resource.dopus.com/u/alexeydott)\
**Post date:** [May 2, 2026, 2:55pm UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/8 "2026-05-02T14:55:21Z")

</div>

I`ve fixed glitches with the DOpus main window blocking after closing the plugin settings dialog if it was not opened from the lister.

The archive with the plugin in the first post has been updated.

---

<div class="post-metadata">

**Author:** ![qiuqiu](https://resource.dopus.com/user_avatar/resource.dopus.com/qiuqiu/32/55961_2.png) [@qiuqiu](https://resource.dopus.com/u/qiuqiu)\
**Post date:** [May 3, 2026, 12:43am UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/9 "2026-05-03T00:43:56Z")

</div>

主题样式还是无法导入

---

<div class="post-metadata">

**Author:** ![alexeydott](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@alexeydott](https://resource.dopus.com/u/alexeydott)\
**Post date:** [May 3, 2026, 1:22am UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/10 "2026-05-03T01:22:37Z")

</div>

Yes, because the XML file is invalid. It contains unescaped "&" in the attributes. I'm not sure what dscintilla need to edit the theme files; they are only checked for syntactic correctness.

---

<div class="post-metadata">

**Author:** ![qiuqiu](https://resource.dopus.com/user_avatar/resource.dopus.com/qiuqiu/32/55961_2.png) [@qiuqiu](https://resource.dopus.com/u/qiuqiu)\
**Post date:** [May 3, 2026, 5:14am UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/11 "2026-05-03T05:14:16Z")

</div>

分享一下你的主题文件

---

<div class="post-metadata">

**Author:** ![alexeydott](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@alexeydott](https://resource.dopus.com/u/alexeydott)\
**Post date:** [May 3, 2026, 1:03pm UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/12 "2026-05-03T13:03:24Z")

</div>

fixed file in the attachment, but you can correct it yourself - all you need to do is replace "&" with "&" in one place:

 ![pic](https://resource.dopus.com/uploads/default/original/3X/7/7/7736b373bcb43e2a7e18eded4d6c5d3e69f4c95c.png)  
but in theory it needs to be fixed in [generate-themes.ts](https://github.com/dracula/notepad-plus-plus/blob/main/scripts/generate-themes.ts) by adding escape methods for reserved xml characters to node serializers. I also attached it  
[dracula.zip](https://resource.dopus.com/uploads/short-url/mqWAfBTumkeJYCfC8p09wXIQ9HZ.zip) (12.1 KB).  
Later I will create issue for the dracula authors on github or you can do it for me)

---

<div class="post-metadata">

**Author:** ![alexeydott](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@alexeydott](https://resource.dopus.com/u/alexeydott)\
**Post date:** [May 3, 2026, 4:53pm UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/13 "2026-05-03T16:53:55Z")

</div>

Damn, I wanted to edit the message above and say that I created this issue myself, but something went wrong /~

---

<div class="post-metadata">

**Author:** ![bytim](https://resource.dopus.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bytim](https://resource.dopus.com/u/bytim)\
**Post date:** [May 17, 2026, 5:02am UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/14 "2026-05-17T05:02:34Z")

</div>

An issue:  
its comfig is saved to "Directory Opus\ConfigFiles\Plugins\dosrcvwr",  
but this will not backup into .ocb file.

@Jon  
Can you consider backing up more files rather than just .oxc in ConfigFiles\Plugins folder? 😀

---

<div class="post-metadata">

**Author:** ![bytim](https://resource.dopus.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bytim](https://resource.dopus.com/u/bytim)\
**Post date:** [May 17, 2026, 7:20am UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/15 "2026-05-17T07:20:59Z")

</div>

Make slight modifications to the color scheme → draculatheme

Light theme：Alucard theme (light).xml

```auto
<GlobalStyles>
        <WidgetStyle name="Global override" styleID="0" fgColor="1F1F1F" bgColor="FFFBEB" fontName="微软雅黑" fontStyle="0" fontSize="11"></WidgetStyle>
        <WidgetStyle name="Default Style" styleID="32" fgColor="1F1F1F" bgColor="FFFBEB" fontName="微软雅黑" fontStyle="0" fontSize="11"></WidgetStyle>

        <WidgetStyle name="Fold" styleID="0" fgColor="767676" bgColor="FFFBEB" fontName="" fontSize=""></WidgetStyle>
        <WidgetStyle name="Fold active" styleID="0" fgColor="767676" bgColor="FFFBEB" fontName="" fontSize=""></WidgetStyle>
        
        <WidgetStyle name="Non-printing characters custom color" styleID="0" fgColor="DCDEEF" bgColor="FFFBEB" fontName="" fontSize=""></WidgetStyle>

```

[Alucard theme (light & dark).zip](https://resource.dopus.com/uploads/short-url/k9az3OCSZFo5X9Wv0GLRIJtEdfY.zip) (18.1 KB)

---

<div class="post-metadata">

**Author:** ![Leo](https://resource.dopus.com/user_avatar/resource.dopus.com/leo/32/69732_2.png) [@Leo](https://resource.dopus.com/u/Leo)\
**Post date:** [May 17, 2026, 9:02am UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/16 "2026-05-17T09:02:22Z")

</div>

> [@bytim](#):
>
> Can you consider backing up more files rather than just .oxc in ConfigFiles\Plugins folder? 😀

They are already included.

 ![image](https://resource.dopus.com/uploads/default/original/3X/9/5/95acee3076bf3cbc3c57ce37c57da0c5941a9c74.png)

(This kinda of request/discussion would also be better in its own thread.)

---

<div class="post-metadata">

**Author:** ![bytim](https://resource.dopus.com/letter_avatar_proxy/v4/letter/b/e480ec/32.png) [@bytim](https://resource.dopus.com/u/bytim)\
**Post date:** [May 18, 2026, 7:49am UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/17 "2026-05-18T07:49:58Z")

</div>

> [@bytim](#):
>
> an just .oxc in ConfigFiles\Pl

Perhaps it doesn't include subfolders?

 ![image](https://resource.dopus.com/uploads/default/original/3X/1/2/126691417668db6e0399717368fbe7c178679a74.png)

---

<div class="post-metadata">

**Author:** ![qiuqiu](https://resource.dopus.com/user_avatar/resource.dopus.com/qiuqiu/32/55961_2.png) [@qiuqiu](https://resource.dopus.com/u/qiuqiu)\
**Post date:** [May 18, 2026, 9:23am UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/18 "2026-05-18T09:23:36Z")

</div>

@alexeydott

How to set the spacing between rows?

---

<div class="post-metadata">

**Author:** ![alexeydott](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@alexeydott](https://resource.dopus.com/u/alexeydott)\
**Post date:** [May 18, 2026, 11:03am UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/19 "2026-05-18T11:03:28Z")

</div>

which "rows" did you have in mind, or is it about linespacing?

---

<div class="post-metadata">

**Author:** ![alexeydott](https://resource.dopus.com/letter_avatar_proxy/v4/letter/a/e99b99/32.png) [@alexeydott](https://resource.dopus.com/u/alexeydott)\
**Post date:** [May 18, 2026, 11:25am UTC](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251/20 "2026-05-18T11:25:21Z")

</div>

To be honest, I haven't really tested the configuration file backup feature, and the opus API doesn't have a separate method for determining the plugin's configuration directory and list of configuration backup files, so it's a bit inconvenient.

Here's my current code: [dscintilla/Demos/dosrcvwr/DOSrcVwrRuntime.pas at master · alexeydott/dscintilla · GitHub](https://github.com/alexeydott/dscintilla/blob/master/Demos/dosrcvwr/DOSrcVwrRuntime.pas)

[Next page](https://resource.dopus.com/t/yet-another-source-code-viewer-plugin-based-on-scintilla-control/59251.md?page=2)
