New in Version 21.7

May 11, 2022

New General Features

  • The new version displays file comparison results in one vertically split window by default when you select theCompare orCompare with Options command. The previously used tiled window display is still possible by setting options.
  • The new version will keep the scroll position bottom when the file is reloaded if the scroll position was bottom before reloaded.
  • When theDetect All option is set in theFile page of configuration properties, the detected encoding was unsupported on Windows (such asVISCII), the new version will continue to open the file as the system default encoding and show a notification.
  • Improved URI highlighting.
  • Improved line selections in CSV selection mode.
  • Changed the default style ofHorizontal Grid fromDotted Lines toNormal, and optimized the drawing speed forVertical Separators.
  • Changed the default value for theEnd Indent in a regular expression in some configurations including C++.
  • SupportedBulk Replace All in theBatch Replace dialog box.Bulk Replace All searches the document simultaneously for all search strings whileBatch Replace All searches the document for one search string at a time and repeats the search for each search term.Bulk Replace All works much faster thanBatch Replace All. SeeDifference between Batch Replace All and Bulk Replace All for more information.

Test results:

Batch Replace All (v21.7)Bulk Replace All (v21.7)Comparison
Replace All50 minutes 55 seconds0.484 seconds6,310 times faster

* Replace 1 million random strings with random strings, ignore case, 966 KB, 10,000 lines, random ASCII data. Default options, Windows 11, Core i9-9900K, 32GB RAM, 2TB SSD.

New Options

  • Added theBulk Replace All button to theBatch Replace andBatch Replace in Files dialog boxes.
  • Added theBulk Find button to theBatch Find in Files andBatch Replace in Files dialog boxes.
  • Added theSplit vertically radio button to theSelect view options page of theCompare Files wizard.
  • Added theMonitor files only while EmEditor is active option to theFile page of theCustomize dialog box.

Plug-in New Features

  • Added theFLAG_FIND_MULTI flag to theBATCH_INFO structure.
  • Added theLFI_DONT_ADD_RECENT flag to theLOAD_FILE_INFO_EX structure.
  • Added theCOMPARE_SPLIT_VERT flag to theEditor_Compare inline function andCOMPARE_INFO structure.

Macro New Features

  • Added theeeExFindMulti flag to theBatchReplace method of theSelection object and theBatchFindInFiles andBatchReplaceInFiles methods of theEditor object.
  • Added theeeCompareSplitVert flag to theCompare method of theEditor Object.

Difference between Batch Replace All and Bulk Replace All

Batch Replace All searches a whole document for one string at a time, and repeats this procedure for the number of search strings.Bulk Replace All searches for all search strings simultaneously. The difference may lead to different results if search/replace string pairs contain, for instance:

1 → 5
2 → 4
4 → 2
5 → 1

and if the source document is:

[1,2,3,4,5]

In this case, ifBatch Replace All is used, EmEditor will replace 1 with 5 for the whole document first, and then will replace 2 with 4. At this point, the source document becomes:

[5,4,3,4,5]

Next, when it replaces 4 with 2, note that it will replace two 4’s (the second and fourth numbers). Lastly, when it replaces 5 with 1, it will replace two 5’s (the first and last numbers). Thus, the result will be:

[1,2,3,2,1]

If the newBulk Replace All is used, EmEditor will replace all strings simultaneously. Therefore, the result will be:

[5,4,3,2,1]

as you expect.

Bulk Replace All will replace much faster thanBatch Replace All. In our test,Bulk Replace All completed 6310 times faster thanBatch Replace All when one million search/replace pairs existed (Seetest results).

Bulk Replace All does not support regular expressions, number ranges, or strings including newlines.