Merge Editor Improvements Highlight VS Code 1.71 (August 2022 Update)

Despite August being a popular month for Visual Studio Code engineers to vacation, the dev team managed to churn out a bunch of new features in the regular monthly update, bringing the lightweight, open source-based, cross-platform code editor to v1.71.

Heading that list of new functionality are several improvements to VS Code's three-way merge editor for merge conflict resolution, letting developers see the merge's current, incoming and final results.

In last month's update, the team announced he new ability for devs to use command-line options to bring up the merge editor in the code editor, enabling them, for example, to set some configurations to use VS Code as a merge tool for Git.

In this update, they made several more improvements:

  • Opening the Merge Editor from Files with Conflicts: A file with a conflict will now automatically show an "Open in Merge Editor" button to transition between the text and merge editors.
  • Merge Editor File Not Modified on Open: "VS Code no longer modifies the result file when opening it in the merge editor (conflicting regions were replaced with base). Instead, the conflict markers remain in the file but are hidden in the result view. The checkboxes can be used to replace the conflict markers with either side, a combination of both sides or, by unchecking them, with base."
  • Restoring Old Conflict Decorators: "The old inline conflict decorators are no longer disabled, so the merge editor and inline experience can be used together. When the merge editor opens, you can get the previous experience with a single click in the editor toolbar."
    Restoring Old Conflict Decorators in Animated Action
    [Click on image for larger, animated GIF view.] Restoring Old Conflict Decorators in Animated Action (source: Microsoft).
  • Checkbox Improvements: Checkboxes of a conflict are are now visible by default, even for conflicts too big for the viewport, with colors emphasizing the checkboxes for unhandled conflicts.
  • Diffing Algorithm Improvements: In exploring alternative diffing algorithms to improve the quality of conflicts, the team added a new experimental diffing algorithm. While not yet optimized for performance, it can improve the merge editor experience in many edge-cases.

"In this release, we focused on the most important UX issues of the merge editor and fixed many bugs," the team said. "If you still find yourself confused by the new merge editor, we would love to hear from you! Please create a new issue in our repo, share a screenshot and your merge editor state (using the Copy Merge Editor State as JSON command). We really appreciate all the feedback we've gotten so far, and more feedback will help us make the merge editor experience great for everyone."

Here's what else is new in the update, as highlighted by the team in a Sept. 1 post, with links for more details.

  • Expanded codecs support -- To help display embedded audio and video in notebooks and webviews: The FFmpeg shared library coming with VS Code previously previously only supported the FLAC codec, but now supports many more codecs and containers, enabling more audio and video files to be played from notebooks or by extensions embedding audio and video into webviews.
  • File rename selection -- Pressing F2 selects filename, whole name, or file extension: "After initiating a rename action on a file, pressing the F2 key will cycle through the file name, entire selection, and file extension to allow for more flexible keyboard-only interaction."
  • New Code Action UI -- Quickly find the Code Action you're looking for: In an overhaul of the Code Action control, devs can now find a needed Code Action with a new custom control instead of just being presented with a simple menu of Code Actions.
  • Terminal updates -- Shell integration for fish and Git Bash, new smooth scrolling: Improvements here include:
    • Fish shell integration is available as an experimental manual install only. See the Shell Integration documentation for how to install it.
    • Git bash for Windows shell integration is available as an experimental manual install only. See the section on manual installation for details.
    • Support for common alternative current working directory sequences: OSC 6 ; scheme://<cwd> ST, OSC 1337 ; CurrentDir=<cwd> ST, OSC 9 ; 9 ; <cwd> ST
    • Better handling of various shell integration edge cases.
  • Jupyter notebook image pasting -- Paste and preview image files in notebook Markdown cells: Users of VS Code's popular (44 million installs) Jupyter extension can now paste screenshots or image files into Markdown cells inside notebooks, with only the image/png mime type currently supported.
  • TypeScript livestreams -- Watch TS "Crash Course" or "Tips and Tricks" on YouTube: Devs who missed the VS Code livestreams on TypeScript can now watch these two recent sessions with Matt Pocock: TypeScript Crash Course and TypeScript Tips and Tricks.
  • Live Preview extension -- Live Preview now supports multi-root web projects: "The Live Preview extension now officially supports multi-root workspaces! Although users could have technically used Live Preview in multi-root workspaces before, there is now a cleaner implementation supporting it. The Live Preview extension now starts a new server for each root in your multi-root workspace; therefore, links that are relative to the root of your project (ones that start with a /) will work properly when previewing multi-root workspaces."

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


Subscribe on YouTube