2020-08-31 15:26:24 +02:00
|
|
|
;;; wpc-dired.el --- My dired preferences -*- lexical-binding: t -*-
|
|
|
|
|
2019-10-09 13:13:56 +02:00
|
|
|
;; Author: William Carroll <wpcarro@gmail.com>
|
2020-08-31 15:26:24 +02:00
|
|
|
;; Version: 0.0.1
|
|
|
|
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
|
|
|
|
;; Package-Requires: ((emacs "25.1"))
|
2019-10-09 13:13:56 +02:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;; File management in Emacs, if learned and configured properly, should be
|
|
|
|
;; capable to reduce my dependency on the terminal.
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
2020-09-01 00:28:47 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; Dependencies
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2019-10-09 13:13:56 +02:00
|
|
|
|
2020-09-01 00:28:47 +02:00
|
|
|
(require 'macros)
|
2020-09-02 16:01:43 +02:00
|
|
|
(require 'general)
|
2020-09-01 00:28:47 +02:00
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; Configuration
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2019-10-09 13:13:56 +02:00
|
|
|
|
|
|
|
(progn
|
|
|
|
(require 'dired)
|
|
|
|
(setq dired-recursive-copies 'always
|
|
|
|
dired-recursive-deletes 'top
|
|
|
|
dired-dwim-target t)
|
2020-08-14 17:12:58 +02:00
|
|
|
(setq dired-listing-switches "-la --group-directories-first")
|
2019-10-09 13:13:56 +02:00
|
|
|
(general-define-key
|
|
|
|
:keymaps 'dired-mode-map
|
2020-01-23 14:50:18 +01:00
|
|
|
:states '(normal)
|
|
|
|
;; Overriding some KBDs defined in the evil-collection module.
|
|
|
|
"o" #'dired-find-file-other-window
|
|
|
|
"<SPC>" nil ;; This unblocks some of my leader-prefixed KBDs.
|
|
|
|
"s" nil ;; This unblocks my window-splitting KBDs.
|
2019-10-09 13:13:56 +02:00
|
|
|
"c" #'find-file
|
2020-08-14 15:53:59 +02:00
|
|
|
"f" #'project-find-file
|
2019-10-09 13:13:56 +02:00
|
|
|
"-" (lambda () (interactive) (find-alternate-file "..")))
|
|
|
|
(general-add-hook 'dired-mode-hook
|
2020-09-01 00:28:47 +02:00
|
|
|
(list (macros-enable dired-hide-details-mode)
|
2019-10-09 13:13:56 +02:00
|
|
|
#'auto-revert-mode)))
|
|
|
|
|
|
|
|
(progn
|
|
|
|
(require 'locate)
|
|
|
|
(general-define-key
|
|
|
|
:keymaps 'locate-mode-map
|
|
|
|
:states 'normal
|
2020-01-24 11:04:49 +01:00
|
|
|
"o" #'dired-find-file-other-window))
|
2019-10-09 13:13:56 +02:00
|
|
|
|
|
|
|
(provide 'wpc-dired)
|
|
|
|
;;; wpc-dired.el ends here
|