2015-06-08 10:07:50 +00:00
|
|
|
;;; packages.el --- vinegar Layer packages File for Spacemacs
|
|
|
|
;;
|
2021-03-22 20:11:29 +00:00
|
|
|
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
|
2015-06-08 10:07:50 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
2021-03-24 03:31:44 +00:00
|
|
|
;; 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/>.
|
|
|
|
|
2015-06-08 10:07:50 +00:00
|
|
|
|
|
|
|
(setq vinegar-packages
|
2016-04-07 22:33:43 +00:00
|
|
|
'(
|
|
|
|
diff-hl
|
|
|
|
;; dired+
|
|
|
|
(dired :location built-in)
|
|
|
|
))
|
2015-06-08 10:07:50 +00:00
|
|
|
|
|
|
|
(defun vinegar/init-dired+ ()
|
|
|
|
(use-package dired+
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2015-06-08 10:07:50 +00:00
|
|
|
:init
|
|
|
|
(progn
|
|
|
|
(setq diredp-hide-details-initially-flag t)
|
|
|
|
(setq diredp-hide-details-propagate-flag t)
|
|
|
|
;; use single buffer for all dired navigation
|
|
|
|
;; disable font themeing from dired+
|
|
|
|
(setq font-lock-maximum-decoration (quote ((dired-mode . 1) (t . t))))
|
|
|
|
(toggle-diredp-find-file-reuse-dir 1)
|
|
|
|
)))
|
|
|
|
|
|
|
|
(defun vinegar/post-init-diff-hl ()
|
|
|
|
(use-package diff-hl
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2015-06-08 10:07:50 +00:00
|
|
|
:init
|
|
|
|
(progn
|
|
|
|
(add-hook 'dired-mode-hook 'diff-hl-dired-mode)
|
|
|
|
)))
|
2015-11-22 18:48:32 +00:00
|
|
|
|
2016-04-07 22:28:53 +00:00
|
|
|
(defun vinegar/post-init-dired ()
|
2015-11-22 18:48:32 +00:00
|
|
|
(use-package dired
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2015-11-22 18:48:32 +00:00
|
|
|
:config
|
|
|
|
(evilified-state-evilify dired-mode dired-mode-map
|
|
|
|
"j" 'vinegar/move-down
|
|
|
|
"k" 'vinegar/move-up
|
|
|
|
"-" 'vinegar/up-directory
|
|
|
|
"0" 'dired-back-to-start-of-files
|
|
|
|
"=" 'vinegar/dired-diff
|
|
|
|
(kbd "C-j") 'dired-next-subdir
|
|
|
|
(kbd "C-k") 'dired-prev-subdir
|
|
|
|
"I" 'vinegar/dotfiles-toggle
|
|
|
|
(kbd "~") '(lambda ()(interactive) (find-alternate-file "~/"))
|
|
|
|
(kbd "RET") (if vinegar-reuse-dired-buffer
|
|
|
|
'dired-find-alternate-file
|
|
|
|
'dired-find-file)
|
2017-07-02 13:48:06 +00:00
|
|
|
"f" (if (configuration-layer/layer-used-p 'ivy)
|
2016-01-27 03:53:58 +00:00
|
|
|
'counsel-find-file
|
|
|
|
'helm-find-files)
|
2015-11-22 18:48:32 +00:00
|
|
|
"J" 'dired-goto-file
|
|
|
|
(kbd "C-f") 'find-name-dired
|
|
|
|
"H" 'diredp-dired-recent-dirs
|
|
|
|
"T" 'dired-tree-down
|
|
|
|
"K" 'dired-do-kill-lines
|
|
|
|
"r" 'revert-buffer
|
|
|
|
(kbd "C-r") 'dired-do-redisplay
|
|
|
|
"gg" 'vinegar/back-to-top
|
|
|
|
"G" 'vinegar/jump-to-bottom)))
|