All Projects → zawys → Vscode As Git Mergetool

zawys / Vscode As Git Mergetool

Licence: agpl-3.0
VS Code extension providing diff editor layouts & more for 3-way merging

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Vscode As Git Mergetool

Vscode Markdown Pdf
Markdown converter for Visual Studio Code
Stars: ✭ 571 (+2755%)
Mutual labels:  vscode-extension
Vscode Peacock
Subtly change the color of your Visual Studio Code workspace. Ideal when you have multiple VS Code instances, use VS Live Share, or use VS Code's Remote features, and you want to quickly identify your editor.
Stars: ✭ 690 (+3350%)
Mutual labels:  vscode-extension
Tabnine Vscode
Visual Studio Code client for TabNine. https://marketplace.visualstudio.com/items?itemName=TabNine.tabnine-vscode
Stars: ✭ 770 (+3750%)
Mutual labels:  vscode-extension
Discord Vscode
🖋️ Update your discord status with a rich presence
Stars: ✭ 587 (+2835%)
Mutual labels:  vscode-extension
Mdmath
LaTeX Math for Markdown inside of Visual Studio Code.
Stars: ✭ 675 (+3275%)
Mutual labels:  vscode-extension
Luapanda
lua debug and code tools for VS Code
Stars: ✭ 738 (+3590%)
Mutual labels:  vscode-extension
Evermonkey
Evernote Editing. Redefined. 关于 token 的问题请去 https://github.com/michalyao/evermonkey/issues/94 中查看!
Stars: ✭ 542 (+2610%)
Mutual labels:  vscode-extension
Vscode Create Tests
A vscode extension to quickly create test files.
Stars: ✭ 16 (-20%)
Mutual labels:  vscode-extension
Vscode Gitlens
Supercharge the Git capabilities built into Visual Studio Code — Visualize code authorship at a glance via Git blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via powerful comparison commands, and so much more
Stars: ✭ 6,483 (+32315%)
Mutual labels:  vscode-extension
Vscode Git Graph
View a Git Graph of your repository in Visual Studio Code, and easily perform Git actions from the graph.
Stars: ✭ 767 (+3735%)
Mutual labels:  vscode-extension
Insta
A snapshot testing library for rust
Stars: ✭ 619 (+2995%)
Mutual labels:  vscode-extension
Vscode Terraform
A Visual Studio Code extension for Hashicorp Terraform
Stars: ✭ 672 (+3260%)
Mutual labels:  vscode-extension
Vscode Sqltools
Database management for VSCode
Stars: ✭ 741 (+3605%)
Mutual labels:  vscode-extension
Vscode Wakatime
Visual Studio Code plugin for automatic time tracking and metrics generated from your programming activity.
Stars: ✭ 588 (+2840%)
Mutual labels:  vscode-extension
Vscode Material Icon Theme
Available on the VSCode Marketplace
Stars: ✭ 773 (+3765%)
Mutual labels:  vscode-extension
Vscode Php Debug
PHP Debug Adapter for Visual Studio Code 🐞⛔
Stars: ✭ 569 (+2745%)
Mutual labels:  vscode-extension
Vscode Markdown Preview Enhanced
One of the "BEST" markdown preview extensions for Visual Studio Code
Stars: ✭ 701 (+3405%)
Mutual labels:  vscode-extension
Hxcpp Debugger
Visual Studio Code Debugger for Haxe/HXCPP applications
Stars: ✭ 18 (-10%)
Mutual labels:  vscode-extension
Vscode Bookmarks
Bookmarks Extension for Visual Studio Code
Stars: ✭ 804 (+3920%)
Mutual labels:  vscode-extension
Coderoad Vscode
👩‍💻 Create or play Interactive coding tutorials in VSCode
Stars: ✭ 757 (+3685%)
Mutual labels:  vscode-extension

VS Code as Git Mergetool

Visual Studio Marketplace installs Visual Studio Marketplace downloads Visual Studio Marketplace Rating GitHub stars GitHub watchers GitHub commit activity Liberapay patron count

This extension provides diff editor layouts and more for common-base merges (aka. “3-way merges”) directly in VS Code.

Four pane merge

Demo screencast

Features

  • Assists in setting up suitable Git and VS Code configuration options, which allows that VS Code is invoked when an external git mergetool is executed.
  • Shows a 3- or 4-pane diff layout when VS Code opens a merge situation. These layouts can be switched during merging. There is an additional mechanism called “zooming”, allowing to quickly change layout proportions using keyboard shortcuts.
  • Synchronizes the scroll and cursor position of the editors according to a text diff.
  • Provides commands for launching/continuing/stopping git mergetool, as well as a super command guiding through the whole merge process by invoking other commands as appropriate (by default shift+alt+m m).
  • Adds key bindings for commands most useful during merge (shift+alt+m …). See the contributions tab in VS Code or the keybindings section in package.json.
  • Optionally opens the Git commit message in an editor after a successful git mergetool execution (as a workaround for few Git extension bugs).
  • Allows to select arbitrary files for merging, invoking git merge-files and the diff layout.
  • Provides a command for git merge --abort and git merge --quit.

At time of release this has been tested only on my Linux machine, so especially Windows and MacOS users are welcomed to report any compatibility issues. See Contribute.

Installation

This is extension is available in the official Marketplace.

Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install zawys.vscode-as-git-mergetool

Alternatively, you can get the build from GitHub:

  • Go to the latest Release and download the VSIX.
  • Skip this if you do not want to verify the signature:
    • Download the other files into the same directory.
    • sha256sum -c SHA256SUMS
    • gpg --recv-keys '4A5D 4A5F B953 7A3A B931 6463 41B3 FBF3 7F23 3754'
    • gpg --verify SHA256SUMS.sig SHA256SUMS
  • Run the command “Install from VSIX…” inside VS Code and select the VSIX.

Usage

When you have a merge conflict in an opened repo, you can run the command “Start git mergetool” from the command palette or the command menu in the SCM panel. Then the layout should change and new buttons in the status bar should appear.

When you start git mergetool from the command line, that process is not controlled by the extension but still a diff layout in VS Code should open.

Layout

The default layout 4TransferRight has 4 panes showing the changes distributed over two dimensions:

  • Top vs. bottom panes: local vs. remote changes
  • Left vs. right panes: changes applied starting from base vs. ending in merged

In the right panes you can edit the (same) merged file and the goal of the game is to make the right side semantically equal the left side. 😅

There are also several other layouts available.

Known issues

  • When you have an file with conflicts opened, start a diff layout for that file and stop the diff layout, then it may happen that the originally opened editor is closed and a diff editor remains instead. This is due to a limitation of VS Code that editors seem to be recreated when previously covered by other editors and then there is no reliable way to find out who the editor belongs to.

    TL;DR: Use the command “Deactivate diff layout”, “Stop mergetool” or Ctrl+W to stop the diff editor layout. Auto save is useful, too.

Contribute

Feel free to file feature requests and bug reports on GitHub.

You can help making new features for this extension possible by adding your 👍 to following issues (info). But DO NOT post comments there which provide no additional information or ideas.

Build

  1. Install Yarn globally

  2. yarn

  3. yarn run build

    The generated VSIX should then be in packages/.

Development environment setup

Run the steps listed in section Build.

Additionally, see the VSC Extension Quickstart.

You probably also want to install VS Code Insiders to run the tests, see reason.

Further info

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].