feat(git-editor): Adds a new extension that lets the user use vicinae as a git editor#141
Open
FredrikMWold wants to merge 1 commit intovicinaehq:mainfrom
Open
Conversation
aeb4ef2 to
7e72008
Compare
…e as a git editor
7e72008 to
3969cc0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This extension integrates Vicinae seamlessly into normal Git workflows, allowing it to be used with standard Git commands.
It enables Vicinae to act as the Git editor for writing commit messages and as the sequencer editor during interactive rebases.
How it works
Git launches editors by passing the path to a temporary file and expects the process to block until editing is complete. Since Vicinae is opened via deeplinks, which cannot accept arbitrary arguments, this file cannot be passed directly.
To handle this, the extension adds two small helper scripts that sits between Git and Vicinae. The script pipe the arguments to the correct place and keeps the process alive, until Vicinae writes to the git temp file. This allows Vicinae to work with Git’s editor flow without changing how Git commands are invoked.
There is an open issue to support waiting on deeplink launches directly in Vicinae, which could simplify this in the future.