emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Orgmode keybindings in Dired?


From: Kepa
Subject: RE: Orgmode keybindings in Dired?
Date: Fri, 23 Aug 2024 14:40:54 +0000

Hi Marcin!
Below I shared some ideas

> -----Original Message-----
> From: mbork at mbork.pl
> <gvscwbfbwppxuzuayumtkykgivwkhhtzvnauvzkhlzgmkgc@simplelogin.co>
> Sent: Friday, August 23, 2024 7:21 AM
> To: Kepa <gnu.cognition199@slmails.com>
> Subject: Re: Orgmode keybindings in Dired?
> 
> On 2024-08-22, at 18:27, Kepa <gnu.cognition199@slmails.com> wrote:
> 
> > Hi
> >
> > I'm starting to use Dired and I like it.
> > I would like to know your opinion, fellow orgmode users about keybindings
> in Dired:
> > Is it worth modifying Dired's keybindings to match those of Org-mode?
> Could it have any side effect?
> > Any specific advice?
> >
> > Has this configuration already been shared? I assume someone else must
> have thought of this before...
> 
> Which keybindings do you mean exactly?  Dired's keybindings are usually
> consistent with the rest of Emacs (and most of them predate Org mode, I
> believe), so one would need to be quite careful not to introduce any
> inconsistencies.

Examples:
w to (dired-do-rename), instead of R, like refile speedkey.
o to (browse-url-of-dired-file), instead of W, like org-open-at-point speedkey.
M-RET to (dired-create-directory), instead of +.
And maybe other org speedkeys.

Although I have found that using dired-subtree gives naturally this oportunity. 
Here some examples (I must change "u" keybinding, since it is used to unmark 
files, maybe I could use C-g to unmark files, could it be risky?


;; Bind 'TAB' to toggle subtree visibility (cycle through subdirectories)
(with-eval-after-load 'dired
  (define-key dired-mode-map (kbd "TAB") 'dired-subtree-cycle))

;; (org-speed-move-safe 'outline-up-heading) (similar to 'u' in Org-mode for 
dired-subtree-up)
(define-key dired-mode-map (kbd "u") 'dired-subtree-up)

 ;; Bind 's' to narrow the view to the current subdirectory
  (define-key dired-mode-map (kbd "s") 'dired-subtree-narrow)


> 
> Best,
> 
> --
> Marcin Borkowski
> https://mbork.pl
> https://crimsonelevendelightpetrichor.net/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]