Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I user dired to browse file, and I would like to use hl-line-mode which highlights the currents line, but I only want it to be enabled automatically when using dired
That's what hooks are for:
(add-hook 'dired-mode-hook 'hl-line-mode)
(add-hook 'dired-mode-hook 'global-hl-line-mode)
Required, but never shown