1
1
mirror of https://github.com/kahole/edamagit.git synced 2024-09-17 10:27:09 +03:00
Magit for VSCode
Go to file
2020-06-15 17:13:26 +02:00
.vscode whitespace 2020-05-08 21:44:44 +02:00
images logo 2020-05-13 23:09:06 +02:00
languages adds foldingrangeprovider 2019-12-10 23:55:49 +01:00
src fixes issue w/ empty dirs / dirs containing only ignored files show up in untracked section 2020-06-10 21:46:15 +02:00
syntaxes Makes helpView dynamic by parsing user keybindings (#24) (#37) 2020-06-03 20:14:59 +02:00
.eslintrc.json adds stash worktree command 2020-03-27 17:11:37 +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 bump 2020-06-10 21:18:53 +02:00
LICENSE add license 2020-02-17 21:51:55 +01:00
package-lock.json bump 2020-06-10 21:18:53 +02:00
package.json bump 2020-06-10 21:18:53 +02:00
README.md Fix <tab> in vim with suggested bindings (#43) 2020-06-15 17:13:26 +02:00
tsconfig.json Implements graph in logging (#40) 2020-06-09 20:45:50 +02:00
webpack.config.js Makes helpView dynamic by parsing user keybindings (#24) (#37) 2020-06-03 20:14:59 +02:00


Markdownify
edamagit

Magit for VSCode, inspired by the awesome original Magit.

UsageTroubleshootingVim BindingsRoadmap

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
Help (when in edamagit) ?

> 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

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

Troubleshooting

I can't commit

  • git config needs to be set, for repo or global
    user.name and user.email

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.

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

Implement missing Git/Magit features

Interface