1
1
mirror of https://github.com/kahole/edamagit.git synced 2024-08-15 18:20:30 +03:00
Magit for VSCode
Go to file
2021-04-17 19:15:33 +02:00
.github Update FUNDING.yml 2020-12-21 20:44:04 +01:00
.vscode whitespace 2020-05-08 21:44:44 +02:00
images logo 2020-05-13 23:09:06 +02:00
languages Fix issue where highlighting didn't happen unless the cursor was on a word character. (#51) 2020-06-28 01:27:11 +02:00
src Add setting to hide status sections 2021-04-07 17:29:24 -04:00
syntaxes Give entities a magit-specific TextMate scope 2021-01-08 01:18:05 +11:00
.eslintrc.json upgrade everything 2020-11-22 18:00:38 +01:00
.gitignore adds webpack to bundle extension 2020-05-06 19:37:34 +02:00
.vscodeignore adds webpack to bundle extension 2020-05-06 19:37:34 +02:00
CHANGELOG.md changelog 2021-04-08 20:07:15 +02:00
LICENSE update license 2021-04-17 19:15:33 +02:00
package-lock.json changelog 2021-04-08 20:07:15 +02:00
package.json changelog 2021-04-08 20:07:15 +02:00
README.md changelog 2021-04-08 20:07:15 +02:00
tsconfig.json Implement pull rebase option 2020-10-02 17:22:54 -07:00
TUTORIAL.md spelling 2021-01-31 18:04:33 +01:00
webpack.config.js Makes helpView dynamic by parsing user keybindings (#24) (#37) 2020-06-03 20:14:59 +02:00


edamagit
edamagit

Magit for VSCode, inspired by the awesome original Magit.

UsageTutorialSettingsVim BindingsRoadmap


Keyboard driven Git interface

Usage

Sub hunk staging

Usage (Theme: Dracula)

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 Log

Applying changes
  a Apply          s Stage          u Unstage
  v Reverse        S Stage all      U Unstage all
  k Discard

Essential 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 view

  ctrl+j Move cursor to next entity
  ctrl+k Move cursor to previous entity

[ See also the edamagit tutorial ]


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)

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 and paste the following JSON snippet.

Bindings - keybindings.json
  {
    "key": "tab",
    "command": "extension.vim_tab",
    "when": "editorFocus && vim.active && !inDebugRepl && vim.mode != 'Insert' && editorLangId != 'magit'"
  },
  {
    "key": "tab",
    "command": "-extension.vim_tab",
    "when": "editorFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
  },
  {
    "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

Missing Forge features