Add evil-ztree
This commit is contained in:
parent
d7ede19835
commit
ff98d3bc15
|
@ -75,7 +75,8 @@
|
|||
transmission
|
||||
vlf
|
||||
woman
|
||||
xref)
|
||||
xref
|
||||
(ztree ztree-diff))
|
||||
"The list of modes which will be evilified by `evil-collection-init'.
|
||||
Elements are either target mode symbols or lists which `car' is the
|
||||
mode symbol and `cdr' the packages to register.
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
;;; evil-ztree.el --- Evil bindings for ztree -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2017 Pierre Neidhardt
|
||||
|
||||
;; Author: Pierre Neidhardt <ambrevar@gmail.com>
|
||||
;; Maintainer: James Nguyen <james@jojojames.com>, Pierre Neidhardt <ambrevar@gmail.com>
|
||||
;; URL: https://github.com/jojojames/evil-collection
|
||||
;; Version: 0.0.1
|
||||
;; Package-Requires: ((emacs "25.1"))
|
||||
;; Keywords: emacs, compile, evil
|
||||
;; HomePage: https://github.com/jojojames/evil-collection
|
||||
|
||||
;; This file 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, or (at your
|
||||
;; option) any later version.
|
||||
;;
|
||||
;; This file 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.
|
||||
;;
|
||||
;; For a full copy of the GNU General Public License
|
||||
;; see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'evil)
|
||||
(require 'ztree)
|
||||
|
||||
(evil-set-initial-state 'ztree-mode 'motion)
|
||||
|
||||
(evil-define-key 'motion ztree-mode-map
|
||||
(kbd "<tab>") 'ztree-jump-side
|
||||
(kbd "<return>") 'ztree-perform-action
|
||||
(kbd "SPC") 'ztree-perform-soft-action
|
||||
|
||||
"x" 'ztree-toggle-expand-subtree
|
||||
|
||||
;; update
|
||||
"gr" 'ztree-refresh-buffer
|
||||
|
||||
;; quit
|
||||
"q" 'quit-window
|
||||
"ZQ" 'quit-window
|
||||
"ZZ" 'quit-window)
|
||||
|
||||
(evil-define-minor-mode-key 'motion 'ztreediff-mode
|
||||
"C" 'ztree-diff-copy
|
||||
"D" 'ztree-diff-delete-file
|
||||
"zH" 'ztree-diff-toggle-show-filtered-files
|
||||
"d" 'ztree-diff-simple-diff-files
|
||||
"zh" 'ztree-diff-toggle-show-equal-files
|
||||
"gf" 'ztree-diff-view-file
|
||||
|
||||
;; update
|
||||
"gr" 'ztree-diff-partial-rescan
|
||||
"gR" 'ztree-diff-full-rescan)
|
||||
|
||||
(provide 'init-evil-ztree)
|
||||
;;; evil-ztree.el ends here
|
Loading…
Reference in New Issue