Skip to content

Highlighting dired buffer like k

Notifications You must be signed in to change notification settings

emacsorphanage/dired-k

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dired-k.el

melpa badge melpa stable badge gh actions badge

dired-k.el highlights dired buffer like k.

(This may works only default dired setting)

screenshot

k.zsh style

Screenshot of dired-k command

git status --short style

Screenshot of dired-k with git style

direx version

Screenshot of direx-k

Installation

dired-k is available on MELPA and MELPA stable

You can install dired-k with the following command.

M-x package-install [RET] dired-k [RET]

Commands

dired-k

Highlight dired buffer by following parameters.

  • File size
  • Modified time
  • Git status(if here is in git repository)

dired-k-no-revert

Same as dired-k, except this command does not call revert-buffert. This command can set to a hook dired-after-readin-hook.

Customization

dired-k-style(Default nil)

View like k.zsh if this value is nil. View like git status --short if this value is 'git.

dired-k-human-readable(Default nil)

Set non-nil if you add -h or --human-readable option to dired-listing-switches.

dired-k-padding(Default 0)

Number of spaces around git status character.

Sample Configuration

dired-k

(require 'dired-k)
(define-key dired-mode-map (kbd "K") 'dired-k)

;; You can use dired-k alternative to revert-buffer
(define-key dired-mode-map (kbd "g") 'dired-k)

;; always execute dired-k when dired buffer is opened
(add-hook 'dired-initial-position-hook 'dired-k)

(add-hook 'dired-after-readin-hook #'dired-k-no-revert)

direx-k

(require 'direx-k)

(global-set-key (kbd "C-\\") 'direx-project:jump-to-project-root-other-window)
(define-key direx:direx-mode-map (kbd "K") 'direx-k)