I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1.6 KiB

Dired

Emacs has a built-in directory editor.

Config

Emacs has some really amazing built-in packages, and dired1 is one of them. It completly coveres everything you would expect from a file manager, but it's not perfect out of the box.

Current directory

I don't want to press RET twice to navigate to the current directory. There's a way to get around this problem with jump, included in the dired-x package, included with Emacs.

(require 'dired-x)

Reusing the same buffer

By default, dired1 will create a new buffer each time you press RET over a directory. This leads to unwanted buffers all over the place. Avoid this behaviour with dired-single2, reusing the same dired buffer.

  • Move up a directory with h

  • Open a single buffer with l

(use-package dired-single
  :config (evil-collection-define-key 'normal 'dired-mode-map
            "h" 'dired-single-up-directory
            "l" 'dired-single-buffer))

Shortcuts

Open a new dired buffer using the jump command with SPC d.

(dotfiles/leader
  "d" '(dired-jump :which-key "Dired"))

Footnotes