Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kahole/edamagit
Magit for VSCode
https://github.com/kahole/edamagit
git magit source-control visual-studio-code-extension vscode vscode-extension
Last synced: 1 day ago
JSON representation
Magit for VSCode
- Host: GitHub
- URL: https://github.com/kahole/edamagit
- Owner: kahole
- License: mit
- Created: 2019-12-02T21:50:58.000Z (about 5 years ago)
- Default Branch: develop
- Last Pushed: 2024-11-19T06:10:20.000Z (25 days ago)
- Last Synced: 2024-12-05T14:02:49.369Z (9 days ago)
- Topics: git, magit, source-control, visual-studio-code-extension, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=kahole.magit
- Size: 51.3 MB
- Stars: 1,148
- Watchers: 18
- Forks: 69
- Open Issues: 86
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
edamagit
Magit for VSCode, inspired by the awesome original Magit.
Usage •
Tutorial •
Settings •
Vim Bindings •
Roadmap---
## Keyboard driven Git interface
![Usage](https://github.com/kahole/edamagit/raw/5ebf38107c6130cc16a23f18d84aeecc21f09fe8/magit_commit_demo.gif)
(Theme: [Dracula](https://draculatheme.com/))## Usage
| VSCode Command | Default shortcut |
|----------------------------------|------------------|
| Magit Status | `alt+x g` |
| Magit File Popup | `alt+x alt+g` |
| Magit Dispatch | `alt+x ctrl+g` |
| Magit Help (when in status view) | `?` |`> Magit ` in VSCode Command palette will show you all available Magit actions from where you are.
Keybindings inside edamagit
```
Popup and dwim commands
A Cherry-pick b Branch c Commit
d Diff f Fetch F Pull
I Ignore l Log m Merge
M Remote P Push r Rebase
t Tag V Revert X Reset
y Show Refs z Stash shift+1 Run
shift+5 Worktree o Submodules shift+4 Process LogApplying changes
a Apply s Stage u Unstage
v Reverse S Stage all U Unstage all
k DiscardEssential commands
g refresh current buffer
TAB toggle section at point
RET visit thing at point
shift+4 show git process view
q exit / close magit viewctrl+j Move cursor to next entity
ctrl+k Move cursor to previous entity
```## [[ See also the edamagit tutorial ]](https://kahole.github.io/hole.dev/articles/edamagit-introduction/)
---## Settings
- `Forge-enabled`: Enable Forge functionality (show pull requests, issues, etc from e.g. Github)
- `Display-buffer-function`: Choose which side for magit windows to open on.
- `Hide-status-sections`: Hide listed sections from status view.
- `Quick-switch-enabled`: Automatically confirm switch menu after enabling a switch (e.g. --force)## Monorepo support
When used in a monorepo, you need to make sure that the subdirectory can detect the parent's `.git`.
```json
{
"git.openRepositoryInParentFolders": "always",
}
```## Vim support (VSCodeVim)
All edamagit keybindings are customizable using VSCode's built-in `keybindings.json`.
Below are bindings providing evil-magit / spacemacs like keybindings.
The negative bindings, e.g. `-magit.discard-at-point` for key `k`,
remove the default edamagit bindings and the collisions with the Vim extension.[Open your `keybindings.json`][kse] and paste the following JSON snippet.
[kse]: https://code.visualstudio.com/docs/getstarted/keybindings#_advanced-customization
Bindings - keybindings.json
```json
{
"key": "g g",
"command": "cursorTop",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
},
{ "key": "g r",
"command": "magit.refresh",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
},
{
"key": "tab",
"command": "extension.vim_tab",
"when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert' && editorLangId != 'magit'"
},
{
"key": "tab",
"command": "-extension.vim_tab"
},
{
"key": "x",
"command": "magit.discard-at-point",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
},
{
"key": "k",
"command": "-magit.discard-at-point"
},
{
"key": "-",
"command": "magit.reverse-at-point",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
},
{
"key": "v",
"command": "-magit.reverse-at-point"
},
{
"key": "shift+-",
"command": "magit.reverting",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
},
{
"key": "shift+v",
"command": "-magit.reverting"
},
{
"key": "shift+o",
"command": "magit.resetting",
"when": "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
},
{
"key": "shift+x",
"command": "-magit.resetting"
},
{
"key": "x",
"command": "-magit.reset-mixed"
},
{
"key": "ctrl+u x",
"command": "-magit.reset-hard"
}
```## Roadmap
_Feature requests as well as issues are welcome_
### Interface
- More interactivity in second-tier views (commit view, stash view, etc)
- Config menus### Missing Git/Magit features
- More diffing features
- More logging features (https://github.com/kahole/edamagit/pull/40)
- Bisecting
- Patches
- Subtrees### Missing Forge features