emacs-evil / evil-magit

Black magic or evil keys for magit
https://github.com/justbur/evil-magit
GNU General Public License v3.0
273 stars 16 forks source link

Let's implement it #1

Closed tarsius closed 8 years ago

tarsius commented 9 years ago

Were it all began: https://github.com/magit/magit/issues/1968.

That discussion contains some suggestions which seem reasonable to a layman like me. Please create a branch and import your configuration. When that is ready create a commit on the master which describes your configuration in README.md. Then rebase your work on top of that and ask for push permissions. Finally push that one descriptive commit to master (and only that) and your implementation to the branch YOUR_GITHUB_USERNAME.

louy2 commented 8 years ago

On keybindings, I'd like to reply to some suggestions raised by @vyp .

Again, not sure if vim has anything for "jumping" specifically.

Jumping in vim is largely handled by g and G. They also set marks at the origin of a jump.

Also, maybe it is worth exploring equivalent vim plugins, such as Fugitive.

syl20bnr commented 8 years ago

I encourage people to participate to this design although I'm not really for it in Spacemacs because there is an automatic way of making any maps Vim compatible by defining a minimal set of Vim keys and applying rules to them. I find this method robust, consistent, future proof and maintenance hassle free (we cannot design all the modes of the earth manually for evil).

Since Magit can handle a top quality Evil integration because it has the community to do it, I won't be against using it in Spacemacs but the ideal implementation would allow the users to be able to dynamically opt-out/opt-in for this integration.

All in all I have few interest in participating to this design but I encourage people to do it!

louy2 commented 8 years ago

@syl20bnr Thanks for your encouragement!

tarsius commented 8 years ago

In the old thread someone requested a list of keymaps. Here it is:

(defvar magit-keymaps
  '(git-commit-mode-map
    git-rebase-mode-map
    magit-blame-mode-map
    magit-blob-mode-map
    magit-branch-section-map
    magit-cherry-mode-map
    magit-commit-section-map
    magit-diff-mode-map
    magit-file-mode-map
    magit-file-section-map
    magit-hunk-section-map
    magit-log-mode-map
    magit-log-read-revs-map
    magit-log-select-mode-map
    magit-minibuffer-local-ns-map
    magit-module-commit-section-map
    magit-popup-mode-map
    magit-process-mode-map
    magit-reflog-mode-map
    magit-refs-mode-map
    magit-remote-section-map
    magit-staged-section-map
    magit-stash-section-map
    magit-stashes-section-map
    magit-status-mode-map
    magit-tag-section-map
    magit-unpulled-section-map
    magit-unpushed-section-map
    magit-unstaged-section-map
    magit-untracked-section-map
    with-editor-mode-map))
tarsius commented 8 years ago

Thanks to magit/magit@cc92034cf76ba4f355b203741cfa9d71c6f99088 it now probably is unnecessary to modify section keymaps for use with Evil. Or at least fewer of them.