emacs/dired: integrate open/xdg-open/start w/ dired
This commit is contained in:
parent
5783fe5e7e
commit
35b9abd230
1 changed files with 15 additions and 1 deletions
|
@ -126,7 +126,21 @@ we have to clean it up ourselves."
|
|||
"\\|\\.\\(?:elc\\|o\\|pyo\\|swp\\|class\\)\\'"))
|
||||
;; Disable the prompt about whether I want to kill the Dired buffer for a
|
||||
;; deleted directory. Of course I do!
|
||||
(setq dired-clean-confirm-killing-deleted-buffers nil))
|
||||
(setq dired-clean-confirm-killing-deleted-buffers nil)
|
||||
;; Let OS decide how to open certain files
|
||||
(when-let (cmd (cond (IS-MAC "open")
|
||||
(IS-LINUX "xdg-open")
|
||||
(IS-WINDOWS "start")))
|
||||
(setq dired-guess-shell-alist-user
|
||||
`(("\\.\\(?:docx\\|pdf\\|djvu\\|eps\\)\\'" ,cmd)
|
||||
("\\.\\(?:jpe?g\\|png\\|gif\\|xpm\\)\\'" ,cmd)
|
||||
("\\.\\(?:xcf\\)\\'" ,cmd)
|
||||
("\\.csv\\'" ,cmd)
|
||||
("\\.tex\\'" ,cmd)
|
||||
("\\.\\(?:mp4\\|mkv\\|avi\\|flv\\|rm\\|rmvb\\|ogv\\)\\(?:\\.part\\)?\\'" ,cmd)
|
||||
("\\.\\(?:mp3\\|flac\\)\\'" ,cmd)
|
||||
("\\.html?\\'" ,cmd)
|
||||
("\\.md\\'" ,cmd)))))
|
||||
|
||||
|
||||
(use-package! fd-dired
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue