diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2026-07-05 01:19:30 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2026-07-05 01:19:30 -0400 |
| commit | bdf9a71ab7baa2b1de9abcfd5df1a9107a55d141 (patch) | |
| tree | c4524e6c41aa5107211103401dabfaefc81aa882 /.config/emacs/lisp/evil-collection/modes/vc-dir | |
| parent | fe3984f541bd32bdfa418afb305b614176b55ca0 (diff) | |
add a bunch of emacs packages HELP
Diffstat (limited to '.config/emacs/lisp/evil-collection/modes/vc-dir')
| -rw-r--r-- | .config/emacs/lisp/evil-collection/modes/vc-dir/README.org | 47 | ||||
| -rw-r--r-- | .config/emacs/lisp/evil-collection/modes/vc-dir/evil-collection-vc-dir.el | 113 |
2 files changed, 160 insertions, 0 deletions
diff --git a/.config/emacs/lisp/evil-collection/modes/vc-dir/README.org b/.config/emacs/lisp/evil-collection/modes/vc-dir/README.org new file mode 100644 index 0000000..98e36b4 --- /dev/null +++ b/.config/emacs/lisp/evil-collection/modes/vc-dir/README.org @@ -0,0 +1,47 @@ +* vc-dir + + Evil bindings for [[https://www.gnu.org/software/emacs/manual/html_node/emacs/VC-Directory-Mode.html][vc-dir]] (=C-x v d=). + +** Key bindings + + Standard read-only motion / quit bindings come from + =evil-collection-set-readonly-bindings=. + + | Command | Original | Evil | + |----------------------------------+---------------+-------------------| + | =vc-next-action= | =v= | =c= | + | =vc-diff= | === | =d=, =TAB= | + | =vc-root-diff= | =D= | =D=, =S-TAB= | + | =vc-register= | =i= | =R=, =s= | + | =vc-update= | =+= | =gu=, =F= | + | =revert-buffer= | =g= | =gr= | + | =vc-push= | =P= | =p=, =P= | + | =vc-print-log= | =l= | =Lf=, =Ll= | + | =vc-print-root-log= | =L= | =Lr=, =LL= | + | =vc-log-incoming= | =Ii= | =Li= | + | =vc-log-outgoing= | =Io= | =Lo= | + | =vc-revert= | =N= | =x= | + | =vc-annotate= | =A= | =b= | + | =vc-dir-mark= | =m= | =m= | + | =vc-dir-mark-all-files= | =M m= | =M= | + | =vc-dir-unmark= | =u= | =u= | + | =vc-dir-unmark-all-files= | =M u= | =U= | + | =vc-dir-next-directory= | =M-n= | =]]=, =gj=, =C-j= | + | =vc-dir-previous-directory= | =M-p= | =[[=, =gk=, =C-k= | + | =vc-dir-find-file= | =f=, =RET= | =gf=, =RET= | + | =vc-dir-find-file-other-window= | =o= | =go=, =S-RET= | + | =vc-dir-display-file= | =SPC= | =gO=, =M-RET= | + | =vc-dir-kill-dir-status-process= | =C-c C-c= | =C-c C-c= | + | =vc-dir-toggle-mark= | =SPC= | =t= | + | =vc-dir-hide-up-to-date= | =x= | =(=, =o= | + | =vc-dir-kill-line= | =k= | =X= | + | =vc-dir-search= | =S= | =S= | + | =vc-dir-query-replace-regexp= | =Q= | =Q= | + | =vc-dir-isearch= | =M-s a C-s= | =M-s a C-s= | + | =vc-dir-isearch-regexp= | =M-s a M-C-s= | =M-s a M-C-s= | + | =vc-dir-ignore= | =G= | =i= | + | =vc-create-tag= | =B c= | =Bc= | + | =vc-print-branch-log= | =B l= | =Bl= | + | =vc-retrieve-tag= | =B s= | =Bs= | + + Initial state is normal. diff --git a/.config/emacs/lisp/evil-collection/modes/vc-dir/evil-collection-vc-dir.el b/.config/emacs/lisp/evil-collection/modes/vc-dir/evil-collection-vc-dir.el new file mode 100644 index 0000000..a9d1504 --- /dev/null +++ b/.config/emacs/lisp/evil-collection/modes/vc-dir/evil-collection-vc-dir.el @@ -0,0 +1,113 @@ +;;; evil-collection-vc-dir.el --- Evil bindings for Vc-Dir -*- lexical-binding: t -*- + +;; Copyright (C) 2017 James Nguyen + +;; Author: James Nguyen <james@jojojames.com> +;; Maintainer: James Nguyen <james@jojojames.com> +;; Pierre Neidhardt <ambrevar@gmail.com> +;; URL: https://github.com/emacs-evil/evil-collection +;; Version: 0.0.1 +;; Package-Requires: ((emacs "26.3")) +;; Keywords: evil, vc-dir, tools + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: +;; Evil bindings for Vc-Dir. + +;;; Code: +(require 'vc-dir) +(require 'evil-collection) + +(defconst evil-collection-vc-dir-maps '(vc-dir-mode-map)) + +;;;###autoload +(defun evil-collection-vc-dir-setup () + "Set up `evil' bindings for `vc-dir'." + (evil-set-initial-state 'vc-dir-mode 'normal) + (evil-collection-set-readonly-bindings 'vc-dir-mode-map) + (evil-collection-define-key 'normal 'vc-dir-mode-map + ;; VC commands + "c" 'vc-next-action + + "d" 'vc-diff + "D" 'vc-root-diff + "\t" 'vc-diff + [backtab] 'vc-root-diff + + "R" 'vc-register + "s" 'vc-register ;; Like `magit-stage'? + "gu" 'vc-update + "gr" 'revert-buffer + + "F" 'vc-update ;; This is the same as `vc-update' bound to "gu". + "p" 'vc-push + "P" 'vc-push + + "Lf" 'vc-print-log ;; Log File. + "Ll" 'vc-print-log + "Lr" 'vc-print-root-log + "LL" 'vc-print-root-log + "Li" 'vc-log-incoming + "Lo" 'vc-log-outgoing + + "x" 'vc-revert + "b" 'vc-annotate ;; Like `magit-blame' + + ;; Marking. + "m" 'vc-dir-mark + "M" 'vc-dir-mark-all-files + "u" 'vc-dir-unmark + "U" 'vc-dir-unmark-all-files + + ;; Rebind paragraph-movement commands. + "]]" 'vc-dir-next-directory + "[[" 'vc-dir-previous-directory + "gj" 'vc-dir-next-directory + "gk" 'vc-dir-previous-directory + (kbd "C-j") 'vc-dir-next-directory + (kbd "C-k") 'vc-dir-previous-directory + + ;; The remainder. + "gf" 'vc-dir-find-file + "\C-m" 'vc-dir-find-file + + (kbd "S-<return>") 'vc-dir-find-file-other-window + "go" 'vc-dir-find-file-other-window + "gO" 'vc-dir-display-file + (kbd "M-<return>") 'vc-dir-display-file + + "\C-c\C-c" 'vc-dir-kill-dir-status-process + [down-mouse-3] 'vc-dir-menu + [mouse-2] 'vc-dir-find-file-other-window + "t" 'vc-dir-toggle-mark + [follow-link] 'mouse-face + + "(" 'vc-dir-hide-up-to-date + "o" 'vc-dir-hide-up-to-date + + "X" 'vc-dir-kill-line + "S" 'vc-dir-search + "Q" 'vc-dir-query-replace-regexp + (kbd "M-s a C-s") 'vc-dir-isearch + (kbd "M-s a M-C-s") 'vc-dir-isearch-regexp + "i" 'vc-dir-ignore + + ;; Branching + "Bc" 'vc-create-tag + "Bl" 'vc-print-branch-log + "Bs" 'vc-retrieve-tag)) + +(provide 'evil-collection-vc-dir) +;;; evil-collection-vc-dir.el ends here |
