| git.druid.rocks | index | druid520 | radium | radium-vc-dired.el |
radium-vc-dired.el
;;; radium-vc-dired.el, vc + dired tuned for netbsd, diff-hl change markers -*- lexical-binding: t; -*-
(setq vc-follow-symlinks t
vc-handled-backends '(Git))
(require 'dired)
(setq dired-listing-switches "-alF" ;; portable bsd ls flags, no gnu-only long opts
dired-dwim-target t
dired-recursive-copies 'always
dired-recursive-deletes 'top
dired-kill-when-opening-new-dired-buffer t)
(require 'dired-x)
;; batch-rename in place: same C-c C-e muscle memory as wgrep - make
;; the dired listing writable, edit the names right there, and C-x C-s
;; applies the renames to the real files.
(define-key dired-mode-map (kbd "C-c C-e") #'wdired-change-to-wdired-mode)
;; every git-modified line lights up in the margin (no fringes on a
;; tty), so an unsaved/uncommitted edit is obvious in the actual editor
;; buffer, not just in vc-diff; dired also marks which files changed.
(use-package diff-hl
:init (global-diff-hl-mode 1)
:custom (diff-hl-draw-borders nil)
:hook (dired-mode . diff-hl-dired-mode)
:config
(unless (display-graphic-p)
(diff-hl-margin-mode 1)))
(provide 'radium-vc-dired)