I am using Windows 10 and Emacs 26.1.
Suppose I open some file:
And now I want fast open dired mode. The result must be like this:
I want to do this by ONE hotkey direct from a buffer. E.g.
Is it possible?
You can use
dired-jump from the builtin
dired-x.el. I have it bound to C-x C-j, you can setup your own key binding.
C-x C-jruns the command
dired-jump(found in global-map), which is an interactive autoloaded compiled Lisp function in
It is bound to C-x C-j.
(dired-jump &optional OTHER-WINDOW FILE-NAME)
Jump to Dired buffer corresponding to current buffer. If in a file, Dired the current directory and move to file's line. If in Dired already, pop up a level and goto old directory's line. In case the proper Dired file line cannot be found, refresh the dired buffer and try again. When OTHER-WINDOW is non-nil, jump to Dired buffer in other window. When FILE-NAME is non-nil, jump to its line in Dired. Interactively with prefix argument, read FILE-NAME.