EmEditor v23.0.0 released (including technical review)!
Today, we are releasing EmEditor v23.0.0.
While conventionally, this version should be named v22.6, due to numerous changes and being a truly major update, as well as being the last major update of the year, we decided to align with the last two digits of the year 2023 and name it v23.0.
Recent advancements in generative AI, including ChatGPT, have enabled the use of various information and services through web browsers. Among EmEditor users including this customer, there is a growing demand to use these web services directly within EmEditor, eliminating the need to use external browsers. In the new version, we have added a feature to display a web browser in a customer bar of EmEditor. This browser is designed to work in conjunction with macros, allowing users to send a portion of the document in the editor to a site displayed in the Web Browser or vice versa. To utilize these features, ensure that Use V8 as the JavaScript engine is selected in the Options page of the Customize Macros dialog, or add the following line at the beginning of each macro:
#language = "V8"
Two specific features have been added:
(1) web.
keyword: To access the Document Object Model (DOM) of HTML, use the lowercase web.
keyword. This distinction is necessary to differentiate between objects in EmEditor and objects in the Web Browser. For example, in a macro:
document.write( "Test" );
It is unclear whether “Test” should be displayed in the editor view of EmEditor or in the HTML of the Web Browser. To display “Test” in the Web Browser, add the web.
prefix:
// Displays "Test" in Web Browser
web.document.write( "Test" );
With this syntax, keywords starting with web.
are interpreted as instructions executed in the Web Browser, allowing access to the DOM. Examples include:
// Returns the URL of the current web page.
alert( web.location.href );
// Returns the preferred language of the browser.
alert( web.navigator.language );
// Pastes the text of the current web page into a new document.
editor.NewFile();
write( web.document.documentElement.innerText );
// Pastes the HTML of the current web page into a new document.
editor.NewFile();
write( web.document.documentElement.outerHTML );
(2) onLoad
event: If the last executed macro contains a function starting with function onLoad()
, it is called only once when the web page is updated or a new page is loaded. This functionality allows tasks such as retrieving search results on search sites. For example:
function onLoad() {
// Retrieves the HTML of the page and pastes it into a new document.
editor.NewFile();
document.write( web.document.documentElement.outerHTML );
}
The Bing.jsee macro example demonstrates how to retrieve and display specific information from HTML search results. Note that some search sites, like the free version of ChatGPT, may not trigger page updates or new page loads. In such cases, the onLoad() event does not occur, preventing the retrieval of search results using this event. Nevertheless, Makoto Emura came up with an idea to monitor an HTML element using the MutationObserver interface and retrieve the text when changes occur. The ChatGPT.jsee macro sample demonstrates how to retrieve responses from ChatGPT using this interface. If you run this macro as it is, the selected text is only entered into the ChatGPT prompt box. However, if you uncomment lines 99 to 100, it will actually send the text. Disclaimer: The format of Bing and ChatGPT responses may change at any time in the future, potentially affecting the functionality of these macros. The macros are intended solely to demonstrate the new features of EmEditor v23.0. We do not guarantee that these macros will work in the future.
Another major change in v23.0 is the optimization for handling large files. EmEditor users often deal with large CSV files, sometimes reaching several gigabytes. To ensure smooth performance even with such files, extensive testing was conducted on operations such as deleting, inserting, combining, sorting, and pasting columns. The commands were optimized by multi-threading and other optimization techniques, resulting in approximately 21 to 34 times faster performance compared to v22.5.
In the CSV Converter, previous versions lacked multi-threading code, causing slow performance with large files. The new version improves this by using multi-threading and SIMD code, making CSV format conversion even for multi-gigabyte files operate within a few seconds.
For Japanese (JIS) and Japanese (EUC), v23.0 abandons the use of the traditional Windows API object, MultiLanguage, in favor of a custom lookup table. This change enhances the detection logic for invalid characters and significantly improves the operation speed such as file opening and searching.
In v22.5, clicking the left edge of line numbers toggles the bookmark. Responding to user feedback, an option to disable this feature has been added in the Mouse page of the Customize dialog under Click the left edge of a line number to toggle the bookmark.
The Markdown configuration has been improved to allow more accurate representation of emphasis formatting, such as bold and italic, through the addition of special syntax.
Using the Language Server Protocol, Makoto Emura added a feature to format the selected string or entire document. This command, accessible through the Convert menu as Format (shortcut: Ctrl+K, F), eliminates inconsistencies such as the number of leading tabs or spaces and the position and presence of spaces around parentheses () or {} for improved readability. Users can select code to format, and if no selection is made, a dialog prompts whether to format the entire document. Or you may press Ctrl+K, D to format the entire document. To enable the Format command, the Language Server Protocol option must be enabled on the Language Server page of the Customize dialog box, and the desired language must be selected from the Document type drop-down list. Note that preferences for formatting, such as the presence of spaces around parentheses, depend on the language server and cannot be customized within EmEditor.
Starting from this version, the Language Server Protocol is officially supported for C++, CSS, HTML, JavaScript, JavaScript for EmEditor, Perl, and Python configurations. Users can disable this feature at any time in the settings on the Language Server page of the Customize dialog box.
Makoto enhanced the CommitList (Git) plugin by adding an Update Submodule option to pull changes to a submodule. He also removed the Undo Changes menu item from the staged files list (not unstaged files) in the CommitList sidebar to avoid confusion regarding expected behavior.
Finally, the traditional help system, which used an outdated design and was challenging to maintain, has been redesigned using Sphinx. The new help system is maintained and built on our GitHub page.
I hope you like EmEditor, whether you use the Professional or Free version. Please contact us or write in forums if you have any questions, feature requests, or any ideas in the future.
Thank you for using EmEditor!
— Yutaka Emura
Please see EmEditor v23.0 New Features for details and screenshots.
This release also includes all bug fixes while developing v23.0.
If you use the Desktop Installer version, you can select Check for Updates on the Help to download the newest version. If this method fails, please download the newest version, and run the downloaded installer. If you use the Desktop portable version, you can go to the Download page to download the newest version. The Store App versions can be updated through Microsoft Store (64-bit or 32-bit) after a few days.