Add Dired config
This commit is contained in:
parent
781e1f8c10
commit
c86529b561
3 changed files with 38 additions and 1 deletions
|
@ -3,8 +3,9 @@ include ../../dotfiles.mk
|
||||||
AUTOLOADS_FILE = site-lisp/site-autoloads.el
|
AUTOLOADS_FILE = site-lisp/site-autoloads.el
|
||||||
UNWANTED = $(AUTOLOADS_FILE) site-lisp/flycheck_% site-lisp/flycheck-%
|
UNWANTED = $(AUTOLOADS_FILE) site-lisp/flycheck_% site-lisp/flycheck-%
|
||||||
SITE_LISPS = $(addsuffix c,$(filter-out $(UNWANTED),$(wildcard site-lisp/*.el)))
|
SITE_LISPS = $(addsuffix c,$(filter-out $(UNWANTED),$(wildcard site-lisp/*.el)))
|
||||||
|
INIT_LISPS = $(addsuffix .elc,$(basename $(wildcard init/*.org)))
|
||||||
|
|
||||||
all: init.elc init/js-mode-init.elc $(AUTOLOADS_FILE) $(SITE_LISPS)
|
all: init.elc $(INIT_LISPS) $(AUTOLOADS_FILE) $(SITE_LISPS)
|
||||||
|
|
||||||
%.el: %.org
|
%.el: %.org
|
||||||
$(call tangle,emacs-lisp)
|
$(call tangle,emacs-lisp)
|
||||||
|
|
|
@ -914,6 +914,13 @@ To start off, first I need to enable lexical binding.
|
||||||
|
|
||||||
* Applications
|
* Applications
|
||||||
|
|
||||||
|
- [[file:init/dired-init.org][Dired]] :: The Emacs file manager. Very powerful, and I don't use it
|
||||||
|
enough /yet/.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(with-eval-after-load 'dired (load "dired-init"))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Magit
|
** Magit
|
||||||
|
|
||||||
Magit is a very nice interface to Git for Emacs. It allows you to
|
Magit is a very nice interface to Git for Emacs. It allows you to
|
||||||
|
|
29
emacs/.emacs.d/init/dired-init.org
Normal file
29
emacs/.emacs.d/init/dired-init.org
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
#+TITLE: Dired
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(require 'dired)
|
||||||
|
(require 'dired-x)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Show human-readable sizes in dired buffers.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq dired-listing-switches "-alh")
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Show the same info for subdirectories, but don't show the =.= and =..=
|
||||||
|
directories, since those are most likely already shown in the buffer.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq dired-subdir-switches "-Alh")
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Add a keybinding to dired buffers to change to wdired.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defun oni:dired-add-wdired-keybinding ()
|
||||||
|
"Add a keybinding for wdired mode."
|
||||||
|
(define-key dired-mode-map (kbd "E") 'wdired-change-to-wdired-mode))
|
||||||
|
|
||||||
|
(add-hook 'dired-mode-hook 'oni:dired-add-wdired-keybinding)
|
||||||
|
#+END_SRC
|
Loading…
Reference in a new issue