This post is the eighth part of the series Dired as Default File Manager

Color Files by extensions

Dired rainbow is an extension for Dired that helps you to colorize file names in Dired depending on the file types. You can install the package using package.el . The steps is really easy, just define the file extensions group and the color you want for that group. For example

(require 'dired-rainbow)

(defconst dired-audio-files-extensions
  '("mp3" "MP3" "ogg" "OGG" "flac" "FLAC" "wav" "WAV")
  "Dired Audio files extensions")
(dired-rainbow-define audio "#329EE8" dired-audio-files-extensions)

(defconst dired-video-files-extensions
    '("vob" "VOB" "mkv" "MKV" "mpe" "mpg" "MPG" "mp4" "MP4" "ts" "TS" "m2ts"
      "M2TS" "avi" "AVI" "mov" "MOV" "wmv" "asf" "m2v" "m4v" "mpeg" "MPEG" "tp")
    "Dired Video files extensions")
(dired-rainbow-define video "#B3CCFF" dired-video-files-extensions)

Image Preview with Helm

Helm follow-mode makes it possible for browsing images in one window with the preview in another window. Again, you can use package.el to install helm without any difficulty. Helm follow-mode uses image-dired in the background, so if image-dired doesn't work for some reason, this will not work too. Be sure to have Imagemagick package installed.

However, what helm follow-mode do with the image preview is to open the image inside Emacs so it is a bit slow. On modern computer with high speed CPU and SSD, this should not be a big problem

Make sure you have helm installed and activated, add this to your .emacs to turn on image-dired-display-image-mode by default.

(image-dired-display-image-mode)

Now navigate your dired buffer to your image folder and call helm-find-files. After that, type C-c C-f to turn on helm follow-mode. The images will now be previewed in other window.