Pragtical v3.11.0 Release | Pragtical
Skip to main content<br>Pragtical v3.11.0 is out with code folding support, generated settings views,<br>faster rendering paths for large files, and a set of MarkdownView and tokenizer<br>improvements that make long documents smoother to work with.
Code Folding
This release adds code folding support to the editor. Fold markers are rendered<br>in the gutter, folded regions integrate with DocView's visual line mapping, and<br>the editor now keeps search, go-to-line, line wrapping, indent guides, and<br>smooth caret behavior aligned with hidden folded lines.
Fold state is also persisted per project, so documents can reopen with their<br>previous folded regions restored.
Config
config.plugins.codefold = {<br>-- Whether code folding is enabled.<br>enabled = true,<br>-- If true, newly opened documents have all fold regions initially collapsed.<br>start_folded = false,<br>-- If true, folded regions hide the folded end-line tail.<br>hide_tail_on_fold = true,<br>-- If true, all fold markers are always visible.<br>always_show_fold_markers = false,<br>-- Width in pixels reserved for fold toggle indicators in the gutter.<br>toggle_width = common.round(24 * SCALE)
Commands
keymap.add {<br>["alt+shift+left"] = "code-folding:toggle",<br>["alt+shift+right"] = "code-folding:toggle",<br>["alt+shift+up"] = "code-folding:fold-all",<br>["alt+shift+down"] = "code-folding:unfold-all"
Settings Views
Generated settings views landed in this release, giving plugins a structured way<br>to expose configurable options without hand-building every settings screen.<br>Follow-up fixes also improved how nested plugin subconfig values are merged back<br>into the global configuration.
Preview
Rendering And Wrapping
DocView received better long-line rendering behavior, and the native tokenizer<br>now matches long lines more efficiently. The line wrapping plugin was synced<br>with DocView's visual line helpers, improving wrapped-line drawing, navigation,<br>selection, and integration with plugins that need to reason about visible rows.
Native Tokenizer Local Benchmarks:
codemirror.min.js, about 1 MB with very long minified lines:<br>Before: about 1314.3 s<br>After: about 43.6 s<br>Speedup: about 30.1x<br>sqlite3.c, about 8 MB and 235k lines:<br>Before: about 6.3 s<br>After: about 3.0 s<br>Speedup: about 2.1x
MarkdownView
As suggested by Vinfall MarkdownView now renders<br>frontmatter blocks in a legible format:
Before
After
It can also parse large Markdown views asynchronously. This keeps previews more<br>responsive while large documents are parsed and laid out.
Markdown code block highlighting also recognizes more popular language aliases.
Networking And Runtime
While working with the assistant plugin<br>found some issue where our code expected all sent data to be written at once.<br>Now TCP writes return byte counts, making network scripting behavior more<br>reliable.
The editor also reduces unfocused wake delay when focus is restored,<br>which helps it react more promptly after returning to the application.
Fixes And Build Work
Several Windows build issues were addressed, including clang-cl compatibility,<br>MSVC fallback handling, and a parallel build collision involving generated<br>pragtical.lib and .exp files. GitHub workflow dependencies were also updated.
Thanks to AmerM137 who spearheaded many of the<br>fixes and improvements for this release.
Downloads on GitHub.
Changes Log
New Features
Add generated settings views<br>(#490)
Add code folding support<br>(#515)
Enhancements
Render MarkdownView frontmatter legibly<br>(#502)
Improve DocView long-line rendering<br>(#507)
Optimize native tokenizer matching for long lines<br>(#508)
Sync line wrapping with DocView rendering<br>(#509)
Add codeblock patterns for popular Markdown languages<br>(#511)
Return byte counts from TCP writes<br>(#512)
Parse large Markdown views asynchronously<br>(#513)
Fixes
Fix clang-cl build errors on Windows<br>(#491)
Avoid pragtical.lib/.exp collision in MSVC parallel builds<br>(#493)
Correct native tokenizer matching semantics<br>(#496)
Add explicit type fields to language_python pair patterns<br>(#498)<br>(#503)
Fix settings subconfig merge<br>(64609770)
Reduce unfocused wake delay when restoring focus<br>(#504)
Build System
Add C11 fallback for MSVC and silence clang-cl warnings<br>(#500)<br>(#506)
Update GitHub workflow dependencies<br>(#514)
Code FoldingConfig<br>Commands
Settings ViewsPreview
Rendering And WrappingNative Tokenizer Local Benchmarks:
MarkdownViewBefore<br>After
Networking And Runtime<br>Fixes And Build Work<br>Changes LogNew Features<br>Enhancements<br>Fixes<br>Build System