Coder Social home page Coder Social logo

garymm / edamagit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kahole/edamagit

0.0 0.0 0.0 1.2 MB

Magit for VSCode

Home Page: https://marketplace.visualstudio.com/items?itemName=kahole.magit

License: MIT License

JavaScript 0.60% TypeScript 99.40%

edamagit's Introduction


edamagit
edamagit

Magit for VSCode, inspired by the awesome original Magit.


Keyboard driven Git interface

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

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.

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

Bindings - keybindings.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 (kahole#40)
  • Bisecting
  • Patches
  • Subtrees

Missing Forge features

edamagit's People

Contributors

kahole avatar stevenguh avatar bjackman avatar roblabla avatar griffinschneider avatar dependabot[bot] avatar bezbac avatar the-compiler avatar andrewtimberlake avatar jdanbrown avatar rutherther avatar jeremyjh avatar namburgesas avatar srid avatar tzemanovic avatar bzy-debug avatar ajmcmiddlin avatar lunacookies avatar vbh avatar dandavison avatar paschdan avatar edelvalle avatar garymm avatar yumasi avatar ianic avatar jackfranklin avatar black7375 avatar nickcernis avatar rasmuswl avatar shuguangsun avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.