Sublime Text 4 Build 4142

Image credits: Unsplash and Seeklogo

Sublime Text 4, build 4142 is out now with new features, performance improvements and bug fixes.

We’ve recently moved back into our freshly renovated office after having worked from home due to the pandemic. As well as a new office we also have a new team member, with Valerie joining Sublime HQ last month. Feel free to come on down to our Discord server and say g’day!

Download Sublime Text 4

Syntax-based Code Folding

Syntax definitions now have the capability of declaring fold regions. A number of edge cases have also been cleaned up.

OS Recent Files Integration

The recent file list has been reworked and now integrates with all 3 platforms.

Identifier Case Conversion

A number of commands for converting between common identifier cases have been added.

Full Changelog

  • Added syntax-based code folding
  • Various syntax highlighting improvements
  • Newly rewritten Haskell syntax highlighting thanks to deathaxe
  • The recent file list is now global instead of per window
  • Files opened in Sublime Text are now added to the system recent file list (See the “update_system_recent_files” setting)
  • Added commands for converting between common identifier cases (See Edit > Convert Case)
  • Added “hot_exit_projects” setting to control what data gets saved in workspace files
  • Added “minimap_horizontal_scrolling” setting
  • Added “open_tabs_after_current” setting for controlling where tabs are opened
  • Added “show_spelling_errors” and “show_line_column” settings
  • Added “goto_anything_exclude_gitignore” setting
  • Added “ruler_style” setting
  • Reworked comment toggling to better handle embedded languages
  • Sub-word separators are now configurable using the “sub_word_separators” setting
  • Added support for Nordic (Windows 865) encoding
  • Reopening a file now asks for confirmation when there are unsaved changes
  • Improved filesystem symbolic link detection
  • Improved performance while open folders are scanned for the side-bar
  • Improved regex performance for syntax highlighting
  • Find: Patterns taken from an open file are now escaped for regex searches
  • Find in Files: Improved binary file detection for find-in-files
  • Find in Files: Find-in-files now supports project-relative patterns starting with //
  • Find in Files: Added the “find_in_files_max_file_size” setting
  • Syntax Highlighting: Context backtraces now link to their origin in sublime-syntax files
  • Syntax Highlighting: Fixed crash caused by starting a branch point at the end of a line
  • Syntax Highlighting: Fixed various syntax highlighting bugs related to backtracking
  • Rendering: Improved performance with large folded regions
  • Rendering: Fixed OpenGL issue related to the wrong context being active
  • Rendering: Fixed shadow related OpenGL rendering bug
  • Rendering: Fixed region rendering edge case
  • Rendering: Improved performance in files with large diffs
  • Rendering: Fixed various issues with faded labels in the sidebar
  • Rendering: Fixed text annotation underlines not drawing when combined with other font styles
  • Sort Lines no longer includes the newline at EOF when nothing is selected
  • Fixed very large unsaved files being lost on hot exit; a prompt is now shown to save them
  • Fixed extraneous window getting created at startup with hot exit disabled
  • Fixed case where multiple reload prompts could show simultaneously
  • Drag operations are no longer interrupted when reloading a file
  • Fixed case where text in command palette was incorrectly colored
  • Fixed side bar button theming issue in the Default theme
  • Fixed sometimes not being able to type a space after completing a snippet
  • Fixed wrong default extension being used in open file dialog
  • Fixed centered views jumping in some cases when whole content is replaced
  • Fixed scroll jumping when folding
  • Fixed Reveal in Side Bar not working in some cases
  • Fixed scroll bar sometimes showing when text is wrapped
  • Fixed sheets not being added to the current selection in some cases
  • Added missing theming attributes to update dialog
  • Linux: System scroll bar overlay settings are now followed
  • Linux: Fixed various issues caused by the C locale
  • Linux: Added safeguard around nested GTK main loops possibly causing data loss
  • Linux: Fixed case where dragging a tab to a window wasn’t working
  • Linux: Fixed crash on startup for some desktop environments
  • Linux: Fixed not being able to grab the scrollbar in a maximized window when at the right edge of the screen
  • Windows: Adjusted for the new Windows 11 window border
  • Windows: Open Containing Folder and similar now respect file explorer replacements
  • Windows: Fixed GDI font glow glyph positioning
  • Mac: Fixed license being removed due to network MAC address changing
  • Mac: Fixed cursor getting stuck as a resize handle on Ventura
  • Mac: Recent files are now available without having a window open
  • Mac: Fixed various issues with the quick switch project dialog
  • Mac: Fixed issue where dialogs could be triggered during dialogs
  • Mac: Fixed case when opening an already open file would jump to the start
  • Mac: Added work around for broken modal loops
  • Mac: Fixed case where settings window couldn’t be closed
  • Mac: Fixed open file dialog crash with some syntaxes
  • Mac: Fixed scrolling when command modifier key is pressed
  • Mac: Fixed Window/New Tab not working with the Adaptive theme
  • API: Added buffer variable to the console
  • API: A noop command can now be used for keybindings to block default behavior
  • API: “encoded_position”: true may be passed to open_file command for the same behavior as sublime.ENCODED_POSITION
  • API: View.context_backtrace can be used to get a stack trace from syntax highlighting
  • API: View.expand_to_scope now returns None when the text point doesn’t match the selector
  • API: Added View.expand_to_scope
  • API: Added Window.promote_sheet
  • API: Fixed crash when running hide_panel command from EventListener.on_deactivated
  • API: The toggle_comment command can now take a variant argument for languages with multiple comment variants

By: Benjamin Schaaf
Source: Sublime Text

For enquiries, product placements, sponsorships, and collaborations, connect with us at We'd love to hear from you!