From: Peng Li Date: Sat, 2 Jul 2016 06:36:17 +0000 (+0800) Subject: emacs - magit keybindings vi-like X-Git-Url: http://47.100.26.94:8080/?a=commitdiff_plain;h=928ddf4d7b361a66f0d3aba2874f1906cbf43f3f;p=dotfiles.git emacs - magit keybindings vi-like --- diff --git a/emacs.d/config.org b/emacs.d/config.org index 26ccb4b..543d387 100644 --- a/emacs.d/config.org +++ b/emacs.d/config.org @@ -834,6 +834,20 @@ extend org-mode's easy templates, refer to [[http://coldnew.github.io/coldnew-em #+END_SRC +Defined keys, using vi keybindings, Refer abo-abo's setting [[https://github.com/abo-abo/oremacs/blob/c5cafdcebc88afe9e73cc8bd40c49b70675509c7/modes/ora-nextmagit.el][here]] +#+BEGIN_SRC emacs-lisp :tangle yes :results silent + (dolist (map (list magit-status-mode-map + magit-log-mode-map + magit-diff-mode-map + magit-staged-section-map)) + (define-key map "j" 'magit-section-forward) + (define-key map "k" 'magit-section-backward) + (define-key map "n" nil) + (define-key map "p" nil) + (define-key map "v" 'recenter-top-bottom) + (define-key map "i" 'magit-section-toggle)) +#+END_SRC + * IDO & SMEX ** IDO