I tried to get dired-sidebar to truncate rather than wrap long filenames. In dired this works with (setq truncate-lines t), but I had no success with dired-sidebar.
Here is my config:
(use-package dired-sidebar
:bind (([f8] . dired-sidebar-toggle-sidebar))
:ensure t
:commands (dired-sidebar-toggle-sidebar)
:init
(add-hook 'dired-sidebar-mode-hook
(lambda ()
(unless (file-remote-p default-directory)
(auto-revert-mode))))
;; don't wrap long filenames. `truncate-lines' is
;; buffer-local, so this should not affect dired-buffers.
;; Doesn' t work, though.
(add-hook 'dired-sidebar-mode-hook
(lambda ()
(setq truncate-lines t)))
:config
(push 'toggle-window-split dired-sidebar-toggle-hidden-commands)
(push 'rotate-windows dired-sidebar-toggle-hidden-commands)
(setq dired-sidebar-use-term-integration t)
(setq dired-sidebar-use-custom-font t))
Replacing dired-sidebar-mode-hook with dired-mode-hook doesn't help either.
If I enter M-x eval-expression and (setq truncate-lines t) while in the sidebar, the lines are truncated as intended.
I'm sorry to bother you with something that is probably my own mistake. Any hints are appreciated, as is your work.
I tried to get dired-sidebar to truncate rather than wrap long filenames. In dired this works with
(setq truncate-lines t)
, but I had no success with dired-sidebar.Here is my config:
Replacing
dired-sidebar-mode-hook
withdired-mode-hook
doesn't help either.If I enter
M-x eval-expression
and(setq truncate-lines t)
while in the sidebar, the lines are truncated as intended.I'm sorry to bother you with something that is probably my own mistake. Any hints are appreciated, as is your work.